-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime of estimate()
for SEAL parameter set
#57
Comments
Ideally, the estimate would complete in a reasonable amount of time, so I consider this a bug. It might be useful to put things on the deny list to figure out which algorithm is so slow? |
To get it to finish in < 2 mins, I need to skip |
It makes sense to me that the hybrid attacks would be slow for large
|
quadrupling with doubling |
Plus the fact that it is much more expensive than
The best solution might be to seperate |
It looks like the cost comes entirely from the calls to If I run the following script (
via cProfile:
Gives me these results:
So the vast majority of that 53 seconds comes from a few expensive calls to My guess is that this is actually an fpylll problem: it's likely that the actual For example, if I print out the values of
There's probably some work that can be reduced here: for example, fpylll's |
@malb Do you have an opinion on if an amortized gaussian heuristic function should live inside fpylll or the estimator? I'm thinking of a function that essentially takes this loop fragment: lattice-estimator/estimator/lwe_primal.py Lines 265 to 267 in e394b8a
and computes certain repeated costs (e.g the logs of the |
To me this "feels" rather estimator-y, no? Why do you think it might live in FPyLLL? |
Because it's also pretty fpylll-y, no? We'd need to include the logic for computing the Gaussian Heuristic in the estimator. IIRC, the Gaussian Heuristic computation in fpylll leans on a few internal constants (e.g the log volume of a ball) to make things faster. I'm not sure if you'd want to reproduce that in the estimator. |
To me this fits quite naturally here, I'd just "open up" |
When calling
LWE.estimate(SEAL22_32768)
, whereSEAL22_32768
is the largest SEAL parameter set given inschemes
, the program has a very long runtime - I've been running on 4 CPUs (setjobs=32
) for 4 hours, and I haven't seen any estimates, only the following error message:Algorithm <estimator.lwe_bkw.CodedBKW object at ---> on LWEParameters(n=32768, q=4127301024497384737127654569660285988428494734657199391624693039270889863724412964643884811622321780427143710884821317803768340308614730759769835769241715444596770968742227220068214981847081570726751819595399909407406471037121576084674975771617472472542994965871984641, Xs=D(σ=0.82), Xe=D(σ=3.19), m=+Infinity, tag='SEAL22_32768') failed with cannot compute ceil(log(4127301024497384737127654569660285988428494734657199391624693039270889863724412964643884811622321780427143710884821317803768340308614730759769835769241715444596770968742227220068214981847081570726751819595399909407406471037121576084674975771617472472542994965871984641)/log(2)) using 256 bits of precision
For parameters this large, should only
LWE.estimate.rough
be used?The text was updated successfully, but these errors were encountered: