malb / lattice-estimator

An attempt at a new LWE estimator
215 stars 49 forks source link

fix(log): bypass ValueError #129

Open bencrts opened 1 week ago

bencrts commented 1 week ago

Fixes #128

The sage.all.log() function does not throw the same error found in math.log(), so can be used as a bypass. However, it's much slower (~50x in some cases) so I did not just directly swap it out.

It's a bit unsatisfactory, though, but it works.

bencrts commented 1 week ago

After the fix:

sage: est = LWE.primal_bdd(param, red_cost_model = classic_model)
sage: est
rop: ≈2^135.2, red: ≈2^127.9, svp: ≈2^135.2, β: 317, η: 408, d: 261595, tag: bdd
bencrts commented 1 week ago

If there's any suggestion on a better way to handle it, let me know

malb commented 6 days ago

Is the consensus we should merge this or is there another way?