Algebraic fault analysis of SHA-3

Pei Luo, Konstantinos Athanasiou, Yunsi Fei, Thomas Wahl

TL;DR

This paper introduces Algebraic Fault Analysis (AFA) as a novel and highly effective method for attacking SHA-3, a new cryptographic standard. AFA leverages the clear algebraic structure of Keccak (the algorithm behind SHA-3) to identify injected faults and recover internal states with significantly fewer attempts and higher success rates than previous differential fault analysis (DFA) techniques.

What Problem Does This Paper Address?

Cryptographic hash functions like SHA-3 are fundamental building blocks for digital security, ensuring data integrity and authenticity. However, like any complex system, they can be vulnerable to various attacks. One such attack is a "fault attack," where an attacker intentionally introduces errors (faults) into the computation of the hash function. By observing the corrupted output alongside the correct one, an attacker might be able to deduce secret information, such as the original message or a secret key (if SHA-3 is used in a keyed mode like MAC).

Previous research had explored Differential Fault Analysis (DFA) on SHA-3, showing its susceptibility. However, DFA often requires complex manual analysis of how faults propagate through the algorithm and can be inefficient, demanding many fault injections. This paper addresses the need for a more efficient and automated method to analyze SHA-3's vulnerability to fault attacks.

Methods

The core innovation of this paper is the application of Algebraic Fault Analysis (AFA) to SHA-3. Instead of manually tracing fault propagation as in DFA, AFA translates the problem of recovering internal states into a Boolean satisfiability problem (SAT). This involves:

  1. Modeling SHA-3: The Keccak algorithm's operations (specifically the last two rounds) are represented as a system of Boolean equations.
  2. Formulating the Attack: Equations are created for both the correct computation of the hash digest (H) and the faulty computation (H'). The difference between these two, or more powerfully, the direct observation of H and H', is used.
  3. Introducing Fault Constraints: The paper models the injected fault (e.g., a single-byte fault) as constraints within the SAT problem. This includes specifying that only one byte is corrupted and defining the possible values of that corruption.
  4. SAT Solver Utilization: A SAT solver (specifically CryptoMiniSat) is used to find solutions to this system of equations and constraints. A solution to the SAT problem corresponds to a possible internal state of SHA-3.
  5. Fault Identification and Recovery: The paper proposes two main AFA strategies:
  6. Direct Recovery: The SAT solver is used to find a valid internal state. By iteratively finding solutions and comparing them, unique bits of the internal state that are consistently recovered across different solutions are identified.
  7. Improved Recovery (Fault Identification First): This method first attempts to identify the specific injected fault (its position and value). Once the fault is identified, it's used to constrain the SAT solver further, leading to more efficient recovery of the internal state bits.

The key advantage of AFA is that it bypasses the complex fault propagation analysis required by DFA and can be highly automated. It also leverages more information (both H and H') compared to DFA, which typically uses their difference.

Datasets

Not discussed in the paper. The paper focuses on simulating attacks on the SHA-3 algorithm itself, rather than training on or evaluating against specific datasets of messages or keys.

Key Insights and Ideas

  • AFA is a Natural Fit for SHA-3: The paper highlights that Keccak's "clear algebraic properties" make it exceptionally well-suited for AFA. This suggests that other algorithms with similar algebraic structures might also be vulnerable to AFA.
  • More Information, Better Attack: AFA's ability to use both the correct and faulty digests (H and H') directly, rather than just their difference, provides significantly more information to the SAT solver, leading to better results.
  • Automated and Efficient: AFA automates the fault analysis process, removing the need for manual, complex fault propagation tracing, which is a major bottleneck in DFA.
  • Higher Fault Identification Rate: The AFA approach, particularly the fault identification method, achieves a much higher "effective fault ratio" – meaning a larger proportion of injected faults are actually useful for the attack – compared to DFA. This is crucial because not all injected faults lead to useful information.
  • Relaxed Fault Models are Still Vulnerable: The paper demonstrates that AFA remains effective even with more relaxed fault models, such as single-byte or single-word (16-bit) faults, especially for larger SHA-3 variants.

Key Results

  • Efficiency: AFA requires significantly fewer fault injections to recover the entire internal state of SHA-3 compared to DFA. For example, recovering 80 bits of the internal state took 41 iterations with the basic AFA method, while the improved AFA method achieved this in just 3 iterations and 0.28 seconds.
  • Effectiveness (Fault Identification): The effective fault ratio for AFA is very high, often close to 100% for SHA3-384 and SHA3-512 under single-byte fault models. This is a substantial improvement over DFA, which showed much lower ratios for shorter digest modes.
  • State Recovery: On average, AFA can recover around 80 bits of the internal state per fault injection.
  • Speed: The SAT solver typically finds solutions within seconds, making the analysis practical.

Limitations and Future Work

  • Limited Digest Size: For smaller SHA-3 variants (SHA3-224 and SHA3-256), the limited digest size restricts the amount of information available, making fault identification less effective, especially under relaxed fault models (like 16-bit faults). The paper notes that AFA and DFA struggle to identify injected faults in these cases.
  • 32-bit Fault Model: The SAT solver becomes very slow when trying to identify faults and recover states under a 32-bit fault model. Optimization is needed here.
  • Longer Input Messages: While the paper extends the attack to SHA-3 systems with longer input messages (multiple f functions), the complexity increases, especially for MAC-Keccak where key recovery depends on the key length relative to the bitrate.
  • Countermeasures: The paper suggests future work on developing countermeasures, such as error detection codes and modules to detect fault injection disturbances, to protect Keccak-based systems.
  • More Relaxed Fault Models: Developing effective attacks for SHA3-224/256 under more relaxed fault models remains an open challenge.

Summary updated

BibTeX
@article{luo2017algebraic,
  author = {Pei Luo and Konstantinos Athanasiou and Yunsi Fei and Thomas Wahl},
  title = {{Algebraic fault analysis of SHA-3}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2017},
}

Loading related content...

Figure