Search papers, labs, and topics across Lattice.
This paper introduces SeriCrypt, a novel framework that leverages large language models (LLMs) to automate the serialization of cryptographic protocols by extracting field constraints and dependencies from unstructured specifications. The framework's execution engine utilizes a domain-specific language for cryptographic protocols (CDSL) to facilitate the generation of valid message sequences, which were successfully tested against mainstream implementations like TLS and SSH. Key results show that SeriCrypt not only identified five security violations but also achieved superior code coverage in fuzzing compared to existing tools, highlighting its effectiveness in enhancing cryptographic protocol security testing.
SeriCrypt automates cryptographic message construction, uncovering security flaws and achieving unprecedented code coverage in fuzzing compared to traditional methods.
Constructing syntactically correct and cryptographically valid message sequences is essential for protocol state machine learning, conformance testing, and fuzzing. Unlike plaintext protocols, cryptographic protocols involve complex cross-message state dependencies and cryptographic computation constraints. Existing automated approaches predominantly target text-based or plaintext protocols, leaving cryptographic message construction largely manual. We present SeriCrypt, an LLM-driven, context-aware serialization framework for cryptographic protocols. It employs a large language model to extract field constraints, state dependencies, and cryptographic computation rules from unstructured protocol specifications into a unified structured intermediate representation, formally characterized by a domain-specific language for cryptographic protocols (CDSL). A protocol-agnostic execution engine parses CDSL declarations, automating field value resolution, cryptographic primitive invocation, and byte-stream serialization. As case studies in protocol security testing, we use the framework to construct violation messages targeting specification-defined security constraints and to support protocol fuzzing, evaluating it on mainstream implementations of TLS 1.2/1.3, IKEv1/v2, SSH, and TLCP. SeriCrypt generated message sequences accepted by all evaluated implementations and completed handshakes in every scenario. Security constraint testing revealed five specification violations, and fuzzing reached deeper protocol states with higher code coverage than mainstream fuzzers under the same time budget, demonstrating the framework's practical value for cryptographic protocol security testing.