You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, when you ask exercises.Secret to give you a non-secure PRNG, it derives a key (str) and passes it to random.Random.seed. It has the wonderful API that lets you pass in anything hashable; but it's not clear just how much entropy survives. Since this is explicitly NOT for cryptographically secure PRNG purposes, we probably don't really care, but this might be interesting information for other people.
Right now, the str hashing algorithm in CPython is FNV-1; see detailed description in PEP 456.
So then I guess we have to care what Py_uhash_t is, and how big the seed is for the MT variant Python uses on 64 bit machines, and, perhaps most importantly, how much bias FNV-1 introduces.
The text was updated successfully, but these errors were encountered:
Right now, when you ask
exercises.Secret
to give you a non-secure PRNG, it derives a key (str) and passes it to random.Random.seed. It has the wonderful API that lets you pass in anything hashable; but it's not clear just how much entropy survives. Since this is explicitly NOT for cryptographically secure PRNG purposes, we probably don't really care, but this might be interesting information for other people.Right now, the str hashing algorithm in CPython is FNV-1; see detailed description in PEP 456.
So then I guess we have to care what
Py_uhash_t
is, and how big the seed is for the MT variant Python uses on 64 bit machines, and, perhaps most importantly, how much bias FNV-1 introduces.The text was updated successfully, but these errors were encountered: