Giter Site home page Giter Site logo

adomasbaliuka / emissionsecurityqkd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xqp-munich/emissionsecurityqkd

0.0 0.0 0.0 4.7 MB

Machine learning methods to evaluate information leakage via radio-frequency electromagnetic emissions from the electronics of a quantum key distribution module.

License: MIT License

Python 3.15% Jupyter Notebook 96.85%

emissionsecurityqkd's Introduction

QKD Emission Security Evaluation

DOI

Quantum Key Distribution (QKD) is a method of sharing secret keys between parties. This repository is a supplement to our paper (in preparation TODO LINK) that analyzes the information leakage about the secret key from a QKD module's electronics through radio-frequency electromagnetic emissions.

It contains

  • Python Code (Tensorflow) to train and evaluate a Convolutional Neural Network on recorded EM-Emissions. Results are stored in JSON files.
  • JSON files containing the results of evaluating the neural networks.
  • Jupyter notebooks for analyzing and plotting results, which produce all figures in the paper.
  • Python code to remotely control a Teledyne Lecroy WavePro 604HD Oscilloscope, which we used for our measurements
  • Python code for interfacing with our QKD sender (this is not directly useful and only illustrates the measurement procedure. It can be adapted to other devices)

The results are obtained by applying the machine learning methods in this repository to the raw data hosted on Zenodo:

How the results were produced

Pre-requisites

Hardware

the datasets were collected using the following hardware

  • Magnetic near-field probe: Langer EMV XFR400-1
  • RF Amplifier (Texas Instruments TRF37C73) for the probe
  • UHF Log-periodic antenna: Creative Design Corp. CLP5130-2.
  • Oscilloscope (Teledyne Lecroy WavePro 604HD)
  • Target of evaluation: Our home-built QKD sender electronics (by Michael Auer) Adapt the interfaces to your electronics to repeat the measurements. Our raw measured data is available at Zenodo. The notebooks assume the data is inside a directory named DownloadedData. Download and extract the data into the root directory or create a link.

Software

The datasets were created and analyzed using the following software

  • Python (v3.10) and standard libraries (see requirements.txt)
  • Tensorflow 2 installation with GPU support, if you want to train the neural network. The neural network takes only a few minutes to train (on GPU) so we do not include the trained network weights.
  • The hyperparameter optimization needs an additional library keras_tuner.
  • For interfacing with Oscilloscope, additional Python libraries (pyvisa)

Data evaluation

The measurement procedure and results are explained in the paper (in preparation TODO LINK). The python files contain the neural network, function to load the data from disk and store results. Note that the .npy files are cached versions of the raw data that are faster to load. These are automatically generated by, e.g., the TEMPEST_ATTACK_* notebooks.

To evaluate the data and reproduce result files, use the following Jupyter notebooks:

  • TEMPEST_ATTACK.ipynb trains and evaluates the neural network.
  • TEMPEST_ATTACK_VARY_TRAINING_DATA.ipynb trains and evaluates the neural network with different amounts of training data. This is only applied to the datasets that have 30 measurements.
  • TEMPEST_ATTACK_MOST_CERTAIN_SELECTION.ipynb trains and evaluates the neural network under the assumption that the attacker can pre-select the symbols and restrict to some fraction where the neural network's predictions are most confident. This slightly increases performance and is discussed in the appendix of the paper.
  • get_raw_data_RMS_amplitude.ipynb analyzes the raw amplitude of emissions. It is used to analyze the distance measurements.
  • hyperparameter_optimization.ipynb performs the hyperparameter optimization for both versions of the electronics. This is used on the datasets containing 30 measurements.
  • Comparing_KeyNokey_Measurements.ipynb analyzes the data collected with the log-periodic dipole antenna at a larger distance. It shows that we can detect whether the device is currently sending a key given the spectrum of the emissions.
  • All notebooks called Visualize_*.ipynb input JSON files containing results and produce plots. Some of these notebooks also directly access the raw data to perform low-level analysis. In particular,
    • Visualize_Results_Rotation.ipynb visualizes effect of rotating probe orientation. This is not mentioned in the paper because the result is not very interesting. Apart from the rotation measurements, the orientation of the probe is always kept fixed.
    • Visualize_single_spectrum.ipynb Analyzes the spectra collected using the near-field probe and compare signal to the noisy background of the room where the measurement was performed.
    • Visualize_trace_analysis.ipynb creates a plot of (synchronized) raw measured traces and illustrates the dependence on the symbol sequence. This is useful to get intuition about the data but is not required for the further, quantitative analysis performed using neural networks.

References

paper (in preparation TODO LINK)

Datasets

@dataset{baliuka_adomas_2023_7956055,
  author       = {Baliuka, Adomas and
                  Stöcker, Markus and
                  Auer, Michael and
                  Freiwang, Peter and
                  Weinfurter, Harald and
                  Knips, Lukas},
  title        = {{Datasets for Deep Learning Based Radio Frequency 
                   Side-Channel Attack on Quantum Key Distribution}},
  month        = may,
  year         = 2023,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.7956055},
  url          = {https://doi.org/10.5281/zenodo.7956055}
}

emissionsecurityqkd's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.