MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / derive

Method derive

mlspp/src/crypto.cpp:318–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318HPKEPrivateKey
319HPKEPrivateKey::derive(CipherSuite suite, const bytes& secret)
320{
321 auto priv = suite.hpke().kem.derive_key_pair(secret);
322 auto priv_data = suite.hpke().kem.serialize_private(*priv);
323 auto pub = priv->public_key();
324 auto pub_data = suite.hpke().kem.serialize(*pub);
325 return { priv_data, pub_data };
326}
327
328bytes
329HPKEPrivateKey::decrypt(CipherSuite suite,

Callers

nothing calls this directly

Calls 4

derive_key_pairMethod · 0.45
serialize_privateMethod · 0.45
public_keyMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected