First part: RSA CRT versus RSA std.
[crypto_lab3.git] / src / RsaStd.h
diff --git a/src/RsaStd.h b/src/RsaStd.h
new file mode 100644 (file)
index 0000000..ea348bf
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef RSASTD_H
+#define RSASTD_H
+
+#include <utility>
+#include <gmpxx.h>
+
+#include "Rsa.h"
+
+class RsaStd
+{
+public:
+   struct KeyPriv {
+      mpz_class n;
+      mpz_class d;
+   };
+
+   static std::pair<Rsa::KeyPub, KeyPriv> generateRSAKeys(uint exponent, uint keySizeBits);
+
+   static mpz_class sign(const mpz_class& m, const KeyPriv& kPriv);
+};
+
+#endif