![]() ![]() Use of these test vectors does not replace validation obtained through the CAVP. Prerequisites for DRBG testing are listed in the CAVP Frequently Asked Questions (CAVP FAQ) General Question GEN.5.The DRBG Validation System (DRBGVS) specifies validation testing requirements for the DRBG algorithm in SP800-90A. So, generally, just cache the result of a call to rand() and use the bits of that number in sequence for your application, instead of rand() % 2.Algorithm specifications for current FIPS-approved and NIST-recommended random number generators are available from the Cryptographic Toolkit.Ĭurrent testing includes the following algorithm:Īlgorithm Validation Testing Requirements Deterministic Random Bit Generators (DRBG) This largely holds true for generators where RAND_MAX is as high as 2 31 but you can't count on that sometimes (so maybe restrict yourself to 16 or 24 bits there, taken from the high-order end). So no low-order bits from the generator there. For example the Microsoft CRT generates random numbers with the equationĪnd then shifts away the lowest-order 16 bits of that result and restricts it to 15 bits. Especially if RAND_MAX is that small you are not dealing with the low-order bits of the generator, so taking bits from the high end doesn't gain you much. So if your RAND_MAX is 32768 you can use the lowest-order 15 bits of that number in sequence. You can just cache the number generated by a call to rand() and use each bit of it (depending on the number of bits rand() gives you, of course, which will depend on RAND_MAX). Essentially you're throwing away between 14 and 31 bits of pseudo-randomness here. Individual bits, spaced evenly on that stream, need not have the same properties. Most random number generators can be broken down to a stream of bits which has certain randomness and statistical properties. The easiest thing you can do, short of writing another PRNG or using a library, would be to just use all bits that a single call to rand() gives you. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |