-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat: add poseidon-halo2 crate #633
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## poseidon_circomlib #633 +/- ##
======================================================
- Coverage 54.35% 54.16% -0.20%
======================================================
Files 192 194 +2
Lines 20473 20545 +72
======================================================
Hits 11129 11129
- Misses 9344 9416 +72 ☔ 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.
Great stuff!
//! | ||
//! where 1 means "prime field", 0 means "non-negative sbox", 254 is the bitsize | ||
//! of the field, 16 is the Poseidon width (rate + 1), 8 is the number of full | ||
//! rounds, 64 is the number of partial rounds. |
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.
can we also comment on what 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001
is? i believe thats the prime modulus of bn256?
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.
in the upcoming poseidon-circomlib
crate these params will be computed on the fly by scroll-tech's poseidon crate, so we will not have that comment anymore.
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.
@themighty1 gotcha, will this PR be updated to use scroll-tech's implementation?
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.
i'll just close the PR because the new one will be much simpler.
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.
Great stuff!
4797a20
to
b6a7d0e
Compare
Closing this in favor of #670 |
This PR adds the functionality to compute Poseidon hashes for certain input rates needed in AuthDecode.