Lune

USENIX Security2025Top-tier venue

Shadows in Cipher Spaces: Exploiting Tweak Repetition in Hardware Memory Encryption

Wei Peng, Yinshuai Li, Yinqian Zhang

Abstract

Hardware memory encryption serves as the foundation for TEE security, where processors transparently encrypt data bound for DRAM while maintaining plaintext within CPU boundaries-a critical defense against physical attacks like memory bus snooping and cold-boot attacks. Although ubiquitous in major TEE implementations (Intel SGX/TDX, AMD SEV), design flaws have introduced severe vulnerabilities including ciphertext replacement attacks, ciphertext replay attacks, and ciphertext side-channel attacks. Our work makes three key contributions: First, we present the first comprehensive analysis of Hygon CSV's memory encryption engine, a prominent TEE in China's confidential computing market. Second, we identify a novel vulnerability class stemming from tweak value repetition within 64byte blocks, causing identical 16-byte plaintexts to generate identical ciphertexts. Third, we demonstrate how this enables CipherShadow Attacks through: (1) an automated binary scanner detecting vulnerable code patterns, (2) end-to-end attacks demonstrating both OpenSSH authentication bypass and machine learning training data reconstruction.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A Systematic Look at Ciphertext Side Channels on AMD SEV-SNP cites SEVurity: No Security Without Integrity : Breaking Integrity-Free Memory Encryption with Minimal Assumptions
  • A Systematic Look at Ciphertext Side Channels on AMD SEV-SNP cites CIPHERLEAKS: Breaking Constant-time Cryptography on AMD SEV via the Ciphertext Side Channel
  • A Systematic Look at Ciphertext Side Channels on AMD SEV-SNP cites Exploiting Unprotected I/O Operations in AMD's Secure Encrypted Virtualization
  • SEVurity: No Security Without Integrity : Breaking Integrity-Free Memory Encryption with Minimal Assumptions cites Exploiting Unprotected I/O Operations in AMD's Secure Encrypted Virtualization
  • CIPHERLEAKS: Breaking Constant-time Cryptography on AMD SEV via the Ciphertext Side Channel cites SEVurity: No Security Without Integrity : Breaking Integrity-Free Memory Encryption with Minimal Assumptions
  • CIPHERLEAKS: Breaking Constant-time Cryptography on AMD SEV via the Ciphertext Side Channel cites Exploiting Unprotected I/O Operations in AMD's Secure Encrypted Virtualization
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on13

  1. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
  2. CIPHERLEAKS: Breaking Constant-time Cryptography on AMD SEV via the Ciphertext Side ChannelMengyuan Li, Yinqian Zhang, Huibo Wang, Kang Li et al.USENIX Security 2021 · 130 citations
  3. Exploiting Unprotected I/O Operations in AMD's Secure Encrypted VirtualizationMengyuan Li, Yinqian Zhang, Zhiqiang Lin, Yan SolihinUSENIX Security 2019 · 104 citations
  4. A Systematic Look at Ciphertext Side Channels on AMD SEV-SNPMengyuan Li, Luca Wilke, Jan Wichelmann, Thomas Eisenbarth et al.S&P 2022 · 87 citations
  5. SEVurity: No Security Without Integrity : Breaking Integrity-Free Memory Encryption with Minimal AssumptionsLuca Wilke, Jan Wichelmann, Mathias Morbitzer, Thomas EisenbarthS&P 2020 · 72 citations

Related papers

  1. Cipherfix: Mitigating Ciphertext Side-Channel Attacks in SoftwareJan Wichelmann, Anna Pätschke, Luca Wilke, Thomas EisenbarthUSENIX Security 2023
  2. TEE.Fail: Breaking Trusted Execution Environments via DDR5 Memory Bus InterpositionJalen Chuang, Alexander Seto, Nicolás Berrios, Stephan van Schaik et al.S&P 2026 · 29 citations
  3. CipherH: Automated Detection of Ciphertext Side-channel Vulnerabilities in Cryptographic ImplementationsSen Deng, Mengyuan Li, Yining Tang, Shuai Wang et al.USENIX Security 2023
  4. Battering RAM: Low-Cost Interposer Attacks on Confidential Computing via Dynamic Memory AliasingJesse De Meulemeester, David F. Oswald, Ingrid Verbauwhede, Jo Van BulckS&P 2026 · 20 citations
  5. CipherSteal: Stealing Input Data from TEE-Shielded Neural Networks with Ciphertext Side ChannelsYuanyuan Yuan, Zhibo Liu, Sen Deng, Yanzuo Chen et al.S&P 2025
Dusk over the sea between two cliffs drawn in fine vertical lines