Skip to content

Commit

Permalink
Merge pull request #103 from malb/issue102
Browse files Browse the repository at this point in the history
fix issue 102
  • Loading branch information
malb committed Feb 27, 2024
2 parents f9fad50 + a7e52bb commit 00ec72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion estimator/lwe_primal.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def gaussian_heuristic_log_input(r):
for i, _ in enumerate(r):
# chosen since RC.ADPS16(1754, 1754).log(2.) = 512.168000000000
j = d - 1754 + i
if gaussian_heuristic_log_input(r[j:]) < D.stddev**2 * (d - j):
if (j < d) and (gaussian_heuristic_log_input(r[j:]) < D.stddev**2 * (d - j)):
return ZZ(d - (j - 1))
return ZZ(2)

Expand Down

0 comments on commit 00ec72c

Please sign in to comment.