encryptogroup / OTExtension

C++ OT extension implementation
GNU Lesser General Public License v3.0
125 stars 35 forks source link
encrypto oblivious-transfer ot

OTExtension Build Status

DESCRIPTION

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].

REQUIREMENTS

COMPILING

  1. Clone a copy of the OTExtension git repository:

    git clone https://github.com/encryptogroup/OTExtension.git
  2. Enter the Framework directory: cd OTExtension/

  3. Create and enter a build directory: mkdir build && cd build

  4. 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.

  1. Call make in the build directory to compile.

USE

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.

NOTES

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.

REFERENCES