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

perf: faster GLV scalar decomposition #213

Merged
merged 1 commit into from
Jun 22, 2022
Merged

perf: faster GLV scalar decomposition #213

merged 1 commit into from
Jun 22, 2022

Conversation

yelhousni
Copy link
Collaborator

This replaces the Babai rounding at runtime in SplitScalar() by a right-shift. We precompute b=2^m*v/d (m > log2(d)) and then at runtime compute scalar*b/2^m. This increases the bounds on sub-scalars by 1 which we check at runtime before increasing the loop size (we don't target constant-timeness). m is chosen to be a machine word twice big than log2(d) so that we rarely increase the loop size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants