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

Add check for the message parameter size in the EdDSA Poseidon library #190

Open
cedoor opened this issue Mar 6, 2024 · 2 comments
Open
Assignees
Labels
good first issue Good for newcomers refactoring ♻️ A code change that neither fixes a bug nor adds a feature

Comments

@cedoor
Copy link
Member

cedoor commented Mar 6, 2024

Describe the improvement you're thinking about

The type of the message parameter in the @zk-kit/eddsa-poseidon library (i.e. BigNumberish) is currently treated similarly to the private key, but the two values are actually different. While the private key can be of arbitrary length as it is then hashed with keccak (re #188), the message cannot be more than 32 bytes. The size of the input must therefore be checked.

Additional context

Originated from discussion in #178 (comment).

@cedoor cedoor added the refactoring ♻️ A code change that neither fixes a bug nor adds a feature label Mar 6, 2024
@cedoor cedoor added this to the Beta milestone Mar 6, 2024
@cedoor cedoor removed this from the Beta milestone Apr 19, 2024
@cedoor cedoor added the good first issue Good for newcomers label Apr 25, 2024
@hannahredler
Copy link
Contributor

Hey! I'm a student of the PSE core program. I'd be interested in taking this issue if its available!

@cedoor
Copy link
Member Author

cedoor commented Sep 3, 2024

Hi @hannahredler, of course! I'll assign it to you 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactoring ♻️ A code change that neither fixes a bug nor adds a feature
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

2 participants