|
|
--- |
|
|
license: cc-by-4.0 |
|
|
tags: |
|
|
- AES |
|
|
- RISC-V |
|
|
- Random-Delay |
|
|
- Dynamic-Frequency-Scaling |
|
|
- Chaffing |
|
|
- Morphing |
|
|
- Side-Channel-Analysis |
|
|
pretty_name: Chameleon |
|
|
size_categories: |
|
|
- 1K<n<10K |
|
|
configs: |
|
|
- config_name: BASE |
|
|
data_files: "BASE/*.h5" |
|
|
- config_name: DFS |
|
|
data_files: "DFS/*.h5" |
|
|
- config_name: RD |
|
|
data_files: "RD/*.h5" |
|
|
- config_name: MRP |
|
|
data_files: "MRP/*.h5" |
|
|
- config_name: CHF |
|
|
data_files: "CHF/*.h5" |
|
|
--- |
|
|
|
|
|
# Chameleon |
|
|
|
|
|
`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. |
|
|
|
|
|
- **Curated by:** hardware-fab |
|
|
- **License:** Open Data Commons License [cc-by-4.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/cc-by-4.0.md) |
|
|
- **Paper**: [Chameleon: A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis](https://doi.org/10.46586/tches.v2025.i3.389-412) |
|
|
|
|
|
<div align="center"> |
|
|
<img src="https://github.com/hardware-fab/chameleon/blob/main/images/chameleon_logo.png?raw=true" alt="Chameleon Logo" width="150"> |
|
|
</div> |
|
|
|
|
|
The dataset is designed to aid research in: |
|
|
|
|
|
- Segmentation methods (locate and isolate cryptographic operations) |
|
|
- Side-channel analysis methods (attacking devices with hiding countermeasures) |
|
|
|
|
|
## How to Download |
|
|
Full dataset: |
|
|
⚠ **WARNING**: Full dataset requires more than 600 GB of space. |
|
|
```python |
|
|
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: |
|
|
```python |
|
|
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. |
|
|
|
|
|
### Dataset Format |
|
|
|
|
|
The dataset is divided into five sub-datasets, one for each hiding countermeasure, |
|
|
stored in different folders. To alleviate the size of the individual files, |
|
|
we partitioned each sub-dataset into 16 files based on the cryptographic key. |
|
|
Keys are 16-byte arrays, we vary only the first byte in each trace, |
|
|
keeping the remaining 15 fixed. |
|
|
|
|
|
| Chunk | First key byte values | Disk size (GB) | # Data | |
|
|
|----------------|----------------|----------------|----------------| |
|
|
| base_chunk_1.h5 | [0x00-0x0f] | 4.3 | 16 | |
|
|
| base_chunk_2.h5 | [0x10-0x0f] | 4.3 | 16 | |
|
|
| base_chunk_3.h5 | [0x20-0x2f] | 4.3 | 16 | |
|
|
| base_chunk_4.h5 | [0x30-0x3f] | 4.3 | 16 | |
|
|
| base_chunk_5.h5 | [0x40-0x4f] | 4.3 | 16 | |
|
|
| base_chunk_6.h5 | [0x50-0x5f] | 4.3 | 16 | |
|
|
| base_chunk_7.h5 | [0x60-0x6f] | 4.3 | 16 | |
|
|
| base_chunk_8.h5 | [0x70-0x7f] | 4.3 | 16 | |
|
|
| base_chunk_9.h5 | [0x80-0x8f] | 4.3 | 16 | |
|
|
| base_chunk_10.h5 | [0x90-0x9f] | 4.3 | 16 | |
|
|
| base_chunk_11.h5 | [0xa0-0xaf] | 4.3 | 16 | |
|
|
| base_chunk_12.h5 | [0xb0-0xbf] | 4.3 | 16 | |
|
|
| base_chunk_13.h5 | [0xc0-0xcf] | 4.3 | 16 | |
|
|
| base_chunk_14.h5 | [0xd0-0xdf] | 4.3 | 16 | |
|
|
| base_chunk_15.h5 | [0xe0-0xef] | 4.3 | 16 | |
|
|
| base_chunk_16.h5 | [0xf0-0xff] | 4.3 | 16 | |
|
|
| dfs_chunk_1.h5 | [0x00-0x0f] | 4.3 | 16 | |
|
|
| dfs_chunk_2.h5 | [0x10-0x0f] | 4.3 | 16 | |
|
|
| dfs_chunk_3.h5 | [0x20-0x2f] | 4.3 | 16 | |
|
|
| dfs_chunk_4.h5 | [0x30-0x3f] | 4.3 | 16 | |
|
|
| dfs_chunk_5.h5 | [0x40-0x4f] | 4.3 | 16 | |
|
|
| dfs_chunk_6.h5 | [0x50-0x5f] | 4.3 | 16 | |
|
|
| dfs_chunk_7.h5 | [0x60-0x6f] | 4.3 | 16 | |
|
|
| dfs_chunk_8.h5 | [0x70-0x7f] | 4.3 | 16 | |
|
|
| dfs_chunk_9.h5 | [0x80-0x8f] | 4.3 | 16 | |
|
|
| dfs_chunk_10.h5 | [0x90-0x9f] | 4.3 | 16 | |
|
|
| dfs_chunk_11.h5 | [0xa0-0xaf] | 4.3 | 16 | |
|
|
| dfs_chunk_12.h5 | [0xb0-0xbf] | 4.3 | 16 | |
|
|
| dfs_chunk_13.h5 | [0xc0-0xcf] | 4.3 | 16 | |
|
|
| dfs_chunk_14.h5 | [0xd0-0xdf] | 4.3 | 16 | |
|
|
| dfs_chunk_15.h5 | [0xe0-0xef] | 4.3 | 16 | |
|
|
| dfs_chunk_16.h5 | [0xf0-0xff] | 4.3 | 16 | |
|
|
| rd_chunk_1.h5 | [0x00-0x0f] | 8.6 | 32 | |
|
|
| rd_chunk_2.h5 | [0x10-0x0f] | 8.6 | 32 | |
|
|
| rd_chunk_3.h5 | [0x20-0x2f] | 8.6 | 32 | |
|
|
| rd_chunk_4.h5 | [0x30-0x3f] | 8.6 | 32 | |
|
|
| rd_chunk_5.h5 | [0x40-0x4f] | 8.6 | 32 | |
|
|
| rd_chunk_6.h5 | [0x50-0x5f] | 8.6 | 32 | |
|
|
| rd_chunk_7.h5 | [0x60-0x6f] | 8.6 | 32 | |
|
|
| rd_chunk_8.h5 | [0x70-0x7f] | 8.6 | 32 | |
|
|
| rd_chunk_9.h5 | [0x80-0x8f] | 8.6 | 32 | |
|
|
| rd_chunk_10.h5 | [0x90-0x9f] | 8.6 | 32 | |
|
|
| rd_chunk_11.h5 | [0xa0-0xaf] | 8.6 | 32 | |
|
|
| rd_chunk_12.h5 | [0xb0-0xbf] | 8.6 | 32 | |
|
|
| rd_chunk_13.h5 | [0xc0-0xcf] | 8.6 | 32 | |
|
|
| rd_chunk_14.h5 | [0xd0-0xdf] | 8.6 | 32 | |
|
|
| rd_chunk_15.h5 | [0xe0-0xef] | 8.6 | 32 | |
|
|
| rd_chunk_16.h5 | [0xf0-0xff] | 8.6 | 32 | |
|
|
| mrp_chunk_1.h5 | [0x00-0x0f] | 8.6 | 32 | |
|
|
| mrp_chunk_2.h5 | [0x10-0x0f] | 8.6 | 32 | |
|
|
| mrp_chunk_3.h5 | [0x20-0x2f] | 8.6 | 32 | |
|
|
| mrp_chunk_4.h5 | [0x30-0x3f] | 8.6 | 32 | |
|
|
| mrp_chunk_5.h5 | [0x40-0x4f] | 8.6 | 32 | |
|
|
| mrp_chunk_6.h5 | [0x50-0x5f] | 8.6 | 32 | |
|
|
| mrp_chunk_7.h5 | [0x60-0x6f] | 8.6 | 32 | |
|
|
| mrp_chunk_8.h5 | [0x70-0x7f] | 8.6 | 32 | |
|
|
| mrp_chunk_9.h5 | [0x80-0x8f] | 8.6 | 32 | |
|
|
| mrp_chunk_10.h5 | [0x90-0x9f] | 8.6 | 32 | |
|
|
| mrp_chunk_11.h5 | [0xa0-0xaf] | 8.6 | 32 | |
|
|
| mrp_chunk_12.h5 | [0xb0-0xbf] | 8.6 | 32 | |
|
|
| mrp_chunk_13.h5 | [0xc0-0xcf] | 8.6 | 32 | |
|
|
| mrp_chunk_14.h5 | [0xd0-0xdf] | 8.6 | 32 | |
|
|
| mrp_chunk_15.h5 | [0xe0-0xef] | 8.6 | 32 | |
|
|
| mrp_chunk_16.h5 | [0xf0-0xff] | 8.6 | 32 | |
|
|
| chf_chunk_1.h5 | [0x00-0x0f] | 17.2 | 64 | |
|
|
| chf_chunk_2.h5 | [0x10-0x0f] | 17.2 | 64 | |
|
|
| chf_chunk_3.h5 | [0x20-0x2f] | 17.2 | 64 | |
|
|
| chf_chunk_4.h5 | [0x30-0x3f] | 17.2 | 64 | |
|
|
| chf_chunk_5.h5 | [0x40-0x4f] | 17.2 | 64 | |
|
|
| chf_chunk_6.h5 | [0x50-0x5f] | 17.2 | 64 | |
|
|
| chf_chunk_7.h5 | [0x60-0x6f] | 17.2 | 64 | |
|
|
| chf_chunk_8.h5 | [0x70-0x7f] | 17.2 | 64 | |
|
|
| chf_chunk_9.h5 | [0x80-0x8f] | 17.2 | 64 | |
|
|
| chf_chunk_10.h5 | [0x90-0x9f] | 17.2 | 64 | |
|
|
| chf_chunk_11.h5 | [0xa0-0xaf] | 17.2 | 64 | |
|
|
| chf_chunk_12.h5 | [0xb0-0xbf] | 17.2 | 64 | |
|
|
| chf_chunk_13.h5 | [0xc0-0xcf] | 17.2 | 64 | |
|
|
| chf_chunk_14.h5 | [0xd0-0xdf] | 17.2 | 64 | |
|
|
| chf_chunk_15.h5 | [0xe0-0xef] | 17.2 | 64 | |
|
|
| chf_chunk_16.h5 | [0xf0-0xff] | 17.2 | 64 | |
|
|
|
|
|
Following the structure of the dataset, below are HDF5 fields used and their atomic type: |
|
|
|
|
|
``` |
|
|
. |
|
|
├── data |
|
|
│ └── traces |
|
|
│ ├── trace_0 [int16] |
|
|
│ ├── ... |
|
|
│ └── trace_n [int16] |
|
|
└── metadata |
|
|
├── ciphers |
|
|
│ ├── ciphers_0 |
|
|
│ │ ├── key [('k', uint8, (16,))] |
|
|
│ │ └── plaintexts [('p', uint8, (16,))] |
|
|
│ ├── ... |
|
|
│ └── ciphers_n |
|
|
│ ├── key [('k', uint8, (16,))] |
|
|
│ └── plaintexts [('p', uint8, (16,))] |
|
|
├── pinpoints |
|
|
│ ├── pinpoints_0 [('start', int32), ('end', int32)] |
|
|
│ ├── ... |
|
|
│ └── pinpoints_n [('start', int32), ('end', int32)] |
|
|
└── frequencies |
|
|
├── frequencies_0 [('sample', int32), ('frequency', float32)] |
|
|
├── ... |
|
|
└── frequencies_n [('sample', int32), ('frequency', float32)] |
|
|
``` |
|
|
|
|
|
## Dataset Creation |
|
|
|
|
|
Existing datasets for side-channel analysis lack real-world complexity. |
|
|
Chameleon addresses this by providing the first dataset of: |
|
|
|
|
|
- **Real-world hiding methods**: Traces are collected from a real system implementing four actual obfuscation countermeasures (DFS, RD, MRP, CHF). |
|
|
- **Segmentable cryptographic operations**: Chameleon includes multiple operations interleaved with real-world applications, |
|
|
mimicking real-world use and necessitating segmentation techniques for attack. |
|
|
|
|
|
### Data Collection |
|
|
|
|
|
The data are collected from a real-world hardware-software infrastructure, available [online](https://doi.org/10.48550/arXiv.2407.17432). |
|
|
The setup comprises a host PC, |
|
|
a [Picoscope 5244d](https://www.picotech.com/download/datasheets/picoscope-5000d-series-data-sheet.pdf) |
|
|
digital sampling oscilloscope (DSO), and |
|
|
a [NewAE CW305](https://rtfm.newae.com/Targets/CW305%20Artix%20FPGA/) |
|
|
board which hosts an [AMD Artix-7 FPGA](https://docs.amd.com/v/u/en-US/ds180_7Series_Overview). |
|
|
The board is specifically designed to facilitate the deployment |
|
|
of digital designs targeting FPGAs and studying their side-channel behavior. |
|
|
The sampling rate of the DSO is set to 125Msample/s |
|
|
with a resolution of 12 bits for the entire dataset. |
|
|
|
|
|
The FPGA implements a system-on-chip consisting of a 1.5Mps UART |
|
|
interface to communicate with the host, a computing platform |
|
|
to execute the user applications, and a pinpointing unit |
|
|
to record the beginning and end time sample for each cryptographic operation in the traces. |
|
|
The computing platform implements an in-order 32-bit RISC-V CPU |
|
|
that has been modified to implement the analyzed hiding methods. In particular, |
|
|
we implement random delay and dynamic frequency scaling in hardware, |
|
|
while morphing and chaffing are software-implemented. Notably, |
|
|
the CPU is clocked at 50MHz for all acquisition campaigns, |
|
|
except for the DFS ones, for which the DFS actuator |
|
|
is instructed to change the operating frequency of |
|
|
the computing platform randomly at its maximum speed. |
|
|
|
|
|
As the cryptographic operation of choice, we selected |
|
|
the [OpenSSL AES implementation](https://github.com/openssl/openssl), |
|
|
representing the standard for symmetric cryptography. |
|
|
|
|
|
## Social Impact of Dataset |
|
|
|
|
|
Chameleon has been developed to enhance side-channel security. |
|
|
Notably, the side-channel analysis represents a standard procedure |
|
|
for evaluating novel countermeasures. Indeed, |
|
|
the [NIST FIPS-140v3](https://doi.org/10.6028/NIST.FIPS.140-3) |
|
|
standard enforces side-channel security as a mandatory step |
|
|
in the security validation of any novel software- and |
|
|
hardware-implemented cryptographic device. To this end, |
|
|
Chameleon is a valuable asset in strengthening real-world security |
|
|
by enabling researchers to identify and address potential |
|
|
weaknesses in cryptographic implementations. |
|
|
By promoting the creation of robust countermeasures, |
|
|
this dataset ultimately contributes to a more secure digital world. |
|
|
|
|
|
As creating a high-quality training dataset is a fundamental requirement, the quality of Chameleon |
|
|
sits on the time-consuming acquisition process that requires a clean-room acquisition setup and |
|
|
system-on-chip. Without considering the design time to obtain the implementation of the computing |
|
|
platform and the working acquisition setup, the time required by the acquisition procedure exceeded |
|
|
58 hours. |
|
|
|
|
|
## Citation |
|
|
|
|
|
**BibTeX:** |
|
|
``` |
|
|
@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} |
|
|
} |
|
|
``` |
|
|
|
|
|
**APA:** |
|
|
|
|
|
> Galli, D., Chiari, G., & Zoni, D. (2025). Chameleon: A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025(3), 389-412. |
|
|
|
|
|
|
|
|
## Note |
|
|
|
|
|
This repository is protected by copyright and licensed under the |
|
|
Open Data Commons License [cc-by-4.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/cc-by-4.0.md) file. |
|
|
|
|
|
© 2025 hardware-fab |