Skip to content
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

Refactor BKZ 2.0 simulator #279

Merged
merged 2 commits into from
Dec 2, 2024
Merged

Refactor BKZ 2.0 simulator #279

merged 2 commits into from
Dec 2, 2024

Conversation

ludopulles
Copy link
Contributor

By modifying the Chen--Nguyen'11 simulator to not compute the sum in each iteration, but instead keep track of the volume of a block of the basis, this code is shorter (I hope more readable) and ~8x faster. Moreover, add a log_simulator method, which works on the log2(sqrt(squared GS)) norms, which is used in the lattice-estimator (see discussion in malb/lattice-estimator#128 ).

The documentation suggests that the code yields the exact same answers.

Also, normalized "EXAMPLE::" as there were some files having a space, and bkz_simulator.py had a single colon so the code may not have been checked in CI (an import was missing for average_simulator_prob).

Keep track of the log(projected sublattice volume) using sliding window techniques.
Also, make a version that simulates the evolving of log2(||b_i*||), to be used in:
https://github.com/malb/lattice-estimator/

When going to the next SVP block there are 2 changes:
- the current (updated!) basis vector is removed,
- if not at the end, add log2 ||b_f*||.

Also, seems like early-termination is practically never triggered (?)
@malb
Copy link
Collaborator

malb commented Dec 2, 2024

Ace!

@malb malb merged commit dada2f9 into fplll:master Dec 2, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants