Encryption In The 1790s

For as long as humans have had writing, there’s been a need to send secret messages. It is easy to think that Enigma machines and their immediate predecessors are old tech, but they are much more recent than ancient systems used by the Greeks and Romans. Even Thomas Jefferson, one of the founding fathers of the United States, was interested in encryption and is often said to have invented the Jefferson Disk machine for encryption. The truth is, the device is probably older than Jefferson, but he certainly thought about using it for secret communications.

Simple but Effective

Thomas Jefferson was, apparently, a fan of secret messages

The idea is simple. We make a series of disks. Each disk has a number on it and, around the edge, all the letters of the alphabet. The placement of each wheel with the same number is the same, but, overall, the arrangement is random. That is, all disks marked #5 might start with XCBYG, but all disks marked with #10 could start with FAYQL. You take one set of disks, and I keep the other set.

When we want to send secret messages, we agree to arrange our disks on an axle in the same order. Jefferson used a 36-disk system, so we might agree to go left to right with the odd numbers first and then the even numbers, or any other setup that we could agree on.

Encryption

Once the wheels are in place, encryption is simple. There’s a bar across the device, and you line up your message using a wheel for each letter: ENEMYCOMESBYSEA, for example. Then you look at any different row, which will now read something crazy like: FSRSSXQCGAEEFOR (plus the random letters on the rest of the disks). That’s the message you send.

Continue reading “Encryption In The 1790s”

Saving Some Coin With 3D Printed Stencils

One of the extra tools someone might need when working with surface-mount components is a solder paste stencil, which not only simplifies the application of solder paste to a PCB but increases accuracy. These metal stencils can cost an annoying amount of money and take time to get delivered, so this group has developed a method to 3D print them instead.

Starting with a PCB design in one’s tool of choice, the Gerber files can be sent to the online Stenchill tool to generate the stencil. Alternatively, a KiCad plugin exists as well. The tool will output files for a 3D printer from there. An FDM printer is required, with either PLA or PETG filament, and some configuration in the slicer is needed to get the accuracy required for a useful stencil. But once that’s all set up, the printer can output a perfectly usable stencil at a fraction of the cost, and without having to wait days for delivery through the mail.

It’s not all upside, though. Although it might be better than applying solder paste with a syringe on a massive board or doing more than one smaller board by hand, it may not be as good as a metal stencil for extremely small pads. But for those who often find themselves using metal stencils and dealing with the downsides that come with them, this could be a viable alternative, especially when prototyping.

If you have a laser cutter handy, that opens up some additional options for stencil production.

Continue reading “Saving Some Coin With 3D Printed Stencils”

A Raspberry Pi Pico 2 W connected to a speaker

Voice Control Toolkit Comes To A Pico Near You

Voice-controlled appliances are nothing new. What might be new, however, is [Moonshine AI] running it all locally on a Raspberry Pi Pico 2 W!

The voice interface is roughly divided into three parts: voice activity detection, SpellingCNN speech-to-text and a neural text to speech. The speech to text supports up to 50 tokens, and can be re-trained to support any specific words you want. It runs a simple loop: detect voice activity, listen for (command) tokens, process them in C++, use the TTS to reply, and repeat.

Now, to be fair, it is a bit of a squeeze: 3.6 MiB of the available 4 MiB FLASH and 468 KiB SRAM on a stock Pi Pico 2 board. It leaves you with just about enough space to write a small amount of extra software, but it’ll be a challenge to fit anything substantial. Still, fitting three different types of AI model needed to make this possible in such a space is quite impressive.