HMAC_RNG

HMAC_RNG - based on the design described in "On Extract-then-Expand Key Derivation Functions and an HMAC-based KDF" by Hugo Krawczyk (henceforce, 'E-t-E')

However it actually can be parameterized with any two MAC functions, not restricted to HMAC (this variation is also described in Krawczyk's paper), for instance one could use HMAC(SHA-512) as the extractor and CMAC(AES-256) as the PRF.

Constructors

this
this(MessageAuthenticationCode extractor, MessageAuthenticationCode prf)

Members

Functions

addEntropy
void addEntropy(const(ubyte)* input, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
isSeeded
bool isSeeded()
Undocumented in source. Be warned that the author may not have intended to support it.
randomVec
SecureVector!ubyte randomVec(size_t bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
randomize
void randomize(ubyte* output, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
reseed
void reseed(size_t poll_bits)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From RandomNumberGenerator

makeRng
RandomNumberGenerator makeRng()

Create a seeded and active RNG object for general application use Added in 1.8.0

makeRng
RandomNumberGenerator makeRng(AlgorithmFactory af)

Create a seeded and active RNG object for general application use Added in 1.11.5

randomize
void randomize(ubyte* output, size_t length)

Randomize a ubyte array.

randomVec
SecureVector!ubyte randomVec(size_t bytes)

Return a random vector

nextByte
ubyte nextByte()

Return a random ubyte

isSeeded
bool isSeeded()

Check whether this RNG is seeded.

clear
void clear()

Clear all internally held values of this RNG.

name
string name [@property getter]

Return the name of this object

reseed
void reseed(size_t bits_to_collect)

Seed this RNG using the entropy sources it contains.

addEntropy
void addEntropy(const(ubyte)* input, size_t length)

Add entropy to this RNG.

Meta