This repository contains the implementation of EstraNet, an efficient shift-invariant transformer network for Side-Channel Analysis.
For more details, refer to the paper.
fast_attention.py– Implements the proposed GaussiP attention layer.normalization.py– Implements the layer-centering normalization.transformer.py– Defines the EstraNet model architecture.train_trans.py– Training and evaluation script for EstraNet.data_utils.py– Utilities for loading ASCADf and ASCADr datasets.data_utils_ches20.py– Utilities for loading the CHES20 dataset.evaluation_utils.py– Computes guessing entropy for ASCAD datasets.evaluation_utils_ches20.py– Computes guessing entropy for CHES20 dataset.run_trans_\<dataset\>.sh– Bash scripts with predefined hyperparameters for specific datasets, where<dataset>is one of:- ASCADf (fixed key)
- ASCADr (random key)
- CHES20 (CHES CTF 2020)
- For the CHES CTF 2020 dataset, the traces are multiplied by a constant
0.004to keep the feature value range within [-120, 120].
- Python 3.8.10
- absl-py == 2.3.1
- numpy == 1.24.3
- scipy == 1.10.1
- h5py == 3.11.0
- tensorflow == 2.13.0
- Clone the repository:
git clone https://github.com/suvadeep-iitb/EstraNet.git cd EstraNet - Install dependencies (Python >= 3.8 recommended):
pip install -r requirements.txt
- Set dataset path in the bash script:
Open run_trans_\<dataset\>.sh and set the dataset path variable properly. - Train EstraNet:
bash run_trans_\<dataset\>.sh train
- Perform Evaluation:
bash run_trans_\<dataset\>.sh test
@article{DBLP:journals/tches/HajraCM24,
author = {Suvadeep Hajra and
Siddhartha Chowdhury and
Debdeep Mukhopadhyay},
title = {EstraNet: An Efficient Shift-Invariant Transformer Network for Side-Channel
Analysis},
journal = {{IACR} Trans. Cryptogr. Hardw. Embed. Syst.},
volume = {2024},
number = {1},
pages = {336--374},
year = {2024},
url = {https://doi.org/10.46586/tches.v2024.i1.336-374},
doi = {10.46586/TCHES.V2024.I1.336-374},
timestamp = {Sat, 08 Jun 2024 13:14:59 +0200},
biburl = {https://dblp.org/rec/journals/tches/HajraCM24.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}