ascad-v2-1 / README.md
pbk0's picture
Update README for ascad-v2-1 with dimensions from Zarr metadata
12acec3 verified
metadata
title: ascad-v2-1
tags:
  - side-channel-analysis
  - cryptography
  - DLSCA
parameters:
  HF_ORG: DLSCA
  CHUNK_SIZE_Y: 50000
  CHUNK_SIZE_X: 200
  TOTAL_CHUNKS_ON_Y: 2
  TOTAL_CHUNKS_ON_X: 5000
  NUM_JOBS: 10
  CAN_RUN_LOCALLY: true
  CAN_RUN_ON_CLOUD: false
  COMPRESSED: true

ascad-v2-1

This script downloads, extracts, and uploads the optimized ASCAD v2 (1-100k traces) dataset to Hugging Face Hub.

Dataset Structure

This dataset is stored in Zarr format, optimized for chunked and compressed cloud storage.

Traces (/traces)

  • Shape: [100000, 1000000] (Traces x Time Samples)
  • Data Type: int8
  • Chunk Shape: [50000, 200]

Metadata (/metadata)

  • ciphertext: shape [100000, 16], dtype uint8
  • key: shape [100000, 16], dtype uint8
  • mask: shape [100000, 16], dtype uint8
  • mask_: shape [100000, 16], dtype uint8
  • plaintext: shape [100000, 16], dtype uint8
  • rin: shape [100000, 1], dtype uint8
  • rin_: shape [100000, 1], dtype uint8
  • rm: shape [100000, 1], dtype uint8
  • rm_: shape [100000, 1], dtype uint8
  • rout: shape [100000, 1], dtype uint8
  • rout_: shape [100000, 1], dtype uint8

Parameters Used for Generation

  • HF_ORG: DLSCA
  • CHUNK_SIZE_Y: 50000
  • CHUNK_SIZE_X: 200
  • TOTAL_CHUNKS_ON_Y: 2
  • TOTAL_CHUNKS_ON_X: 5000
  • NUM_JOBS: 10
  • CAN_RUN_LOCALLY: True
  • CAN_RUN_ON_CLOUD: False
  • COMPRESSED: True

Usage

You can load this dataset directly using Zarr and Hugging Face File System:

import zarr
from huggingface_hub import HfFileSystem

fs = HfFileSystem()

# Map only once to the dataset root
root = zarr.open_group(fs.get_mapper("datasets/DLSCA/ascad-v2-1"), mode="r")

# Access traces directly
traces = root["traces"]
print("Traces shape:", traces.shape)

# Access plaintext metadata directly
plaintext = root["metadata"]["plaintext"]
print("Plaintext shape:", plaintext.shape)