Cipherfix: Mitigating Ciphertext Side-Channel Attacks in Software

Jan Wichelmann, Anna Pätschke, Luca Wilke, Thomas Eisenbarth
10/24/2022
cs.CR

Official code: UzL-ITS/cipherfix (7 stars, C++, last commit 2023-08-23).

Abstract

Trusted execution environments (TEEs) provide an environment for running workloads in the cloud without having to trust cloud service providers, by offering additional hardware-assisted security guarantees. However, main memory encryption as a key mechanism to protect against system-level attackers trying to read the TEE's content and physical, off-chip attackers, is insufficient.

Show full abstract

The recent Cipherleaks attacks infer secret data from TEE-protected implementations by analyzing ciphertext patterns exhibited due to deterministic memory encryption. The underlying vulnerability, dubbed the ciphertext side-channel, is neither protected by state-of-the-art countermeasures like constant-time code nor by hardware fixes. Thus, in this paper, we present a software-based, drop-in solution that can harden existing binaries such that they can be safely executed under TEEs vulnerable to ciphertext side-channels, without requiring recompilation. We combine taint tracking with both static and dynamic binary instrumentation to find sensitive memory locations, and mitigate the leakage by masking secret data before it gets written to memory. This way, although the memory encryption remains deterministic, we destroy any secret-dependent patterns in encrypted memory. We show that our proof-of-concept implementation protects various constant-time implementations against ciphertext side-channels with reasonable overhead.

View on arXivView PDF

Code Implementations(1)

UzL-ITS/cipherfixOfficial100%

Source code of the Cipherfix framework for fixing ciphertext side-channels.

71C++, C#Oct 24, 20223 years agoNOASSERTION

Similar Papers

Cite this paper

@article{wichelmann2022cipherfix,
  title  = {Cipherfix: Mitigating Ciphertext Side-Channel Attacks in Software},
  author = {Jan Wichelmann and Anna Pätschke and Luca Wilke and Thomas Eisenbarth},
  year   = {2022},
  eprint = {2210.13124},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.13124}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.13124.svg)](https://codeofpaper.com/paper/2210.13124)

Discussion