NetBSD/share
tls 6e1dd068e9 Separate /dev/random pseudodevice implemenation from kernel entropy pool
implementation.  Rewrite pseudodevice code to use cprng_strong(9).

The new pseudodevice is cloning, so each caller gets bits from a stream
generated with its own key.  Users of /dev/urandom get their generators
keyed on a "best effort" basis -- the kernel will rekey generators
whenever the entropy pool hits the high water mark -- while users of
/dev/random get their generators rekeyed every time key-length bits
are output.

The underlying cprng_strong API can use AES-256 or AES-128, but we use
AES-128 because of concerns about related-key attacks on AES-256.  This
improves performance (and reduces entropy pool depletion) significantly
for users of /dev/urandom but does cause users of /dev/random to rekey
twice as often.

Also fixes various bugs (including some missing locking and a reseed-counter
overflow in the CTR_DRBG code) found while testing this.

For long reads, this generator is approximately 20 times as fast as the
old generator (dd with bs=64K yields 53MB/sec on 2Ghz Core2 instead of
2.5MB/sec) and also uses a separate mutex per instance so concurrency
is greatly improved.  For reads of typical key sizes for modern
cryptosystems (16-32 bytes) performance is about the same as the old
code: a little better for 32 bytes, a little worse for 16 bytes.
2011-12-17 20:05:38 +00:00
..
dict What a pleasure to fix a typo in Webster's... (Though the typo most probably 2010-01-26 07:16:41 +00:00
doc Observe the following spelling: 2010-12-16 17:42:25 +00:00
examples Update secmodel_examples to better describe the secmodel(9) API. 2011-12-04 23:55:36 +00:00
i18n missing files 2011-04-29 09:57:49 +00:00
legal
locale German uses dot as thousands separator 2011-03-15 15:30:52 +00:00
man Separate /dev/random pseudodevice implemenation from kernel entropy pool 2011-12-17 20:05:38 +00:00
me Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
misc One more. 2011-11-19 17:40:19 +00:00
mk Switch hppa to gdb 7. 2011-11-25 22:03:42 +00:00
nls
tabset
terminfo According to the Oxford Dictionary of Etymology, a wether is a male sheep 2011-08-01 12:28:53 +00:00
tmac Tell the groff and friends about libsaslc(3). 2011-02-11 23:47:49 +00:00
wscons There should be no MD keymaps in /usr/share/wscons/keymaps. So I made the 2010-12-06 18:26:28 +00:00
xml Make sure all necessary targets are defined. 2009-01-19 08:08:18 +00:00
zoneinfo Merge TZDATA2011N. 2011-11-02 05:21:46 +00:00
Makefile Userland now builds and uses terminfo instead of termcap. 2010-02-03 15:34:37 +00:00
Makefile.inc