Skip to main content

derive_aead_key

Function derive_aead_key 

Source
pub fn derive_aead_key(shared_secret: &[u8], label: &[u8]) -> [u8; 32]
Expand description

Derive a directional 32-byte AEAD key from an ML-KEM shared secret via SHAKE256, domain-separated by label (e.g. b"i2r" / b"r2i") so each direction has an independent key — no nonce reuse across the two streams that share the handshake secret.