#hmac #drbg #pure #no-std

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

#1026 in Development tools

Download history 121570/week @ 2024-11-17 116596/week @ 2024-11-24 133962/week @ 2024-12-01 132491/week @ 2024-12-08 109111/week @ 2024-12-15 56117/week @ 2024-12-22 69084/week @ 2024-12-29 127004/week @ 2025-01-05 154066/week @ 2025-01-12 142144/week @ 2025-01-19 134694/week @ 2025-01-26 159056/week @ 2025-02-02 150149/week @ 2025-02-09 138462/week @ 2025-02-16 142932/week @ 2025-02-23 142727/week @ 2025-03-02

583,728 downloads per month
Used in 612 crates (7 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

~675KB
~16K SLoC