Published October 21, 2025 | Version v1
Conference paper Open

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

Description

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.

Files

Formal Verification of PKCS#1 Signature Parser,using Frama-C.pdf

Files (630.6 kB)

Additional details

Funding

European Commission
SecOPERA - Secure OPen source softwarE and hardwaRe Adaptable framework 101070599