Key-Recovery Fault Injection Attack on the Classic McEliece KEM

Sabine Pircher, Johannes Geier, Julian Danner, Daniel Mueller-Gritschneder, Antonia Wachter-Zeh

TL;DR

This paper presents a novel fault injection attack that can recover the secret key of the Classic McEliece Key Encapsulation Mechanism (KEM). By injecting specific faults during the decryption process, the authors demonstrate a practical method to extract the underlying Goppa code parameters, effectively compromising the KEM's security. This work highlights the vulnerability of post-quantum cryptography implementations to physical attacks.

What Problem Does This Paper Address?

The advent of quantum computers poses a significant threat to current public-key cryptography, motivating research into Post-Quantum Cryptography (PQC). The Classic McEliece KEM is a leading candidate in this field, relying on the hardness of the syndrome decoding problem for error-correcting codes. While theoretically secure, the practical security of any cryptographic implementation hinges on its resistance to physical attacks, such as fault injection. These attacks introduce errors into the computation, which can be exploited to reveal secret information. This paper addresses the critical question of whether implementations of the Classic McEliece KEM are vulnerable to such physical attacks, specifically focusing on recovering the secret key.

Methods

The core of the attack involves two key fault injections during the decapsulation process:

  1. Error-Locator Polynomial (ELP) Corruption: Faults are injected into the coefficients of the error-locator polynomial, which is a crucial component in the decoding algorithm. This corruption is designed to leak information about the secret support elements of the Goppa code. Two types of faults are considered: bit corruption (ELPB) and zeroing a coefficient (ELPz).
  2. Validity Check Bypass (VCB): A second fault injection is used to bypass the validity checks that normally reject faulty decryption outputs. This ensures that the compromised decryption result, containing information about the secret key, is not discarded.

After these fault injections, the attacker obtains a faulty session key. By employing a "de-hashing" technique, the attacker can reconstruct the faulty error vector. This faulty error vector, combined with the known ciphertext, allows the derivation of a system of polynomial equations in the unknown support elements of the Goppa code. Solving this system, using techniques like Gröbner basis, yields an alternative secret key. The authors also simulate these attacks on virtual prototypes of two RISC-V cores to demonstrate their feasibility on hardware.

Datasets

Not discussed in the paper. The authors use simulated inputs and outputs of the Classic McEliece KEM for their attack simulations.

Key Insights and Ideas

  • Targeting the ELP is effective: Corrupting the error-locator polynomial during decryption is a viable strategy to extract information about the secret key elements.
  • VCB is crucial for attack success: Bypassing the validity checks is essential to prevent the system from rejecting the faulty decryption output, thereby allowing the attacker to obtain the compromised session key.
  • Polynomial equations reveal the secret: The derived polynomial equations in the support elements provide a structured way to recover the secret key, even without knowing the exact fault values.
  • ELPz is more efficient: Zeroing coefficients (ELPz) requires fewer fault injections compared to bit corruption (ELPB) for a successful attack.
  • RISC-V vulnerability: The attack is demonstrated to be feasible on virtual prototypes of RISC-V cores, indicating potential hardware vulnerabilities.

Key Results

The paper successfully demonstrates a key-recovery attack on the Classic McEliece KEM. The attack requires two fault injections: one to corrupt the ELP and another to bypass validity checks.

  • Successful Key Recovery: The authors show that an alternative secret key can be generated, which can then be used to derive session keys.
  • Efficiency: The ELPz fault injection mode is significantly more efficient, requiring fewer injections.
  • Parameter Sensitivity: Parameters with a smaller ratio of $2^m$ (where $n \approx 2^m$) are found to be more susceptible to the attack.
  • Hardware Simulation: The attack was simulated on virtual prototypes of RISC-V cores, showing that the necessary faults can be injected. Table 3 shows that for the CV32E40P core, a small number of micro-architectural and ISA register bits were sufficient to achieve successful fault injections for both validity check bypass and ELP coefficient corruption.

Limitations and Future Work

  • Assumptions: The attack relies on specific assumptions about the fault model (single/adjacent bit flips) and the attacker's ability to control inputs and observe outputs.
  • Timing Sensitivity: The precise timing of fault injections is critical for success, which can be challenging to achieve in real-world hardware.
  • Countermeasures: The paper acknowledges that hardware-based countermeasures (like ECC protected register files) can make the attack harder, as seen with the CV32E40S core.
  • Future Work: The authors suggest deploying the attack on real hardware as a next step. They also mention that the attack requires delicate timing, which could be made harder by unpredictable execution times, and that countermeasures like random instruction insertion could increase this difficulty.

Summary updated

BibTeX
@article{pircher2022key,
  author = {Sabine Pircher and Johannes Geier and Julian Danner and Daniel Mueller-Gritschneder and Antonia Wachter-Zeh},
  title = {{Key-Recovery Fault Injection Attack on the Classic McEliece KEM}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2022},
  url = {https://openreview.net/forum?id=r9c74hrrU9},
}

Loading related content...

Figure