diff options
author | Jack Lloyd <[email protected]> | 2019-04-26 21:40:15 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-04-26 21:40:15 -0400 |
commit | 7743c8e97a377ab3a24d590182d848b65d24dff2 (patch) | |
tree | 887ead8d61349be84b86113fd568fc2a0cd1a7d8 /src/lib/math | |
parent | 0b38f0c30bab4cf942863b4255ab2aabead556a4 (diff) |
Fix feature macro checks.
Add a checker script.
Diffstat (limited to 'src/lib/math')
-rw-r--r-- | src/lib/math/numbertheory/curve_nistp.h | 5 | ||||
-rw-r--r-- | src/lib/math/numbertheory/nistp_redc.cpp | 4 |
2 files changed, 5 insertions, 4 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 - } |