International Association for Cryptologic Research

International Association
for Cryptologic Research

Crypto 2024

Formally Verifying Kyber:

Episode V: Machine-checked IND-CCA security and correctness of ML-KEM in EasyCrypt


José Bacelar Almeida
Universidade do Minho

Santiago Arranz Olmos
MPI-SP

Manuel Barbosa
U. Porto & MPI-SP

Gilles Barthe
MPI-SP & IMDEA Software Institute

Francois Dupressoir
University of Bristol, UK

Benjamin Gregoire
Université Côte d’Azur, Inria, France

Vincent Laporte
Université de Lorraine, CNRS, Inria, LORIA, France

Jean-Christophe Léchenet
Université Côte d’Azur, Inria, France

Cameron Low
University of Bristol, UK

Tiago Oliveira
MPI-SP

Hugo Pacheco
U. Porto

Miguel Quaresma
MPI-SP

Peter Schwabe
MPI-SP & Radboud University

Pierre-Yves Strub
PQShield SAS


Keywords: Formal verification, ML-KEM, Kyber, IND-CCA, Functional Correctness


Abstract

We present a formally verified proof of the correctness and IND-CCA security of ML-KEM, the Kyber-based Key Encapsulation Mechanism (KEM) undergoing standardization by NIST. The proof is machine-checked in EasyCrypt and it includes: 1) A formalization of the correctness (decryption failure probability) and IND-CPA security of the Kyber base public-key encryption scheme, following Bos et al. at Euro S&P 2018; 2) A formalization of the relevant variant of the FujisakiOkamoto transform in the Random Oracle Model (ROM), which follows closely (but not exactly) Hofheinz, Hövelmanns and Kiltz at TCC 2017; 3) A proof that the IND-CCA security of the ML-KEM specification and its correctness as a KEM follows from the previous results; 4) Two formally verified implementations of ML-KEM written in Jasmin that are provably constant-time, functionally equivalent to the ML-KEM specification and, for this reason, inherit the provable security guarantees established in the previous points. The top-level theorems give self-contained concrete bounds for the correctness and security of ML-KEM down to (a variant of) Module-LWE. We discuss how they are built modularly by leveraging various EasyCrypt features.

Publication

Crypto 2024

Paper

Artifact

Artifact number
crypto/2024/a3

Artifact published
August 15, 2024

README

tar.bz2 (2.6 MB)  

View on Github

License
CC0 To the extent possible under law, the author(s) have waived all copyright and related or neighboring rights to this artifact.

Some files in this archive are licensed under a different license. See the contents of this archive for more information.


BibTeX How to cite

Bacelar Almeida, J., Arranz Olmos, S., Barbosa, M., Barthe, G., Dupressoir, F., Gregoire, B., Laporte, V., Léchenet, J., Low, C., Oliveira, T., Pacheco, H., Quaresma, M., Schwabe, P., Strub, P. (2024). Formally verifying Kyber: Episode V: Machine-checked IND-CCA security and correctness of ML-KEM in EasyCrypt. In: Reyzin, L., Stebila, D. (eds) Advances in Cryptology – Crypto 2024. Lecture Notes in Computer Science, vol. 14921. Springer, Cham. https://doi.org/10.1007/978-3-031-68379-4_12. Artifact available at https://artifacts.iacr.org/crypto/2024/a3