diff options
author | miod <> | 2014-04-15 16:52:50 +0000 |
---|---|---|
committer | miod <> | 2014-04-15 16:52:50 +0000 |
commit | be03b064bffafbd378c0d5cc5971594573544d64 (patch) | |
tree | cd099da9298b8ab84a5dbbead9a6560737057c97 /src/lib/libcrypto/doc/RAND_load_file.pod | |
parent | f08ae3b01d60723e8f4334e0aaf4a57f03c478ba (diff) | |
download | openbsd-be03b064bffafbd378c0d5cc5971594573544d64.tar.gz openbsd-be03b064bffafbd378c0d5cc5971594573544d64.tar.bz2 openbsd-be03b064bffafbd378c0d5cc5971594573544d64.zip |
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@
Diffstat (limited to 'src/lib/libcrypto/doc/RAND_load_file.pod')
-rw-r--r-- | src/lib/libcrypto/doc/RAND_load_file.pod | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/doc/RAND_load_file.pod b/src/lib/libcrypto/doc/RAND_load_file.pod index d8c134e621..3f7e944d86 100644 --- a/src/lib/libcrypto/doc/RAND_load_file.pod +++ b/src/lib/libcrypto/doc/RAND_load_file.pod | |||
@@ -22,18 +22,18 @@ filename. The seed file is $RANDFILE if that environment variable is | |||
22 | set, $HOME/.rnd otherwise. If $HOME is not set either, or B<num> is | 22 | set, $HOME/.rnd otherwise. If $HOME is not set either, or B<num> is |
23 | too small for the path name, an error occurs. | 23 | too small for the path name, an error occurs. |
24 | 24 | ||
25 | RAND_load_file() reads a number of bytes from file B<filename> and | 25 | RAND_load_file() used to allow for the state of the random number generator |
26 | adds them to the PRNG. If B<max_bytes> is non-negative, | 26 | to be controlled by external sources. |
27 | up to to B<max_bytes> are read; starting with OpenSSL 0.9.5, | 27 | |
28 | if B<max_bytes> is -1, the complete file is read. | 28 | It is kept for ABI compatibility but is no longer functional, and |
29 | should not used in new programs. | ||
29 | 30 | ||
30 | RAND_write_file() writes a number of random bytes (currently 1024) to | 31 | RAND_write_file() writes a number of random bytes (currently 1024) to |
31 | file B<filename> which can be used to initialize the PRNG by calling | 32 | file B<filename>. |
32 | RAND_load_file() in a later session. | ||
33 | 33 | ||
34 | =head1 RETURN VALUES | 34 | =head1 RETURN VALUES |
35 | 35 | ||
36 | RAND_load_file() returns the number of bytes read. | 36 | RAND_load_file() always returns 0. |
37 | 37 | ||
38 | RAND_write_file() returns the number of bytes written, and -1 if the | 38 | RAND_write_file() returns the number of bytes written, and -1 if the |
39 | bytes written were generated without appropriate seed. | 39 | bytes written were generated without appropriate seed. |