Skip to content

Latest commit

 

History

History
110 lines (90 loc) · 2.88 KB

File metadata and controls

110 lines (90 loc) · 2.88 KB

Requirements

The following dependencies must be installed:

  • GMP 6.3.0
  • NTL 11.5.1
  • Falcon 2021-11-01 (Optional)
  • Clang 18.1.3 (Optional - necessary if Falcon is used)

NOTE: it may work with greater (or lesser) versions.

Tested with Ubuntu 22.04 and 24.04, where the dependencies can be simply installed as:

sudo apt install wget tar xz-utils unzip make m4 g++ libgmp10 libgmp-dev libntl44 libntl-dev clang

Otherwise, please follow the instructions below to build and install them manually.

GMP

wget https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
tar xf gmp-6.3.0.tar.xz
cd gmp-6.3.0/
./configure
make
make check
sudo make install

cd ..

NTL

wget https://libntl.org/ntl-11.5.1.tar.gz
gunzip ntl-11.5.1.tar.gz 
tar xf ntl-11.5.1.tar 
cd ntl-11.5.1/src/
./configure
make
make check
sudo make install

cd ../..

Falcon (Optional)

The Makefile is configured with USE_FALCON = 1 (default), to automatically download and use the Falcon reference implementation, for better performance.

It can also be manually downloaded and built as a library with the following commands:

wget https://falcon-sign.info/Falcon-impl-20211101.zip
unzip Falcon-impl-20211101.zip
cd Falcon-impl-20211101
make -j$(nproc)
ar rcs libfalcon.a codec.o common.o falcon.o fft.o fpr.o keygen.o rng.o shake.o sign.o vrfy.o
cd ..

Download, Build & Run

After installing the dependencies, you can download this repository and build the BLNS and bench executables as follows:

wget https://github.com/Cybersecurity-LINKS/pqzk-blns/archive/refs/heads/main.zip -O ./BLNS.zip
unzip ./BLNS.zip
cd  pqzk-blns-main

make -j$(nproc)

then, run a demo of the BLNS framework and/or run the benchmarks bench:

./BLNS
./bench

Build & Run with Docker

As an alternative, it is possible to build and run the code with Docker, using dockerfile_blns that is located in the top-level directory of the repository.

First, build the Docker image from dockerfile_blns (it may take some time):

docker build -t blns_test -f .\dockerfile_blns .

Then, run the Docker container and a demo of the BLNS framework and/or the benchmarks bench:

docker run -t blns_test ./BLNS
docker run -t blns_test ./bench

or open an interactive terminal to run the BLNS and/or bench executables:

docker run -it blns_test /bin/bash

./BLNS
./bench

Additional information

GMP

NTL

Falcon

Docker