1 unstable release

0.1.0 Mar 27, 2022

#2955 in Cryptography

Download history 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 5674/week @ 2024-12-30 9138/week @ 2025-01-06 8813/week @ 2025-01-13 9456/week @ 2025-01-20 10522/week @ 2025-01-27 11583/week @ 2025-02-03 11463/week @ 2025-02-10 9750/week @ 2025-02-17 12068/week @ 2025-02-24 10832/week @ 2025-03-03

44,897 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

~595KB
~15K SLoC