8#include <botan/internal/blinding.h>
18 m_fwd_fn(std::move(fwd)),
19 m_inv_fn(std::move(inv)),
20 m_modulus_bits(modulus.bits()),
24 const BigInt k = blinding_nonce();
29BigInt Blinder::blinding_nonce()
const {
30 return BigInt(m_rng, m_modulus_bits - 1);
41 const BigInt k = blinding_nonce();
46 m_e = m_reducer.
square(m_e);
47 m_d = m_reducer.
square(m_d);
55 throw Invalid_State(
"Blinder not initialized, cannot unblind");
BigInt blind(const BigInt &x) const
Blinder(const BigInt &modulus, RandomNumberGenerator &rng, std::function< BigInt(const BigInt &)> fwd_func, std::function< BigInt(const BigInt &)> inv_func)
BigInt unblind(const BigInt &x) const
BigInt square(const BigInt &x) const
BigInt multiply(const BigInt &x, const BigInt &y) const
#define BOTAN_BLINDING_REINIT_INTERVAL