-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support more hash functions to generate the public key in the eddsa-poseidon
package
#152
Comments
eddsa-poseidon
class to allow devs to pick their favorite hash functioneddsa-poseidon
class to allow devs to pick their favorite hash function for key generation
eddsa-poseidon
class to allow devs to pick their favorite hash function for key generationeddsa-poseidon
package
Hey! I'm Hannah, a dev currently studying the core program with the PSE team. I would be interested in picking this up! My approach:
If you would be happy for me to go ahead, it would be great if you could let me know if you know of any implementations of the above algorithms that could be used, or whether it would be required to research/implement this too |
Hey @hannahredler, great! I'll assign this task to you :) I think a good blake2 implementation could be: https://github.com/dcposch/blakejs. sha3: https://github.com/emn178/js-sha3. Conditional exports should be the right way to go. |
Is your feature request related to a problem? Please describe.
This implementation of EdDSA is mostly based on the
circomlibjs
library, which usesBLAKE1-512
to derive the public key from the private key, probably because performance is more important in this context than security. RFC 8032 suggests usingSHA-512
(presumablySHA3-512
nowadays), andBLAKE1
is starting to get out of date. It might make sense to offer devs more solutions.Describe the solution you'd like
The package may use conditional exports and offer several versions of the same implementation using different hash functions. The default export could be the one with the best hash function in terms of security and performance (with more emphasis on performance), probably BLAKE2.
Devs may import
EdDSAPoseidon
in the following way:Describe alternatives you've considered
The functions and class exported from the package may take an additional parameter to define the hash function to be used. The default one could be the best one in terms of security and performance (with more emphasis on performance), probably BLAKE2.
The parameter could be part of an
options
object, where other parameters could be added in the future.Additional context
The text was updated successfully, but these errors were encountered: