úÎ>W8’&      !"#$% Safe-InferredNone&&&None'()*+,-.   '()*+,-. None AGet a count of how many times this generator has been used since  instantiation or reseed. Update the RNG GInstantiate a new CTR based counter. This assumes the block cipher is D safe for generating 2^48 seperate bitstrings (e.g. For SP800-90 we  assume AES and not 3DES)  $reseed oldRNG entropy additionalInfo!Reseed a DRBG with some entropy (ent+ must be at least seedlength, which is the # block length plus the key length) 4Generate new bytes of data, stepping the generator. The reseed interval /012 3   /012 3None 45678 45678 portable betaThomas.DuBuisson@gmail.comNone  GenCounter k) is a cryptographic BlockCipher with key k  being used in 9 mode to generate random bytes. 4A random number generator using AESKey in ctr mode. g :: GenBuffered a is a generator of type a that attempts to 4 maintain a buffer of random values size >= 1MB and <= 5MB at any time. g :: GenXor a b. generates bytes with sub-generators a and b  and exclusive-or'.s the outputs to produce the resulting bytes. g :: GenAutoReseed a b$ is a generator of type a that gets B automatically reseeded by generator b upon every 32kB generated.  reseed g ent. will reseed both the component generators by S breaking ent up into two parts determined by the genSeedLength of each generator. genBytes2 will generate the requested bytes with generator a and reseed a  using generator bA if there has been 32KB of generated data since the last reseed. N Note a request for > 32KB of data will be filled in one request to generator a before  a is reseeded by b. genBytesWithEntropy, is lifted into the same call for generator a, but % it will still reseed from generator b if the limit is hit. Reseed interval: If generator a needs a genSeedLength a = a' and generator B  needs reseeded every 2^b bytes then a GenAutoReseed a b will need reseeded every   2^15 * (2^b / a')" bytes. For the common values of a' = 128 and  2^b = 2^48 this N means reseeding every 2^56 byte. For the example numbers this translates to J about 200 years of continually generating random values at a rate of 10MB/s. 1An Alias for a Hash DRBG generator using SHA512. !2An alias for an HMAC DRBG generator using SHA512. "8The Hash DRBG state (of kind * -> *) allowing selection # of the underlying hash algorithm. #8The HMAC DRBG state (of kind * -> *) allowing selection < of the underlying hash algorithm (SHA1, SHA224 ... SHA512) $newGenAutoReseed bs i creates a new  with a custom interval  of i% bytes using the provided entropy in bs. +This is for extremely long running uses of : instances  that can'>t explicitly reseed as often as a single underlying generator ( would need (usually every 2^48 bytes).  For example:   U newGenAutoReseedIO (2^48) :: IO (Either GenError (GenAutoReseed HashDRBG HashDRBG)) Will last for  2^48 * 2^41( bytes of randomly generated data. That's P 2^49 terabytes of random values (128 byte reseeds every 2^48 bytes generated). %newGenAutoReseedIO i creates a new  with a custom  interval of i< bytes, using the system random number generator as a seed. See $. ;)Force evaluation for use by GenBuffered. %<=> !"#$%?@ABCDEFG;HIJKLMNOPQRST(UVWXYZ[\]^_`abcdefghi:jklmnop !"#$% ! #"$%"<=> !"#$%?@ABCDEFG;HIJKLMNOPQRSTq        !"#$%&'()#$%*#$+,-./0.123456789:;<=>?@ABCDEFGHI.1J.1K.1L.1M.1N.1O.1P.1Q.1R.1S.1T.1U.1V.1W.1.1X.1Y.1Z.1[.1\.1].1^._`.ab.ac.ac.ad.aefDRBG-0.4Crypto.Random.DRBG.TypesCrypto.Random.DRBG.HMACCrypto.Random.DRBG.CTRCrypto.Random.DRBG.HashCrypto.Random.DRBGCrypto.Random.DRBG.HashDF RandomBitsAdditionalInputNoncePersonalizationStringEntropyBitLenStatecounterreseedInterval instantiatereseedgenerate getCounterupdate SeedLengthseedlen GenCounterGenAES GenBufferedGenXor GenAutoReseedHashDRBGHmacDRBG HashDRBGWith HmacDRBGWithnewGenAutoReseednewGenAutoReseedIOhash_dfStvaluekeyhashAlgValueKeyfc keyOfStateconstanthshhashGencrypto-api-0.12.2.1Crypto.Classesctr Crypto.RandomCryptoRandomGenevalhelper1helper2 helperXor1 helperXor2 bufferMinDef bufferMaxDefnewGenBufferednewGenBufferedIOwrapErrasProxyStateTypeOf xorExtendBS$fCryptoRandomGenState$fCryptoRandomGenGenBuffered$fCryptoRandomGenGenXor$fCryptoRandomGenGenAutoReseed$fCryptoRandomGenState0$fCryptoRandomGenState1$fSeedLengthSHA1$fSeedLengthSHA224$fSeedLengthSHA256$fSeedLengthSHA384$fSeedLengthSHA512splitGen GenErrorOtherRequestedTooManyBytes RangeInvalid NeedReseedNotEnoughEntropyNeedsInfiniteSeedGenErrorInXBytesInXCallsNotSoonNever ReseedInfonewGenIOgenBytesWithEntropy reseedPeriod reseedInfogenBytes genSeedLengthnewGen SystemRandom Crypto.Util throwLeft Crypto.TypesinitializationVectorIV BitLength ByteLength