diff options
| author | tb <> | 2023-10-19 19:17:46 +0000 |
|---|---|---|
| committer | tb <> | 2023-10-19 19:17:46 +0000 |
| commit | c52bb2f029ce368de887eb7869931329d4af6bdd (patch) | |
| tree | 262655683d9052e7ed2b6649befedb203fc1c905 /src/lib/libcrypto/man/BN_mod_inverse.3 | |
| parent | 1cab02ca58aa0b6ea8a4bc60b9f0c2d11be5a60d (diff) | |
| download | openbsd-c52bb2f029ce368de887eb7869931329d4af6bdd.tar.gz openbsd-c52bb2f029ce368de887eb7869931329d4af6bdd.tar.bz2 openbsd-c52bb2f029ce368de887eb7869931329d4af6bdd.zip | |
Rename the modulus from n into m
This matches what other pages use. Also rewrite the definition of the
modular inverse to be less ugly.
Diffstat (limited to 'src/lib/libcrypto/man/BN_mod_inverse.3')
| -rw-r--r-- | src/lib/libcrypto/man/BN_mod_inverse.3 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/libcrypto/man/BN_mod_inverse.3 b/src/lib/libcrypto/man/BN_mod_inverse.3 index 788f66fb93..f76191bd6a 100644 --- a/src/lib/libcrypto/man/BN_mod_inverse.3 +++ b/src/lib/libcrypto/man/BN_mod_inverse.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: BN_mod_inverse.3,v 1.11 2021/11/30 18:34:35 tb Exp $ | 1 | .\" $OpenBSD: BN_mod_inverse.3,v 1.12 2023/10/19 19:17:46 tb Exp $ |
| 2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | 2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. | 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. |
| @@ -48,19 +48,19 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 50 | .\" |
| 51 | .Dd $Mdocdate: November 30 2021 $ | 51 | .Dd $Mdocdate: October 19 2023 $ |
| 52 | .Dt BN_MOD_INVERSE 3 | 52 | .Dt BN_MOD_INVERSE 3 |
| 53 | .Os | 53 | .Os |
| 54 | .Sh NAME | 54 | .Sh NAME |
| 55 | .Nm BN_mod_inverse | 55 | .Nm BN_mod_inverse |
| 56 | .Nd compute inverse modulo n | 56 | .Nd compute inverse modulo m |
| 57 | .Sh SYNOPSIS | 57 | .Sh SYNOPSIS |
| 58 | .In openssl/bn.h | 58 | .In openssl/bn.h |
| 59 | .Ft BIGNUM * | 59 | .Ft BIGNUM * |
| 60 | .Fo BN_mod_inverse | 60 | .Fo BN_mod_inverse |
| 61 | .Fa "BIGNUM *r" | 61 | .Fa "BIGNUM *r" |
| 62 | .Fa "const BIGNUM *a" | 62 | .Fa "const BIGNUM *a" |
| 63 | .Fa "const BIGNUM *n" | 63 | .Fa "const BIGNUM *m" |
| 64 | .Fa "BN_CTX *ctx" | 64 | .Fa "BN_CTX *ctx" |
| 65 | .Fc | 65 | .Fc |
| 66 | .Sh DESCRIPTION | 66 | .Sh DESCRIPTION |
| @@ -68,24 +68,27 @@ | |||
| 68 | computes the inverse of | 68 | computes the inverse of |
| 69 | .Fa a | 69 | .Fa a |
| 70 | modulo | 70 | modulo |
| 71 | .Fa n | 71 | .Fa m |
| 72 | and places the result in | 72 | and places the result in |
| 73 | .Fa r , | ||
| 74 | so | ||
| 73 | .Fa r | 75 | .Fa r |
| 74 | .Pq Li (a*r)%n==1 . | 76 | is such that |
| 77 | .Li a * r == 1 (mod m) . | ||
| 75 | If | 78 | If |
| 76 | .Fa r | 79 | .Fa r |
| 77 | is | 80 | is |
| 78 | .Dv NULL , | 81 | .Dv NULL , |
| 79 | a new | 82 | a new |
| 80 | .Vt BIGNUM | 83 | .Vt BIGNUM |
| 81 | is created. | 84 | is allocated. |
| 82 | .Pp | 85 | .Pp |
| 83 | If the flag | 86 | If the flag |
| 84 | .Dv BN_FLG_CONSTTIME | 87 | .Dv BN_FLG_CONSTTIME |
| 85 | is set on | 88 | is set on |
| 86 | .Fa a | 89 | .Fa a |
| 87 | or | 90 | or |
| 88 | .Fa n , | 91 | .Fa m , |
| 89 | it operates in constant time. | 92 | it operates in constant time. |
| 90 | .Pp | 93 | .Pp |
| 91 | .Fa ctx | 94 | .Fa ctx |
| @@ -98,7 +101,7 @@ may be the same | |||
| 98 | as | 101 | as |
| 99 | .Fa a | 102 | .Fa a |
| 100 | or | 103 | or |
| 101 | .Fa n . | 104 | .Fa m . |
| 102 | .Sh RETURN VALUES | 105 | .Sh RETURN VALUES |
| 103 | .Fn BN_mod_inverse | 106 | .Fn BN_mod_inverse |
| 104 | returns the | 107 | returns the |
