top of page

Hallucinating Certificates: Differential Testing of TLS Certificate Validation Using Generative Language Models

Muhammad Talha Paracha, Kyle Posluns, Kevin Borgolte, Martina Lindorfer, David Choffnes

Conference Paper

|

September 11, 2026

Certificate validation is a crucial step in Transport Layer Security (TLS), the de facto standard network security protocol. Prior research has shown that differentially testing TLS implementations with synthetic certificates can reveal critical security issues, such as accidentally accepting untrusted certificates. Leveraging known techniques, like random input mutations and program coverage guidance, prior work created corpora of synthetic certificates. By testing the certificates with multiple TLS libraries and comparing the validation outcomes, they discovered new bugs. However, they cannot generate the corresponding inputs efficiently, or they require to model the programs and their inputs in ways that scale poorly. In this paper, we introduce a new approach, MLCerts, to generate synthetic certificates for differential testing that leverages generative language models to more extensively test software implementations. Recently, these models have become (in)famous for their applications in generating content, writing code, and conversing with users, as well as for “hallucinating” syntactically correct yet semantically nonsensical output. In this paper, we provide and leverage two novel insights: (a) TLS certificates can be expressed in natural-like language, namely in the X.509 standard that aids human readability, and (b) differential testing can benefit from hallucinated malformed test cases. Using our approach MLCerts, we find significantly more distinct discrepancies between the five TLS implementations OpenSSL, LibreSSL, GnuTLS, MbedTLS, and MatrixSSL than the state-of-the-art benchmark Transcert (+30%; 20 vs 26, out of a maximum possible of 30) and an order of magnitude more than the seminal work Frankencerts (+1,200%; 2 vs 26). Finally, we show that the diversity of MLCerts -generated certificates reveals a range of previously unobserved and interesting behavior with security implications.

citation

Paracha, M. T., Posluns, K., Borgolte, K., Lindorfer, M., & Choffnes, D. (2026). Hallucinating Certificates: Differential Testing of TLS Certificate Validation Using Generative Language Models. Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering, 3698-3710. https://doi.org/10.1145/3744916.3773203

topics

Artificial Intelligence

Online Privacy

Artificial Intelligence

Artificial Intelligence

related work

Rectangle 35

Measuring Agency-Amplifying AI Literacy: The HuskyAI Coaching Platform for Workforce Readiness

July 2026

HuskyAI is a web platform on which students develop AI knowledge by working through authentic

Artificial Intelligence

Artificial Intelligence

Working Paper

Rectangle 35

Measuring Agency-Amplifying AI Literacy: The HuskyAI Coaching Platform for Workforce Readiness

July 2026

HuskyAI is a web platform on which students develop AI knowledge by working through authentic

Artificial Intelligence

Artificial Intelligence

Working Paper

Rectangle 35

Measuring Agency-Amplifying AI Literacy: The HuskyAI Coaching Platform for Workforce Readiness

July 2026

HuskyAI is a web platform on which students develop AI knowledge by working through authentic

Artificial Intelligence

Artificial Intelligence

Working Paper

bottom of page