summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn/bn_local.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/bn/bn_local.h')
-rw-r--r--lib/libcrypto/bn/bn_local.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libcrypto/bn/bn_local.h b/lib/libcrypto/bn/bn_local.h
index 336ad4ed200..d2c7a3983e5 100644
--- a/lib/libcrypto/bn/bn_local.h
+++ b/lib/libcrypto/bn/bn_local.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_local.h,v 1.12 2023/02/19 13:27:49 jsing Exp $ */
+/* $OpenBSD: bn_local.h,v 1.13 2023/02/19 15:45:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -127,6 +127,18 @@ struct bignum_st {
int flags;
};
+/* Used for montgomery multiplication */
+struct bn_mont_ctx_st {
+ int ri; /* number of bits in R */
+ BIGNUM RR; /* used to convert to montgomery form */
+ BIGNUM N; /* The modulus */
+ BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
+ * (Ni is only stored for bignum algorithm) */
+ BN_ULONG n0[2];/* least significant word(s) of Ni;
+ (type changed with 0.9.9, was "BN_ULONG n0;" before) */
+ int flags;
+};
+
/* Used for reciprocal division/mod functions
* It cannot be shared between threads
*/