Transactions on Cryptographic Hardware and Embedded Systems, Volume 2025
TraceCopilot: A framwork for integrating binary firmware and side-channel information of embedded cryptographic device
Shipei Qu
Shanghai Jiao Tong University, Shanghai, China
Yuxuan Wang
Shanghai Jiao Tong University, Shanghai, China
Jintong Yu
Shanghai Jiao Tong University, Shanghai, China
Chi Zhang
Shanghai Jiao Tong University, Shanghai, China
Dawu Gu
Shanghai Jiao Tong University, Shanghai, China
Keywords: Side-channel analysis, Software/Hardware co-analysis, Binary instrumentation, Locating of cryptographic operations
Abstract
A common assumption in side-channel analysis is that the attacker knows the cryptographic algorithm implementation of the victim. However, many labsetting studies implicitly extend this assumption to the knowledge of the source code, by inserting triggers to measure, locate or align the Cryptographic Operations (CO) in the trace. For real-world attacks, the source code is typically unavailable, which poses a challenge for locating the COs thus reducing the effectiveness of many methods. In contrast, obtaining the (partial) binary firmware is more prevalent in practical attacks on embedded devices. While binary code theoretically encapsulates necessary information for side-channel attacks on software-implemented cryptographic algorithms, there is no systematic study on leveraging this information to facilitate side-channel analysis. This paper introduces a novel and general framework that utilizes binary information for the automated locating of COs on side-channel traces. We first present a mechanism that maps the execution flow of binary instructions onto the corresponding side-channel trace through a tailored static binary instrumentation process, thereby transforming the challenge of locating COs into one of tracing cryptographic code execution within the binary. For the latter, we propose a method to retrieve binary instruction addresses that are equivalent to the segmenting boundaries of the COs within side-channel traces. By identifying the mapping points of these instructions on the trace, we can obtain accurate segmentation labeling for the sidechannel data. Further, by employing the well-labeled side-channel segments obtained on a profiling device, we can readily identify the locations of COs within traces collected from un-controllable target devices. We evaluate our approach on various devices and cryptographic software, including a real-world secure boot program. The results demonstrate the effectiveness of our method, which can automatically locate typical COs, such as AES or ECDSA, in raw traces using only the binary firmware and a profiling device. Comparison experiments indicate that our method outperforms existing techniques in handling noisy or jittery traces and scales better to complex COs. Performance evaluation confirms that the runtime and storage overheads of the proposed approach are practical for real-world deployment.
Publication
Transactions of Cryptographic Hardware and Embedded Systems, Volume 2025, Issue 1
PaperArtifact
Artifact number
tches/2025/a2
Artifact published
March 6, 2025
Badge
✅ IACR CHES Artifacts Available
A ZIP file containing full traces (1.7 GB) for this artifact is also available by request.
License
This work is licensed under the MIT License.
Some files in this archive are licensed under a different license. See the contents of this archive for more information.
BibTeX How to cite
Qu, S., Wang, Y., Yu, J., Zhang, C., & Gu, D. (2024). Trace Copilot: Automatically Locating Cryptographic Operations in Side-Channel Traces by Firmware Binary Instrumenting. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025(1), 128-159. https://doi.org/10.46586/tches.v2025.i1.128-159. Artifact available at https://artifacts.iacr.org/tches/2025/a2