Garaga

Garaga Logo

State-of-the-Art Elliptic Curve Tooling & ZK Proof Verification for Starknet

Garaga enables efficient verification of zero-knowledge proofs and cryptographic operations on Starknet. It achieves state-of-the-art performance through:

  • A dedicated builtin from StarkWare for emulated modular arithmetic

  • Non-deterministic techniques for extension field multiplication, pairings, and multi-scalar multiplication

  • Precomputed verification hints that dramatically reduce on-chain computation


What Can You Build?

🛡️ ZK Proof Verification

Verify Groth16 and Honk proofs on-chain with production-ready verifier contracts.

🔗 zkVM Integration

Verify proofs from RISC Zero and SP1 using maintained, audited contracts.

✍️ Signature Verification

ECDSA, Schnorr, and EdDSA verification across multiple elliptic curves.

🎲 Verifiable Randomness

On-chain verification of drand beacon signatures for provably fair randomness.

🧮 Elliptic Curve Operations

Multi-scalar multiplication on 6 curves, pairing operations for BN254/BLS12-381.

🔒 Privacy-Preserving dApps

Build applications with Noir/Honk circuits for complex privacy logic.


Architecture Overview

┌──────────────────────────────────────────────────────────────────────────────┐
│                           YOUR STARKNET DAPP                                 │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   Smart Contract Generators          │       Cairo Libraries                 │
│   ─────────────────────────          │       ───────────────                 │
│   • Groth16 Verifier (BN254/BLS)     │       • EC Operations (MSM)           │
│   • Noir/Honk Verifier               │       • Signatures (ECDSA/Schnorr)    │
│   • Custom circuit verifiers         │       • Pairing Checks                │
│                                      │       • Hashing (SHA-512, Poseidon)   │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│                       Maintained Contracts (Declared on Mainnet)             │
│   ─────────────────────────────────────────────────────────────              │
│   • Universal ECIP (MSM)  • RISC Zero Verifier  • SP1 Verifier  • Drand      │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│                         SDK (Python / Rust / TypeScript)                     │
│   ─────────────────────────────────────────────────────────────              │
│   Calldata generation • Proof preprocessing • Contract generation            │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│  Supported Curves                                                            │
│  ────────────────                                                            │
│  BN254 │ BLS12-381 │ SECP256K1 │ SECP256R1 │ ED25519 │ GRUMPKIN             │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Performance

Garaga achieves remarkable efficiency through optimized Cairo implementations. See the full benchmark suite for detailed metrics on all operations including:

  • Groth16 verification (BN254 & BLS12-381)

  • Honk/Noir proof verification

  • RISC Zero & SP1 proof verification

  • Signature verification (ECDSA, Schnorr, EdDSA)

  • Multi-scalar multiplication

  • Pairing operations


Version Compatibility


Quick Start

1. Install

2. Generate a Verifier Contract

# Generate a Groth16 verifier from your verification key
garaga gen --system groth16 --vk your_vk.json

# Or generate a Noir/Honk verifier
garaga gen --system ultra_keccak_honk --vk target/vk

3. Deploy & Verify

# Declare and deploy your contract
garaga declare
garaga deploy --class-hash <CLASS_HASH>

# Verify a proof on-chain
garaga verify-onchain --address <CONTRACT_ADDRESS> \
  --vk your_vk.json --proof proof.json --public-inputs inputs.json

Production Ready

Garaga is used in production by teams building:

  • Validity rollups and L2 solutions

  • Cross-chain bridges with ZK verification

  • Privacy-preserving applications

  • Verifiable computation platforms

Security


Resources


References

Garaga's cryptographic implementations are based on peer-reviewed research:

  1. Groth16: Groth, J. "On the Size of Pairing-Based Non-interactive Arguments." EUROCRYPT 2016. ePrint 2016/260

  2. Efficient Pairings: El Housni, Y. "Pairings in Rank-1 Constraint Systems." ePrint 2022/1162

  3. ECIP: Eagen, L. "Zero Knowledge Proofs of Elliptic Curve Inner Products." ePrint 2022/596

  4. On Proving Pairings: Novakovic, A. & Eagen, L. ePrint 2024/640

  5. Fast EC Scalar Multiplications: Eagen, L., El Housni, Y., Masson, S., Piellard, T. ePrint 2025/933

Last updated

Was this helpful?