install_ubuntu.sh 1.04 KB
Newer Older
Aditya Damodaran's avatar
Aditya Damodaran committed
1
2
3
4
#!/bin/bash
# SPDX-FileCopyrightText: 2021 University of Luxembourg
# SPDX-License-Identifier: CC0-1.0
# SPDXVersion: SPDX-2.2
Aditya Damodaran's avatar
Aditya Damodaran committed
5
6
sudo apt-get update
sudo apt-get install -y openssl gcc python3.6 python3-pip flex bison byacc git cmake libssl-dev
Aditya Damodaran's avatar
Aditya Damodaran committed
7
8
9
10
11
12
13
14
15
mkdir requirements && cd requirements
wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz
wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz
git clone "https://github.com/JHUISI/charm.git"
tar -xvf gmp-6.2.1.tar.xz
tar -xvf pbc-0.5.14.tar.gz
cd gmp-6.2.1
./configure
make
Aditya Damodaran's avatar
Aditya Damodaran committed
16
sudo make install
Aditya Damodaran's avatar
Aditya Damodaran committed
17
18
19
20
cd ..
cd pbc-0.5.14
./configure
make
Aditya Damodaran's avatar
Aditya Damodaran committed
21
sudo make install
Aditya Damodaran's avatar
Aditya Damodaran committed
22
23
24
25
26
cd ..
cd charm/charm/core/math/pairing/relic
wget https://github.com/relic-toolkit/relic/archive/relic-toolkit-0.5.0.tar.gz
tar -xvf relic-toolkit-0.5.0.tar.gz
mkdir relic-target && cd relic-target
Aditya Damodaran's avatar
Aditya Damodaran committed
27
28
sudo ../buildRELIC.sh ../relic-relic-toolkit-0.5.0/
cd ../../../../../../
Aditya Damodaran's avatar
Aditya Damodaran committed
29
30
./configure.sh --enable-pairing-relic
make
Aditya Damodaran's avatar
Aditya Damodaran committed
31
32
sudo make install
sudo ldconfig -v
Aditya Damodaran's avatar
Aditya Damodaran committed
33
34
35
cd ../../
python3.6 -m pip install -r requirements.txt
python3.6 ./protocol.py -h