Persistent Fault Analysis on Block Ciphers

Fan Zhang, Xiaoxuan Lou, Xinjie Zhao, Shivam Bhasin, Wei He, Ruyi Ding, Samiya Qureshi, Kui RenIACR Trans. Cryptogr. Hardw. Embed. Syst 2018

Introduction

Fault Attacks (FA) have long been a significant threat to embedded security. Traditionally, these attacks are "transient," requiring precise timing to flip a bit during a specific encryption cycle. Such attacks often necessitate access to both correct and faulty ciphertexts (Differential Fault Analysis) and can be mitigated by Dual Modular Redundancy (DMR), where encryption is performed twice and results are compared.

This paper introduces Persistent Fault Analysis (PFA), a novel class of side-channel attack that exploits faults lingering in a device's memory. By "poisoning" cryptographic constants like S-boxes, PFA bypasses traditional DMR defenses and eliminates the need for microsecond-level timing precision.

The Persistent Fault Model

Unlike transient faults, a persistent fault occurs when an attacker modifies a stored lookup table (e.g., in RAM or ROM). This error persists across all subsequent encryptions. Because the fault resides in the "source of truth" used by both redundant modules in a DMR system, both modules produce the same erroneous output, allowing the fault to go undetected by standard integrity checks.

Methodology

PFA shifts the attack from a timing-based challenge to a statistical analysis of ciphertext distributions.

  1. Fault Injection: Attackers can use techniques like Rowhammer to flip a bit in a stored S-box. This fault remains until a system reboot.
  2. Statistical Analysis: A faulty S-box entry creates biases in the output. Specifically, the original correct value will never appear (impossible values), while the new faulty value will appear with double the expected frequency.
  3. Key Recovery: By collecting a sufficient number of ciphertexts, an attacker can build a probability distribution and identify these "holes" or peaks to reverse-engineer the last round key.
Persistent Fault Analysis model showing the impact of a faulty S-box on ciphertext probability distributions.

As shown in the figure above, normal encryption produces a uniform distribution of substitution outputs. In contrast, faulty encryption creates a "Fault model" where certain values are impossible ($Pr=0$) and others are more frequent ($max(Pr)$). These statistical anomalies are exploited for key guessing.

Experimental Results

The researchers evaluated PFA using both FPGA emulations of AES-128 and real-world software libraries like Libgcrypt 1.6.3.

  • Efficiency: For unprotected AES-128, the master key can be extracted with approximately 2,000 ciphertexts. Even in systems hardened with DMR, the attack succeeds with roughly 8,200 ciphertexts.
  • Rowhammer Feasibility: In a case study targeting Libgcrypt on a standard laptop, a persistent bit-flip was successfully injected into T-tables via Rowhammer in an average of 64 minutes. Key recovery followed almost instantaneously.
Key candidate reduction as a function of sample size, demonstrating the efficiency of PFA.

The figure above illustrates how the number of remaining key candidates decreases as the sample size increases. In this example, the key space is reduced to a single candidate after approximately 1,400 samples, highlighting the potency of the statistical approach.

Key Insights

  • Bypassing Redundancy: PFA's most significant advantage is its ability to circumvent DMR. Since the fault is persistent in memory, the redundancy check effectively performs a "double-error" check, which appears as a success.
  • Relaxed Constraints: The attack removes the requirement for tight synchronization. An attacker can inject a fault and collect data hours later.
  • Information from Absence: The "Power of Zero" — knowing which values cannot occur — provides substantial information for key recovery, making the attack highly efficient.

Conclusion and Future Work

While PFA requires more ciphertexts than Differential Fault Analysis (DFA), its ability to bypass hardware defenses and its relaxed timing requirements make it a formidable threat. Future research may extend PFA to earlier rounds of block ciphers or apply similar statistical techniques to asymmetric ciphers like RSA and ECC. Implementing periodic health checks for cryptographic constants remains a vital, though often overlooked, defense mechanism.

Summary updated

BibTeX
@article{zhang2018persistent,
  author = {Fan Zhang and Xiaoxuan Lou and Xinjie Zhao and Shivam Bhasin and Wei He and Ruyi Ding and Samiya Qureshi and Kui Ren},
  title = {{Persistent Fault Analysis on Block Ciphers}},
  journal = {IACR Trans. Cryptogr. Hardw. Embed. Syst.},
  year = {2018},
  url = {https://openreview.net/forum?id=rilxL7qUqL7},
}
Figure