Efficient Extraction of True Random Numbers from Quantum System on Resource Constrained Hardware
2025 (English)Independent thesis Basic level (degree of Bachelor), 10,5 credits / 16 HE credits
Student thesis
Abstract [en]
True random number generation is indispensable for a wide range of cryptographic and distributed computing applications, yet traditional pseudo-random number generators remain deterministic, and thus vulnerable to state-recovery attacks. Quantum random number generation (QRNG) offers a robust alternative by harnessing inherent quantum fluctuations -- in particular, optical QRNG (OQRNG) based on shot noise provides an accessible source of entropy from which true random numbers can be generated. However, existing OQRNG solutions typically rely on expensive or bespoke hardware and defer post-processing to host computers, limiting portability and integration. In this work, we investigate the feasibility of performing Toeplitz randomness extraction directly on resource constrained microcontrollers, thus creating a fully self-contained QRNG system. We address two primary research areas -- developing an implementation of Toeplitz extraction that minimizes processing time on embedded hardware, and ensuring that the extraction algorithm does not become the throughput bottleneck compared to analog to digital conversion or USB transfer speeds.
Our results demonstrate that, by eliminating dynamic allocations and leveraging bit parallel techniques, Toeplitz extraction on 64-bit inputs can be executed in approximately 0.05 µs on the Teensy 4.1 -- well below the 2.667 µs threshold imposed by a 12-bit, 2 MSPS ADC. Even accounting for variance in individual measurements, these speeds confirm that the algorithmic implementation does not constrain overall throughput. On the Pico 2, the same implementations yield sub‐microsecond performance, albeit with a wider variance. However, our most efficient implementations are limited to 64-bit inputs -- extending to larger input bit sizes incurs significant overhead due to the absence of wider integer types in typical MCU toolchains.
In conclusion, Toeplitz extraction can be performed in real time on low-power microcontrollers without becoming the system's performance bottleneck, validating the viability of a portable QRNG thumbstick. Future work should explore custom data types or lightweight libraries for 128- and 256-bit size extraction, as well as integration with a live OQRNG device to assess end‐to‐end randomness quality and throughput.
Place, publisher, year, edition, pages
2025. , p. 14
National Category
Computer Systems
Identifiers
URN: urn:nbn:se:liu:diva-215094ISRN: LIU-IDA/LITH-EX-G--25/011--SEOAI: oai:DiVA.org:liu-215094DiVA, id: diva2:1972210
Subject / course
Computer Programming
Presentation
2025-06-10, R26, Hans Meijers väg 16, Linköping, 13:15 (English)
Supervisors
Examiners
2025-06-182025-06-182025-06-18Bibliographically approved