-
Notifications
You must be signed in to change notification settings - Fork 219
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
Add EdDSA verification to standard library #1109
Comments
Circom's implementation multiples various expressions by 8. Any idea why this was necessary?
Not all implementations seem to do this. E.g. |
Because Edwards curves has a cofactor of 8, so we need to multiply by 8 to ensure that the point is in the prime order subgroup |
So if I understand, any group element in this expression should be multiplied by 8 to map it into the sub group. Why isn't the pub key also multiplied by 8 before it is hashed? |
The rationale should be in the specs -- For now, lets just re-implement this in Noir so that it is interopable. |
This work is being parked due to the following blockers:
|
Broken impl for reference: #1136 |
I was able to reduce the circuit size of a single ec mul to 20k. Most of the constraints were coming from the custom Here are the changes: Had to fix some bugs along the way in the Let me know what's the best way to get this merged. Should I just open a PR? |
This is amazing. A PR with the fix would be great, @guipublic will take a look next week. |
Problem
Signature verification is an important building block for many protocols. The most popular in this domain being EcDSA. One problem with EcDSA is that it is not deterministic and so it is not suitable for usecases where one would want to use the signature as a nullifier.
Proposed solution
EdDSA is a suitable alternative for this, moreover it is the alternative is the circomlib that many folks who are using circom will default to.
A link to EdDSA is here: https://github.com/iden3/circomlib/blob/master/circuits/eddsaposeidon.circom
Since we already have poseidon and Twisted edwards curve logic in our stdlib, we can implement the above by composing those two algorithms like in the circom library.
Alternatives considered
No response
Additional context
No response
Submission Checklist
The text was updated successfully, but these errors were encountered: