arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2608.24498cs.CR

SeriCrypt:一种用于密码协议的大语言模型驱动的上下文感知序列化框架

SeriCrypt: An LLM-Driven Context-Aware Serialization Framework for Cryptographic Protocols

Maosong Chen, Xi Chen, Mengcheng Ju, Dongliang Zhao, Chunxiang Gu

AI总结:

SeriCrypt是一种大语言模型驱动的密码协议序列化框架,可自动构建符合要求的密码消息,在TLS等协议测试中表现优于主流模糊器,能发现规范违规并提升测试效果。

AI中文摘要:

构建语法正确且密码学有效的消息序列对于协议状态机学习、一致性测试和模糊测试至关重要。与明文协议不同,密码协议涉及复杂的跨消息状态依赖关系和密码学计算约束。现有的自动化方法主要针对基于文本或明文的协议,导致密码消息的构建大多依赖人工。我们提出SeriCrypt,一种用于密码协议的大语言模型驱动的上下文感知序列化框架。它利用大语言模型从非结构化协议规范中提取字段约束、状态依赖关系和密码学计算规则,生成统一的结构化中间表示,该表示由密码协议领域特定语言(CDSL)进行形式化表征。一个与协议无关的执行引擎解析CDSL声明,自动执行字段值解析、密码原语调用和字节流序列化。作为协议安全测试的案例研究,我们使用该框架构建针对规范定义的安全约束的违规消息,并支持协议模糊测试,在TLS 1.2/1.3、IKEv1/v2、SSH和TLCP的主流实现上进行评估。SeriCrypt生成的消息序列被所有评估的实现接受,并在所有场景中完成握手。安全约束测试发现了5个规范违规,且在相同时间预算下,模糊测试比主流模糊器达到更深的协议状态并具有更高的代码覆盖率,证明了该框架对密码协议安全测试的实用价值。

英文摘要:

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.

↑