miden-verifier 0.29.0

Miden VM execution verifier
Documentation

Miden verifier

This crate contains a light-weight verifier which can be used to verify proofs of program execution generated by Miden VM.

While Miden crate also contains verifier functionality, if a project needs only to verify proofs generated by Miden VM, this crate may be more appropriate to rely on.

Usage

Use verify(proof, claim) to verify a final ExecutionProof. The ExecutionClaim contains the program information and public stack inputs and outputs. The function returns the proof's security level, or a VerificationError if verification fails.

Wire-backed deferred proofs are partial proof material. Verify them with Verifier::verify_partial, which returns their security level and an Unsettled deferred-state obligation. The caller must settle or re-expose that obligation.

Stack inputs and outputs are ordered from top to bottom: element zero is at the top of the stack.

Verifying execution proof of a program basically means the following:

If a program with the provided hash is executed against some secret inputs and the provided public inputs, it will produce the provided outputs.

Notice how the verifier needs to know only the hash of the program - not what the actual program was.

Crate features

Miden verifier can be compiled with the following features:

  • std - enabled by default and relies on the Rust standard library.
  • no_std does not rely on the Rust standard library and enables compilation to WebAssembly.
    • Only the wasm32-unknown-unknown and wasm32-wasip1 targets are officially supported.

To compile with no_std, disable default features via --no-default-features flag.

License

This project is dual-licensed under the MIT and Apache 2.0 licenses.