From b262f656f4dfe00ca868433dc55217e257b34512 Mon Sep 17 00:00:00 2001
From: Daira Hopwood <daira@jacaranda.org>
Date: Tue, 25 Feb 2014 01:04:03 +0000
Subject: [PATCH] misc/simulators/hashbasedsig.py: the cost of labels was being
 double-counted.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---
 misc/simulators/hashbasedsig.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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)):
-- 
2.45.2