Crates.io | rust-kbkdf |
lib.rs | rust-kbkdf |
version | 1.1.0 |
source | src |
created_at | 2022-07-12 02:34:04.517639 |
updated_at | 2022-07-15 00:39:20.937254 |
description | SP800-108 Key Based Key Derivation Using Pseudorandom Functions |
homepage | |
repository | https://gitlab.com/michael.j.boquard/rust-kbkdf |
max_upload_size | |
id | 624062 |
size | 105,914 |
This crate provides a Rust implementation of the NIST SP800-108 standard for performing key-derivation based on a source key.
This crate implements the KBKDF in the following modes:
This crate was designed such that the user may provide their own Pseudo Random Function (as defined in Section 4 of SP800-108) via the implementation of two traits:
PseudoRandomFunctionKey
]PseudoRandomFunction
]The purpose of the PRF trait is to allow a user to provide their own implementation of a PRF (as defined in Section 4 of SP800-108).
Please note, that in order for an implementation of KBKDF to be NIST approved, an approved PRF must be used!
The author of this crate does not guarantee that this implementation is NIST approved!
This trait is used to ensure that the implementation of the PseudoRandomFunction
trait can access the necessary
source key in a way that passes Rust's borrow checker.
An example of how to use the two traits are found in the tests
module utilizing the OpenSSL Crate.