malb/lattice-estimator

hybrid-dual OverflowError for FHE-sized params

Closed this issue · 0 comments

The change to use MATZOV for default for hybrid-dual crashes for FHE-sized params. Running:

from estimator import *
params = LWE.Parameters(n=8192, q=18446744073709551616, Xs=ND.DiscreteGaussian(0.50, -0.50), Xe=ND.DiscreteGaussian(4.00))
model = RC.BDGL16
dual_level = LWE.dual_hybrid(params, red_cost_model = model)
print(dual_level)

gives:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    dual_level = LWE.dual_hybrid(params, red_cost_model = model)
  File "/Users/ben/Desktop/Github/lattice-estimator/estimator/lwe_dual.py", line 656, in __call__
    cost = self.cost(
  File "/Users/ben/Desktop/Github/lattice-estimator/estimator/lwe_dual.py", line 594, in cost
    rho, T_sample, _, beta_sieve = red_cost_model.short_vectors(
  File "/Users/ben/Desktop/Github/lattice-estimator/estimator/reduction.py", line 385, in _short_vectors_sieve
    c = N / floor(2 ** (0.2075 * beta))
OverflowError: (34, 'Result too large')

I think I see why it happens, guess we need some RR()s, will try a fix.