Relational Hoare Logic for Realistically Modelled Machine Code

📅 2025-05-20
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of verifying consistency between assembly code and realistic machine models in low-level verification—particularly for security properties requiring multi-trace correlation, such as constant-time behavior and cross-version equivalence. Existing relational verification techniques operate predominantly at high abstraction levels and lack direct support for concrete machine-code semantics. To bridge this gap, we introduce the first relational Hoare logic tailored to realistic machine models, formally defined in HOL Light. It features instruction-level memory and control-flow semantics, along with refinement-based relational specifications. Our approach enables rigorous, compositional verification of multi-trace relational properties. We demonstrate its effectiveness on the large s2n-bignum assembly library, verifying constant-time execution and functional equivalence between optimized and verification-friendly routine variants. The method significantly advances expressiveness, provability, and industrial applicability of low-level system security verification.

Technology Category

Application Category

📝 Abstract
Many security- and performance-critical domains, such as cryptography, rely on low-level verification to minimize the trusted computing surface and allow code to be written directly in assembly. However, verifying assembly code against a realistic machine model is a challenging task. Furthermore, certain security properties -- such as constant-time behavior -- require relational reasoning that goes beyond traditional correctness by linking multiple execution traces within a single specification. Yet, relational verification has been extensively explored at a higher level of abstraction. In this work, we introduce a Hoare-style logic that provides low-level, expressive relational verification. We demonstrate our approach on the s2n-bignum library, proving both constant-time discipline and equivalence between optimized and verification-friendly routines. Formalized in HOL Light, our results confirm the real-world applicability of relational verification in large assembly codebases.
Problem

Research questions and friction points this paper is trying to address.

Verifying assembly code against realistic machine models
Enabling relational reasoning for security properties like constant-time
Providing low-level expressive relational verification for large codebases
Innovation

Methods, ideas, or system contributions that make the work stand out.

Hoare-style logic for low-level relational verification
Proves constant-time behavior in assembly code
Formalized in HOL Light for real-world applicability
🔎 Similar Papers
2024-08-22arXiv.orgCitations: 2
2024-02-08International Conference on Machine LearningCitations: 6
D
Denis Mazzucato
Carnegie Mellon University
A
Abdalrhman Mohamed
Stanford University
J
Juneyoung Lee
Amazon Web Services
Clark Barrett
Clark Barrett
Stanford University
Formal MethodsSatisfiability Modulo TheoriesAutomated ReasoningVerificationSecurity
Jim Grundy
Jim Grundy
AWS
Hardware VerificationSoftware VerificationAutomated ReasoningTheorem Proving
J
John Harrison
Amazon Web Services
C
Corina S. Păsăreanu
Carnegie Mellon University