Skip to content

Commit

Permalink
side_channels: Add ML KEM report
Browse files Browse the repository at this point in the history
  • Loading branch information
aewag committed Oct 11, 2024
1 parent 572e000 commit db6c77d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/audit_report/src/side_channels/01_00_results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ The descriptions usually also include the associated source code and, if applica
.. toctree::

01_01_lms
01_03_ml_kem
52 changes: 52 additions & 0 deletions docs/audit_report/src/side_channels/01_03_ml_kem.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"""""
ML KEM
"""""

Analysed variants:

- ML-KEM-512
- ML-KEM-768
- ML-KEM-1024

For the analysis of ML KEM, a utility was written that calls the functions to be analysed in a similar way to the Botan CLI.
The following call is used to perform the key encapsulation method:

.. code-block:: cpp
auto sk = Botan::Dilithium_PrivateKey(rng, mode);
Botan::PK_Signer sig(sk, rng, "Deterministic");
signature = sig.sign_message(message, rng);
The Botan library is configured using the following console prompt:

.. code-block::
./configure.py --prefix=~/workspace/bsi/DATA/cryptolib/botan/build --cc=gcc \
--cc-bin=g++-12 --cc-abi=-fno-plt --disable-modules sm4 --disable-sse2 \
--disable-ssse3 --disable-sse4.1 --disable-sse4.2 --disable-avx2 \
--disable-bmi2 --disable-rdrand --disable-rdseed --disable-aes-ni \
--disable-sha-ni --disable-altivec --disable-neon --disable-armv8crypto \
--disable-powercrypto --without-os-feature=threads --with-debug-info
The binary is compiled with the `gcc` compiler with the following version:

.. code-block::
$ g++-12 --version
g++-12 (Debian 12.2.0-14) 12.2.0
The host operating system is `Debian GNU/Linux 12 (bookworm)`.


**Summary**

No critical leak was identified.
All leaks found by DATA are unproblematic.
The reasoning for each identified leak is explained below.

**Leak: Polynomial matrix.**

A data leak was found in the ``sample_matrix()`` function which generates the Kyber polynomial matrix [BOTAN_ML_KEM_SAMPLE_MATRIX]_.
The polynomial matrix is generated using the public key.
This is therefore merely a leak of the public key, which is not considered problematic.
No leaks were found during decryption with the private key.

0 comments on commit db6c77d

Please sign in to comment.