Add Keypair::from_bytes()#20
Open
json420 wants to merge 10 commits into
Open
Conversation
Author
|
Oh, sorry about the noise in Cargo.toml. The change was needed to get it working on recent cargo versions. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'd like to add a Keypair::from_bytes() method modeled after ed25519_dalek::SigningKey::from_bytes():
https://docs.rs/ed25519-dalek/latest/ed25519_dalek/struct.SigningKey.html#method.from_bytes
This seems to be pretty standard API for most Public Key crypto libraries. Very useful for Know Answer Tests at the protocol level. Can be handy when integrating with specialized random number hardware. And in my particular case, I really need to provide the entropy because I'm doing application level entropy accumulation at each signature (and switching to a new keypair at each signature):
https://github.com/zebrafactory/zebrachain
I've tested this on Pop!_OS against Rust nightly, beta, and stable. It's also been tested via my GitHub test runs for ZebraChain against Rust stable on Ubuntu, MacOS, and Windows.
Thanks for your great pure Rust implementations of Dilithium and sphincsplus!
Have an awesome day!