🤖 AI Summary
This work addresses the challenge of formally guaranteeing security and correctness in the automated generation of authenticated data structures (ADS). We introduce the first relational separation logic supporting collision-resistant hash functions and construct a bilingual semantic model in Coq to rigorously characterize type abstraction security. Based on this logic, we implement fully automatic code generation for an ADS library and mechanize proofs of its functional correctness, memory safety, and equivalence of key optimizations. Moreover, we establish the first formal framework proving secure interoperability between automatically generated code and hand-optimized implementations. Our approach integrates Iris concurrent separation logic with cryptographic hash modeling, enabling end-to-end trustworthiness under a unified formal foundation. The result is a verifiable construction paradigm for high-assurance ADS systems.
📝 Abstract
Authenticated data structures allow untrusted third parties to carry out operations which produce proofs that can be used to verify an operation's output. Such data structures are challenging to develop and implement correctly. This paper gives a formal proof of security and correctness for a library that generates authenticated versions of data structures automatically. The proof is based on a new relational separation logic for reasoning about programs that use collision-resistant cryptographic hash functions. This logic provides a basis for constructing two semantic models of a type system, which are used to justify how the library makes use of type abstraction to enforce security and correctness. Using these models, we also prove the correctness of several optimizations to the library and then show how optimized, hand-written implementations of authenticated data structures can be soundly linked with automatically generated code. All of the results in this paper have been mechanized in the Coq proof assistant using the Iris framework.