LWN.net Logo

Random numbers for embedded devices

Random numbers for embedded devices

Posted Jul 19, 2012 15:19 UTC (Thu) by cpeterso (guest, #305)
Parent article: Random numbers for embedded devices

Can the expensive mixing operations be moved to get_random_bytes(), so the mixing is only done when needed and the cost is paid by the caller, not interrupt handlers?


(Log in to post comments)

Random numbers for embedded devices

Posted Jul 20, 2012 0:53 UTC (Fri) by pr1268 (subscriber, #24648) [Link]

That might make get_random_bytes() very expensive (relatively speaking). My suggestion is that the mixing operations happen only when the entropy pool gets below a low-water mark (but then again perhaps this might make the RNG a little more vulnerable; I'm not totally sure about this).

Random numbers for embedded devices

Posted Jul 23, 2012 17:14 UTC (Mon) by tytso (subscriber, #9993) [Link]

The expensive (i.e., cryptographic) operations are already in get_random_bytes(). What we do amortized across multiple interrupts is a few xors, a rotate, and some memory accesses into a per-CPU memory pool. So the bulk of the cost is already paid by the processes that need random numbers.

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