International Association for Cryptologic Research

International Association
for Cryptologic Research

EUROCRYPT 2025

A Generic Framework for Side-Channel Attacks against LWE-based Cryptosystems


README

A Generic Framework for Side-Channel Attacks against LWE-based Cryptosystems

Artifacts for the IACR publication in EUROCRYPT 2025, see https://ia.cr/2024/1211 for an extended version.

Note

Note that this repository does not contain the final cleaned-up version of the solver but the version we used during the evaluation.
It still contains unfinished features and unfinished/failed attempts at improvements.
Some performance improvements relevant for sparser hints have also been implemented after the evaluations.
For the latest version, see https://github.com/juliusjh/distribution_hints_solvers.

Reproduction Instructions

Requirements:

Setup environment:

Campaign Script

To quickly reproduce the figures (albeit without the final formatting present in the publication), the genfigures.sh script can be used:

Calls to reproduce Figures

The following calls require tmux (see https://github.com/tmux/tmux/wiki). After calling them, use tmux attach to see the output of the calls. Results will be under results/.
The plot script will generate the coordinates in a pgfplots compatible format, as well as simple coordinates based on the result json.
For general usage see below.

Fig. 3:

a)

b)

and

c)

d)

Fig. 4:

and

Fig. 6:

and

Fig. 7:

and

Fig. 8:

and

Fig. 9:

and

(same as in Fig. 7)
- run: ./start_runs_all_threads.sh nt_leakage_hw.json nt_hw_greedy.json 18 nt_hw_numerical_gr
- plot: python scripts/plot.py -y bikz_avg bikz_min bikz_max -x sigma -p solver sigma nfac conv --use-all-jsons --sorted results/nt_leakage_hw_nt_hw_greedy

Fig. 10:

and

Fig. 11:

and

runtime

and

and

and

General usage

Use python eval.py [leakage_file] [setting file] --threads $THREADS --parts [from which setting to which setting].

For plotting use python scripts/plot.py -y [y_axis] -x [x_axis] --parameters [list all paremerts] --use-all-jsons --sorted [path_to_json].

Settings

Fig. 3:

a) perfect_hint.json hints.json
b) perfect_hint_bino.json hints.json and perfect_hint_bino.json bino_hints.json
c) approximate_hint.json approximate_hint_greedy.json
d) approximate_hint_bino.json approximate_hint.json

Fig. 4:

approximate_hint.json approximate_hint_single_greedy.json and approximate_hint_bino.json approximate_hint.json

Fig. 6:

nt_leakage_value.json nt_vl_bp.json and nt_leakage_value.json nt_vl_greedy.json

Fig. 7:

nt_leakage_hw.json nt_hw_bp.json and nt_leakage_hw.json nt_hw_greedy.json

Fig. 8:

nt_leakage_intt.json nt_hw_intt_bp.json and nt_leakage_intt.json nt_hw_intt_greedy.json

Fig. 9:

nt_leakage_hw.json numerical_bp.json
and
(same as in Fig. 7)
nt_leakage_hw.json nt_hw_greedy.json

Fig. 10:

nt_leakage_hw.json conv_eval_bp.json
and
nt_leakage_hw.json conv_eval_gr.json

Fig. 11:

modular_hint.json mod_hints_uni.json and modular_hint_bino.json mod_hints_uni.json

runtime

perfect_hint_bino.json runtime_perf.json with 40 threads and 1 thread,
approximate_hint_bino.json runtime.json with 40 threads, and
approximate_hint_bino.json runtime_greedy.json with 1 thread