# SITM Model Trainer

This repository holds scripts for the training of deep learning models proposed in master's thesis Side-channel cryptanalysis using deep learning methods at Brno University of Technology. There are 2 architectures to be trained: MLP and CNN. 

# Usage

Training data has to be in `./dataset/` folder. There must be `.npy` file for every class, with the name convention as follows: `diffs_class0.npy`, where the number goes from 0 to 3. The default search window is from the 200,000th sample to the 300,000th sample (3rd round of AES-128).

```python
# Train MLP architecture
python3 train_model.py --MLP

# Train CNN architecture
python3 train_model.py --CNN
```