Serberus: Protecting Cryptographic Code from Spectres at Compile-Time
Nicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline Trippel

TL;DR
Serberus is a comprehensive compile-time mitigation that significantly enhances the security of constant-time cryptographic code against Spectre attacks, reducing leakage by addressing unsafe code patterns and leveraging hardware control-flow protections.
Contribution
Serberus introduces a novel approach combining hardware insights and code analysis to mitigate Spectre vulnerabilities in constant-time cryptographic implementations.
Findings
Reduces Spectre-related leakage in cryptographic code
Achieves lower runtime overhead than previous mitigations
Effectively addresses unsafe code patterns in constant-time code
Abstract
We present Serberus, the first comprehensive mitigation for hardening constant-time (CT) code against Spectre attacks (involving the PHT, BTB, RSB, STL and/or PSF speculation primitives) on existing hardware. Serberus is based on three insights. First, some hardware control-flow integrity (CFI) protections restrict transient control-flow to the extent that it may be comprehensively considered by software analyses. Second, conformance to the accepted CT code discipline permits two code patterns that are unsafe in the post-Spectre era. Third, once these code patterns are addressed, all Spectre leakage of secrets in CT programs can be attributed to one of four classes of taint primitives--instructions that can transiently assign a secret value to a publicly-typed register. We evaluate Serberus on cryptographic primitives in the OpenSSL, Libsodium, and HACL* libraries. Serberus introduces…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Physical Unclonable Functions (PUFs) and Hardware Security · Radiation Effects in Electronics
