aboutsummaryrefslogtreecommitdiff
path: root/rsa.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-10-03 13:00:14 +0200
committertomsmeding <tom.smeding@gmail.com>2016-10-03 13:00:14 +0200
commit2bf5effe95641667a1ed51c04eff7760f6a42ef4 (patch)
treeee02ed7d87ebcfae07ac1e69017d6edced3ed386 /rsa.h
Initial
Diffstat (limited to 'rsa.h')
-rw-r--r--rsa.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/rsa.h b/rsa.h
new file mode 100644
index 0000000..ec3c349
--- /dev/null
+++ b/rsa.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "bigint.h"
+
+struct PublicKey{
+ Bigint mod,exp;
+};
+
+struct PrivateKey{
+ PublicKey pub;
+ Bigint pexp;
+};
+
+Bigint encrypt(const PublicKey&,Bigint);
+Bigint decrypt(const PrivateKey&,Bigint);