#hmac #pure #drbg

hmac-drbg

Pure Rust implementation of Hmac DRBG

5 unstable releases

0.3.0 Jun 15, 2020
0.2.0 Sep 26, 2019
0.1.2 Nov 8, 2017
0.1.1 Nov 8, 2017
0.1.0 Nov 7, 2017

#1869 in Cryptography

Download history 92902/week @ 2023-11-23 89254/week @ 2023-11-30 96574/week @ 2023-12-07 81710/week @ 2023-12-14 54321/week @ 2023-12-21 49585/week @ 2023-12-28 86290/week @ 2024-01-04 85687/week @ 2024-01-11 99962/week @ 2024-01-18 92375/week @ 2024-01-25 95167/week @ 2024-02-01 89556/week @ 2024-02-08 93737/week @ 2024-02-15 99243/week @ 2024-02-22 91873/week @ 2024-02-29 65222/week @ 2024-03-07

365,167 downloads per month
Used in 303 crates (6 directly)

Apache-2.0

16KB
101 lines

Hmac DRBG

Build Status License Cargo

Pure Rust Hmac DRBG implementation with support of no_std.

Usage

Add hmac-drbg = "0.1" dependency.

let mut drbg = HmacDRBG::<Sha256>::new(
    "totally random0123456789".as_bytes(),
    "secret nonce".as_bytes(),
    "my drbg".as_bytes());
assert_eq!(drbg.generate::<U32>(None).as_slice(), read_hex("018ec5f8e08c41e5ac974eb129ac297c5388ee1864324fa13d9b15cf98d9a157").unwrap().as_slice());

Dependencies

~400KB