aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/blinding.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/blinding.h')
-rw-r--r--src/lib/pubkey/blinding.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/pubkey/blinding.h b/src/lib/pubkey/blinding.h
index 1aa7687a9..e57c7888e 100644
--- a/src/lib/pubkey/blinding.h
+++ b/src/lib/pubkey/blinding.h
@@ -10,6 +10,7 @@
#include <botan/bigint.h>
#include <botan/reducer.h>
+#include <functional>
namespace Botan {
@@ -20,25 +21,20 @@ class BOTAN_DLL Blinder
{
public:
BigInt blind(const BigInt& x) const;
+
BigInt unblind(const BigInt& x) const;
- bool initialized() const { return reducer.initialized(); }
+ bool initialized() const { return m_reducer.initialized(); }
Blinder() {}
- /**
- * Construct a blinder
- * @param mask the forward (blinding) mask
- * @param inverse_mask the inverse of mask (depends on algo)
- * @param modulus of the group operations are performed in
- */
- Blinder(const BigInt& mask,
- const BigInt& inverse_mask,
- const BigInt& modulus);
+ Blinder(const BigInt& modulus,
+ std::function<BigInt (const BigInt&)> fwd_func,
+ std::function<BigInt (const BigInt&)> inv_func);
private:
- Modular_Reducer reducer;
- mutable BigInt e, d;
+ Modular_Reducer m_reducer;
+ mutable BigInt m_e, m_d;
};
}