This article is more than 1 year old
UK's beloved RNGesus machine ERNIE goes quantum in 5th iteration
El Reg takes a trip to TNMoC to swot up on the tech history of Premium Bonds
For computing history nerds, the names Tommy Flowers and Harry Fensom likely conjure up images of the code-breaking Colossus. But after the war, they also had a hand in creating a dearly loved, much-anthropomorphised, millionaire-making machine: ERNIE.
ERNIE – Electronic Random Number Indicator Equipment – is the machine used to crank out millions of random numbers when the Post Office, and now NS&I, selects the winning Premium Bonds each month.
He has been immortalised in songs by Madness and Jethro Tull, and even gets Christmas and Valentine's cards from punters that are most likely recipients of one of the 420 million prizes, worth £19.1bn, handed out since the scheme was launched in 1957.
Until now, each of the four iterations of ERNIE have used thermal noise to produce random numbers – but today the government has unveiled ERNIE 5, which is powered by quantum technology.
ERNIE 5 – which was used to generate this month's winning Bond numbers – can do a full draw of around 9 million numbers in 12 minutes. ERNIE 4, which has been going since 2004, generates 1 million numbers in an hour, so a full draw takes about nine hours.
In contrast, the first ERNIE, created by Fensom and his colleagues at the Post Office Research Laboratory in Dollis Hill, drew 2,000 numbers every hour, which meant doing the full draw of 65,000 numbers took near enough three days.
Ernest Marples starting the first Premium Bond Draw, June 1957. Credit: NS&I
There are now more than 79 billion Bonds eligible to win prizes, of which about 20 per cent have been bought since November 2016. The Bonds, initially eight or nine characters long, have now moved into 11 characters, and there are about 600 billion left before the NS&I has to move into 12-character Bonds.
But ERNIE needs to generate far more random numbers than just the number of prizes that will be awarded. This is because some numbers are ineligible – some haven't been bought yet, some will have been cashed out (Bond numbers are never reissued). Bonds also have to be held for a month before they're eligible.
As of March 2019, about 8.5 million numbers are generated for each draw, of which about 3.25 million win prizes – there are two £1m prizes and a range of others, from £100,000 down to £25. The winners are the first ones ERNIE generates that are eligible to win.
ERNIE's activities are also checked before and after each draw by the Government Actuary's Department (GAD), which performs four tests to check the machine is truly random:
- Frequency – whether every possible character in each position of the Bond number appears as often as it should
- Serial – this looks at how many times one digit follows another, e.g. how often does a 3 directly follow a 7
- Poker – this looks at the number of times consecutively generated groups of characters contain: four identical characters, three of a kind, two pairs, one pair, all different
- Correlation – this looks for correlation between characters in two different Bond positions over a series of Bond numbers
ERNIE has never failed.
But the fourth incarnation – which produces 1 million numbers an hour – is at the limit of its powers. If the draw was to take much longer, the system wouldn't be able to produce both the number of Bonds for the draw and the files that the GAD needs to check. With ERNIE 5's system, which can produce 100 million numbers in a single draw, this problem is eradicated.
In pursuit of randomness
When Premium Bonds were launched, the Post Office needed to be able to generate thousands of numbers, because it was handing out a number of smaller prizes rather than one big jackpot – not exactly the job for a Bingo Hall ball machine.
Moreover, it was crucial that the numbers had to be truly random. And for this, there can be no input; no "seed" into the system that would render them predictable or reproducible. This means relying on a physical source of randomness, rather than algorithms, as computers are by their very nature deterministic, and can only churn out pseudo-random numbers.
With this in mind, where else to look than code-breaking? And so it was that some of the men who had worked on Colossus at Bletchley Park set about making a random number generator at the Post Office Research Laboratory at Dollis Hill.
The principle behind ERNIEs 1 to 4 was to use thermal or signal noise – the hiss of an old analog radio – for the process. The principle uses tubes filled with neon gas, through which a current is passed by applying high voltages at each end.
As electrons shoot from the electrodes, they collide with the neon atoms in the tube; it is the path of the electrons that is random. This current was amplified, digitised and used to generate the Bond number, initially made up of eight or nine characters. The physical processes produced random statistical fluctuations, meaning the numbers generated are truly random.
ERNIE 1 had nine sets of counters, which were driven by pulses from the neon tube – the number of pulses per second drove the number of counts per second. In order to generate the random characters, the number of steps the bottom counter was behind the top one was calculated.
The ninth counter was actually set to show a value from 0 to 22, which would generate a letter (it didn't include I, O or U, as they looked too much like 1, 0 and V). The intervals were set at two seconds, and the machine generated a full nine-character Bond each time, with eight digits and one letter.
After that, the Bond number was sent to a teleprinter room in Blackpool – based on the letter that it started with – and two people, separately, checked to see whether the Bond existed and was eligible. This process was automated in the '80s.
And that principle remained the same up until now – today's announcement is a step-change for NS&I, and possibly one of the most public-facing government uses of the quantum tech more commonly deployed to generate random keys for cryptography.
ERNIE 5's chip. Credit: NS&I
The chip powering ERNIE 5 was developed by crypto biz ID Quantique (IDQ), and the idea of using physical forces to generate random numbers is similar. In this case, photons are sent towards a semi-transparent mirror and one of two events happens – reflection or transmission – which are associated with 0 and 1 bit values.
'An amazing machine'
The quantum leap means ERNIE 5 takes 12 minutes to do the draw – which future-proofs the draw for NS&I, allowing it to keep selling Premium Bonds for who knows how long. If ERNIE 1 was still around today, it would take about 190 days with the machine running non-stop.
But the speed of the new machine shouldn't detract from the fact ERNIE 1 was unique and a groundbreaking piece of kit.
"It covers so many different varieties of electronics," Phil Hayes, one of the team at The National Museum of Computing (TNMoC) who helped rebuild Colossus, told The Register. "It has a combination of old and new technology."
That includes old telephone kit, Strowger equipment, relays, electromechanical valves, transistors and core memory. But it's not just that. "Today, we all know about printed circuit boards – every piece of electronic equipment going has them – but in the very early days, they called them wiring boards," Hayes said.
The original ERNIE 1. Credit: NS&I
"ERNIE was the first machine that Dollis Hill ever built using printed wiring boards; the first machine they built with printed circuit boards. That's why it's such an amazing machine."
If Hayes talks about ERNIE with reverence, it's because he's spent a lifetime obsessed.
"In about 1960, I was about eight and I heard about this machine called ERNIE, and it fascinated me but I didn't really understand it. Then, when I started to become interested in electronics, I became really interested in it."
This fascination followed him through his life and in about 2005, when Hayes found out that ERNIE 1 still existed – languishing in the Science Museum's storage – he set about trying to bring ERNIE 1 to TNMoC.
"A lot of people knew the name, but the machine itself was always kept very, very secret, and I wanted to get ERNIE up here, to show the public this piece of important equipment."
In order to do so, he had to produce a report. "But it backfired." Because that report convinced the Science Museum of ERNIE 1's computing significance – and they put it on display there instead.
At the time he set about his research, Hayes said he didn't know ERNIE – the machine he'd spent his youth pondering – shared anything with Colossus – the machine he helped to rebuild – and in front of which he was chatting to El Reg.
Harry Fensom working on ERNIE 1. Credit: NS&I
"The chief designer of ERNIE 1 was a chap by the name of Harry Fensom. He was one of the original designers that worked with Tommy Flowers on Colossus during the war," he said. "But at the time, I didn't realise there was a link."
A happy retirement for ERNIE 4
Unsurprisingly, ERNIE 1 was a large and complex technical setup – and being a customer-facing machine that was literally making people rich, the government needed to ensure the public trusted it. So the powers that be decided to create a demo version for Post Master General Charles Hill to show off to the press when the Bonds were launched in 1956.
The original ERNIE 1 demonstration rig, with postmaster Charles Hill. Credit: NS&I
A reproduction of this demonstration machine – "the respectable face of ERNIE," quipped one NS&I staffer on the day – was on display at TNMoC when El Reg visited.
The large wooden box has two giant dials numbered 0 to 9 with spinning orange lights, and, with amplification, a loud hiss aims to show how the signal noise is used to generate the random numbers.
The reproduction of the demo, on display at TNMoC
Click here to see a video of the ERNIE 1 demo machine in action at TNMoC, as captured by our Vulture. (For a slightly higher-production value video, the NS&I has its own interview with Hayes here.)
The museum has also developed a virtual ERNIE (although Hayes pointed out the numbers wouldn't be truly random).
And, in a few months' time, the ERNIE 1 demo machine will be part of a display about ERNIE and its history, which is due to open this summer.
Fortunately, Hayes' failed bid to bring ERNIE 1 to Bletchley has a silver lining – ERNIE 4 will spend its retirement at the museum, in the room next to his long-lost, far-removed cousin Colossus. ®