In this example, 'R' is shifted to 'U', 'E' is shifted to 'H', and so on. Now, even if the enemy did intercept the message, it would be useless, since only Caesar's generals could read it.
Thus, the Caesar cipher is a shift cipher since the ciphertext alphabet is derived from the plaintext alphabet by shifting each letter a certain number of spaces. For example, if we use a shift of 19, then we get the following pair of ciphertext and plaintext alphabets:
Plaintext: 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 Ciphertext: T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
THE FAULT, DEAR BRUTUS, LIES NOT IN OUR STARS BUT IN OURSELVES.
MAX YTNEM, WXTK UKNMNL, EBXL GHM BG HNK LMTKL UNM BG HNKLXEOXL.
Breaking a Caesar Cipher (Cryptanalysis)
Can a computer guess what shift was used in creating a Caesar cipher? The answer, of course, is yes. But how does it work?The unknown shift is one of 26 possible shifts. One technique might be to try each of the 26 possible shifts and check which of these resulted in readable English text. But this approach has limitations. The main problem is that the computer would need a comprehensive dictionary in order to be able to recognize the words of any given cryptogram.
A better approach makes use of statistical data about English letter frequencies. It is known that in a text of 1000 letters of various English alphabet occur with about the following relative frequencies:
| 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 |
| 73 | 9 | 30 | 44 | 130 | 28 | 16 | 35 | 74 | 2 | 3 | 35 | 25 | 78 | 74 | 27 | 3 | 77 | 63 | 93 | 27 | 13 | 16 | 5 | 19 | 1 |
K DKVO DYVN LI KX SNSYD, PEVV YP CYEXN KXN PEBI, CSQXSPISXQ XYDRSXQ.
| 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 |
| 0 | 1 | 2 | 4 | 3 | 0 | 0 | 0 | 3 | 0 | 4 | 1 | 0 | 4 | 1 | 4 | 3 | 1 | 6 | 0 | 0 | 4 | 0 | 7 | 4 | 0 |
English Language Frequencies
| 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 |
| 73 | 9 | 30 | 44 | 130 | 28 | 16 | 35 | 74 | 2 | 3 | 35 | 25 | 78 | 74 | 27 | 3 | 77 | 63 | 93 | 27 | 13 | 16 | 5 | 19 | 1 |
| K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J |
| 4 | 1 | 0 | 4 | 1 | 4 | 3 | 1 | 6 | 0 | 0 | 4 | 0 | 7 | 4 | 0 | 0 | 1 | 2 | 4 | 3 | 0 | 0 | 0 | 3 | 0 |
If we now apply this substitution to the message we get:
A TALE TOLD BY AN IDIOT, FULL OF SOUND AND FURY, SIGNIFIYING NOTHING.
Using the Chi-square Statistic
The chi-square statistic allows compare how closely a shift of the English frequency distribution matches the frequency distribution of the secret message. Here's an algorithm for computing the chi-square statistic:- Let ef(c) stand for the english frequency of some letter of the alphabet
- Let mf(c) stand for the frequency of some letter of the message
- For each possible shift s between 0 and 25:
- For each letter c of the alphabet
- Compute the sum of squares of mf((c + s) mod 26) divided by ef(c)
For further study and enjoyment
CryptoToolJ. Try breaking the above cryptogram using CryptoToolJ's Caesar Analyzer. This requires a Java-enabled browser. You'll have to paste the message into CryptoTool's input window.************************************************
http://www.shodor.org/interactivate/activities/CaesarCipher/
http://web.forret.com/tools/rot13.asp
http://library.thinkquest.org/C0126342/ceaser.htm
http://illuminations.nctm.org/LessonDetail.aspx?id=L587
http://www.youtube.com/watch?v=DmjOWptrUX4
http://cryptoclub.math.uic.edu/shiftcipher/shiftcipher.php
http://www.rot-n.com/
http://practicalcryptography.com/ciphers/caesar-cipher/
http://rumkin.com/tools/cipher/
http://www.counton.org/explorer/codebreaking/caesar-cipher.php
http://www.dotnetperls.com/caesar
http://www.dummies.com/how-to/content/solving-easy-caesar-ciphers.html
Hiç yorum yok:
Yorum Gönder