Open jdumezy opened 4 months ago
FYI I can't reproduce this error on SageMath 10.4, Python 3.12.5 and commit 1e58f0211dae18b36e1cf978a49be04a2f0d07a0 :
Note: you call Uniform(-1, 1, n)
but n
is not assigned any value in the example you give.
sage: from estimator import *
sage: params = LWE.Parameters(n=2^14, q=2^240, Xs = ND.Uniform(-1,1), Xe=ND.DiscreteGaussian(3.19))
sage: LWE.estimate.rough(params)
usvp :: rop: ≈2^218.4, red: ≈2^218.4, δ: 1.002540, β: 748, d: 31817, tag: usvp
dual_hybrid :: rop: ≈2^217.5, red: ≈2^217.5, guess: ≈2^164.1, β: 745, p: 3, ζ: 0, t: 90, β': 745, N: ≈2^153.6, m: ≈2^14.0
{'usvp': rop: ≈2^218.4, red: ≈2^218.4, δ: 1.002540, β: 748, d: 31817, tag: usvp,
'dual_hybrid': rop: ≈2^217.5, red: ≈2^217.5, guess: ≈2^164.1, β: 745, p: 3, ζ: 0, t: 90, β': 745, N: ≈2^153.6, m: ≈2^14.0}
sage: params = LWE.Parameters(n=2^14, q=2^250, Xs = ND.Uniform(-1,1), Xe=ND.DiscreteGaussian(3.19))
sage: LWE.estimate.rough(params)
usvp :: rop: ≈2^206.7, red: ≈2^206.7, δ: 1.002645, β: 708, d: 31862, tag: usvp
dual_hybrid :: rop: ≈2^205.7, red: ≈2^205.6, guess: ≈2^202.3, β: 704, p: 3, ζ: 20, t: 90, β': 704, N: ≈2^146.0, m: ≈2^14.0
{'usvp': rop: ≈2^206.7, red: ≈2^206.7, δ: 1.002645, β: 708, d: 31862, tag: usvp,
'dual_hybrid': rop: ≈2^205.7, red: ≈2^205.6, guess: ≈2^202.3, β: 704, p: 3, ζ: 20, t: 90, β': 704, N: ≈2^146.0, m: ≈2^14.0}
Description When using the rough LWE estimator for set
n
and distributions, there is a specific range of value ofq
for which either python crashes or it outputs an error.How I encountered the problem In a fresh session of sage (after importing the estimator with
from estimator import *
), I can run the following estimations with no problem:But for values between
2^180
and2^280
there is unexpected behavior. Either an error and some results:Or a crash for values around 260:
OS/specs I am running sage 10.3 (python 3.12.3) on linux with a 13th gen i9 and 32Gb of RAM.
Is this "expected" (wrong choice of parameters?) or isolated behavior? Thanks.