Bug #1689

IBAA recommendation

Added by robin.carey1 over 4 years ago. Updated about 4 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Dear DragonFlyBSD bugs.

DragonFly uses Bob Jenkins' IBAA CSPRNG for /dev/random.

I have been doing some work on this CSPRNG, which is available from:

http://www.leopard.uk.com/IBAA64

I have two recommendations to make with regard to the IBAA CSPRNG which is
used in DragonFly:

(1) Use my rounded up BETA=32/SHIFT=20 values as opposed to the original
SHIFT=19 value in the
original IBAA CSPRNG/algorithm (details available from above URL)

and

(2) Use a 32-bit counter. This is a minor modification, which gurantees no
bad states (an initial state of all zeroes
maps back to an internal state of all zeroes after 256 iterations), and
also guarantees a cycle length of at least
2^32. Details on how to implement the counter are available from the
above URL. It's a minor modification which
has minimal performance impact.
Also, a 64-bit version of IBAA is available from the above URL. Matthew
Dillon seemed to be interested in that, with
regard to the 64-bit x86-64 port of DragonFly (but I haven't heard back from
him about that).

unnamed (1.4 KB) robin.carey1, 03/07/2010 06:42 PM

History

#1 Updated by sjg over 4 years ago

Is anyone who tracks bugs list/tracker qualified to comment on this?

#2 Updated by dillon over 4 years ago

:Samuel J. Greear <> added the comment:
:
:Is anyone who tracks bugs list/tracker qualified to comment on this?
:
:----------
:status: unread -> chatting

Yes we do want to make those changes as well as look into the
64-bit IBAA code. I haven't had time to do it myself so if
someone wants to take up either (or both) of these little projects
please do!

-Matt
Matthew Dillon
<>

#3 Updated by dillon about 4 years ago

:I have been doing some work on this CSPRNG, which is available from:
:
:http://www.leopard.uk.com/IBAA64
:
:I have two recommendations to make with regard to the IBAA CSPRNG which is
:used in DragonFly:
:
:(1) Use my rounded up BETA=32/SHIFT=20 values as opposed to the original
:SHIFT=19 value in the
:original IBAA CSPRNG/algorithm (details available from above URL)
:
:and
:
:(2) Use a 32-bit counter. This is a minor modification, which gurantees no
:bad states (an initial state of all zeroes
: maps back to an internal state of all zeroes after 256 iterations), and
:also guarantees a cycle length of at least
: 2^32. Details on how to implement the counter are available from the
:above URL. It's a minor modification which
: has minimal performance impact.
:Also, a 64-bit version of IBAA is available from the above URL. Matthew
:Dillon seemed to be interested in that, with
:regard to the 64-bit x86-64 port of DragonFly (but I haven't heard back from
:him about that).
:
:--
:Sincerely,
:Robin Carey

I see the shift in /usr/src/sys/kern/kern_nrandom.c, changing that
is easy. I don't know what the counter is though.

I'd like to have the 64-bit version in DFly but I don't have time to
port it myself.

-Matt

Also available in: Atom PDF