From: Daira Hopwood Date: Tue, 25 Feb 2014 01:04:03 +0000 (+0000) Subject: misc/simulators/hashbasedsig.py: the cost of labels was being double-counted. X-Git-Tag: allmydata-tahoe-1.10.1a1~198 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/simplejson/somewhere?a=commitdiff_plain;h=b262f656f4dfe00ca868433dc55217e257b34512;p=tahoe-lafs%2Ftahoe-lafs.git misc/simulators/hashbasedsig.py: the cost of labels was being double-counted. Signed-off-by: Daira Hopwood --- diff --git a/misc/simulators/hashbasedsig.py b/misc/simulators/hashbasedsig.py index 36eed3a0..ea220ddf 100644 --- a/misc/simulators/hashbasedsig.py +++ b/misc/simulators/hashbasedsig.py @@ -177,7 +177,7 @@ def calculate(K, K1, K2, q_max, L_hash, trees): c_D = (n-2)*(B-1) + firstL_max + firstC_max # number of compressions to hash a Winternitz public key - c_W = compressions(n*L_hash + L_label) + c_W = compressions(n*L_hash) # bitlength of a single Winternitz signature and authentication path L_MW = (n + h_M ) * L_hash @@ -242,8 +242,8 @@ def search(): # find optimal Merkle tree shapes for this L_hash and each K trees = {} K_max = 50 - c2 = compressions(2*L_hash + L_label) - c3 = compressions(3*L_hash + L_label) + c2 = compressions(2*L_hash) + c3 = compressions(3*L_hash) for dau in xrange(0, 10): a = pow(2, dau) for tri in xrange(0, ceil_log(30-dau, 3)):