Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow Linearization

04/21/2021
by   Pietro Borrello, et al.
0

In the era of microarchitectural side channels, vendors scramble to deploy mitigations for transient execution attacks, but leave traditional side-channel attacks against sensitive software (e.g., crypto programs) to be fixed by developers by means of constant-time programming (i.e., absence of secret-dependent code/data patterns). Unfortunately, writing constant-time code by hand is hard, as evidenced by the many flaws discovered in production side channel-resistant code. Prior efforts to automatically transform programs into constant-time equivalents offer limited security or compatibility guarantees, hindering their applicability to real-world software. In this paper, we present Constantine, a compiler-based system to automatically harden programs against microarchitectural side channels. Constantine pursues a radical design point where secret-dependent control and data flows are completely linearized (i.e., all involved code/data accesses are always executed). This strategy provides strong security and compatibility guarantees by construction, but its natural implementation leads to state explosion in real-world programs. To address this challenge, Constantine relies on carefully designed optimizations such as just-in-time loop linearization and aggressive function cloning for fully context-sensitive points-to analysis, which not only address state explosion, but also lead to an efficient and compatible solution. Constantine yields overheads as low as 16 benchmarks and can handle a fully-fledged component from the production wolfSSL library.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/24/2022

Cipherfix: Mitigating Ciphertext Side-Channel Attacks in Software

Trusted execution environments are quickly rising in popularity as they ...
research
07/04/2019

Security Implications Of Compiler Optimizations On Cryptography -- A Review

When implementing secure software, developers must ensure certain requir...
research
06/29/2020

SeMPE: Secure Multi Path Execution Architecture for Removing Conditional Branch Side Channels

One of the most prevalent source of side channel vulnerabilities is the ...
research
08/30/2018

Data-Driven Debugging for Functional Side Channels

Functional side channels arise when an attacker knows that the secret va...
research
04/26/2023

Thwarting Code-Reuse and Side-Channel Attacks in Embedded Systems

Embedded devices are increasingly present in our everyday life. They oft...
research
09/02/2022

Binsec/Rel: Symbolic Binary Analyzer for Security with Applications to Constant-Time and Secret-Erasure

This paper tackles the problem of designing efficient binary-level verif...
research
02/25/2021

Swivel: Hardening WebAssembly against Spectre

We describe Swivel, a new compiler framework for hardening WebAssembly (...

Please sign up or login with your details

Forgot password? Click here to reset