triton_vm

Function prove_program

Source
pub fn prove_program(
    program: Program,
    public_input: PublicInput,
    non_determinism: NonDeterminism,
) -> Result<(Stark, Claim, Proof), ProvingError>
Expand description

Prove correct execution of a program written in Triton assembly. This is a convenience function, abstracting away the details of the STARK construction. If you want to have more control over the STARK construction, this method can serve as a reference for how to use Triton VM.

Note that all arithmetic is in the prime field with 2^64 - 2^32 + 1 elements. If the provided public input or secret input contains elements larger than this, proof generation will be aborted.

The program executed by Triton VM must terminate gracefully, i.e., with instruction halt. If the program crashes, e.g., due to an out-of-bounds instruction pointer or a failing assert instruction, proof generation will fail.

The default STARK parameters used by Triton VM give a (conjectured) security level of 160 bits.