The Nexus zkVM 2.0

The Nexus zkVM (zero-knowledge virtual machine) is a modular, extensible, open-source, highly-parallelized, prover-optimized, contributor-friendly, zkVM written in Rust, focused on performance and security.

Nexus zkVM v0.2.4 is the current stable release, implementing the zkVM component of the Nexus 2.0 system.

Proving Computation

The Nexus zkVM can prove any computation. For a Rust program:

#![cfg_attr(target_arch = "riscv32", no_std, no_main)]

use nexus_rt::println;

fn fib(n: u32) -> u32 {
    match n {
        0 => 0,
        1 => 1,
        _ => fib(n - 1) + fib(n - 2),
    }
}

#[nexus_rt::main]
fn main() {
    let n = 7;
    let result = fib(n);
    assert_eq!(result, 13);
    println!("fib({}) = {}", n, result);
}

Generating a zero-knowledge proof of its correct execution is as easy as running:

cargo nexus prove

And verification is as simple as running:

cargo nexus verify

To get started with the Nexus zkVM, check out the SDK Quick Start guide or the CLI Quick Start guide.

The Nexus Ethos: Secure, Open Science, Open Source

We believe a zkVM’s main purpose is to provide an efficient proving mechanism, without compromising on security and correctness. Every component of a zkVM should be powered by open-source, peer-reviewed science and well-understood cryptographic components, with careful analysis of security and performance.

The Nexus zkVM features no code obfuscation, no proprietary components, and no closed-source code.

Modular and Extensible

The Nexus zkVM is designed to be modular and extensible, with highly optimized isolated components. With thoroughly analyzed sensible defaults (provers, compilers, etc.) that will work for most users, developers can feel confident in the security and performance of the zkVM.

That said, the Nexus zkVM is specifically designed to be extensible. Users can add support for new languages, new ISAs, new precompiles, and new provers, and import other developer’s precompiles, with no vendor lock-in.

Was this page helpful?