enhanced-pll-trng

Data and code to design and evaluate the PLL-based true random number generator according to the paper "Enhancing Quality and Security of the PLL-TRNG" (published and awarded at TCHES 2023).

https://github.com/maciejskorski/enhanced-pll-trng

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

field-programmable-gate-arrays min-entropy pll random-number-generators security-evaluation
Last synced: 9 months ago · JSON representation

Repository

Data and code to design and evaluate the PLL-based true random number generator according to the paper "Enhancing Quality and Security of the PLL-TRNG" (published and awarded at TCHES 2023).

Basic Info
  • Host: GitHub
  • Owner: maciejskorski
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 290 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 4
  • Releases: 5
Topics
field-programmable-gate-arrays min-entropy pll random-number-generators security-evaluation
Created over 3 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

License: GPL v3 Python R Docker MLflow Code style: black Google Colab Binder

Enhancing Quality and Security of the PLL-TRNG

Authors

Maciej Skrski, Quentin Dallison, Nathalie Bochard, Florent Bernard, Viktor Fisher

About

This repository contains supplementary material (data and code) to reproduce the evaluation of a true random number generator presented in :open_book: "Enhancing Quality and Security of the PLL-TRNG" at TCHES 2023.

Figure: PLL-TRNG Architecture

Code execution

The code is available in form of Python and R notebooks under the src directory. The notebooks run interactively under the customized Docker Image of Jupyter. For convenience, the image provides the user with both software and data.

Run Online with Docker

For a single-click online access use the Binder link at the top. <!-- markdown-link-check-enable -->

Run Locally with Docker

On a machine with Docker (local computer, virtual machine on cloud) run this image console docker run -it --rm -p 8888:8888 ghcr.io/maciejskorski/enhanced-pll-trng:latest and follow instructions to access the repository via Jupyter.

See a snapshot The Jupyter server will be available through a web browser, under http://127.0.0.1:8888/lab?token=... ![Jupyter Start](images/jupyter_start.png){ width=100% }

Data

All necessary data can be found under the data directory. The zipped data are available to download from releases.

Read more about data structure Data used in experiments are stored under the `data` directory. Sub-directories at the first level group experiments according to the environmental conditions (regular conditions, corner values and a temperature attack scenario). - The file in `data/CornerAnalysis` regroups all results accross all cards, configurations and external conditions; - The temperature attack was executed on a single Spartan device, and its results are in `data/TemperatureAttack`; - Further sub-directories in `data/Regular` group acquired data according to the FPGA card family (CV - CycloneV, S6 - Spartan6, SF - SmartFusion2), in which we find all configurations as described in the paper (A, B, or C with one or two PLL outputs as indicated by the suffix, e.g. A_1 vs A_2). Note that two Spartan devices were tested, both placed on the cards version 11, cards #2 and #8 marked S6v11_2 and S6v11_8. For each experiment, the data file contains the bitstream available at the sampler output, i.e. the D flip-flop output marked dff_out in Figure 3. The binary files end in `_dff.bin` and the associated metadata files have extension `.log`. ``` CornerAnalysis/ corner_values.xlsx TemperatureAttack/ S6_C_freezing attack_km476_kd495_dff.bin Regular/ CVv12_4/ A_1/ ... A_2/ ... B_1/ ... B_2/ ... C_1/ ... C_2/ ... S6v11_2/ A_1/ ... A_2/ ... B_1/ ... B_2/ ... C_1/ ... C_2/ ... S6v11_8/ A_1/ ... A_2/ ... B_1/ ... B_2/ ... C_1/ ... C_2/ ... .DS_Store SF2v11_11/ A_1/ ... A_2/ ... B_1/ ... B_2/ ... C_1/ ... C_2/ ... data.zip ```

Scripts Overview

The code can be found under the src directory, as Python scripts and Python or R notebooks.

Generating configurations

findPLL-TRNGconfigs.py is the Python script that generates the list of all possible configurations, along with the list of time distances between contributing bits. The main code block contains the constraints of the state-space to explore. First developed by Brice Colombier, the authors modified this script to compute the time distances between contributing bits.

Data Basics

The notebook rawdataprocessing.ipynb shows how to process and visualize data samples. It reproduces Figures 10 and 11 from the paper.

Theoretical Model Properties

The R notebook stochastic_model.ipynb explains in detail how to use the theoretical model. It reproduces Figures 4, 5, 6 and 7 from the paper.

Statistical Analysis under Regular Conditions

The notebook model_analysis.ipynb runs the statistical analysis of the acquired data to validate empirically all of the model assumptions. It reproduces Table 4, Figure 12 and Figure 13 from the paper.

Analysis under Corner Values

The notebook corner_values.ipynb analyzes the data aquired under corner values of temperature and voltage.

Temperature Attack

A temperature attack was executed during acquisition and the results are shown in the animation below. As the TRNG was online, we blew cold air (around -40C) directly on the chip to influence the jitter and the performance of the TRNG. Plotted are consecutive values of the empirical variance of the counter estimated on 4096 counter values (left) and the reconstructed period of the sampled PLL (right). During the first 80 to 90 estimations of the counter variance, we see that it remains constant to 0.92-0.98. However, with a sudden drop in temperature, the samples seem to shift along the reconstructed period. We also observe a sharp increase in the estimated variance on the left panel to about 1.15. In addition to the lower bound for counter variance that we defined in the paper, the experiment suggests that an embedded test dedicated to detecting a sudden change in counter variance could address third-party attacks. For more details, see the notebook temperature_attack.ipynb.

Temperature Attack

Links

Award

This work received the "Best Artefact Award" at TCHES'23.

tches_bestrepo

Owner

  • Name: Maciej Skorski
  • Login: maciejskorski
  • Kind: user
  • Company: Sensyne Health

R&D Specialist

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1