-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elliptic-curve: make ScalarBytes<C> the SecretKey<C> internal repr
Previously SecretKey<C> had a generic internal value, depending on whether or not the `arithmetic` feature was activated. This was mostly trying to work around the fact that there wasn't a baseline arithmetic impl available to validate secret keys. Now there is! SecretBytes<C> uses C::UInt and its may features as a `crypto-bigint` to always validate the internal bytes. This means we can simply use `SecretBytes<C>` as the inner value of a `SecretKey<C>`, and still provide infallible conversions to `NonZeroScalar<C>`.
- Loading branch information
Showing
7 changed files
with
94 additions
and
139 deletions.
There are no files selected for viewing
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 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
Oops, something went wrong.