Scratchy: Visual-Scratchpad Multimodal Reasoning for Cryptographic Proof Generation in EasyCrypt
Abstract
Large language models (LLMs) have recently made substantial progress in formal proof generation, yet presenting distinctive challenges in cryptographic area. Computational security arguments posit that a valid proof must coordinate probability, adversarial games, invariants, assumptions and bounds, which can be provided by a machine-checked framework named EasyCrypt. Although all objects may appear in available context, LLMs still struggle because proof-theoretic dependencies are typically implicit in a linear representation and distributed across multiple programs. So, this paper presents Scratchy, a visual-scratchpad approach that exposes these dependencies for multimodal generation. Given the natural-language security description, with formal context and target propositions, the proof objects can be normalized into a typed proof-relation graph. Then a structure-preserving visual compiler transforms the graph into the formula-rich visual proof state that guides a multimodal model in generating the EasyCrypt proof. Also, the Scratchy-eval, a 114-task dataset derived from reliable official EasyCrypt files, has been introduced. It contains 64 security-form proof generations and 50 multiple-choice knowledge tests. After a series of evaluations, covering semantic grounding, relational invariants, and game reductions, classical LLMs like GPT-5.6-Sol and Claude-Opus-5 have gained a clear advantage from Scratchy's structured visual proof states. This contrast suggests that explicit proof structure can make the improvement and multimodal proof-state representation as a promising direction for computer-aided cryptography.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- First version; 12 pages, 5 figures, and 5 tables
Related papers
Can AI Agents Find Flaws in Cryptographic Proofs?
Shared title terminologycs.CRTiancheng Mai, Qiang Tang, Sri AravindaKrishnan Thyagarajan et al.
AgentHijack: Visual Patch Attacks on Multimodal Computer-Use Agents
Shared title terminologycs.CRZhihao Liu, Hongyu Sun, Zhiyuan Fu et al.
PQCImplement-Bench: Evaluating LLMs on Implementing NIST Post-Quantum Standards in Production Cryptographic Libraries
Shared title terminologycs.CRSouhardya Saha Dip, Moshood A. Fakorede, A. B. Siddique et al.
Proof of Consent
Shared title terminologycs.CRDavid Schmid, Mihael Liskij, François Hublet et al.
zk-Sable: Per-Client Zero-Knowledge Proofs of Batched, Bit-Exact LLM Inference with Open Weights
Shared title terminologycs.CRTomer Solberg
ScamWeb: A Multimodal Benchmark for Grounded Understanding of Cyber-enabled Fraud Webpages
Shared title terminologycs.CRZhihua Wang, Nan Li, Ziyang Chen et al.