Documentation Index
Fetch the complete documentation index at: https://mintlify.com/risc0/risc0/llms.txt
Use this file to discover all available pages before exploring further.
zkVM Overview
The RISC Zero zkVM is a zero-knowledge verifiable general computing platform that enables you to prove correct execution of arbitrary code. At its core, it’s a RISC-V virtual machine that produces cryptographic proofs of computation.What is Zero-Knowledge Proof?
A zero-knowledge proof allows one party (the prover) to convince another party (the verifier) that something is true without revealing all the details. In the case of RISC Zero:- The prover can show they correctly executed some code
- The verifier can confirm the execution was correct
- Only the code’s output is revealed, not the inputs or intermediate state
With RISC Zero, you can prove that you ran specific code and got a specific result, without revealing the private inputs you used.
How the zkVM Works
The zkVM emulates a small RISC-V computer, allowing it to run arbitrary code in any language with a RISC-V compiler toolchain. Currently, the SDK supports:- Rust (primary)
- C
- C++
Key Properties
General Purpose Computing Unlike domain-specific ZK systems, the zkVM can execute any code that compiles to RISC-V. This means you can:- Use existing libraries and dependencies
- Leverage familiar programming languages
- Implement complex business logic
- The verifier learns nothing about execution details beyond the journal output
- Private inputs remain completely hidden
- Intermediate computation steps are not revealed
- 98 bits of conjectured security with default parameters
- Perfect zero-knowledge properties
- Based on well-studied zk-STARK and Groth16 protocols
Core Concepts
Understanding the zkVM requires familiarity with several key concepts:Method
A method is RISC-V code compiled from your source language (e.g., Rust). It represents the program that will be executed and proven inside the zkVM.Image ID
The Image ID is a cryptographic hash of the method’s ELF file. It uniquely identifies what code was executed and is required for verification.Think of the Image ID as a fingerprint of your compiled program. It ensures the verifier knows exactly what code produced the proof.
Journal
The journal is an append-only log that represents the official public output of the computation. Guest code writes to the journal usingenv::commit().
Receipt
A receipt is the zero-knowledge proof of correct execution. It consists of:- The journal (public outputs)
- The seal (cryptographic proof data)
Use Cases
The zkVM enables powerful applications across many domains: Privacy-Preserving Computation- Prove you satisfy conditions without revealing sensitive data
- Verify credentials without exposing personal information
- Prove model inference was performed correctly
- Verify training data properties without revealing the data
- Generate compact proofs of off-chain computation
- Verify complex state transitions efficiently
- Coordinate computation across untrusting parties
- Prove adherence to agreed-upon protocols
Development Workflow
A typical zkVM development workflow involves:- Write guest code - Implement your computation logic
- Compile to method - Build the RISC-V ELF binary
- Execute and prove - Run the method in the zkVM to generate a receipt
- Verify - Validate the receipt against the expected Image ID
Next Steps
To learn more about the zkVM:- System Architecture - Understand the zkVM’s internal structure
- Guest and Host Programs - Learn how guest and host interact
- Receipts and Verification - Deep dive into the proof system
- Security Model - Understand cryptographic guarantees