-
Notifications
You must be signed in to change notification settings - Fork 168
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
ecdsa::hazmat::DigestPrimitive is not implemented for Secp256k1 #189
Comments
You need to enable the (I see this is not documented at the moment) |
I might do a follow-up release that enables It was removed as some users may only care about other digest functions (e.g. |
Thanks! Not enabling it as part of the What is actually confusing is the fact that the |
Is that intentional? |
I can gate those on the |
Yep, gating them would be useful, especially since the Rust error message doesn't really help understand the root cause. |
That looks like an oversight |
Here's a PR to gate the |
Looking good, thank you! |
Will cut another release with these changes soon. |
When I try using the Basically I want to generate an Ethereum-friendly signature, which is keccak256. Any advice? |
I resolved the issue by adding the following to #[cfg(all(feature = "ecdsa", feature = "keccak256"))]
impl ecdsa_core::hazmat::DigestPrimitive for Secp256k1 {
type Digest = sha3::Keccak256;
} |
As noted in #269, I think you want |
Hi,
Since version 0.5, Secp256k1 signatures cannot be created nor verified due to
DigestPrimitive
not being implemented.The example code from the documentation fails:
The text was updated successfully, but these errors were encountered: