What good source of entropy is available on a smartphone?

I think about this in the context of how cryptographically secure entropy (kB / s) can be generated by a smartphone. Example application: A VoIP application that constantly generates new encryption keys.

Things that I can imagine from my hands: - camera (s) - microphones - accelerometers - magnetometer - touch screen - signal strength and time for calling, WiFi, Bluetooth, etc.

It is clear that each of them will generate different amounts of signal (predicted data) and noise (required entropy), but combining it accordingly should be good.


In addition, if anyone has any estimates of the amount of entropy, various sources will produce under normal conditions, which will also be of interest.

+4
source share
1 answer

The usual answer: you do not need a lot of entropy. 128 bits is enough; if you have 128 truly random bits, you can use them in a cryptographically secure pseudo random number generator (PRNG), which will generate as many random bits as you need, with high speed limited only by local processing power (on a smartphone, PRNG bandwidth will be in megabytes per second, not kilobytes per second).

The continuous collection of entropy is more a fetish than a scientific, rational need. Some say that getting "true" randomness protects you from any cryptanalytic violation on PRNG; but this argument is only saved if you can get fresh evenly random bits (which does not happen in practice: you need to use a hash function to smooth out the collected "noise"), and if you use random bits directly, and not as keys into the encryption algorithm. A stronger case for the continuous collection of entropy can be made in relation to seed storage: the fear that the attacker, having captured the PRNG, can look at its insides, restore its internal state and retroactively guess about random bits that were previously emitted. A good PRNG protects against this. At least you can overwrite 128 fresh bits every second, which is low speed.

However, if you need entropy, camera-to-camera is probably the best source to use, because the CCD detector is very sensitive to thermal noise, and it outputs data with very high bandwidth. A basic one-shot phone camera will easily contain data in megabytes, and even if the phone is inside a hinged-back refrigerator, you will still have a lot of noise (just a thousand bits of noise means over a million pixels, 99.9% are โ€œperfectโ€ , a somewhat ridiculous concept in a $ 400 phone - NASA engineers cannot do this in space research, which costs a million times more).

So just take a picture, hash it with any convenient hash function (like SHA-256) and voila! you have 256 bits of entropy that you use in PRNG. If you're really nervous about PRNG after a while, just take another shot.

+8
source

Source: https://habr.com/ru/post/1332975/


All Articles