A program that maintains key safety properties even when interacting with arbitrary untrusted code is said to enjoy \emph{robust safety}. Proving that a program written in a mainstream language is robustly safe is typically challenging because it requires static verification tools that work precisely even in the presence of language features like dynamic dispatch and shared mutability. The emerging \move programming language was designed to support strong encapsulation and static verification in the service of secure smart contract programming. However, the language design has not been analyzed using a theoretical framework like robust safety. In this paper, we define robust safety for the \move language and introduce a generic framework for static tools that wish to enforce it. Our framework consists of two abstract components: a program verifier that can prove an invariant holds in a closed-world setting (e.g., the Move Prover), and a novel \emph{encapsulator} that checks if the verifier's result generalizes to an open-world setting. We formalise an escape analysis as an instantiation of the encapsulator and prove that it attains the required security properties. Finally, we implement our encapsulator as an extension to the Move Prover and use the combination to analyze a representative benchmark set of real-world \move programs. This toolchain certifies $>$99\% of the \move modules we analyze, validating that automatic enforcement of strong security properties like robust safety is practical for \move.
翻译:维护关键安全特性的程序, 即使与任意的不受信任的代码进行互动, 也被认为享有 \ emph{ robust 安全} 。 证明以主流语言撰写的程序非常安全, 通常具有挑战性, 因为它需要静态的核查工具, 即使在动态发送和共享变异性等语言特性存在的情况下, 也需要静态的核查工具。 正在形成的 \ 移动的编程语言旨在支持强大的封装和静态核查, 用于安全的智能合同编程。 然而, 语言设计没有使用像强健安全这样的理论框架来分析。 在本文中, 我们定义了\ 移动语言的稳健安全性, 并引入了一个静态工具的通用框架, 想要执行它。 我们的框架由两个抽象的构件组成: 一个程序核查器, 可以证明在封闭世界的设置( 例如 Move Prover) 和 新的 emphémo 校准程序, 用来检查校准校准校准验证校准一个安全性模型, 。 我们将一个用于将安全性安全性模型的校准工具 。