install_bionic.md 2.36 KB
Newer Older
Aditya Damodaran's avatar
Aditya Damodaran committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!--
SPDX-FileCopyrightText: 2021 University of Luxembourg
SPDX-License-Identifier: GPL-3.0-or-later
SPDXVersion: SPDX-2.2

Authors: 
       Aditya Damodaran, aditya.damodaran@uni.lu
       Alfredo Rial, alfredo.rial@uni.lu
-->
# Installation instructions (Ubuntu)

For best results, please use a fresh installation of Ubuntu 18.04 LTS (Bionic Beaver). We ran into a few issues whilst trying to install this project's dependencies on Ubuntu 20.04 LTS. 

You could alternatively use our `install_ubuntu.sh` script located in the root directory of this repository, as it includes all of the following installation commands.

## Instructions
 1. Start by installing all prerequisites for building charm:

    ```
Aditya Damodaran's avatar
Aditya Damodaran committed
20
21
    $ 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    ```

2. Clone our repository:
   ```
   $ git clone https://gitlab.uni.lu/APSIA/uuhd-ppls.git
   ```

3. Download GMP, PBC, and Charm-Crypto:

   ```
   $ cd uuhd-ppls
   $ 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
   ```

Aditya Damodaran's avatar
Aditya Damodaran committed
41
4. Build and install GMP and PBC (Warning: This will install GMP and PBC as root):
Aditya Damodaran's avatar
Aditya Damodaran committed
42
43
44
45
46

   ```
   $ cd gmp-6.2.1
   $ ./configure
   $ make
Aditya Damodaran's avatar
Aditya Damodaran committed
47
   $ sudo make install
Aditya Damodaran's avatar
Aditya Damodaran committed
48
49
50
51
   $ cd ..
   $ cd pbc-0.5.14
   $ ./configure
   $ make
Aditya Damodaran's avatar
Aditya Damodaran committed
52
   $ sudo make install
Aditya Damodaran's avatar
Aditya Damodaran committed
53
54
55
56
57
58
59
60
61
62
   $ cd ..
   ```

5. Download and prepare Relic pairing libraries:

   ```
   $ 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
63
64
   $ sudo ../buildRELIC.sh ../relic-relic-toolkit-0.5.0/
   $ cd ../../../../../../
Aditya Damodaran's avatar
Aditya Damodaran committed
65
66
   ```

Aditya Damodaran's avatar
Aditya Damodaran committed
67
6. Build and install Charm-Crypto (Warning: This will install Charm-Crypto as root):
Aditya Damodaran's avatar
Aditya Damodaran committed
68
69
70
71

   ```
   $ ./configure.sh --enable-pairing-relic
   $ make
Aditya Damodaran's avatar
Aditya Damodaran committed
72
73
   $ sudo make install
   $ sudo ldconfig -v
Aditya Damodaran's avatar
Aditya Damodaran committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
   $ cd ../../
   ```

7. Install Openpyxl and Texttable:

   ```
   $ python3.6 -m pip install -r requirements.txt
   ```  

   Things should now work as expected. 
   ```
   $ python3.6 ./protocol.py -h
   ```