Security runs on random numbers.

Sensors are full of noise.

Android draws its randomness from a few system events.

And each one yields only a few bits.

Touch events
Interrupt timings ≈4 bits each
Disk timings ≈3 bits each
Input poolLinux PRNG
/dev/urandomnon-blocking
SecureRandomSHA1PRNG
Introducing
SensoRNG
Random numbers from the sensors you already carry.
01Measure
02Mix
03Serve

Find the noisy bits.

Every bit position of every sensor sample, tested as its own stream with NIST’s statistical tests.

37Android devices
6.5 GBof sensor data
7sensors
USABLE BITS PER SAMPLE
goodfair

Fold them together.

Strip the bad bits, XOR-fold what’s left, then pass it through a many-to-one substitution table into the buffer.

AGGREGATE · FOLD · REDUCE · ILLUSTRATIVE BITS
SAMPLE1101011000101110
GOOD BITS0110 1011 0
FOLD⊕1001 0011 1
REDUCER(x)10 · 011 · 1
RANDOM BUFFER · 4096 BITS
0110100111010010110101001110

Serve on demand.

Collect opportunistically. When the buffer runs low, briefly switch sensors on; when it’s full, switch them off.

SENSORNG BUFFER
95% · stop polling
25% · poll gyro + accel
128 bits · poll mic
Accelerometer OFFON
Gyroscope OFFON
Microphone OFF
0/12
NIST test results passed, on both phones, in typical use
+2–4%power over a sensors-on baseline (10 mW Nexus 5, 28 mW Nexus 4)
≈10 bits/saverage demand for randomness, ≈53.5 at peak, easily covered
Microphonethe best source: 8 good bits per sample, 44,100 samples a second

Toward Sensor-Based Random Number Generation for Mobile and IoT Devices

Kyle Wallace · Kevin Moran · Edward Novak · Gang Zhou · Kun Sun
IoT-J 2016 · IEEE Internet of Things Journal