git: kernel - Update existing csprng

Matthew Dillon dillon at
Thu Jun 12 21:52:04 PDT 2014

commit 8e0be529177cb8db1548a42d9e4c02c74ef94108
Author: Matthew Dillon <dillon at>
Date:   Thu Jun 12 21:47:45 2014 -0700

    kernel - Update existing csprng
    * Bring the current csprng up-to-date as per the author.  However, note
      that we will likely be making additional commits to add other csprng
      algorithms to the system.
      - Change stateIndex to a static instead of starting at 0 each time
        to improve security.
      - Move the L_SCHEDULE(keyLen) to the end.
      - Warm-up the IBAA in the entropy interrupt.  Author suggested warming
        it up before each read_random() but that creates a non-deterministic
        performance problem.
    * Change read_random_unlimited() from L15_Byte() to IBAA_Byte().
      read_random() already uses IBAA_Byte().  That is, go with the
      heavier-weight csprng for everything (sysctl, /dev/urandom, /dev/random).
      Before only /dev/random was using the heavier-weight csprng.

Summary of changes:
 sys/kern/kern_nrandom.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list