diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn.h')
-rw-r--r-- | src/lib/libcrypto/bn/bn.h | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h index 5d9f17c4d9..abf8cfcf70 100644 --- a/src/lib/libcrypto/bn/bn.h +++ b/src/lib/libcrypto/bn/bn.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn.h,v 1.51 2022/01/14 07:49:49 tb Exp $ */ | 1 | /* $OpenBSD: bn.h,v 1.52 2022/01/14 08:01:47 tb Exp $ */ |
2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -241,54 +241,6 @@ void BN_with_flags(BIGNUM *dest, const BIGNUM *src, int flags); | |||
241 | #define BN_RAND_BOTTOM_ANY 0 | 241 | #define BN_RAND_BOTTOM_ANY 0 |
242 | #define BN_RAND_BOTTOM_ODD 1 | 242 | #define BN_RAND_BOTTOM_ODD 1 |
243 | 243 | ||
244 | /* Move to bn_lcl.h */ | ||
245 | struct bignum_st { | ||
246 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ | ||
247 | int top; /* Index of last used d +1. */ | ||
248 | /* The next are internal book keeping for bn_expand. */ | ||
249 | int dmax; /* Size of the d array. */ | ||
250 | int neg; /* one if the number is negative */ | ||
251 | int flags; | ||
252 | }; | ||
253 | |||
254 | /* Move to bn_lcl.h */ | ||
255 | /* Used for montgomery multiplication */ | ||
256 | struct bn_mont_ctx_st { | ||
257 | int ri; /* number of bits in R */ | ||
258 | BIGNUM RR; /* used to convert to montgomery form */ | ||
259 | BIGNUM N; /* The modulus */ | ||
260 | BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 | ||
261 | * (Ni is only stored for bignum algorithm) */ | ||
262 | BN_ULONG n0[2];/* least significant word(s) of Ni; | ||
263 | (type changed with 0.9.9, was "BN_ULONG n0;" before) */ | ||
264 | int flags; | ||
265 | }; | ||
266 | |||
267 | /* Move to bn_lcl.h */ | ||
268 | /* Used for reciprocal division/mod functions | ||
269 | * It cannot be shared between threads | ||
270 | */ | ||
271 | struct bn_recp_ctx_st { | ||
272 | BIGNUM N; /* the divisor */ | ||
273 | BIGNUM Nr; /* the reciprocal */ | ||
274 | int num_bits; | ||
275 | int shift; | ||
276 | int flags; | ||
277 | }; | ||
278 | |||
279 | /* Move to bn_lcl.h */ | ||
280 | /* Used for slow "generation" functions. */ | ||
281 | struct bn_gencb_st { | ||
282 | unsigned int ver; /* To handle binary (in)compatibility */ | ||
283 | void *arg; /* callback-specific data */ | ||
284 | union { | ||
285 | /* if(ver==1) - handles old style callbacks */ | ||
286 | void (*cb_1)(int, int, void *); | ||
287 | /* if(ver==2) - new callback style */ | ||
288 | int (*cb_2)(int, int, BN_GENCB *); | ||
289 | } cb; | ||
290 | }; | ||
291 | |||
292 | BN_GENCB *BN_GENCB_new(void); | 244 | BN_GENCB *BN_GENCB_new(void); |
293 | void BN_GENCB_free(BN_GENCB *cb); | 245 | void BN_GENCB_free(BN_GENCB *cb); |
294 | 246 | ||