diff options
Diffstat (limited to 'src/math/numbertheory')
-rw-r--r-- | src/math/numbertheory/info.txt | 15 | ||||
-rw-r--r-- | src/math/numbertheory/mp_numth.cpp | 4 | ||||
-rw-r--r-- | src/math/numbertheory/numthry.cpp | 2 | ||||
-rw-r--r-- | src/math/numbertheory/powm_fw.cpp | 6 | ||||
-rw-r--r-- | src/math/numbertheory/powm_mnt.cpp | 8 | ||||
-rw-r--r-- | src/math/numbertheory/reducer.cpp | 2 |
6 files changed, 20 insertions, 17 deletions
diff --git a/src/math/numbertheory/info.txt b/src/math/numbertheory/info.txt index 527f4fa29..4a3e3436b 100644 --- a/src/math/numbertheory/info.txt +++ b/src/math/numbertheory/info.txt @@ -2,25 +2,28 @@ load_on auto define BIGINT_MATH -<add> -blinding.cpp +<header:public> blinding.h def_powm.h +numthry.h +pow_mod.h +reducer.h +</header:public> + +<source> +blinding.cpp dsa_gen.cpp jacobi.cpp make_prm.cpp mp_numth.cpp numthry.cpp -numthry.h pow_mod.cpp -pow_mod.h powm_fw.cpp powm_mnt.cpp primes.cpp reducer.cpp -reducer.h ressol.cpp -</add> +</source> <requires> algo_factory diff --git a/src/math/numbertheory/mp_numth.cpp b/src/math/numbertheory/mp_numth.cpp index 2cb36b8a3..03eb8d9db 100644 --- a/src/math/numbertheory/mp_numth.cpp +++ b/src/math/numbertheory/mp_numth.cpp @@ -6,8 +6,8 @@ */ #include <botan/numthry.h> -#include <botan/mp_core.h> -#include <botan/rounding.h> +#include <botan/internal/mp_core.h> +#include <botan/internal/rounding.h> #include <algorithm> namespace Botan { diff --git a/src/math/numbertheory/numthry.cpp b/src/math/numbertheory/numthry.cpp index 5e36288ff..42e83fa4a 100644 --- a/src/math/numbertheory/numthry.cpp +++ b/src/math/numbertheory/numthry.cpp @@ -6,7 +6,7 @@ */ #include <botan/numthry.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <algorithm> namespace Botan { diff --git a/src/math/numbertheory/powm_fw.cpp b/src/math/numbertheory/powm_fw.cpp index b764ee7aa..8f39830a7 100644 --- a/src/math/numbertheory/powm_fw.cpp +++ b/src/math/numbertheory/powm_fw.cpp @@ -16,8 +16,8 @@ namespace { /* * Try to choose a good window size */ -u32bit choose_window_bits(u32bit exp_bits, u32bit, - Power_Mod::Usage_Hints hints) +u32bit fw_powm_window_bits(u32bit exp_bits, u32bit, + Power_Mod::Usage_Hints hints) { static const u32bit wsize[][2] = { { 2048, 7 }, { 1024, 6 }, { 256, 5 }, { 128, 4 }, { 64, 3 }, { 0, 0 } @@ -62,7 +62,7 @@ void Fixed_Window_Exponentiator::set_exponent(const BigInt& e) */ void Fixed_Window_Exponentiator::set_base(const BigInt& base) { - window_bits = choose_window_bits(exp.bits(), base.bits(), hints); + window_bits = fw_powm_window_bits(exp.bits(), base.bits(), hints); g.resize((1 << window_bits) - 1); g[0] = base; diff --git a/src/math/numbertheory/powm_mnt.cpp b/src/math/numbertheory/powm_mnt.cpp index e6d8cc3f0..d18081c6a 100644 --- a/src/math/numbertheory/powm_mnt.cpp +++ b/src/math/numbertheory/powm_mnt.cpp @@ -7,7 +7,7 @@ #include <botan/def_powm.h> #include <botan/numthry.h> -#include <botan/mp_core.h> +#include <botan/internal/mp_core.h> namespace Botan { @@ -16,8 +16,8 @@ namespace { /* * Try to choose a good window size */ -u32bit choose_window_bits(u32bit exp_bits, u32bit, - Power_Mod::Usage_Hints hints) +u32bit montgomery_powm_window_bits(u32bit exp_bits, u32bit, + Power_Mod::Usage_Hints hints) { static const u32bit wsize[][2] = { { 2048, 4 }, { 1024, 3 }, { 256, 2 }, { 128, 1 }, { 0, 0 } @@ -76,7 +76,7 @@ void Montgomery_Exponentiator::set_exponent(const BigInt& exp) */ void Montgomery_Exponentiator::set_base(const BigInt& base) { - window_bits = choose_window_bits(exp.bits(), base.bits(), hints); + window_bits = montgomery_powm_window_bits(exp.bits(), base.bits(), hints); g.resize((1 << window_bits) - 1); diff --git a/src/math/numbertheory/reducer.cpp b/src/math/numbertheory/reducer.cpp index fbd675ea6..aa53f1a0e 100644 --- a/src/math/numbertheory/reducer.cpp +++ b/src/math/numbertheory/reducer.cpp @@ -7,7 +7,7 @@ #include <botan/reducer.h> #include <botan/numthry.h> -#include <botan/mp_core.h> +#include <botan/internal/mp_core.h> namespace Botan { |