Cryptography in Islamic Civilization
Much of the content of this article is based on the book by Simon Singh(1), the author has devoted a section to the Muslim contribution to the subject. A special emphasis is made on the Famous Muslim Philosopher and Mathematician Al-Kindi as the originator of the first method of code breaking.
Throughout history the need for secrecy has been important. Governments and ordinary people have increasingly sought to secure the delivery of certain messages and important information in a way that allows only the intended recipient access and comprehension. This need for secrecy brought about the invention and the art of concealment, coding and code making. In return the need for intelligence and information lead to the development of code breaking techniques. These techniques primarily attack a particular weakness that a code or concealment method may have, rendering the sought after information apparent and comprehensible to the assailant..(1)
Evidence of concealing messages can be seen throughout history. These examples in many cases have had considerable effects on the outcome of history, as they may have decided the outcome of battles or the rise or fall of a king or Queen.
Simply hiding a message or "Steganography" can be an effective method by which a message may be delivered without being detected or intercepted by the "enemy". The effectiveness of Steganography is however dependant on the elaborate way in which the message has been concealed, and on the efficiency of enemy intelligence and their persistence in searching and investigating the courier or delivery medium.
In the fifth century A.C. a Greek exile named Demaratus living in the Persian Empire witnessed the build up and mass of forces by the Persian king Xerxes. Xerxes had intended on conquering the Greeks and Spartans, and was massing his great fleet and forces in preparation for a surprise attack that would catch the Greeks off guard leading to a simple victory. Feelings of patriotism lead Demaratus to warn the Spartans, a task which was not easy as he was leaving within the Persian empire, and so any form of correspondence between him and the Greeks may be intercepted leading to his execution. He therefore demonstrated ingenuity by stripping a writing tablet of its wax coating, writing on the wood underneath, and then re-waxing the tablets. The tablets passed any Persian guards and check points as they were seen to be "Blank", when they reached Sparta a clever princess worked out the riddle and told them to remove the wax, there underneath lay the message from Demaratus. The Greeks then took action and managed to mobilise and prepare troops in anticipation for the Persian invasion, the subsequent battle was lost by the Persians as they had lost the element of surprise. Their fleet fell into an ambush prepared by the Greeks.(1)
Although Steganography may have been a sufficient method of concealing message in many cases, its success or failure depends on the message not being discovered. Had the Persian guards removed the wax off the apparently blank tablets the outcome of Xerxes battle with the Greeks would have been different. Due to this obvious weakness in Steganography the invention of Cryptography became imminent.
Cryptography is a method or technique by which a message may be altered so that it becomes meaningless to anyone else but the intended recipient. This is done primarily in two basic ways, one is to change the position of letters or words within a message, the other is by substituting letters or words by different ones, "Transposition" and "Substitution" respectively.(1)
For transposition to be effective and secure, letters rather than words need to be rearranged, this effectively scrambles the message and produces an "Anagram". Transposition could be done for example by writing the order of letters in a word backwards, so that word becomes drow. It is more effective to rearrange the letters in whole sentences or the whole message rather than single words.
If transposition was not limited to words or a certain order the number of different possibilities for rearranging a thirty five letter message rises to 50,000,000,000,000,000,000,000,000,000,000 different distinct rearrangements making the task of working out the correct rearrangement impossible even if all the people on earth were to check a single rearrangement every minute.(1)
Transposition can thus yield a high level of security; nevertheless it can produce an increasingly difficult anagram which may become so complicated that even the intended recipient would not be able to decode it. Therefore transposition needs to follow a simple and straight forward system agreed upon by sender and recipient beforehand.
Substitution is the other method by the meaning of a message may be concealed. This method can follow two routes either by substituting words for other "Code" words, or by substituting letters within the message by other letters or symbols. Substitution can be simplified by deciding on a specific "Key", the key is what defines a specific method of substitution, combined with an "Algorithm" which specifies the letters or symbols which are used in the substitution in a specific order. When combined and applied to plain text the key and algorithm is what generates the "Cipher". Working with the plain English alphabet, allowing the algorithm to be any arrangement of the different letter, it is possible to generate more 400,000,000,000,000,000,000,000,000 different distinct rearrangements of letters and so the same number of different ciphers, thus producing a high level of security, baring in mind that the recipient need only to keep the key safe.(1)
Using the simple substitution method of cryptography, important messages and sensitive information were kept from the prying eyes of enemies for centuries. Any attempt of breaking such encrypted messages was futile, and only lead to sleepless nights and no results, some people even started thinking that such encrypted messages were divine, until the 9th Century AC when a Muslim scholar in Baghdad changed the face of Cryptography for ever.(1, 2, 5, 6)
During the Abbasid rule, the lavished economic condition of the country allowed people to peruse reading, learning and research in all disciplines. People were encouraged to learn; books were manually copied and sold in numerous libraries and bookshop. The works of the Greeks, Persians and others were translated and made available to every household. Islamic teachings also make it obligatory for all Muslims to peruse and acquire knowledge of all the sciences with similar and equal degree.(1, 2, 3)
Through these conditions, the critical conditions needed for the birth of "Cryptanalysis" or de ciphering an encrypted message were realised. This was first done by the Muslim scholar named Al-Kindi.(1, 2)
Abu Yusuf Ya'qub ibn Ishaq Al-Kindi better known to the west as Alkindous, was an ethnic Arab descending from the royal Kindah tribe, which originated in southern Arabia and had almost mythical routes such as Qayss.(5, 6)
Al-Kindi was born in Kufah Iraq round year 800 which was at the time a centre for Islamic learning and Culture. This ensured that he was able to acquire the best possible education. His father was the governor of Kufah as was his father before him, but Al-Kindi chose to or rather was asked to move to Baghdad by the Caliph Al- Ma'mun, where he was appointed as a calligrapher at the newly established academy known as the House of Wisdom. There Al-Kindi together with Al-Khawarizmi and the Banu Musa Brothers worked on translating Greek texts to Arabic. Although it is thought that Al-Kindi did not participate much in the actual translations, it is more likely that he brushed up on the works of others and may have done some editing and corrections.(3, 4, 5, 6)
Al-Kindi was certainly influenced by the Greek Philosophers particularly Socrates and Aristotle whose translated works he used. This can be seen from many of Al-Kindi's own works on Philosophy. To his people Al-Kindi was known for his work on Philosophy but he also did some work on Mathematics, Medicine, Optics, Astronomy and many other sciences of importance and of interest at the time. (3, 5)
The Birth of Cryptanalysis required a society, which has reached a high standard of development in three important disciplines, namely Linguistics, Statistics and Mathematics.(1) These conditions became available at the time of Al-Kindi who had command of these three disciplines and more. Working on Ciphers and encrypted messages obtained from Greek or Roman origins, as well as cryptographic methods employed at the time, Al-Kindi was able to describe Cryptanalysis within two sentences of his greatest treatise entitled "A Manuscript on Deciphering Cryptographic Messages", it reads:
"One way to solve an encrypted message, if we know its language, is to find a different plaintext of the same language long enough to fill one sheet or so, and then we count the occurrences of each letter. We call the most frequently occurring letter the ‘first', the next most occurring letter the ‘second', the following most occurring the ‘third', and so on, until we account for all the different letters in the plaintext sample".
"Then we look at the cipher text we want to solve and we also classify its symbols. We find the most occurring symbol and change it to the form of the ‘first' letter of the plaintext sample, the next most common symbol is changed to the form of the ‘second' letter, and so on, until we account for all symbols of the cryptogram we want to solve"(1, 2 )
Al-Kindi's technique came to be known as frequency analysis, which simply involves calculating the percentages of letters of a particular language in plain text, calculating the percentages of letters in the cipher, and then substituting the symbols for the letters who have an equal percentage of occurrences.(1)
Although a long message would be ideal for this method to work, and the fact that in certain cases letter which are used frequently in normal writing and speech may not be used much in a cipher message by the off chance or deliberately to throw off cryptanalysts. Experience, hard work and guessing in many cases enabled most determined cryptanalysts to succeed in breaking even the most complicated of ciphers. This made the most relied on system of Cryptography weak and vulnerable to attack, which made cryptographers develop new techniques to ensure the secrecy of their messages, which in many cases were easily identified by cryptanalysts using frequency analysis, such as using code words as well as cipher text, using nulls which are symbols that do not correspond to a letter or word dotted throughout the message at random, etc..(1)
Cryptography still remains an important science in today's civilisation, be it for intelligence uses or the privacy of individuals. The development of crypto-analysis caused the science of cryptography to advance in a similar way; this paved the way for the development of arguably humanity's greatest achievements yet, "Computers, the Internet and the digital world"(1, 2). Other useful material on Al-Kindi may be found in refs.(7-10).
The author and FSTC are grateful to Dr Simon Singh for his constructive comments on the original text of this article.
Please read this link for further information (Link to BBC).
1 The Code Book. The Secret History of Codes and Code-Breaking. Simon Singh 1999
2 Ibraham A. "Al-Kindi: The origins of cryptology: The Arab contributions", Crypto logia, vol.16, no 2 (April 1992) pp. 97-126.
Abu Yusuf Yaqub ibn Ishaq al-Sabbah Al-Kindi
Philosophers: Yaqub Ibn Ishaq al-Kindi
5 Kennedy-Day, K. al-Kindi, Abu Yusuf Ya‘qub ibn Ishaq (d. c.866–73). http://www.muslimphilosophy.com/ip/kin.html.
YAQUB IBN ISHAQ AL-KINDI
7 Al-Ehwany, Ahmad Fouad. (1961). "Al-Kindi" in A History of Muslim Philosophy
Volume 1. New Delhi: Low Price Publications. pp. 421-434.
8 Al-Faruqi, Ismail R. & al-Faruqi, Lois Lamya. (1986). Cultural Atlas of Islam New York: Macmillan Publishing Company. pp. 305-306.
9 Encyclopaedia Britannica, Inc. (1969). Encyclopaedia Britannica. Chicago: William Benton. pp. 352.
10 O'Connor, J.J. & Robertson, E.F. (1999). Abu Yusuf Yaqub ibn Ishaq al-Sabbah Al-Kindi.
Now days we as Muslims have to spread the voice to learn quran online and so we could gain the true knowledge and the quran teaching that is give to us by our beloved prophet Muhammad peace be upon him and do quran reading. Do we as Muslim ask our self that why we are at the peak of destruction? The answer will be simple that we have left our roots the holy quran we should guide promote Islam from in our homes first and let learn our kids quran and encourage them in doing quran memorization this should be our first goal for it we can do different stuff like let then participate in different online quran recitation competition to let them read quran from different online quran reciters and along with it we elders should learn quran also and improve our knowledge of quran and Islam and learn holy quran tafseer because to understand and learn quran Arabic and for this now a days there are many online quran tutor available who teach tajweed quran and its translation and tafseer so let us join our hands to be the voice of Islam and let improve the image of it as well and full fill our duty