diff options
author | schwarze <> | 2018-12-21 20:09:04 +0000 |
---|---|---|
committer | schwarze <> | 2018-12-21 20:09:04 +0000 |
commit | 2cae48d8fb743d8d283be3f6eb1e4e280eb999a4 (patch) | |
tree | 545117ece78649f7f52b66a8cc06162b69191181 | |
parent | e1995125fa045c1e2365760aa7795b1534b7b55e (diff) | |
download | openbsd-2cae48d8fb743d8d283be3f6eb1e4e280eb999a4.tar.gz openbsd-2cae48d8fb743d8d283be3f6eb1e4e280eb999a4.tar.bz2 openbsd-2cae48d8fb743d8d283be3f6eb1e4e280eb999a4.zip |
Since OpenBSD 6.1, BN_pseudo_rand*(3) does the same as BN_rand*(3).
Say so, and note that OpenSSL followed suit in 1.1.0 according
to OpenSSL commit 5ecff87d Jun 21 13:55:02 2017 +0100.
-rw-r--r-- | src/lib/libcrypto/man/BN_rand.3 | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/lib/libcrypto/man/BN_rand.3 b/src/lib/libcrypto/man/BN_rand.3 index fbfad03250..8434740664 100644 --- a/src/lib/libcrypto/man/BN_rand.3 +++ b/src/lib/libcrypto/man/BN_rand.3 | |||
@@ -1,5 +1,6 @@ | |||
1 | .\" $OpenBSD: BN_rand.3,v 1.11 2018/03/27 17:35:50 schwarze Exp $ | 1 | .\" $OpenBSD: BN_rand.3,v 1.12 2018/12/21 20:09:04 schwarze Exp $ |
2 | .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | 2 | .\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400 |
3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
3 | .\" | 4 | .\" |
4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. | 5 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. |
5 | .\" Copyright (c) 2000, 2001, 2002, 2013, 2015 The OpenSSL Project. | 6 | .\" Copyright (c) 2000, 2001, 2002, 2013, 2015 The OpenSSL Project. |
@@ -49,7 +50,7 @@ | |||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
51 | .\" | 52 | .\" |
52 | .Dd $Mdocdate: March 27 2018 $ | 53 | .Dd $Mdocdate: December 21 2018 $ |
53 | .Dt BN_RAND 3 | 54 | .Dt BN_RAND 3 |
54 | .Os | 55 | .Os |
55 | .Sh NAME | 56 | .Sh NAME |
@@ -114,10 +115,8 @@ is +1 then | |||
114 | cannot also be 1. | 115 | cannot also be 1. |
115 | .Pp | 116 | .Pp |
116 | .Fn BN_pseudo_rand | 117 | .Fn BN_pseudo_rand |
117 | does the same, but pseudo-random numbers generated by this function are | 118 | is a deprecated alias for |
118 | not necessarily unpredictable. | 119 | .Fn BN_rand . |
119 | They can be used for non-cryptographic purposes and for certain purposes | ||
120 | in cryptographic protocols, but usually not for key generation etc. | ||
121 | .Pp | 120 | .Pp |
122 | .Fn BN_rand_range | 121 | .Fn BN_rand_range |
123 | generates a cryptographically strong pseudo-random number | 122 | generates a cryptographically strong pseudo-random number |
@@ -125,9 +124,8 @@ generates a cryptographically strong pseudo-random number | |||
125 | in the range 0 <= | 124 | in the range 0 <= |
126 | .Fa rnd No < Fa range . | 125 | .Fa rnd No < Fa range . |
127 | .Fn BN_pseudo_rand_range | 126 | .Fn BN_pseudo_rand_range |
128 | does the same, but is based on | 127 | is a deprecated alias for |
129 | .Fn BN_pseudo_rand , | 128 | .Fn BN_rand_range . |
130 | and hence numbers generated by it are not necessarily unpredictable. | ||
131 | .Sh RETURN VALUES | 129 | .Sh RETURN VALUES |
132 | The functions return 1 on success, 0 on error. | 130 | The functions return 1 on success, 0 on error. |
133 | The error codes can be obtained by | 131 | The error codes can be obtained by |
@@ -145,6 +143,11 @@ first appeared in SSLeay 0.5.1 and has been available since | |||
145 | .Fn BN_pseudo_rand | 143 | .Fn BN_pseudo_rand |
146 | first appeared in OpenSSL 0.9.5 and has been available since | 144 | first appeared in OpenSSL 0.9.5 and has been available since |
147 | .Ox 2.7 . | 145 | .Ox 2.7 . |
146 | It does the same as | ||
147 | .Fn BN_rand | ||
148 | since | ||
149 | .Ox 6.1 | ||
150 | and since OpenSSL 1.1.0. | ||
148 | .Pp | 151 | .Pp |
149 | The | 152 | The |
150 | .Fa top | 153 | .Fa top |
@@ -156,3 +159,8 @@ first appeared in OpenSSL 0.9.6a and have been available since | |||
156 | .Fn BN_pseudo_rand_range | 159 | .Fn BN_pseudo_rand_range |
157 | first appeared in OpenSSL 0.9.6c and have been available since | 160 | first appeared in OpenSSL 0.9.6c and have been available since |
158 | .Ox 3.2 . | 161 | .Ox 3.2 . |
162 | It does the same as | ||
163 | .Fn BN_rand_range | ||
164 | since | ||
165 | .Ox 6.1 | ||
166 | and since OpenSSL 1.1.0. | ||