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

crypto/internal/bigmod: switch to saturated limbs #59463

Closed
Tracked by #57752
FiloSottile opened this issue Apr 6, 2023 · 1 comment
Closed
Tracked by #57752

crypto/internal/bigmod: switch to saturated limbs #59463

FiloSottile opened this issue Apr 6, 2023 · 1 comment
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. Performance release-blocker
Milestone

Comments

@FiloSottile
Copy link
Contributor

Package bigmod uses unsaturated 63-bit limbs because the tradition suggests that's faster, but that might be only true when targeting portable C. With access to add-with-carry instructions, Montgomery multiplication can be much faster with sautrated limbs, and we already have optimized assembly for that in math/big.

Switching bigmod to saturated limbs should allow us to reuse the math/big assembly cores, getting RSA performance back to Go 1.19 levels.

https://go.dev/cl/471259

@FiloSottile FiloSottile added Performance NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Apr 6, 2023
@FiloSottile FiloSottile added this to the Go1.21 milestone Apr 6, 2023
@FiloSottile FiloSottile self-assigned this Apr 6, 2023
@gopherbot
Copy link

Change https://go.dev/cl/471259 mentions this issue: crypto/internal/bigmod: switch to saturated limbs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Performance release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants