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

fix bbjj api: return err when hash fails while sign/verify #57

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

arnaucube
Copy link
Contributor

In the babyjubjub package, when inputting a msg that didn't fit in a finite field element, the poseidon.Hash method was failing due the value not fitting inside the finite field, but the error was not returned and the end user only saw false without knowing why.
Updated the interface of the sign & verify methods so that the error is returned and users can know that the method has failed due the inputted msg not fitting inside the finite field used by the babyjubjub.

This modifies the interface of the babyjubjub package, so will affect other projects/repos using this library, maybe worth doing a new tag/release with this change mentioned in the changelog.

@OBrezhniev
Copy link
Member

Thank you for contributing, Arnau!

@OBrezhniev OBrezhniev changed the base branch from master to develop September 20, 2023 19:43
@OBrezhniev OBrezhniev merged commit 12366f1 into iden3:develop Sep 20, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants