0xWOLAND / chiquito-vm

Halo2 Virtual Machine using Chiquito

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chiquito Virtual Machine Rust

chiquito-vm is a zkVM, a zero-knowledge virtual machine implemented using Chiquito, a Halo 2 DSL. zkVM enables secure, private computation with cryptographic guarantees.

Instructions

The following instructions are supported:

  • set: Set a variable to a constant.
  • mul: Multiply values and store the result.
  • add: Add values and store the result.
  • neg: Negate a value.
  • mov: Copy a value from one variable to another.
  • eq: Check if values are equal.
  • out: Output a value for zero-knowledge proofs.

Usage

Write assembly programs using these instructions to define variables, perform computations, and generate proofs of correctness. For example:

set 0x0 10
set 0x1 5
mul 0x0 0x0 0x1
out 0x0 50

Run

cargo run -- fib # fibonacci sequence
cargo run -- squares # repeated squaring sequence

By default, fib.asm is used. To run custom assembly files, write to /asm/yourefile.asm and run cargo run -- yourfile.

About

Halo2 Virtual Machine using Chiquito


Languages

Language:Rust 96.7%Language:Assembly 3.3%