International Association for Cryptologic Research

International Association
for Cryptologic Research

Advances in Cryptology – ASIACRYPT 2025

Solving Concealed ILWE and Its Application for Breaking Masked Dilithium


README

Solving Concealed ILWE and its Application for Breaking Masked Dilithium

The paper was published at AsiaCrypt 2025.

The paper and BibTex is available at https://eprint.iacr.org/2025/1629

In this repository, we provide three main artifacts and and export function.

  1. Comparison of regression methods ("regression"):
    This folder contains a docker image and all the code to rerun our simulated CILWE samples on the basis of Dilithium for all security levels (Figure 6 of the paper)
  2. Simulation of CILWE on Dilithium ("simulation_umts24"):
    This folder contains our simulated attack on Dilithium along the lines of UMTS24 (table 2 of the paper).
  3. Attack on masked Dilithium ("attack"):
    This folder contains the code for our machine learning aided side channel analysis of a first order masked Dilithium implementation.
  4. Regression Algorithms ("simulation_umts24"):
    In this folder, we also provide a method that implements the Huber and Cauchy Regression in Python. Please refer to the last section of the readme for usage instructions.

Comparison of regression methods

We investigated different regression methods for the Concealed Integer Learning with Errors (CILWE) problem.
Given different error rates, we test how many samples an instance must contain to be most likely solvable.

The experiment was originally run with Mosek as a solver. This solver is commercial, but offers free academic licences.
We included a version with free solvers, that may yield slightly different results.

Included Methods

Docker Usage [Recommended]

Local Usage

If in doubt, use the method via docker as described above.

Simulation of CILWE on Dilithium

The simulation_umts24 file provides the code to generate the Dilithium signatures, simulate a Machine learning Classifier as described by UMTS24 and run the attack with robust regressions.
Note that this code needs to generate signatures and save them to disk, before the attack can take place.

Sample calls work like this:

Attack on masked Dilithium

The jupyter notebook attack.ipynb and additional scripts in attack/* contain the code to execute the attack against the first-order masked Dilithium implementation [CGTZ23] for NIST security levels 2, 3 and 5 as described in the AsiaCrypt paper.
Install dependencies from requirements_attack.txt to run the attack notebook. Within the notebook the attack data (power traces, classifier, signature data) as used in the paper may be downloaded to reproduce
the paper's results. Further descriptions are found within the notebook and the helper scripts inside attack.

The target device's firmware, wrapping the attacked impconvBA64_rec() function can be found in attack/firmware/firmware.c.

The C and C++ code of the data generator is found in attack/data_generator. To compile the dependencies libnpy and masked Dilithium implementation need to be installed into attack/data_generator/extern, this can be done from within the notebook. Build using cmake for specified security level (DILITHIUM_MODE) by executing export DILITHIUM_MODE=<2,3,5> && ./attack/data_generator/build.sh. The output data (format) is described within the notebook (Section 2.1).

Implementation of Regression Algorithms

We provide our own implementation of the Huber and Cauchy Regression algorithms, which allow for a more fine-grained control than Scikit-Learn or statspy. If you want to use this, please import "irls" from "simulation_umts24/simulation_umts24". The syntax of the method works as follows:

Inputs

Return Values

The function returns two values: