Random number generation, simple question.

Jason F. McBrayer jmcbray at carcosa.net
Mon Jul 3 23:44:53 EDT 2000


>>>>> "j" == jhylton  <jhylton at my-deja.com> writes:

j> In article <Pine.GSO.4.21.0007031546410.25965-100000 at luna.dsv.su.se>,
j>   Kalle Svensson <kalle at gnupung.net> wrote:

>> I have a few questions about the (pseudo) random number generator
>> supplied in the standard library. I need 80 random bits (for a
>> CipherSaber IV) but I hear most RNG's only supply 32 bits or less.

j> The random number generator in the standard library is not at all
j> suitable for generating a cipher key.

He's not using it to generate a cipher key, just an initialization
vector that doesn't have to be too terribly random (its only purpose
is to let you reuse the same real key in different messages).  As I
understand it (and according to the Cypersabre pages), you don't need
anything better than the standard library's rng (though it's just as
easy, if not easier, to read 10 bytes from /dev/random).

-- 
+-----------------------------------------------------------+
| Jason F. McBrayer                    jmcbray at carcosa.net  |
| A flower falls, even though we love it; and a weed grows, |
| even though we do not love it.            -- Dogen        |



More information about the Python-list mailing list