/[gzz]/manuscripts/Sigs/poss.py
ViewVC logotype

Diff of /manuscripts/Sigs/poss.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by benja, Mon May 19 17:34:43 2003 UTC revision 1.23 by benja, Mon May 19 19:17:39 2003 UTC
# Line 49  def merkle_hashtree(n, S): Line 49  def merkle_hashtree(n, S):
49                  S[7] + n + 1)                  S[7] + n + 1)
50    
51  def key_boosting(N, S):  def key_boosting(N, S):
52        """
53        slightly off because random oracle calls not taken into account
54        """
55      return (S[0] ** N,      return (S[0] ** N,
56              S[1],              S[1],
57              N * (S[2] + S[3]),              N * (S[2] + S[3]),
# Line 59  def key_boosting(N, S): Line 62  def key_boosting(N, S):
62              N * (S[7])              N * (S[7])
63              )              )
64    
65    def key_boosting_real(N, n, h):
66        """
67        key_boosting(N, merkle_hashtree(n, merkleI(h, h)))
68        with random oracle calls taken into account
69        """
70        S = key_boosting(N, merkle_hashtree(n, merkleI(h, h)))
71        bits = h+ceil(log2(h))
72        return (S[0],
73                S[1],
74                S[2],
75                S[3],
76                S[4],
77                S[5] + n*bits,   # assume we store only h bits as privkey
78                                 # and generate first privkey through oracle
79                S[6] + N*n*bits,
80                S[7])
81    
82  def unfract(s):  def unfract(s):
83      if s.__class__ != fraction:      if s.__class__ != fraction:
84          return s          return s

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26