Comments (14)
As noted in #269, I think you want k256::ecdsa::recoverable::Signature
.
from elliptic-curves.
You need to enable the sha256
feature.
(I see this is not documented at the moment)
from elliptic-curves.
I might do a follow-up release that enables sha256
feature as part of the ecdsa
feature.
It was removed as some users may only care about other digest functions (e.g. keccak256
) but eliminating the superfluous dependency for those users probably isn't worth the confusion it causes.
from elliptic-curves.
Thanks!
Not enabling it as part of the ecdsa
feature is fine. People may also want to use a different sha256
implementation.
What is actually confusing is the fact that the sign()
and verify()
functions are available when the sha256
is not enabled, even though they cannot be used.
from elliptic-curves.
sign_with_rng()
also seems to be gone (not sign_digest_with_rng()
).
Is that intentional?
from elliptic-curves.
I can gate those on the sha256
feature too. That's probably not even a SemVer breaking change, since they're useless without it.
from elliptic-curves.
Yep, gating them would be useful, especially since the Rust error message doesn't really help understand the root cause.
from elliptic-curves.
sign_with_rng() also seems to be gone... Is that intentional?
That looks like an oversight
from elliptic-curves.
Here's a PR to gate the Signer
and Verifier
impls on sha256
: #192
from elliptic-curves.
#193 adds a RandomizedSigner
impl.
@jedisct1 can you try the latest master and see if it resolves your issues?
I'll also add some more documentation around the sha256
feature.
from elliptic-curves.
Looking good, thank you!
from elliptic-curves.
Will cut another release with these changes soon.
from elliptic-curves.
When I try using the keccak256
feature instead of sha256
, I get this same error. Is this intended?
Basically I want to generate an Ethereum-friendly signature, which is keccak256. Any advice?
from elliptic-curves.
I resolved the issue by adding the following to k256/src/ecdsa.rs
#[cfg(all(feature = "ecdsa", feature = "keccak256"))]
impl ecdsa_core::hazmat::DigestPrimitive for Secp256k1 {
type Digest = sha3::Keccak256;
}
from elliptic-curves.
Related Issues (20)
- Update crates to the newtype `fiat-crypto` codegen
- Request: Instructions to reproduce fiat-crypto files HOT 2
- Using ECDSA key pair for ECDH HOT 1
- Prepend the TapSigHash tag when doing k256 Schnorr signatures? HOT 1
- bp256+bp384: tracking issue for `arithmetic` feature HOT 3
- Numerous unused variable cause Rust difficulties HOT 3
- Bug(deps) p521 crate requires ecdsa 16.8 HOT 2
- BIP340 Schnorr should accept arbitrary length messages HOT 6
- p256::Scalar: implement Reduce<U512> HOT 1
- PKCS8: Cannot parse PrivateKey HOT 2
- Asymmetry in default features: only p384 has `ecdh` by default HOT 2
- Poseidon Support for k256 Hash To Curve HOT 1
- Document use with the PKCS#8 HOT 1
- Pre-release of k256 v0.14? HOT 3
- k256: Linear Combanation over Dynamically Allocated Slices
- primeorder 0.13.4 update breaks p384 0.13.0 builds HOT 4
- k256 disrepency in secp256k1 key recover HOT 12
- How to convert a VerifyingKey of type FieldElement10x26 to a FieldElement5x52 type
- k256: v0.13.2 breaking verification HOT 9
- Bitwise operations for scalars HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elliptic-curves.