emissionsecurityqkd
Machine learning methods to evaluate information leakage via radio-frequency electromagnetic emissions from the electronics of a quantum key distribution module.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 13 DOI reference(s) in README -
✓Academic publication links
Links to: aps.org, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Repository
Machine learning methods to evaluate information leakage via radio-frequency electromagnetic emissions from the electronics of a quantum key distribution module.
Basic Info
- Host: GitHub
- Owner: XQP-Munich
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 4.59 MB
Statistics
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
QKD Emission Security Evaluation
Quantum Key Distribution (QKD) is a method of sharing secret keys between parties. This repository is a supplement to our paper 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.ipynbtrains and evaluates the neural network.TEMPEST_ATTACK_VARY_TRAINING_DATA.ipynbtrains 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.ipynbtrains 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.ipynbanalyzes the raw amplitude of emissions. It is used to analyze the distance measurements.hyperparameter_optimization.ipynbperforms the hyperparameter optimization for both versions of the electronics. This is used on the datasets containing 30 measurements.Comparing_KeyNokey_Measurements.ipynbanalyzes 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_*.ipynbinput 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.ipynbvisualizes 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.ipynbAnalyzes 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.ipynbcreates 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
@article{PhysRevApplied.20.054040,
title = {Deep-learning-based radio-frequency side-channel attack on quantum key distribution},
author = {Baliuka, Adomas and St\"ocker, Markus and Auer, Michael and Freiwang, Peter and Weinfurter, Harald and Knips, Lukas},
journal = {Phys. Rev. Appl.},
volume = {20},
issue = {5},
pages = {054040},
numpages = {13},
year = {2023},
month = {Nov},
publisher = {American Physical Society},
doi = {10.1103/PhysRevApplied.20.054040},
url = {https://link.aps.org/doi/10.1103/PhysRevApplied.20.054040}
}
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}
}
Owner
- Login: XQP-Munich
- Kind: user
- Location: Munich, Germany
- Website: https://xqp.physik.uni-muenchen.de/
- Repositories: 3
- Profile: https://github.com/XQP-Munich
Experimental Quantum Physics group at Ludwig Maximilian University of Munich
Citation (CITATION.cff)
cff-version: 1.2.0
title: "Software for Deep Learning Based Radio Frequency Side-Channel Attack on Quantum Key Distribution"
doi: 10.5281/zenodo.7965628
publisher: Zenodo
url: https://10.5281/zenodo.7965628
authors:
- family-names: Baliuka
given-names: Adomas
orcid: "https://orcid.org/0000-0002-7064-8502"
- family-names: Stöcker
given-names: Markus
- family-names: Auer
given-names: Michael
- family-names: Freiwang
given-names: Peter
- family-names: Weinfurter
given-names: Harald
orcid: "https://orcid.org/0000-0001-6882-3909"
- family-names: Knips
given-names: Lukas
orcid: "https://orcid.org/0000-0002-7404-1708"
license: MIT
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Dependencies
- matplotlib *
- numpy *
- pandas *
- scikit-learn *
- scipy *
- tensorflow *
- GitPython ==3.1.31
- Jinja2 ==3.1.2
- Markdown ==3.4.3
- MarkupSafe ==2.1.2
- Pillow ==9.5.0
- PyYAML ==6.0
- Pygments ==2.15.1
- QtPy ==2.3.1
- Send2Trash ==1.8.2
- Werkzeug ==2.3.4
- absl-py ==1.4.0
- anyio ==3.6.2
- argon2-cffi ==21.3.0
- argon2-cffi-bindings ==21.2.0
- arrow ==1.2.3
- asttokens ==2.2.1
- astunparse ==1.6.3
- attrs ==23.1.0
- backcall ==0.2.0
- beautifulsoup4 ==4.12.2
- bleach ==6.0.0
- cachetools ==5.3.0
- certifi ==2023.5.7
- cffi ==1.15.1
- charset-normalizer ==3.1.0
- comm ==0.1.3
- cycler ==0.11.0
- debugpy ==1.6.7
- decorator ==5.1.1
- defusedxml ==0.7.1
- executing ==1.2.0
- fastjsonschema ==2.17.1
- flatbuffers ==23.5.9
- fqdn ==1.5.1
- gast ==0.4.0
- gitdb ==4.0.10
- google-auth ==2.18.1
- google-auth-oauthlib ==1.0.0
- google-pasta ==0.2.0
- grpcio ==1.54.2
- h5py ==3.8.0
- idna ==3.4
- ipykernel ==6.23.1
- ipython ==8.13.2
- ipython-genutils ==0.2.0
- ipywidgets ==8.0.6
- isoduration ==20.11.0
- jax ==0.4.10
- jedi ==0.18.2
- joblib ==1.2.0
- jsonpointer ==2.3
- jsonschema ==4.17.3
- jupyter ==1.0.0
- jupyter-console ==6.6.3
- jupyter-events ==0.6.3
- jupyter_client ==8.2.0
- jupyter_core ==5.3.0
- jupyter_server ==2.5.0
- jupyter_server_terminals ==0.4.4
- jupyterlab-pygments ==0.2.2
- jupyterlab-widgets ==3.0.7
- keras ==2.12.0
- kiwisolver ==1.4.4
- libclang ==16.0.0
- matplotlib ==3.4.3
- matplotlib-inline ==0.1.6
- mistune ==2.0.5
- ml-dtypes ==0.1.0
- nbclassic ==1.0.0
- nbclient ==0.7.4
- nbconvert ==7.4.0
- nbformat ==5.8.0
- nest-asyncio ==1.5.6
- notebook ==6.5.4
- notebook_shim ==0.2.3
- numpy ==1.23.5
- oauthlib ==3.2.2
- opt-einsum ==3.3.0
- packaging ==23.1
- pandas ==2.0.1
- pandocfilters ==1.5.0
- parso ==0.8.3
- pexpect ==4.8.0
- pickleshare ==0.7.5
- platformdirs ==3.5.1
- prometheus-client ==0.16.0
- prompt-toolkit ==3.0.38
- protobuf ==4.23.1
- psutil ==5.9.5
- ptyprocess ==0.7.0
- pure-eval ==0.2.2
- pyasn1 ==0.5.0
- pyasn1-modules ==0.3.0
- pycparser ==2.21
- pyparsing ==3.0.9
- pyrsistent ==0.19.3
- python-dateutil ==2.8.2
- python-json-logger ==2.0.7
- pytz ==2023.3
- pyzmq ==25.0.2
- qtconsole ==5.4.3
- requests ==2.30.0
- requests-oauthlib ==1.3.1
- rfc3339-validator ==0.1.4
- rfc3986-validator ==0.1.1
- rsa ==4.9
- scikit-learn ==1.2.2
- scipy ==1.10.1
- six ==1.16.0
- smmap ==5.0.0
- sniffio ==1.3.0
- soupsieve ==2.4.1
- stack-data ==0.6.2
- tensorboard ==2.12.3
- tensorboard-data-server ==0.7.0
- tensorflow ==2.12.0
- tensorflow-estimator ==2.12.0
- tensorflow-io-gcs-filesystem ==0.32.0
- termcolor ==2.3.0
- terminado ==0.17.1
- threadpoolctl ==3.1.0
- tinycss2 ==1.2.1
- tornado ==6.3.2
- traitlets ==5.9.0
- typing_extensions ==4.5.0
- tzdata ==2023.3
- uri-template ==1.2.0
- urllib3 ==1.26.15
- wcwidth ==0.2.6
- webcolors ==1.13
- webencodings ==0.5.1
- websocket-client ==1.5.2
- widgetsnbextension ==4.0.7
- wrapt ==1.14.1