[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] manuscripts/Sigs article.rst poss.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] manuscripts/Sigs article.rst poss.py |
Date: |
Sun, 18 May 2003 02:57:58 -0400 |
CVSROOT: /cvsroot/gzz
Module name: manuscripts
Changes by: Tuomas J. Lukka <address@hidden> 03/05/18 02:57:58
Modified files:
Sigs : article.rst poss.py
Log message:
Findopt
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/Sigs/article.rst.diff?tr1=1.69&tr2=1.70&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/Sigs/poss.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: manuscripts/Sigs/article.rst
diff -u manuscripts/Sigs/article.rst:1.69 manuscripts/Sigs/article.rst:1.70
--- manuscripts/Sigs/article.rst:1.69 Sat May 17 18:20:49 2003
+++ manuscripts/Sigs/article.rst Sun May 18 02:57:58 2003
@@ -239,7 +239,7 @@
& $1$ & $b$ & $kh$ & $h$ & $h$ & $t$ & $?$ & $?+k$ \\
\parbox{\sw}{Bleichenbacher-Maurer\cite{XXX (ASIACRYPT)}
(h, }
- & $
+ & \\
\hline
\multicolumn{4}{l}{\hskip 2cm Derived schemes} \\
\hline
Index: manuscripts/Sigs/poss.py
diff -u manuscripts/Sigs/poss.py:1.1 manuscripts/Sigs/poss.py:1.2
--- manuscripts/Sigs/poss.py:1.1 Sun May 18 02:40:00 2003
+++ manuscripts/Sigs/poss.py Sun May 18 02:57:58 2003
@@ -1,8 +1,10 @@
+from __future__ import nested_scopes
from fractions import fraction
import math
+from math import log, log10, ceil
def lamport(h, b):
- return (1, b, b*h, 2*b*h, h, 2*b*h, 0, b*h)
+ return (1, b, b*h, 2*b*h, h, 2*b, 0, b)
def merkle_winternitz(h, b, n):
return (1, b, fraction(b*h+h*n, n), h, h,
@@ -35,30 +37,64 @@
return s
return s[0] / (0.0 + s[1])
+def log2(x):
+ return log(x) / log(2)
+
def printscheme(S):
S = [unfract(s) for s in S]
- print math.log(S[0]) / math.log(2), S[1], \
+ print log(S[0]) / log(2), S[1], \
S[2]/8, S[3] / 8 , \
- S[4:]
+ S[4], \
+ log(S[5])/log(10), \
+ log(S[6])/log(10), \
+ log(S[7])/log(10)
schemes = []
-if 0:
+if 1:
for t in range(1, 40):
- n = math.ceil(160.0 / t )
- print "\n N = ",t, " n = ", n
+ n = ceil(160.0 / t )
+ #print "\n N = ",t, " n = ", n
- print "MW:"
+ #print "MW:"
+ for mn in range(1,17):
+ s = (key_boosting(t,
+ merkle_hashtree(n,
+ merkle_winternitz(160, 160, mn))))
+ schemes.append( (
+ "KB%(t)sM%(n)sMW(160,160,%(mn)s)" % locals(),
+ s
+ ))
+ #printscheme(s)
+ #print "Lamport:"
s = (key_boosting(t,
merkle_hashtree(n,
- merkle_winternitz(160, 160, 2))))
- printscheme(s)
- print "Lamport:"
- printscheme(key_boosting(t,
- merkle_hashtree(n,
lamport(160, 160))))
+ schemes.append( (
+ "KB%(t)sM%(n)sL(160,160)" % locals(),
+ s
+ ))
+ #printscheme(s)
+
+for criteria in (
+ (1, 0),
+ (1, 10),
+ (1, 100),
+ (1, 1000)):
+ m = None
+ mv = 0
+ def critf(s):
+ return criteria[0] * log2(s[1][2]) + \
+ criteria[1] * log10(sum(s[1][5:]))
+ for s in schemes:
+ if m == None or critf(s)<mv:
+ m = s
+ mv = critf(s)
+ print "For ", criteria, m[0]
+ printscheme(m[1])
-if 1:
+if 0:
+ printscheme(lamport(160,160))
for n in range(1, 17):
- print "\n = ",n
+ print "\nn = ",n
printscheme(merkle_winternitz(160,160,n))
- [Gzz-commits] manuscripts/Sigs article.rst poss.py,
Tuomas J. Lukka <=
- [Gzz-commits] manuscripts/Sigs article.rst poss.py, Tuomas J. Lukka, 2003/05/18
- [Gzz-commits] manuscripts/Sigs article.rst poss.py, Benja Fallenstein, 2003/05/18
- [Gzz-commits] manuscripts/Sigs article.rst poss.py, Benja Fallenstein, 2003/05/18
- [Gzz-commits] manuscripts/Sigs article.rst poss.py, Tuomas J. Lukka, 2003/05/18
- [Gzz-commits] manuscripts/Sigs article.rst poss.py, Tuomas J. Lukka, 2003/05/18
- [Gzz-commits] manuscripts/Sigs article.rst poss.py, Tuomas J. Lukka, 2003/05/19