Lesson 1 : Introduction to Congruence and Modular Arithmetic



000010100100110100101010101001010101001010100101010101010010101010100101010101011101010101001100101010010101010010000101010101110100101010010101001011111011010010100101001010101001101001010010001011111010010110010101000111001010101001001010010100010101011010101100101000101101001010100101010101001010100101010100101001010101010100101010010101010010101011001010101010010100101010100101010010100101010010101001000101001010110010101001010100101010100101010101001010100101010101101001010100110010100011101001010100101010100101010100101010101001010101010010101010010101010010010101001001010101001010100101001010101010001010101001010100101010101001010101010101001010100101011010010101010101010100100

Chapter 3: Basic Cryptanalysis

After an entire chapter of known ciphers, we now discuss some ways of cracking the ciphers and extract the precious secrets that are held within. Throughout history, battles and nations have been won or lost because of the strength of the security of cryptosystems that hide important messages.

In World War 2, Germany was all-conquering in its battles, and used an extremely strong cryptosystem, the Enigma machine, that allowed the military to communicate securely, without fear of being found out. However, this cryptosystem was later cracked, with the efforts of several countries. Germany, who believed that it was impossible that their cryptosystem could be cracked, continued to relay messages using the system. This allowed British military to obtain critical information that allowed Britain to slowly gain the upper hand in the war. Clearly, no cryptosystem is better than a weak cryptosystem.

[You can read more about the Enigma machine by searching for the term online.]

Section 3.1 Birth of Cryptanalysis

In the golden age of Islamic civilization (around 750 AD), where half of the known world was under Muslim rule, the arts and the sciences flourished in equal measure. It is well-documented that sensitive state documents and other administrative documents were encrypted then, to protect the information, and that the use of encryption was widespread and routine. This could also be seen in the many administrative manuals, such as the tenth-century Adab al-Kuttáb (The Secretaries’ Manual), which include sections devoted to cryptography.

The usual choice of encryption used by the administrators was the monoalphabetic substitution cipher discussed in the earlier chapter. For example, a may be replaced by a symbol #, and b replaced by &, and so on. Cracking the cipher would seem so daunting, and impossible, given the enormous number of keys (26! or 4.03 ( 1026 or 400 million billion billion for a monoalphabetic substitution cipher consisting of 26 letters). Imagine the time required to crack an encrypted message by brute force. If everyone on the planet worked day and night checking one key per second, how long do you think will it take to crack the general substitution cipher?

Yet, the Arab scholars at that time, managed to find a way to crack the cipher, given just the ciphertext. In fact, they were the pioneers in the field of cryptanalysis, the science of cracking a cipher without knowledge of the key.

It must be mentioned that cryptanalysis could not be invented until a civilization had reached a significant level of sophistication in several disciplines, especially in mathematics, statistics and linguistics, and these were the conditions that the golden age of Islamic civilization satisfied, allowing the birth of cryptanalysis.

While it was not known who first invented the method to crack the monoalphabetic substitution cipher, the earliest known description of the technique is by the ninth-century scientist Al-Kindí, also known as the “Philosopher of Arabs”, in his greatest treatise, A Manuscript on Deciphering Cryptographic Messages, which was rediscovered only recently in 1987.

Section 3.2 Frequency Analysis

Try reading the following passage to spot if there is anything most unusual with it.

Look at this paragraph. What is vitally wrong with it? Actually nothing in it is wrong but you must admit it is most unusual. Don’t just zip through it! With luck you will spot what is particular about it and all words in it. Can you say what it is? Tax your brains and try again. Don’t miss a word or symbol. It isn’t all that difficult.

You should by now spot the unusual aspect of the above passage.

It was around the 9th century AD that Arab language scholars realized that some letters of their alphabet were much more common than others, so if somebody sent a long coded message, one way to start guessing at the answer was to see which letters turned up the most. In Arabic the letters a and l are the most common, so if a coded message had a lot of letter Js in it, they would guess that J = a and if there were a lot of letter Ys then maybe Y = l. They would then try guessing at some of the other common letters to see if any whole words appeared. If it didn’t work, they’d start again and maybe try it the other way round making J = l and Y = a and so on.

Of course this method relies on clever guesswork, but it’s the basis of how substitution codes are cracked today and now that we have computers to do the guessing, it only takes seconds!

In the English language e is by far the most commonly used letter. It occurs 12.7% of the time—in other words if you have a message that is 1000 letters long then about 127 of the letters will be e. After that t occurs 9.1% of the time, and then a occurs 8.2% and so on. The least used letters are q and z, both of which only turn up about one time in a thousand letters.

|Letter |Percentage | |Letter |Percentage |

|a |8.2 | |N |6.7 |

|b |1.5 | |O |7.5 |

|c |2.8 | |P |1.9 |

|d |4.3 | |Q |0.1 |

|e |12.7 | |R |6.0 |

|f |2.2 | |S |6.3 |

|g |2.0 | |T |9.1 |

|h |6.1 | |U |2.8 |

|i |7.0 | |V |1.0 |

|j |0.2 | |W |2.4 |

|k |0.8 | |X |0.2 |

|l |4.0 | |Y |2.0 |

|m |2.4 | |Z |0.1 |

Table 1   This table of relative frequencies is based on passages taken from newspapers and novels, and the total sample was 100,362 alphabetic characters. The table was compiled by H. Becker and F. Piper, and originally published in Cipher Systems: The Protection of Communication.

Al-Kindí recognized the behaviour of the letters and used it in cryptanalysis.

His technique is summarized below in terms of the English alphabet.

a) Some letters of the English alphabets occur more frequently than other letters in messages written in the English language. Given a long English text, the relative frequencies of each letter will approximately be consistent with the relative frequencies in another English text of the same length.

b) Hence, we link the most frequent occurring letter in the ciphertext to the most frequent occurring letter in the English language, the next most occurring to the second most occurring in the language, and so on, until we finish linking all the unknown letters in the ciphertext.

Example 1: Try using your linguistic knowledge and local knowledge to decrypt the following message.

RTI OBG ZIA

Section 3.3 Remarks

It must be said that the war between the code-makers and the code-breakers is a never-ending one. Tools like frequency analysis is just one of the more primitive weapons in the code-breakers’ arsenal. Newer weapons such as Kasiski Test or Index of coincidence were used to crack polyalphabetic ciphers such as Vigenère ciphers, as opposed to the monoalphabetic ciphers discussed in this chapter. Other methods such as the differential cryptanalysis, and linear cryptanalysis were also found to combat the use of block ciphers.

With the use of mathematics to create new ciphers, code-breakers are not left behind in the use of mathematics to analyse the ciphers. They came up with the Birthday attack, Man-in the middle attack, and many others. Methods unknown to the public may have already been found in the government and military sectors, but kept secret due to the immense political and military benefits in keeping such methods secret.

Perhaps, the only way for the war between the code-makers and the code-breakers will end, is when quantum computing becomes a reality, and quantum cryptography becomes feasible. Quantum computing is the “perfect” cryptography and attempts by intruders to crack the cipher will be detected immediately. Then again, so are many codes in the past thought to be perfect.

Below is a quote from James Ellis, one of the inventors of public key cryptography in 1973, but the information was only revealed in 1997 and long overdue acknowledgement given to them.

“Cryptography is a most unusual science. Most professional scientists aim to be the first to publish their work, because it is through dissemination that the work realises its value. In contrast, the fullest value of cryptography is realised by minimising the information available to potential adversaries. Thus professional cryptographers normally work in closed communities to provide sufficient professional interaction to ensure quality while maintaining secrecy from outsiders. Revelation of these secrets is normally only sanctioned in the interests of historical accuracy after it has been demonstrated that no further benefit can be obtained from continued secrecy.”

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download