Pure Python Data Mangling or Encrypting

Robert Kern robert.kern at gmail.com
Sat Jun 27 03:58:46 EDT 2015


On 2015-06-27 04:38, Steven D'Aprano wrote:

> Maybe you use Python's standard library and the Mersenne Twister. The period
> of that is huge, possibly bigger than 256! (or not, I forget, and I'm too
> lazy to look it up). So you think that's safe. But it's not: Mersenne
> Twister is not a cryptographically secure pseudorandom number generator. If
> I can get some small number of values from the Twister (by memory,
> something of the order of 100 such values) then I can predict the rest for
> ever.

634.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list