Photographs make perfect sources of randomness for OTPs. This question may be a little stale, but most of the answers here are wrong and it's an interest of mine.
One of the great questions facing Mankind is where to get entropy from? Entropy is a fundamental tenet of the Universe and is all around. It's just a question of getting at it. Since this is a photographic question, the following is an example of a typical cryptographic cat:-
The original unopened JPEG file is 3.4MB in size.
My best estimate via compression (fp8) of the entropy is 2.5MB. Let's be extremely clear - I'm compressing the original JPEG file without opening it. Never ever open a JPEG to measure entropy. You'll just measure the JPEG extraction algorithm and fall in to the entropy vs. complexity trap.
Let's be ultra conservative (and lazy) and use a safety factor of 2.5. It is impossible that compression will improve this much as all the latest compression tests already show a very pronounced asymptotic tendency. fp8 is amongst the best (non text specific) compression program available that you can compile reasonably easily .
So usable entropy of image = 1 MB.
You then extract 1MB of entropy using a simple extractor on the original (unopened) JPEG file. You can use:-
- Multiple Pearson hashes
- Large matrix extractor
- Wide substitution & permutation network
- SHA1 & counter based extractor
Each way will render the 1MB of pure entropy to use as a perfect OTP. This is sufficient for 7000 Twitter messages. Then you can take another photo for next month.
The reason this technique works perfectly is for two simple reasons:-
- Assume I didn't show you the photo. I just take a photo of something, extract the entropy and then eat the storage card. The cat is an example, please do not say that looks like my cat. You wouldn't know what the image was. It could be anything in the world, from any angle and under any lighting condition.
- The avalanche effect will ensure that even photographs that look identical to your eye will have entirely different extracted entropy sequences. And you have to factor in the sensor noise that makes unique all JPEG images ever taken by Man. All that's required is a single bit's difference in the unopened JPEG file.
Ultimately this relies on the entropy of your camera's viewpoint. And considering how many views there are on Earth, that's why photographs make perfect entropy sources for OTPs. This is trivially proven beyond doubt. I challenge anyone reading this to produce photo1 and photo2 where:-
SHA3-512(photo1.jpg) = SHA3-512(photo2.jpg)
As an exercise I did ent CUTE_CAT.JPG.fp8 which produced:-
Entropy = 7.999926 bits per byte.
Optimum compression would reduce the size of this 2503292 byte file
by 0 percent.
Chi square distribution for 2503292 samples is 256.14, and randomly
would exceed this value 46.81 percent of the times.
Arithmetic mean value of data bytes is 127.4831 (127.5 = random).
Monte Carlo value for Pi is 3.140577400 (error 0.03 percent).
Serial correlation coefficient is -0.000503 (totally uncorrelated =
This is actually a very good prima facie pass for randomness. Even without the randomness extraction surprisingly.