OpenZeppelin / OpenZeppelin/compact-contracts

Add Jubjub Schnorr signature verification module

Open
#548 1 comment 0 reactions 1 assignee View on GitHub

@0xisk is already working on this.

Since Jul 9, 2026.

2-low effort: 3-M feat:crypto
Dominant language
TypeScript
Stars
55
Forks
29
Avg merge
5d 7h
Merged PRs (30d)
25

Description

🧐 Motivation
Midnight needs native, in-circuit signature verification. Schnorr over the embedded Jubjub curve (BLS12-381's embedded curve) is the cheap, SNARK-friendly option — unlike foreign-field ECDSA (#475), which is expensive and blocked on foreign-field arithmetic. It's the substrate for multisig / FROST and any in-circuit signature check.

📝 Details
Pure stateless module: derivePublicKey, generateKeyPair, sign(sk, msg, nonce), verifySignature(pk, msg, sig), hashToScalar (Poseidon via transientHash), isValidPublicKey. Uses ecMulGenerator / ecMul / ecAdd over the embedded Jubjub curve.
Known blocker: EmbeddedFr decode failures for some Field values in ecMul / ecMulGenerator (SDK/runtime). PoC in #521.
Roadmap: Libraries → Jubjub Schnorr Signature Verification (Priority MNF: medium).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.