aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2014-10-30 21:21:53 +0000
committerMark Murray <markm@FreeBSD.org>2014-10-30 21:21:53 +0000
commit10cb24248a6f13974e11c255c8014cfefe6420a7 (patch)
treed5dfa61a018a7d209b25f173c6ee76709037035a /sys/conf
parent39d22d86ab05fb09689a9882909dfd35ab546ade (diff)
downloadsrc-10cb24248a6f13974e11c255c8014cfefe6420a7.tar.gz
src-10cb24248a6f13974e11c255c8014cfefe6420a7.zip
This is the much-discussed major upgrade to the random(4) device, known to 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
Notes: svn path=/head/; revision=273872
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/NOTES6
-rw-r--r--sys/conf/files11
-rw-r--r--sys/conf/options1
3 files changed, 8 insertions, 10 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 4eb25d54f793..513300c57334 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2993,10 +2993,10 @@ options BROOKTREE_ALLOC_PAGES=(217*4+1)
options MAXFILES=999
# Random number generator
-options RANDOM_YARROW # Yarrow RNG
-##options RANDOM_FORTUNA # Fortuna RNG - not yet implemented
+# Only ONE of the below two may be used; they are mutually exclusive.
+options RANDOM_YARROW # Yarrow CSPRNG (Default)
+#options RANDOM_FORTUNA # Fortuna CSPRNG
options RANDOM_DEBUG # Debugging messages
-options RANDOM_RWFILE # Read and write entropy cache
# Module to enable execution of application via emulators like QEMU
options IMAGACT_BINMISC
diff --git a/sys/conf/files b/sys/conf/files
index 3e89dbb18a97..7abcc6692ebf 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -2132,16 +2132,15 @@ rt2860.fw optional rt2860fw | ralfw \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "rt2860.fw"
-dev/random/harvest.c standard
-dev/random/dummy_rng.c standard
+dev/random/randomdev.c standard
dev/random/random_adaptors.c standard
-dev/random/live_entropy_sources.c optional random
-dev/random/random_harvestq.c optional random
-dev/random/randomdev.c optional random
+dev/random/dummy_rng.c standard
+dev/random/live_entropy_sources.c standard
+dev/random/random_harvestq.c standard
dev/random/randomdev_soft.c optional random
dev/random/yarrow.c optional random
+dev/random/fortuna.c optional random
dev/random/hash.c optional random
-dev/random/rwfile.c optional random
dev/rc/rc.c optional rc
dev/re/if_re.c optional re
dev/rl/if_rl.c optional rl pci
diff --git a/sys/conf/options b/sys/conf/options
index f6ad35ac979c..ae0f852bfd6f 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -930,4 +930,3 @@ RCTL opt_global.h
RANDOM_YARROW opt_random.h
RANDOM_FORTUNA opt_random.h
RANDOM_DEBUG opt_random.h
-RANDOM_RWFILE opt_random.h