commit | be7fb852a04ea0c0ea955020a73806170706d2f9 | [log] [tgz] |
---|---|---|
author | samuele-andreoli <samuele.andreoli@yahoo.it> | Thu Feb 13 10:58:13 2020 +0000 |
committer | GitHub <noreply@github.com> | Thu Feb 13 10:58:13 2020 +0000 |
tree | e13c1ebacb569eb4bacbe089b15c638aa3e1c1b0 | |
parent | f73e9cbea618fef07f43174ae9766cc668875d01 [diff] | |
parent | 72c37ec1b98004bdab75ab64603e63257f950ebd [diff] |
Merge pull request #4 from apache/add-phase5-api Add phase5 api
AMCL - Apache Milagro Crypto Multi-Party Computation
This library implements Multi-Party Computation (MPC) using the milargo crypto library.
In order to build this library, the following packages are required:
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 is required
Build and install the AMCL library
git clone https://github.com/apache/incubator-milagro-crypto-c.git cd incubator-milagro-crypto-c git checkout 86c33c63d34fd3b9024a5e5c32934d4103805b9c mkdir build cd build cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D AMCL_CHUNK=64 -D AMCL_CURVE="BLS381,SECP256K1" -D AMCL_RSA="" -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 .. make make test sudo make install
Build and test code.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ mkdir build cd build cmake .. make make doc make test sudo make install
or build and run test on all builds
./scripts/build.sh ./scripts/test.sh
The documentation is generated using doxygen and can accessed (post build) via the file
./build/doxygen/html/index.html
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
There is a Python wrapper in ./python.
In “./vagrant” there are configuration files to run the software on a VM