Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
/ prep-legendre Public archive

Time/Memory Tradeoffs for the Legendre Symbol

Notifications You must be signed in to change notification settings

FloydZ/prep-legendre

Repository files navigation

Introduction

This repository contains the benchmark code for the paper Legendre PRF (Multiple) Key Attacks and the Power of Preprocessin.

Requirements

  • cmake 3.20
  • c++ 20 compiler, something like clang++-14
  • gmp, gmpxx

Build Instructions:

To build the project simply run:

mkdir cmake-build-release
cd cmake-build-release/
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j1

Run Benchmark

To run a benchmark, simply execute

python gen.py -r 33 --iterations 10 --bench --executable code --include main.h

or

python gen.py -r 33 --iterations 10 --bench --executable code_noprep --include main.h

to generate data for all prime up the bit length 32, where each data point is averaged over 10 measurements. Note that you have the set the m value in the python script gen.py in line 94 depending on which setting (single-key or multiple-key) you want to benchmark. The resulting *.log file can be converted into an tikz readable format with python script plot.py.

About

Time/Memory Tradeoffs for the Legendre Symbol

Resources

Stars

Watchers

Forks