aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/blinding.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 18:12:16 +0000
committerlloyd <[email protected]>2008-09-29 18:12:16 +0000
commit0d8e9744ef02aba33ddd89c93194ce526f6ff6ee (patch)
treee60064db23397f9a9dc3b847f9c4199be7c7ca0d /src/math/blinding.h
parent26abd45c61294aacdd59fa4763ff1cd78aefbc7c (diff)
Put only the implementation of BigInt in src/bigint, mathematical functions
on top of BigInt go to src/math. Some prototypes were moved in order to complete the split, in particular random_integer() is now a static member of BigInt instead of being a global function, and divide() is in divide.h instead of numthry.h
Diffstat (limited to 'src/math/blinding.h')
-rw-r--r--src/math/blinding.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/math/blinding.h b/src/math/blinding.h
new file mode 100644
index 000000000..958686fb1
--- /dev/null
+++ b/src/math/blinding.h
@@ -0,0 +1,32 @@
+/*************************************************
+* Blinder Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_BLINDER_H__
+#define BOTAN_BLINDER_H__
+
+#include <botan/bigint.h>
+#include <botan/reducer.h>
+
+namespace Botan {
+
+/*************************************************
+* Blinding Function Object *
+*************************************************/
+class BOTAN_DLL Blinder
+ {
+ public:
+ BigInt blind(const BigInt&) const;
+ BigInt unblind(const BigInt&) const;
+
+ Blinder() {}
+ Blinder(const BigInt&, const BigInt&, const BigInt&);
+ private:
+ Modular_Reducer reducer;
+ mutable BigInt e, d;
+ };
+
+}
+
+#endif