A few trivial naming corrections:laz0r wrote:The type of code used here is called a "substitution cipher". This basically means that each letter is represented by another letter. For example:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
This is known as a "caesar shift" as the alphabet is shifted along by x terms. The above is shifted by 1. Using this we can encode the simple message "test123".
T E S T 1 2 3
becomes:
U F T U 1 2 3
There are other forms of substitution ciphers such as monoalphabetic ciphers which has a random alphabet. ie:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Q W E R T Y U I O P A S D F G H J K L Z X C V B N M
<snip>
In following the rules of the forums I can not explain any more, but if you are still struggling then just ask.
- A monoalphabetic cypher as a single cypher that's not 100% right as it's encapsulates any cypher which has a one to one translation of characters so that includes things like the shift (includes Caesar, ROT13 and arbitrary), key phrase and Atbash as well as random key cyphers.
- A Caesar cypher is actually a monoalphabetic shift cypher with a shift of 3 (as implemented by Caesar) so to shift by an arbitrary number technically isn't a Caesar cypher (although overlooked on wikipedia, this brought a tear to my eye )
- What you described as a "substitution cypher" is a shift shift/additive cypher which is a monoalphabetic cypher. A substitution cypher can include polyalphabetic cyphers such as Vigenère and even more recent (electro)mechanical cyphers such as the Jefferson wheel cypher or most of the cyphers up to the later part of the 20th century which weren't too different from the Enigma machine (technical XORing with a key is polyalphabetic or monoalphabetic with just a single byte)