summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2016-11-08 22:19:45 +0000
committerjmc <>2016-11-08 22:19:45 +0000
commit940c272713242bcc8ff6a54576c20345a43a098c (patch)
tree766ec4c7fc8764a33b9f81c723fee3779331be6b
parent225a4b22cb848306a5f851162860ae2ef943de83 (diff)
downloadopenbsd-940c272713242bcc8ff6a54576c20345a43a098c.tar.gz
openbsd-940c272713242bcc8ff6a54576c20345a43a098c.tar.bz2
openbsd-940c272713242bcc8ff6a54576c20345a43a098c.zip
some cleanup;
-rw-r--r--src/lib/libcrypto/man/BN_BLINDING_new.316
-rw-r--r--src/lib/libcrypto/man/BN_CTX_new.314
-rw-r--r--src/lib/libcrypto/man/BN_CTX_start.38
-rw-r--r--src/lib/libcrypto/man/BN_bn2bin.37
-rw-r--r--src/lib/libcrypto/man/BN_mod_inverse.36
-rw-r--r--src/lib/libcrypto/man/BN_mod_mul_montgomery.312
-rw-r--r--src/lib/libcrypto/man/BN_mod_mul_reciprocal.324
-rw-r--r--src/lib/libcrypto/man/BN_new.310
-rw-r--r--src/lib/libcrypto/man/BN_num_bytes.316
-rw-r--r--src/lib/libcrypto/man/BN_set_negative.36
-rw-r--r--src/lib/libcrypto/man/BN_zero.36
11 files changed, 62 insertions, 63 deletions
diff --git a/src/lib/libcrypto/man/BN_BLINDING_new.3 b/src/lib/libcrypto/man/BN_BLINDING_new.3
index d8860f543e..c1a9e903ed 100644
--- a/src/lib/libcrypto/man/BN_BLINDING_new.3
+++ b/src/lib/libcrypto/man/BN_BLINDING_new.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BN_BLINDING_new.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_BLINDING_new.3,v 1.4 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_BLINDING_NEW 3 4.Dt BN_BLINDING_NEW 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -119,7 +119,7 @@ parameters by squaring the
119.Fa A 119.Fa A
120and 120and
121.Fa \&Ai 121.Fa \&Ai
122or, after specific number of uses and if the necessary parameters are 122or, after a specific number of uses and if the necessary parameters are
123set, by re-creating the blinding parameters. 123set, by re-creating the blinding parameters.
124.Pp 124.Pp
125.Fn BN_BLINDING_convert_ex 125.Fn BN_BLINDING_convert_ex
@@ -135,7 +135,7 @@ a copy of the inverse blinding factor
135.Fa \&Ai 135.Fa \&Ai
136will be returned in 136will be returned in
137.Fa r 137.Fa r
138(this is useful if a 138(this is useful if an
139.Vt RSA 139.Vt RSA
140object is shared among several threads). 140object is shared among several threads).
141.Fn BN_BLINDING_invert_ex 141.Fn BN_BLINDING_invert_ex
@@ -169,9 +169,9 @@ object within the
169structure. 169structure.
170This is to help users provide proper locking if needed for 170This is to help users provide proper locking if needed for
171multi-threaded use. 171multi-threaded use.
172The "thread id" object of a newly allocated 172The thread ID object of a newly allocated
173.Vt BN_BLINDING 173.Vt BN_BLINDING
174structure is initialised to the thread id in which 174structure is initialised to the thread ID in which
175.Fn BN_BLINDING_new 175.Fn BN_BLINDING_new
176was called. 176was called.
177.Pp 177.Pp
@@ -210,7 +210,7 @@ and the modulus
210and 210and
211.Fa m_ctx 211.Fa m_ctx
212can be used to pass special functions for exponentiation (normally 212can be used to pass special functions for exponentiation (normally
213.Xr BN_mod_exp_mont 3 213.Xr BN_mod_exp 3
214and 214and
215.Vt BN_MONT_CTX ) . 215.Vt BN_MONT_CTX ) .
216.Sh RETURN VALUES 216.Sh RETURN VALUES
@@ -230,7 +230,7 @@ and
230return 1 on success and 0 if an error occurred. 230return 1 on success and 0 if an error occurred.
231.Pp 231.Pp
232.Fn BN_BLINDING_thread_id 232.Fn BN_BLINDING_thread_id
233returns a pointer to the thread id object within a 233returns a pointer to the thread ID object within a
234.Vt BN_BLINDING 234.Vt BN_BLINDING
235object. 235object.
236.Pp 236.Pp
diff --git a/src/lib/libcrypto/man/BN_CTX_new.3 b/src/lib/libcrypto/man/BN_CTX_new.3
index 5165f3bea2..5883ae7e9c 100644
--- a/src/lib/libcrypto/man/BN_CTX_new.3
+++ b/src/lib/libcrypto/man/BN_CTX_new.3
@@ -1,12 +1,12 @@
1.\" $OpenBSD: BN_CTX_new.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_CTX_new.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_CTX_NEW 3 4.Dt BN_CTX_NEW 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
7.Nm BN_CTX_new , 7.Nm BN_CTX_new ,
8.Nm BN_CTX_init , 8.Nm BN_CTX_free ,
9.Nm BN_CTX_free 9.Nm BN_CTX_init
10.Nd allocate and free BN_CTX structures 10.Nd allocate and free BN_CTX structures
11.Sh SYNOPSIS 11.Sh SYNOPSIS
12.In openssl/bn.h 12.In openssl/bn.h
@@ -45,8 +45,8 @@ structure.
45.Pp 45.Pp
46.Fn BN_CTX_free 46.Fn BN_CTX_free
47frees the components of the 47frees the components of the
48.Vt BN_CTX , 48.Vt BN_CTX
49and if it was created by 49and, if it was created by
50.Fn BN_CTX_new , 50.Fn BN_CTX_new ,
51also the structure itself. 51also the structure itself.
52If 52If
@@ -88,6 +88,6 @@ return no value.
88.Fn BN_CTX_new 88.Fn BN_CTX_new
89and 89and
90.Fn BN_CTX_free 90.Fn BN_CTX_free
91are available in all versions on SSLeay and OpenSSL. 91are available in all versions of SSLeay and OpenSSL.
92.Fn BN_CTX_init 92.Fn BN_CTX_init
93was added in SSLeay 0.9.1b. 93was added in SSLeay 0.9.1b.
diff --git a/src/lib/libcrypto/man/BN_CTX_start.3 b/src/lib/libcrypto/man/BN_CTX_start.3
index 0d0797ef6f..df0328b309 100644
--- a/src/lib/libcrypto/man/BN_CTX_start.3
+++ b/src/lib/libcrypto/man/BN_CTX_start.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BN_CTX_start.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_CTX_start.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_CTX_START 3 4.Dt BN_CTX_START 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -27,7 +27,7 @@ These functions are used to obtain temporary
27.Vt BIGNUM 27.Vt BIGNUM
28variables from a 28variables from a
29.Vt BN_CTX 29.Vt BN_CTX
30(which can been created by using 30(which can be created using
31.Xr BN_CTX_new 3 ) 31.Xr BN_CTX_new 3 )
32in order to save the overhead of repeatedly creating and freeing 32in order to save the overhead of repeatedly creating and freeing
33.Vt BIGNUM Ns s 33.Vt BIGNUM Ns s
@@ -75,7 +75,7 @@ has failed, the subsequent calls will return
75as well, so it is sufficient to check the return value of the last 75as well, so it is sufficient to check the return value of the last
76.Fn BN_CTX_get 76.Fn BN_CTX_get
77call. 77call.
78In case of an error, an error code is set, which can be obtained by 78In case of an error, an error code is set which can be obtained by
79.Xr ERR_get_error 3 . 79.Xr ERR_get_error 3 .
80.Sh SEE ALSO 80.Sh SEE ALSO
81.Xr BN_CTX_new 3 81.Xr BN_CTX_new 3
diff --git a/src/lib/libcrypto/man/BN_bn2bin.3 b/src/lib/libcrypto/man/BN_bn2bin.3
index b371527935..bf1c19ffd4 100644
--- a/src/lib/libcrypto/man/BN_bn2bin.3
+++ b/src/lib/libcrypto/man/BN_bn2bin.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BN_bn2bin.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_bn2bin.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_BN2BIN 3 4.Dt BN_BN2BIN 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -159,7 +159,7 @@ where
159.Fa to 159.Fa to
160must be large enough to hold the result. 160must be large enough to hold the result.
161The size can be determined by calling 161The size can be determined by calling
162.Fn BN_bn2mpi a , NULL . 162.Fn BN_bn2mpi a NULL .
163.Pp 163.Pp
164.Fn BN_mpi2bn 164.Fn BN_mpi2bn
165converts the 165converts the
@@ -216,7 +216,6 @@ on error.
216The error codes can be obtained by 216The error codes can be obtained by
217.Xr ERR_get_error 3 . 217.Xr ERR_get_error 3 .
218.Sh SEE ALSO 218.Sh SEE ALSO
219.Xr ASN1_INTEGER_to_BN 3 ,
220.Xr bn 3 , 219.Xr bn 3 ,
221.Xr BN_num_bytes 3 , 220.Xr BN_num_bytes 3 ,
222.Xr BN_zero 3 , 221.Xr BN_zero 3 ,
diff --git a/src/lib/libcrypto/man/BN_mod_inverse.3 b/src/lib/libcrypto/man/BN_mod_inverse.3
index 2500c178f3..e3667154a9 100644
--- a/src/lib/libcrypto/man/BN_mod_inverse.3
+++ b/src/lib/libcrypto/man/BN_mod_inverse.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BN_mod_inverse.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_mod_inverse.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_MOD_INVERSE 3 4.Dt BN_MOD_INVERSE 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -21,7 +21,7 @@ computes the inverse of
21.Fa a 21.Fa a
22modulo 22modulo
23.Fa n 23.Fa n
24add places the result in 24and places the result in
25.Fa r 25.Fa r
26.Pq Li (a*r)%n==1 . 26.Pq Li (a*r)%n==1 .
27If 27If
diff --git a/src/lib/libcrypto/man/BN_mod_mul_montgomery.3 b/src/lib/libcrypto/man/BN_mod_mul_montgomery.3
index 8ec14c3ea0..ca5f869d4f 100644
--- a/src/lib/libcrypto/man/BN_mod_mul_montgomery.3
+++ b/src/lib/libcrypto/man/BN_mod_mul_montgomery.3
@@ -1,15 +1,15 @@
1.\" $OpenBSD: BN_mod_mul_montgomery.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_mod_mul_montgomery.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_MOD_MUL_MONTGOMERY 3 4.Dt BN_MOD_MUL_MONTGOMERY 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
7.Nm BN_mod_mul_montgomery ,
8.Nm BN_MONT_CTX_new , 7.Nm BN_MONT_CTX_new ,
9.Nm BN_MONT_CTX_init , 8.Nm BN_MONT_CTX_init ,
10.Nm BN_MONT_CTX_free , 9.Nm BN_MONT_CTX_free ,
11.Nm BN_MONT_CTX_set , 10.Nm BN_MONT_CTX_set ,
12.Nm BN_MONT_CTX_copy , 11.Nm BN_MONT_CTX_copy ,
12.Nm BN_mod_mul_montgomery ,
13.Nm BN_from_montgomery , 13.Nm BN_from_montgomery ,
14.Nm BN_to_montgomery 14.Nm BN_to_montgomery
15.Nd Montgomery multiplication 15.Nd Montgomery multiplication
@@ -107,12 +107,12 @@ and places the result in
107.Fn BN_from_montgomery 107.Fn BN_from_montgomery
108performs the Montgomery reduction 108performs the Montgomery reduction
109.Pp 109.Pp
110.D1 Fa r No = Fa a No * R^-1. 110.D1 Fa r No = Fa a No * R^-1
111.Pp 111.Pp
112.Fn BN_to_montgomery 112.Fn BN_to_montgomery
113computes 113computes
114.Pp 114.Pp
115.D1 Mont Ns Po Fa a , No R^2 Pc = Fa a No * R . 115.D1 Mont Ns Po Fa a , No R^2 Pc = Fa a No * R
116.Pp 116.Pp
117Note that 117Note that
118.Fa a 118.Fa a
@@ -142,7 +142,7 @@ typedef struct bn_mont_ctx_st {
142.Fn BN_to_montgomery 142.Fn BN_to_montgomery
143is a macro. 143is a macro.
144.Pp 144.Pp
145.Sy Warning: 145.Sy Warning :
146The inputs must be reduced modulo 146The inputs must be reduced modulo
147.Fa m , 147.Fa m ,
148otherwise the result will be outside the expected range. 148otherwise the result will be outside the expected range.
diff --git a/src/lib/libcrypto/man/BN_mod_mul_reciprocal.3 b/src/lib/libcrypto/man/BN_mod_mul_reciprocal.3
index c311cca961..115cdcbbfe 100644
--- a/src/lib/libcrypto/man/BN_mod_mul_reciprocal.3
+++ b/src/lib/libcrypto/man/BN_mod_mul_reciprocal.3
@@ -1,18 +1,26 @@
1.\" $OpenBSD: BN_mod_mul_reciprocal.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_mod_mul_reciprocal.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_MOD_MUL_RECIPROCAL 3 4.Dt BN_MOD_MUL_RECIPROCAL 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
7.Nm BN_mod_mul_reciprocal , 7.Nm BN_mod_mul_reciprocal ,
8.Nm BN_div_recp ,
9.Nm BN_RECP_CTX_new , 8.Nm BN_RECP_CTX_new ,
10.Nm BN_RECP_CTX_init , 9.Nm BN_RECP_CTX_init ,
11.Nm BN_RECP_CTX_free , 10.Nm BN_RECP_CTX_free ,
12.Nm BN_RECP_CTX_set 11.Nm BN_RECP_CTX_set ,
12.Nm BN_div_recp
13.Nd modular multiplication using reciprocal 13.Nd modular multiplication using reciprocal
14.Sh SYNOPSIS 14.Sh SYNOPSIS
15.In openssl/bn.h 15.In openssl/bn.h
16.Ft int
17.Fo BN_mod_mul_reciprocal
18.Fa "BIGNUM *r"
19.Fa "BIGNUM *a"
20.Fa "BIGNUM *b"
21.Fa "BN_RECP_CTX *recp"
22.Fa "BN_CTX *ctx"
23.Fc
16.Ft BN_RECP_CTX * 24.Ft BN_RECP_CTX *
17.Fo BN_RECP_CTX_new 25.Fo BN_RECP_CTX_new
18.Fa void 26.Fa void
@@ -39,14 +47,6 @@
39.Fa "BN_RECP_CTX *recp" 47.Fa "BN_RECP_CTX *recp"
40.Fa "BN_CTX *ctx" 48.Fa "BN_CTX *ctx"
41.Fc 49.Fc
42.Ft int
43.Fo BN_mod_mul_reciprocal
44.Fa "BIGNUM *r"
45.Fa "BIGNUM *a"
46.Fa "BIGNUM *b"
47.Fa "BN_RECP_CTX *recp"
48.Fa "BN_CTX *ctx"
49.Fc
50.Sh DESCRIPTION 50.Sh DESCRIPTION
51.Fn BN_mod_mul_reciprocal 51.Fn BN_mod_mul_reciprocal
52can be used to perform an efficient 52can be used to perform an efficient
diff --git a/src/lib/libcrypto/man/BN_new.3 b/src/lib/libcrypto/man/BN_new.3
index 887336e914..cb351d2fa5 100644
--- a/src/lib/libcrypto/man/BN_new.3
+++ b/src/lib/libcrypto/man/BN_new.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BN_new.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_new.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_NEW 3 4.Dt BN_NEW 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -50,8 +50,8 @@ and sets it to the value 0.
50.Pp 50.Pp
51.Fn BN_free 51.Fn BN_free
52frees the components of the 52frees the components of the
53.Vt BIGNUM , 53.Vt BIGNUM
54and if it was created by 54and, if it was created by
55.Fn BN_new , 55.Fn BN_new ,
56also the structure itself. 56also the structure itself.
57.Fn BN_clear_free 57.Fn BN_clear_free
@@ -81,6 +81,6 @@ return no values.
81.Fn BN_free , 81.Fn BN_free ,
82and 82and
83.Fn BN_clear_free 83.Fn BN_clear_free
84are available in all versions on SSLeay and OpenSSL. 84are available in all versions of SSLeay and OpenSSL.
85.Fn BN_init 85.Fn BN_init
86was added in SSLeay 0.9.1b. 86was added in SSLeay 0.9.1b.
diff --git a/src/lib/libcrypto/man/BN_num_bytes.3 b/src/lib/libcrypto/man/BN_num_bytes.3
index 5223ff1116..3e96a401a5 100644
--- a/src/lib/libcrypto/man/BN_num_bytes.3
+++ b/src/lib/libcrypto/man/BN_num_bytes.3
@@ -1,11 +1,11 @@
1.\" $OpenBSD: BN_num_bytes.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_num_bytes.3,v 1.3 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_NUM_BYTES 3 4.Dt BN_NUM_BYTES 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
7.Nm BN_num_bits ,
8.Nm BN_num_bytes , 7.Nm BN_num_bytes ,
8.Nm BN_num_bits ,
9.Nm BN_num_bits_word 9.Nm BN_num_bits_word
10.Nd get BIGNUM size 10.Nd get BIGNUM size
11.Sh SYNOPSIS 11.Sh SYNOPSIS
@@ -25,12 +25,12 @@
25.Sh DESCRIPTION 25.Sh DESCRIPTION
26.Fn BN_num_bytes 26.Fn BN_num_bytes
27returns the size of a 27returns the size of a
28.Sy BIGNUM 28.Vt BIGNUM
29in bytes. 29in bytes.
30.Pp 30.Pp
31.Fn BN_num_bits_word 31.Fn BN_num_bits_word
32returns the number of significant bits in a word. 32returns the number of significant bits in a word.
33If we take 0x00000432 as an example, it returns 11, not 16, not 32. 33As an example, 0x00000432 returns 11, not 16 or 32.
34Basically, except for a zero, it returns 34Basically, except for a zero, it returns
35.Pp 35.Pp
36.D1 floor(log2( Ns Fa w ) ) No + 1 . 36.D1 floor(log2( Ns Fa w ) ) No + 1 .
@@ -43,9 +43,7 @@ following the same principle as
43.Pp 43.Pp
44.Fn BN_num_bytes 44.Fn BN_num_bytes
45is a macro. 45is a macro.
46.Sh RETURN VALUES 46.Pp
47The size.
48.Sh NOTES
49Some have tried using 47Some have tried using
50.Fn BN_num_bits 48.Fn BN_num_bits
51on individual numbers in RSA keys, DH keys and DSA keys, and found that 49on individual numbers in RSA keys, DH keys and DSA keys, and found that
@@ -65,6 +63,8 @@ or use
65.Fn BN_num_bytes 63.Fn BN_num_bytes
66and multiply with 8 (although there's no real guarantee that will match 64and multiply with 8 (although there's no real guarantee that will match
67the "key size", just a lot more probability). 65the "key size", just a lot more probability).
66.Sh RETURN VALUES
67The size.
68.Sh SEE ALSO 68.Sh SEE ALSO
69.Xr bn 3 , 69.Xr bn 3 ,
70.Xr DH_size 3 , 70.Xr DH_size 3 ,
diff --git a/src/lib/libcrypto/man/BN_set_negative.3 b/src/lib/libcrypto/man/BN_set_negative.3
index 871de9272e..166e2f2971 100644
--- a/src/lib/libcrypto/man/BN_set_negative.3
+++ b/src/lib/libcrypto/man/BN_set_negative.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BN_set_negative.3,v 1.1 2016/11/05 20:36:11 schwarze Exp $ 1.\" $OpenBSD: BN_set_negative.3,v 1.2 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: November 5 2016 $ 17.Dd $Mdocdate: November 8 2016 $
18.Dt BN_SET_NEGATIVE 3 18.Dt BN_SET_NEGATIVE 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -39,7 +39,7 @@ to negative if both
39.Fa b 39.Fa b
40and 40and
41.Fa n 41.Fa n
42are nonzero, otherwise it sets it to positive. 42are non-zero, otherwise it sets it to positive.
43.Pp 43.Pp
44.Fn BN_is_negative 44.Fn BN_is_negative
45tests the sign of 45tests the sign of
diff --git a/src/lib/libcrypto/man/BN_zero.3 b/src/lib/libcrypto/man/BN_zero.3
index 2d9b943a96..9f2b18aa1f 100644
--- a/src/lib/libcrypto/man/BN_zero.3
+++ b/src/lib/libcrypto/man/BN_zero.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BN_zero.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BN_zero.3,v 1.4 2016/11/08 22:19:45 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 8 2016 $
4.Dt BN_ZERO 3 4.Dt BN_ZERO 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -100,6 +100,6 @@ Someone might change the constant.
100.Pp 100.Pp
101If a 101If a
102.Vt BIGNUM 102.Vt BIGNUM
103is equal to 0xffffffffL it can be represented as an 103is equal to 0xffffffffL; it can be represented as an
104.Vt unsigned long 104.Vt unsigned long
105but this value is also returned on error. 105but this value is also returned on error.