#kdf #nist #crypto

no-std concat-kdf

Concatenation Key Derivation Function (Concat KDF)

1 unstable release

0.1.0 Mar 27, 2022

#4 in #kdf

Download history 170/week @ 2023-11-20 214/week @ 2023-11-27 174/week @ 2023-12-04 152/week @ 2023-12-11 158/week @ 2023-12-18 84/week @ 2023-12-25 108/week @ 2024-01-01 202/week @ 2024-01-08 154/week @ 2024-01-15 173/week @ 2024-01-22 201/week @ 2024-01-29 186/week @ 2024-02-05 167/week @ 2024-02-12 257/week @ 2024-02-19 340/week @ 2024-02-26 324/week @ 2024-03-04

1,096 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

~325KB