Professional Documents
Culture Documents
Cryptology
Book One
al-Kindi's Treatise on
Cryptanalysis
3
Translated by
Said M. al-Asaad
Revised by
Marwan al-Bawab
4
Contents
5
Chapter 3: al-Kind 's Edited Treatise ..................................... 107
3.1 Editing Methodology ............................................................ 109
3.2 Description of the Manuscript .............................................. 111
3.3 al-Kind 's Treatise on Cryptanalysis (Text) .......................... 117
- Introduction ........................................................................ 118
- Algorithms of Cryptanalysis .............................................. 122
- The major Ciphering Methods .......................................... 132
- Algorithms for Cryptanalysing Certain Types of
Encipherment ................................................................... 146
- Frequency of Letter Occurrence and Their Order
in Arabic ........................................................................... 166
- Letter Combination in Arabic ........................................... 172
6
List of Figures
7
List of Tables
8
Transliterating Arabic words
For transliterating Arabic words (names, titles, etc.) we have adopted the
International System for the Transliteration of Arabic characters, devised by the
International Standards Organization (ISO). The system constitutes ISO
Recommendation R233 (December 1961). Given below is this system, with some
additional explanations as necessary.
Vowels:
Arabic characters Transliteration Examples
(fat a) a as u in cup.
Short as o in rock,
( amma) u
Vowels and u in put.
as e in red,
(kasra) i
and i in big.
as a in last.
Long
Vowels
( وpreceded by ) as oo in moon.
ً (preceded by ) as ee in sheet.
Consonants:
Arabic
Transliteration Examples
characters
' (e.g. 'amr, 'ibr h m, fu' d, kis ' , t ').
as a in add (e.g. ' dam, qur' n).
ب b as b in back.
ت t as t in tea.
ث as th in thin.
ج as g in logic.
ح (e.g. tim).
خ (e.g. lid).
د d as d in day.
ذ as th in then.
ز r as r in red.
9
ش z as z in zoo.
س s as s in soon.
ش as sh in show.
ص (e.g. mi r).
ض (e.g. ir r).
ط (e.g. riq).
ظ (e.g. fir).
ع (e.g. Abb s).
غ (e.g. lib).
ف f as f in few.
ق q (e.g. qur' n).
ك k as k in key.
ه l as l in led.
ً m as m in sum.
ُ n as n in sun.
هـ h as h in hot.
و w as w in wet (e.g. wahab, nawfal).
ً y as ie in orient (e.g. y q t, dunayn r).
Notes:
(t ' marb a): In the absolute state, ignored in transliteration (e.g. mad na); in
the construct state, rendered by (t) (mad nat annab ).
(suk n): Ignored in transliteration.
( adda): rendered by doubling the consonant.
10
Preface
This is the first book of the The Arabic Origins of Cryptology
series. The series introduces and analyses the cryptological
contributions of the Arab scientists. It also presents, for the first time
ever, an accurate and complete translation (into English) of the
original treatises of Arab cryptologists.
We dedicate an individual book for each treatise. The first book has
been devoted to the oldest treatise in cryptanalysis, which was written
by the well-known Arab philosopher al-Kind about 1200 years ago.
The second book of the series tackles the treatise of ibn Adl n, while
the third book deals with the treatise of ibn ad-Durayhim. For the time
being, nine books are envisaged, unless other manuscripts are
discovered.
As a matter of fact the first three books of the series are the English
translation of Volume One of our Arabic book entitled ilm
at-ta miya wasti r al-mu amm inda al- Arab (Origins of Arab
Cryptography and Cryptanalysis). This volume has been printed (in
Arabic) in Damascus in 1987.
We have allotted a full chapter to study and analyse cryptology
among the Arabs. We hope this will prove useful for understanding
the whole series.
* * *
Encipherment or cryptography, ("at-ta miya" in Arabic), is defined
as the conversion of a cleartext into an incomprehensible one by
means of a specific method, whereby only those familiar with that key
will be able to reconstruct and understand it.
* * *
15
The Second Chapter is an analytical study of the edited treatise of
al-Kind ــthe oldest known book on the science of cryptology. It aims
at clarifying difficult or vague points, spotting particular features and,
more importantly, highlighting aspects of originality and innovation in
the treatise. The second chapter is divided into eight sections, the
first of which presents a brief biography of al-Kind .
Since al-Kind 's treatise on cryptanalysis is the oldest Arabic work
we could find on the subject of cryptology, we have made it the object
of our first study and analysis: Description of the Manuscript forms
the second section.
The third section discusses the principles of cryptanalysis such as
the quantitative and qualitative methods, and probable words in
opening statements. The fourth section includes the major types of
encipherment: the simple and composite encipherment, and their
classification. The fifth section is dedicated to the algorithms of
cryptanalysing specific types of cipher, where al-Kind displays a
synthetic and mathematical perspective. The sixth section includes a
statistical study by al-Kind himself on the frequency of occurrence of
Arabic letters, as well as the order of this frequency. The seventh
section, the richest in the whole treatise, covers the results of the
linguistic, phonetic and morphological studies concerning the rules of
combination and non-combination of letters in the Arabic language. In
the eighth section we have concluded our analysis of the treatise by a
summary of the originality of al-Kind 's contributions. He was the first
to offer a set of important principles, which qualified him to be named
the real father of cryptology in the world.
* * *
The Third Chapter comprises the full (and exact) text of the
edited treatise of al-Kind . It opens with a preamble to the editing
methodology adopted (Section 1), which basically conforms to
standard methodologies used by the scientific community. The treatise
is preceded with a brief description of the manuscript, followed by
sample photocopies of pages from the original (Section 2).
The treatise itself and its English translation represent Section 3,
with the English translation on the left-hand (even) pages, and the
original Arabic text on the right-hand (odd) pages.
The task of editing the manuscript text was a challenge indeed. No
effort was spared in correcting the mistakes and clearing the
confusion. In fact, many errors found their way into al-Kind 's
manuscript. This treatise was scribed as a copy from the original in the
sixth century AH/ twelfth century AD, with practically no dotting or
punctuation, not to mention the poor quality of its penmanship and the
abundance of grammatical and orthographic errors probably
introduced by scribes. All this has prompted closer scrutiny and
minute examination on our part of individual sentences time and
again, to ensure that the text is rendered as close to precision and
accuracy as possible. What has also contributed to the difficulty is the
fact that, hard as we have searched, we could find but a single
manuscript copy for the treatise.
We have taken special care to present the text of the treatise in due
form. Distinct headings have therefore been added to mark and feature
the different divisions of the treatise.
* * *
Last but not least, we have endeavoured all throughout to be as
accurate in our study as possible, yet we lay no claim to perfection or
immunity from oversight. Even in the simplest things, our motto has
always been that perfection is a goal at which we all aim, but are
doomed never to attain. This must be much more true when it is
related to a serious undertaking such as this work. The study is
entirely novel, and perhaps the first of its kind in this domain, and
therefore ought to be based on the combination of effort, plenty of
time, and deliberation in implementation. While we are aware of our
shortcomings, we crave the indulgence of the Arabic language
researchers in general, and those engaged in these sciences, from the
historical point of view in particular, to provide us with their
constructive comments and observations. Such comments would
certainly enrich the study and would contribute to a better future
editing.
17
18
Chapter 1
19
20
1.1 Factors Behind the Advancement of
Cryptology in the Arab Civilization
Of all the spheres of knowledge in the Arab heritage, cryptology
has received the least attention from historians and researchers. None
of them has ever embarked upon editing cryptological manuscripts or
attempted any work to reveal the origins of this science. That is one
reason why its rediscovery was delayed until the present day. Another
reason is that it is one of the secret sciences, about which writings are
rare, and whose circulation is restricted.
al-Kind did state something to this effect in the introduction to his
treatise. This same treatise he had written reluctantly, at the request of
Ab al- Abb s1, one of the Abbasid caliphs. al-Kind says: "Had it not
been my wish and a sense of duty to help you attain what you demand
with less effort, may God favour your actions, and may you always
achieve your ends, I would have preferred to follow the path of those
[scientists before me] who believed in concealing the treasures of
meanings, rather than revealing and displaying them."2
Our discoveries have enabled us to comprehend the extent of Arab
negligence towards their own heritage on the one hand, and on the
other hand to disclose their advances in many sciences, the importance
of the results of their works, and the impact they had on the Western
scientific renaissance and world science as a whole.
The foundation and progress of cryptology among the Arabs could
be attributed to the following factors:
A. The translation, by the Arabs, of a substantial amount of the
heritage of earlier civilizations, and the advantages they derived
from that translation in their work. They thus followed a
scientific methodology, studying what had been achieved by
others before undertaking their own independent studies. Their
translations scored a truly high standard of excellence with
respect to accuracy, scrupulousness and fidelity. Meanwhile,
they were at times compelled to cryptanalyse what had been
written in cipher on specific topics, notably chemistry, magic,
22
E. The diffusion of reading and writing, assisted by the promotion
of paper technology and industry in the Arab-Islamic world, and
its close association with the Arabic culture, the Holy Koran and
Koranic sciences, were also among the important factors in the
progress of cryptology. Many historians of cryptology3 confirm
this fact when they consider that one of the prominent factors
which prevented the rise of cryptography and cryptanalysis in
the ancient Egyptian, Chinese, Indian and Babylonian
civilizations was the limited spread of reading and writing.
We shall later explore each of the above factors in some detail,
from the viewpoint of their relation to cryptology.
3
Among them is David Kahn in his book :The Codebreakers, p. 93.
23
1.2 Definitions
The following basic definitions of terms are meant to assist the
reader in understanding this book, and to help the researcher, historian
or reader comprehend the terms he will meet in the texts of the edited
manuscripts.
* "at-ta miya" (Encipherment): The Arabs used this term to
signify the process of converting a cleartext into an incomprehensible
(meaningless) one by means of a specific method, such that anyone
familiar with that method can recover the cleartext and understand it.
The word "at-ta f r" is commonly used in Arabic nowadays instead of
the word "at-ta miya". This word has its origins in the Latin word
"cipher" which is, in turn, a modification of the Arabic word " ifr"
(zero) a fact that many sources have confirmed.
The Arabs have introduced the concept of Zero ( ifr) in arithmetic.
They developed its use on a large scale. The concept was unknown to
the medieval Western community, which used the Roman numerals
(I,II,III,IV,…). The Roman numerical system is devoid of the zero.
When the Arabic numerals (0,1,2,3,4,…) reached the Western world,
the concept of zero ( ifr) seemed extremely vague and cryptic. The
word ifr became synonymous in Latin to "ambiguity" and
"obscurity". Hence emanated the concept of "cipher" in all European
languages, to suggest "cryptography". The Arabs deserve the credit of
transforming the mere practice of cryptography into the science of
cryptology4.
* "at-tar ama" (Interpretation) is an Arabic word of Persian
origin. It was used by Arabs to mean "cryptology" as a whole, or some
of its methods, namely simple substitution. Other Arab scholars used
it in the sense of cryptanalysis. It was widely used in the first two
meanings by the authors of treatises the subject of our study. Only
al-Qalqa and has used it in its third meaning, namely cryptanalysis,
as far as we know. It is interesting to note that Western renaissance
authors on cryptology used the term "interpretation" to mean
"cryptography", as mentioned by David Kahn in his book
4
See ams al- arab tas a al al- arb, pp. 92-93, and al-Mar i f t r al- ul m
ind al- arab, pp. 368-369; also Naw bi al- ulam ' al- arab walmuslim n f
ar-riya iyy t, pp. 23-25.
24
The Codebreakers (p. 140). We shall present in the following
paragraphs, in some detail, the different Arabic terms used for
cryptography and cryptanalysis. We believe that this presentation will
help in a study tracing the use of these terms by different authors: first
by the Arabs, and later by renaissance Western authors.
Ab Bakr a - l (d. AH 335 /AD 946), mentions "interpretation"
in writing, regarding it as synonymous with encipherment. He says:
"…. It is similar to encipherment, which is a form of metonymy in
poetry, such as substituting for the letter A the word pigeon, for the
letter B the word hawk, for the letter C the word bird, etc., and using
these words instead of the letters of the alphabet. The statement:
'I interpreted the problem to him' means: 'I explained it to him'…."5.
His contemporary, Is q ibn Wahab al-K tib distinguishes between
encipherment (at-ta miya) and interpretation (at-tar ama), drawing a
delicate boundary between the two synonyms. "Interpretation"
according to him is only used in the second sense, which is a method
of cryptography. He says: "Encipherment differs from interpretation,
for interpretation is the substitution for a letter another form or symbol
or drawing, or another letter of the alphabet ــa method which was
used in the well-known "Qumm " and "Bus m " interpretations. This
method can be used for some or all of the letters in a text. As for the
method of interpretation which substitutes images for letters, it is very
common indeed, and anyone can create whichever forms he likes6."
He, then, goes on to the word "encipherment", classifying it into three
methods, which are: encipherment by replacing letters by words
derived from the pronunciation of these letters, encipherment by
transposing the position of the letters within a word, and encipherment
by adding or omitting letters in a word.
ibn Dunayn r (d. AH 627 /AD 1229), uses the word "interpretation"
in the first two meanings. The chapters of his treatise abound with
such expressions: "Interpretation can be effected by simple
substitution…by changing the form of the letters… by altering the
set-up of each letter7. As for the interpretation enciphered by changing
5
'Adab al-Kutt b by a - l , p. 186.
6
"Collected Papers on Cryptology", p. 82/A.
7
His treatise Maq id al-fu l al-mutar ima a all at-tar ama, p. 60/B and 61/B.
25
the form of the letters8…As for the interpretation to be enciphered9…
As for the interpretation that can be ciphered…" and when he states:
"If the message to be enciphered by interpreting its letters contains
only a few words…"10.
ibn Adl n (d. AH 666/ AD 1268), on the other hand, uses
"interpretation" in the first meaning, which is encipherment. The
words "interpretation" and "the interpreted text" and their
"cryptanalysis" are abundant in his treatise. He says for example:
"I have therefore composed this introduction on cryptanalysis of the
interpretation11… when the interpreted text is free from no-word-
spacers 12… I have broken what had been interpreted by 13... In
general, if you wish to cryptanalyse an interpreted text14…".
Following the steps of ibn Adl n in using the term "interpretation"
to mean "encipherment" is ibn ad-Durayhim (d. AH 762/ AD 1359).
There are many clear examples of this agreement in his treatise, and in
the titles of some of his other books, such as his statement: "I have
written a book on the formulation of interpretations and their
cryptanalysis, which I called: ' al-mubham f all al-mutar am'
(the clarification of ambiguities in cryptanalysing interpreted texts)...
You should realize that cryptanalysing interpreted texts and
cryptograms is a very worthy cause. It is indispensable in times of
need, and useful in understanding the symbols of the ancients in their
sciences and books and other material... "15.
al-Qalqa and (d. AH 821/AD 1418) stands alone in using the word
"interpretation" in the third sense, which is "cryptanalysis", at variance
with his above-mentioned predecessors.
8
Ibid., p. 62/A and 66/A.
9
Ibid., p. 67/A and B, 68/A, 69/A.
10
Ibid., p. 68/B and 69/B.
11
His treatise al-mu'allaf lil malik al-'A raf, in ilm at-ta miya wasti r
al-mu amm ind al- Arab, p.270.
12
Ibid., p.271.
13
Ibid., p.278.
14
Ibid., p.279.
15
His treatise Mift al-Kun z, in ilm at-ta miya wasti r al-mu amm ind
al- Arab, pp.321-322.
26
* "'Isti r al-mu amm " (Cryptanalysis): Terms like "'isti ra
al-mu amm " or " all al-mu amm " or " all al-mutar am" were in
common use among the Arabs to imply the process of converting a
cryptogram into a cleartext an operation performed by someone who
is ignorant of the enciphering method or key used on the text. All the
above Arabic terms mean in essence "cryptanalysis". Nevertheless the
most common term used in today's Arabic is none of the above; it is
"kasr a - ifra" (code breaking).
Western researchers rightly consider the Arabs as the founders of
this science (of cryptanalysis) a fact that will be substantiated by the
edited manuscripts included in this series, especially since some of
these manuscripts were considered lost by Western historians16. The
following table (Table 1.1) specifies the use by the Arabs of the terms
cryptography and cryptanalysis:
16
See The Codebreakers by David Kahn, p. 95.
27
Table 1.1: The terms: "cryptography" and "cryptanalysis", as used by Arab scholars
Cryptography Cryptanalysis
Author deceased Arabic source or reference
synonyms synonyms
● al-mu amm .... tabaq t an-na wiyy n wal-lu awiyy n p. 51
al- al l ibn A mad al-Far h d AH 170 (AD 786) ● ilm al- .... sara al- uy n f ar ris lat ibn
mu amm zayd n, pp.147-150.
Sahl ibn U m n as-si ist n AH 248 (AD 862) ● al-mu amm .... al-fihrist p.93.
● 'isti r al- his treatise on cryptanalysis
● al-kutub al-
mu amm
mu amm t
Ya q b ibn is q al-kind AH 260 (AD 873) ● fakk al-mu amm
● ta miyat al-
● 'istinb al- ur f
hur f al-mu amm t
Mu ammad ibn A mad ibn 3rd century AH
● al-mu amm .... mift as-sa da 1/159
Ks n (9th century AD)
D w d ibn is q at-tan AH 316 (AD 928) .... ● 'isti r mu am al-'udab ' 11/98
al-mu amm
Mu ammad ibn A mad ibn ● al-mu amm ● 'isti r Collected Papers on Cryptology 48/b
AH 322 (AD 934)
ab aba ● al-mutar am al-mu amm
Mu ammad ibn Sa d al-ba r 4th century AH ● 'isti r mu am al-'udab ' 18/203
(10th century AD) ....
al-maw il al-mu amm
around 4th century ● at-ta miya ● 'isti r al-kal m Collected Papers on Cryptology 82/a,
AH ● at-tar ama 83/a
'Is q ibn Wahab al-K tib (around 10th ● 'isti
r al-
● al-kit ba al- from ar-rum z as-sirriyya p. 10
century AD) b ina mu amm
28
● fakk
al- from sara al- uy n f ar ris lat
A mad ibn Abdullah ibn
AH 463 (AD 1070) .... mu amm ibn zayd n by ibn nub ta, pp. 147-
Zayd n
150.
A mad ibn Abdul- az z a - was living in 553 ● fakk
al- bu yat al-wu t 1/325
AH (AD 1158) ....
antamr mu amm
As ad ibn Muha ab ibn AH 606 (AD 1209) ● al-mu ammay t .... mu am al-'udab ' 6/118
mamm t
● al-mu amm ● 'isti
r al- his treatise in the Collected Papers on
'Ibrah m ibn Mu ammad ibn
AH 627 (AD 1229) ● at-tar ama mu amm Cryptology 54/a
Dunayn r
● at-ta miya ● all at-tar ama
● all at-tar im his treatise in the Collected Papers on
ali ibn Adl n al-mutar im AH 666 (AD 1268) ● al-mutar am ● 'i ra al-makt b t Cryptology 89/a
● all al-mu amm
● 'i al-mu amm
ali ibn Mu ammad ibn ad- ● at-ta miya ● 'i al-marm z
AH 762 (AD 1359)
● 'i al-mubham
his treatise mift al-kun z
Durayhim ● at-tar ama
● all al-mutar am
after AH 742 (AD .... ● all al-mubham his book kanz al-'i ti
ali ibn Aydam r al- ildak 1341)
● 'i al-mu amm his book ub al-'a 9/230 quoting
● at-ta miya
A mad ibn Ali al-qalqa and AH 821 (AD 1418) ● all al-mutar am ibn ad-Durayhim.
● at-tar ama
● ka f al-mu amm
Mu ammad ibn al- asan al- Unknown ● at-ta miya ● all at-ta miya Collected Papers on Cryptology 80/b.
urhum
29
* "an-na al-w i " (Cleartext, Plaintext): is the message or text
to be enciphered. This is normally written in the letters of the alphabet
of a known language, such as the Arabic alphabet, for instance.
* "an-na al-mu amm " (Cryptogram or Ciphertext): is the
message or text after encipherment by one of the cipher methods.
* " ar qat at-ta miya" (Cipher Method): the methodologies or
consecutive operations applied to the cleartext to convert it into a
cryptogram. There are many ciphering methods, some of which we
shall mention later.
* " ar qat al-qalb" (Transposition): This is an essential type in
cryptography. It is based on altering the positions of the letters of the
cleartext according to a particular arrangement in order to obtain a
cryptogram. al-Kind has mentioned this method: "by keeping the
form of the letters but changing their positions17". ibn Wahab al-K tib
has called it: "changing the order of letters"18, and ibn ad-Durayhim,
has termed it "transposition type"19.
* " ar qat al-'i a" (Substitution): This is also one of the
principal types of cryptography. ibn Wahab al-K tib has called it
"at-tabd l" 20, and ibn ad-Durayhim "al-'ibd l"21. It is called "simple
substitution" when we replace each letter with a particular and fixed
form or symbol or another letter. We can also substitute more than one
letter for the original letter, which are then called "Homophones".
* "al-'i a al-bas a" (Simple Substitution; also called Mono-
alphabetic Substitution): where a letter is replaced by a fixed letter
or form.
* "al-'i a al-muta addidat al-'alifb 'iyya" (Polyalphabetic
Substitution): where each letter is replaced by two or more letters or
forms.
* " ur f at-ta miya" (Cipher Alphabet): are the symbols used
in the cryptogram. They can be devised forms which are not attributed
to the letters, as al-Kind has described them, or letters or terms for
17
See his treatise, p. 152.
18
Collected Papers on Cryptology, 82/A-B.
19
See his treatise, in ilm at-ta miya wasti r al-mu amm ind al- Arab, p. 324.
20
Collected Papers on Cryptology, 82/A.
21
See his treatise, in ilm at-ta miya wasti r al-mu amm ind al- Arab, p. 327.
30
species and genera, or sections of words, or even numbers, as
mentioned by ibn ad-Durayhim.
* "al-'a f l" (Nulls): They are additional superfluous forms or
symbols added to the cipher letters with the aim of increasing the
difficulty of cryptanalysing. The term was first used by al-Kind .
* "al-fa l" or "al-f il" (Word-Spacer or Space): which is the
space between two words.
* "al-mudma " (No-word-Spacer): It is a text which does not
contain spaces between the words, or any symbol for the space. The
cryptanalysis of such a text will be more difficult. ibn Adl n has
introduced this concept and explained an algorithm for its
cryptanalysis.
* "a - un 'iyya" (Bigram or Digraph): which is a combination of
two letters. There are 784 bigrams in Arabic, i.e. (28x28).
* "a - ul iyya" (Trigram or Trigraph): which is the combination
of three letters.
* "al-mift " (Key): Is an agreed system between two
cryptographers. It consists of a letter or a set of letters or numbers, or
even a verse of poetry which enables the recipient to read the
cryptogram without difficulty. al-Kind has called it "ar-rib
wa - ar " (relationship and diffusion)22 and "an-ni am" (the system).
ibn Dunayn r has also called it "ar-rib wa - ar ", whereas ibn Adl n
has termed it "a - aw bi " (regulators). ibn ad-Durayhim has called it
"ar-rib wa - ar ", "al-'i il " (convention), and "al-'iltiz m"
(commitment)23 because to him encipherment could be either
committed (to a letter or more), or uncommitted.
* "al-Q m s" (Code): Which is the method of representing the
words and phrases of a plaintext by groups of letters, words or
numerals. Dictionaries of correspondence are used in this method.
* "al-kalima al-mu tamala" (Probable Word): It is one of the
algorithms of cryptanalysis, mentioned by al-Kind : "...to know what
is commonly used in each language as honorary opening statements
and expressions"24. He was followed by ibn Adl n who says:
22
See his treatise on cryptanalysis, p. 132.
23
See his treatise Mift al-kun z in ilm at-ta miya wasti r al-mu amm ind
al- Arab, p. 336-337.
24
See his treatise, p. 128.
31
"...familiarity with word spacers and opening honorary expressions"25,
and: "You would also have to make an earnest effort in surmising the
occasion and the attending circumstances of writing the ciphered
message, and developing the context. You then enter upon extracting
the connotations appropriate for both occasion and context"26.
* "Taw tur al- ur f" (Frequency Count): is the frequency of
occurrence of each letter of an alphabet in a given text.
* "Taw tur Taq run al- ur f" (Contact Count or bigram
frequency): is the frequency of occurrence of each bigram in a given
text. It can also be applied to a given letter, and its possible
combination and non-combination with previous or following letters,
as mentioned by al-Kind .
* "at-ta miya al-murakkaba" (Composite Cipher or Super-
encipherment): term used by al-Kind to mean the successive use of
two or more simple methods of encipherment at the same time to
result in super-encipherment.
* "al- ibr as-sirr " (Steganography): which is a method of
writing with an ink that renders the writing invisible27.
25
See his treatise, al-Mu'allaf lil-malik al-'A raf, in ilm at-ta miya wasti r
al-mu amm ind al- Arab, p. 271.
26
See his treatise, in ilm at-ta miya wasti r al-mu amm ind al- Arab, p. 302.
27
Refer to ub al-'a by al-Qalqa and 9/229-230, for the methods of writing
with steganography.
32
1.3 Principles of Cryptography and
Cryptanalysis28
The proper understanding of the processes stated in the edited
manuscripts requires a good understanding of some of the basic
principles of cryptography and cryptanalysis. We shall therefore
explain in this section the most important principles needed for
understanding the manuscripts, beginning with a brief survey of the
major types of encipherment, and a few algorithms for cryptanalysis.
First: Major types of encipherment
Many types of encipherment have developed over the long history
of cryptography. The vast majority of these types can be classified
into two broad categories:
A. Encipherment by pun or euphemism:
This type does not follow definite guidelines. It includes
imagery, metonymical representations (al-mal in), puns used
by the pre-Islamic Arabs, and also rebuses and word-riddles
which came into use during the later centuries (after the 15th
century AD). It is more concerned with literature or "bad " than
with the scientific encipherment based on letter manipulation
(which forms the core of our present study). That perhaps makes
it all often dependent on the wit, culture and personal experience
of both sender and recipient, rather than on rules and methods. It
follows that encipherment by pun never rises on a level with the
universality and impact of the scientific encipherment,
especially when it comes to meeting the needs of individuals
and nations. As it lies out of our terms of reference, it has
therefore been excluded from this study.
B. Encipherment by letter manipulation:
This encipherment is achieved through different methods, each
following specific rules. This type of encipherment can be
classified into four principal methods, as follows:
1. "al-qalb" (Transposition), which consists of altering the
position of letters in a text according to a set rule, such as
28
These principles have been drawn from the edited manuscripts.
33
reversing the letters of each separate word, thereby the
encipherment of an expression such as "My father" will
give:
Plaintext: My father
Ciphertext: Ym rehtaf
Plaintext: My father
Ciphertext: Nz gbuifs
Plaintext: My father
Ciphertext: Mqy fzatsher
Plaintext: My father
Ciphertext: Zn sfiubg
34
by the Arabs with surprising efficiency. They are the following
principles:
1) Making use of the number of letters used in a cryptogram to
identify the language of the text.
2) Statistical Cryptanalysis: Making use of the frequency of letter
occurrence in the text, and comparing it with the frequencies of
the language in question.
3) Statistical Cryptanalysis: Making use of the frequency of
occurrence of bigrams and trigrams and other particularities, or
what they called the "combination and non-combination of
letters".
4) Probable Words: Making use of the traditional opening
statements or idioms (honorary titles, etc.) and so guessing at the
topic of the cryptogram.
35
1.4 A Brief History of Cryptology
The history of cryptology can be broadly divided, for the purposes
of this study, into two distinct periods:
29
David Kahn's The Codebreakers", pp. 71-93.
30
Refer to page 93 of David Kahn's work. David Kahn, an American historian and
chronicler of the history of cryptology, has something important to say in his 1164-
page book The Codebreakers. On page 93, having reviewed all the civilizations up
to the 7th century AD, he states:
"In none of the secret writing thus far explored has there been any sustained
cryptanalysis. Occasional isolated instances occurred, as that of the four Irishmen, or
Daniel, or any Egyptians who may have puzzled out some of the hieroglyphic tomb
inscriptions. But of any science of cryptanalysis, there was nothing. Only
cryptography existed. And therefore cryptology, which involves both cryptography
and cryptanalysis, had not yet come into being so far as all these cultures -including
the Western- were concerned.
"Cryptology was born among the Arabs. They were the first to discover and
write down the methods of cryptanalysis. The people that exploded out of Arabia in
the 600s and flamed over vast areas of the known world swiftly engendered one of
the highest civilizations that history had yet seen. Science flowered. Arab medicine
and mathematics became the best in the world -from the latter, in fact, comes the
word "cipher". Practical arts flourished. Administrative techniques developed. The
exuberant creative energies of such a culture, excluded by its religion from painting
or sculpture, and inspired by it to an explication of the Holy Koran, poured into
literary pursuits. Storytelling, exemplified by Scheherazade's Thousand and One
Nights word-riddles, rebuses, puns, anagrams, and similar games abounded;
grammar became a major study. And included was secret writing."
36
B. The period of scientific approach to cryptology:
Dealing with cryptology, as a science, began among the Arabs
during the eighth century AD (first century of the Hegira) and
continued till the fourteenth century AD (eighth century of the
Hegira). This period also saw a thorough analysis and improvement of
the old principles and methods. The outcomes of the Arab
breakthroughs were fully documented with manuscripts, some of
which are the subject of our study.
The period commenced with al- al l ibn A mad al-Far h d , ibn
K s n, ibn Wa iyya an-Naba and Ab tim as-Si ist n , keeping
up with the major movement of translation into Arabic and the
beginnings of the art of correspondence and administration. It was
crowned (in the 3rd century AH/9th century AD) with Ya q b al-
Kind 's treatise on cryptanalysis. al-Kind treatise is truly unique in
terms of its precision, thoroughness, and mature analytical
investigation into the rules of cryptology and features of the language
to be enciphered or cryptanalysed.
This period continued until modern times, alternating between
stagnation and progress. In fact it began to decline following the
golden era of al-Kind and until the invasions of the Mongols and the
Crusaders, when it flourished again in the 13th and 14th century AD
through cultural, military and political motives. This revival was
attested to by the plethora of cryptological compilations by such
experts as ibn Dunayn r (d. 627 H/1229 AD), ibn Adl n (d. 666
H/1268 AD), ibn ad-Durayhim (d. 762 H/1359 AD) and others.
Again the upswing waned thereafter in the East only to reappear,
this time in the West by the end of the 15th century through the 16th
century AD, in the form of translations or quotations inspired by the
Arabic sources, with some additions and amendments at the hands of
L.B. Alberti31, Trithemius32, G.B. Belaso33, Porta34, Cardano35, and
31
Refer to David Kahn's The Codebreakers", pp. 126-130.
32
Ibid. pp. 130-136.
33
Ibid. p. 137.
34
Ibid. pp. 137-143.
35
Ibid. pp. 143-145.
37
B. Vigenère36. Once again the work in this field slowed down, then
grew active in the twentieth century just prior to and during WWI,
through the period of WWII. It kept on gaining momentum up to the
present day ever more sophisticated and far-ranging.
The following table (Table 1.2) is a summary of the history of that
period through the life and writings (manuscript and printed) of the
most celebrated Arab authors and scientists of this field:
36
Ibid. pp. 145-150.
38
37
Table 1.2: List of eminent Arab scholars in cryptology
Name of scholar Life Span His works
al- al l AH 100-170 az-Zubayd , in his book abaq t an-
ibn A mad AD 718-786 na wiyy n wa al-lu awiyy n, p.51,
al- ar h d attributed to this famous author a book
on cryptology. No manuscript of this
book was found to date. Another
reference to this book came from ibn
Nub ta quoting az-Zubayd in Sara
al- Uy n f ar ris lat ibn Zayd n.
ibn Nub ta, furthermore, considered
him the founder of the science of
cryptology. ibn Nub ta was later
quoted by Mu ammad ibn al- anbal
in his treatise ar kanz man wa
amm f al-'a wa al-mu amm
3/B - 4/A, which is photocopied from
the copy of a - hiriyya Library.
bir ibn ayy n AH ...-200 Has a book entitled all ar-rum z wa
al-k my ' a - f AD ...-815 maf t al-kun z, which was
attributed to this author by ibn
Wa iyya in his book awq al-
mustah m f ma rifat rum z al-
'aql m, 84/A. Other sources have not
referred to this manuscript.
awb n AH ...-245 Has a book entitled all ar-rum z wa
ibn Ibrah m AD ...-859 bar' al-'asq m f u l al-lu t wa al-
u an-N n 'aql m.
al-Mi r Was mentioned by Dr. Rama n
a an in his book Naw dir al-
ma t f maktab t Turkiyy , 2/27.
Sahl AH ...-248 ibn an-Nad m, in his book al-Fihrist,
ibn Mu ammad AD ...-862 p. 93, quoted ibn Durayd describing
ibn U m n this scholar as "A man of immense
as-Si ist n erudition; practised decipherment, at
which he was very astute, and had a
discerning eye for it...".
37
The order of listing adopted is one of chronological precedence of the death dates of scholars listed.
The table is restricted to those scholars noted as cryptologists, whether or not they have had
cryptological compilations.
39
Ya q b ibn Is q AH ...-260 Among his works is his treatise
al-Kind AD ...-873 Ris lah f 'isti r al- mu amam ,
edited and included in this first book
of the series.
A mad ibn Al AH ...-later than 291 His book awq al-mustah m f
ibn Wa iyya AD ...- later than 914 ma rifat rum z al-'aql m was printed
in London with an English translation
in 1806 by George Hammer.
The manuscript is preserved at the
National Library in Paris under the
number (6805).
Mu ammad 3rd century H Was alluded to in Mu am al-'Udab '
ibn A mad 9th century AD 17/137 in the context of the biography
ibn K s n of his namesake Mu ammad ibn
A mad ibn K s n (d. AH 299). A
biograpgy copied from Ab Bakr az-
Zubayd . Y q t says: "This is not the
same author of old who has a book on
prosody and cryptography". We could
not find this quotation in the book of
Ab Bakr az-Zubayd abaq t an-
na wiyy n.
Daw d AH 228-316 Was mentioned by Y q t in Mu am
ibn al-Hay am AD 843-928 al-'Udab ' 11/98 in his transcription of
ibn Is q al- at b al-Ba d d 's work titled T ri
at-Tan Ba d d that: "He was a grammarian
and a linguist, well-versed in prosody
and cryptanalysis". Has left no known
works on cryptology.
Mu ammad AH ...-322 Has a "Treatise on cryptanalysis"
ibn A mad AD ...-934 included in a collection of papers on
ibn Mu ammad cryptology held in F ti Library of
ibn ab ab as-Sulaymaniyya Library, in Turkey
and numbered (5359).
Mu ammad 4th century H Y q t has included his biography in
ibn Sa d al-Ba r 10th century AD Mu am al-'Udab ' 18/203-204 and
al-Maw il mentioned that he was contemporary
with Ab Al al-F ris , (d. 377 AH/
987 AD). He stated that he was "clever
and instructed.... and an authority in
prosody and cryptanalysis".
We could not find a biographical
record for the early and later stages of
his life.
40
Is q Around the 4th Has a book entitled al-bay n wa at-
ibn 'Ibr h m century AH taby n, parts of which are included in
ibn Wahab al- Around the 10th the above mentioned collection
K tib century AD (between 82/A and 83/A). A book
entitled al-burh n f wu h al-bay n
by the author was published in
Baghd d in 1967. We have not seen
this book, but the manuscript we have
on al-bay n agrees with the transcript
of al-burh n included in Dr. Abdul
H d at-T z 's book ar-rum z as-
sirriyya f al-mur sal t al-ma ribiyya
pp.10-11. Therefore they are probably
one and the same.
A mad Was alive in AH as-Suy mentioned in his book
ibn Abdul- Az z 553 Bu yat al-wu t 1/325, quoting from
al- antamr AD 1158 ibn Abdul-Malik, that: "he was
eminent in prosody and cryptanalysis".
Um n AH 524-599 Was mentioned twice by Ali ibn
ibn s at-T AD 1130-1202 Adl n in his treatise: al-Mu'allaf lil-
al-Bula malik al-'A raf, 100/A and 100/B.
We could find no compilation on
cryptology by this author.
As ad AH 554-606 Has a book entitled a 'i al-
ibn Muha ab AD 1149-1209 ma rifa f al-mu ammay t mentioned
ibn Mamm t by Y q t in Mu am al-Udab ' 6/118,
and also by al-Ba d d in Hadiyyat
al- rif n 1/205, under a slightly
different title: 'i al-ma r f f al-
mu ammay t.
Ibr h m AH 583-627 Has a treatise called Maq id al-fu l
ibn Mu ammad AD 1187-1229 al-mutar ima an all at-tar ama,
ibn Dunayn r which is included in the aforementioned
collection on cryptology. An edited
version of this treatise, along with
other treatises, will be published later
as part of this series.
41
Al ibn Adl n AH 583-666 Has two books: - al-Mu'allaf lil-
an-Na w AD 1187-1268 malik al-'A raf f all at-tara im,
al-Mutar im which will be edited and published in
this series. The original manuscript is
embodied in the collection of papers
on cryptology mentioned above.
- al-Mu lam: ibn Adl n has referred
to it in his previous treatise 98/b and
104/B, but is not included in the
sources of his biography. No
transcript of this book was found.
Al AH 715-762 Has written:
ibn Mu ammad AD 1312-1359 - The treatise: Mift al-kun z f
ibn ad-Durayhim al-marm z, which will appear in this
series.
- 'I al-mubham f all al-
mutar am, which is mentioned in the
introduction of his treatise Mift al-
kun z 47/B.
- Mu ta ar al-mubham f all al-
mutar am: was also mentioned in the
introduction of Mift al-kun z 47/B.
- Na m liqaw id fann al-mutar am
wa aw bi ih, also mentioned in the
introduction of Mift al-kun z 47/B.
- Qa da f all rum z al-'aql m al-
makt ba al al-bar b : a poem
mentioned in an article entitled
Ras 'il N dira by Mu ammad A mad
Dahm n. The article appeared in the
Review Journal of the Arab Academy in
Damascus, vol. 54, no. 2, p. 360. The
poem is included in collection no. 139 of
A mad Taym r B 's Library in Cairo.
Mr.Dahm n visited this library and cited
in his article some of its holdings. We
could not find another citation for this
poem in any other source.
Al AH...-later than 742 In the 6th chapter of his book Kanz al-
ibn Mu ammad AD...-later than 1341 'i ti wa durrat al- aww f
ibn Aydamar ma rifat asr r ilm al- aw , he
al- ildak elaborates on "cryptanalysing the
encipherment and solving the
ambiguities of what the ancients and
their disciples have concealed in all
languages and at all times", pp. 229-
239 (Bombay edition, AH 1309/ AD 1891).
42
A mad ibn Al AH 756-821 al-Qalqa and has included in his
al-Qalqa and AD 1355-1418 encyclopedia ub al-'a f in at
al-'in a whole chapter on
encipherment entitled f i f ' m f al-
kutub min as-sirr, chapter 8 of
volume 9, pp. 229-248. Most of it is
quoted from ibn ad-Durayhim.
A mad Unknown Has written: all ar-rum z wa fat aqf l
ibn Mu ammad al-kun z, which was mentioned by the
Ab al-Q sim author of Ka f a - un n 1/686 as: "a
al- Ir q treatise on the methods of the ancients to
encipher the sciences and secrets of their
heritage". We could not find any
reference to the book or its author in
any other source.
43
1.5 Cryptology: Relation to Other Sciences
It was stated earlier that the Arabs were the first to treat
cryptography and cryptanalysis scientifically. They have written on
the science of cryptology and developed it, thus becoming its founders
in their own right. We have also detailed the factors that gave rise to
the birth of this science among the Arabs, which were: the active
translation movement from other languages; the progress of
mathematical sciences, particularly in the fields of arithmetic and
algebra; the important advances in the sciences of the Arabic
language; the progress in writing, composition, correspondence,
records and archives (daw w n), or what is now called "administrative
sciences", together with the expansion of literacy and the general
importance given to writing in the Arab-Islamic civilization.
We shall consider the above factors separately, and demonstrate
their relation and chronological links with the progress of cryptology
in the Arab civilization.
1.5.1 Translation
During the first three centuries of the Hegira, a translation
movement from the books of ancient and contemporary civilizations
into the Arabic language flourished in the Arab and Islamic world.
A great number of books were translated by Arab scholars from
Syriac, Nabataean, Greek, Latin, Persian, Hindi, Armenian, Hebrew,
and Mongol. The Arabs went even further to translate some of the
works written in extinct languages, a fact which prompted them to
study these languages and classify their alphabets. Some of the books
were enciphered, especially in such subjects as chemistry, magic,
philosophy, and religion. The need for achieving complete translations
and comprehension of those sciences was an incentive to them to
work out ciphered texts. This was the principal motive behind the
foundation of cryptology at the time. u an-N n al-M r awb n ibn
'Ibrah m, (d. AH 245/ AD 859) wrote a book on ancient alphabets, and
called it all ar-rum z wa bar' al-'asq m f ka f 'u l al-lu t wa
al-'aql m38. Ab al-Q sim A mad ibn Mu ammad al- Ir q also wrote
38
See Naw dir al-ma t f maktab t Turkiyy (Rare manuscripts in the libraries=
44
a treatise entitled all ar-rum z wa fat aqf l al-kun z39, which deals
with the enciphering alphabets used by the ancients to conceal their
sciences and secrets.
Ya q b al-Kind , known as "the philosopher of the Arabs", and
director of "Bayt al- ikma" (which became the largest library and a
centre of scientific research during the rule of the Caliph "al-Ma'm n"),
wrote in the introduction to his treatise on cryptanalysis the following:
"that cryptanalysis offers the greatest of advantages, as many ancient
philosophers and scientists used unknown signs in their books. Those
who do not work hand on this task do not actually benefit from their
knowledge and cannot attain high levels in their scientific
achievements…".40
ibn Wa iyya (d. AH 291/ AD 914), left us his invaluable book
awq al-mustah m f ma rifat rum z al-'aql m. It was fortunate
indeed that this manuscript survived the ages and was discovered at an
early date by the orientalist J.Von Hammer, who translated it into
English and published it in both languages in 180641. Further,
Sylvestre de Sacy42 also published (in Paris 1810) a study on this
manuscript, which seemed to have been of great assistance to J.F.
Champollion in cryptanalysing Egyptian hieroglyphics, as he was a
contemporary and a passionate competitor of this author.
ibn Wa iyya's manuscript exhausted the alphabets of the ancient
languages and those of his era, with the purpose of identifying those
languages and recognizing the material written in each. His
manuscript included (93) alphabets related to Semitic, Greek, Hindi,
ancient Egyptian and other civilizations. He also gathered in his book
all the cipher alphabets he came upon, and all that he had learned
during his extensive travels between Egypt and Greater Syria.
ibn ad-Durayhim (d. AH 762/ AD 1359) states in his treatise mift
al-kun z f ‘ al-marm z that cryptanalysis can be very
advantageous in understanding what the ancients wrote. He says:
43
See his treatise mift al-kun z, in ilm at-ta miya wasti r al-mu amm ind
al- Arab p. 322.
46
to him44, but he has also been mentioned by ibn Nub ta (d. AH 768/
AD 1366) in his book Sar al- uy n as being the first to work on
cryptanalysis. ibn Nub ta states in his explanation of the expression
"fakk al-mu amm " (cryptanalysis): "al- al l, the formulator of
prosody, was the first to consider cryptanalysis and lay down its
algorithms. The reason was that some Greeks..."45.
Among the important linguistic concepts in cryptology are those
which al-Kind has termed: "Kammiyya" (quantitative) and
"Kayfiyya" (qualitative). The first relates to the frequency of letter
occurrence, word lengths, basic letters, affixing letters, etc. The
second term relates to the structure and form of Arabic words, such as
the combination and non-combination of letters in anterior or posterior
positions, etc.
What is also helpful in cryptanalysis is the classification in a
language of the words that are in use, and those out of use. That is
done by transposing the letters of words in all possible combinations:
a two-letter word, for example, can have two inflections, a three letter
word can have six, and so on. And that was what al- al l ibn A mad
did in his book al- Ayn, the first dictionary to appear in Arabic, and
most likely in any other language. - (See section 1.5.3)
A careful study of the Arabic manuscripts on cryptology would
clearly show the dependence on the following linguistic sciences:
1. Phonetics.
2. Statistical linguistics.
3. Morphology.
4. Lexicology.
5. Syntax and Grammar.
6. Semantics.
7. Prosody.
ibn Adl n an-Na w (d.AH 666/ AD 1267), has stressed the need
for these sciences in the process of cryptanalysis when he said:
"Several tools are needed in cryptanalysing an interpreted text, such as
intelligence, lucidity, dynamism, linguistics, syntax, morphology,
lexicon of the language, knowledge of prosody and rhymes, frequency
of letter occurrence, combination and non-combination of letters,
44
See abaq t an-na wiyy n wa al-lu awiyy n, by az-Zubayd , p. 51.
45
See Sar al- uy n f ar ris lat ibn Zayd n, pp. 147-150.
47
knowledge of the most frequently used words and those less used:
two- and three- letter words…"46.
There were abundant sources and references of linguistics and
language studies. Such sources were frequently quoted in the books of
cryptologists. This is evidenced by the statement of ibn Adl n: "The
lexical structures are plentiful in the lengthy books of language, such
as Tah b al-lu a by al-'Azhar , al-mu kam by ibn S da al-Ma rib ,
an-nasab li a r kal m al- arab, ibn al- abb n's a - amil, and
others"47.
The relationship between cryptologists and language sciences was
not unilateral. Biographical sources confirm that the leading scholars
of language were also involved in cryptology. They wrote about this
science, and also practised cryptanalysis. al- al l was already
mentioned. Another prime example is Ab tim as-Si ist n (d. AH
248/ AD 862) who was a master of the Arabic language in his era and
"the most knowledgeable scholar in prosody and cryptanalysis"48.
There were also Daw d ibn al-Hay am ibn Is q at-Tan al-
'Anb r (d. AH 316/ AD 928): "A grammarian and linguist well-
versed in prosody and cryptanalysis"49, and Mu ammad ibn Sa d al-
Ba r al-Maw il , who "was intelligent and discerning, rating high in
poetry, and competent at prosody and cryptanalysis"50. Other
examples of such scholars abound in the biographies of linguists.
It should be appropriate here to mention ibn Man r's comment on
Arabic letters. In the introduction to his famous dictionary Lis n
al- Arab he has had this to say: "Regarding their combination and
non-combination, there is a secret in co-articulation. This secret is
open only to those who toil at it, and it was unveiled to us while
cryptanalysing cryptograms…''51.
46
From his treatise al-Mu'allaf lil-malik al-'A raf, in ilm at-ta miya wasti r al-
mu amm ind al- Arab, pp. 270-1. See also ibn ad-Durayhim's treatise Mift al-
kun z, in ilm at-ta miya wasti r al-mu amm ind al- Arab, p.322.
47
See his treatise in ilm at-ta miya wasti r al-mu amm ind al- Arab, pp. 272-273.
48
See Bu yat al-Wu t 1/606.
49
Ibid. 1/563.
50
Ibid. 1/114.
51
See Lis n al- Arab, 1/14.
48
It is no coincidence that prosody should be linked to cryptology in
the minds of many linguists and grammarians. Poetry was so
widespread during that period that it even surpassed prose in a number
of fields. It had a use and power similar to that of the audio –visual
media of our times, and so it often had to be ciphered. Many of the
works on cryptology to which we had access treat of encipherment
and cryptanalysis of poetry. In al-Kind 's treatise on cryptanalysis,
which is the earliest of the cryptological manuscripts in our
possession, we find: "…the enciphered letters are either in numerical
proportions, that is poetry, or they are not. Non-poetry…"52.
Also in the introduction to ibn Dunayn r's book Maq sid al-fus l
al-mutar ima an all at-tar ama, we find: "This book is divided into
two parts: the first deals with the cryptanalysis of cryptograms written
in prose; the other is on cryptanalysing cryptograms written in
poetry…"53.
Furthermore, some of the authors in this science have devoted
entire treatises to poetry encipherment, such as the treatise of
Mu ammad ibn A mad ibn ab ab (d. AH 322/AD 934) entitled
al-mad al f ma rifat al-mu amma min a - i r54. Another treatise on
cryptanalysing poetry by an anonymous author is included in the
Collected Papers on Cryptology55.
The following table (Table 1.3) lists a number of earlier leading
scholars of the Arabic language sciences. The long list attests to the
existence of a great Arab linguistic heritage, for the ancient Arab
cryptologists to draw from.
52
See his treatise, p. 122.
53
See his treatise, p. 54/B.
54
Was mentioned by Y q t in Mu am al-'Udab ', 17/143-156 and by al-Ba d d
in Hadiyyat al- rif n 1/33. It is probably the same treatise included in the "
Collected Papers on Cryptology 48/A-53/B under the title Ris lat ab al- asan
ibn ab ab f 'isti r al-mu amm because this treatise tackles decipherment
of poetry.
55
It occupies between 119/B and 133/A of the aggregate, and does not include the
title Adab a - u ar ' by the same author, according to its introduction.
49
Table 1.3: Renowned ancient scholars in the Arabic language
51
'Isma l -- AH 393 Author of a - i .
ibn amm d -- AD 1003
al- awhar
'A mad AH 329 AH 395 A leading scholar in literature
ibn F ris AD 941 AD 1004 and language. Among his
al-Qazw n famous works are Maq y s al-
lu a and al-Mu mal.
Abd al-Malik AH 350 AH 429 One of the "imams" in
ibn Mu ammad a - AD 961 AD 1038 literature and language. A
a lib prolific author. Yat mat ad-
dahr and Fiqh al-lu a are two
examples of his books.
Ali AH 398 AH 458 A scholar in literature and
ibn 'Ism l AD 1007 AD 1066 language. Among his works
ibn S da are al-Mu a a and al-
Mu kam.
Ma m d AH 467 AH 538 A scholar in religion,
ibn Umar AD 1075 AD 1144 interpretation of the Holy
az-Zama ar Koran, language and literature.
His major books include: al-
Ka f and 'As s al-bal a.
Mawh b AH 466 AH 540 Author of al-mu arrab min al-
ibn 'A mad AD 1073 AD 1145 kal m al-'a am , among
al- aw l q other works.
Hibat All h AH 450 AH 542 A leading scholar, well versed
ibn Al AD 1058 AD 1148 in Arabic language and
ibn a - a ar literature. Author of al-'Am l ,
among other works.
U m n ibn Uma AH 570 AH 646 Among the prominent Arabic
ibn al- ib AD 1174 AD 1249 language scholars. He wrote
al-K fia and a - fia.
abd ar-Ra m n ibn AH 513 AH 577 Among the learned scholars of
Mu ammad al- AD 1119 AD 1181 language and literature. He is
'Anb the author of al-'in f.
abd All h AH 538 AH 616 A scholar of grammar,
ibn al- usayn al- AD 1143 AD 1219 language, and literature.
Ukbar Among his many works is:
at-tiby 'i b al-Qur' n.
Ya AH 556 AH 643 A great Arabic-language
ibn Al AD 1161 AD 1245 scholar. He wrote ar al-
ibn Ya mufa al, among other works.
52
al- asan AH 577 AH 650 One of the most eminent
ibn Mu ammad AD 1181 AD 1252 language scholars of his time.
a- n Among his major works are
at-Takmila and al- Ub b.
Mu ammad -- AH 686 An Arabic-language scholar.
ibn -- AD 1287 Explained ibn al- ib's two
al- asan ar-Ra al- books: al-K fia and a - fia.
'Astr b
Mu ammad AH 600 AH 672 A leading authority in Arabic-
ibn Abd All h ibn AD 1203 AD 1274 language sciences. His most
M lik famous work is: al-'Alfiyya.
Mu ammad AH 630 AH 711 A leading scholar in the
ibn Mukarram AD 1232 AD 1311 Arabic language. Abridged
ibn Man r many lengthy works. Author
of the famous Lis n al- Arab,
among others.
Mu ammad AH 654 AH 745 Among the prominent scholars
ibn Y suf AD 1256 AD 1344 of language and interpretation
Ab ayy n an- (of holy verses). Most
Na w distinguished among his
compilations is al-ba r
al-mi .
Abd All h AH 708 AH 761 One of the Arabic-language
ibn Y suf AD 1309 AD 1360 authorities. A prolific writer.
ibn Hi m The major of his compilations
is Mu n al-lab b.
Mu ammad AH 729 AH 817 A man of wide knowledge in
ibn Ya q b AD 1329 AD 1415 language and literature. His
al-Fayr z b d most famous work is
al-Q m s al-mu .
Abd ar-Ra m n ibn AH 849 AH 911 A deeply learned authority in
Ab Bakr as-Suy AD 1445 AD 1505 language, history, etc.., and a
prolific scholar. He has left
more than 600 works.
53
1.5.3 Mathematics
The progress in mathematics had an immense impact on the
development and growth of cryptology in much the same manner as
the Arabic-language sciences had on its birth. Among the factors that
led to the development of arithmetic and algebra among the Arabs was
the need of the Islamic Arab state for computation related to matters
of inheritance, partition of lands, "az-zak t" (alms taxes), and other
geometrical and astronomical calculations.
The advances achieved in arithmetic and algebra were crucial in
providing some of the tools for cryptology. Evidently Arab cryptology
would not have flourished without the implementation of the Arabic
numerals (0,1,2,3,4,5,6,7,8,9). The implementation of any analytical
method of cryptanalysis (such as determining the frequency of
occurrence of letters, bigrams, and trigrams, and computing possible
letter combinations) would have been very difficult and cumbersome
indeed if the Roman numerals had been used. Arabic numerals are
much simpler to use by comparison. To state, for example, that the
letter m occurred (998) times, we would have to write
DCCCCLXXXXVIII in Roman numerals.
The Roman numerals continued to be used in the West until they
were eventually replaced by the Arabic numerals, which spread
widely in use during the fifteenth century. It was no coincidence,
therefore, that the origin of the terms "cipher", "encipher" and
"decipher" in all Western languages was the Arabic number " ifr"
(cipher), which means "zero" in Arabic.
Among the operations that were used in cryptanalysis were
permutations and combinations, multiplications and divisions. They
were used in computing the frequency of occurrence of letters, and in
determining the possibilities of letter combination in two-, three-,
four- or five- letter words.
In what appears to be the first ever known use of "combinatorics"
the great Arab Linguist al- al l ibn 'A mad al-Far h d wrote: "If you
want to exhaustively account for all the Arabic language lexicon, and
count the two-letter words, either meaningful or not, which the Arabs
used or rejected, such as: , , , etc., take the alphabet letters,
54
which are 28, and multiply the number by itself to make 78456.
A single letter does not form a word. If you take them in pairs [i.e.
without reversal] they make 392 [= 784/2] structures, such as: and
the like57. If you reverse the letter positions in these pairs the number
will come back to 784 structures, of which 28 are double [identical]
letters such as: , pronounced the same forward and backward58. 600
of these are "whole structures" with no , or -the three vowel
letters in Arabic-; the number comes to 300 before reversal59. Also
150 structures [of the 756] are two-letter words containing one of the
vowels: , and ; these add up to 75 two-letter words prior to
reversal. There are further 6 two-letter words containing two of the
vowels, and making 3 before reversal. 3 double-letter words contain
the same vowel, and 25 double-letter "whole" structures or words
contain identical consonants. These are the two-letter words counts
which the Arabs used or rejected ــــunderstand them!
"If you want to count all three-letter words, multiply the 3 vowels by
the 9 [= 32] two-letter words, to get 27 [= 33] structures of three letters,
all vowels. Then multiply the 3 vowels by the 150 two-letter words,
where one letter is a vowel and the other is a consonant; you get 450
structures of three letters, two of which are vowels and one is a
consonant. Multiply the 3 vowels by the 600 two-consonant words;
you get 1800 structures of three letters, of which two are consonants
and one vowel. Now multiply the 25 consonants by the 600 two-
56
Permutations, it represents the number of arranged samples of the size (k),
derived from (n) elements, including reversed cases (nk). For example: the
permutations of volume k=2, namely two-letter groups formed from n=28
elements or letters are n=(28)2 =784.
57
Same law as above; however, without reversing the letters, it then becomes:
784/2=392.
58
Which is 784-28 = 756 which are arrangements representing the number of
successions of volume k, derived from n, that is: kpn=n!/(n-k)!, which in this case
means: 784-28=756.
59
The arrangement rule mentioned in the previous footnote will become, after
subtracting the three vowel letters: 24 x 25 = 600, which becomes 300 without
reversing the letters.
55
consonant words; they become 15625 three-consonant structures. This
is all that can result from three-letter structuring.
"If you want to count the four-letter words, use the same method.
Multiply the three vowels by the 27 three-letter structures, then
multiply by 450, then by 1800. You now multiply the 25 consonant by
the 15000 three-consonant words. These are all the four-letter word
structures. The same method is used for five-letter words. However,
six-letter word structures can possibly be achieved only through
affixing letters".60
We can find the same concepts in the computation of the
permutations of the Arabic language structures. al- al l ibn A mad
says: "A bigram can be permuted in two forms61, such as: قد، دق، شد
،دش. A trigram can be permuted in six forms62 called "masd sa"
[six's], such as: ضسب، ضثس، تسض، تضس، زضة، زتض. A four-letter
word can be permuted in twenty-four forms, because you multiply the
number of the letters (which is four) by the three-letter word
variations, which are six, and the result is twenty-four forms63…A
five-letter word can be permuted in a hundred and twenty different
forms, because you multiply the number of the letters (five) by the
four-letter word variations which are twenty-four, and the result is a
hundred and twenty forms…"64.
al-Kind (d. AH 260/ AD 873), described in his treatise Ris la f
isti r al-mu amm the statistical process of determining the
frequency of letter occurrence for a given language, by analyzing a
sample of text of adequate length in that language (he used a text
made up of 3667 letters), then using the statistical results in
cryptanalysing cryptograms. He began by calculating the frequency of
occurrence of letters in a sample cryptogram, and compared the results
with those he obtained from the sample normal (clear) text. al-Kind
stressed the importance of the fact that the cryptogram must be
sufficiently long to allow for the application of statistical laws. This is
60
See "Collected Papers on Cryptology", paper no. 87.
61
Permutations:2=2!, which represent the number of permutations of n elements=n!.
62
Permutations: 3 x 2 = 6 = 3!.
63
Permutations: 4 x 6 = 24 = 4!.
64
Permutations: 5 x 24 = 120 = 5! And the quotation is from al- Ayn 1/66.
56
the principle of "statistical significance" which is a very crucial
mathematical concept. He wrote: "Among the expedients we use in
cryptanalysing a cryptogram if the language is already known, is to
acquire a fairly long plaintext in that language, and count the number
of occurrences of each of its letters. We mark the most frequent letter
"first", the second most frequent "second", and the following one
"third" and so forth until we have covered all its letters. Then we go
back to the cryptogram we want to cryptanalyse, and classify the
different symbols, searching for the most frequent symbol in the
cryptogram and we regard it as being the same letter we have marked
"first" -in the plaintext-; then we go to the second most frequent letter
and consider it as being the same letter we have termed "second"; and
the following one "third", and so on until we exhaust all the symbols
used in the cryptogram sought for cryptanalysis.
"It could happen sometimes that short cryptograms are
encountered, too short to contain all the symbols of the alphabet, and
where the order of letter frequency cannot be applied. Indeed the order
of letter frequency can normally be applied in long texts, where the
scarcity of letters in one part of the text is compensated for by their
abundance in another part.
"Consequently, if the cryptogram was too short, then the
correlation between the order of letter frequency in it and in that of the
language would no longer be reliable, and thereupon you should use
another, qualitative expedient in cryptanalysing the letters…"65.
al-Kind , furthermore, is the first to compute the frequency of letter
occurrence in the Arabic language and most probably in any other
language, and to utilize his results in cryptanalysis. His text on the
subject is the oldest work we have come across among earlier
cryptological works. The following table (Table 1.4) shows the order
of letter frequency as observed by al- Kind . The works of ibn
Dunayn r and ibn Adl n, who quoted al- Kind , were of help in
redressing discrepancies in the original manuscript. These have been
marked with an asterisk in the table.
65
See his treatise, pp. 124-126 and P. 126. ibn Adl n has also used the same
meaning in his treatise, in ilm at-ta miya wasti r al-mu amm ind al- Arab,
p. 276 (q.v.).
57
Table 1.4: al-Kind 's work on the order of letter
frequency (statistical cryptanalysis)
Letter Rank or Frequency of Percentage of
order occurrence occurrence
1 600 16.36
2 437* 11.91
3 320 8.72
4 273 7.44
5 262 7.14
6 252* 6.87
7 221 6.02
8 155 4.22
9 131 3.57
10 122 3.32
11 120 3.27
12 112 3.05
13 112 3.05
14 92 2.50
15 91 2.48
16 63 1.71
17 57 1.55
18 46 1.25
19 35 0.95
20 32 0.87
21 23* 0.63
22 20* 0.55
23 20 0.55
24 17 0.46
25 16* 0.44
26 15 0.41
27 15 0.41
28 8 0.22
3667 100
*
These numbers have been corrected according to quotations made by ibn Dunayn r
and ibn Adl n of al-Kind .
58
ibn Dunayn r (d. AH 627/AD 1229), used, for the first time, a
method of encipherment and cryptanalysis based on substituting a
decimal number for each letter of the alphabet using the arithmetic of
"decimally–weighted numerical alphabet", or " is b al- ummal". He
states: "Cryptograms enciphered by is b al- ummal are very easy to
cryptanalyse. The algorithm is to place each letter of the alphabet next
to a decimal numerical character, and you add next to each decimal
numerical character a corresponding Indian character –which is a
decimal number. The following are the shapes of Indian numerical
character units:
If you place a circle before [i.e. to the left of] the one, it becomes
ten. If the circle is placed before [i.e. to the left of] the two, it becomes
twenty; and this is how you get the tens digit. If you put two circles
before the one, it becomes one hundred. If these circles are put before
the two, the number is then two hundred… and this is how you get the
hundreds digit. If you put three circles before a one, the number is
then a thousand, If the three circles are before the two, the number
will then be two thousand, etc… Consequently, if you wanted to
encipher ( )اهلل وىٌ اىتوفَقby this method, you would have to replace the
letters with their corresponding Indian characters, as follows:
10 30 6 5 30 30 1
(ten) (thirty) (six) (five) (thirty) (thirty) (one)
100 10 80 6 400 30 1
(one hundred) (ten) (eighty) (six) (four hundred) (thirty) (one)
66
See "Collected Papers on Cryptology", 66/B-67/A.
59
ibn Dunayn r then goes on a step further to demonstrate that the
number replacing each letter of the alphabet can be increased twofold,
threefold, or more, thus increasing the difficulty of cryptanalysis. He
writes: "One method of composite ciphering is to multiply the
numbers replacing the letters by two -or three- or more, which makes
the cryptogram even more complicated to cryptanalyse.
For instance, if you want to write ( )اهلل وىٌ اىتوفَقin cipher, you may
write:
" " 67.
67
See " Collected Papers on Cryptology", 67/A.
68
See his treatise, in ilm at-ta miya wasti r al-mu amm ind al- Arab, p. 276.
69
See his treatise, in ilm at-ta miya wasti r al-mu amm ind al- Arab, p. 290.
60
ibn ad-Durayhim (d. AH 762/AD 1359) alluded to encipherment by
decimal numerical alphabet, in a manner similar to ibn Dunayn r's. He
stated: "Some [cryptographers] substitute decimal numerical alphabet
for letters in four different ways: by writing the numbers in words as
pronounced, or by finger-bending, using the fingers to communicate
the message visually to a recipient, or by writing the numbers as
numerals, such as writing: ( ٍحَد: forty, eight, forty, four), or by giving
the cryptogram a semblance of a page of a financial register.
"Others convert the cryptogram numerals into a number of letters
ـــa method of encipherment which involves more sophistication.
There are many combinations that can be used in this method, for
example in ( ج. ا. ٌ ى. تو. ٌ ى: )ٍحَدor ( تة. مل. أش. )مل. One can even
form delusive words, such as ( جا. وىد. أتدا. )ٍحثل, or substitute two
words for a letter, e.g.( هدأ. وهاتا جوادا. سثح: ٌ )عيin which case a line is
to be drawn over the two words to indicate that they represent one
letter.
"Some multiply the number replacing the letter by two, and so
write (. ح. ف. ٍو. ف: )ٍحَدand (. ك. س. ٌ ق:ٌ )عيetc, or multiply it
by three, thus write ( ٍة. ٌ ق. مد. ٌ ق: )ٍحَدand (. ه. ض. ٌ س:ٌ)عي.
Numbers can also be multiplied by four or five"70.
Encipherment in this method relies on converting letters into
numerical values, then manipulating these numbers using arithmetic
calculations, such as analysing each number into a set of numbers, or
multiplying it, or performing other arithmetic operation, and
converting the result value back into alphabetical letters.
In conclusion, the progress of both arithmetic and algebra among
the Arabs of that era, and the use of what are now called "arabic
numerals", had greatly benefited cryptologists in their work.
Cryptanalysis would most likely not have existed without this
progress. On the other hand, cryptologists, in turn, contributed to this
progress of mathematics. al-Kind , for example has left us a treatise
entitled Ris la f 'isti r al-'a d d al-mu mara71 (A Manuscript on
70
See the treatise Mift al-kun z f ' al-marm z, in ilm at-ta miya wasti r
al-mu amm ind al- Arab, pp. 331-332.
71
A copy of which is held at Aya Sophia Library under number (4830). It consists
of 11 pages, was copied in AH 637, and we have acquired a photocopy of this
treatise.
61
Finding out Hidden Numbers), and ibn ad-Durayhim wrote a book on
Arithmetic ar al-'as ardiyya f al- is b72.
The following table (Table 1.5) shows the prosperity of
mathematical sciences in the first few centuries of Islam:
72
Was mentioned by a - afad in 'A y n al- a r, 95/B.
62
Table 1.5: Prominent Arab mathematicians
Name of scientist Born Deceased Major works
Mu ammad ibn M sa AH 164 AH after 232 ● al- abr wa al-
al- aw rizm AD 780 AD after 847 muq bala - First ever
book on Algebra.
Ya q b ibn 'Is q al- -- AH 260 ● Ris la f 'isti r al-
Kind -- AD 873 'a d d al-mu mara
unayn ibn 'Is q AH 194 AH 260
AD 810 AD 873
bit ibn Qurra AH 221 AH 288 ● Ta mas 'il
AD 836 AD 901 al- abr bil-bar h n
al-handasiyya
(Augmenting Algebraic
Problems with Geometric
Proofs)
Mu ammad ibn bir -- AH 317 ● az-zay
al-Bitt n -- AD 929
Mu ammad ibn Ya ya AH 328 AH 388 ● Kit b f m ya t
al-B za n ab al- AD 940 AD 998 'ilayh al-kutt b wa al-
wafa' umm l
Mu ammad ibn al- AH 354 AH around ● al-kit b al- mi f
asan ibn al-Hay am AD 965 430 'us l al- is b
AD around
1039
Mu ammad ibn al- -- AH 410 ● al-k f wa al-bad wa
asan al-Kar -- AD 1020 al-fa r
al- usayn ibn Abd AH 370 AH 428
All h ibn S na AD 980 AD 1037
Mu ammad ibn A mad AH 362 AH 440 ● Kit b f uruq al- is b
al-Bayr n Ab ar- AD 973 AD 1048
Ray n
Umar ibn 'Ibr h m al- -- AH 515 ● Kit b mu kil t al-
ayy m -- AD 1121 is b
as-Samaw'al ibn Ya y -- AH 570 ● al-B hir
ibn Abb s al-Ma rib -- AD 1175
Mu ammad ibn AH 597 AH 671 ● al-
abr wa al-
Mu ammad a - s AD 1201 AD 1273 muq bala
Na r ad-D n
Bah ' ad-D n al- mil AH 953 AH 1031 ● ul a f al- is b
AD 1547 AD 1622
63
1.5.4 Administration73
Reading the books of earlier civilizations and understanding the
meanings behind the symbols used in their works and sciences was
only one of a multitude of uses of cryptanalysis. The most important
use, however, was in correspondence and records (daw w n). The vast
stretch of the Islamic Arab state and the presence of many
neighbouring nations created the need for correspondence, scribes and
records. Evidently, some of what was written or sent, such as
messages of sensitive nature, ought to have been enciphered as a way
of preventing unauthorized reading. In fact this practice of
encipherment, and the relation between administrative sciences and
cryptology among the Arabs require a separate study. We have limited
ourselves in this brief review to the most remarkable aspects of the
role of administrative sciences in promoting cryptology.
The researcher of the works of administrative scientists notices
that most of them refer to cryptology, either in their compilations on
administration, or in books or treatises specifically devoted to
cryptology. The following table (Table 1.6) lists the most eminent
scientists in this field and their major works containing references to
cryptology or elaborating on the subject, confirming the close
connection between these sciences:
73
The facts presented in this chapter refute beyond any doubt the allegations made
by John R. Walsh of the William Mair Institute in Edinburgh, allegations which
were included in his letters to the historian David Kahn in 1964. There he stated
that the Arabs did not have a science of cryptology, that they had no practical
experience in this field, and that ibn ad-Durayhim, whose treatise was copiously
quoted by al-Qalqa and , may have been a mere fictitious character!! See The
Codebreakers. p. 992.
64
Table 1.6: Some prominent Arab authors on administration
and correspondence
65
a 'i al-ma rifa f al-
'As ad ibn Mu a ab AH 544 AH 606
mu ammay t and Qaw n n ad-
ibn Mamm t AD 1149 AD 1209
daw w n
Abd ar-Ra m ibn AH 550 AH 625 Ma lim al-kit ba wa ma nin
Al ibn AD 1150 AD 1228 al-'i ba.
Ma m d ibn usn at-tawassul 'il in at at-
AH 644 AH 725
Sulaym n al- alab tarassul and Zahr ar-rab f at-
AD 1247 AD 1325
ih b ad-D n tarassul al-bad
Held various offices in the council
'A mad ibn Abd al- AH 677 AH 733
chambers (Divans). He wrote:
Wahh b al-Nuwayr AD 1278 AD 1333
Nih yat al-'arab f fun n al-'adab.
'A mad ibn Ya y al- at-ta r f bil-mu ala a - ar f,
AH 700 AH 749
Umar al-Maqir a - which deals with royal protocol
AD 1301 AD 1348
ih b and related issues.
Mu ammad ibn Tarassul ibn Nub ta, and others.
AH 686 AH 768
Mu ammad ibn
AD 1287 AD 1366
Nub ta
Abd ar-Ra m ibn His historical book al- ibar…, and
Mu ammad ibn AH 732 AH 808 his Prolegomenon which is
ald n AD 1332 AD 1406 considered one of the basics of
sociology.
Al ibn Mu ammad -- -- Maw dd al-bay n, quoted by al-
ibn Abd al-Wahh b -- -- Qalqa and on a large scale.
'A mad ibn Al al- AH 756 AH 821 ub al-'a f in at al-'in
Qalqa and AD 1355 AD 1418
66
This host of scribes and authors who left such numerous
compilations on composition and administration, and whose works
included some discussions of cryptology, however briefly at times,
has made a science out of correspondence, a science with specific
rules, principles and terminology worthy of elaborate study and
consideration. Mu ammad ibn K s n, author of Mift as-sa da
defined this science as: "A science which tackles the problems of the
writer (sender), the written document and the reader (receiver) in the
context of specific protocols, rules and terminology suiting every
group [of correspondents]…"74.
li ibn Abd ar-Ra m n at-Tam m (d. c. AH 103/ AD 722), was
the first to translate the land-tax records from Persian into Arabic. He
was appointed as head of the archives and records (d w n) by
al- a , after the latter became governor (w l ) of Iraq. The records
were written in Persian at the time, which li translated into Arabic
in AH 78 (AD 698). He proposed a set of Arabic terminology for
scribes and book-keepers, which enabled them to relinquish Persian
terminology. All the scribes of Iraq in that time were his disciples75.
Abd al- am d al-K tib ["K tib" stands for "writer" in Arabic]
(d. AH 132/AD 750), on the other hand, was a professional scribe, and
proverbial for eloquence. His "treatises" together make up around one
thousand sheets, some of which have been printed. He was the first to
extend to long elaborate messages, and to use standard opening
statements for chapters of books76.
A mad ibn Y suf al-K tib (d. AH 213/AD 828), was also one of
the superior scribes. al-Ma'm n appointed him head of the archives
and correspondence, then a vizier (minister). He left many written
"treatises"77.
lid ibn Yaz d al-K tib (d. AH 262/AD 876), held the post of
army scribe78.
74
See Mift as-sa ada,1/220.
75
See al-'A l m,3/192.
76
Ibid.,3/289.
77
Ibid.,1/272.
78
Ibid.,2/301.
67
Ab Bakr a - l (d. AH 335 /AD 946), wrote a book entitled Adab
al-kutt b (The Scribe's Manual), which encompassed some methods of
encipherment. He was a prolific author and a distinguished literary
figure, besides being a friend and confidant of three caliphs: "al-R ",
"al-Muktaf ", and "al-Muqtadir"79.
amza ibn al- asan al-'A fah n (d. AH 360/AD 970), devoted the
seventh chapter of his book at-tanb h al Hud at-ta f to two
methods of poetry encipherment; the first: "On a type of enciphered
poetry", and the other: "On algorithms for cryptanalysing enciphered
poetry".
'Is q ibn 'Ibr h m ibn Wahab al-K tib, who lived in the fourth
century of the Hegira (tenth century AD), also mentioned both
encipherment (secret writing, as he termed it) and cryptanalysis, in his
book al-burh n f wu h al-bay n (The Authoritative Guide to
Articulation). He set forth some methods of encipherment, which is
equivalent in today's terminology to "simple substitution", "adding
nulls", and "transposition". He then moved to cryptanalysis and stated
three basic principles, i.e.: frequency of letter occurrence, combination
and non-combination of letters, and the opening statements or
introductory expressions ـــthe important principle of "the probable
word concept".
Ab Hil l al- Askar (d. after AH 395/AD 1005), refered to
encipherment and cryptanalysis in his book D w n al-ma ni, and
included several quotations from the earlier-mentioned book of
amza al-'A fah n .
'As ad ibn Muha ab ibn Mamm t (d. AH 606/AD 1209) was a
vizier (minister), a man of letters, and a superintendent of the archives
and records in Egypt80. He wrote an independent book on the subject
of cryptology, entitled a 'i al-ma rifa f al-mu ammay t, and that
was probably why he made no mention of cryptology in his famous
book Qaw n n ad-daw w n.
It is fortunate to find that al-Qalqa and (d. AH 821/AD 1418)
included in his encyclopedic work ub al-'a f in at al-'in a
whole chapter on cryptology. In this chapter, he elaborated on
79
Ibid.,7/136.
80
See al-'A l m, 1/302.
68
encipherment and its types and methods, explaining those practised
using ancient cipher alphabets as well as self-devised symbols. He,
then, went on to explain in detail the process of cryptanalysis, which
he considered to be the aim and objective of the chapter. He explored
the algorithms needed for solving a cryptogram, as from the
knowledge of fundamentals, to the methods of achieving cryptanalysis
by conjecture. He concluded the chapter with two examples of
cryptograms and the algorithms for cryptanalysing each of them. This
chapter of al-Qalqa and is based for the most part on quotations from
ibn ad-Durayhim's treatise Mift al-kun z f ‘ al-marm z.
This brief reference to the relationship between cryptology and the
administrative sciences such as correspondence, archives, records and
registers undoubtedly demonstrates that the Arabs used cryptography
and cryptanalysis on a large scale. Obviously this short study cannot
encompass excerpts from all the works on the subject; it suffices to
quote ibn Adl n's description, in the fourth rule of his treatise, of his
own practical experience. He says: "…I managed to solve several
messages of this type that I was challenged to solve, and also two
other messages intercepted by some kings. The first cryptogram I
cryptanalysed was intercepted by His Majesty King s , son of King
Ab Bakr ibn Ayy b, the other for his son, King an-N ir, who got
hold of it from some frontiers"81. A similar remark is in the fifth rule:
"…I have seen several forms such as this one, for example the l m
( ) and the alif ( ). Indeed I have seen this in many ciphers…"82.
The objective of those who wrote about cryptology was first and
foremost the cryptanalysis of cryptograms. Their treatment of
cryptology was, therefore, prompted by the goal of understanding
cryptography in order to find solutions to ciphered texts. This is
confirmed by the fact that their works contain many examples and
practical illustrations. It was as if they wanted to lay down a "User
manual" for the benefit of those who wanted to use and practise this
science. This clearly shows that there was a definite need for
cryptanalysis at that time.
81
See his treatise, al-Mu'allaf lil-malik al-'A raf, in ilm at-ta miya wasti r
al-mu amm ind al- Arab,p. 281.
82
Ibid., p. 283.
69
On the other hand, it is interesting to note that a great many works
in this field were only written in compliance with a royal request, or at
the behest of a prominent or influential figure of society. al-Kind , for
example, recognizes this fact in the introduction of his treatise when
he says: "I understand… what you have ordered me to write. You
want a book describing the ways of cryptanalysing ciphered books,
a book that must be both clear and concise. Praised be the Lord that
made you a reason for helping people to one of the great and yet
neglected benefits"83.
We can find much the same turn in another treatise of the same
title: ris la f isti r al-mu amm of Ab al- asan ibn ab ab
(d. AH 322/AD 934). This treatise was also written at the request of
an important personality for more than one reason, as ibn ab ab
says: "You asked me to write for you a book on cryptanalysis…"84.
The book of ibn ad-Durayhim was written for a similar reason, as
he says: "Who must be obeyed, and whose request cannot be refused,
asked me to write this book. I have thus put down what came to my
mind of the rules and regulations of this art, and I have written this
preface in order to explain the structure of the book and facilitate its
comprehension.. I have called my book Mift al-kun z f ‘
85
al-marm z" .
This was essentially the same motive of ibn Adl n who wrote a
book on the subject hoping to join the entourage of King al-'A raf, and
used the name of the king pleasantly in rhyme with the rest of the title.
He said: "This is addressed to our sultan King al-'A raf Mu affar
ad-D n M s … My wish is to become a member of the retinue of our
king. I have therefore composed this introduction on cryptanalysing
the interpretation, and called it al-mu'allaf lil malik al-'A raf… I pray
God that he may take pleasure in it and find it suitable to his
purposes…"86.
83
See al-Kind 's treatise on cryptanalysis, p. 118.
84
See the "Collected Papers on Cryptology", p. 48/B.
85
See Mift al-kun z, in ilm at-ta miya wasti r al-mu amm ind al- Arab, pp.
321-322.
86
See the treatise of ibn Adl n, in ilm at-ta miya wasti r al-mu amm ind
al- Arab, pp. 268-270.
70
One of the links between the administrative tasks of archives and
cryptology was a position known as "scribe of confidence", who was
the equivalent of today's secretary general. He was the head of the
office of composition and writing, upon which al-Qalqa and has
expatiated in the fifth section of the introduction to his Encyclopedia
"on the rules and regulations of the office of composition, its structure,
and the conduct of its clerks", dedicating several chapters to this topic.
The first of these chapters was in "defining the position and rank of
the head of this office; his prominence, privileges and current and old
title". The second was in defining "the character, manners, and
behavior of the head of this post"87.
The scribe of confidence has enjoyed an extremely high status.
al-Qalqa and wrote: "His rank in our times is a very noble rank, and
his status is the greatest of all. He is the keeper of the secrets of the
State. His opinion is highly regarded in the matters of the state, and he
is trusted with its missions. To him all correspondence is addressed,
and from his office flow all messages, edicts and mandates. His
signature on all messages is as highly considered as that of the
sultan…"88 and that is why he received high wages and grants. This is
confirmed by al-Qalqa and in his chapter entitled: "The honorariums
awarded by the Sultan to the members of his government". "As for the
scribe of confidence", says al-Qalqa and , he receives two weights
( ُ )ٍثقاالof gold each day. He also has two feudal estates, from which
he receives sizable revenues. He also claims tax fees on many services
and utilities. Both the scribe of confidence and the judge of judges
(supreme judge) are granted each year a mule with its saddle and
harness, in addition to a roll of cloth, which is granted to all senior
members of the state"89.
* * *
In conclusion, the progress in cryptology reached its peak during
two distinct periods. The first period was associated with the great
translation movement from the then current and ancient languages into
87
See ub al-'a ,1/101-110.
88
Ibid,1/102.
89
Ibid., 5/205.
71
Arabic, and the creation of the diw n and the profession of scribes and
administrators. Among the pioneers of cryptology during that period
were al-Kind , ibn Wa iyya, and later Is q ibn Wahb al-K tib. This
first period spanned the third and fourth centuries of the Hegira (ninth
and tenth centuries AD).
The second period coincided with the disintegration of the Arab
state into regional kingdoms in Iraq, Syria, Palestine, Egypt and North
Africa. The partition of the State weakened it considerably, and the
time came for the invasions of the Mongols from the east and the
Crusaders from the west. The main use of cryptology during that
epoch was in political correspondence. The most famous cryptologists
of that period were ibn Dunayn r, ibn Adl n and ibn ad-Durayhim.
This period spanned the seventh and eighth centuries of the Hegira
(thirteenth and fourteenth centuries AD).
Thus cryptology was obviously not created by chance during the
course of Arab history, nor was it an alien science to the Islamic Arab
civilization. It was, rather, through undergoing a number of scientific
circumstances as well as practical necessities that cryptology was born
and eventually developed to a highly advanced level. The scientific
circumstances proceeded from the progress of the four above-
mentioned sciences; and the practical necessities includied
civilizational needs (through the influence of the translation
movement), and war politics.
The following (Figure 1.1) is a tabular summary featuring, in a
chronological sequence, the most prominent figures in the four
sciences, i.e. cryptology, language, administration and mathematics:
72
73
74
Chapter 2
75
76
2.1 al-Kindi's Biography
Ya q b ibn Is q ibn a - ab ibn Imr n ibn 'Isma l al-Kind ,
Ab Y suf, was born in al-K fa, where his father was an emir
(governor) during the reign of the Abbassid caliph al-Mahd .
Biographical sources do not mention the year of his birth, but one of
them guesses that his birth was in AH 185/ AD 801. He was raised in
al-Ba ra then moved to Baghdad, where he received most of his
education, excelling in medicine, philosophy, arithmetic, logic,
geometry, astronomy, and other branches of science of the time. He
built up a large library, which was named al-Kindiyya. ibn an-Nad m
described him as: "a great figure of his time, who excelled over all in
his knowledge of all ancient sciences. He was known as the
philosopher of the Arabs". He is still known by this title to Eastern
and Western scientists.
al-Kind came into contact with the Abbassid caliphs and gained
their respect. He particularly enjoyed the benevolent favour of al-
Ma'm n, al-Mu ta im, and his son 'A mad. al-Ma'm n entrusted him
with the management of Bayt al- ikma (House of Wisdom, the well-
known scientific institution of al-Ma'm n) and the translation into
Arabic of the works of Aristotle and other philosophers. He was even
regarded by Ab Ma ar al-Falak in his book al-Mu akkar t as one
of the most skilled Muslim translators. He was also appointed by
al-Mu ta im a mentor of his son 'A mad, to whom al-Kind dedicated
many of his treatises. He later fell victim of vicious rumors which
brought about the wrath of the caliph al-Mutawakkil. He was beaten,
and his books confiscated. The books were later returned to him just
before the death of the caliph. al-Kind died in AH 260/ AD 873.
His works
al-Kind has left us an enormous intellectual legacy in the various
fields of knowledge and science. His works amount to two hundred
and ninety books and treatises, according to Dr. Umar Farr in his
book afa t min ay t al-Kind wa falsafatih (Memorable pages in
al-Kind ’s life and philosophy). The followings is a brief list of his
works restricted to only one work for each of the fields explored by
al-Kind :
77
1. Philosophy: al-falsafa al-' l f m d n a - ab iyy t wa
at-taw d.
2. Logic: a treatise f al-mad al al-man iq bist f ' al-qawl f h.
3. Mathematics: a treatise f 'isti r al-'a d d al-mu mara.
4. Geometry: a treatise f ' wu d n 'ab d ma bayn a -n ir
wa markaz 'a midat al- ib l wa uluu 'a midat al- ib l.
5. Medicine: a book f ma rifat quwa al-'adwiya al-murakkaba.
6. Dialectic: a treatise f ta b t ar-rusul alayhim as-sal m.
7. Psychology: a treatise f anna an-nafs awhar bas ayr d 'ir
mu'a ir f al-'a s m.
8. Politics: ar-ris la al-kubr f as-siy sa.
9. Law: his first, second and third treatises il in at al-'a k m
bitaq s m.
10. Evolution of knowledge: his treatise f 'asr r taqaddum
al-ma rifa.
11. Geography: his treatise f 'ab d mas f t al-'aq l m.
12. Events: his treatise f al illa al-f ila al-qar ba lil-kawn wa
al-fas d f al-k 'in t al-f sidat.
13. Astronomy: a treatise f anna al- ana ir wa al- irm al-'aq
kurayyat a - akl. (Earth and other objects are spherical)
14. Music: a treatise f al-mad al 'il in at al-m s q .
(Introduction to the Art of Music)
15. Poetry: a book f in at a - i r. (On the Art of Poetry)
16. Language: his treatise f al-lu a.
17. Chemistry: his treatise f m yu ba fayu lawn.
90
See his treatise, p. 170.
91
al-Fihrist, p.21.
79
2.2 Analysis of al-Kindi's Treatise on
Cryptanalysis
This treatise is the oldest work on cryptology we have come across. It
was written at the beginning of the third century of the Hegira (ninth
century AD). The treatise, in its scope and depth, has all the makings of a
scientific and methodical research in this field. It marks the foundation of
a science, with its own principles and methodology. The treatise reveals
the basics that ought to be mastered before embarking upon
cryptanalysis.
This is not unexpected, for the author of this treatise was a very
learned and versatile scientist. He held very important scholarly
positions. Indeed he was the mentor of caliphs, the owner of
"al-Kindiyya" Library, and the director of "bayt al- ikma", the greatest
known scientific institution in the Arab Islamic civilization at the time. It
was only natural, therefore, that his treatise became a reference for the
researcher in this field during a period extending until the middle of the
eighth century of the Hegira (14th century AD). ibn Dunayn r (d. AH 626/
AD 1229), relied heavily upon this treatise in his work Maq id al-fu l
al-mutar ima an all at-tar ama92, and so did ibn ad-Durayhim (d. AH
762/AD 1359), who benefited from the treatise in his classification of the
methods of encipherment in Mift al-kun z f al-marm z.
For some reason, the treatise fell into oblivion for quite a long period,
where it remained hidden and unknown, and it was not quoted after the
eighth century of the Hegira (14th century AD). Even the great historian
of cryptology David Kahn, who attributed the birth of the science of
cryptology to the Arabs, was not aware of its existence and never referred
to it. He was only aware of what was quoted by al-Qalqa and (d. AH
821/ AD 1418) in ub al-'a , from ibn ad-Durayhim. This state of
affairs continued until our research team attained success in finding the
actual treatise in as-Sulaym niyya Library in Istanbul. We resolved to
edit it, along with other treatises we have discovered. al-Kind 's treatise
on cryptology served as the most important factor in revealing the history
of Arab cryptology, and re-writing the history of cryptology altogether.
92
ibn Dunayn r's treatise will be analysed and edited later.
80
Structure of the treatise
al-Kind opens his treatise by introducing his work as "a book
describing the ways of cryptanalysing ciphered books, a book that
must be both clear and concise"93. And he does exactly that in his
treatise. He mentions the principles and methods relating to both
cryptography and cryptanalysis in a way that covers the subject,
penetrates its secrets and reveals its mysteries. He achieves this in a
perfect order and obvious concentration, even though it may not be
evident at first glance. For this reason we opted to divide the treatise
into five chapters. Such division will help the reader follow al-Kind
step by step, and allow him to analyse these steps and understand
them clearly. These chapters are:
1. Algorithms of Cryptanalysis.
2. The Major Types of Encipherment.
3. Algorithms for Cryptanalysing Certain Types of Encipherment.
4. Arabic Letters: Their Order and Frequency of Occurrence.
5. Letter Combinations in Arabic.
93
See his treatise, p. 118.
94
See his treatise, p. 120.
81
2.3 Algorithms of Cryptanalysis
al-Kind discusses, in what we have called the first chapter, the
principles of cryptanalysis. He lists three principles related to prose,
which are:
1st. The quantitative characteristics of letters (which he calls the
quantitative expedients): They include determining the
frequency of occurrence of letters in a given language and the
order of letter frequency. al-Kind explains a method of
deducing this frequency. He concludes that the use of this
statistical method is contingent upon the length of the text, and
he explains how to use this method.
2nd. The qualitative characteristics of letters (the qualitative
expedients): This is based on the knowledge of the
association and dissociation of letters of the alphabet. He
explains when and how to use this stratagem. He, then, goes
on to list the most frequent two-letter words in the Arabic
language, such as: ال، ٍا، ٌ ى، ٍِ ، and the three-letter words
such as: مَا، عيي،…
3rd. The probable word (which he calls introductory expressions or
opening statements and honorary titles): This varies according
to the language of the text. In Arabic, for example, the opening
statement often used is: " ٌَ( "تسٌ اهلل اىسحَِ اىسحIn the name of
God the Compassionate and the Merciful).
He explains how to use these methods, and points out that there are
other expedients which can be deduced from these principal
expedients, and which he will later develop.
82
It is worth noting that the concept of using the frequency of
occurrence of letters in the language to be cryptanalysed was not
introduced in the West until the fifteenth century, when L.B. Alberti
wrote his first treatise on cryptanalysis95. Furthermore, the concept of
"the probable word" was also unheard of in the West until the
sixteenth century, when Porta wrote his treatise on cryptology96.
95
See David Kahn's The Codebreakers, p. 127.
96
Ibid., p. 140.
83
Figure 2.1: The principles of cryptanalysis
Quantitative expedients:
Frequency of occurrence
-of single letters
- of bigrams
Qualitative expedients:
- Association and dissociation of letters
Prose - bigrams
- trigrams
Probable word:
- Opening statements.
- Honorary titles.
Poetry
Rhymes.
84
Figure 2.2: al-Kind 's model of ciphering process
Language
Words
Vowels
Letters
Mute
Ciphering method
Symb ols(1)
Letters chosen from words according to
a specific method or relation.
Invented symbols.(2)
(1)
Which are used in a specific correlation with the corresponding letters, according
to the ciphering method.
(2)
Note: al-Kind had not included the numbers as "symbols", as others did after
him.
85
2.4 The major types of encipherment
al-Kind discusses, in what we have called the second chapter, the
principal types of encipherment which he probably deduced, entirely
or partially, from the enciphered texts he came across or studied in his
private library or in "bayt al- ikma". al-Kind had ample opportunity
to encounter enciphered texts in some of the books of ancient and
contemporary civilizations. From such texts, he derived a complete
methodology for cryptanalysis.
He gives us in this treatise the essence of his experience in splendid
brevity, presenting the ciphering methods in succession. He then
corroborates his explanation by drawing a tree-diagram in order to
help us understand this classification. Such form of clarity of
presentation can only illustrate al-Kind 's dedication for accuracy in
teaching and explaining. He says: "Let us represent all these methods
in a tree-diagram, so that all our senses participate in understanding
this craft, and facilitate its comprehension…"97.
Figure 2.3 presents a summary of this diagram, assigning a number
against each type and method of encipherment, for ease of reference.
97
See his treatise, p.142.
86
Figure 2.3
(2) (1)
Super Encipherment Simple Encipherment
(4) (3)
98
For ease of reference we use here the same numbers assigned to the methods in
the foregoing diagram (Figure 2.3).
88
al-Kind at this point mentions one of the potentials of this
method (16), which is replacing each frequent bigram
with one symbol, such as the bigrams: ُ أ، ٍِ ، أو، ٍا،ال
…etc… in the Arabic language. The encipherment of these
bigrams can be accomplished in several ways: one can
either invent one symbol representing both letters, or two
different symbols if we consider each letter as a unit, and it
is possible to use both methods. We can give the following
example to illustrate the encipherment of the letters:
… ًٍِ أه أ …ُ ً أ ب ت…ه
…λ η ζ …δ β Ω …Ψ Φ Σ
Thus, to encipher the statement: ( ِ)ٍِ ٍْا أٍتِ اىَت, which
contains some of the above mentioned bigrams, we would
have several possibilities:
The cleartext (Arabic) ِاىَت ِأٍت ٍْا ٍِ
The first possibility δΨβη δΨβΣ Σζ ζ
The second possibility δΨβΩΣ δΨλ Σδβ δβ
Another example; to encipher the statement: (an angry
man), we have:
a b c … g m n r y … an in …
Σ Φ Ψ… Ω β δ ζ λ… η Ч…
The cleartext (English) an angry man
The first possibility Σδ ΣδΩζλ βΣδ
The second possibility η ηΩζλ βη
al-Kind 's reference to these possibilities is the true
beginning of the encipherment by bigrams, (or what is now
termed: Digraphic Cipher). Coupled with Monoalphabetic
Simple Substitution, it is more difficult to cryptanalyse than
Simple Substitution alone. An extension of this principle
and its implementation on all bigrams is known today as
"Porta's digraphic system"99.
99
See David Kahn, p. 139.
89
al-Kind then mentions another possibility of this method,
which is the encipherment of a single letter by two
joined symbols, when he says: "by replacing a single letter
by two joined symbols"100. He later explains its
cryptanalysis algorithm by saying: "If you suspect the
cryptogram is enciphered by this method, that is using two
joined symbols for one letter, then you have to count the
number of symbols in the cryptogram…"101.
al-Kind did not elaborate further on this method to reach
the rectangle (4x7) of the letter of the Arabic alphabet, or
the square (6x6) with eight nulls. The following example
demonstrates one of the methods of applying al-Kind 's
concept to the English alphabet. Using a table of (4x7), i.e.
26 letters and two nulls,
2nd Symbol Δ Σ Φ Ψ Ω δ θ
st
1 Symbol 1 2 3 4 5 6 7
λ 1 A B C D E F G
φ 2 H I J K L M N
η 3 O P Q R S T U
β 4 V W X Y Z
100
See his treatise, p. 134.
101
Ibid., p. 150.
90
Transposition by changing the position of the letter in
relation to the surrounding letters or within the same
line (19): al-Kind reviews some examples of this method,
such as:
1 2 3 4 5 6 7 8
Cleartext
D E C I P H E R DECIPHER
8 7 6 5 4 3 2 1
Ciphered text
R E H P I C E D REHPICED
which is now called "reversed horizontal transposition",
or:
2 4 6 8 7 5 3 1
Ciphered text
E I H R E P C D EIHREPCD
which is known today as "alternate horizontal
transposition", or:
2 4 6 8 1 3 5 7
Ciphered text
E I H R D C P E EIHRDCPE
which is constructed starting by even characters followed
by odd ones within each word, or:
8 5 7 6 4 1 3 2
Ciphered text
R P E H I D C E RPEHIDCE
In addition, al-Kind explains transposition within several
words, or within a whole line. He cites four examples on
the subject, which can be explained by enciphering the
expression: "Mary had a little lamb" as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
The order of the cleartext
M A R Y H A D A L I T T L E L A M B
Ascending Alternate 1 3 5 7 9 11 13 15 17 18 16 14 12 10 8 6 4 2
Horizontal encipherment M R H D L T L L M B A E T I A A Y A
Ascending Reversed 2 4 6 8 10 12 14 16 18 17 15 13 11 9 7 5 3 1
Horizontal encipherment A Y A A I T E A B M L L T L D H R M
Descending Alternate 18 16 14 12 10 8 6 4 2 1 3 5 7 9 11 13 15 17
Horizontal encipherment B A E T I A A Y A M R H D L T L L M
Or:
91
Descending 17 15 13 11 9 7 5 3 1 2 4 6 8 10 12 14 16 18
Reversed Alternate M L L T L D H R M A Y A A I T E A B
Horizontal
encipherment
Ciphered text
or
Ciphered text
The second: Without changing the position of the letter
(18): This can be accomplished by one of the two following
methods:
By adding insignificant letters –nulls- (21): These must not
be vowels, and this is another indication of al-Kind 's deep
understanding of the problems of cryptography, for
example:
Cleartext EUREKA
92
B. Changing the forms of letters with relationship and diffusion (5):
The type of relationship and diffusion resembles what is called
today "using a key" (the now standard key-dependent
encryption). Some of the methods that al-Kind classifies under
this type can be described as substitution using more than one
symbol for each letter (homophones). The relationship can be
explained by linking each letter to an animal or a plant, or a
species or genus. The diffusion means that one letter in the
cleartext corresponds to several letters (a word) in the
cryptogram. al-Kind divides this method into two variants:
1. Relationship by species (8): The encipherment is accomplished
by replacing each letter by a single name (9) or by many names (10).
2. Relationship by genus (7): The encipherment is done by
replacing each letter with many names belonging to a specific
genus. al-Kind also indicates that there may be another
purpose in using this method, which consists of not
considering the letter representing the genus itself, but rather
one of the letters of the name, according to a specific key,
such as using the first letter, or the second, or the last, or the
second last, etc… This method, of course, can no longer be
classified under simple substitution. These three methods are
illustrated below, with recourse to examples drawn from ibn
ad-Durayhim's treatise Mift al-Kun z:
The word (Gold) can be enciphered according to the method
no.(10) as follows:
Cleartext G O L D
Relationship Gender Ornament Liquid Detergent
Ciphered text Wash a woman's ring in water and Tide
PARRAKEET
FLAMINGO
SPARROW
SEAGULL
SEAGULL
FALCON
MACAW
PIGEON
PIGEON
EAGLE
EAGLE
EAGLE
HAWK
HAWK
102
See his treatise, p.142.
95
2.5 Cryptanalysis of Certain Types of
Encipherment
After discussing the various methods of encipherment, al-Kind set
out to formulate algorithms for cryptanalysing them. Thus he
delineated stages for cryptanalysing by turning to the methods
-expedients- he mentioned right at the beginning of his treatise. His
algorithms, seven in all, we clearly highlighted in the edited text and
its English translation in boldface type. His presentation is so clear to
the degree that any listing of them here would be redundant. Yet some
comments demonstrating the significance of al-Kind 's contributions
in this chapter are in order:
1. al-Kind discovered and explained the importance and use of the
frequency of occurrence of letters (statistical methods) in
cryptanalysing many methods of cryptography.
2. He brought forward the importance of the frequency of
occurrence of bigrams -contact count- which he termed: the
relative frequency of the use of letters that link.
3. He took a broad perspective of cryptanalysing algorithms, that
can be described as abstract and mathematical. This is
manifested through the way he treated cryptanalysing a
cryptogram of "conceptual relationship and diffusion" -with key
and expansion of the number of characters-. He referred the
reader to algorithms dealing with simple substitution, whereby
names of species and genera are replaced by symbols. He,
analytically processed these symbols using frequency analysis
and contact count. In his fifth algorithm he says: "…. Otherwise,
species and genera are substituted for the invented altered forms
not attributed to any letters, where the afore-stated technique has
been employed".103
4. al-Kind 's extensive knowledge and deep insight in cryptology
are clearly manifested in his comments regarding the
cryptanalysis of the composite type and its numerous methods:
103
See his treatise, p. 158.
96
"because composition -of simple methods-, owing to the
plethora of types amenable to composition, tends to produce
quite a wide variety which is unfeasible to explain in the space
allowed here, particularly when our aim -in this treatise- is
brevity and compactness. The technique of cryptanalysing
composite ciphers lies in the application of all the expedients
and algorithms already explored… composite cipher is the most
intricate to detect of all types of encipherment."104
Had al-Kind carried his research in this respect still further, and
dilated upon composite encipherment, he would have added amply to
his already remarkable accomplishments in this science.
104
See his treatise, p.164.
97
2.6 Arabic Letters: Order and Frequency of
Occurrence
al-Kind had already discussed orders of letter occurrence in usage
at the opening of his treatise. He stressed the need for finding these
frequencies as a requisite for cryptanalysis, and indicated that they
differ from one language to another. He then went on to list the
frequency of letter occurrence in the Arabic language by carrying out
an actual count himself and tallying his results. This is the first known
statistical analysis of its kind in the history of computational
linguistics. It is likely that he made use of earlier statistics concerning
the letters of the Holy Koran, which might have influenced his interest
in the phenomenon of letter orders.
It is well worth mentioning here his comments on the results of his
own statistical data, for the letter ( )هtook precedence over the letters
(ً) and ( )وdespite "that vowels are naturally far more frequent in all
languages".105 This fact has been established by later linguistic studies
conducted in all languages.
al-Kind emphasized it already, defining the exact meaning of
vowels as including the three long (or major) vowels, as well as the
three short (or minor) vowels. Short vowels, however, do not appear
in Arabic writing –a justification for the higher frequency of the ()ه
over the ( )وand the (ً). al-Kind carries on to explain the
disappearance of short vowels by analysing the diacritical marks of
the word (Mu ammad). To him, the " amma" is a short ( ;)وand the
"fat a" is a short ()ا. The following table manifests al-Kind 's division
of vowels:
105
See al-Kind 's treatise, p.170.
98
This division was later adopted by Avicenna (ibn S na) in his book:
Asb b ud al- ur f (Causes of letter Occurrence)106. Such
classification of vowels is now being adopted as a basis for the recent
theories in phonetics, where vowels are divided into long and short
vowels.
However, there is another classification mentioned by al-Kind in
the first chapter (Algorithms of Cryptanalysis), where he divides the
letters generally into "vowels and non-vowels"107. He used the term
"mute letters"108 for non-vowels –a term known to the earlier Arab
linguists as "silent letters"109. The term used nowadays for such
"mute" or "silent" letters is "Consonants".
al-Kind concludes this chapter by referring the reader to his book:
F in at a - i r (On the Art of Poetry), in which he seemingly
elaborated these issues. If we were to come upon this valuable book,
so it is hoped, we would add a great deal to the information we have
so far acquired of the linguistic phenomena known at that time.
It should be pointed out that al-Kind 's order of letter frequency
became a source quoted by such later scientists of cryptology as ibn
Dunayn r, ibn Adl n and ibn ad-Durayhim. The following table
(Table 2.1) shows the extent of conformity of letter order of
occurrence amongst them:
106
See Asb b ud al- ur f, pp.84-5, and p126.
107
See al-Kind 's treatise, p.122.
108
Ibid., p.170.
109
See Asb b ud al- ur f, pp.83-4.
99
Table 2.1: Order of letter frequency as given by ibn ad-Durayhim,
compared with al-Kind , ibn Adl n and ibn Dunayn r.
al-Kind ,
Order of letters ibn ad-Durayhim ibn Adl n,
and ibn Dunayn r
1 ا ا
2 ه ه
3 ً ً
4 ً هـ
5 و و
6 ُ ً
7 هـ ُ
8 ز ز
9 س ع
10 ب ف
11 ك ت
12 ت ب
13 ع ك
14 ف د
15 ق س
16 د ق
17 ذ ح
18 ال ج
19 ح ذ
20 ج ص
21 ص ش
22 خ ض
23 ش خ
24 ض ث
25 ش ش
26 ث ط
27 ط غ
28 غ ظ
29 ظ
100
2.7 Letter Combination in Arabic
This chapter is the richest in linguistic material of all the chapters
that comprise al-Kind 's treatise. It bears witness to his early
awareness and full utilization of the linguistic phenomena and laws.
Here he examines word structure, possibilities of word derivation
–issues that fall under the science of the "laws of single words". This
was described by Ab Na r al-F r b in his book: 'I ' al- ul m
(Count of Sciences) when he said (p.5): "The science of the law of
single words scrutinizes first and foremost the letters as concerns their
total number, the place of articulation in the vocal organs, vowels and
consonants, combinable and non-combinable letters, the least and the
largest number of letters needed to make up an intelligible word, the
largest number of combinable letters, and those letters which do not
change in word structure when they are suffixed to form their dual,
plural, masculine, feminine, etc…".
Returning to al-Kind 's treatise, he starts this chapter by setting the
principles for identifying letters which can be combined and those
which cannot.
He thus divides Arabic letters into groups. The first group is the
"basic letters" ( ur f a liyya), sixteen in number, which are always
original (intrinsic) in the words (if they exist). The second group is the
twelve "variable letters" ( ur f muta ayyira), that include the affixing
(z 'ida) ones besides b ب, f ف, and k ك. The variable letters may either
occur as basic (original or intrinsic) of affixing added. It is from these
basic and variable letters (when they occur as basic) that roots are
built. al-Kind termed this abstract notion, which is the root, "noun".
When affixing letters (variable) are added, the noun becomes a
"word", and the word is inflected in time, number, femininity,
genitive, comparison, defectiveness and succession by means of
affixing letters appropriate to each meaning; then it becomes "word
inflection".
Next, al-Kind undertakes to discuss the laws governing the non-
combination of Arabic letters. He restricts these laws to "basic letters"
and the letter "s" ( )سof the "variable letters". He then reviews the
letters alphabetically one by one, stating with each letters which are
non-combinable with it.
All this is aptly presented in the form of comprehensible tables,
reflecting credit on al-Kind 's sense of cogency of argument and
101
effective presentation. He then moves to discuss combinable letters
"In the interest of making the statement most explicit"110.
al-Kind enumerated as many as ninety-four non-combinable cases.
This is a truly remarkable achievement of al-Kind in such an early
stage of the history of the study of language structure.
To the best of our knowledge, al-Kind 's work in this regard was
unprecedented; no earlier linguist had done such a striking work
before him.
al-Kind 's broad perspective concerning language structure, letter
types, and the laws regulating their association and dissociation,
demonstrated in this chapter and the previous one, are worthy of an
independent linguistic study now underway.
In this context a recapitulation of his view by the following model
(Figure 2.4) would probably suffice. In presenting this model we shall
have recourse to the simplest rules of system theory that is based on
the analysis of any system in accordance with given inputs, outputs
and laws. While (Figure 2.4) depicts al-Kind 's model of derivation,
Table 2.2 lists all the cases of letter dissociation (non connectivity) as
presented by al-Kind .
110
His treatise, p.200.
102
Figure 2.4: al-Kind 's model of derivation: letter association and dissociation
(3)
"Variable letters" (i.e. affixing letters + k ( b f
(1)
"Basic letters" Rules of Rules of Rules of
association and "noun" derivation "the inflections "word
(2)
dissociation "affixing"
103
Table 2.2: Table of dissociable letters as observed by al-Kind
111
The Codebreakers, p. 93.
105
106
Chapter 3
107
108
3.1 Editing Methodology
The main purpose of editing is the reproduction of a text as
close to the author's original as possible. In line with this
objective we have opted for conserving the statement of the
original whenever possible. The occasional instances of weak
style or toleration in usage have been noted down without any
alterations to the text. This weakness is most likely due to
omissive failure on the part of scribes, and not to the original
copy of al-Kind ; nevertheless, we cannot ignore the possibility
that his style sometimes suffered. However, parts of the texts
found not to be in conformity with standard Arabic grammar
have been duly corrected and set straight.
We have compared the original of al-Kind 's treatise with the
repeated part of it, which takes up to two pages of the
manuscript, i.e. 216/A and 216/B. No attempt has been made to
point out discrepancies between them except where useful, e.g.
to redress an omission or get an expression straight.
We have maintained al-Kind 's small tables summarizing
association and dissociation of letters, that he developed in the
text in much detail. It was his regular practice to mention for
each letter those letters which are combinable with it, followed
by those non-combinable. This is also applicable to the tree
diagram in which he covered all his methods of encipherment.
The diagram has been presented exactly in the form as it
appeared in the original, with the only addition of marking the
methods with numbers for easy reference to the many
ramifications contained in it.
The very nature of the original manuscripts required the
addition -where appropriate- of explicatory titles in the interest
of marking out divisions or classifications. This would prove
useful for easy understanding and clarity of ideas.
No effort has been spared in the interpretation of citations
(Koranic verses, Prophetic traditions, lines of poetry, sayings,
etc.) contained in the treatises. We have given brief
biographical identification of personalities (in footnotes to
Arabic text only), relegating interested readers (in Arabic) to
such authorities as al-A l m by ayr al-D n al-Zirkily or
109
Mu am al-mu'allif n by Omar Ri Ka ala, for more detailed
biographical reference. Those citations and personalities that
our efforts fell short of their proper interpretation or
identification have also been properly noted (in the Arabic
version).
In explaining the linguistic terms included in the treatise we
have made use of various dictionaries, old and modern,
foremost of which are: Lis n al- Arab and Matn al-lu a. Unless
otherwise helpful, no reference has been made to any
dictionary.
Finally, we have adopted the same standard symbols and signs
commonly employed by editors of Arabic manuscripts. We
conformed to the modern spelling norms, and enclosed
requisite contextual additions -i.e. explanatory insertions and
comments other than the writer's own words- within square
brackets [ ]; examples illustrating rules of encipherment have
been set off by round brackets (parentheses) ( ); book titles in
italics. Quoted material and Prophetic traditions have appeared
within quotation marks, while floral brackets have been used to
enclose Koranic verses.112
112
Translator's explanatory additions are marked by placing them between pairs of
hyphens: -…-.
110
3.2 Description of the Manuscript
al-Kind 's manuscripts that was discovered and is edited here, is a
copy of the original. It was found within a large collection of papers,
hand-written in tiny, interlocked, hardly legible script. The collection
consists of 232 sheets in two parts, the first of which includes bit
ibn Qurrah's letters in mathematics and the like, opening with a table
entitled: "index of what we could acquire of ibn Qurrah's books and
treatises in mathematics". On top of the sheet appear two important
statements; one reads: "This treatise was penned by Ab Ali al-
usayn ibn Abd Allah ibn S na, and composed from many other
treatises; God knows best". The other is written on the right side of the
sheet, in a quite different handwriting, and runs thus: "It was said that
this handwriting is that of the chief authority, Sheikh araf al-Mulk
Ab Ali al- usayn ibn Abd Allah ibn S na, God rest his soul…".
This last statement is repeated transversely on the same sheet in
elegant penmanship, with some letters spoilt by damp.
The second part involves numerous treatises by al-Kind ,
beginning with an index headed with the title: "the first volume of the
books and treatises of Ya q b ibn 'Is q al-Kind ; contains sixty
compilations".
al-Kind 's treatise on cryptanalysis is one of the treatises of this
second part. A twelve-page treatise, it occupies a space in the
collection between 59-64 (old pagination) or 211-216 (modern
pagination). Each page comprises 32 lines of around 17 words each.
The treatise includes a repeated part that takes up the last sheet of the
original, i.e. sheet no. 216. The whole collection is housed in the Aya
Sophia branch of as-Sulaym niyya Library as document No. 4832.
Although al-Kind 's treatise is the oldest work ever on cryptology
handed down to us through the generations, it was haplessly doomed
to be copied by a scribe with a poor knowledge of the subject, in
addition to lack of language and scribing skills. This is particularly
evident through the glaring syntactical mistakes, which we have
pointed out individually in their respective places right through the
text. However, it is worthy to note again that al-Kind 's style may have
had its own shortcomings. Figure 3.1 thru 3.4 are photocopies of
selected pages of the handwritten manuscript.
111
Figure 3.1 : A photocopy of the first page of al-Kind 's treatise
(Document No. 4832, as-Sulaym niyya Library, Turkey)
112
Figure 3.2 : A photocopy of the tree diagram of enciphering methods
as appeared in al-Kind 's original
(Document No. 4832, as-Sulaym niyya Library, Turkey)
113
Figure 3.3 : A photocopy from al-Kind 's manuscript, manifesting his
special technique in explaining some non-combinable letters
(Document No. 4832, as-Sulaym niyya Library, Turkey)
114
Figure 3.4 : A photocopy of the first page of the repeated part of
al-Kind 's treatise
(Document No. 4832, as-Sulaym niyya Library, Turkey)
115
Figure 3.5 : A photocopy of the last page of al-Kind 's treatise
(Document No. 4832, as-Sulaym niyya Library, Turkey)
116
3.3 al-Kindi's Treatise on
Cryptanalysis
117
In the name of God
the Most Compassionate, the Most Merciful, and sufficient unto
us is God, the Holy One.
[Introduction]**
*
A mad ibn Mu ammad ibn al-Mu ta im ibn H r n ar-Ra d. One of the Abbasid
caliphs in Iraq. Born in S murr ' in AD 834, recognized as Caliph in AD 862, and
died by the end of AD 866.
**
Square brackets contain a useful addition to the original treatise, and so do all the
explanatory sub-titles within it.
118
I tell you, may God prolong your life, and improve your situation,
that cryptanalysis offers the greatest of advantages, since many
ancient philosophers and scientists used unknown signs in their books.
Those who do not work hand on this task do not actually benefit from
their knowledge, and cannot attain high levels in their scientific
achievements. Had it not been my wish and a sense of duty to help
you attain what you demand with less effort, may God favor your
actions, and may you always achieve your ends, I would have
preferred to follow the path of those [scientists before me] who
believed in concealing the treasures of meanings, rather than revealing
and displaying them. I have been motivated by my awareness that a
large number of books of philosophy that are intelligible to you at a
glance, may be very difficult indeed for a majority of others to
understand in a short span of time, obvious though they might be
when they are studied thoroughly. Consequently I wrote on this
subject what I thought would be reasonably clear to the sons of
wisdom, and out of reach of the uninformed and laymen; may God
bless us with success.
120
[Algorithms of Cryptanalysis]
So we say, the enciphered letters are either in numerical
proportions, that is poetry -because poetic meter, ipso facto, sets
measures to the number of letters in each line-, or they are not. Non-
poetry can be cryptanalysed using either quantitative or qualitative
expedients.
The quantitative expedients include determining the most
frequently occurring letters in the language in which cryptograms are
to be cryptanalysed. If vowels functioned as the material from which
any language is made, and non-vowels functioned as the shape of any
language, and since many shapes can be made from the same material,
then the number of vowels in any language would be greater than non-
vowels. For instance, gold is the material of many shapes of finery and
vessels; it may cover crowns, bangles, cups, etc.. The gold in these
realizations is more than the shapes made of it. Similarly, the vowels
which are the material of any kind of text are more than the non-
vowels in any language. I mean by vowels the letters: "( "اa), "ً" (y or
i or e) and "( "وo or u). Therefore the vowels in any language,
inevitably, exceed in number the non-vowels in a text of that
language. It happens that in certain languages some vowels are greater
in number than some other vowels, while non-vowels may be frequent
or scarce according to their usage in each language, such as the letter
"( "سs), of which frequency of occurrence is high in Latin.
122
Among the expedients we use in cryptanalysing a cryptogram if the
language is already known, is to acquire a fairly long plaintext in that
language, and count the number of each of its letters. We mark the
most frequent letter "first", the second most frequent "second", and the
following one "third", and so forth until we have covered all its letters.
Then we go back to the message we want to cryptanalyse, and classify
the different symbols, searching for the most frequent symbol of the
cryptogram and we regard it as being the same letter we have marked
"first" -in the plaintext-; then we go to the second frequent letter and
consider it as being the same letter we have termed "second", and the
following one "third", and so on until we exhaust all the symbols used
in this cryptogram sought for cryptanalysis.
It could happen sometimes that short cryptograms are encountered,
too short to contain all the symbols of the alphabet, and where the
order of letter frequency cannot be applied. Indeed the order of letter
frequency can normally be applied in long texts, where the scarcity of
letters in one part of the text is compensated for by their abundance in
another part.
124
Consequently, if the cryptogram was short, then the correlation
between the order of letter frequency in it and in that of the language
would no longer be reliable, and thereupon you should use another,
qualitative expedient in cryptanalysing the letters. It is to detect in the
language in which cryptograms are enciphered the associable letters
and the dissociable ones. When you discern two of them using the
letter order of frequency, you see whether they are associable in that
language. If so, you seek each of them elsewhere in the cryptogram,
comparing it with the preceding and following dissociable letters by
educing from the order of frequency of letters, so as to see whether
they are combinable or non-combinable. If you find that all these
letters are combinable with that letter, you look for letters combinable
with the second letter. If found really combinable, so they are the
expected letters suggested by the combination and non-combination of
letters, and also by their order of frequency. Those expected letters are
correlated with words that make sense. The same procedure is
repeated elsewhere in the ciphertext until the whole message is
cryptanalysed, Deo volente.
126
It is of paramount importance in any language to know those letters
most frequently combinable, and use them as a clue, such as the
combination, in Arabic, of the letter (a) " "اwith the letter (l) " "هand
vice versa, as in the word " "االand the word " = اىنتةthe books"; also
the combination of the letter (ً) with the letter ( )اas in ";"ٍا
the combination of the letter ( )هwith the letter (ً) as in "ٌ;"ى
the combination of the letter (ً) with the letter (ُ) as in "ٍِ";
-BIGRAMS-
the combination of the letter ( )عwith the letter (ُ) as in "ِ;"ع
the combination of the letter ( )أwith the letter ( )وas in ";"أو
the combination of the letter ( )هwith the letter ( )وas in ";"ىو
the combination of the letter ( )ثwith the letter (ً) as in "ٌ;"ث
the combination of the letter ( )كwith the letter (ً) as in "ٌ;"م
the combination of the letter ( )عwith the letter ( )هas in ";"عو
the combination of the letter ( )سwith the letter (ً) as in "ٌ;"س
-TRIGRAMS-
and the combination of the letters: ()ع, ( )هand ( )ىin ()عيي,
and the combination of the letters: ()ك, (ً) and ( )اin ()مَا,
and the like. The sensible utilization of these bigrams and trigrams
will quite likely serve as a lead-in to the discovery of the enciphered
letters through the application of the two resources, i.e. the order of
frequency of letters, and the phenomenon of association and
dissociation of letters.
Another clue in cryptanalysis is to know what is commonly used in
each language as honorary opening statements and expressions -the
probable word-. In Arabic, for instance, the opening ٌَتسٌ اهلل اىسحَِ اىسح
(In the name of God, the Compassionate, the Merciful) is in common
use, and its constituent letters can be used as a guide throughout the
cryptogram. But then opening statements do not apply to all kinds of
messages; a message written in poetry, for example, is normally
destitute of ٌَتسٌ اهلل اىسحَِ اىسح. Therefore, if all the above clues seem to
apply except that of the introductory statement, this last-mentioned
possibility is ignored as irrelevant; otherwise there will be good reason
to ascertain that the already expected letters are indeed the very letters
sought.
It is believed that getting to know each letter of a cryptogram will
facilitate its cryptanalysis. By permuting the vowels with each of the
non-vowels, and combining each non-vowel with the nearest of the
vowels, and then linking all these together, the plain-text will show.
128
As for the cryptanalysis of poetry, ciphered verses are determined
by their rhymes. You count the number of letters in a verse and then
compare them with all the poetic meters (feet) known in Arabic. Next,
the expedients already stated for cryptanalysing letters in prose
cryptograms are here utilized, applying them to the metrical feet. If
they apply, you presume that they are the expected words, if not you
use another expedient and apply them again to the metrical feet. You
repeat this practice several times until you have seen the feet falling
into place.
These are the primary algorithms of cryptanalysis, from which
many offshoots may emanate on closer application.
For this topic to be easier in our language to manipulate, we put
forward in this treatise the order of frequency of Arabic letters, the
combinables and non-combinables in anterior and posterior (pre-and
post-) positions. This will make the needed data at hand for those who
go the way of cryptanalysis. May God favor our actions.
* * *
130
[The major Ciphering Methods]224
Before studying the order of frequency of letters, we ask: how
many major types are there for enciphering letters? We say, there are
two major types: i.e., simple encipherment and composite (super-)
encipherment.
The SIMPLE encipherment(1) falls into two parts: either simple
encipherment where letters change their forms(3), or simple
encipherment where letters retain their forms(4).
Simple encipherment where letters change their forms(3) is divided
into two categories: the one is with conceptual relationship and
diffusion (ar-rib wa ar )(5), the other is without conceptual
relationship and diffusion(6).
That with relationship and diffusion can be either relation by
species(8) or relation by genus(7). In each case the symbol indicative
of a letter may be either one or numerous symbols. By one I mean to
code the letter ( ), for instance, by the symbol of a single bird such as
a pigeon. By numerous is meant to code the same letter ( )طby the
symbol of any bird, since the bird species include all genera of birds
and relates to all shapes of birds.
The other category -of simple encipherment where letters change
their forms-, i.e. without relationship and diffusion(6), splits up into
two sub- categories: either by changing the forms of letters -simple
substitution(11)- or by keeping the forms of letters(12). -transposition-.
224
-The reader is recommended to have constant recourse to al-Kind 's tree diagram
(p.87) so as to mark his/her place and not get lost in the mass of ramifications.-
132
Encipherment by changing the forms of letters is done in two ways:
(a)-monoalphabetic-(13), using in the cryptogram the same letters as
those of the plaintext, but with the form of one letter borrowed
to another; e.g. borrowing the form of the letter (B )بto denote
(A )اand the other way round.
(b) by using a cipher alphabet of devised shapes or symbols not
having the usual forms of letters -substitution by symbols(14)-.
This last-mentioned can be performed EITHER:
(1) by replacing each letter by one symbol (15) -monographic
cipher-; or (2) by replacing each frequent bigram with one
symbol, such as the bigrams: ٌ ف،ِ ع،ُ أ،ٍِ ،ٌ ى، أو، ٍا، الetc. and
by replacing a single letter by two joined symbols -digraphic
cipher-(16). This practice of replacement may be exercised on all
or only some of the letters.
Simple encipherment by keeping the forms of letters(12) has two
types: the one is changing the positions of letters(17); the other is
without changing it(18).
134
Encipherment by changing the positions of letters(17) is divided
into two methods:
1. Transposition by changing the position of letter in
relation to the surrounding letters, I mean in anterior
and posterior positions(19).
2. Transposition by changing the position of letter in
relation to itself, where the letter retains its form and
position among other letters, but changes the angle of
its set-up, such as writing it in reverse or upside
down(20), etc.
As for changing the positions of letters in anterior and posterior
positions, you may start with the last letter -of, say, a name- and
proceed with the others in reverse order -nowadays called "reversed
horizontal transposition"-; OR you place the first letter of the name in
the place of the last letter, the second in the place of the first, the third
after the first, the fourth after the second, and so forth until the letters
are over -a method called in today's terminology "alternate horizontal
transposition"-; OR, if you keep the last letter in its original place, you
place the second in another position of the name, the third follows the
last, the fourth after the second, and so on until all the letters are used;
OR you start by putting the first letter somewhere -on the line-, the
second takes the place of the last in the name, the third goes after the
first, the fourth follows the second.
Transposition may start by the last letter. It may also start with
either sides, with the second following it, the third follows the first in
posterior position, the fourth follows the second in posterior position,
et cetera till the end of message. This last method may be built in
reverse order. -see examples on p.91. All the above methods are
transposition.-
136
In connection with enciphering without changing the positions of
letters(18), there are two methods: EITHER by adding insignificant
letters -nulls- that must not be vowels(21), OR by omitting one (or
more) letters(22).
As for adding nulls that are not vowels, this has two divisions: the
null may be either one or many.
Now the other part of simple encipherment without changing the
shape of letters -i.e. where letters retain their forms (4) is achieved by
means of two principles: one is quantitative(25), the other is
qualitative(26).
The quantitative principle (25) divides into two subdivisions: one
is to double the letter or triple it, or otherwise duplicate it; e.g. by
representing (A )اby (AA )ا اor (AAA )ا ا ا, etc. This duplication may
cover all or some of the letters.
138
The other subdivision of the quantitative principle is to merge all
the letters that can be merged (28), e.g. the Arabic letters: b ب, t ت,
and ثthat have a single shape in common. This may either apply to
all of them, or only to some.
The qualitative principle (26), on the other hand, can be
accomplished either by linking all or some of the letters that are
inherently separate, or by separating all or some of the letters that are
inherently linked.
140
The other major type of the encipherment of letters, viz.
COMPOSITE (or super-) encipherment(2) is made up of all the
aforementioned simple methods. You only have to find two or more
methods of them that can be combined. What applies to any method of
simple encipherment also applies to the corresponding method in
composite encipherment. In order to avoid fruitless prolixity, and
despite the frequent use of composite encipherment, thorough
knowledge of simple methods will render superfluous the exposition
of all composite methods.
Let us now represent all these methods in a in a tree-diagram, so
that all our senses participate in understanding this craft, and facilitate
its comprehension by the good assistance of the Almighty, and to Him
we entrust our souls.
142
Encipherment of letters divides into two parts:
(2) (1)
Super or Composite Encipherment Simple Encipherment
(4) (3)
225
This is No.14 in the tree diagram (p.87) and its two subdivisions Nos. 15 and 16.
-Henceforth, reference to the number of type in question as appears in the
diagram, will be made then and there if need be.-
226
Namely, in the context of discussing the quantitative and qualitative algorithms
of cryptanalysis; see pp.122-130.
146
If the matching process brings about meaningful words, so these
will be the target bigrams.
Sometimes two or three words happen to be possible for the
cryptanalysed symbols. For example, if the word ( )قدhappens to go
between ( )إّهand ( )ذهة, you get the result ( )إّه قد ذهة. Now suppose
that the word ( ٌ )ىhappened to be instead of ( )قد, in which case the
product to infer would be: ( )إّه ىٌ ٍرهة. Similarly, the word ( ِ)ى
produces: ( )إّه ىِ ٍرهة. If this happens then pursue elsewhere in the
cryptogram the same letters already made out, including the letter that
you seek to cryptanalyse, which is matched against all the combinable
letters one by one. If thus you get a meaningful word, then you decide
that it is certainly the letter sought. If, however, you get more words
than one, you keep repeating the previous technique time and again
until you obtain one single word. Next, you test this on one or two
places of the cryptogram. If you see that production of meaningful
words is sustained in all places, you expect, with good reason, that the
word you get finally represents the ciphered bigram. A supporting
evidence here is the use of the frequency of occurrence of letters; it is
an additional and strong guide in this process.
The order of frequency of occurrence of Arabic combinable letters
will be given when we study the order of letters.
148
This type -i.e. substitution- can also be enciphered by replacing
each letter with two joined symbols. If you suspect the cryptogram is
enciphered by this method, that is using two joined symbols for one
letter, then you have to count the number of symbols in the
cryptogram. Should this be found in excess of the number of letters of
the language concerned, with this excess equal the number of joined
symbols, you would expect that some letters are enciphered by using
two joined symbols.
We now move on to the encipherment by changing the form of
letters without relationship and diffusion, with the form of one letter
borrowed to another; such as borrowing the form of the letter (B )بto
denote (A )ا, etc.. -No.13 in the tree diagram-.
150
You determine that this method of encipherment is used through
the resulting disarray of letters and unsoundness of text formation.
When you suspect that only some letters are used for one another
-substituted-, you experiment with possibilities by replacing those ill-
articulated letters with all the letters that have [not] been identified
yet. In this regard you apply the methods of encipherment by using
cipher alphabets of devised shapes or symbols that are not attributed
to letters -No. 14 in the diagram-. Consequently the substituted letters
will normally reveal themselves. However, all letters, and not some of
them only, have been substituted, then these letters are meant to
resemble the devised shapes and symbols, and for their cryptanalysis
you employ the algorithms stated earlier in this treatise.
The fact that all the symbols are substituted for one another is
determined upon trial, by the unsound word composition of all the
ciphertext. Even if the word composition chances to straighten for one
part, it will not for plenty of others.
As concerns encipherment without relationship and diffusion, by
keeping the forms of letters but changing their positions -transposition
No. 17 in the diagram-, the algorithm for cryptanalysis is applicable to
all the methods set forth thereunder. It is effected through permuting
all the letters in pre- and post- positions, taking into account the
arrangements earlier expounded under the various types of
transposition encipherment.
152
A further method of substitution encipherment without relationship
and diffusion is by using transposition, i.e. by changing the position of
letter in relation to itself, through changing the angle of its set-up, e.g.
writing the letter in reverse, standing on its end, and so on. -No. 20 in
the tree diagram-. This method is very easy to cryptanalyse indeed.
That letters are enciphered this way is readily recognized if they are
found to be as many in number as the letters of the language
concerned, with the same letter assuming various angles of
presentation. The way to do it is to try out the shapes by approaching
them over from every angle. If a certain set-up renders a letter that is
known in that language, you establish that that shape represents that
letter.
Another method of substitution encipherment without relationship
and diffusion and without changing the position of letter is by adding
nulls that must not be vowels -No. 21 in the diagram-. This is
cryptanalysed by counting the letters of the cryptogram. If the number
exceeds the total number of letters in the alphabet of the language
concerned, the previously stated algorithms are utilized for
cryptanalysing most letters of the cryptogram. You then look into
some of the letters that have not come out yet, and try to find, in
different parts of the cryptogram, their identical instances among those
already cleared up. You now test word composition with the
cryptanalysed letters, omitting those suspected to be null letters in
several places chosen from the cryptogram. If word composition
thereby makes sense in those chosen places, you conclude the letters
left out are all nulls.
154
Conversely, if the encipherment is not by adding nulls, but by
omitting one or more letters from the cryptogram -No. 22 in the tree
diagram-, you will find that the letters of the message are less in
number than the alphabet count. The algorithms for cryptanalysis are
the first ones already mentioned.
Thus, having cryptanalysed a number of letters of the cryptogram,
you seek their identical counterparts elsewhere. In so doing, you may
find a letter or letters missing, as in the example عة اهللinstead of عثد
اهلل, you look for another neighboring letter amongst those
cryptanalysed . If, in two or three places of the cryptogram, you find
that the same letter is missing, you say, in positive assertion, that a
letter has been dropped -on purpose to complicate the encipherment-.
To establish the identity of that letter you check the vacancies against
all the letters of the alphabet, one by one. If the word composition of
all the words straightens and makes sense by inserting one and the
same letter to fill in the gaps, it is then that letter that has been
dropped purposely. The very same procedure is followed out when
more letters than one have been dropped.
156
The next type of simple encipherment to consider is that with
relationship and diffusion by species or genus -Nos. 7 and 8 in the
diagram-. In either case the symbol indicative of a letter may be one
symbol or numerous symbols. By one I mean to ferret out the ciphered
letter ( )ط, for instance, from the symbol of a single bird, say a pigeon
-Nos. 9&9` in the diagram-. By numerous I mean inferring the same
letter ( )طfrom the symbol of every bird -Nos. 10&10` in the
diagram-.
The distinction between encipherment by species, be it monoword-
or polyword- homophones, and that by genera, is that the letter should
be according to one and only genus. If you could get to know which
one, you pick up the initial letters of genera and see whether or not
articulation so straightens. Otherwise, species and genera are
substituted for the invented altered forms not attributed to any letters,
where the afore-stated technique has been employed -i.e. by shifting to
No. 14 in the diagram-.
158
This type of encipherment may involve a certain expedient utilized
by some people; that is to consider the first or last letter of each
written word, or to consider every second letter, counting from the
beginning of the written word, or every second letter counting from
the end of the written word. It follows that, in the case of a two-letter
word, the second letter will be the same as the last; and, considered
posteriorly, the second -i.e. next to the last- letter is in fact the first
letter of the word.
The algorithm for cryptanalysing this type of encipherment is so
easy that no close examination is ever needed. Simply look through
the cryptogram, considering first, last, second, or second last letters,
and you can realize on the spot whether this type of encipherment has
been employed.
160
Now to switch over to the type of simple encipherment where
letters retain their forms and encipherment is achieved by means of a
quantitative principle. Here all or some of the letters are doubled,
tripled, etc.; for instance, to represent the letter (a )اas (aa )اا, the letter
(b )بas (bb )ب ب,etc. - Nos. 27,29 &30 in the diagram-. One
recognizes this type of encipherment when letters are always spotted
to be repeated systematically.
The algorithm for this is also very easy, as you will readily
recognize throughout the cryptogram that letters are written only in a
repeated form. Merge repeated letters into one, thus (aaa )ا ا اare
rendered (a )ا, and so forth with other letters, and the message will
show.
Relevant, and almost opposite to this type, is the simple
encipherment where letters retain their forms by means of a
quantitative principle, whereby to merge into one all the letters in the
cryptogram that have the same shape in common -No. 28 in the
diagram-. Thus the Arabic letters: بb, تt, and ثfor example, can
be written like this: بb. This is best seen in a cryptogram that
exhausts all or some of such letters. You guess that this type of
encipherment is used when the number of symbols is found to be less
than the number of letters of the alphabet in the language concerned.
The words should be re-written differently until you get the word
composition right in all words. You try that over and over again with
the rest of the cryptogram.
162
Shifting to the other side of the scale, namely, COMPOSITE
(SUPER-) encipherment of letters -No.2 in the tree diagram-,
composite encipherment could be really a combination of all the
aforementioned simple methods. That is because composition -of
simple methods-, owing to the plethora of types amenable to
composition, tends to produce quite a wide variety which is unfeasible
to explain in the space allowed here, particularly when our aim -in this
treatise- is brevity and compactness.
The technique of cryptanalysing composite ciphers lies in the
application of all the expedients and algorithms already explored. If,
after all, the cipher remains inscrutable, you conclude that it is super-
encipherment; thereupon you cryptanalyse trying algorithms by which
you can cryptanalyse a part of the cryptogram using the co-position of
simple encipherment one by one till you succeed.
In fact composite cipher is the most intricate to detect of all types
of encipherment.
* * *
164
[Frequency of Letter Occurrence and Their Order in Arabic]
say: the letter (a " )اalif" is the most frequent of the Arabic letters.
frequency as follows:
l ()ه, m (ً), h ( )هـ, w ()و, y (ً), n (ُ), r ()ز, ()ع, f ()ف, t ()ت, b ()ب,
k (( )كfront, mid and end alike), d ()د, s ()س, q ()ق, ()ح, ()ج, ()ذ,
()ص, ()ش, ()ض, ()خ, ()ث, z ()ش, ()ط, (( )غfront, mid and end
alike), ()ظ.
166
In seven sheets written in Arabic the following statistics have been
recorded of the occurrence frequency of each letter. -Arrangement is in
descending order of frequency. For some reason the scribe of al-
Kind 's treatise missed the three letters: ()ش, ( )ضand z ()ش-:
Frequency
Frequency
Frequency
Frequency
Letters Letters Letters Letters
(*)
In Arabic script and w have the same written letter و, and similarly, both and y
are written as ً.
168
We have said earlier -in this treatise- that vowels are naturally far
more frequent in all languages, because they are the basic subject of
speech, and other phonemes come with it. From the statistical table
above, it is noticeable that the letter ( هl) takes precedence over the
letters (ً y) and ( وw) -i.e. it is more frequent-, and so does the letter
( هـh). This does not, however, contradict my previous argument, on
the basis that the long vowels in Arabic do appear in writing; short
vowels227 do not except when a short vowel occurs at initial position
in a noun, adjective, or any other derivative. In the word ( = ٍُحَََد
Muhammad), for instance, there is a (u )وin between the (m ً) and the
( )ح, but, being a short vowel, it does not appear in writing. Likewise,
there is an (a )اin between the ( )حand the latter (m ً), and another
(a )اbetween the latter (m ً) and the (d )د, both of which do not appear
in writing as they are short vowels. This I have elaborated in my book
F in at a - i r (On the Art of Poetry), and it accounts for the higher
frequency of some mute -consonant- letters, I mean non-vowels, over
some vowels -see the statistical table above-.
* * *
227
In Arabic, short and long vowels are also called minor and major vowels respectively.
170
[Letter Combination in Arabic]228
Let us now have our say concerning combinable and non-
combinable letters in the Arabic language.
I say: Letters that may not combine are the BASIC letters ( ur f
a liyya); some of them are non-combinable in a word at all, some
others combine only in anterior position or only in posterior position
-in relation to each other-.
VARIABLE letters, I mean those letters that may sometimes be
basic and sometimes AFFIXING, are combinable with all letters in
both anterior and posterior positions, or anterior only or posterior
only.
By Basic I mean those letters which are intrinsic in the formation
of a noun or of the structure of a word. To illustrate the meaning of a
noun, take the example " ُّطْقnu q = utterance", and the meaning of a
word, the example " ّاطِقn iq = utterer". A word signifies time, and
its force denotes an object that is always uttering, either of necessity
or by force. The word (na aqa = uttered) indicates an object that
used to utter, whereas: "na aqa" and "yan iqu = he utters" are not
words as such; but derivatives of a word. Consequently it is only the
noun that has its structure made up of basic letters.
228
-Refer to al-Kind 's model of derivation (Fig. 2.4), p.103-.
172
With respect to word derivation, the letter (y ً) in " ٍْطقyan iqu" is
affixing and indicates a future time, that is the utterance will take
place in the future. Also affixing is the short vowel (a )اin َطق
َ َّ ,
supposed to be situated in between the (n ُ) and the ( )طand which
occupies the place of a short vowel (u )وin ُّطْق. This affixing (a )ا
indicates a past time in which the utterance took place.
Similarly, the long vowel ( )اin the word ّاطق, situated in between
the letters (n ُ) and ( )ط, is also affixing, as it occupies the place of a
short vowel ( )وin ُّطْق.
Hence, affixing letters are those attached to a noun by derivation
with time, number, gender, genitive, comparison, cause, succession,
and the like.
Basic letters, on the other hand, are those that never change and by
no manner of means occur as affixing. There are sixteen of them, i.e.:
()ث, ()ج, ()ح, ()خ, d ()د, ()ذ, r ()ز, z ()ش, ()ش, ()ص, ()ض,
()ط, ()ظ, ()ع, ( )غand q ()ق.
174
Let me portray them graphically as follows:
, , , , d, , r, z, , , , , , , q
Basic letters d r z q
variable letters a b t s f k l m n h w y
176
Variable letters can combine with all letters in anterior or posterior
position, save the letter "s ", which is non-combinable in anterior
229
we could not make out the purpose, if at all, of this line. Note also that al-Kind
makes no mention here of the letter (z )شthough it does not combine with the
letter (s )سin interior nor in posterior position, as we shall see soon.
178
Nor does the letter ( )ثcombine with the letter ( )شin pre-
position, though it does in post-position, thus:
The letter ( )ذis also never combinable with the letters: ( ث, z ش,
ص, ض, ط, ظand s )سin anterior nor yet in posterior position, as
follows:
( ) non-combinable with z s
a r a a
The letter (z )شis non-combinable with the letters: ( ث, ذ, ص,
ظand s )سin anterior nor posterior position:
180
Nor does (z )شcombine with ( )ش, nor with ( )ضin anterior
position; it does posteriorly:
z z
azuna awz
z
z
182
The letter ( )صdoes not combine with the letters: ( , , z, , ,
and s) in anterior nor yet posterior position. This is illustrated as
follows:
( ) non-combinable with z s
i a ba
d d
ada'a
( ) non-combinable with s
184
The letter ( )ضis combinable in posterior position with the
letter (q ;)قnot so in anterior position:
q q
qa a'a
d z
idd z
186
Nor does it combine with: ( , q, , or ) pre-positionally, but it does
post-positionally:
q
qi a a
( ) is non-combinable with q
188
The letter ( )حis non-combinable with the letters: ( , , ) in both
anterior and posterior positions:
( ) non-combinable with
( ) non-combinable with
na a a a
190
The letter (d )دis non-combinable with any of the letters: (z, ,
and ) in anterior position; yet, it is combinable with any of them in
posterior position:
dz d d d
al-azd m ad adda idd
230
This generalization is actually not in conformity with the fact established in
dictionaries, that (r) is non-combinable with (n) in posterior position.
192
Nor does the letter ( )شcombine with any of the letters: z ()ش,
s ()س, ()ص, ()ث, ( )ذand ( )ظin posterior position; however, it
does anteriorly, as follows:
z s
azaba asa a a a a una a aba a
The letter ( )طis not combinable in anterior nor posterior position
with any of these letters: ()ص, ()ض, ()ذ, ( )ظand ()ج:
( ) is non-combinable with
z
z
194
Nor does ( )طcombine with (d )دin posterior position; it does
anteriorly:
d
m ad
The letter ( )عis non-combinable with the letter ( )غand the letter
( )حin anterior or posterior position:
( ) non-combinable with
ba a a
( ) non-combinable with
196
Nor is it combinable with (q )قor ( )ذin posterior position; yet, it
combines with either of them anteriorly, thus:
q
a na aqa
q
na aqa
q
qa ama
198
Other letters are combinable with one another. In the interest of
making the statement most explicit, I shall hereunder depict the
combinable cases, as we did earlier when we repeated with each letter
all those combinable with it.
We have already said that all variable letters admit of combination
with all letters expect the letter (s) ""س, and identified the letters with
which it is non-combinable. It is consequently the basic letters that we
must have our say in, as to how for they are, or are not, combinable
with one another. Nevertheless I shall demonstrate their combination
and non-combination with the variables. All that we shall do under
favour of Allah, the Beneficent and the Guardian against ill deeds.
So I say that the letter ( )ثis combinable both in anterior and
posterior positions with the following letters: (', b, t, , , , d, r, , , f,
q, k, l, m, n, h, w and y). This is represented thus:
200
The letter ( )شis also combinable with ( )ذin anterior position,
but not posteriorly. It is non-combinable, however, with these letters:
( , z, , and s) in anterior nor yet in posterior position.
The letter ( )جcombines with: (', b, t, , , , d, , r, z, q, s, , , ,
f, k, l, m, n, h, w and y).
Only in anterior position does it combine with ( ).
The letter (r )زis combinable with the letters: (', b, t, , , , , d, ,
z, s, , , , , , , f, q, k, l, m, n, h, w and y), in both anterior and
posterior positions.
As for as the letter (z )شin concerned, it is combinable in pre- and
post- positions with the following letters: (', b, t, , , , d, r, , , f, q,
k, l, m, n, h, w and y). It combines with either: ( ) or ( ), but in
posterior position only, and with ( ) in anterior position only.
However, it does not combine in anterior nor in posterior position with
any of these letters: ( , , , or s).
With regard to the letter ( )ش, it is combinable with the following
letters in both anterior and posterior positions: (', b, t, , , , d, r, , ,
, f, q, k, l, m, n, h, w and y). It is however, combinable only in
anterior position with: ( , , z, s, or ).
Finally, the letter ( )صis combinable in anterior position as well
as in posterior position with each of the following: (', b, t, , , r, , ,
f, q, k, l, m, n, h, w and y). It is yet combinable exclusively in
posterior position with either ( or ).
Otherwise, ( )صis non-combinable in anterior nor in posterior
position with any of the letters: ( , , z, s, , or ).
* * *
202
Translator's note:
- Thus far ends al-Kind 's treatise on cryptanalysis. It is followed
by the "repeated part" (pp.255-9 in ilm at-ta miya wasti r
al-mu amm ind al- Arab). This part, as the appellation suggests, is
more a copy of a few paragraphs of the original manuscript (pp. 151-
163 of this book) than an additional contribution to it. It is, however,
appended to the Arabic version just for editing purposes of contrast
between texts, and therefore found redundant for inclusion in the
English translation.
The repeated part concludes with these words:
"So praise be to God, the Almighty, the Beneficent and Guardian
against ill deeds.
End of al-Kind 's treatise on cryptanalysis of books [letters],
addressed to Ab al- Abb s A mad ibn al-Mu ta em.
Praise belongs to God, the Lord of all Being, and His blessing and
peace be upon Muhammad, the Prophet, and his folk."
204
(*)
119
1
(1)
(2)
121
1
(1)
(2)
(3)
(4)
(5)
56 55
123
125
1
(1)
127
1
(1)
129
1
(1)
131
1
(1)
(2)
133
1
3 2
(1)
(2)
(3)
(4)
135
1
(1)
(2)
137
2 1
(1)
(2)
(3)
(4)
(5)
139
1
(1)
(2)
213
(3)
141
1
(1)
64 63
(2)
143
145
1
(1)
15 145 14
16
(2)
(3)
147
1
(1)
149
1
5 4
(1)
(2)
(3)
216
216
(4)
(5)
13
151
1
(1)
(2)
(3)
216
(4)
17
153
1
(1)
20
(2)
21
(3)
155
1
2 1
(1)
(2)
22
(3)
(4)
157
2 1
5 4
(1)
9
(2)
10
(3)
(4)
(5)
(6)
14
159
1
3 2
7 6
(1)
(2)
(3)
7
(4)
(5)
(6)
(7)
161
1
(1)
27
(2)
30 29
(3)
(4)
(5)
28
163
1
(1)
2
165
1
(1)
58
274
167
2 1
273 320 437 600
3
155 221 252 262
112 120 122 131
63 91 92 112
32 35 46 57
4
15 15 17 20
4
58
16 23 28 275 9 17
2
360 58 4307
274
3
58 152
250 274 230
1
6000
600 274 575 58
169
1
(1)
123
(2)
126 85 84
(3)
337
(4)
124
171
1
(1)
(2)
(3)
(4)
173
1
(1)
(2)
(3)
175
1
(1)
(2)
177
1
(1)
183 166
(2)
179
1
(1)
181
1
3 2
(1)
)3(
)2(
(4)
244
183
1
(1)
(2)
185
1
(1)
187
3 2 1
)1(
)2(
)3(
189
1
(1)
191
1
(1)
(2)
(3)
214 211
193
1
6 5 4 3 2
(1)
)6(
)5(
)4(
)3(
)2(
195
1
(1)
(2)
197
1
(1)
199
1
(1)
(2)
201
1
(1)
(2)
(3)
(4)
203