[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Try generating RSA with different values for e



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.seul.org:/tmp/cvs-serv11106/minion/lib/mixminion

Modified Files:
	benchmark.py 
Log Message:
Try generating RSA with different values for e

Index: benchmark.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/benchmark.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- benchmark.py	25 Aug 2002 03:48:48 -0000	1.9
+++ benchmark.py	13 Oct 2002 18:44:51 -0000	1.10
@@ -212,6 +212,26 @@
     print "Pad+RSA private decrypt", \
           timeit((lambda enc=enc,rsa=rsa: pk_decrypt(enc, rsa)),100)
 
+
+    print "RSA generate (1024 bit,e=65535)", timeit((lambda: pk_generate(1024,
+                                                                  65535)),10)
+    rsa = pk_generate()
+    print "Pad+RSA public encrypt",
+    print timeit((lambda rsa=rsa: pk_encrypt(s70b, rsa)),1000)
+    enc = pk_encrypt(s70b, rsa)
+    print "Pad+RSA private decrypt", \
+          timeit((lambda enc=enc,rsa=rsa: pk_decrypt(enc, rsa)),100)
+
+    print "RSA generate (1024 bit,e=3)", timeit((lambda: pk_generate(1024,
+                                                                  3)),10)
+    rsa = pk_generate()
+    print "Pad+RSA public encrypt",
+    print timeit((lambda rsa=rsa: pk_encrypt(s70b, rsa)),1000)
+    enc = pk_encrypt(s70b, rsa)
+    print "Pad+RSA private decrypt", \
+          timeit((lambda enc=enc,rsa=rsa: pk_decrypt(enc, rsa)),100)
+
+
     for (bits,it) in ((2048,10),(4096,10)):
         t = time()
 	print "[generating key...]"