úÎO,K–     Good experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred9A handle to an entropy maker, either a system capability  or a hardware generator. &try to open an handle for this source 7try to gather a number of entropy bytes into a buffer. , return the number of actual bytes gathered Close an open handle Good experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred 4fake handle to Intel RDRand entropy cpu instruction  !"#$%&  !"#$%&Good experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred'Entropy device devurandom on unix system (Entropy device devrandom on unix system ')(*+,-./0123'( ')(*+,-./0123Good experimental#Vincent Hanquez <vincent@snarc.org>None Mutable random test State 3Randomness various result relative to random bytes Total number of characters Entropy per byte  Chi Square Arithmetic Mean Theorical Compression percent Probability of every bucket "Initialize new state to run tests %Append random data to the test state ,Finalize random test state into some result 4 56   4 56Good experimental#Vincent Hanquez <vincent@snarc.org>None ;Pool of Entropy. contains a self mutating pool of entropy, , that is always guarantee to contains data. 7-Create a new entropy pool of a specific size fWhile you can create as many entropy pool as you want, the pool can be shared between multiples RNGs. /Create a new entropy pool with a default size. fWhile you can create as many entropy pool as you want, the pool can be shared between multiples RNGs. 7Create a dummy entropy pool that is deterministic, and ) dependant on the input bytestring only. LThis is stricly reserved for testing purpose when a deterministic seed need * to be generated with deterministic RNGs. Do not use in production code. 8.Put a chunk of the entropy pool into a buffer /Grab a chunk of entropy from the entropy pool. /Grab a chunk of entropy from the entropy pool. 8Great care need to be taken here when using the output, 6 as this use unsafePerformIO to actually get entropy. Use grabEntropyIO if unsure.  9:;<=>?@A7 8BC 8 9:;<=>?@A7 8BCGood experimental#Vincent Hanquez <vincent@snarc.org>None&Cryptographic Pseudo Random Generator ?Create a new CPRG using an object of the CryptoGenerator class 3 and with an explicit reference to an EntropyPool. AGive the ability to set a threshold of byte generated that after C being exceeded will result in a reseed with some stateful entropy  after a call to  <If this threshold is exceeded during the set operation, the  rng should be reseeded here. =If this value is set to 0, no reseeding will be done and the A output will be completely predicable. This is not a recommended 1 level except for debugging and testing purpose. )Fork a CPRG into a new independent CPRG. 8As entropy is mixed to generate safely a new generator, > 2 calls with the same CPRG will not produce the same output. +Generate a number of bytes using the CPRG. =Given one CPRG, the generated bytes will always be the same. FHowever the returned CPRG might have been reseeded with entropy bits, R so 2 calls with the same CPRG will not necessarily result in the same next CPRG. PSimilar to cprgGenerate except that the random data is mixed with pure entropy, N so the result is not reproducible after use, but it provides more guarantee, < theorically speaking, in term of the randomness generated. Good experimental#Vincent Hanquez <vincent@snarc.org>NoneSystem entropy generator. This generator doesn'2t use the entropy reseed level, as the only bytes 6 generated are comping from the entropy pool already. This generator doesn'8t create reproducible output, and might be difficult to N use for testing and debugging purpose, but otherwise for real world use case  should be fine.  generate 6len random bytes and mapped the bytes to the function f. (This is equivalent to use Control.Arrow first with  DE  DEGood experimental#Vincent Hanquez <vincent@snarc.org>None8Generate bytes using the CPRG and the number specified. For user of the API, it'$s recommended to use genRandomBytes ; instead of this method directly. the CPRG need to be able , to supply at minimum 2^20 bytes at a time. ,Generate bytes using the cprg in parameter. 1If the number of bytes requested is really high,  it's preferable to use  for better memory efficiency. ,Generate bytes using the cprg in parameter. JThis is not tail recursive and an excessive len (>= 2^29) parameter would  result in stack overflow. number of bytes to return  CPRG to use number of bytes to return  CPRG to use  F       !"#$%&'(()*+,-././012345678 9:;<==>>?@ABCDEFcrypto-random-0.0.7Crypto.Random.Test Crypto.RandomCrypto.Random.APICrypto.Random.Entropy.SourceCrypto.Random.Entropy.RDRandCrypto.Random.Entropy.UnixCrypto.Random.EntropyCrypto.Random.GeneratorRandomTestStateRandomTestResultres_totalChars res_entropyres_chi_squareres_meanres_compressionPercent res_probsrandomTestInitializerandomTestAppendrandomTestFinalize EntropyPoolcreateEntropyPoolcreateTestEntropyPool grabEntropyIO grabEntropyCPRG cprgCreatecprgSetReseedThresholdcprgFork cprgGeneratecprgGenerateWithEntropy SystemRNGwithRandomBytes cprgGenBytesgenRandomBytesgenRandomBytes' EntropySource entropyOpen entropyGather entropyCloseRDRandc_get_rand_bytesc_cpu_has_rdrand rdrandGrabrdrandGetBytes$fEntropySourceRDRand DevURandom DevRandom DeviceNameHtestOpenopenDevwithDevcloseDevgatherDevEntropy$fEntropySourceDevURandom$fEntropySourceDevRandommonteN calculatecreateEntropyPoolWithgrabEntropyPtrTestEntropySourceEntropyBackendsupportedBackends openBackend gatherBackenddefaultPoolSize replenish $fEntropySourceTestEntropySource$fCPRGSystemRNG