summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2023-01-07 07:58:21 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2023-01-14 11:40:05 +0100
commit54eb24982b6bd94dc8dbe7792bab090d382dd4e5 (patch)
tree98fef0412021d70b7487fd7c439e111f41ab8d58 /crypto
parent18308d6616c13a19094b4fae5cd0d728cae4964c (diff)
Revert "Limit size of modulus for BN_mod_exp_mont_consttime()"
This reverts commit 4378e3cd2a4d73a97a2349efaa143059d8ed05e8. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/20005) (cherry picked from commit 92d306b32b63dd502531a89fb96c4172be0ddb49)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn/bn_exp.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index c5820e037e..91d6b6b4bb 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -615,15 +615,6 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
top = m->top;
- if (in_mont != NULL && BN_is_zero(&in_mont->N)) {
- ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
- return 0;
- }
- if ((unsigned int)top > INT_MAX / sizeof(m->d[0]) / (1 << 8)) {
- /* Prevent overflowing the powerbufLen computation below */
- ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
- return 0;
- }
/*
* Use all bits stored in |p|, rather than |BN_num_bits|, so we do not leak
* whether the top bits are zero.