diff options
Diffstat (limited to 'src/lib/math')
-rw-r--r-- | src/lib/math/bigint/big_code.cpp | 4 | ||||
-rw-r--r-- | src/lib/math/bigint/big_ops3.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/bigint/bigint.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/bigint/divide.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/bigint/divide.h | 34 | ||||
-rw-r--r-- | src/lib/math/bigint/info.txt | 5 | ||||
-rw-r--r-- | src/lib/math/mp/mp_madd.h | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/curve_nistp.h | 29 | ||||
-rw-r--r-- | src/lib/math/numbertheory/info.txt | 8 | ||||
-rw-r--r-- | src/lib/math/numbertheory/make_prm.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/mod_inv.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/monty.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/monty_exp.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/nistp_redc.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/numthry.cpp | 4 | ||||
-rw-r--r-- | src/lib/math/numbertheory/pow_mod.cpp | 4 | ||||
-rw-r--r-- | src/lib/math/numbertheory/pow_mod.h | 8 | ||||
-rw-r--r-- | src/lib/math/numbertheory/primality.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/reducer.cpp | 2 |
19 files changed, 56 insertions, 62 deletions
diff --git a/src/lib/math/bigint/big_code.cpp b/src/lib/math/bigint/big_code.cpp index 6eb27549e..4f38b100e 100644 --- a/src/lib/math/bigint/big_code.cpp +++ b/src/lib/math/bigint/big_code.cpp @@ -6,8 +6,8 @@ */ #include <botan/bigint.h> -#include <botan/divide.h> -#include <botan/charset.h> +#include <botan/internal/divide.h> +#include <botan/internal/charset.h> #include <botan/hex.h> namespace Botan { diff --git a/src/lib/math/bigint/big_ops3.cpp b/src/lib/math/bigint/big_ops3.cpp index 11804762b..553a34a7b 100644 --- a/src/lib/math/bigint/big_ops3.cpp +++ b/src/lib/math/bigint/big_ops3.cpp @@ -7,7 +7,7 @@ */ #include <botan/bigint.h> -#include <botan/divide.h> +#include <botan/internal/divide.h> #include <botan/internal/mp_core.h> #include <botan/internal/bit_ops.h> #include <algorithm> diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp index 8510da1d3..3771d1820 100644 --- a/src/lib/math/bigint/bigint.cpp +++ b/src/lib/math/bigint/bigint.cpp @@ -10,7 +10,7 @@ #include <botan/internal/rounding.h> #include <botan/internal/bit_ops.h> #include <botan/internal/ct_utils.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/lib/math/bigint/divide.cpp b/src/lib/math/bigint/divide.cpp index 0b23e2489..37d7c4c7b 100644 --- a/src/lib/math/bigint/divide.cpp +++ b/src/lib/math/bigint/divide.cpp @@ -5,7 +5,7 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include <botan/divide.h> +#include <botan/internal/divide.h> #include <botan/internal/mp_core.h> #include <botan/internal/mp_madd.h> #include <botan/internal/ct_utils.h> diff --git a/src/lib/math/bigint/divide.h b/src/lib/math/bigint/divide.h index 47141b3e7..157472dfc 100644 --- a/src/lib/math/bigint/divide.h +++ b/src/lib/math/bigint/divide.h @@ -10,8 +10,6 @@ #include <botan/bigint.h> -BOTAN_FUTURE_INTERNAL_HEADER(divide.h) - namespace Botan { /** @@ -21,10 +19,11 @@ namespace Botan { * @param q will be set to x / y * @param r will be set to x % y */ -void BOTAN_UNSTABLE_API vartime_divide(const BigInt& x, - const BigInt& y, - BigInt& q, - BigInt& r); +BOTAN_TEST_API +void vartime_divide(const BigInt& x, + const BigInt& y, + BigInt& q, + BigInt& r); /** * BigInt division, const time variant @@ -37,10 +36,11 @@ void BOTAN_UNSTABLE_API vartime_divide(const BigInt& x, * @param q will be set to x / y * @param r will be set to x % y */ -void BOTAN_PUBLIC_API(2,9) ct_divide(const BigInt& x, - const BigInt& y, - BigInt& q, - BigInt& r); +BOTAN_TEST_API +void ct_divide(const BigInt& x, + const BigInt& y, + BigInt& q, + BigInt& r); inline void divide(const BigInt& x, const BigInt& y, @@ -78,10 +78,11 @@ inline BigInt ct_divide(const BigInt& x, const BigInt& y) * @param q will be set to x / y * @param r will be set to x % y */ -void BOTAN_PUBLIC_API(2,9) ct_divide_u8(const BigInt& x, - uint8_t y, - BigInt& q, - uint8_t& r); +BOTAN_TEST_API +void ct_divide_u8(const BigInt& x, + uint8_t y, + BigInt& q, + uint8_t& r); /** * BigInt modulo, const time variant @@ -93,8 +94,9 @@ void BOTAN_PUBLIC_API(2,9) ct_divide_u8(const BigInt& x, * @param modulo a positive integer * @return result x % modulo */ -BigInt BOTAN_PUBLIC_API(2,9) ct_modulo(const BigInt& x, - const BigInt& modulo); +BOTAN_TEST_API +BigInt ct_modulo(const BigInt& x, + const BigInt& modulo); } diff --git a/src/lib/math/bigint/info.txt b/src/lib/math/bigint/info.txt index 974366b81..c358299eb 100644 --- a/src/lib/math/bigint/info.txt +++ b/src/lib/math/bigint/info.txt @@ -4,9 +4,12 @@ BIGINT -> 20131128 <header:public> bigint.h -divide.h </header:public> +<header:internal> +divide.h +</header:internal> + <requires> mp hex diff --git a/src/lib/math/mp/mp_madd.h b/src/lib/math/mp/mp_madd.h index 531d6e663..b530b74f1 100644 --- a/src/lib/math/mp/mp_madd.h +++ b/src/lib/math/mp/mp_madd.h @@ -10,7 +10,7 @@ #define BOTAN_MP_WORD_MULADD_H_ #include <botan/types.h> -#include <botan/mul128.h> +#include <botan/internal/mul128.h> namespace Botan { diff --git a/src/lib/math/numbertheory/curve_nistp.h b/src/lib/math/numbertheory/curve_nistp.h index 19d1bd256..2425eb9e8 100644 --- a/src/lib/math/numbertheory/curve_nistp.h +++ b/src/lib/math/numbertheory/curve_nistp.h @@ -10,8 +10,6 @@ #include <botan/bigint.h> -BOTAN_FUTURE_INTERNAL_HEADER(curve_nistp.h) - namespace Botan { /** @@ -22,27 +20,20 @@ namespace Botan { * ws is a workspace function which is used as a temporary, * and will be resized as needed. */ -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_TEST_API const BigInt& prime_p521(); +BOTAN_TEST_API void redc_p521(BigInt& x, secure_vector<word>& ws); -BOTAN_PUBLIC_API(2,0) const BigInt& prime_p384(); -BOTAN_PUBLIC_API(2,0) void redc_p384(BigInt& x, secure_vector<word>& ws); +BOTAN_TEST_API const BigInt& prime_p384(); +BOTAN_TEST_API void redc_p384(BigInt& x, secure_vector<word>& ws); -BOTAN_PUBLIC_API(2,0) const BigInt& prime_p256(); -BOTAN_PUBLIC_API(2,0) void redc_p256(BigInt& x, secure_vector<word>& ws); +BOTAN_TEST_API const BigInt& prime_p256(); +BOTAN_TEST_API void redc_p256(BigInt& x, secure_vector<word>& ws); -BOTAN_PUBLIC_API(2,0) const BigInt& prime_p224(); -BOTAN_PUBLIC_API(2,0) void redc_p224(BigInt& x, secure_vector<word>& ws); +BOTAN_TEST_API const BigInt& prime_p224(); +BOTAN_TEST_API void redc_p224(BigInt& x, secure_vector<word>& ws); -BOTAN_PUBLIC_API(2,0) const BigInt& prime_p192(); -BOTAN_PUBLIC_API(2,0) void redc_p192(BigInt& x, secure_vector<word>& ws); +BOTAN_TEST_API const BigInt& prime_p192(); +BOTAN_TEST_API void redc_p192(BigInt& x, secure_vector<word>& ws); } diff --git a/src/lib/math/numbertheory/info.txt b/src/lib/math/numbertheory/info.txt index 4b241c120..a5b914a30 100644 --- a/src/lib/math/numbertheory/info.txt +++ b/src/lib/math/numbertheory/info.txt @@ -3,16 +3,16 @@ NUMBERTHEORY -> 20131128 </defines> <header:public> -curve_nistp.h numthry.h -pow_mod.h reducer.h -monty.h </header:public> <header:internal> -primality.h +curve_nistp.h +monty.h monty_exp.h +pow_mod.h +primality.h </header:internal> <requires> diff --git a/src/lib/math/numbertheory/make_prm.cpp b/src/lib/math/numbertheory/make_prm.cpp index 404e30104..bac15c707 100644 --- a/src/lib/math/numbertheory/make_prm.cpp +++ b/src/lib/math/numbertheory/make_prm.cpp @@ -8,7 +8,7 @@ #include <botan/numthry.h> #include <botan/rng.h> #include <botan/internal/bit_ops.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/reducer.h> #include <botan/internal/primality.h> #include <algorithm> diff --git a/src/lib/math/numbertheory/mod_inv.cpp b/src/lib/math/numbertheory/mod_inv.cpp index ec3bb33f0..b7c6f2b1e 100644 --- a/src/lib/math/numbertheory/mod_inv.cpp +++ b/src/lib/math/numbertheory/mod_inv.cpp @@ -5,7 +5,7 @@ */ #include <botan/numthry.h> -#include <botan/divide.h> +#include <botan/internal/divide.h> #include <botan/internal/ct_utils.h> #include <botan/internal/mp_core.h> #include <botan/internal/rounding.h> diff --git a/src/lib/math/numbertheory/monty.cpp b/src/lib/math/numbertheory/monty.cpp index ca5eb73df..40cee2986 100644 --- a/src/lib/math/numbertheory/monty.cpp +++ b/src/lib/math/numbertheory/monty.cpp @@ -4,7 +4,7 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include <botan/monty.h> +#include <botan/internal/monty.h> #include <botan/reducer.h> #include <botan/internal/mp_core.h> diff --git a/src/lib/math/numbertheory/monty_exp.cpp b/src/lib/math/numbertheory/monty_exp.cpp index 02ae795cd..cbf17d180 100644 --- a/src/lib/math/numbertheory/monty_exp.cpp +++ b/src/lib/math/numbertheory/monty_exp.cpp @@ -11,7 +11,7 @@ #include <botan/internal/rounding.h> #include <botan/numthry.h> #include <botan/reducer.h> -#include <botan/monty.h> +#include <botan/internal/monty.h> namespace Botan { diff --git a/src/lib/math/numbertheory/nistp_redc.cpp b/src/lib/math/numbertheory/nistp_redc.cpp index 7f5ff18b9..0f570d763 100644 --- a/src/lib/math/numbertheory/nistp_redc.cpp +++ b/src/lib/math/numbertheory/nistp_redc.cpp @@ -5,7 +5,7 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include <botan/curve_nistp.h> +#include <botan/internal/curve_nistp.h> #include <botan/internal/mp_core.h> #include <botan/internal/mp_asmi.h> #include <botan/internal/ct_utils.h> diff --git a/src/lib/math/numbertheory/numthry.cpp b/src/lib/math/numbertheory/numthry.cpp index 06d837801..f8e1ae8d9 100644 --- a/src/lib/math/numbertheory/numthry.cpp +++ b/src/lib/math/numbertheory/numthry.cpp @@ -7,8 +7,8 @@ #include <botan/numthry.h> #include <botan/reducer.h> -#include <botan/monty.h> -#include <botan/divide.h> +#include <botan/internal/monty.h> +#include <botan/internal/divide.h> #include <botan/rng.h> #include <botan/internal/ct_utils.h> #include <botan/internal/mp_core.h> diff --git a/src/lib/math/numbertheory/pow_mod.cpp b/src/lib/math/numbertheory/pow_mod.cpp index 7b38fad1d..5e94fe586 100644 --- a/src/lib/math/numbertheory/pow_mod.cpp +++ b/src/lib/math/numbertheory/pow_mod.cpp @@ -6,10 +6,10 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include <botan/pow_mod.h> +#include <botan/internal/pow_mod.h> #include <botan/numthry.h> #include <botan/reducer.h> -#include <botan/monty.h> +#include <botan/internal/monty.h> #include <botan/internal/monty_exp.h> #include <botan/internal/rounding.h> #include <vector> diff --git a/src/lib/math/numbertheory/pow_mod.h b/src/lib/math/numbertheory/pow_mod.h index b465013e5..5581752ea 100644 --- a/src/lib/math/numbertheory/pow_mod.h +++ b/src/lib/math/numbertheory/pow_mod.h @@ -10,8 +10,6 @@ #include <botan/bigint.h> -BOTAN_FUTURE_INTERNAL_HEADER(pow_mod.h) - namespace Botan { class Modular_Exponentiator; @@ -19,7 +17,7 @@ class Modular_Exponentiator; /** * Modular Exponentiator Proxy */ -class BOTAN_PUBLIC_API(2,0) Power_Mod +class BOTAN_TEST_API Power_Mod { public: @@ -88,7 +86,7 @@ class BOTAN_PUBLIC_API(2,0) Power_Mod /** * Fixed Exponent Modular Exponentiator Proxy */ -class BOTAN_PUBLIC_API(2,0) Fixed_Exponent_Power_Mod final : public Power_Mod +class Fixed_Exponent_Power_Mod final : public Power_Mod { public: BigInt operator()(const BigInt& b) const @@ -104,7 +102,7 @@ class BOTAN_PUBLIC_API(2,0) Fixed_Exponent_Power_Mod final : public Power_Mod /** * Fixed Base Modular Exponentiator Proxy */ -class BOTAN_PUBLIC_API(2,0) Fixed_Base_Power_Mod final : public Power_Mod +class Fixed_Base_Power_Mod final : public Power_Mod { public: BigInt operator()(const BigInt& e) const diff --git a/src/lib/math/numbertheory/primality.cpp b/src/lib/math/numbertheory/primality.cpp index eb2be42b1..eb2a8b69f 100644 --- a/src/lib/math/numbertheory/primality.cpp +++ b/src/lib/math/numbertheory/primality.cpp @@ -7,7 +7,7 @@ #include <botan/internal/primality.h> #include <botan/internal/monty_exp.h> #include <botan/bigint.h> -#include <botan/monty.h> +#include <botan/internal/monty.h> #include <botan/reducer.h> #include <botan/rng.h> #include <algorithm> diff --git a/src/lib/math/numbertheory/reducer.cpp b/src/lib/math/numbertheory/reducer.cpp index deb3874d3..3bed4fb67 100644 --- a/src/lib/math/numbertheory/reducer.cpp +++ b/src/lib/math/numbertheory/reducer.cpp @@ -8,7 +8,7 @@ #include <botan/reducer.h> #include <botan/internal/ct_utils.h> #include <botan/internal/mp_core.h> -#include <botan/divide.h> +#include <botan/internal/divide.h> namespace Botan { |