crypto-snippets/snark

Succinct Non-Interactive Argument of Knowledge


\(\gdef\system{\mathsf{SNARK}}\) \(\gdef\systemprefix{}\) \(\gdef\setup{\mathsf{\systemprefix{}Setup}}\) \(\gdef\prove{\mathsf{\systemprefix{}Prove}}\) \(\gdef\verify{\mathsf{\systemprefix{}Verify}}\)

A scheme \(\system{} = (\setup{}, \prove{}, \verify{})\) is defined as follows:

\(\setup{}(ecs, src) \to (pk, vk)\) takes an executable constraint system \(ecs\) encoding a program's logic, and a circuit independent stuctured reference string \(src\), outputs proving key \(pk\) and a verification key \(vk\).

\(\prove{}(ecs, x, x', w, pk) \to \pi_{ecs}\) takes the program encoding \(ecs\), public inputs \(x\), private inputs \(x'\), and witness \(w\), outputs proof \(\pi_{ecs}\) if \(w\) is a valid variable assignment for \(ecs\) with proof arguments \(x, x'\).

\(\verify{}(\pi_{ecs}, x, vk) \to \{0, 1\}\) outputs \(1\) if \(\pi_{ecs}\) is valid with respect to public inputs \(x\) and verification key \(vk\).


Last modified June 16, 2025, 3:35 p.m.