diff options
Diffstat (limited to 'doc/man3/RAND_bytes.pod')
-rw-r--r-- | doc/man3/RAND_bytes.pod | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/doc/man3/RAND_bytes.pod b/doc/man3/RAND_bytes.pod index 284b9dbe4d..fca1ad6961 100644 --- a/doc/man3/RAND_bytes.pod +++ b/doc/man3/RAND_bytes.pod @@ -20,13 +20,21 @@ Deprecated: =head1 DESCRIPTION RAND_bytes() puts B<num> cryptographically strong pseudo-random bytes -into B<buf>. An error occurs if the CSPRNG has not been seeded with -enough randomness to ensure an unpredictable byte sequence. +into B<buf>. RAND_priv_bytes() has the same semantics as RAND_bytes(). It is intended to -be used for generating long-term private keys. If using the default -RAND_METHOD, this function uses a separate instance of the PRNG so that -a compromise of the global generator will not affect such key generation. +be used for generating values that should remain private. If using the +default RAND_METHOD, this function uses a separate "private" PRNG +instance so that a compromise of the "public" PRNG instance will not +affect the secrecy of these private values, as described in L<RAND(7)> +and L<RAND_DRBG(7)>. + +=head1 NOTES + +Always check the error return value of RAND_bytes() and +RAND_priv_bytes() and do not take randomness for granted: an error occurs +if the CSPRNG has not been seeded with enough randomness to ensure an +unpredictable byte sequence. =head1 RETURN VALUES @@ -37,14 +45,26 @@ obtained by L<ERR_get_error(3)>. =head1 HISTORY +=over 2 + +=item * + RAND_pseudo_bytes() was deprecated in OpenSSL 1.1.0; use RAND_bytes() instead. +=item * + +RAND_priv_bytes() was added in OpenSSL 1.1.1. + +=back + =head1 SEE ALSO L<RAND_add(3)>, L<RAND_bytes(3)>, +L<RAND_priv_bytes(3)>, L<ERR_get_error(3)>, -L<RAND(7)> +L<RAND(7)>, +L<RAND_DRBG(7)> =head1 COPYRIGHT |