International Association for Cryptologic Research

International Association
for Cryptologic Research

Transactions on Cryptographic Hardware and Embedded Systems 2025

Chameleon:

A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis


README

Chameleon: A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis

Chameleon is a dataset designed for side-channel analysis of obfuscated power traces.
It contains real-world power traces collected from a 32-bit RISC-V System-on-Chip
implementing four hiding countermeasures: Dynamic Frequency Scaling (DFS),
Random Delay (RD), Morphing (MRP), and Chaffing (CHF). The dataset also includes side-channel power traces without any active countermeasure (BASE).
Each side-channel trace includes multiple cryptographic operations
interleaved with general-purpose applications.

The Chameleon dataset is available on 🤗 Hugging Face.

Chameleon Logo

To run a segmentation demo, open the Jupyter Notebook chameleon_segmentation.ipynb.

The code has been tested on an Intel Core i5-12400 machine with 64 GB of RAM and an NVIDIA GeForce GTX 1080Ti GPU.
Python 3.11 is required.

Repository Organization

The repository is organized as follows:

.
├── CNN
│   ├── build_dataset_chameleon.py
│   ├── configs
│   │   ├── chameleon_base
│   │   │   ├── data.yaml
│   │   │   ├── experiment.yaml
│   │   │   └── module.yaml
│   │   ├── chameleon_chf/
│   │   ├── chameleon_dfs/
│   │   ├── chameleon_mrp/
│   │   ├── chameleon_rd/
│   │   └── common
│   │       └── neptune_configs.yaml
│   ├── datasets
│   │   └── cp_class_dataset.py
│   ├── models
│   │   ├── custom_layers.py
│   │   ├── resnet.py
│   │   └── resnet_time_series_classifier.py
│   ├── modules
│   │   ├── cp_class_datamodule.py
│   │   └── cp_class_module.py
│   ├── train.py
│   └── utils
│       ├── data.py
│       ├── logging.py
│       ├── module.py
│       ├── trainer.py
│       └── utils.py
├── inference_pipeline
│   ├── alignment.py
│   ├── debug.py
│   ├── heuristic.py
│   ├── segmentation.py
│   └── sliding_window_classification.py
└── chameleon_segmentation.ipynb

Dataset

How to Download

Full dataset:
WARNING: Full dataset requires more than 600 GB of space.

from huggingface_hub import snapshot_download
snapshot_download(repo_id="hardware-fab/Chameleon", repo_type="dataset", local_dir="<download_path>")

One sub-dataset of choice:

from huggingface_hub import snapshot_download
snapshot_download(repo_id="hardware-fab/Chameleon", repo_type="dataset", local_dir="<download_path>", allow_patterns="<sub_dataset>/*")

Replace <sub_dataset> with BASE, DFS, RD, MRP, CHF.

Dataset Structure

The dataset is divided per hiding countermeasure. Each file has the following structure:
* Data: The data are power traces of 134,217,550 time samples.
BASE, DFS, RD, MRP, and CHF sub-dataset
contain 256, 256, 512, 512, and 1024 data respectively.
The traces capture the SoC execution of AES encryptions interleaved with general-purpose applications.
* Metadata: The metadata are divided into three groups:
* Ciphers: This group contains the AES inputs:
* key: The secret key used for AES encryption.
* plaintexts: The plaintext used for the AES encryption.
* Pinpoints: This group contains the start and end time samples of each AES execution in each trace file.
* start: The starting sample of the AES encryption. It takes values ranging from 0 to 134,217,550.
* end: The ending sample of the AES encryption. It takes values ranging from 0 to 134,217,550.
* Frequencies: This group provides labels for each power trace, indicating the frequency changes during the measurement.
Notably, this metadata is only available for the sub-datasets with DFS enabled. Each metadata has two fields:
* samples: This field denotes the time sample at which a frequency change happens, with integer values ranging from 0 to 134,217,550.
* frequencies: This field specifies the new operating frequency starting from the corresponding sample. It can take floating values from 5MHz to 100MHz.

More details available on 🤗 Hugging Face.

Note

This work is part of [1] available online.

@article{Galli_Chiari_Zoni_2025,
    title={Chameleon: A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis},
    author={Galli, Davide and Chiari , Giuseppe and Zoni, Davide},
    volume={2025}, 
    number={3},
    journal={IACR Transactions on Cryptographic Hardware and Embedded Systems},
    year={2025},
    month={Jun.},
    pages={389–412},
    DOI={10.46586/tches.v2025.i3.389-412},
    url={https://tches.iacr.org/index.php/TCHES/article/view/12221}
}

This repository is protected by copyright and licensed under the Apache-2.0 license file.

© 2025 hardware-fab

[1] D. Galli, G. Chiari, and D. Zoni, "Chameleon: A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis," in IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025(3)