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

Python Random Number Generator for OTP

At 01:50 PM 7/22/2013, Tom wrote:
>Does anyone on the list have some Python source code for an 
>OTP-focused random number generator they'd be willing to share? I'm 
>interested in seeing how different people would approach it?

You can use Python or other languages to access your machine's 
hardware random number generator and mash them together with your plaintext.
But your question sounds like you want to generate the random numbers 
themselves with Python software?
         print "You can't generate true random numbers in 
software.  And you can't use pseudo-random numbers for OTP.\n %d", 1/0 ;
(My python's a bit rusty, so the syntax may be wrong, but if so, 
that's a feature; the divide-by-zero is there just for insurance.)