update README
1 file changed
tree: 197d946e6651cbd8025b08bcb1959a2557daeb26
  1. benchmark/
  2. cmake/
  3. doxygen/
  4. examples/
  5. include/
  6. python/
  7. scripts/
  8. src/
  9. test/
  10. testVectors/
  11. vagrant/
  12. .dockerignore
  13. .gitignore
  14. .gitlab-ci.yml
  15. .travis.yml
  16. cmake_uninstall.cmake.in
  17. CMakeLists.txt
  18. CPackConfig.cmake
  19. DISCLAIMER
  20. Dockerfile
  21. LICENSE
  22. NOTICE
  23. README.md
  24. sonar-project.properties
  25. VERSION
README.md

Apache Milagro Multi-Party Computation Library

Master Branch Master Build Status Master Coverage Status

Develop Branch Develop Build Status Develop Coverage Status

Quality Gate Status

Description

AMCL - Apache Milagro Crypto Multi-Party Computation

This library implements Multi-Party Computation (MPC) using the milargo crypto library.

Dependencies

In order to build this library, the following packages are required:

  • CMake is required to build the source code.
  • CFFI, the C Foreign Function Interface for the Python wrapper
  • Doxygen is required to build the source code documentation.
  • Python language is required to build the Python language wrapper.

On Ubuntu 18.04 these packages are installed with the following commands;

sudo apt-get update
sudo apt-get install -y build-essential cmake doxygen lcov python3-dev python3-pip wget git
pip3 install cffi

AMCL

AMCL is required

Build and install the AMCL library

./scripts/buildAMCL.sh

Compiling

Build and test code.

./scripts/build.sh
./scripts/test.sh

Documentation

The documentation is generated using doxygen and can accessed (post build) via the file

./build/doxygen/html/index.html

Docker

Build and run tests using docker

docker build --no-cache -t libmpc .
docker run --cap-add SYS_PTRACE --rm libmpc

Generate coverage figures

docker run --rm libmpc ./scripts/coverage.sh

or copy to host

CONTAINER_ID=$(docker run --cap-add SYS_PTRACE -d libmpc ./scripts/coverage.sh)
docker logs $CONTAINER_ID
docker cp ${CONTAINER_ID}:"/root/target/Coverage/coverage" ./
docker rm -f ${CONTAINER_ID} || true

Python

There is a Python wrapper in ./python. You can to specify the RSA levels to build in the wrappers using the cmake flag PYTHON_RSA_LEVELS. Supported levels are 2048 and 4096. E.g.

cmake -DPYTHON_RSA_LEVELS="2048,4096" ..

In order for the RSA wrappers to work, the appropriate dynamic libraries need to be generated and installed for AMCL. For instance, to install the dynamic libraries for RSA 2048 and 4069, modify the AMCL cmake build as follows.

cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D AMCL_CHUNK=64 -D AMCL_CURVE="BLS381,SECP256K1" -D AMCL_RSA="2048,4096" -D BUILD_PAILLIER=ON -D BUILD_PYTHON=ON -D BUILD_BLS=ON -D BUILD_WCC=OFF -D BUILD_MPIN=ON -D BUILD_X509=OFF -D CMAKE_INSTALL_PREFIX=/usr/local ..

Virtual machine

In “./vagrant” there are configuration files to run the software on a VM