|
Botan 3.10.0
Crypto and TLS for C&
|
#include <mp_core.h>
Public Member Functions | |
| constexpr | divide_precomp (W divisor) |
| constexpr W | vartime_div_2to1 (W n1, W n0) const |
| constexpr W | vartime_mod_2to1 (W n1, W n0) const |
Setup for variable-time word level division/modulo operations
Currently this just uses the compiler's support for a 2/1 word division, but likely could be improved by precomputed values based on the divisor, for example using the approaches outlined in Hacker's Delight chapter 10.
|
inlineexplicitconstexpr |
Definition at line 541 of file mp_core.h.
References BOTAN_ARG_CHECK.
|
inlineconstexpr |
Definition at line 548 of file mp_core.h.
References BOTAN_ASSERT_NOMSG.
Referenced by Botan::vartime_divide(), Botan::vartime_divide_pow2k(), and vartime_mod_2to1().
|
inlineconstexpr |
Definition at line 602 of file mp_core.h.
References BOTAN_ASSERT_NOMSG, Botan::carry(), vartime_div_2to1(), and Botan::word_madd2().
Referenced by Botan::operator%(), and Botan::BigInt::operator%=().