Truly random numbers

John La Rooy nospampls.jlr at doctor.com
Tue Feb 11 21:11:38 EST 2003


On Wed, 12 Feb 2003 00:20:13 +0100
Luka Milkovic <Luka.Milkovic at public.srce.hr> wrote:

> Hi!
> I am making a one time pad encryption program, and I have a little
> problem. I somehow managed to make a small client which connects to
> Forumilabs Hotbits random number generator, and I can download the
> numbers. But the problem I am facing is that the connection is not
> secured, it is actually plain-text protocol, and anyone can sniffit. Does
> anyone have an idea how to solve this problem?
> The second problem is much more important than the first... I don't know
> how to obtain random numbers from /dev/random and since it is going to be
> linux only application, I really need this as the source of my
> entropy/random numbers. I was thinking that maybe I need to get data from
> it, convert it into binary and then do it what ever I want. Anyway, what
> I need is a list of n groups of XXXX ( four digits ) numbers, and I
> solved it through the list, but can I ( I know I can, but I don't know
> how ) somehow generate this list from /dev/random?
> 
> I appreciate any help...
> Luka.

    open("/dev/random").read(n*2)

and wait - moving the mouse around helps ;o)

John




More information about the Python-list mailing list