Randomness in Python: Controlled Chaos in an Ordered Machine
summary
Shows a concrete exploit where user IDs seeded by a restart time give 60,000 possible seeds and allow predicted tokens and impersonation, contrasts the Dual_EC_DRBG backdoor saga (introduced 2004, weakness exposed 2007, Snowden/Bullrun ties in 2013, standard removed after ~10 years), demonstrates the middle‑square method repeating after 62 steps for seed 5859, explains that Python’s Mersenne Twister is non‑cryptographic and that the secrets module uses 32 bytes of entropy and OS sources (/dev/random vs /dev/urandom) for practical safety.
AI-written summary · about
chapters (17)
- 0:00Intro
- 3:29Problems with randomness
- 5:33DUAL EC DRBG Controversy
- 7:45The Washington Post Man who leaked NSA secrets steps forward
- 10:44An ideal pseudo random number generator should...
- 13:14Linear congruential generators
- 15:23Mid square method generally
- 16:54Issues with mid square method
- 17:38Let's talk cryptography
- 17:51The Mersenne Twister
- 20:15Problems with the random module...
- 22:05Natural sources of entropy
- 22:41Source code of Secrets module
- 23:55dev/urandom
- 25:07Using the secrets module to get tokens
- 25:27Using the secrets module for password generation
- 26:13Python's nuclear reactor of Randomness








