Enigma Uhr for the Enigma Touch

34 views
Skip to first unread message

AltairArchaeology

unread,
Jun 16, 2026, 1:04:39 PMJun 16
to Enigma touch
I was reading about the available accessories in Inside Enigma, an excellent book by Prof. Tom Perera and Dan Perera, and the Enigma Uhr caught my eye. 



Cryptomuseum goes into much greater detail than I will here (https://www.cryptomuseum.com/crypto/enigma/uhr/index.htm) but for the short version: the Uhr (clock) was an attachment to the Enigma that used 20 cables and a wooden knob to set positions. You would attach the cables to the daily plugboard settings (with an example of AB, red go in the first letter (A), while white goes into the second (B)) and then use the knob to scramble so that the first letter is paired with a different second letter. 


AltairArchaeology

unread,
Jun 16, 2026, 1:05:08 PMJun 16
to Enigma touch
I worked with Codex to build a program to emulate the Enigma Uhr using the Enigma Touch's serial connection. You first queue up your plugboard settings by either manually entering them, or using the Update Plugboard option which sends the ?PB command to the Enigma Touch, and then reads the output. You then enter your desired text to be converted (either plain text or ciphertext), set your Uhr position, and click convert. The text printed under RESULT is the text after it has gone through Uhr's shifting based on your selected settings. This isn't perfect, but it gives you an idea of how the Uhr attachment worked, and can be used to encode/decode Uhr messages. 

Instructions for Operation:
1. Set your Enigma Touch to Serial Mode. Refer to the user manual on how to do this.
2. Set your Enigma Touch to the desired settings to encrypt/decrypt.
3. Plug your Enigma Touch into your computer.
4. Open the Enigma Touch - Uhr Module/
5. Ensure the proper USB serial port is selected - click refresh if it is not displaying.
6. Click on Read Plugboard to automatically enter your plugboard settings. (Check your key after this - see known issues below)
7. Set your desired key.
8. Set the Uhr position as desired.
9. Enter the text you want to send in the Message box.
10. Click on convert and wait for it to complete.
11. Use the text displayed under Result as your encoded message to send, or your decoded message to read.
12. Repeat steps 7 thru 11 until you are finished using the Uhr module to encode or decode messages. 

AltairArchaeology

unread,
Jun 16, 2026, 1:08:52 PMJun 16
to Enigma touch

Example Message:

If you would like to test it yourself, I've prepared a sample message below to decrypt using the settings below. Ensure that you look at the Uhr's historic bigrams to complete it successfully. :) 

Model: M1
Reflector: B
Rotors: I II III
Rings: 01 02 03
Key: 01 02 03
Plugboard: AB CD EF GH IJ KL MN OP QR ST

1155L | 70 | KEY = ABC

QOED

RRAVL KYIBK GGJBP WUDPQ IXBQB TLALB CUKOA NCJLS HSXGO BXJVN CKXGO JCVKO OUWOW WTGSF

Note: X = a space between words. 

Known Issues:

- The conversion isn't as clean as I'd like - to get the Touch to print out the actual result on the lightboard requires the program to know ALL of the settings, such as Model, Greek, Reflector, Rotors, Rings, and Key, which is a whole other can of worms. Right now, the conversions it does work to get the correct end result. Use RESULT as your "final answer."

- I set the program by default to 4800 baud. I found that this was the lowest traditional baud setting I could go to for sending longer messages (80-100 characters is what I tested with) without the program giving an error due to sending characters "too fast." If this gives you problems, try dropping the baud to 2400.

- Occasionally, the Read Plugboard setting will cause your Enigma Touch to type two letters before it successfully reads the results of the ?PB request. I can reproduce it reliably by sending a plugboard request after converting a message. This is harmless, if slightly annoying. Check your key after pulling the plugboard request and ensure it is set appropriately. 

Jürgen

unread,
Jun 16, 2026, 1:35:42 PMJun 16
to Enigma touch
Very nice, thank you! I will need to play with this...

I can probably shed some light on the "sometimes the Enigma touch types two unsolicited letters" effect. For the "?PB" sequence to be interpreted as a command, it must come right at the beginning of a new line, i.e. after a CR or LF. I assume ?PB is the first thing you send, after the prior round of sending plain text or cipher text. In that case the incoming characters are interpreted as input to be encrypted -- the "?" is ignored, and "PB" gets encrypted. If you send an additional CR/LF right before the ?PB command, it should be recognized reliably.

(The requirement to have ! and ? commands start right at the beginning of a new line is deliberate, to avoid spurious detection of commands when plain text is sent to the Enigma. It is inspired by the old "AT" modem command set and seemed like a good idea when I implemented it... It might be causing more trouble than benefit though. Should I remove it and let every ! and ? trigger the command interpreter?)

Best,
Jürgen

AltairArchaeology

unread,
Jun 16, 2026, 2:03:30 PMJun 16
to Enigma touch
Jürgen,

I would keep the ! and ? settings as is. I think it is more related to the software itself on my end. I can work around it if I develop further, but yes, it is printing "PB" and encrypting it. Knowing this, I can adjust for it, and maybe have the "clear" setting (or have pressing Read Plugboard) trigger a new line before activating. 

AltairArchaeology

unread,
Jun 16, 2026, 2:29:23 PMJun 16
to Enigma touch
Jürgen,

Using your feedback, I was able to reprogram the Read Plugboard option to input the following when clicked:  CR LF ?PB CR . This has fixed the issue, and it now reads the plugboard as expected without sending any characters to the Enigma Touch.

AltairArchaeology

unread,
Jun 16, 2026, 8:16:59 PMJun 16
to Enigma touch
So with the information on "CR LF ?PB CR" being the solution to stop the program from sending any "garbage" characters to the Enigma Touch, I used that, and a Tera Term Log for all models, rotors, etc, to make a version that now reads all of the Enigma Touch's settings (minus the Custom Enigma - that is for later), and alerts you if the model does not have a plugboard so the Uhr won't work with it, since in reality you would have no way to plug it in. It also resets your rotor positions after the message is typed to what displays on your Enigma, and will alert you if the rotor positions on the program do not match what is on the Enigma Touch after printing one character. 

All of this gets to where the lampboard will illuminate with the result output, which is historically how you, as the operator, would see it. To do this, I effectively had to create an Enigma simulator inside of the program that takes the exact values of the model, reflector, rotors, rings, rotor positions, and the plugboard, takes the input, runs through the virtual Uhr module, and then sends that output back to the Enigma Touch. So you effectively have an Enigma Touch sending data to a virtual Enigma attached to a virtual Uhr that then sends the output back to your Enigma Touch. Not super pretty, but it works. 

I did some stress testing with a long message for encrypting and decrypting (by chance, the opening to A Tale of Two Cities is exactly 475 characters without spaces or punctuation), and found that you need 2400 Baud or the Enigma Touch won't be able to keep up. I'm modifying the program to have the baud be set to 2400 by default. You can also set the group to whatever number you want, so 5 gives you the typical Wehrmacht 5-character messages, 4 gives you the typical Kriegsmarine style, etc. 0 lumps everything together, unless you leave Keep spaces and punctuation on, in which it'll mirror the input text in spacing and grouping. 

Here are some screenshots from the stress test. I randomly put in settings before running this, and the program correctly identified them all. 

Stress Test - Encrypt

Stress Test - Encrypt.png

Stress Test - Decrypt

Stress Test - Decrypt.png

Note: I started with positions A B C D if anyone wants to try to reproduce this on the previous release. The program correctly identified the new rotor positions after the full message of 475 characters was typed out. 

Oh yeah, it also identifies Reflector D's wiring scheme just in case you use it with some custom wiring. I tested it on the German notation, so I don't know if BP notation will work. I'll try that next, as one of the many other parts to work on. :) 

AltairArchaeology

unread,
Jun 18, 2026, 1:28:58 PMJun 18
to Enigma touch
Finally got to the level where I am confident in a v1.0.0 release. 


Enigma Touch - Uhr Device 1.0.0

The first stable release provides historical Enigma Uhr Device behavior for ten plugboard pairs and an optional ahistoric mode supporting one through thirteen pairs. It reads the active Enigma Touch settings over USB serial and drives the Touch so its lightboard displays the final Uhr-adjusted result.

Highlights
Historical Uhr positions 00 through 39.
Ahistoric one- through thirteen-pair mode.
Enigma I, M3, and M4 support.
Long-message progress and Stop control.
Lite portable Windows executable with no installer required.
Alternative Qt portable build.

Compatibility

64-bit Windows 10 or Windows 11.
Enigma Touch firmware supporting the documented serial setting queries.
USB serial connection at 2400 baud recommended.

Known Limitations

The Custom Enigma model is not implemented.
Uhr conversion is limited to models with an active plugboard.
The executables are unsigned and may display a Microsoft Defender SmartScreen warning.

Conversion Test.png
Reply all
Reply to author
Forward
0 new messages