← Back to all products
$15
Proof Generator CLI
CLI tool for generating zero-knowledge proofs locally or via remote prover networks.
TOMLPythonMarkdownJSONLLM
📁 File Structure 16 files
proof-generator-cli/
├── Cargo.toml
├── LICENSE
├── README.md
├── examples/
│ └── witness.json
├── python/
│ └── proof_generator/
│ └── __init__.py
├── security-notes.md
├── src/
│ ├── backends/
│ │ ├── groth16.rs
│ │ ├── mod.rs
│ │ ├── plonk.rs
│ │ └── stark.rs
│ ├── circuits/
│ │ ├── acir.rs
│ │ ├── mod.rs
│ │ └── r1cs.rs
│ ├── main.rs
│ └── witness/
│ └── mod.rs
└── tests/
└── test_generator.py
📖 Documentation Preview README excerpt
Proof Generator CLI
CryptoForge Prover Market — Product #1
Unified CLI for generating ZK proofs across Groth16, PLONK, and STARK backends. Supports Circom R1CS, Noir ACIR, and custom circuits with output in JSON, binary, or Solidity calldata format.
Features
- Multi-backend: Groth16 (BN254), PLONK, STARK proof generation
- Circuit loading: Circom R1CS and Noir ACIR formats
- Witness generation: JSON/TOML input parsing
- Output formats: JSON, binary, Solidity calldata
- Trusted setup: Powers of tau ceremony helpers
- Parallel proving: Rayon-based multi-threaded witness computation
- Python bindings: PyO3 wrapper for scripting
- Benchmarking: Built-in hardware profiling mode
Quick Start
# Generate a Groth16 proof
proof-gen prove --backend groth16 --circuit circuit.r1cs --witness input.json --output proof.json
# Verify locally before submission
proof-gen verify --backend groth16 --vk vk.json --proof proof.json --public public.json
# Generate Solidity calldata
proof-gen calldata --proof proof.json --format solidity
# Benchmark your hardware
proof-gen bench --backend groth16 --circuit circuit.r1cs --iterations 10
Python Usage
from proof_generator import ProofGenerator, ProofSystem
gen = ProofGenerator(backend=ProofSystem.GROTH16)
proof = gen.prove(circuit_path="circuit.r1cs", witness={"a": 3, "b": 5})
is_valid = gen.verify(proof)
calldata = gen.to_calldata(proof)
Tech Stack
- Rust (CLI binary, proof backends)
- Python 3.10+ (PyO3 bindings)
- ark-groth16, bellman, circom-compat
License
MIT — see [LICENSE](./LICENSE)
Security
See [security-notes.md](./security-notes.md) for known limitations and threat model.
📄 Code Sample .py preview
tests/test_generator.py
"""Tests for Proof Generator CLI Python bindings."""
import json
import pytest
from pathlib import Path
from proof_generator import ProofGenerator, ProofSystem, OutputFormat, Proof
class TestProofClass:
"""Tests for the Proof dataclass."""
def test_proof_to_json(self):
proof = Proof(
backend="groth16",
proof_bytes=b"\x01\x02\x03",
public_inputs=["0x1234"],
generation_time_ms=100,
circuit_name="test",
)
result = json.loads(proof.to_json())
assert result["backend"] == "groth16"
assert result["proof_bytes"] == [1, 2, 3]
assert result["public_inputs"] == ["0x1234"]
def test_proof_to_calldata(self):
proof = Proof(
backend="groth16",
proof_bytes=b"\xab\xcd",
public_inputs=["0x42"],
generation_time_ms=50,
circuit_name="test",
)
calldata = proof.to_calldata()
assert 'hex"abcd"' in calldata
assert "uint256[] memory publicInputs" in calldata
def test_proof_empty_inputs(self):
proof = Proof(
backend="plonk",
proof_bytes=b"",
public_inputs=[],
generation_time_ms=0,
circuit_name="empty",
)
calldata = proof.to_calldata()
assert "new uint256[](0)" in calldata
class TestProofGenerator:
"""Tests for the ProofGenerator class."""
# ... 83 more lines ...