Implementation of the passive secure OT extension protocol of [1] and the active secure OT extension protocols of [2] and [3]. Implements the general OT (G_OT), correlated OT (C_OT), global correlated OT (GC_OT), sender random OT (SR_OT), and receiver random OT (RR_OT) (Definitions of the functionalities will follow). Implements the base-OTs by Naor-Pinkas [4], Peikert-Vaikuntanathan-Waters [5], and Chou-Orlandi [6]. The code is based on the OT extension implementation of [7] and uses the MIRACL libary [8] for elliptic curve arithmetic.
Update: Implemented 1-out-of-2 OT from the 1-out-of-N OT extension of [9].
Required packages:
g++
make
libgmp-dev
libssl-dev
libboost-all-dev
(version >= 1.66)Install these packages with your favorite package manager, e.g, sudo apt-get install <package-name>
.
Clone a copy of the OTExtension git repository:
git clone https://github.com/encryptogroup/OTExtension.git
Enter the Framework directory: cd OTExtension/
Create and enter a build directory: mkdir build && cd build
Use CMake to create build files. Use
cmake ..
The following options are available:
-DCMAKE_INSTALL_PREFIX=/path/to/installation
-DOTEXTENSION_BUILD_EXE=On
to build executables (they are written to mains/
in the build directory)In case ENCRYPTO_utils
cannot be found on your system, it will automatically be compiled. If it is
installed in a non-standard location, the path can be provided via
-DCMAKE_PREFIX_PATH=/some/path
.
make
in the build directory to compile.To start OT extension, open two terminals on the same PC and call otmain -r 0
in one terminal to start OT extension as sender and call otmain -r 1
in the second terminal to start OT extension as receiver. This will invoke the passive secure IKNP 1-out-of-2 OT extension protocol for 1 million OTs on 8-bit strings. The result of the OT will be checked for correctness and the times (in ms) for the base-OTs, for the OT extensions, the number of bytes sent and the number of bytes received will be printed on the terminals.
A list of all available options can be obtained via otmain -h
.
An example implementation of OT extension can be found in mains/otmain.cpp
.
OT related source code is found in ot/
.
Some compilation flags can be set in ot/OTconstants.h
.