Botan

HMAC RNG

License
Botan is released under the Simplified BSD License (see LICENSE.md)

class  HMAC_RNG: botan.rng.rng.RandomNumberGenerator;

 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.


this(MessageAuthenticationCode extractor, MessageAuthenticationCode prf);

Parameters
MessageAuthenticationCode extractor a MAC used for extracting the entropy
MessageAuthenticationCode prf a MAC used as a PRF using HKDF construction