Skip to main content
QUICK REVIEW

[Paper Review] The Arduino as a Hardware Random-Number Generator

Benedikt Kristinsson|arXiv (Cornell University)|Dec 16, 2012
Chaos-based Image/Signal Encryption4 references3 citations
TL;DR

This paper evaluates the Arduino Duemilanove as a true hardware random number generator (TRNG) using statistical tests and seed recovery attacks. Despite the Arduino manual's claim that unconnected analog pins produce 'fairly random' values, the study demonstrates that the noise is highly predictable and provides minimal entropy, making it unsuitable for cryptographic use. The authors implement a seed-finding program that recovers the PRNG seed in under 2 seconds on average, proving the system is cryptographically weak.

ABSTRACT

Cheap micro-controllers, such as the Arduino or other controllers based on the Atmel AVR CPUs are being deployed in a wide variety of projects, ranging from sensors networks to robotic submarines. In this paper, we investigate the feasibility of using the Arduino as a true random number generator (TRNG). The Arduino Reference Manual recommends using it to seed a pseudo random number generator (PRNG) due to its ability to read random atmospheric noise from its analog pins. This is an enticing application since true bits of entropy are hard to come by. Unfortunately, we show by statistical methods that the atmospheric noise of an Arduino is largely predictable in a variety of settings, and is thus a weak source of entropy. We explore various methods to extract true randomness from the micro-controller and conclude that it should not be used to produce randomness from its analog pins.

Motivation & Objective

  • To assess the feasibility of using the Arduino Duemilanove as a true random number generator (TRNG) without additional hardware.
  • To challenge the Arduino Reference Manual's claim that unconnected analog pins produce 'fairly random' values.
  • To develop and test statistical methods for evaluating randomness in Arduino-generated sequences.
  • To build a program that can efficiently recover the seed used to initialize the avr-libc PRNG when seeded with analogRead values.
  • To determine whether the Arduino can serve as a universal, cryptographically secure source of randomness.

Proposed method

  • Implemented standard statistical tests—monobit, poker, and runs tests—in Python to evaluate randomness of Arduino output.
  • Collected empirical data from an Arduino Duemilanove's analogRead function on unconnected pins to build a probability distribution of output values.
  • Designed a seed-finding algorithm that iteratively tests all possible analogRead values (0–1023) as seeds for the avr-libc PRNG, simulating sequence generation and checking for match with observed output.
  • Optimized the seed-finding algorithm by prioritizing frequently observed analogRead values first, improving efficiency.
  • Used a bidirectional queue (deque) to maintain a sliding window of PRNG output, enabling efficient comparison of generated sequences.
  • Evaluated performance using 5,000 test sequences, each with a randomly selected seed from collected data, measuring average recovery time.

Experimental results

Research questions

  • RQ1Can the Arduino Duemilanove generate cryptographically secure random numbers using only its analog pins?
  • RQ2Is the analogRead output from unconnected pins truly random, or is it predictable due to environmental or hardware factors?
  • RQ3Can an adversary efficiently recover the seed used to initialize the avr-libc PRNG when it is seeded with analogRead values?
  • RQ4Does the statistical behavior of Arduino-generated sequences pass standard randomness tests?
  • RQ5Can a universal, low-cost TRNG be built using only the Arduino's built-in components?

Key findings

  • The analogRead values from unconnected Arduino pins are not random; they exhibit strong predictability and low entropy, contradicting the Arduino manual's claim.
  • The statistical tests rejected all sequences generated from analogRead values as non-random, indicating poor randomness quality.
  • The seed-finding program successfully recovered the PRNG seed in 100% of 5,000 test cases, with a mean recovery time of 1.6 seconds on a standard desktop computer.
  • The program's efficiency was significantly improved by prioritizing frequently observed analogRead values in the probability distribution.
  • The Twoleastsign-RAND algorithm produced sequences that passed all statistical tests, but only on specific hardware, indicating non-universality and lack of general security.
  • The study concludes that the Arduino Duemilanove is not a suitable device for cryptographic TRNG applications due to insufficient and predictable entropy.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.