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

p384: import arithmetic from jedisct1/rust-p384 #565

Merged
merged 1 commit into from May 26, 2022

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented 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 p256: use a 4-bit window for scalar multiplication #563
  • Point compaction support
  • ECDH support using generic implementation from the elliptic-curve crate
  • ECDSA support using generic implementation from the ecdsa crate

Closes #240

@tarcieri tarcieri force-pushed the p384/import-from-jedisct1-p384_rs branch 6 times, most recently from 60a034d to 7ec3137 Compare May 26, 2022 15:42
@tarcieri tarcieri changed the title [WIP] Import changes from jedisct1/rust-p384 p384: import arithmetic from jedisct1/rust-p384 May 26, 2022
@tarcieri tarcieri marked this pull request as ready for review May 26, 2022 15:43
@tarcieri
Copy link
Member Author

Imported the latest changes from @jedisct1's repo, got all of the tests passing, and wrote a real commit message.

Removed WIP/draft. PTAL.

@tarcieri
Copy link
Member Author

Sidebar: an important next step to this PR is getting the arithmetic working on 32-bit backends, including generating a 32-bit backend for the scalar field

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 force-pushed the p384/import-from-jedisct1-p384_rs branch from 7ec3137 to 4885def Compare May 26, 2022 16:45
@jedisct1
Copy link
Contributor

mit-plv/fiat-crypto#1259 includes the 32-bit backend for the scalar field.

@tarcieri tarcieri merged commit 6ff9f38 into master May 26, 2022
@tarcieri tarcieri deleted the p384/import-from-jedisct1-p384_rs branch May 26, 2022 17:17
@tarcieri
Copy link
Member Author

See #566 for next steps

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.

p384: arithmetic + ECDSA support
3 participants