úÎ7Q2O      Safe-InferredNone Safe-Inferred   None!"#$%&'()   !"#$%&'() None *+,-. /    *+,-.  / portable betaThomas.DuBuisson@gmail.comNone  GenCounter k) is a cryptographic BlockCipher with key k  being used in 0 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 1 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 . 2)Force evaluation for use by GenBuffered. 3zipWith xor + Pack Y As a result of rewrite rules, this should automatically be optimized (at compile time) ! to use the bytestring libraries zipWith' function. )456789:;<=>?@ABC2D3EFGHIJKLMNOPQRSTUVWXYZ[\]^1_`a %456789:;<=>?@ABC2D3EFGHIJKLMNOb       !"#$%&'()*+#$,&-./01/23456789:;<=>?@ABCDEFGHIJKLM/2N/2O/2P/2Q/2R/2S/2T/2U/2V/2W/2/2X/2Y/2Z/2[/2\/]^/]_`DRBG-0.3Crypto.Random.DRBG.TypesCrypto.Random.DRBG.HMACCrypto.Random.DRBG.HashCrypto.Random.DRBGCrypto.Random.DRBG.HashDFCrypto.Random.DRBG.Util RandomBitsAdditionalInputNoncePersonalizationStringEntropyBitLenStatereseedInterval instantiatereseedgenerate SeedLengthseedlen GenCounterGenAES GenBufferedGenXor GenAutoReseedHashDRBGHmacDRBG HashDRBGWith HmacDRBGWithnewGenAutoReseednewGenAutoReseedIOhash_dfincBSi2bsbs2iStvaluekeycounterhashAlgValueKeyfcupdateconstanthshhashGencrypto-api-0.10.2 Crypto.Modesctr Crypto.RandomCryptoRandomGenevalzwp'seed rightProxyhelper1helper2 helperXor1 helperXor2proxyToGenBuffered bufferMinDef bufferMaxDefnewGenBufferednewGenBufferedIOwrapErr xorExtendBS$fCryptoRandomGenGenCounter$fCryptoRandomGenGenBuffered$fCryptoRandomGenGenXor$fCryptoRandomGenGenAutoReseed$fCryptoRandomGenState$fCryptoRandomGenState0$fSeedLengthSHA1$fSeedLengthSHA224$fSeedLengthSHA256$fSeedLengthSHA384$fSeedLengthSHA512 throwLeftsplitGen GenErrorOtherRequestedTooManyBytes RangeInvalid NeedReseedNotEnoughEntropyNeedsInfiniteSeedGenErrornewGenIOgenBytesWithEntropygenBytes genSeedLengthnewGen SystemRandom Crypto.Types BitLength ByteLength