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

p256: use a 4-bit window for scalar multiplication #563

Merged
merged 3 commits into from May 25, 2022
Merged

p256: use a 4-bit window for scalar multiplication #563

merged 3 commits into from May 25, 2022

Conversation

jedisct1
Copy link
Contributor

Immediately improves performance even on a variable base:

  • 35% faster on x86_64
  • 37% faster on M1
  • 37% faster on WebAssembly (Wasmtime)
  • 39% faster on WebAssembly (Wasmedge)

Immediately improves performance even on a variable base:

- 35% faster on x86_64
- 37% faster on M1
- 37% faster on WebAssembly (Wasmtime)
- 39% faster on WebAssembly (Wasmedge)
@tarcieri
Copy link
Member

Thanks! Impressive performance improvement

Co-authored-by: Tony Arcieri <bascule@gmail.com>
@tarcieri tarcieri merged commit 2e65d12 into RustCrypto:master May 25, 2022
@jedisct1 jedisct1 deleted the p256-window branch May 25, 2022 21:59
tarcieri added a commit that referenced this pull request May 26, 2022
Imports an MVP arithmetic implementation from:

https://github.com/jedisct1/rust-p384

This includes the following:

- Addition formulas from Renes-Costello-Batina 2015, adapted from
  @str4d's implementation in the `p256` crate
- `FieldElement::{invert, sqrt}` implementations
- `Scalar::{invert, sqrt}` implementations
- Scalar field implementation generated using fiat-crypto
- Scalar multiplication using 4-bit window ala #563
- Point compaction support
tarcieri added a commit that referenced this pull request May 26, 2022
Imports an MVP arithmetic implementation from:

https://github.com/jedisct1/rust-p384

This includes the following:

- Addition formulas from Renes-Costello-Batina 2015, adapted from
  @str4d's implementation in the `p256` crate
- `FieldElement::{invert, sqrt}` implementations
- `Scalar::{invert, sqrt}` implementations
- Scalar field implementation generated using fiat-crypto
- Scalar multiplication using 4-bit window ala #563
- Point compaction support
- ECDH support using generic implementation from `elliptic-curve`
- ECDSA support using generic implementation from the `ecdsa` crate
tarcieri added a commit that referenced this pull request May 26, 2022
Imports an MVP arithmetic implementation from:

https://github.com/jedisct1/rust-p384

This includes the following:

- Addition formulas from Renes-Costello-Batina 2015, adapted from
  @str4d's implementation in the `p256` crate
- `FieldElement::{invert, sqrt}` implementations
- `Scalar::{invert, sqrt}` implementations
- Scalar field implementation generated using fiat-crypto
- Scalar multiplication using 4-bit window ala #563
- Point compaction support
- ECDH support using generic implementation from `elliptic-curve`
- ECDSA support using generic implementation from the `ecdsa` crate
@tarcieri tarcieri mentioned this pull request Jun 3, 2022
@tarcieri tarcieri mentioned this pull request Jun 12, 2022
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.

None yet

2 participants