summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_local.h
diff options
context:
space:
mode:
authorjsing <>2023-02-21 05:58:08 +0000
committerjsing <>2023-02-21 05:58:08 +0000
commit7e646a24857aa30205c4a3160c6de9102b403aa7 (patch)
tree712e8ffaa0dbae7637ba773dd524afc453719cd0 /src/lib/libcrypto/bn/bn_local.h
parentf2efef7d98518da71bf3a4a7b4ada6cbe6c77f5b (diff)
downloadopenbsd-7e646a24857aa30205c4a3160c6de9102b403aa7.tar.gz
openbsd-7e646a24857aa30205c4a3160c6de9102b403aa7.tar.bz2
openbsd-7e646a24857aa30205c4a3160c6de9102b403aa7.zip
Unifdef MONT_WORD.
It does not make sense to use code that is slower, currently broken and prevents the use of assembly Montgomery implementations. This is the result of `unifdef -m -DMONT_WORD`, followed by some manual clean up and the removal of the Ni bignum from BN_MONT_CTX (which was only used in the non-MONT_WORD case). ok miod@ tb@
Diffstat (limited to 'src/lib/libcrypto/bn/bn_local.h')
-rw-r--r--src/lib/libcrypto/bn/bn_local.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h
index d2c7a3983e..c763890695 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.13 2023/02/19 15:45:14 tb Exp $ */ 1/* $OpenBSD: bn_local.h,v 1.14 2023/02/21 05:58:08 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 *
@@ -132,9 +132,7 @@ struct bn_mont_ctx_st {
132 int ri; /* number of bits in R */ 132 int ri; /* number of bits in R */
133 BIGNUM RR; /* used to convert to montgomery form */ 133 BIGNUM RR; /* used to convert to montgomery form */
134 BIGNUM N; /* The modulus */ 134 BIGNUM N; /* The modulus */
135 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 135 BN_ULONG n0[2];/* least significant word(s) of 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) */ 136 (type changed with 0.9.9, was "BN_ULONG n0;" before) */
139 int flags; 137 int flags;
140}; 138};