A high-performance, extensible oblivious transfer library written in Rust.
- 1-out-of-2 Base OT [CO15]
- 1-out-of-2 OT Extension [ALSZ13]
- 1-out-of-2 SilentOT [BCG+19]
The recommended way of installing the Rust stable toolchain is via the installer rustup. It can either be downloaded from its website, or via various Linux package managers.
Currently, this crate is not released on crates.io. Until then,
the easiest way of using this library is adding it as a git submodule and specifying it as a dependency in your Cargo.toml
like this:
zappot = {path = "<path to ZappOT>", features = ["silent_ot"]} # features can be omitted
cargo build --all-features
Tests can be executed with the following command:
cargo test --all-features
Benchmarks are done via the awesome criterion crate and can be run with the following command:
cargo bench --all-features
Documentation can be build and viewed by issuing:
cargo doc --all-features --no-deps --open
This crate contains commented and executable examples on how to use the provided protocols in the examples directory. The examples can be run via Cargo.
cargo run --release --example co_base_ot -- --help
cargo run --release --example alsz_ot_extension -- --help
cargo run --release --example silent_ot -- --help
Omitting the --help
flag will run the example with default values.
This library provides cargo feature flags to optionally enable additional functionality. Usage: cargo test --features <features...>
silent-ot-quasi-cyclic-code
: Enables Silent-OT and the quasi-cyclic code, which requires theavx2
target feature to be enabled.silent-ot-silver-code
: Enables Silent-OT and the Silver code. This reuses parts of libOTe. (WARNING: Insecure code!)silent-ot-ea-code
: Enables Silent-OT and Expand Accumulate code. This reuses parts of libOTe.silent-ot-ex-conv-code
: Enables Silent-OT and the Expand Convolute code. This reuses parts of libOTe.silent-ot-libote-codes
: Enables all three codes which are based on libOTe.
These features are additive and can be combined with each other.