You are browsing as a guest. Sign up (or log in) to start making projects!

Enigma

  • 3 Devlogs
  • 2 Total hours

I was fascinated by the encryption system of the Enigma, the German cipher machine of World War II, so I implemented it using the CLI a year or two ago. However, since I am at it now, I plan to handle the frontend as well to make it look nice. In short, it is a project that allows you to manipulate the Enigma machine through a browser.

Open comments for this post

1h 2m 10s logged

Hardware fidelity pass — “wait, is this actually what the real Enigma looks like?”

After the electrical signal path was rendering, I pulled up real Kriegsmarine M4 photos to compare — and the 3D model didn’t hold up. So before adding anything new, this one is a “make it historically accurate first” pass.

What was wrong

  • Floating letters. The rotor alphabet was hovering in mid-air beside each wheel instead of being on it. On the real machine the letters are engraved around the rotor’s circumference and you read one through a small window.
  • The reflector and entry wheel looked fake. They were basically copy-pasted rotors with the letters wiped off. In reality the reflector (UKW) and entry wheel (ETW) are fixed and tucked inside the housing — there are no spinning lettered drums there at all.
  • Lopsided UI. A huge dead zone under the input field was squashing the 3D view into a thin strip.
  • Input/output drift. The I/O readout was center-aligned, so every keypress shoved the existing letters further left. Genuinely uncomfortable to type on.

What I did

  • Wrapped the alphabet onto the rotor circumference with engraved grooves, contact rings, and brass window bezels, so you read it through the top window like the real thing.
  • Rebuilt the reflector and ETW as smaller dark drums seated in the housing, and set them to stay hidden in the normal view — they’ll surface later in X-ray mode, where the internal wiring belongs.
  • Set the 3D viewport to flex: 1 so it fills the space, and re-framed the camera.
  • Switched the I/O readout to a fixed-width, left-anchored layout, so input and output line up and grow rightward instead of sliding around.

A lesson paid for in blood

Squashed a stack of messy single-digit commits into one clean commit — then ran git reset --hard with an uncommitted layout fix still in the working tree and watched it evaporate. Re-did it in two minutes, but the takeaway stands: run git status before --hard. Always.

Next up: the X-ray translucent mode that exposes the internal wiring and lights up the live signal path through the rotors. That’s the part I actually started this whole thing for.

Hardware fidelity pass — “wait, is this actually what the real Enigma looks like?”

After the electrical signal path was rendering, I pulled up real Kriegsmarine M4 photos to compare — and the 3D model didn’t hold up. So before adding anything new, this one is a “make it historically accurate first” pass.

What was wrong

  • Floating letters. The rotor alphabet was hovering in mid-air beside each wheel instead of being on it. On the real machine the letters are engraved around the rotor’s circumference and you read one through a small window.
  • The reflector and entry wheel looked fake. They were basically copy-pasted rotors with the letters wiped off. In reality the reflector (UKW) and entry wheel (ETW) are fixed and tucked inside the housing — there are no spinning lettered drums there at all.
  • Lopsided UI. A huge dead zone under the input field was squashing the 3D view into a thin strip.
  • Input/output drift. The I/O readout was center-aligned, so every keypress shoved the existing letters further left. Genuinely uncomfortable to type on.

What I did

  • Wrapped the alphabet onto the rotor circumference with engraved grooves, contact rings, and brass window bezels, so you read it through the top window like the real thing.
  • Rebuilt the reflector and ETW as smaller dark drums seated in the housing, and set them to stay hidden in the normal view — they’ll surface later in X-ray mode, where the internal wiring belongs.
  • Set the 3D viewport to flex: 1 so it fills the space, and re-framed the camera.
  • Switched the I/O readout to a fixed-width, left-anchored layout, so input and output line up and grow rightward instead of sliding around.

A lesson paid for in blood

Squashed a stack of messy single-digit commits into one clean commit — then ran git reset --hard with an uncommitted layout fix still in the working tree and watched it evaporate. Re-did it in two minutes, but the takeaway stands: run git status before --hard. Always.

Next up: the X-ray translucent mode that exposes the internal wiring and lights up the live signal path through the rotors. That’s the part I actually started this whole thing for.

Replying to @reimunyancat

0
2
Open comments for this post

20m 50s logged

I created an initial version to beautifully implement the existing CLI Enigma on the web.

I created an initial version to beautifully implement the existing CLI Enigma on the web.

Replying to @reimunyancat

0
1

Followers

Loading…