Skip to main content
QUICK REVIEW

[Paper Review] A Simple Power Analysis Attack on the Twofish Key Schedule

Jose Javier Gonzalez Ortiz, Kevin J. Compton|arXiv (Cornell University)|Nov 22, 2016
Cryptographic Implementations and SecurityComputer Science4 references4 citations
TL;DR

This paper presents a simple power analysis (SPA) attack on the Twofish key schedule that recovers the secret key in a single execution using Hamming weight measurements of 8-bit operations. The attack is robust to noise, achieving 100% accuracy under Gaussian noise with standard deviation ≤1.0, and extends to 32- and 64-bit implementations due to inherent data dependencies in the key schedule design.

ABSTRACT

This paper introduces an SPA power attack on the 8-bit implementation of the Twofish block cipher. The attack is able to unequivocally recover the secret key even under substantial amounts of error. An initial algorithm is described using exhaustive search on error free data. An error resistant algorithm is later described. It employs several threshold preprocessing stages followed by a combined approach of least mean squares and an optimized Hamming mask search. Further analysis of 32 and 64-bit Twofish implementations reveals that they are similarly vulnerable to the described SPA attack.

Motivation & Objective

  • To demonstrate that Twofish’s key schedule is vulnerable to side-channel attacks via power analysis despite its complex structure.
  • To develop an error-resistant SPA attack that works on noisy power traces from real-world implementations.
  • To show that 8-bit, 32-bit, and 64-bit Twofish implementations are all susceptible due to explicit byte-wise operations in the key schedule.
  • To evaluate the attack’s accuracy and efficiency under varying noise levels and key sizes.
  • To establish that the attack is practical and efficient, with sub-second runtime, even in the presence of realistic measurement errors.

Proposed method

  • The attack uses Hamming weight measurements of intermediate values during Twofish key schedule computation to infer secret key bytes.
  • An initial exhaustive search phase recovers the key from error-free power traces by matching Hamming weights to key byte candidates.
  • An error-resistant variant applies threshold preprocessing to filter noisy measurements before applying a combined least mean squares and optimized Hamming mask search.
  • The method leverages the fact that Twofish’s S-box lookups and word manipulations expose individual 8-bit values in power traces.
  • The attack is extended to 32- and 64-bit implementations by observing that byte-level operations remain exposed in table-lookup and shift-based computations.
  • Statistical optimization uses threshold weights (τ) and noise modeling (σ) to balance accuracy and runtime, with τ=3 identified as optimal.

Experimental results

Research questions

  • RQ1Can a simple power analysis attack recover the Twofish secret key using only Hamming weight measurements from a single execution?
  • RQ2How robust is the attack under realistic levels of measurement noise, particularly Gaussian noise?
  • RQ3Are 32-bit and 64-bit Twofish implementations equally vulnerable to the same SPA technique as 8-bit versions?
  • RQ4What is the trade-off between attack accuracy and runtime under varying noise and threshold parameters?
  • RQ5Can the attack be optimized to handle real-world power traces with statistical inference and error correction?

Key findings

  • The attack successfully recovers the full secret key in a single execution using only Hamming weight traces from the key schedule.
  • Under Gaussian noise with standard deviation σ ≤ 1.0, the attack achieves 100% accuracy, particularly when threshold τ = 3 is used.
  • For σ > 1.0, accuracy drops significantly, and at σ = 2.0, the algorithm makes errors in at least one key byte in most cases.
  • The worst-case runtime of the optimized algorithm is under one second, making the attack both efficient and practical.
  • The attack is effective on 8-bit, 32-bit, and 64-bit Twofish implementations due to the exposure of individual 8-bit values during S-box and word operations.
  • The attack remains robust even with substantial noise, demonstrating that Twofish’s key schedule design leaks sufficient information for key recovery via SPA.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.