A Binary Version Of The Enigma Machine

The Enigma machine is the most well-known encryption tool used by German forces in World War II, mostly because it was so famously cracked by the Allies to great effect. Like many hackers, [christofer.jh] was intrigued by the design of the Enigma, and felt compelled to build a binary version of his own design.

The original Enigma machine was designed to scramble the 26 letters in the Latin alphabet. This design is altogether simpler. Instead of 26 letters, it will scramble 1s and 0s of binary code based on the initial settings of the scrambler rings.

Continue reading “A Binary Version Of The Enigma Machine”

Hackaday Links Column Banner

Hackaday Links: September 19, 2021

Things might be getting a bit dicey out in Jezero crater for Ingenuity. The little helicopter that could is starting to have trouble dealing with the thinning Martian atmosphere, and may start pressing against its margin of safety for continued operation. Ingenuity was designed for five flights that would all take place around the time its mothership Perseverance touched down on Mars back in February, at which time the mean atmospheric pressure was at a seasonal high. Over the last few months, the density of the Martian atmosphere has decreased a wee bit, but when you’re starting with a plan for a pressure that’s only 1.4% of Earth’s soupy atmosphere, every little bit counts. The solution to keeping Ingenuity flying is simple: run the rotors faster. NASA has run a test on that, spinning the rotors up to 2,800 RPM, and Ingenuity handled the extra stresses and power draw well. A 14th flight is planned to see how well the rotors bite into the rarefied air, but Ingenuity’s days as a scout for Perseverance could be numbered.

If you thought privacy concerns and government backdoors into encryption technology were 21st-century problems, think again. IEEE Spectrum has a story about “The Scandalous History of the Last Rotor Cipher Machine,” and it’s a great read — almost like a Tom Clancy novel. The story will appeal to crypto — not cryptocurrency — fans, especially those fascinated by Enigma machines, because it revolves around a Swiss rotor cipher machine called the HX-63, which was essentially a refinement of the original Enigma technology. With the equivalent of 2,000-bit encryption, it was considered unbreakable, and it was offered for sale to any and all — at least until the US National Security Agency sprung into action to persuade the inventor, Boris Hagelin, to shelve the HX-63 project in favor of electronic encryption. The NSA naturally helped Hagelin design this next generation of crypto machines, which of course all had backdoors built into them. While the cloak and dagger aspects of the story — including a possible assassination of Boris Hagelin’s son in 1970, when it became clear he wouldn’t “play ball” as his father had — are intriguing, the peek inside the HX-63, with its Swiss engineering, is the real treat.

One of the great things about the internet is how easy it is to quickly answer completely meaningless questions. For me, that usually involves looking up the lyrics of a song I just heard and finding out that, no, Robert Plant didn’t sing “Whoopie Cat” during Misty Mountain Hop. But it also let me answer a simple question the other day: what’s the largest single-piece metal object ever created? I figured it would have to be a casting of some sort, and likely something from the middle of the previous century. But as it turns out, the largest casting ever appears to have been manufactured in Sheffield, England in 2015. The company, Sheffield Forgemaster International, produced eleven castings for the offshore oil industry, each weighing in at over 320 tonnes. The scale of each piece is mind-boggling, and the technology that went into making them would be really interesting to learn about. And it goes without saying that my search was far from exhaustive; if you know of a single-piece metal part larger than 320 tonnes, I’ll be glad to stand corrected.

Have you heard about “teledriving” yet? On the face of it, a remote-controlled car where a qualified driver sits in an office somewhere watching video feeds from the car makes little sense. But as you dig into the details, the idea of remotely piloted cars starts to look like one of those “Why didn’t I think of that?” ideas. The company behind this is called Vay, and the idea is to remotely drive a ride-share vehicle to its next customer. Basically, when you hail a ride, a remote driver connects to an available car and drives it to your location. You get in and take over the controls to drive to your destination. When you arrive, another remote drive pilots the car to its next pickup. There are obvious problems to work out, but the idea is really the tacit admission that all things considered, humans are way better at driving than machines are, at least right now.

Hackaday Links Column Banner

Hackaday Links: April 18, 2021

More bad news from Mars this week, and this time not just from Perseverance. Last week the eagerly anticipated first flight of the helicopter Ingenuity was delayed for a couple of days after failing a full-speed spin-up test of its rotors. That appears to have been a bigger deal than initially thought, as it required a significant rewrite of the helicopter’s software. That meant testing, of course, and subsequent upload to the UAV, which at 174 million miles away takes a bit of doing. The good news is that they were able to complete the full-speed rotor test without the full program upload, so we’re one step closer to flight, which may take place as early as Monday morning.

Meanwhile, over at Elysium Planitia, the Mars InSight lander has troubles of its own. The geophysical laboratory, which has been trying to explore the inner structure of Mars since landing in 2018, entered an “emergency hibernation” state this week because of a lack of sufficient power generation. Unlike the radioisotope-powered Perseverance rover, InSight relies on a pair of solar panels for its electricity, and those panels are being obscured by Martian dust. The panels normally get blown clean by Martian winds, but things have been calm lately and the dust has really built up. If this seems like deja vu all over again, it’s probably because a planet-wide dust storm is what killed the plucky Opportunity rover back in 2018. Here’s hoping the wind picks up a little and InSight can get back to work.

Funny what crops up in one’s newsfeed, especially when one is responsible for putting out content that populates others’ newsfeeds. We recently took a look at the dangers of “zinc fever”, a flu-like illness that can crop up after inhaling gasses produced by molten zinc. That resulted in stumbling across an article from last year about mild steel welding fumes being classified as a human carcinogen. This comes from the Health and Safety Executive, a UK government agency concerned with workplace health issues. The release is an interesting read, and it suggests that mild steel fumes can cause not only lung cancer but kidney cancer. The announcement is mainly concerned with British workplaces, of course, but there are some interesting tidbits in there, such as the fact that welding fumes make dust particles so small that they can reach down into the very lowest reaches of lungs, the alveoli where gas exchange occurs. It’s enough to make one invest in PAPR or some kind of fume extractor.

For those of a certain vintage, our first computer was probably something that bore little resemblance to a PC or laptop. It was likely a single-board affair or something like a C64, and acquiring the essential bit of hardware usually left little in the budget for a proper monitor. Little 12″ B&W TVs were a dime a dozen, though, and easily — if grainily — enlisted into service as a monitor by way of an RF modulator. To recreate a little of that magic with modern hardware, Hackaday contributor Adam Zeloof came up with the PiMod Zero, an RF-modulator hat for the Raspberry Pi Zero that turns the component video into an NTSC analog signal. He’s open-sourced the design files, or there’s a CrowdSupply campaign for those who prefer to buy.

And finally, if you somehow traveled back in time to the 1940s with a laptop, how long would it have taken you to crack the Enigma code? Longer than you think, at least according to Dr. Mike Pound over at Computerphile, who released a fascinating video on how Enigma worked and what it took for Turing and the gang at Bletchley to crack the code. We knew some of the details of Enigma’s workings before seeing this video, but Mike’s explanation was really good. And, his explanation of the shortcut method he used to decode an Enigma message made the whole process clearer to us than it’s ever been. Interesting stuff.

Continue reading “Hackaday Links: April 18, 2021”

Hackaday Links Column Banner

Hackaday Links: December 6, 2020

By now you’ve no doubt heard of the sudden but not unexpected demise of the iconic Arecibo radio telescope in Puerto Rico. We have been covering the agonizing end of Arecibo from almost the moment the first cable broke in August to a eulogy, and most recently its final catastrophic collapse this week. That last article contained amazing video of the final collapse, including up-close and personal drone shots of the cable breaking. For a more in-depth analysis of the collapse, it’s hard to beat Scott Manley’s frame-by-frame analysis, which really goes into detail about what happened. Seeing the paint spalling off the cables as they stretch and distort under loads far greater than they were designed for is both terrifying and fascinating.

Exciting news from Australia as the sample return capsule from JAXA’s Hayabusa2 asteroid explorer returned safely to Earth Saturday. We covered Hayabusa2 in our roundup of extraterrestrial excavations a while back, describing how it used both a tantalum bullet and a shaped-charge penetrator to blast regolith from the surface of asteroid 162173 Ryugu. Samples of the debris were hoovered up and hermetically sealed for the long ride back to Earth, which culminated in the fiery re-entry and safe landing in the midst of the Australian outback. Planetary scientists are no doubt eager to get a look inside the capsule and analyze the precious milligrams of space dust. In the meantime, Hayabusa2, with 66 kilograms of propellant remaining, is off on an extended mission to visit more asteroids for the next eleven years or so.

The 2020 Remoticon has been wrapped up for most of a month now, but one thing we noticed was how much everyone seemed to like the Friday evening Bring-a-Hack event that was hosted on Remo. To kind of keep that meetup momentum going and to help everyone slide into the holiday season with a little more cheer, we’re putting together a “Holiday with Hackaday & Tindie” meetup on Tuesday, December 15 at noon Pacific time. The details haven’t been shared yet, but our guess is that this will certainly be a “bring-a-hack friendly” event. We’ll share more details when we get them this week, but for now, hop over to the Remo event page and reserve your spot.

On the Buzzword Bingo scorecard, “Artificial Intelligence” is a square that can almost be checked off by default these days, as companies rush to stretch the definition of the term to fit almost every product in the neverending search for market share. But even those products that actually have machine learning built into them are only as good as the data sets used to train them. That can be a problem for voice-recognition systems; while there are massive databases of utterances in just about every language, the likes of Amazon and Google aren’t too willing to share what they’ve leveraged from their smart speaker using customer base. What’s the little person to do? Perhaps the People’s Speech database will help. Part of the MLCommons project, it has 86,000 hours of speech data, mostly derived from audiobooks, a clever source indeed since the speech and the text can be easily aligned. The database also pulls audio and the corresponding text from Wikipedia and other random sources around the web. It’s a small dataset, to be sure, but it’s a start.

And finally, divers in the Baltic Sea have dredged up a bit of treasure: a Nazi Enigma machine. Divers in Gelting Bay near the border of Germany and Denmark found what appeared to be an old typewriter caught in one of the abandoned fishing nets they were searching for. When they realized what it was — even crusted in 80-years-worth of corrosion and muck some keys still look like they’re brand new — they called in archaeologists to take over recovery. Gelting Bay was the scene of a mass scuttling of U-boats in the final days of World War II, so this Engima may have been pitched overboard before by a Nazi commander before pulling the plug on his boat. It’ll take years to restore, but it’ll be quite a museum piece when it’s done.

An Arduino And An Enigma All Rolled Into One

This hacker has been wanting to design an Enigma machine simulator for a while, but didn’t take the leap until they realized there was a compact Arduino with a surplus of I/O.

The logs go through all sort of variations on the machine. Everything from a plug board variation similar to the original to a 16 segment LED tester are covered. In one of the posts you can even see it decode a real U-Boat message. 

The earlier revisions are housed in very attractive laser cut cases but the latest designs employ an even more elegant casing solution. The simulator uses 16 segment displays and momentary push buttons for the keys. At its core is a 2560 Pro mini. The write-up contains a lot of detail about the code behind the Enigma and is interesting to read.  Interestingly, the PCB was designed in Fritzing, the EDA software many love to hate.

We love the craftsmanship and attention going into this project and can see it turning into a very appealing kit as it goes through its design cycles.

Espionage On Display As GCHQ Hosts A Temporary Exhibit

At the top of the British electronic intelligence agency is the Government Communications Headquarters (GCHQ), a very public entity whose circular building can easily be found by any inquisitive soul prepared to drive just off the A40 in Cheltenham which is about two hours west of London. But due to the nature of its work it is also one of the most secretive of UK agencies, from which very little public information is released. With over a century of history behind it and with some truly groundbreaking inventions under its belt it is rumoured to maintain a clandestine technology museum that would rewrite a few history books and no doubt fascinate the Hackaday readership.

Perhaps the most famous of all its secrets was the wartime Colossus, the first all-electronic stored program digital computer, which took an unauthorised book in the 1970s to bring to public attention. Otherwise its historical artifacts have been tantalisingly out-of-reach, hinted at but never shown.

A temporary exhibition at the Science Museum in London then should be a must-visit for anyone with an interest in clandestine technology. Top Secret: From ciphers to cyber security occupies the basement gallery, and includes among other exhibits a fascinating selection of artifacts from the Government agency. On a trip to London I met up with a friend, and we went along to take a look.

Continue reading “Espionage On Display As GCHQ Hosts A Temporary Exhibit”

Simulating The Enigma’s Oddball Cousin

Even if you wouldn’t describe yourself as a history buff, you’re likely familiar with the Enigma machine from World War II. This early electromechanical encryption device was used extensively by Nazi Germany to confound Allied attempts to eavesdrop on their communications, and the incredible effort put in by cryptologists such as Alan Turing to crack the coded messages it created before the end of the War has been the inspiration for several books and movies. But did you know that there were actually several offshoots of the “standard” Enigma?

For their entry into the 2019 Hackaday Prize, [Arduino Enigma] is looking to shine a little light on one of these unusual variants, the Enigma Z30. This “Baby Enigma” was intended for situations where only numerical data needed to be encoded. Looking a bit like a mechanical calculator, it dropped the German QWERTZ keyboard, and instead had ten buttons and ten lights numbered 0 through 9. If all you needed to do was send off numerical codes, the Z30 was a (relatively) small and lightweight alternative for the full Enigma machine.

Creating an open source hardware simulator of the Z30 posses a rather unique challenge. While you can’t exactly order the standard Enigma from Digi-Key, there are at least enough surviving examples that they’ve been thoroughly documented. But nobody even knew the Z30 existed until 2004, and even then, it wasn’t until 2015 that a surviving unit was actually discovered in Stockholm.

Of course, [Arduino Enigma] does have some experience with such matters. By modifying the work that was already done for full-scale Enigma simulation on the Arduino, it only took a few hours to design a custom PCB to hold an Arduino Nano, ten buttons with matching LEDs, and of course the hardware necessary for the iconic rotors along the top.

The Z30 simulator looks like it will make a fantastic desk toy and a great way to help visualize how the full-scale Enigma machine worked. With parts for the first prototypes already on order, it shouldn’t be too long before we get our first good look at this very unique historical recreation.