Manta-Network / manta-rs

Rust Crates for the Manta Network Ecosystem
https://github.com/Manta-Network
GNU General Public License v3.0
80 stars 50 forks source link

Test/Benchmark Crypto Primitives Tracking Issue #112

Open bhgomes opened 2 years ago

bhgomes commented 2 years ago

For each cryptographic primitive abstraction, we should have a testing and benchmarking framework for all of its implementations.

For example, consider the signature scheme APIs where we have a signature generation function and a signature verification function. Both of those functions should have a generic native performance benchmark framework and a constraint measuring framework, along with a randomized testing suite that confirms that all valid signatures are verifiable (and all invalid ones are not).

Requirements

For the cryptographic primitive abstraction we want the following (as library code that can be called by concrete implementations):

  1. Correctness Test
  2. Native Performance Benchmark
  3. Circuit Constraint Measurement

For the concrete implementations, we want to have actual code that runs those frameworks executable by the following:

  1. Test: cargo test --release
  2. Benchmark: cargo bench + wasm-pack test
  3. Constraint Measurement: cargo run --release --bin measure

Primitives

bhgomes commented 2 years ago

Related to https://github.com/Manta-Network/manta-rs/issues/95.

bhgomes commented 2 years ago

Possible benchmarking abstractions: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9316ee70a0d5ff26c85e543beb2e6259