Expand description
An implementation of Concat KDF, the Concatenation Key Derivation Function.
This function is described in the section 5.8.1 of NIST SP 800-56A, Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography.
§Usage
The most common way to use Concat KDF is as follows: you generate a shared secret with other party (e.g. via Diffie-Hellman algorithm) and use key derivation function to derive a shared key.
let mut key = [0u8; 32];
concat_kdf::derive_key_into::<sha2::Sha256>(b"shared-secret", b"other-info", &mut key).unwrap();
Enums§
- Error
- Concat KDF errors.
Functions§
- derive_
key std
- Derives and returns
length
bytes key fromsecret
andother_info
. - derive_
key_ into - Derives
key
in-place fromsecret
andother_info
.