Skip to content

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

@FiloSottile

Description

@FiloSottile

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions