Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Randomness (was : Call for presenters for September 11th)



> B) Random number generators.
> Currently using python random library to generate candidate passwords. 
> Should one care about the randomness and uniformity of distribution?

https://docs.python.org/3/library/random.html

I think it is fine for generating candidate passwords (for use in
cracking). The comment about "completely unsuitable for cryptographic
purposes" is in relation to it being deterministic.

The use of getstate/setstate should also allow you to shutdown the
program and restart it later on from wherever you were up to, and not
repeat the previous random numbers.

For generating passwords, etc. that you will use to protect things,
switch to https://docs.python.org/3/library/secrets.html

Darren


Home | Main Index | Thread Index