[Cryptography] The Crypto Pi

Arnold Reinhold agr at me.com
Fri Jan 16 10:09:15 EST 2015

> On Jan 15, 2015, at 7:29 PM, Arnold Reinhold <agr at me.com> wrote:
> One can purchase a 5 megapixel HD camera module for the Raspberry Pi for $25.  An extensive Python support package is available, including the ability to read an image unencoded. http://picamera.readthedocs.org/en/release-1.9/ <http://picamera.readthedocs.org/en/release-1.9/>  Using a camera as a source for entropy was discussed at length in a thread here last year. A camera might be cheaper than a plug-in HRNG, doesn’t take up a USB port, and could be easier to audit.

A bit more detail.  The picamera Python package provides a “bayer” mode which gives the raw bits from the camera pixels. (Bayer is the inventor of the RGGB color filter mosaic that overlays the camera chip in this and many other single chip color cameras.) According to the documentation:

	• Bayer data occupies the last 6,404,096 bytes of the output file. The first 32,768 bytes of this is header data which starts with the string 'BRCM'.
	• Bayer data consists of 10-bit values, because this is the sensitivity of the OV5647 sensor used by the Pi’s camera. The 10-bit values are organized as four 8-bit values, followed by the low-order 2 bits of the four values packed into a fifth byte.

While unpacking all this data and processing it could be a pain for imaging, hence other modes like jpg, rgb and yuv are available, for RNG purposes bayer is ideal. The whole mishmash or chunks of it can be fed directly to a whitener such as a cryptographic hash. If speed is a concern, it might even make sense to just hash every fifth byte containing the low order bits, though careful experimentation, e.g. to look for correlation between nearby low order bits, is in order first. 

Arnold Reinhold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20150116/72bd4dcf/attachment.html>

More information about the cryptography mailing list