overmach commited on
Commit
a0473bd
·
1 Parent(s): 6577989

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +248 -1
README.md CHANGED
@@ -1,5 +1,252 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
4
 
5
- Dataset on unprocessed real-world measurements specifically designed for the localization in side-channel analysis, made harder by hiding countermeasures.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ tags:
4
+ - AES
5
+ - RISC-V
6
+ - Random-Delay
7
+ - Dynamic-Frequency-Scaling
8
+ - Chaffing
9
+ - Morphing
10
+ - Side-Channel-Analysis
11
+ pretty_name: Chameleon
12
+ size_categories:
13
+ - 1K<n<10K
14
+ configs:
15
+ - config_name: DFS
16
+ data_files: "DFS/*.h5"
17
+ - config_name: RD
18
+ data_files: "RD/*.h5"
19
+ - config_name: MRP
20
+ data_files: "MRP/*.h5"
21
+ - config_name: CHF
22
+ data_files: "CHF/*.h5"
23
  ---
24
 
25
+ # Chameleon
26
+
27
+ The `Chameleon` is a dataset designed for side-channel analysis of obfuscated power traces.
28
+ It contains real-world power traces collected from a 32-bit RISC-V System-on-Chip
29
+ implementing four hiding countermeasures: Dynamic Frequency Scaling (DFS),
30
+ Random Delay (RD), Morphing (MRP), and Chaffing (CHF).
31
+ Each side-channel trace includes multiple cryptographic operations
32
+ interleaved with general-purpose applications.
33
+
34
+ - **Curated by:** hardware-fab
35
+ - **License:** Open Data Commons License [cc-by-4.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/cc-by-4.0.md)
36
+
37
+ <div align="center">
38
+ <img src="https://github.com/hardware-fab/chameleon-dataset/blob/main/images/chameleon_logo.png?raw=true" alt="Chameleon Logo" width="150">
39
+ </div>
40
+
41
+ The dataset is designed to aid research in:
42
+
43
+ - Segmentation methods (locate and isolate cryptographic operations)
44
+ - Side-channel analysis methods (attacking devices with hiding countermeasures)
45
+
46
+ ## How to Download
47
+ Full dataset:
48
+ ```python
49
+ from datasets import load_dataset
50
+
51
+ dataset = load_dataset("hardware-fab/Chameleon")
52
+ ```
53
+
54
+ One sub-dataset of choice:
55
+ ```python
56
+ from datasets import load_dataset
57
+
58
+ sub_dataset = load_dataset("hardware-fab/Chameleon", '<sub_dataset>')
59
+ ```
60
+ Replace `<sub_dataset>` with `DFS`, `RD`, `MRP`, or `CHF`.
61
+
62
+ ## Dataset Structure
63
+
64
+ The dataset is divided per hiding countermeasure. Each file has the following structure:
65
+ * **Data:** The data are power traces of 134,217,550 time samples. DFS, RD, MRP, and CHF datasets
66
+ contain 256, 512, 512, and 1024 data respectively. The traces capture the SoC execution of AES encryptions interleaved with general-purpose applications.
67
+ * **Metadata:** The metadata are divided into three groups:
68
+ * **Ciphers:** This group contains the AES inputs:
69
+ * `key`: The secret key used for AES encryption.
70
+ * `plaintexts`: The plaintext used for the AES encryption.
71
+ * **Pinpoints:** This group contains the start and end time samples of each AES execution in each trace file.
72
+ * `start`: The starting sample of the AES encryption. It takes values ranging from 0 to 134,217,550.
73
+ * `end`: The ending sample of the AES encryption. It takes values ranging from 0 to 134,217,550.
74
+ * **Frequencies:** This group provides labels for each power trace, indicating the frequency changes during the measurement. _Notably, this metadata is only available for the DFS dataset_.Each metadata has two fields:
75
+ * `samples`: This field denotes the time sample at which a frequency change happens, with integer values ranging from 0 to 134,217,550.
76
+ * `frequencies`: This field specifies the new operating frequency starting from the corresponding sample. It can take floating values from 5MHz to 100MHz.
77
+
78
+ ### Dataset Format
79
+
80
+ The dataset is divided into four sub-datasets, one for each hiding countermeasure,
81
+ stored in different folders. To alleviate the size of the individual files,
82
+ we partitioned each sub-dataset into 16 files based on the cryptographic key.
83
+ Keys are 16-byte arrays, we vary only the first byte in each trace,
84
+ keeping the remaining 15 fixed.
85
+
86
+ | Chunk | First key byte values | Disk size (GB) | # Data |
87
+ |----------------|----------------|----------------|----------------|
88
+ | dfs_chunk_1.h5 | [0x00-0x0f] | 4.3 | 16 |
89
+ | dfs_chunk_2.h5 | [0x10-0x0f] | 4.3 | 16 |
90
+ | dfs_chunk_3.h5 | [0x20-0x2f] | 4.3 | 16 |
91
+ | dfs_chunk_4.h5 | [0x30-0x3f] | 4.3 | 16 |
92
+ | dfs_chunk_5.h5 | [0x40-0x4f] | 4.3 | 16 |
93
+ | dfs_chunk_6.h5 | [0x50-0x5f] | 4.3 | 16 |
94
+ | dfs_chunk_7.h5 | [0x60-0x6f] | 4.3 | 16 |
95
+ | dfs_chunk_8.h5 | [0x70-0x7f] | 4.3 | 16 |
96
+ | dfs_chunk_9.h5 | [0x80-0x8f] | 4.3 | 16 |
97
+ | dfs_chunk_10.h5 | [0x90-0x9f] | 4.3 | 16 |
98
+ | dfs_chunk_11.h5 | [0xa0-0xaf] | 4.3 | 16 |
99
+ | dfs_chunk_12.h5 | [0xb0-0xbf] | 4.3 | 16 |
100
+ | dfs_chunk_13.h5 | [0xc0-0xcf] | 4.3 | 16 |
101
+ | dfs_chunk_14.h5 | [0xd0-0xdf] | 4.3 | 16 |
102
+ | dfs_chunk_15.h5 | [0xe0-0xef] | 4.3 | 16 |
103
+ | dfs_chunk_16.h5 | [0xf0-0xff] | 4.3 | 16 |
104
+ | rd_chunk_1.h5 | [0x00-0x0f] | 8.6 | 32 |
105
+ | rd_chunk_2.h5 | [0x10-0x0f] | 8.6 | 32 |
106
+ | rd_chunk_3.h5 | [0x20-0x2f] | 8.6 | 32 |
107
+ | rd_chunk_4.h5 | [0x30-0x3f] | 8.6 | 32 |
108
+ | rd_chunk_5.h5 | [0x40-0x4f] | 8.6 | 32 |
109
+ | rd_chunk_6.h5 | [0x50-0x5f] | 8.6 | 32 |
110
+ | rd_chunk_7.h5 | [0x60-0x6f] | 8.6 | 32 |
111
+ | rd_chunk_8.h5 | [0x70-0x7f] | 8.6 | 32 |
112
+ | rd_chunk_9.h5 | [0x80-0x8f] | 8.6 | 32 |
113
+ | rd_chunk_10.h5 | [0x90-0x9f] | 8.6 | 32 |
114
+ | rd_chunk_11.h5 | [0xa0-0xaf] | 8.6 | 32 |
115
+ | rd_chunk_12.h5 | [0xb0-0xbf] | 8.6 | 32 |
116
+ | rd_chunk_13.h5 | [0xc0-0xcf] | 8.6 | 32 |
117
+ | rd_chunk_14.h5 | [0xd0-0xdf] | 8.6 | 32 |
118
+ | rd_chunk_15.h5 | [0xe0-0xef] | 8.6 | 32 |
119
+ | rd_chunk_16.h5 | [0xf0-0xff] | 8.6 | 32 |
120
+ | mrp_chunk_1.h5 | [0x00-0x0f] | 8.6 | 32 |
121
+ | mrp_chunk_2.h5 | [0x10-0x0f] | 8.6 | 32 |
122
+ | mrp_chunk_3.h5 | [0x20-0x2f] | 8.6 | 32 |
123
+ | mrp_chunk_4.h5 | [0x30-0x3f] | 8.6 | 32 |
124
+ | mrp_chunk_5.h5 | [0x40-0x4f] | 8.6 | 32 |
125
+ | mrp_chunk_6.h5 | [0x50-0x5f] | 8.6 | 32 |
126
+ | mrp_chunk_7.h5 | [0x60-0x6f] | 8.6 | 32 |
127
+ | mrp_chunk_8.h5 | [0x70-0x7f] | 8.6 | 32 |
128
+ | mrp_chunk_9.h5 | [0x80-0x8f] | 8.6 | 32 |
129
+ | mrp_chunk_10.h5 | [0x90-0x9f] | 8.6 | 32 |
130
+ | mrp_chunk_11.h5 | [0xa0-0xaf] | 8.6 | 32 |
131
+ | mrp_chunk_12.h5 | [0xb0-0xbf] | 8.6 | 32 |
132
+ | mrp_chunk_13.h5 | [0xc0-0xcf] | 8.6 | 32 |
133
+ | mrp_chunk_14.h5 | [0xd0-0xdf] | 8.6 | 32 |
134
+ | mrp_chunk_15.h5 | [0xe0-0xef] | 8.6 | 32 |
135
+ | mrp_chunk_16.h5 | [0xf0-0xff] | 8.6 | 32 |
136
+ | chf_chunk_1.h5 | [0x00-0x0f] | 17.2 | 64 |
137
+ | chf_chunk_2.h5 | [0x10-0x0f] | 17.2 | 64 |
138
+ | chf_chunk_3.h5 | [0x20-0x2f] | 17.2 | 64 |
139
+ | chf_chunk_4.h5 | [0x30-0x3f] | 17.2 | 64 |
140
+ | chf_chunk_5.h5 | [0x40-0x4f] | 17.2 | 64 |
141
+ | chf_chunk_6.h5 | [0x50-0x5f] | 17.2 | 64 |
142
+ | chf_chunk_7.h5 | [0x60-0x6f] | 17.2 | 64 |
143
+ | chf_chunk_8.h5 | [0x70-0x7f] | 17.2 | 64 |
144
+ | chf_chunk_9.h5 | [0x80-0x8f] | 17.2 | 64 |
145
+ | chf_chunk_10.h5 | [0x90-0x9f] | 17.2 | 64 |
146
+ | chf_chunk_11.h5 | [0xa0-0xaf] | 17.2 | 64 |
147
+ | chf_chunk_12.h5 | [0xb0-0xbf] | 17.2 | 64 |
148
+ | chf_chunk_13.h5 | [0xc0-0xcf] | 17.2 | 64 |
149
+ | chf_chunk_14.h5 | [0xd0-0xdf] | 17.2 | 64 |
150
+ | chf_chunk_15.h5 | [0xe0-0xef] | 17.2 | 64 |
151
+ | chf_chunk_16.h5 | [0xf0-0xff] | 17.2 | 64 |
152
+
153
+ Following the structure of the dataset, below are HDF5 fields used and their atomic type:
154
+
155
+ ```
156
+ .
157
+ ├── data
158
+ │ └── traces
159
+ │ ├── trace_0 [int16]
160
+ │ ├── ...
161
+ │ └── trace_n [int16]
162
+ └── metadata
163
+ ├── ciphers
164
+ │ ├── ciphers_0
165
+ │ │ ├── key [('k', uint8, (16,))]
166
+ │ │ └── plaintexts [('p', uint8, (16,))]
167
+ │ ├── ...
168
+ │ └── ciphers_n
169
+ │ ├── key [('k', uint8, (16,))]
170
+ │ └── plaintexts [('p', uint8, (16,))]
171
+ ├── pinpoints
172
+ │ ├── pinpoints_0 [('start', int32), ('end', int32)]
173
+ │ ├── ...
174
+ │ └── pinpoints_n [('start', int32), ('end', int32)]
175
+ └── frequencies
176
+ ├── frequencies_0 [('sample', int32), ('frequency', float32)]
177
+ ├── ...
178
+ └── frequencies_n [('sample', int32), ('frequency', float32)]
179
+ ```
180
+
181
+ ## Dataset Creation
182
+
183
+ Existing datasets for side-channel analysis lack real-world complexity.
184
+ Chameleon addresses this by providing the first dataset of:
185
+
186
+ - **Real-world hiding methods**: Traces are collected from a real system implementing four actual obfuscation countermeasures (DFS, RD, MRP, CHF).
187
+ - **Segmentable cryptographic operations**: Chameleon includes multiple operations interleaved with real-world applications,
188
+ mimicking real-world use and necessitating segmentation techniques for attack.
189
+
190
+ ### Data Collection
191
+
192
+ The data are collected from a real-world hardware-software infrastructure.
193
+ The setup comprises a host PC,
194
+ a [Picoscope 5244d](https://www.picotech.com/download/datasheets/picoscope-5000d-series-data-sheet.pdf)
195
+ digital sampling oscilloscope (DSO), and
196
+ a [NewAE CW305](https://rtfm.newae.com/Targets/CW305%20Artix%20FPGA/)
197
+ board which hosts an [AMD Artix-7 FPGA](https://docs.amd.com/v/u/en-US/ds180_7Series_Overview).
198
+ The board is specifically designed to facilitate the deployment
199
+ of digital designs targeting FPGAs and studying their side-channel behavior.
200
+ The sampling rate of the DSO is set to 125Msample/s
201
+ with a resolution of 12 bits for the entire dataset.
202
+
203
+ The FPGA implements a system-on-chip consisting of a 1.5Mps UART
204
+ interface to communicate with the host, a computing platform
205
+ to execute the user applications, and a pinpointing unit
206
+ to record the beginning and end time sample for each cryptographic operation in the traces.
207
+ The computing platform implements an in-order 32-bit RISC-V CPU
208
+ that has been modified to implement the analyzed hiding methods. In particular,
209
+ we implement random delay and dynamic frequency scaling in hardware,
210
+ while morphing and chaffing are software-implemented. Notably,
211
+ the CPU is clocked at 50MHz for all acquisition campaigns,
212
+ except for the DFS one, for which the DFS actuator
213
+ is instructed to change the operating frequency of
214
+ the computing platform randomly at its maximum speed.
215
+
216
+ As the cryptographic operation of choice, we selected
217
+ the [OpenSSL AES implementation](https://github.com/openssl/openssl),
218
+ representing the standard for symmetric cryptography.
219
+
220
+ ## Social Impact of Dataset
221
+
222
+ Chameleon has been developed to enhance side-channel security.
223
+ Notably, the side-channel analysis represents a standard procedure
224
+ for evaluating novel countermeasures. Indeed,
225
+ the [NIST FIPS-140v3](https://doi.org/10.6028/NIST.FIPS.140-3)
226
+ standard enforces side-channel security as a mandatory step
227
+ in the security validation of any novel software- and
228
+ hardware-implemented cryptographic device. To this end,
229
+ Chameleon is a valuable asset in strengthening real-world security
230
+ by enabling researchers to identify and address potential
231
+ weaknesses in cryptographic implementations.
232
+ By promoting the creation of robust countermeasures,
233
+ this dataset ultimately contributes to a more secure digital world.
234
+
235
+ As creating a high-quality training dataset is a fundamental requirement, the quality of Chameleon
236
+ sits on the time-consuming acquisition process that requires a clean-room acquisition setup and
237
+ system-on-chip. Without considering the design time to obtain the implementation of the computing
238
+ platform and the working acquisition setup, the time required by the acquisition procedure exceeded
239
+ 58 hours.
240
+
241
+ <!-- ## Citation -->
242
+
243
+ <!-- **BibTeX:** -->
244
+
245
+ <!-- **APA:** -->
246
+
247
+ ## Note
248
+
249
+ This repository is protected by copyright and licensed under the
250
+ Open Data Commons License [cc-by-4.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/cc-by-4.0.md) file.
251
+
252
+ © 2024 hardware-fab