This repository presents a zero-knowledge proof (zk-SNARK) framework for verifiable AV perception, implemented using the Groth16 proving system.
conda create -n zkav python=3.11
conda activate zkav
pip install -r requirements.txt
pip install -e .npm install -g snarkjspython -c "import zkav; print(zkav.__file__)"
python -c "from zkav import load_config; print(load_config('configs/demo.json'))"python scripts/generate_keys.py
python test_crypto.pypython -m zkav.cli roundtrip --config configs/demo.json --verbose2026-03-26 09:40:18,655 | DEBUG | zkav | Command [witness-generation] finished in 54.90 ms
2026-03-26 09:40:19,210 | DEBUG | zkav | Command [proof-generation] finished in 290.48 ms
2026-03-26 09:40:19,684 | DEBUG | zkav | Command [proof-verification] finished in 225.33 ms
{
"generation": {
"status": "success",
"stage": "generation",
"detection": {
"class_name": "stop sign",
"probability": 0.783,
"bbox": [1284, 647, 1343, 704]
},
"timing_ms": {
"witness_generation": 54.896,
"proof_generation": 290.479
},
"packet_file": "packet.cbor"
},
"verification": {
"proof_verified": true,
"signature_verified": true,
"packet_integrity_ok": true,
"elapsed_ms": 225.33,
"detail": "Proof verification succeeded."
}
}python -m zkav.cli generate --config configs/demo.json --verbose2026-03-26 10:23:28,497 | DEBUG | zkav | Command [witness-generation] finished in 52.90 ms
2026-03-26 10:23:29,073 | DEBUG | zkav | Command [proof-generation] finished in 298.13 ms
{
"generation": {
"status": "success",
"stage": "generation",
"detection": {
"class_name": "stop sign",
"probability": 0.783,
"bbox": [
1284,
647,
1343,
704
]
},
"timing_ms": {
"witness_generation": 52.90,
"proof_generation": 298.13
},
"packet_file": "packet.cbor"
}
}python -m zkav.cli verify --config configs/demo.json --verbose2026-03-26 10:26:39,760 | DEBUG | zkav | Command [proof-verification] finished in 219.73 ms
{
"verification": {
"proof_verified": true,
"signature_verified": true,
"packet_integrity_ok": true,
"elapsed_ms": 219.728169997938,
"detail": "Proof verification succeeded."
}
}python scripts/clean.py🧹 Cleaning project artifacts...
[REMOVE FILE] input.json
[REMOVE FILE] proof.json
[REMOVE FILE] public.json
[REMOVE FILE] packet.cbor
[REMOVE EXT] build/witness.wtns
[REMOVE CACHE] src/zkav/__pycache__
✅ Cleanup complete.