In a substitution cypher, the letters of the message are substituted by other letters or symbols, but the letters of the message are never rearranged.
A simple substitution cypher exchanges one letter for one letter. When using more letters, it is a polygraphic substitution cypher.
A monoalphabetic cypher is a cypher that has a fixed substitution: So, plaintext a is always equivalent to cyphertext b, plaintext b always becomes cyphertext c, &c. Whereas in a polyalphabetic cypher, the plaintext letter could be a number of letters: Plaintext a could be cyphertext b, c, or d, plaintext b could be cyphertext c, d, or e, &c.
Often times, the message is made to be grouped by four letters, so as not to help those unintended to view the message with decyphering it by word length and other patterns. Other letter groups could be used, but four is most common. If the last group is not complete, null letters are added.
To help prevent decyphering, elimination of grammatical marks is also common (no apostrophes or periods, &c.).
Starting position:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Now shift 5:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
FGHIJKLMNOPQRSTUVWXYZABCDE
So, "SCREW YOUR COURAGE TO THE STICKING PLACE" becomes "XHWJB DTZW HTZWFLJ YT YMJ XYNHPNSL UQFHJ."
The shift cypher is also commonly called the Caesar cypher, after the Roman emperor Julius Caesar, who reportedly used a shift of three to protect messages of military importance. Many believe he created the cypher, but we can't be sure, though he is the first we have found to have used it. (It's possible it was "invented" twice, since it's such a simple cypher.) It's a very easy cypher to crack, but it seems it was quite affective at the time.
* * *
Monoalphabetic example:
WGBP FWPM SGNM MCIG FNBO MQPD CCES.
This cypher is created using a password: PRINCESS TOADSTOOL
The two words are put together (PRINCESSTOADSTOOL) and repeat letters are taken out (PRINCESTOADL). After this, the rest of the alphabet is added (PRINCESTOADLBFGHJKMQUVWXYZ). Place this under the plaintext alphabet:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
PRINCESTOADLBFGHJKMQUVWXYZ
That is the key: The top is plaintext, the bottom cyphertext. To encode a message: Look for your letter on the top, then it becomes the letter below it (K = D, Z = Z). To decypher, look for the letter on the bottom, and it's equivalent is on the top (F = N, N = D).
You should get the message "WOMAN WAS GOD'S SECOND MISTAKE."
* * *
Polyalphabetic example:
VHXP IFWS MDEM JYEC DRZY.
This is a Vigenère cypher. It is like you have multiple shift cyphers. Usually, a password is used, in this case it is "CAT."
Write out the plaintext alphabet, then add three cyphertext alphabets, each arranged according to the letters in the password (in the first C = A, in the second A = A, and in the final one T = A; or shift 3, shift 0, shift 20). In this cypher, you don't have to take out repeat letters in the password (you can if you want to).
ABCDEFGHIJKLMNOPQRSTUVWXYZ
CDEFGHIJKLMNOPQRSTUVWXYZAB
ABCDEFGHIJKLMNOPQRSTUVWXYZ
TUVWXYZABCDEFGHIJKLMNOPQRS
It is decyphered like above, except you keep going through the cyphertext alphabets in turn. You should get "THEN I MUST BE THY LADY."
No comments:
Post a Comment