Paper 2024/2069
A Prompt Framework for LLM-Based Fully Automated Simple Power Analysis on Cryptosystems
Abstract
Side-channel analysis is a powerful technique to extract secret data from cryptographic devices. However, this task heavily relies on experts and specialized tools, particularly in the case of simple power analysis (SPA). Meanwhile, large language models (LLMs) have demonstrated remarkable capabilities in assisting users with complex tasks, yet their potential for fully automated SPA remains unexplored. In this paper, we propose a novel prompt framework specifically designed for SPA tasks, enabling non-experts to perform end-to-end automated analysis by providing traces and prompts to an LLM in a single interaction. Our framework consists of six components: role, reinforce, input, task description, chain-of-thought, and expert strategies, with three expert strategies instantiated for SPA. To validate the framework's effectiveness and generalizability, we establish a dataset comprising seven sets of real power traces from various implementations of public-key cryptosystems, including RSA, ECC, and Kyber, as well as eighteen sets of simulated power traces that illustrate typical SPA leakage patterns. We compare against a representative unsupervised horizontal clustering attack, which achieves only 52.04% accuracy. In contrast, our framework enables GPT-4o and DeepSeek-V3.1 to achieve overall average accuracies of 98.02% and 97.83%, respectively. Furthermore, our framework reduces the analysis time by over 93.09% compared to manual analysis at comparable accuracy, enabling non-experts to complete SPA tasks in minutes rather than hours. Notably, this work represents the first successful application of LLMs to achieve fully automated SPA.
Metadata
- Available format(s)
-
PDF
- Category
- Attacks and cryptanalysis
- Publication info
- Preprint.
- Keywords
- Side-channel AnalysisLarge Language ModelPublic-key AlgorithmsKyberSimple Power Analysis
- Contact author(s)
-
wenquan2222222 @ gmail com
liehuangz @ bit edu cn - History
- 2026-04-13: last of 2 revisions
- 2024-12-24: received
- See all versions
- Short URL
- https://ia.cr/2024/2069
- License
-
CC BY
BibTeX
@misc{cryptoeprint:2024/2069,
author = {Wenquan Zhou and An Wang and Yaoling Ding and Congming Wei and Jingqi Zhang and Jiakun Li and Liehuang Zhu},
title = {A Prompt Framework for {LLM}-Based Fully Automated Simple Power Analysis on Cryptosystems},
howpublished = {Cryptology {ePrint} Archive, Paper 2024/2069},
year = {2024},
url = {https://eprint.iacr.org/2024/2069}
}