diff options
Diffstat (limited to 'src/lib/math/numbertheory/monty_exp.cpp')
-rw-r--r-- | src/lib/math/numbertheory/monty_exp.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/monty_exp.cpp b/src/lib/math/numbertheory/monty_exp.cpp index 2b5bbd81d..7590005a0 100644 --- a/src/lib/math/numbertheory/monty_exp.cpp +++ b/src/lib/math/numbertheory/monty_exp.cpp @@ -85,10 +85,12 @@ void const_time_lookup(secure_vector<word>& output, BOTAN_ASSERT(vec.size() >= words, "Word size as expected in const_time_lookup"); - const word mask = CT::is_equal<word>(i, nibble); + const auto mask = CT::Mask<word>::is_equal(i, nibble); for(size_t w = 0; w != words; ++w) - output[w] |= (mask & vec[w]); + { + output[w] |= mask.if_set_return(vec[w]); + } } } |