I'm reading the WOTS+ paper, but I'm having some trouble with its notation and specially the involved units. For example, under my interpretation, the parameters n=11
, w=16
and m=256
result in a quantum security level of about 81
bits, with a 992 bytes
signature length, but that looks incorrect.
To the best of my knowledge, I've made the following script to output public key and signature lengths, and security level, for both WOTS+ and WOTS.
WOTS+
import math
n = 16 # security parameter, in bytes
w = 16 # w parameter
m = 256 # message length, in bits
l1 = math.ceil(m / math.log2(w))
l2 = math.floor(math.log2(l1*(w-1))/math.log2(w))+1
l = l1 + l2
# formulas from the paper
pub_len = (l + w - 1) * n + 8 # public key length in bytes
sig_len = l * n # signature length in bytes
sec_lvl = n*8 - math.log2(w*w*l + w) # quantum security level in bits
print("wots+")
print("pub_len: " + str(pub_len))
print("sig_len: " + str(sig_len))
print("sec_lvl: " + str(sec_lvl))
WOTS
import math
n = 256 # security parameter, in bits
w = 16 # bits per signing unit
m = 256 # message length, in bits
l1 = n / w
l2 = math.ceil((math.floor(math.log2(l1))+1+w)/w)
l = l1 + l2
# probably wrong
pub_len = m * l1 / 8 # public key length in bytes
sig_len = m * l / 8 # signature length in bytes
sec_lvl = m / 3 # quantum security level in bits
print("wots")
print("pub_len: " + str(pub_len))
print("sig_len: " + str(sig_len))
print("sec_lvl: " + str(sec_lvl))
Are my calculations correct?