Verify independence and uniform distribution of discrete values in Python?

Dan Stromberg drsalists at gmail.com
Fri Jul 9 12:39:33 EDT 2021


I've posted a question about CPython 3.[0-9]'s
random.SystemRandom().choice(list_) at
https://stackoverflow.com/questions/68319071/verify-independence-and-uniform-distribution-of-discrete-values-in-python

In short, we need to be able to support CPython's a little older than the
secrets module goes back, but we still need independence and uniform
distribution - in fact, we need cryptographic strength randomness.

Does anyone know if SystemRandom() is cryptographically strong in CPython
>= 3.0?

It appears that the good module secrets is cryptographically strong, but
doesn't go back in CPython 3.x's history far enough, and it appears to
build on random.SystemRandom().

Thanks!


More information about the Python-list mailing list