[mainnet] Add signing/verifying Aleo values#38
Open
Meshiest wants to merge 1 commit intoProvableHQ:mainnetfrom
Open
[mainnet] Add signing/verifying Aleo values#38Meshiest wants to merge 1 commit intoProvableHQ:mainnetfrom
Meshiest wants to merge 1 commit intoProvableHQ:mainnetfrom
Conversation
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.
Same as #37 but for mainnet
Description
Signing/verifying aleo values is present in the snarkOS CLI and the leo CLI. Verification is present in leo.
As Aleo does not natively support byte-encoded messages, this feature is necessary for generating signatures programmatically for Aleo/Leo programs. The original
signandverifyfunctions have not been altered for backwards compatibility.Features
This PR add the following functions (where
5fieldis a valid Aleo valueAccount.sign_value("5field")Account.verify_value(Signature, "5field")Signature.sign_value(PrivateKey, "5field")Signature.verify_value(Address, "5field")PrivateKey.sign_value("5field")These functions automatically convert the string value into an Aleo value, then the Aleo value into Fields, which can be signed/verified natively. This is in part to bring parity closer to the CLI implementations, but also so a
Valuewould not need to be constructed for every sign/verify.Docs & Testing
Docs were updated to include a copy of the sign/verify function usage, but with
sign_valueandverify_value. Tests were also updated to include the new functions.Validation
Signatures produced by this code have additionally been tested against the following program on Leo Playground:
Signature generation: