<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/etc/rc.d/initrandom, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This is the much-discussed major upgrade to the random(4) device, known to you all as /dev/random.</title>
<updated>2014-10-30T21:21:53+00:00</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2014-10-30T21:21:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=10cb24248a6f13974e11c255c8014cfefe6420a7'/>
<id>10cb24248a6f13974e11c255c8014cfefe6420a7</id>
<content type='text'>
This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources.

The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people.

The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway.

Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to.

My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise.

My Nomex pants are on. Let the feedback commence!

Reviewed by:	trasz,des(partial),imp(partial?),rwatson(partial?)
Approved by:	so(des)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources.

The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people.

The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway.

Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to.

My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise.

My Nomex pants are on. Let the feedback commence!

Reviewed by:	trasz,des(partial),imp(partial?),rwatson(partial?)
Approved by:	so(des)
</pre>
</div>
</content>
</entry>
<entry>
<title>As userland writing to /dev/random is no more, remove the "better than nothing" bootstrap mode.</title>
<updated>2013-10-06T12:43:42+00:00</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2013-10-06T12:43:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=241b55d182e02d05b4d2cf962b372690ef3d733a'/>
<id>241b55d182e02d05b4d2cf962b372690ef3d733a</id>
<content type='text'>
Add SWI harvesting to the mix.

My box seeds Yarrow by itself in a few seconds! YMMV; more to follow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add SWI harvesting to the mix.

My box seeds Yarrow by itself in a few seconds! YMMV; more to follow.
</pre>
</div>
</content>
</entry>
<entry>
<title>* Rather than run the same 'ps' command twice, add 'kenv' which often</title>
<updated>2012-09-04T21:47:09+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2012-09-04T21:47:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=203b2f2fa4a8d89b90812438b6060dd957c88ed3'/>
<id>203b2f2fa4a8d89b90812438b6060dd957c88ed3</id>
<content type='text'>
  gives machine unique values from the firmware.
* The kernel is more likely to be unique than /bin/ls (but no need to
  stuff many megabytes into /dev/random, so hash it).
* Change ordering to give larger variance across reboots to reduce
  predictability.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  gives machine unique values from the firmware.
* The kernel is more likely to be unique than /bin/ls (but no need to
  stuff many megabytes into /dev/random, so hash it).
* Change ordering to give larger variance across reboots to reduce
  predictability.
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct style.</title>
<updated>2012-08-22T23:44:12+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2012-08-22T23:44:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b8ea11cf793ec5fb35a0ba5f4190cd02c6516e30'/>
<id>b8ea11cf793ec5fb35a0ba5f4190cd02c6516e30</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>* Reinstate r128059's consumption of our best entropy first.</title>
<updated>2012-08-22T23:37:24+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2012-08-22T23:37:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b7aeb5b281400800548b16c5dadb8f23588d253a'/>
<id>b7aeb5b281400800548b16c5dadb8f23588d253a</id>
<content type='text'>
  r128060 for "hardware-supplied entropy" reversed this without reason,
  seems a typo.
* Isolate "better than nothing" implementation to a function.

Submitted by:	obrien &amp; Arthur Mesh &lt;arthurmesh@gmail.com&gt;
Sponsored by:	Juniper Networks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  r128060 for "hardware-supplied entropy" reversed this without reason,
  seems a typo.
* Isolate "better than nothing" implementation to a function.

Submitted by:	obrien &amp; Arthur Mesh &lt;arthurmesh@gmail.com&gt;
Sponsored by:	Juniper Networks
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.</title>
<updated>2011-03-30T01:19:00+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2011-03-30T01:19:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=86fdaae573a38afef52c74de986704c2f8895a2b'/>
<id>86fdaae573a38afef52c74de986704c2f8895a2b</id>
<content type='text'>
This is a further clean up after r202988.

SYSCTL_W is still initialized in rc.subr as some ports may still use it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a further clean up after r202988.

SYSCTL_W is still initialized in rc.subr as some ports may still use it.
</pre>
</div>
</content>
</entry>
<entry>
<title>This change does the following for the scripts that run up through</title>
<updated>2010-05-19T19:03:19+00:00</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2010-05-19T19:03:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2822c33f8ccb2ff411fe3c28b47d95293647c61f'/>
<id>2822c33f8ccb2ff411fe3c28b47d95293647c61f</id>
<content type='text'>
FILESYSTEMS (the default early_late_divider):
1. Move sysctl to run first
2. Move as many BEFOREs to REQUIREs as possible.
3. Minor effect, move hostid_save from right before mdconfig to right
   after.

A lot of the early scripts make use of sysctl one way or another so
running this first makes a lot of sense given that system-critical
values are often placed in sysctl.conf.

My original purpose for working on this was that while doing some
debugging on other stuff I noticed that the order of execution was
different in the first pass through the early scripts and the second.
In practice that doesn't matter because the scripts are not executed the
second time. However this _can_ result in problems if the difference in
the rcorder moves a script from the late section to the early section in
the second pass (which would mean the script would not get executed).
So, I wanted to make the order of execution of the scripts in the early
section more deterministic.

In the course of debugging the ordering problems I noticed that moving
the BEFOREs to REQUIREs prevented the changes in order from the first
pass to the second pass without having to make any substantial changes.
(Of course it's no secret that I think BEFORE should be avoided as much
as possible, but this is a good example of why.)

Reviewed by:	silence on freebsd-rc@
MFC after:	8.1-RELEASE
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FILESYSTEMS (the default early_late_divider):
1. Move sysctl to run first
2. Move as many BEFOREs to REQUIREs as possible.
3. Minor effect, move hostid_save from right before mdconfig to right
   after.

A lot of the early scripts make use of sysctl one way or another so
running this first makes a lot of sense given that system-critical
values are often placed in sysctl.conf.

My original purpose for working on this was that while doing some
debugging on other stuff I noticed that the order of execution was
different in the first pass through the early scripts and the second.
In practice that doesn't matter because the scripts are not executed the
second time. However this _can_ result in problems if the difference in
the rcorder moves a script from the late section to the early section in
the second pass (which would mean the script would not get executed).
So, I wanted to make the order of execution of the scripts in the early
section more deterministic.

In the course of debugging the ordering problems I noticed that moving
the BEFOREs to REQUIREs prevented the changes in order from the first
pass to the second pass without having to make any substantial changes.
(Of course it's no secret that I think BEFORE should be avoided as much
as possible, but this is a good example of why.)

Reviewed by:	silence on freebsd-rc@
MFC after:	8.1-RELEASE
</pre>
</div>
</content>
</entry>
<entry>
<title>As previously discussed, add the svn:executable property to all scripts</title>
<updated>2008-07-16T19:22:48+00:00</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2008-07-16T19:22:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2b9851690c2169b48245ff1b770752f057251e85'/>
<id>2b9851690c2169b48245ff1b770752f057251e85</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make it possible to disable sources of entropy harvesting.</title>
<updated>2008-04-22T15:18:47+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2008-04-22T15:18:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6e595c6fe07dbc960c3dc1d0599541063bdb6105'/>
<id>6e595c6fe07dbc960c3dc1d0599541063bdb6105</id>
<content type='text'>
Noticed by:	Igor Sysoev
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Noticed by:	Igor Sysoev
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove two superfluous trailing semicolons.</title>
<updated>2007-05-24T05:58:20+00:00</updated>
<author>
<name>Ralf S. Engelschall</name>
<email>rse@FreeBSD.org</email>
</author>
<published>2007-05-24T05:58:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cc42bdd4157f72ae8a25783f9f880c4efdaae7db'/>
<id>cc42bdd4157f72ae8a25783f9f880c4efdaae7db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
