Skip to main content

derive_traffic_keys

Function derive_traffic_keys 

Source
pub fn derive_traffic_keys<C: CryptoProvider + ?Sized>(
    provider: &C,
    suite: CipherSuite,
    traffic_secret: &Hash,
) -> Result<(C::AeadKey, [u8; 12]), Error>
Expand description

Derive handshake traffic keys from a traffic secret.

Derives key = HKDF-Expand-Label(secret, “key”, “”, Nkey) Derives iv = HKDF-Expand-Label(secret, “iv”, “”, 12) Returns the AEAD key and IV directly.