public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]  Entropy gathering?
@ 2008-04-03 19:18 Grant Edwards
  2008-04-03 19:29 ` [ECOS] " Grant Edwards
  0 siblings, 1 reply; 10+ messages in thread
From: Grant Edwards @ 2008-04-03 19:18 UTC (permalink / raw)
  To: ecos-discuss

I'm working on adding some secure protocol support (ssl/ssh) to
an eCos app, and the libraries implmenting the protocols need a
source of cryptologically secure random bits.  I've been
searching through the eCos source tree, and there don't appear
to be any sort entropy gathering hooks anywhere.

The BSD stacks appear to use an aRC4 keystream for "random"
data. The stream uses a constant seed and then mixes in the
system clock value.  It could be worse, but it's not great
either.

Has any thought been given to providing a mechanism to gather
some entropy from the timing of interrupts generated externally
(network, serial ports, etc.)?

-- 
Grant Edwards                   grante             Yow! If I pull this SWITCH
                                  at               I'll be RITA HAYWORTH!!
                               visi.com            Or a SCIENTOLOGIST!


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: [ECOS]  Re: Entropy gathering?
@ 2008-04-03 19:53 Jay Foster
  2008-04-03 20:00 ` Grant Edwards
  0 siblings, 1 reply; 10+ messages in thread
From: Jay Foster @ 2008-04-03 19:53 UTC (permalink / raw)
  To: 'Grant Edwards', ecos-discuss

A colleague implemented something like this by creating a function that
could be called from various places at random times, such as the ethernet
driver (ether_input()), serial port modem signal changes, etc.  The function
would read the HAL microsecond clock value and write the lower 16-bits to
/dev/random.  After a pre-determined number of such events, this function
would stop writing to /dev/random and simply return.

Jay

-----Original Message-----
From: Grant Edwards [mailto:grante@visi.com]
Sent: Thursday, April 03, 2008 12:18 PM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: Entropy gathering?


On 2008-04-03, Grant Edwards <grante@visi.com> wrote:

> The BSD stacks appear to use an aRC4 keystream for "random"
> data. The stream uses a constant seed and then mixes in the
> system clock value.  It could be worse, but it's not great
> either.

Upon reading the above statement, I think I should clarify that
the "system time" that's mixed in is the HAL's hardware counter
value and not the system tick count time.  The hardware counter
is changing much faster (a good thing), but it provides
relatively few bits (on my targets, it ranges from 14-18).

-- 
Grant Edwards                   grante             Yow! My mind is making
                                  at               ashtrays in Dayton ...
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: [ECOS]  Re: Entropy gathering?
@ 2008-04-03 21:49 Jay Foster
  2008-04-03 22:29 ` Grant Edwards
  0 siblings, 1 reply; 10+ messages in thread
From: Jay Foster @ 2008-04-03 21:49 UTC (permalink / raw)
  To: 'Grant Edwards', ecos-discuss

I hadn't realized that this was also implemented by a colleague and is not
part of the public eCos.  Never mind.
Jay

-----Original Message-----
From: Grant Edwards [mailto:grante@visi.com]
Sent: Thursday, April 03, 2008 12:53 PM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: Entropy gathering?


On 2008-04-03, Jay Foster <jay@systech.com> wrote:

> A colleague implemented something like this by creating a
> function that could be called from various places at random
> times, such as the ethernet driver (ether_input()), serial
> port modem signal changes, etc.  The function would read the
> HAL microsecond clock value and write the lower 16-bits to
> /dev/random.  After a pre-determined number of such events,
> this function would stop writing to /dev/random and simply
> return.

Where's the source for /dev/random?

I spent quite a while searching through the source tree for
random-number resources yesterday and never found it.  I just
grepped through ecos.db and through all the filenames in the
source tree and didn't get any hits on the string 'random' or
'RANDOM'.  I also grepped through all of the c/c++ files and
never found the string '/dev/random'.  It seems to be well
hidden...

-- 
Grant Edwards                   grante             Yow! I'm having a
RELIGIOUS
                                  at               EXPERIENCE ... and I
don't
                               visi.com            take any DRUGS


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-07 10:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-03 19:18 [ECOS] Entropy gathering? Grant Edwards
2008-04-03 19:29 ` [ECOS] " Grant Edwards
2008-04-03 19:53 Jay Foster
2008-04-03 20:00 ` Grant Edwards
2008-04-03 21:49 Jay Foster
2008-04-03 22:29 ` Grant Edwards
2008-04-04  9:13   ` Markus Schaber
2008-04-04 14:15     ` Grant Edwards
2008-04-07  8:38       ` Daniel Néri
2008-04-07 10:57         ` Markus Schaber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).