diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/math/numbertheory/curve_nistp.h | 5 | ||||
-rw-r--r-- | src/lib/math/numbertheory/nistp_redc.cpp | 4 | ||||
-rw-r--r-- | src/lib/pk_pad/eme.cpp | 4 | ||||
-rw-r--r-- | src/lib/pk_pad/eme_pkcs1/info.txt | 1 | ||||
-rw-r--r-- | src/lib/pubkey/ec_group/curve_gfp.cpp | 7 |
5 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/math/numbertheory/curve_nistp.h b/src/lib/math/numbertheory/curve_nistp.h index 710b06dec..963526d5a 100644 --- a/src/lib/math/numbertheory/curve_nistp.h +++ b/src/lib/math/numbertheory/curve_nistp.h @@ -23,6 +23,11 @@ namespace Botan { BOTAN_PUBLIC_API(2,0) const BigInt& prime_p521(); BOTAN_PUBLIC_API(2,0) void redc_p521(BigInt& x, secure_vector<word>& ws); +/* +Previously this macro indicated if the P-{192,224,256,384} reducers +were available. Now they are always enabled and this macro has no meaning. +The define will be removed in a future major release. +*/ #define BOTAN_HAS_NIST_PRIME_REDUCERS_W32 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p384(); diff --git a/src/lib/math/numbertheory/nistp_redc.cpp b/src/lib/math/numbertheory/nistp_redc.cpp index 17089fcbe..ea667f8b6 100644 --- a/src/lib/math/numbertheory/nistp_redc.cpp +++ b/src/lib/math/numbertheory/nistp_redc.cpp @@ -75,8 +75,6 @@ void redc_p521(BigInt& x, secure_vector<word>& ws) bigint_cnd_sub(needs_reduction.value(), x.mutable_data(), p521_words, p_words); } -#if defined(BOTAN_HAS_NIST_PRIME_REDUCERS_W32) - namespace { /** @@ -586,6 +584,4 @@ void redc_p384(BigInt& x, secure_vector<word>& ws) bigint_cnd_add(borrow, x.mutable_data(), p384_limbs + 1, p384_mults[0], p384_limbs); } -#endif - } diff --git a/src/lib/pk_pad/eme.cpp b/src/lib/pk_pad/eme.cpp index 5164157f7..ffedac923 100644 --- a/src/lib/pk_pad/eme.cpp +++ b/src/lib/pk_pad/eme.cpp @@ -14,7 +14,7 @@ #include <botan/oaep.h> #endif -#if defined(BOTAN_HAS_EME_PKCS1v15) +#if defined(BOTAN_HAS_EME_PKCS1) #include <botan/eme_pkcs.h> #endif @@ -31,7 +31,7 @@ EME* get_eme(const std::string& algo_spec) return new EME_Raw; #endif -#if defined(BOTAN_HAS_EME_PKCS1v15) +#if defined(BOTAN_HAS_EME_PKCS1) if(algo_spec == "PKCS1v15" || algo_spec == "EME-PKCS1-v1_5") return new EME_PKCS1v15; #endif diff --git a/src/lib/pk_pad/eme_pkcs1/info.txt b/src/lib/pk_pad/eme_pkcs1/info.txt index 7c827cc34..772806e42 100644 --- a/src/lib/pk_pad/eme_pkcs1/info.txt +++ b/src/lib/pk_pad/eme_pkcs1/info.txt @@ -1,3 +1,4 @@ <defines> EME_PKCS1v15 -> 20131128 +EME_PKCS1 -> 20190426 </defines> diff --git a/src/lib/pubkey/ec_group/curve_gfp.cpp b/src/lib/pubkey/ec_group/curve_gfp.cpp index 61ebfda35..9957bb085 100644 --- a/src/lib/pubkey/ec_group/curve_gfp.cpp +++ b/src/lib/pubkey/ec_group/curve_gfp.cpp @@ -279,8 +279,6 @@ void CurveGFp_NIST::curve_sqr_words(BigInt& z, const word x[], size_t x_size, this->redc_mod_p(z, ws); } -#if defined(BOTAN_HAS_NIST_PRIME_REDUCERS_W32) - /** * The NIST P-192 curve */ @@ -466,8 +464,6 @@ BigInt CurveGFp_P384::invert_element(const BigInt& x, secure_vector<word>& ws) c return r; } -#endif - /** * The NIST P-521 curve */ @@ -555,7 +551,6 @@ BigInt CurveGFp_P521::invert_element(const BigInt& x, secure_vector<word>& ws) c std::shared_ptr<CurveGFp_Repr> CurveGFp::choose_repr(const BigInt& p, const BigInt& a, const BigInt& b) { -#if defined(BOTAN_HAS_NIST_PRIME_REDUCERS_W32) if(p == prime_p192()) return std::shared_ptr<CurveGFp_Repr>(new CurveGFp_P192(a, b)); if(p == prime_p224()) @@ -564,8 +559,6 @@ CurveGFp::choose_repr(const BigInt& p, const BigInt& a, const BigInt& b) return std::shared_ptr<CurveGFp_Repr>(new CurveGFp_P256(a, b)); if(p == prime_p384()) return std::shared_ptr<CurveGFp_Repr>(new CurveGFp_P384(a, b)); -#endif - if(p == prime_p521()) return std::shared_ptr<CurveGFp_Repr>(new CurveGFp_P521(a, b)); |