RF based True Random Number Generator (TRNG)
Tom Broumels
tom.broumels@os3.nl
Philipp Mieden
philipp.mieden@os3.nl
True Random Number Generators (TRNG)
2
OneRNG
It lost, because its name is not fancy enough
https://altusmetrum.org/ChaosKey/
https://github.com/waywardgeek/infnoise
Geiger counter
Infinite Noise
ChaosKey
RTL_SDR Dongle
RTL2832 chipset
DVB-T
Quantis QRNG
HackRF One
… and RF?
TRNG Properties
3
NIST Special Publication 800-90B Recommendation for the Entropy Sources Used for Random Bit Generation
NIST 800-22 Entropy source model
TRNG Testing
4
NIST Special Publication 800-22 Revision 1a: “A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications”
Example Statistical Test Tool (STS) output:
Randomness and SDR
5
HackRF
RTL_SDR
Experiment: Raw signal data (different frequencies)
6
https://www.electronics-notes.com/articles/basic_concepts/electronic-rf-noise/radio-frequency-noise-basics.php#:~:text=White%20noise%3A%20White%20noise%20is,all%20frequencies%20of%20interest%20equally.
Without interference: 148 out of 188 tests failed
When sending continuously: 152 out of 188 tests failed → Adding something here?
Conclusion: poor results
Raw signal data
Test
Using
STS
- 433 MHz (IoT, License free)
- 790 MHz (MFCN, PPDR)
- 862 MHz (Telecom)
- 1300 MHz (Aeronautical)
- 1559 MHz (GNSS: Glonass, Galileo)
- 2200 MHz (Space research, Radio Astronomy)
https://docdb.cept.org/download/2ca5fcbd-4090/ERCReport025.pdf
Dutch Frequency Table: https://wetten.overheid.nl/BWBR0035791/2020-10-20
Attack Vector - Influencing input
7
https://www.electronics-notes.com/articles/basic_concepts/electronic-rf-noise/radio-frequency-noise-basics.php#:~:text=White%20noise%3A%20White%20noise%20is,all%20frequencies%20of%20interest%20equally.
hackrf_transfer -t 80H.bin -f 433920000 -x 47 -l 40 -g 62
call hackrf_set_sample_rate(10000000 Hz/10.000 MHz)
call hackrf_set_freq(433920000 Hz/433.920 MHz)
No interference:
148/188 tests
failed
Interference:
152/188 tests
failed
Attack Vector - Replication of hardware
8
Randomness Extraction - Von Neumann extractor
9
Bit loss measured between 69% and 94%
Debiasing algorithm works on pairs of bits:
- If the input is 00 or 11: input is discarded (no output)
- If the input is 01: output a 0
- If the input is 10: output a 1
Our implementation with unit tests: https://github.com/dreadl0ck/debias
https://www.esat.kuleuven.be/cosic/blog/co6gc-deterministic-extraction-for-truly-random-bits/
Kaminsky
Debiasing
10
Kaminsky
Debiasing
Attack Vector: Denial of Service on Von Neumann
11
An attacker could create a signal that decodes to a stream of discarded information:
Attack Vector: Partial Denial of Service on Von Neumann
12
0xFF bytes: 166.4 failed tests on average (SD=5.6)
1.8MB on average (SD=0.2MB/s) per 100MB
No interference: 116.2 failed tests on average (SD=19.8)
26.6MB on average (SD=1.2MB) per 100MB
170,167,161,172,162
120,124,123,128,86
Failed with interference: 166.4 ±5.561 (±3.34%)
Failed without interference: 116.2 ±19.726 (±16.98%)
interf.
2206713,1739470,1753536,1727665,1821945
1849865.8 ±233635.669 (±12.63%)
1.8MB/s (SD = 0.2MB/s)
no interf.
24798401,26747774,27085777,27219614,27206539
26611621 ±1188135.318 (±4.46%)
26.6MB/s (SD = 1.2MB/s)
2.2, 1.7, 1.8,1.7,1.8 = 1.84 ±0.239
8.3,8.9,9.0,9.1,9.1 = 8.88 ±0.493
fileName,bytesIn,bytesOut,duration,sizeDecrease,inputBytesPerSecond,outputBytesPerSecond
100M_interf_0xff_1.bin,100000000,2206713,1.462456817s,-97.79%,100 MB/s,2.2 MB/s
100M_interf_0xff_2.bin,100000000,1739470,1.280736967s,-98.26%,100 MB/s,1.7 MB/s
100M_interf_0xff_3.bin,100000000,1753536,1.384741582s,-98.25%,100 MB/s,1.8 MB/s
100M_interf_0xff_4.bin,100000000,1727665,1.301156558s,-98.27%,100 MB/s,1.7 MB/s
100M_interf_0xff_5.bin,100000000,1821945,1.462163181s,-98.18%,100 MB/s,1.8 MB/s
100M_no_interf_1.bin,100000000,24798401,3.411602953s,-75.20%,33 MB/s,8.3 MB/s
100M_no_interf_2.bin,100000000,26747774,3.398315306s,-73.25%,33 MB/s,8.9 MB/s
100M_no_interf_3.bin,100000000,27085777,3.709802322s,-72.91%,33 MB/s,9.0 MB/s
100M_no_interf_4.bin,100000000,27219614,3.806987751s,-72.78%,33 MB/s,9.1 MB/s
100M_no_interf_5.bin,100000000,27206539,3.775998585s,-72.79%,33 MB/s,9.1 MB/s
SD = Standard Deviation
Results
13
Throughput measurements for our debiasing implementations and NIST tests:
Hardware | Final Output Rate | Failed tests (out of 188) |
RTL_SDR HackRF /dev/random /dev/urandom rtl_entropy rfrand | ~7.82 MB/s (VN) ~7.0 MB/s (KA) ~4.91 MB/s (VN) ~3.6 MB/s (KA) 0.4 MB/s (SD=0.05) 34.6 MB/s (SD=6.57) 100 - 300 kB/s 900 kB/s - 1.2 MB/s | 7-165 (VN) 1-3 (KA) 157-162 (VN) 1-4 (KA) 3-5 1 |
High entropy signals with VN debiasing only:
Random:
481, 467, 420, 370, 398, 374
99% confidence: 418.3333kB/s ±49.357 (±11.80%)
URandom:
38.7, 37.3, 41.2, 37.0,26.9,26.7
99% confidence 34.6333MB/s ±6.569 (±18.97%)
Conclusions
14
Questions?
15
Security and Network Engineering
https://os3.nl
University of Amsterdam
https://uva.nl
Research notes and (CS unverified) TRNG code: https://github.com/dreadl0ck/rf-entropy
Data Rates and Entropy measurements during attacks on Von Neumann debiasing
16
Output rate of random data drops due to discarding in VN
Input entropy drops due to interfering signal
Entropy not affected by attack
10011001
01010101
10011001
01010101
17
Bonus Video: Interfering with Von Neumann debiasing
Bonus: Entropy analysis of raw input data
18
Bonus: Key Prediction attack on Kaminsky Debiasing
19
If an attacker would have a strong RF signal it would allow to: