web3-0.8.3.0: Ethereum API for Haskell

CopyrightAlexander Krupenkin 2018
LicenseBSD3
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
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.