8000 GitHub - PaZeZeVaAt/dCTIDH: dCTIDH: Fast & Deterministic CTIDH
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PaZeZeVaAt/dCTIDH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dCTIDH: Fast & Deterministic CTIDH

This repository contains auxiliary material for the paper "dCTIDH: Fast & Deterministic CTIDH".

Authors:

Overview

Building

We tested our code with gcc-12 on Debian 12. Furthermore, the implementation makes use of the ADX (ADOX and ADCX) instructions, so you need an Intel Broadwell/AMD ZEN CPU or newer.

# Only necessary first time (generally)
mkdir build && cd build
cmake ..

# If you want with instrumentation for constant-time behavior testing, 
#the default value is OFF. Valgrind development files are used for this build option.
cmake -DENABLE_CT_TESTING=ON ..

# Building
make

this builds the executeables for 3 versions:

  • 2047m1l226
  • 2047m4l205
  • 2047m6l194

benchmarking

Automated Benchmarking

The project includes automated benchmark targets that make it easy to run and analyze benchmarks for all enabled parameter sets:

# Run benchmarks for a specific parameter set
make benchmark-ctidh-2047m1l226

# Run all benchmarks and display a summary
make benchmark

# Show just the summary of previously run benchmarks 
make benchmark-summary

By default, benchmarks run with 100 iterations, which will take several hours. You can change this by setting the SECSIDH_BENCHMARK_RUNS option:

# Configure with 5 benchmark runs
cmake -DSECSIDH_BENCHMARK_RUNS=5 ..

The benchmark results are saved to files in the build directory:

  • Raw logs: benchmark-ctidh-<param_set>.log
  • Analysis results: benchmark-ctidh-<param_set>-analysis.log

Manual Benchmarking

You can also run benchmarks manually using the executable options: when in build:

usage: 	
    ./main/ctidh-2047m1l226.main				            // for a quick test
	./main//ctidh-2047m1l226.main -bact [number of runs]	// run benchmark for the action
	./main//ctidh-2047m1l226.main -bfp [number of runs]		// run benchmark for fp arithmetic

Each version contains benchmarking tools for the action, as well as the finite-field arithmetic, which can be used with -bact, resp. -bfp.

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

./main/ctidh-2047m1l226.main -bact 100 > bench_action.out
python3 ../analyze_bench.py < bench_action.out 

The analyze_bench.py script supports different output formats:

# Default grid format for terminal viewing
python3 ../analyze_bench.py < bench_action.out

# CSV format for importing into spreadsheets
python3 ../analyze_bench.py --format=csv < bench_action.out

# LaTeX format
python3 ../analyze_bench.py --format=latex < bench_action.out

constant-time check

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

e.G.:

valgrind ./main/checkct-2047m6l194.main

parameter search

We use greedy to find optimal configurations. The script explors the keyspace for primes with 151 to 226 ell_i and 1 to 18 batches. We recomend to split up the search, as this will take a while (up to a month using 4 jobs with 48 threads each).

cd scripts
./greedywombats.py

About

dCTIDH: Fast & Deterministic CTIDH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0