aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/numbertheory/powm_fw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/numbertheory/powm_fw.cpp')
-rw-r--r--src/math/numbertheory/powm_fw.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/math/numbertheory/powm_fw.cpp b/src/math/numbertheory/powm_fw.cpp
index 68dabc332..afc53f233 100644
--- a/src/math/numbertheory/powm_fw.cpp
+++ b/src/math/numbertheory/powm_fw.cpp
@@ -28,7 +28,7 @@ void Fixed_Window_Exponentiator::set_base(const BigInt& base)
g.resize((1 << window_bits) - 1);
g[0] = base;
- for(u32bit j = 1; j != g.size(); ++j)
+ for(size_t j = 1; j != g.size(); ++j)
g[j] = reducer.multiply(g[j-1], g[0]);
}
@@ -37,15 +37,15 @@ void Fixed_Window_Exponentiator::set_base(const BigInt& base)
*/
BigInt Fixed_Window_Exponentiator::execute() const
{
- const u32bit exp_nibbles = (exp.bits() + window_bits - 1) / window_bits;
+ const size_t exp_nibbles = (exp.bits() + window_bits - 1) / window_bits;
BigInt x = 1;
- for(u32bit j = exp_nibbles; j > 0; --j)
+ for(size_t j = exp_nibbles; j > 0; --j)
{
- for(u32bit k = 0; k != window_bits; ++k)
+ for(size_t k = 0; k != window_bits; ++k)
x = reducer.square(x);
- u32bit nibble = exp.get_substring(window_bits*(j-1), window_bits);
+ size_t nibble = exp.get_substring(window_bits*(j-1), window_bits);
if(nibble)
x = reducer.multiply(x, g[nibble-1]);
}