aboutsummaryrefslogtreecommitdiff
path: root/flags/make-keys.rsa
diff options
context:
space:
mode:
Diffstat (limited to 'flags/make-keys.rsa')
-rwxr-xr-xflags/make-keys.rsa11
1 files changed, 11 insertions, 0 deletions
diff --git a/flags/make-keys.rsa b/flags/make-keys.rsa
new file mode 100755
index 0000000..e6fba64
--- /dev/null
+++ b/flags/make-keys.rsa
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+from Crypto.PublicKey import RSA
+import pickle
+
+keys = {}
+keys['Alice'] = RSA.generate(1024)
+keys['Bob'] = RSA.generate(1024).publickey()
+
+with open('rsa.keys', 'w') as f:
+ pickle.dump(keys, f)