[wha...@lists.whatwg.org removed from cc list because I'm not on it and MarkM suggested dropping it.]

On 2/14/11 at 4:20 PM, sha...@google.com (Shabsi Walfish) wrote:

Hmm... if there is a guarantee that /dev/urandom was successfully seeded at
some point in the past, then I'm happy with it. Is there such a guarantee? I
don't see that documented anywhere, and I'm not sure how it would be
provided. Since /dev/urandom never blocks, I'm assuming it will return
something based mostly on weak entropy sources (like system time and/or or a
very small number of real bits of entropy) in the event that the system
hasn't really had a chance to seed the pool yet. I can live with not
reliably refreshing the pool, but its pretty scary if you think about what
happens when a user boots their phone up for the first time, etc. and there
is just no entropy there yet.

While I think this question is a bit outside the language area, as an OS person, it falls directly in my lap, so please indulge me while I pontificate.

Getting unguessable bits into a deterministic system like a computer is very platform dependent. Disk timing, variable because of air turbulence on the platters, has been a popular source. However now many systems have solid state disks. This dependency means we are at the mercy of the system builders.

I don't know that there are any guarantees. Consider the environments:

  Servers
  pcs
  phones/tablets
  (others?)

I think the worst case is servers. They live in a temperature controlled room, and the only I/O they have is a network connection and a disk farm. With some luck, the server operator will have a source of unguessable bits included on a crypto board or on one of the manufacture's support chips. Otherwise there's timings on the disk and network I/O. A number of the CPU chips have "cycle counter" which can provide high resolution timing for interrupts etc.

Pcs (lower case because I mean it generically) have a number of good sources involved with UI events, microphones etc. There is time between boot and first application launch to gather mouse movements, ambient sound etc.

Phones/tablets have a wonderful set of resources: radio noise, compass direction, GPS location tracking, microphone input, camera input, etc. They should be able to get enough unguessable bits within a few seconds, certainly by the time they've established network connectivity.

Cheers - Bill

-----------------------------------------------------------------------
Bill Frantz        | gets() remains as a monument | Periwinkle
(408)356-8506 | to C's continuing support of | 16345 Englewood Ave www.pwpconsult.com | buffer overruns. | Los Gatos, CA 95032

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to