Replace the old OpenSSL PRNG by direct use of arc4random_buf(), keeping the
authormiod <miod@openbsd.org>
Tue, 15 Apr 2014 16:52:50 +0000 (16:52 +0000)
committermiod <miod@openbsd.org>
Tue, 15 Apr 2014 16:52:50 +0000 (16:52 +0000)
commit3940b30057b598a7f1584405ad5795f6980a1482
treecef9bc1d7c4be5a1255b51dec008eb7916b22563
parent7928e7ed7cc7ca09fe14ae4ba470c2d8ce7f4c2c
Replace the old OpenSSL PRNG by direct use of arc4random_buf(), keeping the
existing RAND interfaces unchanged.

All interfaces allowing external feed or seed of the RNG (either from a file
or a local entropy gathering daemon) are kept for ABI compatibility, but are
no longer do anything.

While the OpenSSL PRNG was required 15+ years ago when many systems lacked
proper entropy collection, things have evolved and one can reasonably assume
it is better to use the kernel (system global) entropy pool rather than trying
to build one's own and having to compensate for thread scheduling...

<RANT>
Whoever thought that RAND_screen(), feeding the PRNG with the contents of the
local workstation's display, under Win32, was a smart idea, ought to be banned
from security programming.
</RANT>

ok beck@ deraadt@ tedu@
23 files changed:
lib/libcrypto/crypto/Makefile
lib/libcrypto/doc/RAND_add.pod
lib/libcrypto/doc/RAND_load_file.pod
lib/libcrypto/rand/md_rand.c [deleted file]
lib/libcrypto/rand/rand.h
lib/libcrypto/rand/rand_egd.c
lib/libcrypto/rand/rand_lcl.h [deleted file]
lib/libcrypto/rand/rand_lib.c
lib/libcrypto/rand/rand_unix.c
lib/libcrypto/rand/randfile.c
lib/libcrypto/rand/rc4_rand.c [new file with mode: 0644]
lib/libssl/src/crypto/rand/md_rand.c [deleted file]
lib/libssl/src/crypto/rand/rand.h
lib/libssl/src/crypto/rand/rand_egd.c
lib/libssl/src/crypto/rand/rand_lcl.h [deleted file]
lib/libssl/src/crypto/rand/rand_lib.c
lib/libssl/src/crypto/rand/rand_unix.c
lib/libssl/src/crypto/rand/randfile.c
lib/libssl/src/crypto/rand/rc4_rand.c [new file with mode: 0644]
lib/libssl/src/doc/crypto/RAND_add.pod
lib/libssl/src/doc/crypto/RAND_egd.pod
lib/libssl/src/doc/crypto/RAND_load_file.pod
lib/libssl/src/doc/crypto/rand.pod