This repository includes the parallel implementation of Bleichenbacher's attack, described in the following research paper:
Akira Takahashi, Mehdi Tibouchi, and Masayuki Abe, "New Bleichenbacher Records: Fault Attacks on qDSA Signatures", IACR Transactions on Cryptographic Hardware and Embedded Systems (TCHES), Volume 2018, Issue 3. pp.331-371. TCHES eprint
sudo apt-get update && sudo apt-get install libfftw3-3 libfftw3-bin libfftw3-dev libgmp10 libgmpxx4ldbl
- Make sure that the OS has NUMA support. In Ubuntu 16.04, install the following packages:
sudo apt install numactl hwloc libhwloc-dev libnuma1 libnuma-dev
- Follow the instruction here
sudo ldconfig
- Download the source here and unpack it
./bootstrap.sh --prefix=path/to/project/root --with-libraries=mpi,program_options
- Open
project-config.jam
then addusing mpi ;
to the end ./b2 install
to build and install Boost.MPI
The qDSA source code under qDSA/Curve25519-asm
is based on the qDSA reference implementation (J. Renes).
We modified it using the assembly language implementation of Ed25519 (D.J.Bernstein et al.)
from SUPERCOP v20171218 under the directory crypto_sign/ed25519/amd64-64-24k
.
Both software is in the public domain.
Run make all
at the project root to create 3 executables: test_fft
, attack_mpi
, siggen_mpi
.
LD_LIBRARY_PATH=./lib mpirun -np <number-of-cores> attack_mpi <options>
--verbose
: enable verbose logging, raise the precision of progress--test
: run without the real qDSA signing algorithm
--out <filename>
: save generated signature to a file--leak <num_of_bits>
: number of nonce LSBs to be leaked--filter <num_of_bits>
: filter signatures by the values of h
- Generate 2-bit biased preprocessed qDSA signatures with the top 19-bit filtered
./siggen_mpi --leak 2 --filter 19 --out qdsa_a24_b2_f19
--in <file_prefix>
: load signature data and execute an attack--fcount <number>
: specifiy number of files to be loaded--known <number>
: number of known MSBs of the secret--red
: perform reduction--fft
: perform key recevoery
- Quick test using pseudo-Schnorr signature over 90-bit group
OMP_NUM_THREADS=1 mpirun -np 1 -x OMP_NUM_THREADS -map-by ppr:1:core --report-bindings --display-map ./attack_mpi --in data/test90_a12_b2_f10 --test --red --fft
- 5-round reduction test
OMP_NUM_THREADS=1 mpirun -np 1 -x OMP_NUM_THREADS -map-by ppr:1:core --report-bindings --display-map ./attack_mpi --in data/test252_a15_b0_f0 --red
--bind-to
--rank-by
--map-by
-x ENV_VAR_TO_PASS
--display-map
--display-allocation
--report-bindings
OMP_NUM_THREADS=16
GOMP_CPU_AFFINITY="0-16"