On Wednesday, July 8, 2015 at 7:31:20 AM UTC-4, Jeffrey Walton wrote: > > Below is the implementation of RandomNumberGenerator::GenerateWord32 from > cryptlib.h. > > I know fair shuffling routines can be tricky. Fisher-Yates has some > non-obvious logic to avoid it, but I'm not sure about the interaction > between GenerateBlock and Crop. See, for example, > https://security.stackexchange.com/questions/68044/secure-shuffles-and-the-rand-function > . > > QUESTION: Does it have a bias? >
It appear NO. I could not detect a statistical bias with the Chi-Squared test (looking for deviations from the uniform distribution). > I thought the count of elements in the range [a,b] is given by b - a + 1 > (and not just b - a). > > QUESTION: does it provide all values in the range, inclusive. > Yes. The library also handled the pathological case where a = b. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
