Message143128
A bit more on the state size and period of the stream ciphers.
Chacha and Salsa use 64 bytes (512 bits) of state (vs ~2.5kB for MT19937).
Its counter is 64 bits, and its seed can be 320 bits (in cipher-speak, the seed is split between a 256 bit key and a 64 bit IV).
Each counter iteration produces 64 random bytes, or 8 doubles, so for any seed, you get a cycle of 2 ** 67, which would last in the order of 100 thousand years on current PCs.
Some of the other ciphers I looked at have smaller seeds and states, and some produce fewer bytes per iteration, but I don't think any of them will result in a cycle of smaller than 2 ** 64.
PS: Regarding the discussion of something like Random.getrandbytes(n): +1 |
|
Date |
User |
Action |
Args |
2011-08-29 00:03:12 | dbagnall | set | recipients:
+ dbagnall, rhettinger, vstinner, sturlamolden |
2011-08-29 00:03:12 | dbagnall | set | messageid: <1314576192.34.0.549599238846.issue12754@psf.upfronthosting.co.za> |
2011-08-29 00:03:11 | dbagnall | link | issue12754 messages |
2011-08-29 00:03:11 | dbagnall | create | |
|