malb / lattice-estimator

An attempt at a new LWE estimator
219 stars 48 forks source link

Estimation fail caused by β > d for small LWE #87

Closed nindanaoto closed 4 weeks ago

nindanaoto commented 1 year ago

Dear the maintainer,

I'm now trying to estimate the security for small LWE ciphertexts like the following:

param = estimator.lwe_parameters.LWEParameters(
    n=384,
    q=2 ** 7,
    Xs=estimator.nd.NoiseDistribution.UniformMod(2),
    Xe=estimator.nd.NoiseDistribution.CenteredBinomial(8),
    m = 384
)
r = estimator.LWE.estimate(param,red_cost_model = estimator.RC.BDGL16)

This code gives an exception caused by β > d for primal_uvsp and η > d. I know that they are checked by sanity_check in the cost.py. However, I think setting β and η to be β = d and η = d is better than raising the exception. Is there any reason for avoiding such a fix?

This code also raises exceptions for Incorrect bounds for primal_bdd but I'm not sure how to fix this.

ryanleh commented 10 months ago

I had a similar issue (see #93) that was fixed by downgrading Sage to v9.5.

nindanaoto commented 10 months ago

Really? I will try it. Thanks!