public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos API to get random value or UID value?
@ 2011-03-20  1:56 Grant Edwards
  2011-03-20 19:16 ` Stanislav Meduna
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Edwards @ 2011-03-20  1:56 UTC (permalink / raw)
  To: ecos-discuss

Is there any eCos API support that the HAL can use to provide either
random data or a unique id value to application or OS code?

Both random values and UUID values are required for a lot of network
stuff.  It's pretty common for hardware platforms to one or both,
there doesn't seem to be an eCos API to access it.

-- 
Grant Edwards               grant.b.edwards        Yow! Did I SELL OUT yet??
                                  at               
                              gmail.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

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

* Re: [ECOS] eCos API to get random value or UID value?
  2011-03-20  1:56 [ECOS] eCos API to get random value or UID value? Grant Edwards
@ 2011-03-20 19:16 ` Stanislav Meduna
  2011-03-20 20:23   ` [ECOS] " Grant Edwards
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Meduna @ 2011-03-20 19:16 UTC (permalink / raw)
  To: ecos-discuss

On 18.03.2011 20:52, Grant Edwards wrote:

> Is there any eCos API support that the HAL can use to provide either
> random data or a unique id value to application or OS code?

I don't know of any.

> Both random values and UUID values are required for a lot of network
> stuff.  It's pretty common for hardware platforms to one or both,
> there doesn't seem to be an eCos API to access it.

This is a very good request.

However, I don't think this belongs into the HAL - it's more
a device driver semantics (see e.g. /dev/{u,}random on linux)
and the cyg_io_lookup / cyg_io_read is everything one needs
here.

What the HAL could provide is an interface supplying a source
of entropy - however, this is hard to do correctly especially
on an embedded system that is often running in a quite
deterministic environment.

-- 
                                Stano

-- 
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] 3+ messages in thread

* [ECOS] Re: eCos API to get random value or UID value?
  2011-03-20 19:16 ` Stanislav Meduna
@ 2011-03-20 20:23   ` Grant Edwards
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2011-03-20 20:23 UTC (permalink / raw)
  To: ecos-discuss

On 2011-03-18, Stanislav Meduna <stano@meduna.org> wrote:
> On 18.03.2011 20:52, Grant Edwards wrote:
>
>> Is there any eCos API support that the HAL can use to provide either
>> random data or a unique id value to application or OS code?
>
> I don't know of any.

I've done some more grepping, but haven't found anything.

>> Both random values and UUID values are required for a lot of network
>> stuff.  It's pretty common for hardware platforms to one or both,
>> there doesn't seem to be an eCos API to access it.
>
> This is a very good request.

Decent sources for unique IDs are probably a lot more common than
decent entropy sources, but it seems like something for which we need
an API.  A UID can be pretty easily generated by hashing a few things
(CPU serial number, flash serial number, MAC addresses, etc.).
Generating entropy without hardware support is a lot harder.

> However, I don't think this belongs into the HAL - it's more a device
> driver semantics (see e.g. /dev/{u,}random on linux) and the
> cyg_io_lookup / cyg_io_read is everything one needs here.
>
> What the HAL could provide is an interface supplying a source of
> entropy

That's pretty much what I meant.

> - however, this is hard to do correctly especially on an embedded
> system that is often running in a quite deterministic environment.

Indeed.  Even if it's not cryptographically strong, something to use
for for things like pseuro-random retry-backoff would be great.

-- 
Grant Edwards               grant.b.edwards        Yow! How many retured
                                  at               bricklayers from FLORIDA
                              gmail.com            are out purchasing PENCIL
                                                   SHARPENERS right NOW??


-- 
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] 3+ messages in thread

end of thread, other threads:[~2011-03-18 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20  1:56 [ECOS] eCos API to get random value or UID value? Grant Edwards
2011-03-20 19:16 ` Stanislav Meduna
2011-03-20 20:23   ` [ECOS] " Grant Edwards

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).