Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
dCTIDH Directory Reference
Directory dependency graph for dCTIDH:
E:/pqc-engineering-ssec-23/dCTIDH

Directories

 
main
 
src

Files

 
analyze_bench.py

Detailed Description

dCTIDH modified version

This repository contains auxiliary material taken from the dCTIDH repository. In particular, we list the modifications performed on the code below.

In addition, this repository includes the corresponding implementation of projective radical 3-isogenies.

Building

Use the flag option -DOPT_RAD=ARG_RAD with ARG_RAD=[0/1/2/3/4/5] to employ radical 3-isogenies. The code takes ARG_RAD=0 by default.

# Only necessary first time (generally)
rm -rf build/
mkdir build && cd build
cmake .. -DOPT_RAD=5
# Building
make

This builds the executables for 3 versions:

  • 2047m1l226
  • 2047m4l205
  • 2047m6l194

Benchmarking

usage (when in /build/main) :
./ctidh-2047m1l226.main // for a quick test
./ctidh-2047m1l226.main -bact [number of runs] // run benchmark for the action
./ctidh-2047m1l226.main -bkey [number of runs] // run benchmark for the action

The benchmarks can be analyzed using the analyze_bench.py script:

$ ./build/main/ctidh-2047m1l226.main -bkey 500 > bench_keygen.out
$ python3 analyze_bench.py < bench_action.out

Benchmarking script

To run the benchmarking script and generate the related statistics, please run

ssec-23/dCTIDH$ mkdir statistics_output
ssec-23/dCTIDH$ sudo bash benchmark_opt_rad.sh

This will generate a tree structure like the one shown below

tree_structure

To run the statistics, for a particular OPT_RAD, execute

ssec-23/dCTIDH$ python3 analyze_bench.py < statistics_output/<RESULTS_FOLDER>/OPT_RAD_<SELECTED_OPT_RAD>/bench_<KEYGEN_OR_ACT>_<dCTIDH_PRIME>_opt_rad_<SELECTED_OPT_RAD>.out

Examples:

ssec-23/dCTIDH$ python3 analyze_bench.py < statistics_output/results/OPT_RAD_0/bench_keygen_226_opt_rad_0.out
ssec-23/dCTIDH$ python3 analyze_bench.py < statistics_output/results/OPT_RAD_1/bench_act_205_opt_rad_1.out

This will output the results like the following

stats

where the highlighted number is the desired statistical result.

Constant-time Check

If DENABLE_CT_TESTING=ON, checkct versions of the executable are created for all versions, which can be validated with valgrind.

For example, to validate that ctidh-2047m6l194 is constant-time:

valgrind ./main/checkct-2047m6l194.main

Licenses

For the third-party code see their licenses: