Tamgram: A Frontend for Large-scale Protocol Modeling in Tamarin
Di Long Li, Jim de Groot, Alwen Tiu
TL;DR
Tamgram provides a high-level, modular frontend for the Tamarin prover, designed to address the scalability and maintainability challenges of large-scale security protocol specifications. It marries an ML-style module system, hygienic macros, and process-local memory to capture complex stateful interactions, while remaining faithful to Tamarin through a formal, trace-preserving translation. The authors develop a CFG-based intermediate representation and analyze multiple translation strategies, concluding that a hybrid forward/backward approach yields performance close to manually coded Tamarin models and improves readability. Empirical results on EMVerify and CSF18 XOR demonstrate practical viability and the potential for significant usability gains in real-world protocol modeling. The work lays groundwork for future optimizations, heuristic-guided proof strategies, and back-translation tools to bridge compiled proofs with source Tamgram models.
Abstract
Automated security protocol verifiers such as ProVerif and Tamarin have been increasingly applied to verify large scale complex real-world protocols. While their ability to automate difficult reasoning processes required to handle protocols at that scale is impressive, there remains a gap in the modeling languages used. In particular, providing support for writing and maintaining large protocol specifications. This work attempts to fill this gap by introducing a high-level protocol modeling language, called Tamgram, with a formal semantics that can be translated to the multiset rewriting semantics of Tamarin. Tamgram supports writing native Tamarin code directly, but also allows for easier structuring of large specifications through various high-level constructs, in particular those needed to manipulate states in protocols. We prove the soundness and the completeness of Tamgram with respect to the trace semantics of Tamarin, discuss different translation strategies, and identify an optimal strategy that yields performance comparable to manually coded Tamarin specifications. Finally we show the practicality of Tamgram with a set of small case studies and one large scale case study.
