mpz is a collection of multi-party computation libraries written in Rust 🦀.
The scope of this project is currently limited to being used to implement TLSNotary. It is not intended for general public use.
See our design doc for information on design choices, standards and project structure.
This project is currently under active development and should not be used in production. Expect bugs and regular major breaking changes. Use at your own risk.
core- Core cryptographic primitives.common- Common functionalities needed for modeling protocol execution, I/O, and multi-threading.fields- Finite-fields.circuits- Boolean circuit DSL.ot(core) - Oblivious transfer protocols.garble(core) - Boolean garbled circuit protocols.share-conversion(core) - Multiplicative-to-Additive and Additive-to-Multiplicative share conversion protocols for a variety of fields.cointoss(core) - 2-party cointoss protocol.matrix-transpose- Bit-wise matrix transposition.clmul- Carry-less multiplication.
Tests and benchmarks can be run against WASM targets using wasm-harness, which is configured as the cargo runner for the wasm32-wasip1 and wasm32-wasip1-threads targets in .cargo/config.toml.
Install the harness and a supported WASM target:
cargo install wasm-harness
rustup target add wasm32-wasip1-threadswasm-harness requires a WASM execution engine (wasmtime, or V8/SpiderMonkey via jsvu). It auto-discovers an available engine, or one can be selected explicitly with --engine or the WASM_HARNESS_ENGINE environment variable.
Then run tests/benches as usual, passing the WASM target:
# Run tests (use the threaded target for crates relying on rayon)
cargo test -p <crate> --target wasm32-wasip1-threads
# Run benches
cargo bench -p <crate> --target wasm32-wasip1-threadsAll crates in this repository are licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md.
mpz is pronounced "em-peasy".
