Changes

m
KS update 1.4
Line 1: Line 1:  
A '''substitution cipher''' is a form of [[cryptography]].   
 
A '''substitution cipher''' is a form of [[cryptography]].   
   −
In a substitution cipher, a rule is used to change each letter of the message, one at a time. The rule says to replace (or "substitute") each letter with another letter from the alphabet.   
+
In a substitution cipher, a rule is used to change each letter of the message one at a time. The rule is to replace (or "substitute") each letter with another letter from the alphabet.   
    
For instance, this table gives a rule for a substitution cipher:
 
For instance, this table gives a rule for a substitution cipher:
Line 61: Line 61:  
|}
 
|}
   −
Using this rule, the sentence "Jack and Jill went up the hill" is changed to "Etar tzn Evmm gkzc dw cuk uvmm". The [[Caesar cipher]] is one example of a substitution cipher.
+
Using that rule, the sentence "Jack and Jill went up the hill" is changed to "Etar tzn Evmm gkzc dw cuk uvmm". The [[Caesar cipher]] is an example of a substitution cipher.
   −
Substitution ciphers are not safe enough to use for important messages. Substitution ciphers can be broken by an idea called ''frequency analysis''. Some letters are more common than others in English sentences: ''E'' is the most common, then ''T'', then ''A'', and so on. A message that has been changed by a substitution cipher will have different common letters, but this gives a hint about the rule. The most common letters in the changed message are likely to be the most common letters in English. Breaking ''cryptograms'' (messages hidden with a substitution cipher) is a common [[puzzle]] often found in newspapers.
+
Substitution ciphers are not safe enough to use for important messages. Substitution ciphers can be broken by an idea called ''frequency analysis''. Some letters are more common than others in [[English language|English]] sentences: ''E'' is the most common, then ''T'', then ''A'', and so on. A message that has been changed by a substitution cipher has different common letters, but that gives a hint about the rule. The most common letters in the changed message are likely to be the most common letters in English. Breaking cryptograms (messages hidden with a substitution cipher) is a common [[puzzle]] often found in newspapers.
   −
In past centuries substitution ciphers were sometimes strengthened by combining them in superencryption with transposition ciphers. Improvements in [[cryptanalysis]] caused this method to be abandoned in the early 20th century.
+
In past centuries, substitution ciphers were sometimes strengthened by combining them in superencryption with transposition ciphers. Improvements in [[cryptanalysis]] have caused that method to be abandoned in the early 20th century.
 
== Example ==
 
== Example ==
 
<!-- decryption alphabet
 
<!-- decryption alphabet
Line 83: Line 83:  
For this example, capital letters are used for unknown letters, and lowercase letters are used to denote letters we know or can guess.   
 
For this example, capital letters are used for unknown letters, and lowercase letters are used to denote letters we know or can guess.   
   −
By counting up the letters, we see that the most common is <samp>I</samp>, which we will guess is an <samp>e</samp>. <samp>X</samp> is also quite common, and <samp>XLI</samp> is found many times; we guess that this is "<samp>the</samp>", the most common three-letter group in English.
+
By counting up the letters, we see that the most common is <samp>I</samp>, which we will guess is an <samp>e</samp>. <samp>X</samp> is also quite common, and <samp>XLI</samp> is found many times; we guess that is "<samp>the</samp>", the most common three-letter group in English.
   −
<samp>E</samp> is the second most common letter. We already have a guess for <samp>e</samp> and <samp>t</samp>, so we guess that <samp>E</samp> is <samp>a</samp>. We now have:
+
<samp>E</samp> is the second most common letter. We already have a guess for <samp>e</samp> and <samp>t and</samp> so we guess that <samp>E</samp> is <samp>a</samp>. We now have:
    
  heVeTCSWPeYVaWHaVSReQMthaYVaOeaWHRtatePFaMVaWHKVSTYhtZetheKeetPeJVSZaYPaRRGaReM
 
  heVeTCSWPeYVaWHaVSReQMthaYVaOeaWHRtatePFaMVaWHKVSTYhtZetheKeetPeJVSZaYPaRRGaReM
Line 95: Line 95:  
  KTY
 
  KTY
   −
We can now make some more guesses: <samp>heVe</samp> may be <samp>here</samp>; <samp>Rtate</samp> may be <samp>state</samp>, and <samp>atthattMZe</samp> could be <samp>atthattime</samp>. Filling in these guesses, we get:
+
We can now make some more guesses: <samp>heVe</samp> may be <samp>here</samp>; <samp>Rtate</samp> may be <samp>state</samp>, and <samp>atthattMZe</samp> could be <samp>atthattime</samp>. Filling in those guesses, we get:
    
  hereTCSWPeYraWHarSseQithaYraOeaWHstatePFairaWHKrSTYhtmetheKeetPeJrSmaYPassGasei
 
  hereTCSWPeYraWHarSseQithaYraOeaWHstatePFairaWHKrSTYhtmetheKeetPeJrSmaYPassGasei
Line 105: Line 105:  
  KTY
 
  KTY
   −
This lets us make more guesses, which lead to more, until we have guessed everything:
+
That lets us make more guesses, which lead to more guesses until we have guessed everything:
    
  hereuponlegrandarosewithagraveandstatelyairandbroughtmethebeetlefromaglasscasei
 
  hereuponlegrandarosewithagraveandstatelyairandbroughtmethebeetlefromaglasscasei
Line 117: Line 117:  
At this point, we can insert spaces and punctuation:
 
At this point, we can insert spaces and punctuation:
   −
''Here upon le grand arose with a grave and stately air and brought me the beetle<br />from a glass case in which it was enclosed. It was a beautiful scarabaeus and<br />at that time unknown to naturalists of course; a great prize in a scientific<br />point of view. There were two round black spots near one extremity of the back<br />and a long one near the other. The scales were exceedingly hard and glossy with<br />all the appearance of burnished gold. The weight of the insect was very<br />remarkable and taking all things into consideration I could hardly blame jupiter<br />for his opinion respecting it.'' ([[The Gold-Bug]])
+
''Here upon le grand arose with a grave and stately air and brought me the beetle<br />from a glass case in which it was enclosed. It was a beautiful scarabaeus and<br />at that time unknown to naturalists of course; a great prize in a scientific<br />point of view. There were two round black spots near one extremity of the back<br />and a long one near the other. The scales were exceedingly hard and glossy with<br />all the appearance of burnished gold. The weight of the insect was very<br />remarkable and taking all things into consideration I could hardly blame jupiter<br />for his opinion respecting it.'' ([[The Gold-Bug]])
   −
If we had made a wrong guess, we would have found out at some point, and could go back and make a new guess.
+
If we had made a wrong guess, we would have found out at some point and could have gone back and made a new guess.
    
[[Category:Cryptography]]
 
[[Category:Cryptography]]