-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Copy speed-reverie on top of base reverie * Update Cargo.toml * Recreate license, update readme * Remove companion from nightly.yml * Wakey wakey, Github Actions * Include config.toml Wasn't copied before * Disable Mac tests for now I'm sorry, the macos environment doesn't support the hardware instructions we use and I don't want to fix it myself. We can implement a fallback later. * Remove all the needless range loops Ugh, clippy why * Allow needless collect for now
- Loading branch information
Eric Hennenfent
authored
Jul 15, 2021
1 parent
22977c5
commit 0410837
Showing
102 changed files
with
5,068 additions
and
129,705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build] | ||
rustflags = ["-C", "target-feature=+aes,+ssse3,+sse2,+avx2"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,17 @@ description = "An efficient implementation of the NIZKPoK outlined in KKW 2018" | |
license = "AGPL-3.0" | ||
homepage = "https://github.com/trailofbits/reverie" | ||
repository = "https://github.com/trailofbits/reverie" | ||
version = "0.2.1-rc.4" | ||
version = "0.3.0" | ||
authors = [ | ||
"Mathias Hall-Andersen <[email protected]>", | ||
"William Woodruff <[email protected]>" | ||
"William Woodruff <[email protected]>", | ||
"Eric Hennenfent <[email protected]>" | ||
] | ||
edition = "2018" | ||
readme = "README.md" | ||
keywords = ["crypto", "cryptography", "zero-knowledge"] | ||
categories = ["cryptography"] | ||
|
||
[lib] | ||
name = "reverie" | ||
build = "build.rs" | ||
|
||
[package.metadata.release] | ||
no-dev-version = true | ||
|
@@ -25,30 +24,25 @@ disable-publish = true # handled by GitHub Actions | |
maintenance = { status = "actively-developed" } | ||
|
||
[dependencies] | ||
async-channel = "1.5" | ||
async-scoped = "0.6" | ||
aesni = "0.10" | ||
async-std = "1.7" | ||
async-stream = "0.3" | ||
bincode = "1.3" | ||
blake3 = "0.3" | ||
crossbeam = "0.8" | ||
fnv = "1.0" | ||
hex = "0.4" | ||
itertools = "0.10" | ||
rand = "0.7" | ||
rand_chacha = "0.3" | ||
rand_core = "0.5" | ||
rayon = "1.3" | ||
serde = {version = "1.0", features = ["derive"]} | ||
serde-big-array = "0.3.2" | ||
static_assertions = "1.1" | ||
sysinfo = "0.17.0" | ||
typenum = "1.12" | ||
bincode = "1.3.3" | ||
blake3 = "0.3.7" | ||
chacha = "0.3" | ||
clap = "2.33.1" | ||
num-traits = "0.2" | ||
rand = "0.8" | ||
rayon = "1.5" | ||
serde = {version = "1.0.125", features = ["derive"]} | ||
built = {version = "0.4.4", features = ["git2", "chrono", "semver"] } | ||
|
||
[dev-dependencies] | ||
aes = "0.6.0" | ||
cipher = "0.2" | ||
[build-dependencies] | ||
built = "0.4.4" | ||
|
||
[lib] | ||
name = "reverie" | ||
path = "src/lib.rs" | ||
|
||
[features] | ||
trace = [] | ||
debug_eval = [] | ||
[[bin]] | ||
name = "speed-reverie" | ||
path = "src/main.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
# Reverie | ||
|
||
An efficient implementation of the NIZKPoK outlined in KKW 2018 | ||
|
||
 | ||
|
||
Reverie is an implementation (prover and verifier) of the MPC-in-the-head NIZKPoK outlined in | ||
[Improved Non-Interactive Zero Knowledge with Applications to Post-Quantum Signatures](https://eprint.iacr.org/2018/475). | ||
Reverie seeks to offer concrete prover efficiency (linear proving time with small constants) for | ||
complex predicates. The implementation seeks to offer 128-bits of (classical) security and support | ||
arbitrary rings, most efficiently | ||
Z<sub>2</sub>, Z<sub>8</sub>, Z<sub>16</sub>, Z<sub>32</sub> and Z<sub>64</sub>. | ||
Z<sub>2</sub> and Z<sub>64</sub>. | ||
|
||
Reverie provides both a library (with a simplified and a streaming interface), | ||
in addition to a "companion" program for proving/verifying statements specified in Bristol format | ||
in addition to a CLI program for proving/verifying statements specified in Bristol format | ||
to enable easy experimentation. | ||
|
||
## Building | ||
|
||
## Running | ||
Reverie requires a relatively recent `nightly` Rust. | ||
|
||
```bash | ||
$ cargo build | ||
``` | ||
Using `SSE+AESNI` | ||
|
||
time RUSTFLAGS="-C target-cpu=native -C target-feature=+aes,+ssse3,+sse2" cargo run --release | ||
|
||
Or even better with `AVX2+AESNI` | ||
|
||
time RUSTFLAGS="-C target-cpu=native -C target-feature=+aes,+ssse3,+sse2,+avx2" cargo run --release | ||
|
||
## Improvements in 0.3+ | ||
|
||
- Pack 8 instances of 8 players over GF(2) into a single 64-bit integer (see [gist](https://gist.github.com/rot256/174fd53c0aac8cf04ef9810e8a10b0c0) for details). | ||
- Switch to AES with AESNI | ||
- Just-in-time preprocessing to condense proving into a single pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
built::write_built_file().expect("Failed to acquire build-time information") | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.