diff options
| author | jmc <> | 2016-11-08 22:19:45 +0000 |
|---|---|---|
| committer | jmc <> | 2016-11-08 22:19:45 +0000 |
| commit | 56e04f6e28c8866d80e43807aabd125659bcc2db (patch) | |
| tree | 766ec4c7fc8764a33b9f81c723fee3779331be6b | |
| parent | 2f5900bed54d60e6bee1890ef1d051d237f73c40 (diff) | |
| download | openbsd-56e04f6e28c8866d80e43807aabd125659bcc2db.tar.gz openbsd-56e04f6e28c8866d80e43807aabd125659bcc2db.tar.bz2 openbsd-56e04f6e28c8866d80e43807aabd125659bcc2db.zip | |
some cleanup;
| -rw-r--r-- | src/lib/libcrypto/man/BN_BLINDING_new.3 | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_CTX_new.3 | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_CTX_start.3 | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_bn2bin.3 | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_mod_inverse.3 | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_mod_mul_montgomery.3 | 12 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_mod_mul_reciprocal.3 | 24 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_new.3 | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_num_bytes.3 | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_set_negative.3 | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BN_zero.3 | 6 |
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 |
| 120 | and | 120 | and |
| 121 | .Fa \&Ai | 121 | .Fa \&Ai |
| 122 | or, after specific number of uses and if the necessary parameters are | 122 | or, after a specific number of uses and if the necessary parameters are |
| 123 | set, by re-creating the blinding parameters. | 123 | set, 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 |
| 136 | will be returned in | 136 | will 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 |
| 140 | object is shared among several threads). | 140 | object is shared among several threads). |
| 141 | .Fn BN_BLINDING_invert_ex | 141 | .Fn BN_BLINDING_invert_ex |
| @@ -169,9 +169,9 @@ object within the | |||
| 169 | structure. | 169 | structure. |
| 170 | This is to help users provide proper locking if needed for | 170 | This is to help users provide proper locking if needed for |
| 171 | multi-threaded use. | 171 | multi-threaded use. |
| 172 | The "thread id" object of a newly allocated | 172 | The thread ID object of a newly allocated |
| 173 | .Vt BN_BLINDING | 173 | .Vt BN_BLINDING |
| 174 | structure is initialised to the thread id in which | 174 | structure is initialised to the thread ID in which |
| 175 | .Fn BN_BLINDING_new | 175 | .Fn BN_BLINDING_new |
| 176 | was called. | 176 | was called. |
| 177 | .Pp | 177 | .Pp |
| @@ -210,7 +210,7 @@ and the modulus | |||
| 210 | and | 210 | and |
| 211 | .Fa m_ctx | 211 | .Fa m_ctx |
| 212 | can be used to pass special functions for exponentiation (normally | 212 | can be used to pass special functions for exponentiation (normally |
| 213 | .Xr BN_mod_exp_mont 3 | 213 | .Xr BN_mod_exp 3 |
| 214 | and | 214 | and |
| 215 | .Vt BN_MONT_CTX ) . | 215 | .Vt BN_MONT_CTX ) . |
| 216 | .Sh RETURN VALUES | 216 | .Sh RETURN VALUES |
| @@ -230,7 +230,7 @@ and | |||
| 230 | return 1 on success and 0 if an error occurred. | 230 | return 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 |
| 233 | returns a pointer to the thread id object within a | 233 | returns a pointer to the thread ID object within a |
| 234 | .Vt BN_BLINDING | 234 | .Vt BN_BLINDING |
| 235 | object. | 235 | object. |
| 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 |
| 47 | frees the components of the | 47 | frees the components of the |
| 48 | .Vt BN_CTX , | 48 | .Vt BN_CTX |
| 49 | and if it was created by | 49 | and, if it was created by |
| 50 | .Fn BN_CTX_new , | 50 | .Fn BN_CTX_new , |
| 51 | also the structure itself. | 51 | also the structure itself. |
| 52 | If | 52 | If |
| @@ -88,6 +88,6 @@ return no value. | |||
| 88 | .Fn BN_CTX_new | 88 | .Fn BN_CTX_new |
| 89 | and | 89 | and |
| 90 | .Fn BN_CTX_free | 90 | .Fn BN_CTX_free |
| 91 | are available in all versions on SSLeay and OpenSSL. | 91 | are available in all versions of SSLeay and OpenSSL. |
| 92 | .Fn BN_CTX_init | 92 | .Fn BN_CTX_init |
| 93 | was added in SSLeay 0.9.1b. | 93 | was 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 |
| 28 | variables from a | 28 | variables 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 ) |
| 32 | in order to save the overhead of repeatedly creating and freeing | 32 | in 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 | |||
| 75 | as well, so it is sufficient to check the return value of the last | 75 | as well, so it is sufficient to check the return value of the last |
| 76 | .Fn BN_CTX_get | 76 | .Fn BN_CTX_get |
| 77 | call. | 77 | call. |
| 78 | In case of an error, an error code is set, which can be obtained by | 78 | In 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 |
| 160 | must be large enough to hold the result. | 160 | must be large enough to hold the result. |
| 161 | The size can be determined by calling | 161 | The 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 |
| 165 | converts the | 165 | converts the |
| @@ -216,7 +216,6 @@ on error. | |||
| 216 | The error codes can be obtained by | 216 | The 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 |
| 22 | modulo | 22 | modulo |
| 23 | .Fa n | 23 | .Fa n |
| 24 | add places the result in | 24 | and places the result in |
| 25 | .Fa r | 25 | .Fa r |
| 26 | .Pq Li (a*r)%n==1 . | 26 | .Pq Li (a*r)%n==1 . |
| 27 | If | 27 | If |
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 |
| 108 | performs the Montgomery reduction | 108 | performs 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 |
| 113 | computes | 113 | computes |
| 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 |
| 117 | Note that | 117 | Note 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 |
| 143 | is a macro. | 143 | is a macro. |
| 144 | .Pp | 144 | .Pp |
| 145 | .Sy Warning: | 145 | .Sy Warning : |
| 146 | The inputs must be reduced modulo | 146 | The inputs must be reduced modulo |
| 147 | .Fa m , | 147 | .Fa m , |
| 148 | otherwise the result will be outside the expected range. | 148 | otherwise 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 |
| 52 | can be used to perform an efficient | 52 | can 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 |
| 52 | frees the components of the | 52 | frees the components of the |
| 53 | .Vt BIGNUM , | 53 | .Vt BIGNUM |
| 54 | and if it was created by | 54 | and, if it was created by |
| 55 | .Fn BN_new , | 55 | .Fn BN_new , |
| 56 | also the structure itself. | 56 | also 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 , |
| 82 | and | 82 | and |
| 83 | .Fn BN_clear_free | 83 | .Fn BN_clear_free |
| 84 | are available in all versions on SSLeay and OpenSSL. | 84 | are available in all versions of SSLeay and OpenSSL. |
| 85 | .Fn BN_init | 85 | .Fn BN_init |
| 86 | was added in SSLeay 0.9.1b. | 86 | was 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 |
| 27 | returns the size of a | 27 | returns the size of a |
| 28 | .Sy BIGNUM | 28 | .Vt BIGNUM |
| 29 | in bytes. | 29 | in bytes. |
| 30 | .Pp | 30 | .Pp |
| 31 | .Fn BN_num_bits_word | 31 | .Fn BN_num_bits_word |
| 32 | returns the number of significant bits in a word. | 32 | returns the number of significant bits in a word. |
| 33 | If we take 0x00000432 as an example, it returns 11, not 16, not 32. | 33 | As an example, 0x00000432 returns 11, not 16 or 32. |
| 34 | Basically, except for a zero, it returns | 34 | Basically, 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 |
| 45 | is a macro. | 45 | is a macro. |
| 46 | .Sh RETURN VALUES | 46 | .Pp |
| 47 | The size. | ||
| 48 | .Sh NOTES | ||
| 49 | Some have tried using | 47 | Some have tried using |
| 50 | .Fn BN_num_bits | 48 | .Fn BN_num_bits |
| 51 | on individual numbers in RSA keys, DH keys and DSA keys, and found that | 49 | on 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 |
| 66 | and multiply with 8 (although there's no real guarantee that will match | 64 | and multiply with 8 (although there's no real guarantee that will match |
| 67 | the "key size", just a lot more probability). | 65 | the "key size", just a lot more probability). |
| 66 | .Sh RETURN VALUES | ||
| 67 | The 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 |
| 40 | and | 40 | and |
| 41 | .Fa n | 41 | .Fa n |
| 42 | are nonzero, otherwise it sets it to positive. | 42 | are non-zero, otherwise it sets it to positive. |
| 43 | .Pp | 43 | .Pp |
| 44 | .Fn BN_is_negative | 44 | .Fn BN_is_negative |
| 45 | tests the sign of | 45 | tests 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 |
| 101 | If a | 101 | If a |
| 102 | .Vt BIGNUM | 102 | .Vt BIGNUM |
| 103 | is equal to 0xffffffffL it can be represented as an | 103 | is equal to 0xffffffffL; it can be represented as an |
| 104 | .Vt unsigned long | 104 | .Vt unsigned long |
| 105 | but this value is also returned on error. | 105 | but this value is also returned on error. |
