Crypto-TII/CryptographicEstimators

Clarification in test_sdfq comments

Dioprz opened this issue · 1 comments

Hi,

Working on the SDFqEstimator tests, I stumbled upon this function:

def test_sdfq_LeeBrickell():
"""
Special value test for Lee-Brickell
"""
# we need to subtract the difference of lee brickell
# and p = 1, because p = 2 is not always optimial
ranges = 0.01
n, k, w, q = 256, 128, 64, 251
t1 = log(ISD_COST(n, k, w, q), 2) + log(n, 2) - lee_brickell_correction(k)
A = LeeBrickell(SDFqProblem(n, k, w, q, **params), **params)
t2 = A.time_complexity(p=2)
assert t1 - ranges < t2 < t1 + ranges
n, k, w, q = 961, 771, 48, 31
t1 = log(ISD_COST(n, k, w, q), 2) + log(n, 2) - lee_brickell_correction(k)
A = LeeBrickell(SDFqProblem(n, k, w, q, **params), **params)
t2 = A.time_complexity(**{"p": 2})
assert t1 - ranges < t2 < t1 + ranges

It's clear that we used p=2 instead of p=1 as the comment suggest. Any reason for this change that should be documented? Or can I safely remove this comment ?

As p=2 is hardcoded in the function call, its fine for me to remove it.