diff options
author | lloyd <[email protected]> | 2009-12-16 02:52:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-12-16 02:52:12 +0000 |
commit | 317b76d71dca1840c9e72f9a26407590719c1423 (patch) | |
tree | 2eb49072e6e27f6ee41e704004aa8689b1e98bb3 /src/math/numbertheory | |
parent | 457ce43934a4e51ead4d21e43013eef9d448d0e1 (diff) | |
parent | 12afeca214c4414a0ced0bc4654d0fc5908dc77b (diff) |
propagate from branch 'net.randombit.botan' (head 744dccf92270cf16b80b50ee2759424c9866b256)
to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
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 { |