1 unstable release

0.1.0 Mar 27, 2022

#2886 in Cryptography

Download history 7265/week @ 2024-09-23 6497/week @ 2024-09-30 9361/week @ 2024-10-07 9945/week @ 2024-10-14 12430/week @ 2024-10-21 9450/week @ 2024-10-28 8074/week @ 2024-11-04 8484/week @ 2024-11-11 9898/week @ 2024-11-18 10728/week @ 2024-11-25 8948/week @ 2024-12-02 9106/week @ 2024-12-09 7571/week @ 2024-12-16 6192/week @ 2024-12-23 5695/week @ 2024-12-30 9242/week @ 2025-01-06

29,027 downloads per month
Used in clevis

MIT/Apache

8KB
63 lines

RustCrypto: Concat KDF

crate Docs Apache2/MIT licensed Rust Version Project Chat Build Status

Pure Rust implementation of the Concatenation Key Derivation Function (Concat KDF) generic over hash 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();

Dependencies

~340KB