aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d/initrandom
Commit message (Collapse)AuthorAgeFilesLines
* This is the much-discussed major upgrade to the random(4) device, known to ↵Mark Murray2014-10-301-61/+0
| | | | | | | | | | | | | | | | | | | | | | you all as /dev/random. 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) Notes: svn path=/head/; revision=273872
* As userland writing to /dev/random is no more, remove the "better than ↵Mark Murray2013-10-061-34/+6
| | | | | | | | | | | nothing" bootstrap mode. Add SWI harvesting to the mix. My box seeds Yarrow by itself in a few seconds! YMMV; more to follow. Notes: svn path=/projects/random_number_generator/; revision=256087
* * Rather than run the same 'ps' command twice, add 'kenv' which oftenDavid E. O'Brien2012-09-041-2/+4
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=240108
* Correct style.David E. O'Brien2012-08-221-1/+1
| | | | Notes: svn path=/head/; revision=239599
* * Reinstate r128059's consumption of our best entropy first.David E. O'Brien2012-08-221-8/+13
| | | | | | | | | | | | r128060 for "hardware-supplied entropy" reversed this without reason, seems a typo. * Isolate "better than nothing" implementation to a function. Submitted by: obrien & Arthur Mesh <arthurmesh@gmail.com> Sponsored by: Juniper Networks Notes: svn path=/head/; revision=239598
* Replace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.Ed Maste2011-03-301-6/+6
| | | | | | | | | This is a further clean up after r202988. SYSCTL_W is still initialized in rc.subr as some ports may still use it. Notes: svn path=/head/; revision=220153
* This change does the following for the scripts that run up throughDoug Barton2010-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=208307
* As previously discussed, add the svn:executable property to all scriptsDoug Barton2008-07-161-0/+0
| | | | Notes: svn path=/head/; revision=180563
* Make it possible to disable sources of entropy harvesting.Ruslan Ermilov2008-04-221-9/+11
| | | | | | | | Noticed by: Igor Sysoev MFC after: 3 days Notes: svn path=/head/; revision=178423
* Remove two superfluous trailing semicolons.Ralf S. Engelschall2007-05-241-1/+1
| | | | Notes: svn path=/head/; revision=169924
* Remove rcconf.sh from /etc/rc.d, and instead load the configurationDoug Barton2005-12-101-1/+0
| | | | | | | | | | | | | | | | | | | as part of rc. Doing this, and the sourcing of rc.subr after we have determined if we are booting diskless (and correspondingly run rc.initdiskless if necessary) are safe, and actually allow fewer files to be needed on the diskless box. This also allows variables from the configuration to be available to rc itself, such as ... Add a variable to rc.conf, early_late_divider, which designates the script which separates the early and late stages of the boot process. Default this to mountcritlocal, and add text to etc/defaults/rc.conf, rc.conf(5) and diskless(8) which describes how and why one might want to change this. Reviewed by: brooks Notes: svn path=/head/; revision=153298
* It is sufficent to require rcconf rather than initdiskless.Brooks Davis2005-03-021-1/+1
| | | | Notes: svn path=/head/; revision=143048
* Remove the requirement for the FreeBSD keyword as it no longerMike Makonnen2004-10-071-1/+1
| | | | | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days Notes: svn path=/head/; revision=136224
* Take into account hardware-supplied entropy. If the entropy sourceMark Murray2004-04-091-34/+41
| | | | | | | is hardware, the Yarrow initialisations don't need to be done. Notes: svn path=/head/; revision=128060
* Mark scripts as not usable inside a jail by adding keyword 'nojail'.Pawel Jakub Dawidek2004-03-081-1/+1
| | | | | | | Some suggestions from: rwatson, Ruben de Groot <mail25@bzerk.org> Notes: svn path=/head/; revision=126744
* Merge in all the changes that Mike Makonnen has been maintaining for aGordon Tetlow2002-06-131-0/+73
while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson Notes: svn path=/head/; revision=98184