Skip to content
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

Allow specifying the hash function to be used in EDDSA signature verification. #3642

Closed
TomAFrench opened this issue Nov 30, 2023 · 1 comment · Fixed by #4440
Closed

Allow specifying the hash function to be used in EDDSA signature verification. #3642

TomAFrench opened this issue Nov 30, 2023 · 1 comment · Fixed by #4440
Assignees
Labels
enhancement New feature or request

Comments

@TomAFrench
Copy link
Member

Problem

Looking at https://github.com/iden3/circomlib/tree/master we can see that they expose multiple different flavours of EDDSA with different hash functions used. If Noir users wish to use a different hash function in their EDDSA algorithm however they would need to vendor the entire EDDSA verification algorithm.

Happy Case

We should expose a generic EDDSA verification function from the stdlib which allows a custom hash function to be used, eddsa_verify.

We can also provide some functions similar to the current eddsa_poseidon_verify which specify common hash functions is to be used.

Alternatives Considered

We could accept this limitation and perform these changes in an external library in pursuit of #1258

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@TomAFrench TomAFrench added the enhancement New feature or request label Nov 30, 2023
@kevaundray kevaundray added this to the 0.25 milestone Jan 15, 2024
@kevaundray
Copy link
Contributor

This can be done easier now that we have traits

@Savio-Sou Savio-Sou modified the milestones: 0.25, 1.0 Implementation Feb 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 8, 2024
# Description

## Problem\*

Resolves #3642 

## Summary\*

Eddsa verification takes now a hasher so that it can be used with
anything having the Hasher trait.
I added this trait to the stdlib implementations of mimc, poseidon and
poseidon2.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [X] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [X] I have tested the changes locally.
- [X] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants