File size: 13,401 Bytes
6577989 a0473bd 210da92 a0473bd 6577989 a0473bd 10a9847 210da92 c84173f a0473bd 10a9847 a0473bd 7ce4b64 a0473bd c84173f a0473bd c84173f a0473bd c84173f a0473bd c84173f a0473bd c84173f a0473bd 210da92 c84173f 10a9847 210da92 a0473bd 210da92 a0473bd 78e171b a0473bd 210da92 a0473bd 1d24bc0 a0473bd 210da92 a0473bd 10a9847 a0473bd 10a9847 1d24bc0 10a9847 1d24bc0 a0473bd 78e171b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | ---
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 |