Fwd: Random number generator
--000e0cd3412c9cc5b004696101c4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
---------- Forwarded message ----------
From: Robin Carey <robin.carey1@googlemail.com>
Date: 2009/5/8
Subject: Random number generator
I had an idea about how to improve the random number generator in
DragonFlyBSD which I would like to share.
There is a bootstrapping problem where it is difficult to get enough
"entropy" at boot to ensure the random number generator is fully seeded and
completely unpredictable immediately after the system has booted.
Currently the random number generator seeds itself from nanotime() and
nanouptime() which introduces a small degree of entropy, but probably not
enough to ensure the above requirement is met.
So a possible improvement could be made by introducing more "entropy" at
initialisation from a high resolution timer like the TSC - rdtsc() (which is
also used in the random number generator - NANOUP_EVENT() - courtesy of
Matthew Dillon). That is my suggestion: Use rdtsc() aswell as nanotime() and
nanouptime() to ensure the random number generator has enough "entropy" at
boot to ensure it is fully seeded and completely unpredictable. If this were
done (and true) then you would not need the current ability of the random
number generator being able to be seeded from a file - an ability which
Matthew Dillon implemented to solve the boot-seeding problem.
I am wondering if there are any other high resolution timers available .....
--
Sincerely,
Robin Carey
--
Sincerely,
Robin Carey
--000e0cd3412c9cc5b004696101c4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br><br>
<div class=3D"gmail_quote">---------- Forwarded message ----------<br>From:=
<b class=3D"gmail_sendername">Robin Carey</b> <span dir=3D"ltr"><<a hre=
f=3D"mailto:robin.carey1@googlemail.com">robin.carey1@googlemail.com</a>>=
;</span><br>
Date: 2009/5/8<br>Subject: Random number generator<br>To: <a href=3D"mailto=
:submit-request@lists.dragonflybsd.org">submit-request@lists.dragonflybsd.o=
rg</a><br><br><br>
<div>I had an idea about how to improve the random number generator in Drag=
onFlyBSD which I would like to share.</div>
<div>=A0</div>
<div>There is a bootstrapping problem where it is difficult to get enough &=
quot;entropy" at boot to ensure the random number generator is fully s=
eeded and completely unpredictable immediately after the system has booted.=
</div>
<div>=A0</div>
<div>Currently the random number generator seeds itself from nanotime() and=
nanouptime() which introduces a small degree of entropy, but probably not =
enough to ensure the above requirement is met.</div>
<div>=A0</div>
<div>So a possible improvement could be made by introducing more "entr=
opy" at initialisation from a high resolution timer like the TSC - rdt=
sc() (which is also used in the random number generator - NANOUP_EVENT() - =
courtesy of Matthew Dillon). That is my suggestion: Use rdtsc() aswell as n=
anotime() and nanouptime() to ensure the random number generator has enough=
"entropy" at boot to ensure it is fully seeded and completely un=
predictable. If this were done (and true) then you would not need the curre=
nt ability of the random number generator being able to be seeded from a fi=
le - an ability which Matthew Dillon implemented to solve the boot-seeding =
problem.</div>
<div>=A0</div>
<div>I am wondering if there are any other high resolution timers available=
.....<br clear=3D"all"></div>
<div></div><br>-- <br>Sincerely,<br><font color=3D"#888888">Robin Carey<br>=
</font></div><br><br clear=3D"all">
<div></div><br>-- <br>Sincerely,<br>Robin Carey<br>
--000e0cd3412c9cc5b004696101c4--
討論串 (同標題文章)