diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/BN_mod_mul_montgomery.3 | 51 |
1 files changed, 3 insertions, 48 deletions
diff --git a/src/lib/libcrypto/man/BN_mod_mul_montgomery.3 b/src/lib/libcrypto/man/BN_mod_mul_montgomery.3 index 7b22efd7f5..0815eced49 100644 --- a/src/lib/libcrypto/man/BN_mod_mul_montgomery.3 +++ b/src/lib/libcrypto/man/BN_mod_mul_montgomery.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BN_mod_mul_montgomery.3,v 1.14 2021/12/21 11:14:07 schwarze Exp $ | 1 | .\" $OpenBSD: BN_mod_mul_montgomery.3,v 1.15 2023/04/21 06:34:37 tb Exp $ |
2 | .\" full merge up to: OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000 | 2 | .\" full merge up to: OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000 |
3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" | 4 | .\" |
@@ -66,12 +66,11 @@ | |||
66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
68 | .\" | 68 | .\" |
69 | .Dd $Mdocdate: December 21 2021 $ | 69 | .Dd $Mdocdate: April 21 2023 $ |
70 | .Dt BN_MOD_MUL_MONTGOMERY 3 | 70 | .Dt BN_MOD_MUL_MONTGOMERY 3 |
71 | .Os | 71 | .Os |
72 | .Sh NAME | 72 | .Sh NAME |
73 | .Nm BN_MONT_CTX_new , | 73 | .Nm BN_MONT_CTX_new , |
74 | .Nm BN_MONT_CTX_init , | ||
75 | .Nm BN_MONT_CTX_free , | 74 | .Nm BN_MONT_CTX_free , |
76 | .Nm BN_MONT_CTX_set , | 75 | .Nm BN_MONT_CTX_set , |
77 | .Nm BN_MONT_CTX_set_locked , | 76 | .Nm BN_MONT_CTX_set_locked , |
@@ -87,10 +86,6 @@ | |||
87 | .Fa void | 86 | .Fa void |
88 | .Fc | 87 | .Fc |
89 | .Ft void | 88 | .Ft void |
90 | .Fo BN_MONT_CTX_init | ||
91 | .Fa "BN_MONT_CTX *ctx" | ||
92 | .Fc | ||
93 | .Ft void | ||
94 | .Fo BN_MONT_CTX_free | 89 | .Fo BN_MONT_CTX_free |
95 | .Fa "BN_MONT_CTX *mont" | 90 | .Fa "BN_MONT_CTX *mont" |
96 | .Fc | 91 | .Fc |
@@ -146,12 +141,6 @@ allocates and initializes a | |||
146 | .Vt BN_MONT_CTX | 141 | .Vt BN_MONT_CTX |
147 | structure. | 142 | structure. |
148 | .Pp | 143 | .Pp |
149 | .Fn BN_MONT_CTX_init | ||
150 | initializes an existing uninitialized | ||
151 | .Vt BN_MONT_CTX . | ||
152 | It is deprecated and dangerous: see | ||
153 | .Sx CAVEATS . | ||
154 | .Pp | ||
155 | .Fn BN_MONT_CTX_set | 144 | .Fn BN_MONT_CTX_set |
156 | sets up the | 145 | sets up the |
157 | .Fa mont | 146 | .Fa mont |
@@ -237,21 +226,6 @@ is a previously allocated | |||
237 | .Vt BN_CTX | 226 | .Vt BN_CTX |
238 | used for temporary variables. | 227 | used for temporary variables. |
239 | .Pp | 228 | .Pp |
240 | The | ||
241 | .Vt BN_MONT_CTX | ||
242 | structure is defined as follows: | ||
243 | .Bd -literal | ||
244 | typedef struct bn_mont_ctx_st { | ||
245 | int ri; /* number of bits in R */ | ||
246 | BIGNUM RR; /* R^2 (used to convert to Montgomery form) */ | ||
247 | BIGNUM N; /* The modulus */ | ||
248 | BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 | ||
249 | * (Ni is only stored for bignum algorithm) */ | ||
250 | BN_ULONG n0; /* least significant word of Ni */ | ||
251 | int flags; | ||
252 | } BN_MONT_CTX; | ||
253 | .Ed | ||
254 | .Pp | ||
255 | .Sy Warning : | 229 | .Sy Warning : |
256 | The inputs must be reduced modulo | 230 | The inputs must be reduced modulo |
257 | .Fa m , | 231 | .Fa m , |
@@ -288,29 +262,10 @@ and | |||
288 | first appeared in SSLeay 0.6.1 and have been available since | 262 | first appeared in SSLeay 0.6.1 and have been available since |
289 | .Ox 2.4 . | 263 | .Ox 2.4 . |
290 | .Pp | 264 | .Pp |
291 | .Fn BN_MONT_CTX_init | ||
292 | and | ||
293 | .Fn BN_MONT_CTX_copy | 265 | .Fn BN_MONT_CTX_copy |
294 | first appeared in SSLeay 0.9.1 and have been available since | 266 | first appeared in SSLeay 0.9.1 and has been available since |
295 | .Ox 2.6 . | 267 | .Ox 2.6 . |
296 | .Pp | 268 | .Pp |
297 | .Fn BN_MONT_CTX_set_locked | 269 | .Fn BN_MONT_CTX_set_locked |
298 | first appeared in OpenSSL 0.9.8 and has been available since | 270 | first appeared in OpenSSL 0.9.8 and has been available since |
299 | .Ox 4.0 . | 271 | .Ox 4.0 . |
300 | .Sh CAVEATS | ||
301 | .Fn BN_MONT_CTX_init | ||
302 | must not be called on a context that was used previously, or | ||
303 | memory used by the embedded | ||
304 | .Vt BIGNUM | ||
305 | structures is leaked immediately. | ||
306 | Besides, it must not be called on a context created with | ||
307 | .Fn BN_MONT_CTX_new , | ||
308 | or the context itself will likely be leaked later. | ||
309 | It can only be used on a static | ||
310 | .Vt BN_MONT_CTX | ||
311 | structure, on one located on the stack, or on one | ||
312 | .Xr malloc 3 Ap ed | ||
313 | manually, but all these options are discouraged because they | ||
314 | will no longer work once | ||
315 | .Vt BN_MONT_CTX | ||
316 | is made opaque. | ||