Formal Verification of PKCS#1 Signature Parser Using Frama-C

Martin Hána, Nikolai Kosmatov, Virgile Prevosto, Julien Signoles

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Message parsing represents a complex security-critical problem. It has been demonstrated by numerous real-world exploits on parsers, e.g. on PKCS#1 (Public-Key Cryptography Standard) v1.5 signature, X.509 certificate chain, or infamously on a TLS extension during the Heartbleed attack. In this case study, we perform formal verification of a PKCS#1 v1.5 signature parser using Frama-C, where the verification of the parser is realized for the first time directly over the actual implementation in C. This brings highest guarantees of security and functional properties, while leaving developers the flexibility to adapt the code to the project’s specific requirements. We present the proven properties, our verification approach and results. In particular, this work rules out applications of any variants of Bleichenbacher’s signature forgery and ensures that we are able to detect potential parser incompatibilities. This work opens the door to future extensions to other protocols, for example, for parsing DER ASN.1 encoding of X.509 certificates and CRLs (Certificate Revocation Lists).

Original languageEnglish
Title of host publicationIntegrated Formal Methods - 20th International Conference, iFM 2025, Proceedings
EditorsFerruccio Damiani, Marie Farrell
PublisherSpringer Science and Business Media Deutschland GmbH
Pages336-358
Number of pages23
ISBN (Print)9783032107930
DOIs
Publication statusPublished - 1 Jan 2026
Externally publishedYes
Event20th International Conference on integrated Formal Methods, iFM 2025 - Paris, France
Duration: 19 Nov 202521 Nov 2025

Publication series

NameLecture Notes in Computer Science
Volume16194 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference20th International Conference on integrated Formal Methods, iFM 2025
Country/TerritoryFrance
CityParis
Period19/11/2521/11/25

Fingerprint

Dive into the research topics of 'Formal Verification of PKCS#1 Signature Parser Using Frama-C'. Together they form a unique fingerprint.

Cite this