Skip to content
/ Enigma Public

Project describe how Enigma machine works in java

Notifications You must be signed in to change notification settings

Yecodeo/Enigma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Enigma challenge 🚀

🥅 Objectif

During World War II, the Germans were using an encryption code machine called 🔒 Enigma – which was basically an encryption machine that encrypted messages for transmission. The Enigma code went many years unbroken. Here's How the basic machine works:

📐 How it works

First, Caesar shift is applied using an incrementing number:
If string is :

AAA and starting number is 4 then output will be EFG.

So : A + 4 = E A + 4 + 1 = F A + 4 + 1 + 1 = G

Now map EFG to first ROTOR such as:

ABCDEFGHIJKLMNOPQRSTUVWXYZ BDFHJLCPRTXVZNYEIWGAKMUSQO

So EFG becomes JLC. Then it is passed through 2 more rotors to get the final value.

If the second ROTOR is AJDKSIRUXBLHWTMCQGZNPYFVOE, we apply the substitution step again thus:

ABCDEFGHIJKLMNOPQRSTUVWXYZ AJDKSIRUXBLHWTMCQGZNPYFVOE

So JLC becomes BHD.

If the third ROTOR is EKMFLGDQVZNTOWYHXUSPAIBRCJ, then the final substitution is:

ABCDEFGHIJKLMNOPQRSTUVWXYZ EKMFLGDQVZNTOWYHXUSPAIBRCJ

So BHD becomes KQF.

📧 Result

Final, output is send via Radio Transmitter.

Releases

No releases published

Packages

No packages published

Languages