summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-12-21 20:09:04 +0000
committerschwarze <>2018-12-21 20:09:04 +0000
commit2cae48d8fb743d8d283be3f6eb1e4e280eb999a4 (patch)
tree545117ece78649f7f52b66a8cc06162b69191181
parente1995125fa045c1e2365760aa7795b1534b7b55e (diff)
downloadopenbsd-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.328
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
114cannot also be 1. 115cannot also be 1.
115.Pp 116.Pp
116.Fn BN_pseudo_rand 117.Fn BN_pseudo_rand
117does the same, but pseudo-random numbers generated by this function are 118is a deprecated alias for
118not necessarily unpredictable. 119.Fn BN_rand .
119They can be used for non-cryptographic purposes and for certain purposes
120in cryptographic protocols, but usually not for key generation etc.
121.Pp 120.Pp
122.Fn BN_rand_range 121.Fn BN_rand_range
123generates a cryptographically strong pseudo-random number 122generates a cryptographically strong pseudo-random number
@@ -125,9 +124,8 @@ generates a cryptographically strong pseudo-random number
125in the range 0 <= 124in 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
128does the same, but is based on 127is a deprecated alias for
129.Fn BN_pseudo_rand , 128.Fn BN_rand_range .
130and hence numbers generated by it are not necessarily unpredictable.
131.Sh RETURN VALUES 129.Sh RETURN VALUES
132The functions return 1 on success, 0 on error. 130The functions return 1 on success, 0 on error.
133The error codes can be obtained by 131The 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
146first appeared in OpenSSL 0.9.5 and has been available since 144first appeared in OpenSSL 0.9.5 and has been available since
147.Ox 2.7 . 145.Ox 2.7 .
146It does the same as
147.Fn BN_rand
148since
149.Ox 6.1
150and since OpenSSL 1.1.0.
148.Pp 151.Pp
149The 152The
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
157first appeared in OpenSSL 0.9.6c and have been available since 160first appeared in OpenSSL 0.9.6c and have been available since
158.Ox 3.2 . 161.Ox 3.2 .
162It does the same as
163.Fn BN_rand_range
164since
165.Ox 6.1
166and since OpenSSL 1.1.0.