Random number generation, simple question.
Paul Foley
see at below
Thu Jul 6 00:25:58 EDT 2000
On 3 Jul 2000 16:41:54 GMT, Mitchell Morris wrote:
>> * How many random bits does whrandom.random() generate?
> I don't have the references from whrandom handy, but (a) I can flip through
> my Knuth book (flip, flip, flip) to see that there are several constants by
> which you can get an LCM to generate 2^32 values each of which could be 32
> bits long, and (b) Wichmann-Hill is rather more advanced than an LCM, so 32
> *2^32 should be considered a reasonable lower limit. Since you only need 80
> or so, you should be okay.
[and, later]
> The long answer is you can't generate randomness from nothing, which is
Right...so how do you get 2^37 bits (or did you mean only 37 bits?)
out of whrandom, which only has 24 seed bits? Sequence length is not
the point: obviously you can't get more than 24 bits of entropy into
the thing (and typically a lot less than that), so you obviously can't
get more than 24 bits _out_; and you won't get as much out as you put
in.
> It's been a while since I looked at CipherSaber, but as I recall you only
> need entropy for the session key. You will probably find that almost any
> silly stupid PRNG will suffice for that, and most operating systems will
Not if you care at all about security.
--
Nomina stultorum in parietibus et portis semper videmus. -- Cicero
(setq reply-to
(concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))
More information about the Python-list
mailing list