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

crypto: verify sig should be more specific #64

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

emturner
Copy link
Collaborator

@emturner emturner commented Jan 3, 2024

we update verify_sig impls to require the specific signature type for the key being used.

To ease use with Signature enum, we provide TryFrom<Signature> for <SigType> impls.

Closes #52

NB this does slightly the opposite of what was requested in #52. It's addressed, however, as it is much easier now to convert too the correct signature type, to pass through.

The corresponding PublicKey type in the SDK, will be able to use this to greater effect, and can indeed receive the more general Signature type.

This layout/structure is more in-line with the signature module provided in octez/tezos_crypto.

@emturner emturner force-pushed the emturner@crypto-verify-sig-should-be branch 2 times, most recently from 1b850a3 to 661432c Compare January 3, 2024 15:25
@emturner emturner force-pushed the emturner@crypto-verify-sig-should-be branch from 661432c to 8f5744c Compare January 3, 2024 15:27
@vapourismo vapourismo self-requested a review January 3, 2024 15:36
crypto/src/hash.rs Show resolved Hide resolved
crypto/src/signature.rs Show resolved Hide resolved
@emturner emturner requested a review from vapourismo January 4, 2024 14:31
crypto/src/signature.rs Show resolved Hide resolved
@emturner emturner merged commit 79ee1cf into master Jan 4, 2024
7 checks passed
@emturner emturner deleted the emturner@crypto-verify-sig-should-be branch January 4, 2024 15:33
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.

PublicKeySignatureVerifier::verify_signature input signature type is too strict
2 participants