OpenZeppelin / OpenZeppelin/compact-contracts
Add Jubjub Schnorr signature verification module
@0xisk is already working on this.
Since Jul 9, 2026.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.