-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ecdsa: add hazmat primitives; remove/reverse curve deps
Adds "hazmat" ECDSA signing and verification traits intended to be implemented by individual elliptic curve implementations: - `SignPrimitive`: intended to be implemented on `Scalar` - `VerifyPrimitive`: intended to be implemented on `AffinePoint` The traits are generic over elliptic curves, allowing one type to potentially support multiple curves. This is potentially useful for things like FFI bindings to multi-curve libraries, or host libraries for hardware devices which support ECDSA signing for multiple elliptic curves. These traits must be consumed directly by elliptic curve implementations, which means we need to reverse the current relationship where the `ecdsa` crate has optional features for `k256`, `p256`, and `p384`. Instead, we can add an `ecdsa` feature to the `k256`, `p256`, and `p384` crates which optionally pulls this crate in. With the dependency relationship reversed, we can support an open ended number of elliptic curves including 3rd party non-RustCrypto implementations (as well as 3rd party ECDSA implementations ala afforementioned hardware tokens). This allows the `ecdsa` crate to focus on only the high-level details of the ECDSA algorithm, like RFC 6979 deterministic signatures. It also allows for wrapping complete ECDSA implementations, including assembly optimized ECDSA primitives or things like hardware accelerators.
- Loading branch information
Showing
18 changed files
with
101 additions
and
675 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.