LWN.net Logo

On the safety of Linux random numbers

On the safety of Linux random numbers

Posted May 11, 2006 11:32 UTC (Thu) by kleptog (subscriber, #1183)
Parent article: On the safety of Linux random numbers

I always thought these worries about predicatable interrupts creating bad entropy to be a bit wierd. After all, if you have a cycle counter where you only look at the last two bits, the result will be unpredicable based on how many cycles the intruction took at the time the interrupt signal was generated.

Imagine my surprise when I look at the code and see they don't use the cycle counter on most architechtures, but base it on the number of *jiffies*, a counter which goes maybe 1000 times per second.

No wonder people are worried about predictability. On the scale of milliseconds a lot of things become predicatable. Maybe we should be doing something about that first. We have high-resolution timers in the kernel, do we not?


(Log in to post comments)

On the safety of Linux random numbers

Posted May 12, 2006 7:35 UTC (Fri) by ncm (subscriber, #165) [Link]

That astonishes me too. I always assumed they were using low bits of the cycle counter. It seems an easy patch. Any clue why it hasn't been done?

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds