Finding Bugs and Features Using Cryptographically-Informed Functional Testing

Read full text
Authors: Giacomo Fenzi, Jan Gilcher, Fernando Virdia
Cited by: 0

Abstract

In 2018, Mouha et al. (IEEE Trans. Reliability, 2018) performed a postmortem investigation of the correctness of reference implementations submitted to the SHA3 competition run by NIST, finding previously unidentified bugs in a significant portion of them, including two of the five finalists. Their innovative approach allowed them to identify the presence of such bugs in a black-box manner, by searching for counterexamples of expected cryptographic properties of the implementations under test. In this work, we extend their approach to key encapsulation mechanisms (KEMs) and digital signature schemes (DSSs). We perform our tests on multiple versions of the LibOQS collection of post-quantum schemes to capture implementations at different points of the recent Post-Quantum Cryptography Standardization Process run by NIST. We identify multiple bugs, ranging from software bugs (segmentation faults, memory overflows) to cryptographic bugs, such as ciphertext malleability in KEMs claiming IND-CCA security. We also observe various features of KEMs and DSSs that do not contradict any security guarantees but could appear counter-intuitive. Finally, we compare this methodology with a traditional fuzzing campaign against LibOQS and SUPERCOP, observing that traditional fuzzing harnesses appear less effective in surfacing software and logical bugs.

Fields of Study & Subjects

Cryptographic Implementations and Security Software Testing and Debugging Techniques Cryptography and Data Security

Publication details

Journal / source
IACR Transactions on Cryptographic Hardware and Embedded Systems
Volume
2026
Issue
1
Pages
425–447
Publication date
16 January 2026
Language
EN