summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/BN_mod_inverse.321
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 @@
68computes the inverse of 68computes the inverse of
69.Fa a 69.Fa a
70modulo 70modulo
71.Fa n 71.Fa m
72and places the result in 72and places the result in
73.Fa r ,
74so
73.Fa r 75.Fa r
74.Pq Li (a*r)%n==1 . 76is such that
77.Li a * r == 1 (mod m) .
75If 78If
76.Fa r 79.Fa r
77is 80is
78.Dv NULL , 81.Dv NULL ,
79a new 82a new
80.Vt BIGNUM 83.Vt BIGNUM
81is created. 84is allocated.
82.Pp 85.Pp
83If the flag 86If the flag
84.Dv BN_FLG_CONSTTIME 87.Dv BN_FLG_CONSTTIME
85is set on 88is set on
86.Fa a 89.Fa a
87or 90or
88.Fa n , 91.Fa m ,
89it operates in constant time. 92it operates in constant time.
90.Pp 93.Pp
91.Fa ctx 94.Fa ctx
@@ -98,7 +101,7 @@ may be the same
98as 101as
99.Fa a 102.Fa a
100or 103or
101.Fa n . 104.Fa m .
102.Sh RETURN VALUES 105.Sh RETURN VALUES
103.Fn BN_mod_inverse 106.Fn BN_mod_inverse
104returns the 107returns the