package mirage-crypto-rng
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=bfb530fa169cd905ebc7e2449f3407cfbd67023ac0b291b8b6f4a1437a5d95b1
sha512=7b6f4e8128622b53eb2176881b5d6160f224e8606c7dd21aaf47974f15db7aa475cffaff3214aaaabba0f8986398f159c1fbb1bff29228c9b0a3fae67ef8d731
doc/mirage-crypto-rng/Mirage_crypto_rng/Hmac_drbg/index.html
Module Mirage_crypto_rng.Hmac_drbgSource
HMAC_DRBG: A NIST-specified RNG based on HMAC construction over the provided hash.
Parameters
module H : Mirage_crypto.Hash.SSignature
Internally, this generator's generate always produces k * block bytes.
generate ~g n produces n uniformly distributed random bytes, updating the state of g.
reseed ~g bytes directly updates g. Its new state depends both on bytes and the previous state.
A generator is seded after a single application of reseed.
val accumulate : g:g -> Entropy.source -> [ `Acc of Cstruct.t -> unit ]accumulate ~g is a closure suitable for incrementally feeding small amounts of environmentally sourced entropy into g.
Its operation should be fast enough for repeated calling from e.g. event loops. Systems with several distinct, stable entropy sources should use stable source to distinguish their sources.
val seeded : g:g -> boolseeded ~g is true iff operations won't throw Unseeded_generator.