-
Notifications
You must be signed in to change notification settings - Fork 157
rfc6979
: replace Digest
requirement with EagerHash
#1076
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
rfc6979
: replace Digest
requirement with EagerHash
#1076
Conversation
9765151
to
f0ccd6c
Compare
50564db
to
40b250b
Compare
40b250b
to
4f9a6fe
Compare
arithmetic = ["dep:hmac", "dep:rfc6979", "elliptic-curve/arithmetic"] | ||
algorithm = ["dep:rfc6979", "arithmetic", "digest", "hazmat"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe these could be consolidated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to do this here or in a follow-up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followup is fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with this as is, curious about also consolidating arithmetic
and algorithm
though
Originally added in RustCrypto/MACs#151 The situation is `ecdsa` has a trait for the "default" hash function to use for a particular curve, which we want to work with RFC6979 and ergo HMAC, so we would like to use an `EagerHash` bound. But `rfc6979` is an optional dependency, so we can't depend on its transitive accessibility to `rfc6979::hmac`. This PR added `hmac` as a dependency gated on the `digest` feature of `ecdsa`: RustCrypto/signatures#1076 But as I was looking at `EagerHash` I noticed there's nothing HMAC-specific about it at all and it can easily be moved to `digest`, so we're able to use it in bounds without any other dependencies besides `digest`, which would be nice.
Originally added in RustCrypto/MACs#151 The situation is `ecdsa` has a trait for the "default" hash function to use for a particular curve, which we want to work with RFC6979 and ergo HMAC, so we would like to use an `EagerHash` bound. But `rfc6979` is an optional dependency, so we can't depend on its transitive accessibility to `rfc6979::hmac`. This PR added `hmac` as a dependency gated on the `digest` feature of `ecdsa`: RustCrypto/signatures#1076 But as I was looking at `EagerHash` I noticed there's nothing HMAC-specific about it at all and it can easily be moved to `digest`, so we're able to use it in bounds without any other dependencies besides `digest`, which would be nice.
This PR replaces the
Digest
requirements ofrfc6979
items withEagerHash
. In the process I merged theecdsa
signing
andverifying
crate features intosignature
.As discussed in RustCrypto/elliptic-curves#1423 (comment).