[Top][All Lists]

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

Re: [avr-libc-dev] rand(3) in avr-libc

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] rand(3) in avr-libc
Date: Tue, 10 Sep 2002 17:57:38 +0200
User-agent: Mutt/1.2.5i

As E. Weddington wrote:

> Adding functions for a 32-bit PRNG (item #1 above) seem like it would 
> be useful. Especially for the smaller devices.
> I would also think that item #2 would be something desirable and adds 
> value as well.

But then, what names to give them?  The ISO C standard function is
named rand() and returns an int.

Unix implementation usually have #2 from my list, implemented as
random(), returning a long.  So we could call #1 above random(), but
what would we call #2 above?

> 3 things should stem from that: 1. document the limitation of 
> the library, i.e. for use in larger devices.

OK, that's easy.

> 2. add a (small?) crypto 
> package to take advantage of the new PRNG.

Hmm, that's probably nothing i could do.  There's some crypto code one
could get, but that's all written with 32-bit integers (or more) in
mind, and probably way too huge to port to an AVR (like openssl or

> 3. document different 
> possible ways of generating seed values.

That's less problematic though, but heavily depends on what hardware
is connected to the device.

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]