trailofbits / sholva

An experimental Tiny86 decoder and verifier for SIEVE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shol'va

Build Status

shol'va is a tool for generating zero knowledge proofs of program execution, composed of

  • mttn: an instruction-resolution program tracer
  • tiny86: a Verilog and Clash trace verifier circuit

Usage

Note: shol'va does native tracing X86 Linux programs, and as a result is strictly limited to that architecture.

Dependencies

sholva is built using nix. It is recommended to use the Determinate Systems installer:

$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Building

mttn

$ nix build .#mttn

This builds:

  • bin/mttn: tracer binary
  • traces/*.trace.txt: self-test tracing results

Enter a shell with development dependencies:

$ cd mttn
$ nix develop .#mttn

Manual testing:

# build all the of the test binaries
$ make -C test elfs
# run the mttn self-tests
$ cargo test

tiny86

$ nix build .#tiny86

This builds:

  • circuit/tiny86.blif: synthesized circuit

Enter a shell with development dependencies:

$ cd tiny86
$ nix develop .#tiny86

Manual testing:

# test the full Tiny86 circuit test suite
$ make _test-tiny86
# test the Tiny86 circuit Clash components Haskell source
$ make _test-clash
# test the Tiny86 circuit Verilog components
$ make _test-verilog
# test the Tiny86 circuit Verilog components, isolating modules
$ SHOLVA_MODULES="alu syscall" make _test-verilog
# test the manual end-to-end test suite
$ make _test-pipeline

sv_circuit

$ nix build .#sv_circuit

This builds the sv-compositor binary, which takes a BLIF file (defining a single step of Tiny86) and trace artifacts as input and yields proof artifacts (currently, a SIEVE IR0 circuit, public input, and private input) as output.

Enter a shell with development dependencies:

$ cd sv_circuit
$ nix develop .#sv_circuit

Manual testing (from the development environment):

$ cargo test

Exploit Modeling

Uses a provided jdk build cross-compiled to 80386.

Distribution and Licensing

This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA) under Agreement No. HR001120C0084.

The views, opinions, and/or findings expressed are those of the author(s) and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government.

DISTRIBUTION STATEMENT A: Approved for public release, distribution unlimited.

shol'va is licensed under the GNU AGPLv3 License. A copy of the terms can be found in the LICENSE file.

About

An experimental Tiny86 decoder and verifier for SIEVE

License:GNU Affero General Public License v3.0


Languages

Language:Rust 46.6%Language:Verilog 22.7%Language:Python 8.5%Language:Haskell 6.4%Language:Ruby 5.5%Language:Makefile 3.2%Language:Assembly 2.8%Language:Nix 2.0%Language:C 1.4%Language:Shell 0.6%Language:Java 0.1%Language:Tcl 0.1%Language:GDB 0.0%