Skip to content

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.

About

Project describe how Enigma machine works in java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages