Hi Jean-Marc,
----- Original Message -----
From: "Jean-Marc Desperrier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, 02 March, 2001 17:57
Subject: Re: What to do when there is no /dev/random ??
> They are architectures where a context switch is made after every
interrupt, and
> the local stack is not used.
Uh, I guess you mean: 'There are [...]'. Yup, I know. all this randomness
gathering is HIGHLY system dependent and some serious investigation is
mandatory before barging off to other fun places.
> They are architectures where there's no asynchronous interrupt.
>
> Just as a warning.
[...]
> I hope I didn't open the Pandora box.
Welllllll, sometimes I just like my stuff to be a wee bit spicy. ;-))
> First, I suggest you do not rely _only_ on this.
> Add it to all your other randomness sources, do not replace them.
[... some other very good points...]
> program, and change in it will change that randomness very easily.
Good points!
I just cobbled up some quick code, but I didn't list the truckload of
implicit caveats, like you did.
Mine will come with a nice fat, flashing warning though :-))
"Don't try this at home, kids!" & "Doctors' prescription only! Don't
swallow."
(OK, OK, so my only excuse is that I fed it to RAND_add() with a suitably
low (oh yeah?) 'entropy factor': 0.0039. OK, I know, it's certainly even
less that that, but I didn't want to say it's got 0.0 entropy in it.)
I have been thinking about 'sources of bits of randomness' every once in a
while, while I was porting OpenSSL or doing other things and I was delighted
to see your idea here, which had escaped my mind entirely.
Muchos gracias for explicitly listing the caveats of this item. I should
have listed them with my little dirty piece of code, as it is loaded with
assumptions:
* interrupt handlers use your thread's stack.
* the async interrupts are 'unpredictable enough' (so having a 1millisec
async timer int blaring on your stack is NOT what you're wishing for here.)
* the async int's you might hope for has a 'good chance' to happen while
you're not messing around with this particular piece of stack (e.g. receive
INT from serial comm chip talking to a human somewhere, that sort of stuff)
* and WHEN that async int triggers, the int handler WILL mess around in the
given piece of stack with 'relative high probability'.
All in all, it's a definite 'Possibly Maybe' operation.
---
Management Summary:
... so if anyone doesn't want to spend time tweaking and twisting while on
randomness gathering assignment, I suggest [s]he buys a hardware white noise
generator (there are several available on the market) and plugs that piece
of equipment onto an available serial port. No worries and still time to
visit friends when you're done with your work.
Groetjes/Greetinx,
Ger
----------------------------------------------------------------------------
--
Ger Hobbelt a.k.a. Insh_Allah mailto:[EMAIL PROTECTED]
----------------------------------------------------------------------------
--
Peter Pan can fly when he thinks his Happy Thought.
I want to fly too.
My Happy Thought is... one part Prozac and one part LSD...
Wow! Awesome, dude!
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]