An efficient, user-friendly, modular, and extensible framework for mixed-protocol secure multi-party computation with two or more parties
Check out our paper (published at ACM TOPS'22) for details.
This code is provided as an experimental implementation for testing purposes and should not be used in a productive environment. We cannot guarantee security and correctness.
path\to\cmake\bin
path\to\MinGW\bin
OPENSSL_ROOT_DIR
, OPENSSL_INCLUDE_DIR
, OPENSSL_LIBRARIES
, OPENSSL_CRYPTO_LIBRARY
, and OPENSSL_SSL_LIBRARY
or pass them via -DOPENSSL_ROOT_DIR
etc. in cmake ..
Clone the MOTION git repository by running:
git clone https://github.com/encryptogroup/MOTION.git
Enter the Framework directory: cd MOTION/
Create and enter the build directory: mkdir build && cd build
Use CMake configure the build:
cmake ..
For Windows:
cmake -G "MinGW Makefiles" ..
This also initializes and updates the Git submodules of the dependencies
located in extern/
.
Call make
in the build directory.
Optionally, add -j $number_of_parallel_jobs
to make
for faster compilation.
You can find the build executables and libraries in the directories bin/
and lib/
, respectively.
MOTION depends on the following libraries:
These are referenced using the Git submodules in the extern/
directory.
During configure phase of the build (calling cmake ..
) CMake searches your
system for these libraries.
/usr
or
/usr/local
, CMake should find these automatically.~/some/path/
,
you can point CMake to their location via the
CMAKE_PREFIX_PATH
option:
cmake .. -DCMAKE_PREFIX_PATH=~/some/path/
extern/
(if
not already done), and the missing dependencies are built together with MOTION.
If you want to do this without a network connection, consider to clone the
repository recursively.MOTION executables and test cases are not built by default.
This can be enabled with the MOTION_BUILD_EXE
or MOTION_BUILD_TESTS
option, respectively, e.g.:
cmake .. -DMOTION_BUILD_EXE=On
You can choose the build type, e.g. Release
or Debug
using
CMAKE_BUILD_TYPE
:
cmake .. -DCMAKE_BUILD_TYPE=Release
# or
cmake .. -DCMAKE_BUILD_TYPE=Debug
Release
is selected as default and will enable optimizations, whereas Debug
includes debug symbols.
To choose a different compiler, use the CXX
environment variable:
CXX=/usr/bin/clang++ cmake ..
Executing make clean
in the build directory removes all build artifacts.
This includes built dependencies and examples.
To clean only parts of the build, either invoke make clean
in the specific
subdirectory or use make -C
:
make clean
- clean everythingmake -C src/motioncore clean
- clean only the MOTION librarymake -C src/examples clean
- clean only the examplesmake -C src/test clean
- clean only the test applicationmake -C extern clean
- clean only the built dependenciesIn case you plan to use MOTION for your own application, you might want to install
the MOTION library to some place, for example system-wide (e.g. at /usr/local
)
or somewhere in your workspace (e.g. /path/to/motion
).
There are two relevant options:
CMAKE_INSTALL_PREFIX
defaults to /usr/local
and is preprended by CMake to all installation paths
(e.g. lib/
and include/
for library and header files, respectively,
become /usr/local/lib
and usr/local/include
).
CMake will also look for dependencies at this location.DESTDIR
is used by the Makefile to install to a nonstandard location.Example:
If you want to install MOTION to ~/path/to/motion/prefix/{include,lib}
you can use:
cmake .. -DCMAKE_INSTALL_PREFIX=""
make
make DESTDIR=~/path/to/motion/prefix install
or
cmake .. -DCMAKE_INSTALL_PREFIX=~/path/to/motion/prefix
make
make install
Create a Docker image. This may take a few minutes, but you will only have to do this once.
docker build -t motion .
Run the Docker image.
docker run -it --rm motion
To check correctness, run the test using --gtest_filter='-*ipv6*'
because Docker doesn't support IPv6 by default.
TODO (in work): We provide an extensive developer guide with many examples and explanations of how to use MOTION.
Also, for further information see comments on the code and the online doxygen documentation for MOTION.
Alternatively, it can be built locally in your_build_folder/doc
by adding -DMOTION_BUILD_DOC=On
to the cmake
command.
Adding -DMOTION_BUILD_EXE=On
to the cmake
command enables the compilation of the applications implemented in
MOTION. Currently, the following applications are implemented and can be found in src/examples/
:
Three other examples with a detailed README
can be found in src/examples/tutorial/
: