zk-kit icon indicating copy to clipboard operation
zk-kit copied to clipboard

Add check for the `message` parameter size in the EdDSA Poseidon library

Open cedoor opened this issue 1 year ago • 4 comments

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 https://github.com/privacy-scaling-explorations/zk-kit/pull/178#discussion_r1509946706.

cedoor avatar Mar 06 '24 16:03 cedoor

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

hannahredler avatar Sep 02 '24 16:09 hannahredler

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

cedoor avatar Sep 03 '24 17:09 cedoor

Hi @hannahredler, are you still going to work on this?

cedoor avatar Oct 24 '24 11:10 cedoor

Hello! Yes sorry for the delay - working on a solution now! will make a PR today

hannahredler avatar Oct 24 '24 12:10 hannahredler