-
Notifications
You must be signed in to change notification settings - Fork 251
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
zcash_primitives: Replace sapling::redjubjub
with redjubjub
crate
#1056
Conversation
As a side-effect, we remove the ability to verify individual transactions with pre-ZIP 216 rules (which we already removed from `zcashd` consensus nodes in zcash/zcash#6000 and zcash/zcash#6399, as all pre-ZIP 216 transactions on mainnet are also valid under ZIP 216).
3878654
to
de1ed21
Compare
binding_signature: auth.sigs.bsk.sign( | ||
&sighash, | ||
&mut rng, | ||
VALUE_COMMITMENT_RANDOMNESS_GENERATOR, | ||
), | ||
binding_signature: auth.sigs.bsk.sign(&mut rng, &sighash), |
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.
There was a bug here previously in that this didn't include key prefixing, because we never implemented that inside our redjubjub
module (as the original RedDSA draft spec lacked it). I should have used the equivalent of the sapling::spend_sig
method here when I added this in #1023 (not that exact method because it also handled re-randomization), but as we haven't cut a release including this API yet, the bug is not in deployed code. The redjubjub
crate includes key prefixing.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1056 +/- ##
==========================================
+ Coverage 70.62% 70.79% +0.16%
==========================================
Files 140 138 -2
Lines 13786 13698 -88
==========================================
- Hits 9737 9698 -39
+ Misses 4049 4000 -49 ☔ View full report in Codecov by Sentry. |
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.
utACK de1ed21
4cbeeb9
to
cb72231
Compare
The Sapling key components specification places more constraints on the values of `ask` and `ak` than general RedJubjub signing and verification keys.
cb72231
to
5ccba3e
Compare
|
f9b4c53
to
ded09f9
Compare
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.
utACK ded09f9
#[derive(Clone, Debug)] | ||
pub struct SpendValidatingKey(redjubjub::VerificationKey<SpendAuth>); | ||
|
||
impl From<&SpendAuthorizingKey> for SpendValidatingKey { |
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.
Please change this to an explicitly named method.
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.
Filed #1056 .
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.
utACK
As a side-effect, we remove the ability to verify individual transactions with pre-ZIP 216 rules (which we already removed from
zcashd
consensus nodes in zcash/zcash#6000 and zcash/zcash#6399, as all pre-ZIP 216 transactions on mainnet and testnet are also valid under ZIP 216).