Re: [PATCH] CPU Jitter RNG: inclusion into kernel crypto API and /dev/random

2013-11-03 Thread Stephan Mueller
Am Samstag, 2. November 2013, 12:01:13 schrieb Pavel Machek: Hi Pavel, Hi! sense of where the unpredictability might be coming from, and whether the unpredictability is coming from something which is fundamentally arising from something which is chaotic or quantum effect, or just because

Re: [PATCH] CPU Jitter RNG: inclusion into kernel crypto API and /dev/random

2013-11-03 Thread Theodore Ts'o
On Sun, Nov 03, 2013 at 08:20:34AM +0100, Stephan Mueller wrote: Another friend of mine mentioned that he assumes the rise and fall times of transistors varies very slightly and could be the main reason for the jitter. I do not think that this is really the case, because our gates that form

[PATCH 3/4] random: printk notifications for urandom pool initialization

2013-11-03 Thread Theodore Ts'o
Print a notification to the console when the nonblocking pool is initialized. Also printk a warning when a process tries reading from /dev/urandom before it is fully initialized. Signed-off-by: Theodore Ts'o ty...@mit.edu --- drivers/char/random.c | 12 +++- 1 file changed, 11

[PATCH 4/4] random: don't zap entropy count in rand_initialize()

2013-11-03 Thread Theodore Ts'o
The rand_initialize() function was being run fairly late in the kernel boot sequence. This was unfortunate, since it zero'ed the entropy counters, thus throwing away credit that was accumulated earlier in the boot sequence, and it also meant that initcall functions run before rand_initialize were

[PATCH 2/4] random: make add_timer_randomness() fill the nonblocking pool first

2013-11-03 Thread Theodore Ts'o
Change add_timer_randomness() so that it directs incoming entropy to the nonblocking pool first if it hasn't been fully initialized yet. This matches the strategy we use in add_interrupt_randomness(), which allows us to push the randomness where we need it the most during when the system is first

[PATCH 1/4] random: use device attach events for entropy

2013-11-03 Thread Theodore Ts'o
Some investigation from FreeBSD shows that there is entropy available from measuring the device attach times: http://lists.randombit.net/pipermail/cryptography/2013-October/005689.html This will hopefully help us more quickly initialize the entropy pools while the system is booting (which is one

[PATCH 0/4] random: improve entropy pool initialization at boot time

2013-11-03 Thread Theodore Ts'o
These patches improve how /dev/random initializes its entropy pool during the kernel boot sequence. With these changes, using an x86 test kernel run under KVM, the urandom pool gets initialized before the init scripts start running, and of the kernel users of get_random_bytes(), a debugging

Re: [PATCH 1/4] random: use device attach events for entropy

2013-11-03 Thread Greg KH
On Sun, Nov 03, 2013 at 08:33:12AM -0500, Theodore Ts'o wrote: Some investigation from FreeBSD shows that there is entropy available from measuring the device attach times: http://lists.randombit.net/pipermail/cryptography/2013-October/005689.html This will hopefully help us more quickly

Re: [PATCH 1/4] random: use device attach events for entropy

2013-11-03 Thread Theodore Ts'o
On Sun, Nov 03, 2013 at 06:51:18AM -0800, Greg KH wrote: Is it an issue that dev-devt will almost always be 0,0 for this function call? Why not use the name instead here, that's more unique and every device has one, not just a tiny %. Hmm, good point. Thanks for raising it. I'll make this

Re: [PATCH 1/4] random: use device attach events for entropy

2013-11-03 Thread Theodore Ts'o
On Sun, Nov 03, 2013 at 08:33:12AM -0500, Theodore Ts'o wrote: Some investigation from FreeBSD shows that there is entropy available from measuring the device attach times: http://lists.randombit.net/pipermail/cryptography/2013-October/005689.html This will hopefully help us more quickly

Re: [PATCH] CPU Jitter RNG: inclusion into kernel crypto API and /dev/random

2013-11-03 Thread Pavel Machek
Hi! Another friend of mine mentioned that he assumes the rise and fall times of transistors varies very slightly and could be the main reason for the jitter. I do not think that this is really the case, because our gates that form the CPU instructions comprise of many transistors. The

[RESEND 2][PATCH] hwrng: add randomness to system from rng sources

2013-11-03 Thread Kees Cook
When bringing a new RNG source online, it seems like it would make sense to use some of its bytes to make the system entropy pool more random, as done with all sorts of other devices that contain per-device or per-boot differences. Signed-off-by: Kees Cook keesc...@chromium.org --- Added