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

Add Booth encoding based variable point multiplication #4627

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

randombit
Copy link
Owner

Improves variable point mul (and ECDH) by around 4-5%

@randombit randombit added this to the Botan 3.8.0 milestone Feb 2, 2025
@coveralls
Copy link

coveralls commented Feb 2, 2025

Coverage Status

coverage: 91.231% (+0.004%) from 91.227%
when pulling 51bcf2a on jack/add-booth-w5-mul
into 623aacd on master.

@randombit
Copy link
Owner Author

This algorithm is based on OpenSSL's nistz_p256, which is at this point (afaict) the last remaining faster EC library. I had expected better speedups, considering, but it seems like the field arithmetic is really the critical thing here. Improving that is left for future work.

The comment here will likely be helpful wrt review.

Improves variable point mul (and ECDH) by around 4-5%
@randombit
Copy link
Owner Author

in theory https://eprint.iacr.org/2013/816.pdf describes the algorithm but it doesn't do a great job of it

@randombit randombit merged commit a4e62a0 into master Feb 7, 2025
39 checks passed
@randombit randombit deleted the jack/add-booth-w5-mul branch February 7, 2025 01:53
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