Commit 25c04ff3 authored by Aditya Damodaran's avatar Aditya Damodaran
Browse files

Fixed install scripts

parent 705c34b2
...@@ -17,8 +17,8 @@ You could alternatively use our `install_ubuntu.sh` script located in the root d ...@@ -17,8 +17,8 @@ You could alternatively use our `install_ubuntu.sh` script located in the root d
1. Start by installing all prerequisites for building charm: 1. Start by installing all prerequisites for building charm:
``` ```
$ apt-get update $ sudo apt-get update
$ apt-get install -y openssl gcc python3.6 python3-pip flex bison byacc git cmake libssl-dev $ sudo apt-get install -y openssl gcc python3.6 python3-pip flex bison byacc git cmake libssl-dev
``` ```
2. Clone our repository: 2. Clone our repository:
...@@ -38,18 +38,18 @@ You could alternatively use our `install_ubuntu.sh` script located in the root d ...@@ -38,18 +38,18 @@ You could alternatively use our `install_ubuntu.sh` script located in the root d
$ tar -xvf pbc-0.5.14.tar.gz $ tar -xvf pbc-0.5.14.tar.gz
``` ```
4. Build and install GMP and PBC: 4. Build and install GMP and PBC (Warning: This will install GMP and PBC as root):
``` ```
$ cd gmp-6.2.1 $ cd gmp-6.2.1
$ ./configure $ ./configure
$ make $ make
$ make install $ sudo make install
$ cd .. $ cd ..
$ cd pbc-0.5.14 $ cd pbc-0.5.14
$ ./configure $ ./configure
$ make $ make
$ make install $ sudo make install
$ cd .. $ cd ..
``` ```
...@@ -60,17 +60,17 @@ You could alternatively use our `install_ubuntu.sh` script located in the root d ...@@ -60,17 +60,17 @@ You could alternatively use our `install_ubuntu.sh` script located in the root d
$ wget https://github.com/relic-toolkit/relic/archive/relic-toolkit-0.5.0.tar.gz $ wget https://github.com/relic-toolkit/relic/archive/relic-toolkit-0.5.0.tar.gz
$ tar -xvf relic-toolkit-0.5.0.tar.gz $ tar -xvf relic-toolkit-0.5.0.tar.gz
$ mkdir relic-target && cd relic-target $ mkdir relic-target && cd relic-target
$ ../buildRELIC.sh ../relic-relic-toolkit-0.5.0/ $ sudo ../buildRELIC.sh ../relic-relic-toolkit-0.5.0/
$ cd ../../../../../ $ cd ../../../../../../
``` ```
6. Build and install Charm-Crypto: 6. Build and install Charm-Crypto (Warning: This will install Charm-Crypto as root):
``` ```
$ ./configure.sh --enable-pairing-relic $ ./configure.sh --enable-pairing-relic
$ make $ make
$ make install $ sudo make install
$ ldconfig -v $ sudo ldconfig -v
$ cd ../../ $ cd ../../
``` ```
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# SPDX-FileCopyrightText: 2021 University of Luxembourg # SPDX-FileCopyrightText: 2021 University of Luxembourg
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
# SPDXVersion: SPDX-2.2 # SPDXVersion: SPDX-2.2
apt-get update sudo apt-get update
apt-get install -y openssl gcc python3.6 python3-pip flex bison byacc git cmake libssl-dev sudo apt-get install -y openssl gcc python3.6 python3-pip flex bison byacc git cmake libssl-dev
mkdir requirements && cd requirements mkdir requirements && cd requirements
wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz 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 wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz
...@@ -13,23 +13,23 @@ tar -xvf pbc-0.5.14.tar.gz ...@@ -13,23 +13,23 @@ tar -xvf pbc-0.5.14.tar.gz
cd gmp-6.2.1 cd gmp-6.2.1
./configure ./configure
make make
make install sudo make install
cd .. cd ..
cd pbc-0.5.14 cd pbc-0.5.14
./configure ./configure
make make
make install sudo make install
cd .. cd ..
cd charm/charm/core/math/pairing/relic cd charm/charm/core/math/pairing/relic
wget https://github.com/relic-toolkit/relic/archive/relic-toolkit-0.5.0.tar.gz wget https://github.com/relic-toolkit/relic/archive/relic-toolkit-0.5.0.tar.gz
tar -xvf relic-toolkit-0.5.0.tar.gz tar -xvf relic-toolkit-0.5.0.tar.gz
mkdir relic-target && cd relic-target mkdir relic-target && cd relic-target
../buildRELIC.sh ../relic-relic-toolkit-0.5.0/ sudo ../buildRELIC.sh ../relic-relic-toolkit-0.5.0/
cd ../../../../../ cd ../../../../../../
./configure.sh --enable-pairing-relic ./configure.sh --enable-pairing-relic
make make
make install sudo make install
ldconfig -v sudo ldconfig -v
cd ../../ cd ../../
python3.6 -m pip install -r requirements.txt python3.6 -m pip install -r requirements.txt
python3.6 ./protocol.py -h python3.6 ./protocol.py -h
\ No newline at end of file
...@@ -72,6 +72,8 @@ if args.keylength == 1024 or args.keylength == 2048: ...@@ -72,6 +72,8 @@ if args.keylength == 1024 or args.keylength == 2048:
keylength = args.keylength keylength = args.keylength
if args.size != None and int(args.size) > 10 and int(args.size) < 800000: if args.size != None and int(args.size) > 10 and int(args.size) < 800000:
db_size = int(args.size)
else:
print( print(
"Please enter a database size between 11 and 800000 (We need a database containing atleast 10 entries to test the profiling phase)." "Please enter a database size between 11 and 800000 (We need a database containing atleast 10 entries to test the profiling phase)."
) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment