Module kdf

Module kdf 

Source
Expand description

TLS key derivation functions.

Implements:

  • TLS 1.2 PRF (Pseudo-Random Function) based on HMAC-SHA256/SHA384
  • TLS 1.3 HKDF-based key derivation

Structs§

Tls12KeyMaterial
TLS 1.2 key material derived from master secret.
Tls13KeyMaterial
TLS 1.3 key material derived from traffic secret.

Enums§

AeadAlgorithm
AEAD algorithm for TLS record encryption.
HashAlgorithm
Hash algorithm used for key derivation.
KeyDerivationError
Errors during key derivation.

Functions§

derive_tls12_keys
Derive TLS 1.2 key material from master secret.
derive_tls13_keys
Derive TLS 1.3 key material from a traffic secret.
hash_for_cipher_suite
Get the hash algorithm for a TLS cipher suite.
tls12_prf
TLS 1.2 PRF (Pseudo-Random Function).