Custom PC, Issue 150

Custom PC Issue 150There’s a bit of a theme to four of the five pages that make up this month’s Hobby Tech column, and with little surprise: I’ve been focusing on the Raspberry Pi Zero, that remarkable £4 microcomputer which is still proving impossible for retailers to keep in stock. That’s not to say it’s entirely Pi-themed, though: I found room for a look at the lovely CodeBug, too.

Naturally, the first thing I had to do when the Raspberry Pi Zero – a fully-functional Raspberry Pi microcomputer, equivalent in specification to the Raspberry Pi Model A+ but with twice the RAM at 512MB and a new 1GHz stock speed for the BCM2835 processor. The fact that the Raspberry Pi Foundation was able to pack all that into a device around half the footprint of the already-tiny Model A+ is impressive enough, but with a retail price of just £4 the Pi Zero is nothing short of revolutionary.

Sadly, my hope that stock issues would be cleared up by the time the issue hit shop shelves proved unfounded: while stock has appeared at the official outlets several times since the Pi Zero launched, it has immediately sold out again – making the device difficult to get hold of and leaving the market rife with sandbaggers flogging the £4 device for anything up to £50 on auction sites. My recommendation: be patient, keep an eye out the official outlets, and don’t reward the sandbaggers with your custom.

With the Pi Zero in hand, I figured a tutorial would be a logical next step. Perhaps one of the most impressive demonstrations of the new form factor’s flexibility comes in turning it into a true random number generator (TRNG) – at least, what Broadcom claims is a TRNG – for a USB-connected server or PC, improving security for a tenth the cost of the nearest off-the-shelf TRNG. While I used the simple method of attaching a USB-to-TTL serial adapter to the Pi Zero’s GPIO header, it’s even possible to create the same device with a single USB cable for data and power by replacing the stock kernel with one tweaked for USB OTG use – a cost-saving trick for another column, perhaps.

Finally, the CodeBug. I’d been planning on reviewing this for some time, but getting my hands on a sample proved tricky until oomlout was kind enough to loan me a unit from the device’s original crowd-funding campaign. Designed for educational use, and the inspiration for the BBC’s much-delayed micro:bit, the CodeBug is a microcontroller with on-board inputs and outputs and a built-in battery connector. Programmed using a modified version of the block-based Scratch language, it’s a great tool for teaching basic computer concepts – and I now have my hands on a few upgrades for the device, which will be appearing in a future issue.

All this, plus a bunch of stuff written by people who aren’t me, can be yours with a trip to any good newsagent, supermarket, or from the comfort of wherever you’re reading this via Zinio and other digital distribution services.

Linux User & Developer, Issue 160

Linux User & Developer Issue 160In this month’s Linux User & Developer, following my regular four-page news spread, you’ll find a review of a device that’s a little out of the ordinary: the NeuG, a true random number generator (TRNG) which costs a remarkably small amount.

When you’re using cryptography, you’re chewing up your system’s supply of randomness – or entropy. Linux, in common with other operating systems, works to fill its entropy pool by sampling a variety of things: traffic coming in on the network port, where you’re pointing the mouse and how fast it’s moving, and even how long it takes you to press particular keys. That’s all well and good for a desktop, but for a headless server it can take a while to fill a depleted entropy pool.

Coupled with the fact that it’s very difficult for a computer to produce truly random output, there’s a market for true random number generators. These devices typically cost a small fortune but use a variety of techniques – ranging from physically breaking down pieces of hardware with high voltages and measuring the resulting changes to pointing a webcam at a lava lamp – to generate a constant stream of high-quality entropy.

Enter the NeuG, which was kindly supplied for test by the Free Software Foundation. While it looks like a flash drive that has lost it’s casing, the device is actually a miniature computer in its own right. Using on-board analogue sensors, the NeuG can generate what is claimed to be a stream of true random numbers – numbers which are then pushed through a conditioning hash and spat out of a virtual serial port. Simply link the NeuG to something like the rngd entropy gathering daemon, and kiss goodbye to entropy exhaustion in even headless or virtualised environments.

I have been extremely impressed with the NeuG, especially given its low $50 cost. While there are cheaper alternatives – such as using a $5 Pi Zero and USB TTL serial adapter to create something similar using the BCM2835’s on-board hardware random number generator module – the NeuG’s free nature, whereby the design and source code are all available for review and modification, make it a great choice where certified security isn’t a requirement.

For the full run-down, including benchmarks, you can pick up the latest issue of Linux User & Developer from your nearest newsagent, supermarket, or electronically via Zinio and similar digital distribution platforms.