Random Number Generator Is A Blast From The Past

Hackers love random numbers, or more accurately, the pursuit of them. It turns out that computers are so good at following our exacting instructions that they are largely incapable of doing anything that would fit the strict definition of randomness — which has lead to some elaborate methods of generating the unexpected.

Admittedly, the SB42 Random Number Generator built by [Simon Boak] isn’t exactly something you’d be using for cryptography. The method used to generate the digits, a pair of 555 timers sending pulses through linear-feedback shift registers, would at best be considered pseudo-random. Plus the only way of getting the digits out of the machine is by extracting them from the Nixie tubes with your Mark I Eyeballs. But it absolutely excels at the secondary reason many hackers like to build their own randomness rigs — it looks awesome.

Externally, it absolutely nails the look of a piece of vintage DIY year. Down to the classic white-on-black label tape. But open up the hood, and you’re treated to a real rarity these days: wirewrap construction. In an era where you can get PCBs made and shipped to your door for literally pennies, [Simon] is out there keeping the old ways alive. It doesn’t just look the part either. Unlike most modern projects we see, there isn’t a multi-core microcontroller behind the scenes doing all the work, it’s logic gates all the way down.

This isn’t the first random-ish number generator that we’ve seen use shift registers. But if you’re looking for something that might actually pass some randomness checks, and don’t mind working with something a bit spicy, you could check out some of the previous devices we’ve covered that used radioactive decay as an entropy source.

16 thoughts on “Random Number Generator Is A Blast From The Past

  1. Using a LFSR, with 99 possible states represented by 8 bits, would make the periodicity quite small. It wouldn’t be suitable for Monte Carlo simulations. However this device could maintain form factor and its case using a Geiger counter inside as a source of randomness.

    1. The shift register is probably much longer, probably 24 bits with more than 16 million internal states. The description also mentions two shift registers, one for each digit. The circuit will skip results where a digits would be outside the 0-9 range, so the useful number of states is about 10 millions. Estimating that it produces a new pseudo-random number every 4 seconds or so, it will wrap around every 300 days or so. That gives you enough time for (very boring) Monte Carlo simulations.

      With the individual shift registers and clock sources per digit, differences in clock speeds might result in a much longer periodicity.

      Not sure what the “42” in “SB42” stands for. “SB” are the builders Initials, but “42 bits” doesn’t seem to make any sense here. I guess it’s just because “42” was a random number picked by some author for a somewhat famous radio series.

    1. Indeed. I also love Simon Boak’s SB116 calculator. I am 100% sure that, once we have commercial moon flights in the 1970s (or 1980s at the lastest), every spaceship will carry these calculators.

  2. There is something I wonder about concerning randomness. From what I have seen so far, radioactive decay seems to be quite random. It appears also that certain optical diode elements can detect certain types of radioactive emissions.
    Therefore, could a simple rng be built using a radioactivity source (old smoke detector, radioactive teapot or similar) and such an optical element?

    I don’t have any experience with either topics, so feel free to correct my misconceptions.

    1. There are dedicated randomness IC’s that have radioactive sources embedded in the packaging material for the IC encapsulation, and churn out a nice solid stream of random numbers for decades. There are a couple of papers that go into quite a bit of detail about one that uses 63Ni as the radio source, because it’s a beta emitter so it’s safe to have inside a laptop.

      1. Oh neat, thanks. It seems they’re quite cheap too. Now to find that paper again about “AI improving when exposed to white noise during training” or something like that. Fascinating.

    2. There really is no need to go overboard with complexity. Simple analog circuit producing some white noise, ad-converter and enough compute to hash say 1kb of analog noise into 64-bit random number is perfect enough for all practical purposes. Or hash a frame from webcam or a second of audio.

    1. Ironically, messy wire connections from the early radio days may be better from a physics point of view.
      In comparison to a modern and “tidy” PCB design, they’re 3D and don’t use traces that might be in parallel. The criss-cross wiring also doesn’t change the length of legs of the components, such as capacitors or resistors. By leaving components “as is”, they work according to specification. ;)

  3. That is a nice bit of kit. To be a bit closer to period consider using slot head screws. I did a project to modernize a 1970’s paper tape punch and found that the original machine was exclusively held together with slot head pans.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.