diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bn/bn_local.h | 14 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_mont.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h index 6d308218e7..336ad4ed20 100644 --- a/src/lib/libcrypto/bn/bn_local.h +++ b/src/lib/libcrypto/bn/bn_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_local.h,v 1.11 2023/02/17 05:30:20 jsing Exp $ */ | 1 | /* $OpenBSD: bn_local.h,v 1.12 2023/02/19 13:27:49 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -127,18 +127,6 @@ struct bignum_st { | |||
127 | int flags; | 127 | int flags; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | /* Used for montgomery multiplication */ | ||
131 | struct bn_mont_ctx_st { | ||
132 | int ri; /* number of bits in R */ | ||
133 | BIGNUM RR; /* used to convert to montgomery form */ | ||
134 | BIGNUM N; /* The modulus */ | ||
135 | BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 | ||
136 | * (Ni is only stored for bignum algorithm) */ | ||
137 | BN_ULONG n0[2];/* least significant word(s) of Ni; | ||
138 | (type changed with 0.9.9, was "BN_ULONG n0;" before) */ | ||
139 | int flags; | ||
140 | }; | ||
141 | |||
142 | /* Used for reciprocal division/mod functions | 130 | /* Used for reciprocal division/mod functions |
143 | * It cannot be shared between threads | 131 | * It cannot be shared between threads |
144 | */ | 132 | */ |
diff --git a/src/lib/libcrypto/bn/bn_mont.c b/src/lib/libcrypto/bn/bn_mont.c index 4f2d4548cc..cd75a1ec13 100644 --- a/src/lib/libcrypto/bn/bn_mont.c +++ b/src/lib/libcrypto/bn/bn_mont.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mont.c,v 1.37 2023/02/13 04:25:37 jsing Exp $ */ | 1 | /* $OpenBSD: bn_mont.c,v 1.38 2023/02/19 13:27:49 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -123,6 +123,18 @@ | |||
123 | 123 | ||
124 | #define MONT_WORD /* use the faster word-based algorithm */ | 124 | #define MONT_WORD /* use the faster word-based algorithm */ |
125 | 125 | ||
126 | /* Used for montgomery multiplication */ | ||
127 | struct bn_mont_ctx_st { | ||
128 | int ri; /* number of bits in R */ | ||
129 | BIGNUM RR; /* used to convert to montgomery form */ | ||
130 | BIGNUM N; /* The modulus */ | ||
131 | BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 | ||
132 | * (Ni is only stored for bignum algorithm) */ | ||
133 | BN_ULONG n0[2];/* least significant word(s) of Ni; | ||
134 | (type changed with 0.9.9, was "BN_ULONG n0;" before) */ | ||
135 | int flags; | ||
136 | }; | ||
137 | |||
126 | BN_MONT_CTX * | 138 | BN_MONT_CTX * |
127 | BN_MONT_CTX_new(void) | 139 | BN_MONT_CTX_new(void) |
128 | { | 140 | { |