-
Notifications
You must be signed in to change notification settings - Fork 242
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
Migrate to bls12_381 and jubjub crates #272
Migrate to bls12_381 and jubjub crates #272
Conversation
Includes tests to ensure that the new generator constants match the current zcash_primitives::JUBJUB generators.
Includes tests to ensure that the new generator constants match the current zcash_primitives::JUBJUB generators.
We now use the jubjub crate for this.
It is replaced by the bls12_381 crate.
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
==========================================
+ Coverage 64.95% 66.07% +1.12%
==========================================
Files 117 101 -16
Lines 16632 13215 -3417
==========================================
- Hits 10803 8732 -2071
+ Misses 5829 4483 -1346
Continue to review full report at Codecov.
|
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. This is leaving the circuit code with a confusing mixture of (x, y) and (u, v) conventions, though. Is the plan to fix that immediately?
/// the curve or in the prime-order subgroup. | ||
/// | ||
/// This should only be used for hard-coding constants (e.g. fixed generators); in all | ||
/// other cases, use [`SubgroupPoint::from_bytes`] instead. |
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.
😿 that we can't use constant evaluation with reasonable compile times. Hopefully that will get better.
Failing that, is the initialization-time overhead of using from_bytes
significant enough to worry about? I would be inclined to just use from_bytes
.
The primitives are no longer generic over a curve; we hard-code Jubjub, so we know that the smallest u-coordinate that is not on the curve is 1.
1280b3e
to
d15acf8
Compare
Likely left over from the Sapling audit.
Post-hoc ACK of the last 5 commits. The (x, y) -> (u, v) renames (and some missing renames to cmu) were done in #276. |
Closes #170. Closes #171.