summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2023-02-19 13:27:50 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2023-02-19 13:27:50 +0000
commitd3300db583eda772a920bff77825edaac27400a3 (patch)
treed37f5b7e4ace0065e0745ea8c872a7ba7815d5c2 /lib/libcrypto/bn
parent472a5df085bbcf0050e124ecf488e2ff280d6e38 (diff)
Move struct bn_mont_ctx_st from bn_local.h to bn_mont.c.
No code outside of bn_mont.c needs access to it. ok tb@
Diffstat (limited to 'lib/libcrypto/bn')
-rw-r--r--lib/libcrypto/bn/bn_local.h14
-rw-r--r--lib/libcrypto/bn/bn_mont.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/libcrypto/bn/bn_local.h b/lib/libcrypto/bn/bn_local.h
index 6d308218e7c..336ad4ed200 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.11 2023/02/17 05:30:20 jsing Exp $ */
+/* $OpenBSD: bn_local.h,v 1.12 2023/02/19 13:27:49 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -127,18 +127,6 @@ 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
*/
diff --git a/lib/libcrypto/bn/bn_mont.c b/lib/libcrypto/bn/bn_mont.c
index 4f2d4548cc4..cd75a1ec138 100644
--- a/lib/libcrypto/bn/bn_mont.c
+++ b/lib/libcrypto/bn/bn_mont.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_mont.c,v 1.37 2023/02/13 04:25:37 jsing Exp $ */
+/* $OpenBSD: bn_mont.c,v 1.38 2023/02/19 13:27:49 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -123,6 +123,18 @@
#define MONT_WORD /* use the faster word-based algorithm */
+/* 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;
+};
+
BN_MONT_CTX *
BN_MONT_CTX_new(void)
{