Skip to content

Noble dependency for eddsa and Poseidon - #14

Draft
simonmasson wants to merge 1 commit into
devfrom
simon/dependencies
Draft

simonmasson wants to merge 1 commit into
devfrom
simon/dependencies

Conversation

@simonmasson

Copy link
Copy Markdown
Collaborator

This PR includes:

  • moving the dependency for EdDSA from js-crypto to noble.
    • An implementation from zk-kit is audited, but is not compatible with our use-case, where we want both ESM and browser support.
    • js-crypto has a GPL 3.0 license (not sure if it's a problem).
    • Noble provides an implementation for eddsa with bbjj that has not been audited specifically for this curve, but has been self-audited in 2026 in version 2.2.0. We use this version in this PR.
    • As mentioned in Noble repository, it requires additional code to make it match with circomlib (which is done here).
    • This change leads to a 10x improvement in the signing time. Moving to 2.3.0 would speed-up by an additional 2x factor.
  • moving poseidon-lite file to the Noble implementation.
    • The constants are computed using the lfsr rather than hardcoded.

This PR is a WIP and needs to integrate the primitives currently in railgun-reloaded/curves (see branches) before being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant