Skip to content

Latest commit

 

History

History

zappot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ZappOT

A high-performance, extensible oblivious transfer library written in Rust.

Implemented protocols

  • 1-out-of-2 Base OT [CO15]
  • 1-out-of-2 OT Extension [ALSZ13]
  • 1-out-of-2 SilentOT [BCG+19]

Installing Rust

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.

Using this library in another project

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

Building the library

cargo build --all-features

Running the tests

Tests can be executed with the following command:

cargo test --all-features

Running the benchmarks

Benchmarks are done via the awesome criterion crate and can be run with the following command:

cargo bench --all-features

Viewing the documentation

Documentation can be build and viewed by issuing:

cargo doc --all-features --no-deps --open

Running the examples

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.

Cargo Features

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 the avx2 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.