Skip to content
← Back to Community
Enigma Machine ^_^
Profile icon
NihalAnand

Yeah, I made a commercial-grade Enigma machine, as used by the Germans during WWII.

Voters
Profile icon
SaraMianaPonce
Profile icon
Kookiez
Profile icon
Baconman321
Profile icon
06rha1504
Profile icon
ch1ck3n
Profile icon
AreyaRoshanrava
Profile icon
TravisHutton
Profile icon
xxpertHacker
Profile icon
wantT0befriends
Profile icon
OldWizard209
Comments
hotnewtop
Profile icon
OldWizard209

this is pretty cool @NihalAnand

Profile icon
NihalAnand

@abdullahrajput9 Thank you so much! I got inspiration for this from the Numberphile video explaining the Enigma machine (https://www.youtube.com/watch?v=G2_Q9FoD-oQ) I didn't have a real one, and I wanted to try and send codes myself. So, I made it in Python!

Profile icon
OldWizard209

Yeah but putting in a program is pretty epic. Good job @NihalAnand

Keep it up
(づ。◕‿‿◕。)づ
(づ。◕‿‿◕。)づ

Profile icon
ch1ck3n

KBQIVW TF QPZPNNH

Profile icon
[deleted]

This is really cool. 1 thing though, didn't the enigma machine have a plugboard. Otherwise, nice job!

Profile icon
NihalAnand

@StealthySniper The military grade machines do, while commercial machines (like this one) do not.

Profile icon
xxpertHacker

Nice job!

Literally one of the first things that I ever wanted to when I learned to program was to create an Enigma machine (but I was too much of a noob to have actually done it at the time)

Also, how hard could it be to create a mock plugboard, wouldn't it just be a hashmap/dictionary of characters to other characters?

Profile icon
NihalAnand

@xxpertHacker It isn't difficult at all, it's more that actually implementing the user input for that makes it really confusing and isn't well suited for the terminal format.

Profile icon
DynamicSquid

Cool!

Profile icon
NISHoriginal

Great project!! But just a recommendation, please include some error handling so that the code doesn't abruptly stop when the user inputs a wrong option, and asks the user to enter an option again... I would be very happy if you'd do that!!

Profile icon
NihalAnand

And, of course I whiffed it the first time through. It now has the reflector system in place, so messages are EVEN MORE RANDOM!!!! ^_^

Profile icon
tankerguy1917

1st. 6
2nd. 20
3rd. 26
HFNOS YNLZN XTTNZPDRFW
this is pretty cool, btw

Profile icon
NihalAnand

@tankerguy1917 Thanks, that means a lot! ^_^

Profile icon
NihalAnand

@tankerguy1917 Also, I'm sorry to say, but your message no longer works because I messed up in making a certain part of the encoding process. I fixed it, but that means that codes generated by the previous version no longer work.

Profile icon
tankerguy1917

@NihalAnand oh. well it said hello there NihalAnand

Profile icon
AnvayMathur1

@NihalAnand Was it that a letter could encode itself? This message says so since it encoded the first H to H.

Profile icon
nonamename18

excellence