concat-kdf

Crates.ioconcat-kdf
lib.rsconcat-kdf
version0.1.0
sourcesrc
created_at2022-03-27 18:53:41.4607
updated_at2022-03-27 18:53:41.4607
descriptionConcatenation Key Derivation Function (Concat KDF)
homepagehttps://github.com/RustCrypto/KDFs/
repositoryhttps://github.com/RustCrypto/KDFs/
max_upload_size
id557382
size17,540
KDFs (github:rustcrypto:kdfs)

documentation

README

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();
Commit count: 115

cargo fmt