Skip to main content

Verify

Checks the cryptographic validity of a proof file without re-executing the guest, in constant time regardless of the original computation's complexity. Proofs verify only under trusted keys: the release keys by default, or keys you pass for a self-built setup, an aggregate or a PLONK proof. Documents the flags and the verification-result output.

Verify a proof file. Checks the cryptographic validity of the proof without re-executing the guest program. Verification time is constant regardless of how complex the original computation was.

cargo-zisk verify --proof <proof> [OPTIONS]

Flags​

FlagShortDefaultDescription
--proof <PROOF>-prequiredPath to the proof file.
--verbose-voffIncrease output verbosity. Pass -v for info, -vv for more.

Trusted keys​

verify never trusts a key carried inside the proof. With no key flags, a proof verifies only under this release's published keys for its hash family. Pass a key when the proof was not produced by the release setup.

FlagShortDefaultDescription
--leaf-setup-vk <PATH>release keyLeaf key of a non-release (self-built) setup: its vadcop_final.verkey.json, or vadcop_final_compressed.verkey.json for a compressed proof.
--setup-vk <PATH>noneRecursion key (a verkey.json, a JSON array of 4 u64 limbs) of the recurser that produced an aggregated proof. Required for an aggregate, since no release publishes one. Conflicts with --leaf-setup-vk.
--pilfflonk-vk <PATH>release keyTrusted pilfflonk key (pilfflonk.vkey.json). If omitted, the key the proof carries is used only if it is this release's for the proof's family.
--plonk-vk <PATH>-knoneTrusted PLONK circuit key (final.verkey.json). Required for a PLONK proof: the release publishes none.

For a proof from a setup you generated yourself, point --leaf-setup-vk at the key in your proving key directory, for example ~/.zisk/provingKey/zisk/vadcop_final/vadcop_final.verkey.json. For a pilfflonk proof from a self-built SNARK key, also pass its pilfflonk.vkey.json, found under provingKeySnark/final/provingKey/<name>/pilfflonk/. See zisk-verifier for the published keys.

note

The proof file format changed in 1.4.0-alpha. Proof files written by 1.3 no longer load; regenerate them with 1.4.0-alpha.

Examples​

Verify a proof file:

cargo-zisk verify --proof proof.bin

Verify a proof generated with a custom name:

cargo-zisk verify --proof proofs/my-proof.bin

Verify a proof produced with a self-built setup:

cargo-zisk verify --proof proof.bin \
--leaf-setup-vk ~/.zisk/provingKey/zisk/vadcop_final/vadcop_final.verkey.json

Verify an aggregated proof under the recurser that produced it:

cargo-zisk verify --proof aggregated.bin --setup-vk ./recurser.verkey.json

Outputs​

Prints the verification result to stdout:

INFO: ✓ STARK proof was verified
INFO: --- VERIFICATION SUMMARY ---
INFO: time: 35 milliseconds
INFO: ----------------------------

The label is STARK for a VADCOP proof (full or minimal), and PILFFLONK or PLONK for a final SNARK proof. An invalid proof logs ✗ <label> proof was not verified, and the command exits with a non-zero status code.

Verifying a pilfflonk proof needs Node.js

A pilfflonk proof is checked by a JavaScript verifier run with Node.js, so Node.js 18 or later and npm must be on PATH (npm install runs on first use to fetch the verifier's dependencies). The result is ✓ PILFFLONK proof was verified.

ziskup points PILFFLONK_JS at the bundled verifier (~/.zisk/zisk/pilfflonk-js) in your shell profile. A script or CI job that doesn't load that profile must export it itself:

export PILFFLONK_JS="$HOME/.zisk/zisk/pilfflonk-js"