Skip to main content
QUICK REVIEW

[Paper Review] Power-Based Side-Channel Attack for AES Key Extraction on the ATMega328 Microcontroller

Utsav Banerjee, Lisa Ho|arXiv (Cornell University)|Mar 13, 2022
Cryptographic Implementations and SecurityComputer Science10 citations
TL;DR

This paper demonstrates a practical power-based side-channel attack that extracts a 128-bit AES-128 key from the ATMega328 microcontroller used in Arduino Uno boards. By measuring power consumption during encryption and applying correlation power analysis (CPA) to hundreds of traces, the authors successfully recovered the secret key in under 3 hours using 400–600 averaged traces, depending on key randomness.

ABSTRACT

We demonstrate the extraction of an AES secret key from flash memory on the ATMega328 microcontroller (the microcontroller used on the popular Arduino Genuino/Uno board). We loaded a standard AVR-architecture AES-128 implementation onto the chip and encrypted randomly chosen plaintexts with several different keys. We measured the chip's power consumption during encryption, correlated observed power consumption with the expected power consumption of the plaintexts with every possible key, and ultimately extracted the 128-bit key used during AES. We describe here our test infrastructure for automated power trace collection, an overview of our correlation attack, sanitization of the traces and stumbling blocks encountered during data collection and analysis, and results of our attack.

Motivation & Objective

  • To demonstrate a feasible side-channel attack on a widely used embedded device (ATMega328) using power consumption analysis.
  • To evaluate the effectiveness of correlation power analysis (CPA) in extracting AES keys from software-implemented encryption on resource-constrained microcontrollers.
  • To identify and overcome practical challenges in trace collection, synchronization, and noise reduction during side-channel attacks.
  • To validate the attack across multiple keys, including a non-random test key, to assess variability in recovery time.
  • To provide open-source tools and infrastructure for reproducible side-channel analysis on embedded systems.

Proposed method

  • Collected power traces from the ATMega328 during AES-128-ECB encryption using a digital oscilloscope triggered by a hardware signal on an I/O pin.
  • Used a modified version of the AESLib library to insert a timing marker for trace synchronization, simulating real-world conditions where such signals may not be available.
  • Applied correlation power analysis (CPA) to correlate observed power traces with expected power consumption based on Hamming weight models of the XOR and S-Box operations in the first round of AES.
  • Averaged 10 traces per plaintext to reduce noise and improve signal-to-noise ratio before CPA processing.
  • Automated trace collection and processing using Python and MATLAB scripts, with data parsed from .wfm binary files captured by the oscilloscope.
  • Evaluated key recovery by computing correlation coefficients between expected and observed power for all 256 possible key bytes at each byte position, selecting the highest correlation as the key guess.

Experimental results

Research questions

  • RQ1Can a correlation power analysis (CPA) attack successfully extract a 128-bit AES key from a software-implemented AES-128-ECB encryption on the ATMega328 microcontroller?
  • RQ2How many power traces are required to reliably recover the secret key, and does this number vary with key randomness?
  • RQ3What practical challenges arise during trace collection and synchronization, and how can they be mitigated in a real-world attack scenario?
  • RQ4To what extent does the choice of power model (e.g., Hamming weight) affect the success of the CPA attack on this platform?
  • RQ5Can the attack be automated and scaled to work without explicit hardware triggers for trace acquisition?

Key findings

  • The attack successfully extracted the correct 128-bit AES key in all three test runs, including one with a non-random key.
  • Recovery required 600 averaged power traces for the non-random key, 400 for one random key, and 300 for the other, indicating key-dependent recovery time.
  • The correct key byte was consistently identified as the one with the highest correlation coefficient after 400 traces, as shown in correlation plots over time.
  • Data collection for 100 plaintexts took approximately 30 minutes, with linear scaling to ~2.5 hours for 500 traces.
  • Key recovery and correlation computation for 500 traces took 5–10 minutes, indicating efficient post-processing.
  • The attack remained effective despite noise and time-shift errors, with mitigation strategies such as trace averaging and manual time-frame alignment proving effective.

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.