web3-crypto-1.0.0.0: Cryptograhical primitives for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2021
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Crypto.Random.HmacDrbg

Description

NIST standardized number-theoretically secure random number generator. https://csrc.nist.gov/csrc/media/events/random-number-generation-workshop-2004/documents/hashblockcipherdrbg.pdf

XXX: This algorithm requires reseed after 2^48 iterations.

Inspired by https://github.com/TomMD/DRBG and https://github.com/indutny/hmac-drbg.
Synopsis

Documentation

data HmacDrbg a Source #

HMAC Deterministic Random Bytes Generator.

Instances

Instances details
Eq (HmacDrbg a) Source # 
Instance details

Defined in Crypto.Random.HmacDrbg

Methods

(==) :: HmacDrbg a -> HmacDrbg a -> Bool #

(/=) :: HmacDrbg a -> HmacDrbg a -> Bool #

HashAlgorithm a => DRG (HmacDrbg a) Source # 
Instance details

Defined in Crypto.Random.HmacDrbg

Methods

randomBytesGenerate :: ByteArray byteArray => Int -> HmacDrbg a -> (byteArray, HmacDrbg a) #

initialize :: (ByteArray seed, HashAlgorithm a) => seed -> HmacDrbg a Source #

Initialize HMAC-DRBG by seed.