8000 GitHub - sorawee/Reef: Reef: A zkSNARK system for proving that a committed document matches a regex
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ Reef Public
forked from eniac/Reef

Reef: A zkSNARK system for proving that a committed document matches a regex

License

Notifications You must be signed in to change notification settings

sorawee/Reef

 
 

Repository files navigation

CircleCI

Reef

This is an implementation of Reef, a system for generating zero-knowledge proofs that a committed document matches or does not match a regular expression. The details of Reef are described in our paper: Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs.

Compile

cargo build

With metrics:

cargo build --feature metrics

Usage

Usage: reef [OPTIONS] --input <FILE> --output <FILE> --re <RE> <COMMAND>

Commands:
  ascii  Accepts ASCII regular-expressions and documents
  utf8   Accepts UTF8 regular-expressions and documents
  dna    Accepts DNA base ASCII files
  help   Print this message or the help of the given subcommand(s)

Options:
  -i, --input <FILE>
  -o, --output <FILE>
  -r, --re <RE>             Perl-style regular expression
  -b, --batch-size <USIZE>  Batch size (override auto select) [default: 0]
  -p, --projections         Use document projections
  -y, --hybrid              Use hybrid nlookup
  -m, --merkle              Use merkle tree for document commitment
  -n, --negate              Negate the match result
  -h, --help                Print help
  -V, --version             Print version

A good starting point is to generate the proof that aaaaaaaab matches the regex .*b.

$ echo aaaaaaaab > input.txt
$ reef -i input.txt -o metrics.txt -r ".*b" ascii

or another example

$ echo "hello world happy to be here" > hello.txt
$ reef -i hello.txt -o metrics.txt -r "hello.*" ascii

Reproducing Baseline Results

If you're interested in reproducing our baseline results (DFA and DFA with recursion), you'll need to checkout the branch reef_with_baselines and build as follows:

For DFA

cargo build --feature naive

For DFA with Recursion

cargo build --feature nwr

Thank you for using Reef, Happy proving!

About

Reef: A zkSNARK system for proving that a committed document matches a regex

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 84.8%
  • Shell 15.2%
0