Académique Documents
Professionnel Documents
Culture Documents
Series editors
Published by
KFCRIS & KACST
Acknowledgment
Translated by
Said M. al-Asaad
Revised by
Mohammed I. AL-Suwaiyel, Ph. D.
Ibrahim A. Kadi, Ph. D.
Marwan al-Bawab
Contents
v
Chapter 2: ibn ad-Durayhim's edited treatise:
Mift al-Kun z f al-Marm z ........................ 35
2.1 Editing methodology ............................................................. 37
2.2 Description of the manuscript ............................................... 38
2.3 Al ibn ad-Durayhim Treatise on Cryptanalysis ................... 47
Introduction
....................................................................... 50
Essentials for those practicing cryptanalysis
..................... 52
Types of encipherment
...................................................... 56
1. On transposition ............................................................ 56
2. On substitution .............................................................. 60
3. On the augmentation or reduction of the number of
letters ............................................................................ 66
4. On the utilization of cipher devices .............................. 66
5. On the replacement of letters using the decimally-
weighted numerical alphabet ...................................... 68
6. On the encipherment of letters by using words ............ 70
7. On enciphering by relationship and diffusion method 76
8. A return to the type on the utilization of cipher devices 80
9. On using invented symbols or signs to represent letters 82
Morphological introduction
.............................................. 84
Algorithm for cryptanalysis
.............................................. 98
Example 1
....................................................................... 102
Example 2
....................................................................... 116
vi
List of Figures
vii
List of Tables
viii
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 found to be necessary.
Vowels:
Arabic characters Transliteration Examples
(fat a) a as u in cup.
Short as o in rock,
( amma) u and u in put.
Vowels
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 ').
ة 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.
ix
ى 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.
x
Preface
* * *
We have divided this book into two chapters. The first chapter
presents an analytical study of the edited treatise of ibn ad-Durayhim.
It aims at elucidating difficult or vague points, spotting particular
features and, more importantly, highlighting aspects of originality and
innovation in the treatie. It is divided into four sections, the first of
which gives a brief biography of ibn ad-Durayhim.
The second section is a full study and analysis of ibn ad-
Durayhim's Treatise, while the third section delineates its structure.
This section contains a preface, rules in cryptanalysis, and a
conclusion of practical example of live ciphered message, explaining
the steps ibn ad-Durayhim follows in cryptanalysing it.
xi
The fourth section concludes the analysis of the treatise by a
summary exposing the aspects of ibn ad-Durayhim's scientific
originality.
* * *
The second chapter comprises a translation of the original text of
the edited treatise of ibn ad-Durayhim. It opens with a preamble to the
editing methodology adopted (Section 1), which basically conforms to
that commonly 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 (in Arabic) together with its English translation
represent Section 3, with the English translation on the left-hand
pages, and the original Arabic text on the right-hand pages.
The task of editing the manuscript text was a challenge indeed. No
effort has been spared correcting the mistakes and clearing the
ambiguous. Wherever appropriate, lead-in headings have been added
to designate the different divisions of the treatise itself.
xii
Chapter 1
His works
ibn ad-Durayhim was a very prolific writer, despite his short life of
less than fifty years. His works were as diversified as was his
encyclopedic knowledge. We found a - afad to be the most thorough
biographer in listing his works, as he mentioned approximately eighty
of his compilations, most of which were not mentioned in other
published biographical sources. What makes a - afad 's biography of
ibn ad-Durayhim more valuable is the fact that the biographer
explicity stated that the works he listed were handwritten by ibn ad-
Durayhim himself. The following are the titles of some of his books
that are likely to be related to esoteric sciences, and to cryptology in
particular:
3
1. 'iqtin al- u q f 'anw al-'awf q. (On types of al-awf q)
2. ' al-mubham f all al-mutar am.
(On cryptanalysing cipher texts)
3. ' q al-mu b f a - a ran wal-man b. (On chess games)
4. bas al-faw 'id f ar is b al-qaw id. (On languages)
5. baw dir al- ul m f naw dir al- ul m.
(On knowledge and science)
6. ta r f ad-dahr f ta r f az-za r. (On languages)
7. tan ' al-man ir f al-mar ' wal-man ir. (On physics)
8. sabr a - arf f sirr al- arf. (On spirituals)
9. sullam al- ir sa f ilm al-fir sa. (On physiognomy)
10. ar al-as ardiyya f al- is b. (On arithmetic and computation)
11. yat al-'i z f al-'a wal-'al z. (On riddles and enigmas)
12. yat al-ma nam f al-'Ism al-'A am.
(On the supreme name of God)
13. A poem in all rum z al-'aql m al-makt ba al al-bar b .
(A poem on cryptanalysis)
14. kanz ad-durar f ur f 'awa'il as-suwar.
(On the individual letters introducing some Koranic chapters)
15. mu ta ar al-mubham f all al-mutar am.
(A résumé in cryptanalysis)
16. mift al-kun z f ' al-marm z. [This book]
(Key to treasures in clarifying ciphers)
17. al-mun sab t al- adadiyya f al-'asm ' al-mu ammadiyya.
(Numerical proportions in the names of Prophet Mu ammad)
18. mun sabat al- is b f 'asm ' al-'anbiy ' al-ma k r n f al-Kit b.
(Numerical relations in the names of prophets mentioned in the Koran)
19. na m liqaw id fann al-mutar am wa aw bi ih.
(On the rules and regulations of cryptology)
4
1.2 Study and analysis of ibn ad-Durayhim’s
treatise
1
Some historians of science and cryptology numbered ibn ad-Durayhim’s
manuscript among the lost books. David Kahn, for instance, says of Mift al-
Kun z f ' al-marm z: "Though this must be included among the Lost Books
of cryptology, most of its information was probably preserved in Qalqashandi".
See The Codebreakers, p. 95.
2
See his treatise, p. 51.
5
1.3 Structure of the treatise
ibn ad-Durayhim's treatise is divided into five sections, each of
which is composed of several related topics. Following the
introduction these are:
1. Essentials for those practicing cryptanalysis.
2. Types of encipherment.
3. Morphological introduction.
4. Algorithm for cryptanalysis.
5. Two practical examples of cryptanalysis.
6
to invite attention to calligraphs with detachable letters, and those with
conjoint letters, concluding that all calligraphs have detached letters,
short of Mongol, Syriac and Arabic, some letters of which are
detached, while others can be both detachable or conjoint.
It is worthy of remark that in cryptanalysis, acquaintance with the
number of letters of many languages is a matter of primary
importance. ibn ad-Durayhim's erudition and vast knowledge of a
good few languages of his time seem to have enabled him to grasp
those languages with the largest number of characters (e.g. Armenian
and Hindi), and those with the fewest number (e.g. Mongol and
Sumerian). The following table (Table 1.1) demonstrates those
languages and number of letters in their alphabets according to ibn
ad-Durayhim's citation:
Number
Calligraphs Remarks
of letters
Mongol 17
Sumerian 18
Persian 20
Turkish 20
Hebrew 22
Syriac 22
Astankily 22
Greek 24
They have another calligraphy (30) for the
Old Latin 24 uncertain of their letters.
French 27
Latin 27
One of the Hindi languages 28
Coptic 32 They also have a numerical alphabet.
Armenian 36
Another of the Hindi For some Indians; called by ibn ad-Durayhim
languages
52 "the triangular Hindi"
1.3.2.1 Transposition
Opening right from the beginning with this type, and following it
by the substitution type, evinces ibn ad-Durayhim's awareness and
realization of the significance of these two methods, as the core of the
8
whole science of cryptography in all times. Transposition, according
to him, can be divided into three types, depending on the extent of the
transposition process. These are transposition within:
a single word.
two words.
the whole message.
He then gets down to details, making ramifications for every type.
It suffices here to give two examples of his transposition
encipherment, which are:
Arrangement of plaintext 1234567
Ascending alternate horizontal transposition 1726354
Descending alternate horizontal transposition 7 1 6 2 5 3 4
It should be noteworthy here to exhibit an important method based
on the idea of taking up the first letter and leaving out a set number of
letters, and so forth till the end of the text, then taking up the second
letter, leaving out the same number of letters till the end of the text.
For example,
Arrangement of plaintext letters:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
t h e m o s t i m p o r t a n t f o r m
Plaintext
1 2 3 4 5
t h e m o
6 7 8 9 10
Ciphertext
s t i m p
11 12 13 14 15
o r t a n
16 17 18 19 20
t f o r m
9
1.3.2.2 Substitution
The analysis by ibn ad-Durayhim of the common substitution
methods is truly impressive. He has stated his intention to explain the
norms governing them. He says: "Encipherment methods are of
various types, too many to enumerate. I mean to mention the basic
principles and rules that govern their laws" 3.
To him, encipherment by substitution falls into two kinds:
1. unregulated.
2. regulated.
In the unregulated encipherment, the substitution is determined by
a set key, such as a line of verse. He declares that this kind of
encipherment "is generative of innumerable cipher alphabets"4. It is an
accomplished fact that the possible number of cipher alphabets for a
29-letter alphabet is the permutation of 29 elements. This is expressed
by the equation: n! = 29! , which is a large number indeed 5 x 1028
ibn ad-Durayhim exemplifies the unregulated simple substitution
by three cipher alphabets, namely al-Qumm , al-Fahlaw , (This had
already been mentioned in ibn Adlan's al-Mu'allaf lil Malik al-
'A raf), and a third cipher alphabet not credited to anybody. All three
cipher alphabets, in addition to a forth one given by ibn Adlan, are
illustrated in the two tables to follow. Order of letters for those cipher
alphabets are specified through mnemonic verses, serving as keys to
ciphering. These verses are used in two ways:
The one is by substituting for each letter of the verse the respective
letter of the alphabet or numerical alphabet, as demonstrated in the
following table (Table 1.2):
3
See his treatise, p. 57.
4
Ibid., p. 63.
10
أ ة د س ط ػ ؿ ك م ه ى ً ُ ٓ ٗ
The alphabet
ٛ ٟ ٣ ٧ ٫ ٯ ٳ ٷ ٻ ٿ څـ ڇ ال ي
The numerical alphabet أ ة ط ك څـ ڇ ى ػ ٛ ي ٳ ٷ ٻ ٿ ً
(ab ad ) ٣ ٫ ٓ ٯ ه ُ د س ؿ م ٗ ٟ ٧
ٳ ٻ أ ڇ ػ ٛ ٓ ال ٷ څـ ك ه ً ٣ ٫
Al-Qummi cipher alphabet
ي ة ى ؿ ُ ٧ ٗ س ط د م ٿ ٯ
ٛ ه ٯ د ُ ٻ ڇ ً ٫ ٟ ٷ م أ ط ى
ibn ad-Durayhim's cipher alphabet
٣ ؿ ة ال ػ ك ي س ٳ ٿ ٓ څـ ٧ ٗ
ٯ ك ٗ ط ى ػ ه ڇ ُ ٳ أ ة س څـ ٻ
Al-Fahlawi cipher alphabet
م ً ؿ ٛ د ٧ ٓ ٿ ٣ ٷ ي ال ٫ ٟ
ٓ ػ ٣ ٿ ك ي ڇ ٯ د ُ ٧ ٷ ة څـ ٻ
ibn Adl n's cipher alphabet
أ ؿ م ٫ ٟ ٳ س ى ٛ ٗ ه ط ً
Table 1.2: The alphabetical and numerical-alphabet letters, with their corresponding cipher alphabets.
11
The other is by considering the verse as composed of pairs of
letters; the substitution is done reciprocally between the letters within
each pair, as shown in the following table (Table 1.3):
al-Qumm ٳ أ ػ ٓ ٷ ك ً ٫ ة ؿ ٧ س د ٿ
cipher alphabet ٻ ڇ ٛ ال څـ ه ٣ ي ى ُ ٗ ط م ٯ
ibn ad- ٛ ٯ ُ ڇ ٫ ٷ أ ى ؿ ال ك س ٿ څـ ٗ
Durayhim's
cipher alphabet ه د ٻ ً ٟ م ط ٣ ة ػ ي ٳ ٓ ٧ ٗ
al-Fahlaw ٯ ٗ ى ه ُ أ س ٻ ً ٛ ٧ ٿ ٷ ال ٟ
cipher alphabet ك ط ػ ڇ ٳ ة څـ م ؿ د ٓ ٣ ي ٫ ٟ
ibn Adl n's ٓ ٣ ك ڇ د ٧ ة ٻ ؿ ٫ ٳ ى ٗ ط
cipher alphabet ػ ٿ ي ٯ ُ ٷ څـ أ م ٟ س ٛ ه ً
Class I:
- The first method, in which the substitute for each letter of an
alphabet is the one immediately following, or every third or
fourth letter next to it …(Table 1.4)
- The second method, in which the substitute for each letter is the
one immediately preceding, or every third or fourth letter before
it …(Table 1.5)
Class II:
- The third method lends itself to considering the alphabet as
composed of pairs of letters; the substitution is done reciprocally
between the letters within each pair. The pairs are formed by
systematically taking every letter with the following one, or with
every third, fourth, etc. letter next to it. (Table 1.6)
- The fourth method is similar to the third, except that pairs are
formed by taking every letter with the one immediately preceding,
or with every second, third, fourth, etc. letter before it. (Table 1.7)
5
See his treatise, p. 63.
13
The rule for processing the first method was to substitute for each
letter the one immediately following, or every third or fourth letter,
and so forth… This resulted in (28) cipher alphabets when using the
numerical alphabet, and (29) cipher alphabets using the alphabet
(since the latter has one more character, i.e., )ال. In so doing, ibn ad-
Durayhim counted the natural order of letters as one of these cipher
alphabets.
The following tables (1.4 & 1.5) represent the cipher alphabets
resulting from adopting the numerical-alphabet order, and those
resulting from the alphabetical order respectively.
27 1
26 2
25 3
24 4
23 5
22 6
21 7
20 8
19 9
18 10
17 11
16 12
15 13
14 14
13 15
12 16
11 17
10 18
9 19
8 20
7 21
6 22
5 23
4 24
3 25
2 26
1 27
14
Table 1.4: Table of encipherment, following the first method, using the
numerical-alphabet order.
29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
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
Table 1.5: Table of encipherment, following the second method, using the
alphabetical order.
As for the second method of the regulated simple substitution, ibn
ad-Durayhim states that, similar to the first method where we
substitute for a letter the one following it, we can substitute for a letter
the one preceding it. As he puts it, "… or by substituting for a letter
the one preceding it. This would bring about a number of cipher
alphabets amounting to 58". In fact substituting for a letter the one
before generates quite the same cipher alphabets as when substituting
15
for a letter the one after. The only difference lies in the key number.
Notice for example in the first of the previous couple of tables that
substituting for ( )أthe next letter would effect key No.1 in the first
method; whereas substituting for ( )أthe preceding letter would effect
key No.27 in the first method, which is key No.1 in the second
method.
It is important to note that the previous tables (1.4 & 1.5) are
reminiscent of what is commonly known in the West as the Vigenère6
Table. It would have rightly been more appropriate to have been
termed the ibn ad-Durayhim Table, distant though the two eras are
from each other.
The rule for processing the third and fourth methods (Class II) was
to look at the letters of the alphabet as pairs formed by taking every
letter with the following/preceding one, or every second, third, etc.
next /prior to it. This would produce 58 cipher alphabets as stated by
ibn ad-Durayhim above. The following two tables (1.6 & 1.7) display
respectively the cipher alphabets engendered by substituting the two
methods of Class II.
Note that the lower half of the tables (i.e., Nos. 15-28) is no
different from one of the tables attributed to Porta7, the well-known
cryptologist of the West, called "the double substitution system".
6
Vigenère (1523-1596).
7
Porta (born 1535).
16
أ ط څـ ى ٛ ٳ ٻ ً ٫ ٯ ُ س م ٟ
+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
٧ ٟ ٗ م ؿ س د ُ ه ٯ ٓ ٫ ٣ ً
Table 1.6: Table of encipherment as given by ibn ad-Durayhim, following the
third method using the numerical-alphabet order.
Note: Porta's double substitution system is part of this table.
17
أ ٟ م س ُ ٯ ٫ ً ٻ ٳ ٛ ى څـ ط
+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
ً ٿ ٻ ٷ ٳ ي ٛ ػ ى ڇ څـ ك ط ة
18
ibn ad-Durayhim directed attention to an important issue related to
the already mentioned cipher alphabets; namely, when the encipherer
is "Maghrebi" -from North Africa or Arab Spain-, because the order of
letters in their numerical alphabet differs from that of the one used in
the Muslim East. He set out to mention the Maghrebi numerical
alphabet as it was actually used. This indicates that correspondence
was active between North-Africa/Arab Spain in the west, and Egypt,
Syria and Iraq in the east. Still, he never failed to point out that, in
encipherment by regulated substitution, the ( )ڇwas made by some to
occur before the ( )څـ, contrary to the usual order of the ( )څـcoming
first. Moreover, he provided one of the numerical alphabets of the
Indian calligraphs. All this promotes the belief of ibn ad-Durayhim's
all-round acquaintance with, and in-depth knowledge of, the
possibilities of encipherment by substitution.
The following table (Table 1.8) manifests the order of Arabic
letters of both the alphabet and numerical alphabet in eastern and
western Arab worlds, together with a numerical alphabet of an Indian
calligraph.
19
Order of Arabic Order of Arabic
Order of an Indian
Alphabet Numerical alphabet
Numerical alphabet
Eastern Western Eastern Western
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 ى ى ر ر ض
8
26 هـ هـ ض ظ ط
8
27 و و ظ ظػػ غ غغص ص طصع
28 ال ال غ ش ظ
29 ي ي
Table 1.8: Table of the order of letters of both the alphabet and
numerical alphabet in eastern and western Arab worlds,
together with an Indian numerical alphabet.
8
Order reversed by some.
20
1.3.2.3 The augmentation or reduction of the
number of letters
Under this type, ibn ad-Durayhim reported three methods, the
counterparts of which we had earlier met with al-Kind 's "simple
encipherment where letters retain their forms". ibn ad-Durayhim
contributed in enriching and enhancing those methods through
advancing several variations within each. In his third method, he
enunciated the important practice based on adding one or more letters
to each word, following a fixed key; for instance, adding ( )أin the first
word, ( )ةin the second, and so forth… This bespeaks his awareness
of changing the rule from one word to another. We do not really know
for certain what precluded him from mentioning the polyalphabetic
substitution, though many of the basic concepts behind it he seemed to
be fully aware of.
9
See his treatise, p. 81.
21
encipherment; therefore we say that such matters need sound common
sense lest the decryptor should deviate from the right solution"10.
10
See his treatise, p. 83.
11
"Collected Papers on Cryptology", 66/B and 67/A.
12
See his treatise, p. 69.
22
Figure 1.2: ibn ad-Durayhim's method of encipherment by substitution of numbers for letters using the
decimally-weighted numerical alphabet
Re-substitution: by
Substitution of Arithmetic operation The ciphertext
substituting for a (letters or words)
The letter numbers for letters according to a set rule
(CLEARTEXT)
number one or several (CRYPTOGRAM)
letters
23
ا ة ط ك څـ ڇ ى ػ ٛ
1 2 3 4 5 6 7 8 9
ي ٳ ٷ ٻ ٿ ً ٣ ٫ ٓ
10 20 30 40 50 60 70 80 90
ٯ ه ُ د س ؿ م ٗ ٟ
100 200 300 400 500 600 700 800 900
٧
1000
x 1 2 3 4 5 6 7 8 9
1 ا ة ط ك څـ ڇ ى ػ ٛ
10 ي ٳ ٷ ٻ ٿ ً ٣ ٫ ٓ
100 ٯ ه ُ د س ؿ م ٗ ٟ
1000 ٧
24
اط،ً ٹ، ثڈ،ً ٹBy breaking up the number into a sum of two
numbers, so long as their numerical values add up
to the numerical value of the original letter.
(40=30+10, 8=2+6, 40=30+10, 4=1+3)
ثت، ٵٴ، اى، ٵٴBy breaking up the number into a sum of two
numbers of another choice.
(40=20+20, 8=1+7, 40=20+20, 4=2+2)
ػ،٫ ، ٌڈ،٫ By doubling the number.
(40x2=80, 8x2=10+6, 40x2=80, 4x2=8)
ٌت، ٱٴ، ٵل، ٱٴBy tripling the number.
(40x3=120, 8x3=24, 40x3=120, 4x3=12)
13
See his treatise, p. 71.
14
Ibid., p. 73.
15
Ibid., p. 73.
26
C) Substituting a word for a letter: There are many possibilities
for bringing this method to pass: letters may assume names of
people, stars, mansions of the moon, months (lunar, Latin, Coptic),
number of days in a month, hours of the day, days of the week,
book names, suras of the Koran, region names, ointments, drugs,
fruits, trees, etc.
It is well worth mentioning here that some of these systems had
been tackled by ibn Dunayn r16 in more detail.
D) Substituting for a letter a picture or representation of all
that can be symbolized -suggestive of rebus-, such as birds,
animals, plants, etc. What is really peculiar to ibn ad-Durayhim in
this connection is his indication of the special branched calligraph
which looks like fancy flourishes and tails, and is based on the
words of the numerical alphabet. Such calligraphy, in fact, stands
to his credit as the first of its kind to be mentioned; none of ibn ad-
Durayhim's predecessors whose treatises are covered in this study
had mentioned it. However, it has recently been revealed to us that
ibn Wa iyya, in his awq al-Mustah m f Ma rifat Rum z al-
Aql m (Seekers’ joy in identifying other languages’ written
symbols), had already mentioned it.
16
See his treatise: Maq id al-Fu l al-Mutar ima an all at-tar ama; from
"Collected Papers on Cryptology", 64/A.
17
See his treatise, p. 79.
27
The following (Table 1.10) is a table of the generic names which
stand for each letter of the Arabic alphabet, as given by ibn ad-
Durayhim. It is interesting to notice that the first letter of the name of
genus in Arabic is the letter to be ciphered:
Table 1.10: A list of generic names which match the Arabic alphabet,
used by ibn ad-Durayhim.
28
To be noted is the clear uniformity in designation between ibn ad-
Durayhim's statements here and al-Kind 's exemplifications in his
treatise, as well as ibn Dunayn r's tables18. ibn ad-Durayhim's new
contribution manifests itself in indicating various possibilities of
methods and their number. Thus, he handles encipherment in terms of
genus/species relationship and the resultant cipher alphabets, some of
which are "restricted", or "committed", others are not. He says: "From
this emerge thirty-two cipher alphabets, the first of which is
unrestricted, the second is restricted to the letter ()ا, the third to the
letter ()ة, and so on till the end of the alphabet"19. The cipher
alphabets he mentions are the following arrangement:
1 unrestricted.
29 each restricted to one letter of the alphabet.
1 by changing the restriction according to the numerical-
alphabet order.
1 by changing the restriction according to alphabetical order.
-----
32 cipher alphabets
18
Maq id al-Fu l al-Mutar ima an all at-tar ama; from "Collected Papers on
Cryptology", 64/A.
19
See his treatise, p. 79.
29
However, ibn ad-Durayhim could be criticized for bypassing the
possibility of sparing the space; what ibn Adl n termed "the no-word-
spacer cryptogram", or "al-mudma ". This spells ibn Adl n's
superiority as concerns the presentation of cryptanalysis methods.
A. On word-length
- Definition of the "word" according to "writers" and grammarians,
and the fact that cryptology is more concerned with the "writers"
definition.
- The shortest word in Arabic is one letter, and the longest word is
fourteen letters, depending on the word being a noun, a verb or
an article.
- The maximum length of a noun prior to affixation is five letters.
- The maximum length of a verb prior to affixation is four letters.
- No word of four- or five- letter root is devoid of at least one of the
"liquid letters"; i.e. the letters: ( ٻ، ة،٫ ، ٿ، ه،)ٷ.
20
See his treatise, p. 85.
30
C. Combinable letters
These are of various kinds:
- Non-combinable letters (neither in anterior nor in posterior
positions).
- Combinable in anterior position only.
- Combinable in posterior position only.
- Letter repetition at the beginning of words.
ibn ad-Durayhim elaborates these kinds with highly admirable
competence. We have opted for devoting an independent study to the
related linguistic information, abundant in books on cryptology,
particularly those reported by al-Kind , ibn Dunayn r, ibn Adl n and
ibn ad-Durayhim.
The following table (Table 1.11) covers the cases of the non-
combinable letters, those non-combinable in anterior position only, or
in posterior position only, as given by ibn ad-Durayhim in his treatise
Mift al-Kun z.
31
Letter symbol Letters non-combinable Resultant non-combinable bigrams
with it
21
See ub al-'A , 9/240 and 245. (Published by al-Mu'assasa al-Mi riyya al-
mma, 1963)
22
See his book: The Codebreakers, p. 96.
33
the lead, since the earliest of those mentioned, al-Kind , lived five
centuries ahead of ibn ad-Durayhim! Still, there is no gainsaying the
merit of ibn ad-Durayhim's treatment of cryptanalysis as the most
detailed of all the past cryptographic legacy handed down to us
through generations.
34
Chapter 2
23
Translator's explanatory additions are placed between pairs of hyphens: -…-.
37
2.2 Description of the manuscript
The original manuscript is part of an assemblage of small-sized
sheets, comprising several treatises on such occult sciences as
numerology (z yir a), divination ( afr), al-awf q, geomancy,
talismans, and others. The assemblage is handwritten in fine
penmanship, and housed in 'As ad 'Afand 's Library of as-
Sulaymaniyya Ottoman Archives in Istanbul, under the number 3558.
The first sheet is an index, written by the scribe, of the titles of
treatises included. Each title is written in two lines, with the number of
the first sheet of each treatise affixed thereunder. The index reads as
follows:
"What is contained in this unique paper:
ar ka f ar-r n f al-z yir a ................................................. 2
(Exposition of " " unveiling in "z yir a").
ar bayt minh , by al- amr ............................................... 11
(al- amr 's exposition of a line of the above).
'Isti r al-'a wiba min al- afr al- mi .............................. 14
(Drawing the answers out of the extensive afr).
F naw m s al- aw riq lil- d t ............................................ 27
(On the laws of the supernatural).
Man mat al-'Im m al-Sabt ................................................. 41
(al-'Im m al-Sabt 's poems).
Mift al-Kun z f ' al-Marm z ...................................... 47
(Key to treasures on clarifying ciphers).
all at- illasm f al-z yir a .................................................... 60
(Solution of talisman in z yir a).
Ad-durra al-munta aba f al-'a wiba .................................... 63
(The gem: a collection of answers).
F al-'awf q al-mu awwaqa .................................................... 67
(On confined 'awf q).
'Istin q al-'a ruf min al-' y t ................................................ 74
(Elicitation of letters from Koranic verses).
Ras 'il f al-raml, by Na r a - s ......................................... 77
(Na r a - s 's treatises on geomancy).
Kit b al-'akt f ......................................................................... 80
(The book of al-'akt f).
38
F al-mu ammas al- l al-wasa ........................................ 85
(On poetical quintets).
Da aw t as-s t, by al-Ba n ............................................... 89
(al-Ba n 's invocations of times).
F ilm al-'awf q, by al-qabb n ........................................... 102
(On al-'awf q science by: al-Qabb n ).
ar sim al-hindiyya f al-wafq ............................................. 105
(On letters and their secrets)
Kalim t ibn al a f al-waq 'i ............................................ 109
(ibn al a 's words on events).
Bay n as-s a, by as-Suy ............................................... 121"
(On Doomsday)
Beside the last title the scribe has made this note:
" "(i.e. copied by the poor scribe),
immediately appended by a seal on which has been inscribed in
Persian-style Arabic script: "My lord, I ask Thee a creditable end". ibn
ad-Durayhim's treatise, whole and complete, occupies the pages 47/B
to 59/A, and closes with a colophon of the scribe's name and date of
copying.
39
Figure 2.1: A photocopy of the index of the assemblage incorporating
ibn ad-Durayhim's treatise
(Document No. 3558, as-Sulaym niyya Ottoman Archives, Turkey)
40
Figure 2.2: A photocopy of the first page of ibn ad-Durayhim's
treatise
(Document No. 3558, as-Sulaym niyya Ottoman Archives, Turkey)
41
Figure 2.3: A photocopy of a page of ibn ad-Durayhim's treatise
illustrating encipherment using the "branched" calligraphy
(Document No. 3558, as-Sulaym niyya Ottoman Archives, Turkey)
42
Figure 2.4: A photocopy of a page of ibn ad-Durayhim's treatise
demonstrating the encipherment of the first of two examples.
(Document No. 3558, as-Sulaym niyya Ottoman Archives, Turkey)
43
Figure 2.5: A photocopy of a page of ibn ad-Durayhim's treatise
demonstrating the encipherment of the second of two examples.
(Document No. 3558, as-Sulaym niyya Ottoman Archives, Turkey)
44
Figure 2.6: A photocopy of the encipherment of ibn ad-Durayhim's
second example as set out in ub al-'A 9/245.
(Published by al-Mu'assasa al-Mi riyya al- mma, 1963)
45
Figure 2.7: A photocopy of the last page of ibn ad-Durayhim's
treatise.
(Document No. 3558, as-Sulaym niyya Ottoman Archives, Turkey)
46
2.3 Ali ibn ad-Durayhim Treatise
on Cryptanalysis
(Original Arabic Text and English Translation)
47
Mift al-kun z f '
al-marm z
by
Al ibn ad-Durayhim
48
In the name of God
the Most Gracious, the Most Merciful.
[Introduction]
Glory be to God, who set out with the creation of the pen, disposeth
it on the guarded tablet, and dealt out tongues amongst nations. He is
the Omniscient, Knower of all secrets. Praise be to Him who made
known something of His knowledge. We profess that there is no god
but Allah, the One without partner, and that Mu ammad is His
prophet to all people and His favourite whom He brought so nigh to
Him, and made the seal of prophets. May God's blessing and peace
without end be upon him and his noble household and companions.
I had earlier written a book on the formulation of ciphers and their
cryptanalysis, which I called: ' al-mubham f all al-mutar am
(The clarification of ambiguities in cryptanalysing cipher texts). A
period of time had elapsed since I abridged it. I had no other copy in
my possession. 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 sructure of the book and facilitate
its comprehension, God willing. I have called my book Mift al-
Kun z f ' al-Marm z (Key to treasures on clarifying ciphers). I
pray to God for help and success, most sufficient unto us is He in
whom we trust.
50
Know that cryptanalysing cipher 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 they have bequeathed.
* * *
[Essentials for those practicing cryptanalysis]
-The cryptanalyst's tools-
It is necessary for one experiencing cryptanalysis to develop a
thorough knowledge of the cryptogram language he seeks to
cryptanalyse, as well as the language grammar.
He should also know the frequency of occurrence of letters and
their order, such as long vowels which have the highest frequency of
occurrence in all languages. Letters of highest frequency in certain
languages are (a) "alif" in Arabic, (s) in Latin and Armenian, and (n)
in Mongol.
According to the numerical alphabet, all calligraphs have
detachable letters short of Mongol, Syriac and Arabic, of which
letters can be both detachable and conjoint. Syriac letters are detached
and conjoined as in Arabic.
52
The shortest of all calligraphs [alphabets] is Mongol, consisting of
17 letters; the longest Armenian: 36 letters; the Turkish 20 letters, and
as many for the Persian calligraph, with three letters in it not in the
Turkish, namely, h ( )څـ, f (٫), and ()م. It follows that there are three
letters in the Turkish calligraph not there in the Persian, namely, (ٓ),
(ٛ) and q ()ٯ, with the letters: ()ػ, (٣), ()س, (ٗ) and (ٟ)
absent.
The Hebrew, Syriac and Astank ly calligraphs are made up of 22
letters each, i.e. from the letter ( )اto the letter ( )دof the numerical
alphabet. The French and Latin are 27 letters; the old Latin and Greek
24 letters (these two have another calligraph of 30 letters for the
uncertain of their letters); the Coptic 32 letters (it also has a numerical
alphabet). One Hindi calligraph differs in their language from that of
their numerical alphabet which comprises 28 letters in nine forms with
the following orders: (٨اٌٲ, ثٶو, ِعٺ, كٽذ, څڂذ, ڇٍـ, ن٥ى, ٘ ؽٮand ٠ٖٝ).
For some Indians there is another calligraph of 52 letters called the
triangular Hindi. The Sumerian calligraph is four letters less than the
Hebrew. The letters wanting, being from the Old Testament, are:
hamza ()ء, ()ػ, (٣) and h ( ;)څـso for (إثواڅٍټ,, ٍٸ٥إٍپب, إٍؾبٯand ٲڈة٦ٌ)
they say: ( ثٍوٻ, ّپڈٌٸ, ٌٖبٯand )ٌبٱتrespectively, with ( )ٌبٱت
pronounced halfway between يand ڇand all in the same enunciation.
They have no such letter as ()ؿ, and the letters (٣) and hamza ()ء
may on occasion be pronounced as such, thus ( )إثواڅٍټmay be
pronounced ()إثوٻ, and would probably be enunciated ( اٷ٤)ٌْپ.
54
Encipherment methods are of various types, too many to
enumerate. I mean to mention the basic principles and rules that
govern their laws.
* * *
[Types of encipherment]
[1. On transposition]
By writing a word in reverse, e.g. ( )ٽؾپلis enciphered:
(;)كٽؾټ (ًٺ٥: ٤)ٌٺ.
By writing the last letter first thus: ( ٽؾپل: ) كٽؾټ, ( ًٺ٥:
ٸ٦ٌ).
By transposing the first letter of a word with the last, e.g.
( ٽؾپل: ) كؽپټ, (ًٺ٥: ٤)ٌٺ.
By changing positions of even letters with odd letters, e.g.
( ٽؾپل: ) ؽپلٻ, ( ًٺ٥: ً٦)ٹ. This rule may be extended for
application in multi-word texts; thus: ًٺ٥ ٽؾپل أفڈ
(plaintext) becames: ڈٌٸ٥ ( ؽپلٻ فبciphertext).
By transposing the first letter of a word with the third
letter, e.g. ( ڈك٦َٽ: َپڈك٥), ( ًٺ٥: ٤)ٌٺ, ( أؽپل: ;)ٽؾأكor by
bringing every two consecutive letters in front of the
preceding two. This can be done throughout a multi-word
message, looking at it as an integral whole, e.g. ڈك أفڈ٦َٽ
( أؽپلplaintext): ڈٽَقڈك أٽلأػ٥ (ciphertext), or within
individual words, e.g. ڈك أفڈ أؽپل٦َ ٽ: ڈٽَل ڇفأ ٽلأػ٥.
By transposing the first letter of a word with the fourth,
e.g. ( ڈك٦َٽ: پل٦ٍ)ڇ, ( ٽؾپل: )كؽپټ. This, again, may be
observed for a multi-word text, tackled as one integral
unit.
56
By alternating one initial letter of a word with the
corresponding terminal one until the word is exhausted,
in terms of the ascending alternate horizontal
transposition, e.g. ( ڈك٦َ )ٽis enciphered: ( ٣ )ٽلٍڈ, ( ٽؾپل:
)ٽلؽټand ( ًٺ٥ : ٍٸ٥). This process also holds in multi-
word texts; that is by taking alternately one letter from the
beginning followed by the corresponding letter from the
end of the message until all are used. This method may be
performed the other way round, namely in term of the
descending alternate horizontal transposition, starting
from the end of the message by taking alternately one
letter from the end followed by the corresponding letter
from the beginning until all are used. Thus: ( ڈك٦َ ٽis
enciphered: ٤ٍ)كٽڈ, ( ٽؾپل: )كٽپؼand ( ًٺ٥ : ٸ٦ٌ). This
process, again, also holds in multi-word texts.
By taking the words of the text in pairs (1), transposing
the first letter of one word with the first letter of the other
word, e.g. ټ ؽَڀ٥ ( ٽؾپل اثڀclear): َڀ٥ ( اؽپل ٽجڀ ؽټcipher),
(2) or transposing the last letter of one word with the last
letter of the other, e.g. ټ ؽَڀ٥ ( ٽؾپل اثڀclear): ڀ٥ ٽؾپڀ اثل
( ؽَټcipher), (3) or transposing the first letter of one with
the last letter of the other; so that the above example is
enciphered: ٤َځؾپل اثټ ځټ ؽ, (4) or transposing the last letter
of one with the first of the other, so that the above
example is enciphered: ؼ ٽَڀ٥ ٽؾپب كثڀ, (5) or, as an extra
measure, transposing the first letter of one word with the
first letter of the other, while simultaneously transposing
the last letter of one word with the last letter of the other.
Thus, the example: ټ ؽَڀ٥ ٽؾپل اثڀwould be written in
cipher: َټ٥ اؽپڀ ٽجل ؽڀ, (6) or transposing the first
letter of one word with the last letter of the other, and the
last letter of one with the first letter of the other. In so
doing, the above example is enciphered: ٤َځؾپب كثټ ځؼ ٽ.
58
By taking every other letter right through, dropping the
others for the time being, the intended plaintext is
obtained. Letters dropped are now considered in the same
way to complete the text, e.g. ټ ؽَڀ٥ ( ٽؾپل اثڀclear):
پپلؽبٍجڀ٦( ٽڂؾcipher). You can also take one letter and
drop two till the end. You do the same with the second
letter, then with the third. So you write the above
example: ڀ٥ ٽبٽؾجؾپڂَل. You may take one letter and
leave out the following one, or four, five, etc.. letters as
you please. Anyhow, it is advisable to separate words by
as many spaces as the cipher alphabets according to a
fixed rule. The above example would be written, using
the last mentioned method: ڀ٥ٽبٻ ؽجؼ ٽڂٌ ك. From this a
good many configurations arise, all of which are the very
letters constituting a message, no more, no less, but
transposed.
[2. On substitution]
-Encipherment of this type can be exercised-:
By always substituting a specific letter for another
according to a set key, as in the Qummi cipher
alphabet represented by this line of verse:
in which the letter m ( )ٻis substituted for the letter k ()ٳ, and
vice versa, the letter o ( )ڇfor ( )اand the other way round, and
so forth. Accordingly, the word ( )ٽؾپل, for instance, is
enciphered: (ٶوٞ)ٵ, (ًٺ٥: ٬)ٍچ, and (ڈك٦َ ٽ: َبه٦)ٵ.
60
There is another cipher alphabet represented by this verse:
e.g. ( ٽؾپل: )مىمٯ, ( ًٺ٥ : )ځٍٸ, ( پو٥ : )ځنڇ. This relates to the
unregulated encipherment by substitution, which is generative of
innumerable cipher alphabets.
Using the numerical alphabet order, by substituting for each letter
the one immediately following; thus the letter ( )ةis substituted
for ()ا, and ( )طfor ()ة, and so on until the end. The letter ( )اis
substituted for (٧). This is because letters are like a circle, [i.e.
they are viewed as located on a circle circumference or a disc] in
that the last letter is replaceable by the first letter as if to follow
or preceded it. Example: ( ٽؾپلclear text): ڂڄٞ( ځcipher text).
You may substitute for each letter every third letter next to it, so
that ( ٽؾپلclear) becomes ( ٍٍَڈcipher), and ( ًٺ٥ : ;)ٕڂٸor every
fourth letter, so that ( ٽؾپلbecomes: ي٦ٶ٥) and ( ًٺ٥ : )ٱَټand so
on and so forth till the end of letters. This results in 28 cipher
alphabets.
By considering the numerical alphabet as composed of pairs of
letters; the substitution is performed between the letters within
each pair. So the word ( ٽؾپلis enciphered: )ځيځظand ( ًٺ٥ : ٜ)ٍٶ.
The pairs are formed by systematically taking every letter with
the one immediately following it; or with every third letter next
to it, e.g. ( ٽؾپل: )ٍڈٍت, ( ًٺ٥ : ;)ځٍٸor with every fourth, fifth,
etc.. letter next to it.
Alternatively, -similar to this last-mentioned method- by
substituting for a letter the one preceding it. This would bring
about a number of cipher alphabets amounting to 58.
62
But care should be taken, while considering the 112 cipher
alphabets, that the encipherer is not Maghrebi, since the order of
letters in our numerical alphabet is different from the
Maghrebi's, which runs as follows: أثغل, څڈى, ًٞؽ, ٵٺپڀ, ٘ٮ٦ٕ,
ٱوٍذ, صقن, ِ٪١. And this is the order which a - ib , peace be
on his soul, adopted for assigning symbols to reciters [in a well-
known poem attributed to him on the Koranic modes of
reading].
Adopting the alphabetical order, by substituting for each letter
the one immediately following, thus substituting the letter ()ة
for ( )ا, ( )دfor ()ة, ( )سfor ()د,etc. until the end. The letter ( )اis
substituted for the ()ي. Examples: ( ٽؾپلclear): ( ځقڂنcipher),
( ًٺ٥: پب٩). You may substitute for each letter every third letter
next to it, so that the word ٽؾپلis enciphered either ڇكڇهin terms
of the key in which the letter ( )ڇgoes before the letter ( )څـ, or
څلڅوin terms of the key in which ( )ڇfollows ( )څـ. Also, ًٺ٥
(plain): ( ٭ڂتcipher). This brings forth a number of cipher
alphabets amounting to 29.
You can, in the same way, substitute for each letter the one
immediately preceding; thus the letter ( )يis substituted for ()ا,
the letter ( )اfor ()ة, ( )ةfor ()د, etc. Examples: ( ٽؾپل: )ٹغٺـ,
(ًٺ٥: ٶال١). This engenders 29 cipher alphabets, too.
By considering the alphabet as composed of pairs of letters; the
substitution is done between the letters within each pair. The
pairs are formed by systematically taking every letter with the
one immediately preceding, e. g.: ( ٽؾپل: )ٹغٺـ, ( ًٺ٥: ٶڈ١),
adopting the cipher alphabet in which the letter ( )څـprecedes the
letter ()ٿ. The ( )الmay be spared, or substituted leaving the ()ي
out. In this manner substitution can be conducted by taking
every letter with every second, third, fourth, etc. preceding
letter, as already mentioned. This would produce 58 cipher
alphabets, too.
64
Analogous to these four divisions in the Maghrebi system are 116
cipher alphabets. Their alphabet runs: (ا, ة, د, س, ط, ػ, ؿ, ك, م, ه, ى, ٛ,
ٟ, ٳ, ٷ, ٻ, ٿ, ٓ, ٗ, ٣, ٧, ٫, ٯ, ً, ُ, څـ, ڇ, ال, )ي. In substituting for a
letter the immediately preceding one, the word ( ًٺ٥), for instance,
becomes: (ٶالٙ), and (ڈك٦َ ٽ: چـٚ)ٹٲ. All these cipher alphabets do not
involve any addition (augmentation) of letters.
66
The punched board, with 28 holes standing for the letters. The
cryptogram is represented by a thread driven through the
intended holes so as to make a route defining the letters of the
message successively. To represent أؽپل, for example, the thread
is driven through the holes: 1, 8, 13 and 4 consecutively, using
the numerical alphabet ( )أثغل. The algorithm for decipherment,
regardless of the length of the cryptogram, is by reading the
letters through which goes the thread. For each hole you write a
letter. The order of letters is then reversed so that the last one is
made the first. By so reading to the first letter, you are correct.
68
By multiplying the number representing the letter by two, and so
write ( ٽؾپل: ٫ ٌڈ٫ )ػand ( ًٺ٥: )ٳ ً ٱټ, etc.; or multiply it by
three, thus writing ( ٽؾپل: )ٌت ٱٴ ٵل ٱٴand ( ًٺ٥: ًٍ ٗ )ٷ.
Numbers can also be multiplied by four or five.
70
By taking from every three words the first letter of the first
word, the second letter of the second word and the third of the
third word, so the word ( ل٦ٍ) would be enciphered:
( ٽٲلاهڃ٫و٦ٌ ;)ٍٍّلor by adopting odd letters only, i.e. the first,
third, fifth, etc., e.g. ًٺ٥ ټ٥ ( ٽؾپل اثڀclear): ٍټ٦ٽب ؽزټ ٱل ٱبهة ٽڀ ځ
پٸ فٍو٦( ثcipher); or even letters only, -i.e. the second, fourth,
sixth, etc.-, writing the same example in cipher thus:
(ًغٺڂ٦ٌ ٍټ٦)ٵټ رؾڈٻ ٱلٽبي ثٍڀ ځ.
By taking up one letter and leaving out the next two letters, e.g.
(ًٺ٥ ټ٥ ٽؾپل اثڀ: ٲڈٷ ٱبٌلح٥ ٺڈٽچټ٥ ً)ٽب أؽَڀ ٽڂبكٽخ أٵبثو اٹڂب, and the
like. Conversely, some may start by leaving out rather than
taking up letters, so that, of the above example, the third, sixth,
ninth, etc. letters are taken. The cipher may look like this:
( پٸ ٹلځٍبڃ٦ٌ چب ٽڀ٦ٌٚ )أٹټ أهؽپٶټ ثجلهح أڇعجذ أٿ, and so on. Another
method is by taking the first letter and then every fourth letter
throughout, so that in enciphering the words: ( ًٺ٥ ټ٥ )ٽؾپل اثڀ,
you may write: (لڃ اٹزجغٍٸ ٹڄ٦ٍ لٿ أٽبٿ٦)ٽڀ اٹؾَڀ ٹپڀ ٌزلٌڀ ثبٹٲوثى ٹغڂبة ٽ.
You can of course start by leaving out letters rather than taking
them, as already stated, with a feasibility of dropping four, five,
etc. of the extraneous letters at a time while taking one
throughout the cryptogram.
The encipherer may choose to make his key known to the
recipient. One way of doing that is to agree that starting the
cryptogram with the letter ( )اsuggests to the recipient that every
second letter is to be taken, starting with the letter ( )ةmeans
that every third letter should be taken, starting with ( )طmeans
that every fourth letter should be taken, and so on and so forth.
Some start by enciphering the opening: ( )ثَټ اهلل اٹوؽپڀ اٹوؽٍټ,
from which the key is detected without toil and applied all
through.
In so merging ciphertexts with plaintexts, the cryptogram may
be made to read backwords, i.e. from left to right.
72
The encipherer can substitute for a letter a proper name, so that
every letter of the cryptogram is represented by the name of a
person. He may also build on the names of stars, mansions of
the moon, (either according to respective letters of the numerical
alphabet or at random; thus the lunar mansions are in
succession: ura n (for )ا, Bu n (for )ة, Pleiades (for )ط, and so
on until the last one, Ra (for the letter ٧)), months (lunar,
Latin, Coptic, etc.), the number of days in a month, hours of the
day, days of the week and its hours, book names, suras of the
Koran, names of countries, ointments, drugs, an n t*, fruits,
trees, etc., or any other word of his choice repeated every time
the letter it represents occurs. The cryptographer may perform
that verbally, in writing, or as a picture or symbol, such as birds,
animals, plants or trees, whichever he pleases.
It is well worth mentioning here the branched calligraph, which
is based on the words of the numerical alphabet , and
practicable in writing only - i.e. not feasible verbally -. The first
letter of the cryptogram is represented by a single branch on the
right of the trunk if that letter is one of the constituent letters of
the word ()أثغل, which is the first word of the numerical alphabet.
Likewise, if the second letter of the cryptogram is part of the
word ( ( )څڈىthe second word of the numerical alphabet), it is
represented by two branches on the right of the next trunk, and
so on. Note that a maximum number of eight right branches is
possible, which is the total sum of the numerical alphabet words.
Now you look at the position of each letter of the cryptogram
within the word of the numerical alphabet of which it is part;
thus if the first letter of the cryptogram is , say, ( )طyou draw
three branches on the left of the first trunk, because ( )طis the
third letter of the first word of the numerical alphabet. Similarly,
the letter ()ٿ, for example, is represented by four left branches
on the relevant trunk. Clrearly, a number of four left branches in
the maximum possibility for representing a letter, as none of the
numerical alphabet words comprises more than four letters.
*
-There is no reference whatsoever to " an n t" in Arabic dictionaries, hard as I
have searched, though. It might be a scribe's error.-
**
The numerical alphabet is: أثغل, څڈى, ًٞؽ, ٵٺپڀ, ٔٮ٦ٍ, ٱوّذ, صقن, ٨٢ٙ; i.e. أ, ة, ط,
ك, څـ, ڇ, ى, ػ, etc.
74
Example: ( ًٺ٥ ټ٥ )ٽؾپل اثڀis enciphered using the branched
calligraph as follows: (*)
(*)
It is so in the original, but there is an error in branching the two letters ( )اand ()ك.
76
This relates to what has been denominated "relationship and
diffusion", where a genus or species is representative of a letter.
From this emerge thirty-two cipher alphabets, the first of which is
unrestricted - or uncommitted -, the second is restricted - or committed
- to the letter ()ا, the third to the letter ()ة, and so on till the end of the
alphabet.
The encipherer may opt for making the first cipher alphabet
restricted to the letter ()ا, the second cipher alphabet to the letter ()ة,
and so on, changing the restriction either according to the numerical
alphabet ( )أثغلorder or according to the alphabetical order (ا, ة, د, )س.
Examples:
* of encipherment uncommitted to a certain cipher alphabet:
=
* of encipherment committed to the letter ( ):
=
* of encipherment committed to the letter ( ):
=
* of encipherment committed to the letter ( ):
=
* of encipherment committed to the letter ( ):
=
* of encipherment committed to the letter ( ):
=
and so forth.
78
Some generic names may contain a few letters which are difficult
to encipher. This requires the encipherer to be conversant enough with
language, to cope well and make the intended choice.
Encipherment committed to the numerical alphabet may be
exemplified thus:
ٺى اٹلڇاة = ٽؾپل٥ إهثٸ ثُوّڅب ٌُؾپٸ ٽڀ اٹغيٌوح,
while encipherment committed to the alphabet can produce
something like this:
ٺى اٹضٍواٿ = ٽؾپل٥ إهثٸ ثُوّڅب ٌُؾپٸ ٽڀ رجوٌي.
Building on encipherment by substitution using generic names,
the cryptographer can express further purport quite different
from the apparent meaning, such as through commitment to
initial, second, middle, or terminal letters of words, as already
mentioned. He can apply the restriction to all the words of the
cryptogram or only to the words of genera intended in it.
Example: څبٹزڄ ثلهّح رجچوٍٜ ڇ٤ٕچو ٽغڂً اٹپو١ ڈٽبً ٭ٖلٽڄٞهأٌذ ثؾٺت أٍلاً ؽ,
of which ( َ ٽب ڇڅجذ٠ )هَةِ اؽٮis formed by taking the first letter of each
word.
80
It is even better to have the thread made of silk, and assign a certain
colour for each of the 28 letters represented by beads. The beads are
shuffled and recognized by their colours.
[Morphological introduction]
the so-called "al-laf f al-mafrouq"; i.e. (ڇأډ, ڇ٭ى, ڇٱى, ڇكډ, and ى٥)ڇ
respectively. Some Arabic words consist of two letters, e.g. (of verbs):
( ) and ( ); (of articles): ( ٽڀ, ً٭, هة, څٸ, ثٸ,) etc.; (of indeclinable
prepositions): ( ثٴ, )ٹڄ. Some other words (articles, verbs and nouns)
84
There are ten affixing letters; namely, ( څـ, ڇ, ي, د, ا, ٷ, ً, ٻ, أand
)ٿ, rounded up skillfully four times in the following line of verse by
Sheik am l id-D n ibn M lik:
86
The same letter can be repeated in one word no more than five
consecutive times. In the example, ( , the first ٳ
and ).
In several words, a letter can be successively repeated as many
times as nine at most. Consider this verse:
In which the first (( )ككdad) means play or frivolity, the second is a
name of a particular place, and the last is a proper noun of person in
the vocative case.
Note also that there are letters that are noncombinable with each
other in anterior nor in posterior position, some others are combinable
in either anterior or posterior position only.
Those letters which are noncombinable at all are:
س: does not combine with any of these letters: (م, ى, ً, ٓ, and ٗ).
88
ط: does not combine with (ٛ, ٟ, ٧, ٯor )ٳ. The word ( غڀٝ) is not
, , , , , , , ). The
م: does not combine with (ى, ٓ, ٗ, ٛ, ٟ). The word جوىمٝ (=
ى: does not combine with (ً, ٓ, ٗ, ٛ, ٟ). The word ( وىٝ) is
Persian, the word ( ّٛ )اٹ ّيis Nabatean, and the word ( )ٍيis the
imperative form of the Persian verb ( )ٍبى. Also the word ( )ٍيis
90
ً : does not combine with (ٓ, ٗ, ٟ).
ٓ : does not combine with (ٗ, ٟ).
ٗ : does not combine with (ُ, ٟ).
ٛ : does not combine with (ٟ).
ٯ: does not combine with (٧) nor with ٳin a word root, with the
exception of (َٰ٪َ َ( )ځof a crow, to caw; of a she-camel, to پذ٪)ث.
ٳ: does not combine with ( )ؿin a word root.
ٻ: does not combine with (ة, ٫) in a word root except in the word
()٭ټ. The word (=( )ثَټthe lowest string of the lute) is non-Arabic.
The guttural letters - ء, څـ, ٣, ػ, ٧, ؿ- are noncombinable with one
another save the letter ( )څـ, which follows other gutturals in a word at
end position as an affixing letter denoting feminine form or a pronoun.
It also goes after letter (٣) as a basic letter as in: ( چل٥, چڀ٥). Over and
above this, no two gutturals are possible in one root word. However,
the letter ( )څـmay occur after another gutturals, but with a third letter
separating the two gutturals, such as in: ( ٍچت٩, جچو٥). The word ( )ؽٍّچٸ
are compounds.
92
Accordingly, no two of these five gutturals ( څـ, ػ, ٣, ٧, )ؿoccur
together anteriorly in a word besides that mentioned above; nor do
they occur in the middle of a word, except the letter ( )څـwith the letter
(٣) as in: ( ٤ ;)څٺthe letter ( )څـwith (٧) as in ( ٨ٍ ;)أڅand ( )څـwith ()ؿ
The basic ( )څـdoes not combine at all with ()ػ, whereas ؿdoes
combinable with ()ؿ, nor with (٣) except in a compound word such as:
( , ).
Examples: ( , , , , , , , ,
94
Letters combinable in anterior position only or in posterior position
only:
[The letter] سis noncombinable with (ُ) in anterior position.
[The letter] كis noncombinable with (ى, ٓ, ٛ) in anterior position.
That is why [the letter] ىin the word [ ٽچڂلىengineer] has been
replaced by (ً) when Arabized; so we say: (ً )ٽچڂلand ()ٽچڂلٍخ.
[The letter] م is also noncombinable in anterior position with
(ط, ً, ُ, ٣). The word ( )اٹٮبٹڈمطis Persian; when Arabized it became
()٭بٹڈمٯ. Some people pronounce the word ( )اٷڅڈمطwrongly so; the right
form should be ( )اٷڅڈكطwith ( )كrather than ()م. The same applies to the
word ))ٍبمط. The word ( )اٹَڂجبمطis also Persian.
However, [the letter] مcan combine anteriorly only with the letter
( )طproviding that they are separated by one or two letters in between;
e.g. (ثبمهڇط, ثبمڅڂظ, ثبمهځغجڈٌڄ, اٍٮٍناط, )ثبمځغبٿ.
[The letter] ُ is not combinable in posterior position with any of
these letters: (ى, ً, ٓ).
[The letter] ٛ is noncombinable in anterior position with [the letter]
ٳin a root word.
You ought to know the letters that do not occur initially in a word,
such as the letter ( )طwhich does not go initially before (د, ٓ, ٗ, ٧).
However, the word: ( ّٔ )اٹغis Arabized. The word ( )اٹٖڂغخ, where the
third letter ( )ٿseparates (ٓ) and ()ط, is debated among scholars as to
whether it is originally Arabic or Arabized; the fact is that it is
Arabized.
96
You should also know the letters that are seldom combinable with
each other, such as ( ) after ( ) in ( ), the letter ( ) before ( ) in
98
Subsequently you match the symbol or letter frequency of
occurrence in the cryptogram against the pattern of letter frequency
previously mentioned. Bear in mind the following frequency order of
Arabic letters (in descending order): (ا, ٷ, ٻ, ي, ڇ, ٿ, څـ, ه, ً, ة, ٳ, د,
٣, ٫, ٯ, ك, م, ال, ػ, ط, ٓ, ؿ, ُ, ٗ, ى, س, ٛ, ٧ and ٟ).
This is the letter order of frequency in the Holy Koran, although
this order may differ in other language usages. Some deliberately
encipher poetry and prose, dispensing with the letter ()ا, or without
letter-dotting or without idle particles [those that do not affect the
parsing of what follows]. The normal order of letter frequency may
particularly be different when the cipher has few letters, i.e. when it is
too short to cover a whole rotation of the letter order, and
consequently not allowing for proper matching. Hence the prime
significance of the message being long enough.
On cryptanalysing a cipher, the most frequently occurring letter is
considered to be the letter ( ;)اthe next most frequent letter should in
all likelihood be ()ٷ, and what should lend credit to your conjecture is
the fact that in a majority of contexts, ( )ٷfollows ()ا. - to form the
definite article -. You then look into the cipher to see if it contains a
letter of single occurrence throughout. That you would think likely to
be ()ال, on account of the scarce occurrence of the imperative single
letters mentioned earlier.
Then the first words you try to work out in the message are the
bigrams - two-character words - through somehow trying to have
access to the most feasible combinations of their letters, until you are
sure you have discovered something correct in them. You then
examine their forms and write down the equivalents by them
- whenever they occur in the message -. You apply the same principle
to trigrams - three-character words - until you are sure you have got
something, and write out the equivalents - all through the message -.
Tackle tetragrams and pentagrams likewise. Whenever in doubt, posit
two or three or more probable conjectures and write each one down.
Wait until one of the conjectures proves to be the good one from
cryptanalysing other parts of the cipher. Once this is done, you
proceed as such in the rest of the cipher.
100
Remember that the letter preceding the definite article ( )اٷat the
beginning of a word may, all often, be one of these letters: (ة, ٫, ٳor
)ڇ.
A starter cryptanalyst should have each word of the cipher written
separately - to set him going -, and poetry should be written to him in
such a way as to enable him by the aid of metre to solve some letters
like: ( ( )څـdenoting feminine form), (( )دalso denoting femininity), ()ي
(indicating the first person singular), vowels, and the like.
[Example 1]
As an example, let us consider the following lines written in cipher
[by substitution using devised symbols for letters]:
102
We notice the symbol ( ) has far and away higher frequency of
occurrence than all others. We conclude, therefore, that it must be the
letter ()ا, and mark it so on the cryptogram.
The next frequently-occurring symbol is found to be ( ), and so we
settle our choice on the letter ()ٷ, supporting our belief by its
occurrence immediately after ( )اin seven places of the text. We then
trace a single symbol representing a word, which we assume to be ()ال.
We also notice that the third word is a bigram, the other letter of
which is ال. That means it might be one of these possibilities: ( ثال, رال,
عال, ؽال, فال, ٍال, ال٥, ال٩, ٭ال, ٵال, څال, )ڇال.
But yet we realize that the first symbol of that bigram, i.e. , is
repeated elsewhere as initial letter of a word where it is supposed not
to admit being any of these letters: (ط, ػ, ؿ, ً, ٣, ٧ or )څـ. Thus we
rule out the possibilities: ( عال, ؽال, فال, ٍال, ال٥, ال٩ and )څالand retain
the rest, namely: (ثال, رال, ٭ال, ٵالand )ڇال.
Then we notice that the fifth word is a bigram, too, with its second
letter being ()ا. So it might be one of the following words: ( ثب, عب, كا, ما,
ٍب, ّب, بٙ, ٭ب, ٽب, ځبor )ٌب. Seeing that the frequency of the symbol ( ) is
higher than that of all other symbols, we conclude that it would
probably be one of these letters: (ٻ, يor )ٿ. Because ( )ځبis less
common in use, the letter ( )ٿis excluded as unlikely. Therefore the
bigram has to be either ( )ٽبor ( )ٌب. We realize, too, that that symbol
( ) succeed the symbol associated with ()ال, which we believe is
(ة, د, ٫, ٳor )ڇin the trigram ( ). We match the letters with the
letter ( )ٻand get the word ( )رزټonly; then try them again with the letter
( )يand the word )ً )٭ٮcomes out.
104
Subsequently, we find the symbol ( ) repeated no more than four
times throughout. That gives us a strong impression that it is the letter
(٫), and not ()ي, owing to the high frequency expected of the latter in
cryptograms such as this length. Thus we fix on the third word being
( )٭ال, the fifth ( )ٌب, the fifteenth ( ً)٭ٮ, and the single letter ()ال. Our
guess is further promoted by the repetition, in the eleventh word after
()اٷ, of two letters followed by ( )اand another letter. In this case no
letter but ( )ٻcould possibly be repeated when checked against the
letters, so we say: (اٹپپبد, اٹپپبػ, اٹپپبه, ًاٹپپب, ٣)اٹپپب.
We also observe that the frequency of the symbol ( ) comes next
to that of (ا, ٷand )ي, so we conclude it should be any of these
possibilities: (ه, ً, دor ٣), considering that the letter ( )ٻis already
made out, and that it cannot be ( )ٿeither. Thus we mark the symbol
for ( )ٻin its locations.(*)
The symbol ( ) is found to be the initial letter of the fourth trigram
of which the middle and terminal letters have already been
cryptanalysed as ( )ٷand ( )ٻrespectively. On identifying it with the
above letters, the letter ( )هis eliminated, and the word is quite sure to
be one of these: (ٍٺټ, رٺټor ٺټ٥).
In the word next to (اٹپپبد, ٣اٹپپب, ً )اٹپپبthere is a letter prior to ()اٷ
which might be (ة, ٷor )ڇ, the letter (٫) having already been
designated.
(*)
There may be an omission or distortion in scribing this paragraph.
106
We also notice that the symbol ( ) succeeds ( )اٷjust before ()ي. It
اما, اٍبor )اځب. We match the word against the letters (ة, م, ً and )ٿon
condition that (ً) be the terminal letter, but no intelligible vocable is
obtained; thus the word ( )ٍٺټis dropped as irrelevant.
Then we try the word again as before, provided that (٣) this time be
the terminal letter, from which get out, after the initial letter, the word
( ٣)اٹجٍب. We try once more with the letter ( )دand derive these words:
( اٹجٍبد, اٹڂٍبدand )اٹٍَبد. Hence the letter ( )مis excluded and the words:
(اثب, اٍبand )اځبare retained.
Looking into the seventh word, a trigram of which the initial letter
is ()ٷ, the middle is this symbol ( ), and the terminal is ( ) which
can be either (٣) or ()د, we derive the word ( )ٹَذ, dropping the letters
( )ةand ()ٿ. With the ( )ةdropped, the (٣) is also dropped from the
word ( ٣ )اٹجٍبipso facto. That is why the word ( ٤َ )ٹis eliminated. It
follows that the words: ( )اٹٍَئبدand its counterpart ( )اٹپپبد, and also
the trigram ( )رٺټare now hit right, and that the word ( ٺټ٥) turns out
irrelevant. So we mark the letters ( )دand (ً) in their locations, thus
forming the trigram ( )اٍب. As yet the following words of the
cryptogram have been made out: ( ً)٭ال رٺټ ٌب ٹَذ اٹپپبد ال اٍب ٭ٮ, with
the letter just preceding ( )اٹٍَئبدstill obscure.
108
We examine the tenth [word], also a trigram with the two letters
( )دand ( )يalready clear. We check it against the letters, and come
away with the word ( )ؽزىonly, marking the letter ( )ػall through the
cipher.
We switch over to a five-character word, with all its characters
already laid open except the middle letter; thereby we put forward
these possibilities: ( ؽَواد, ؽَٶبد, )ؽَڂبد. Seeing that the symbol ( )
occur at higher frequency than all letters other than (ا, ٷ, يand )د, we
fix upon the word ()ؽَڂبد, the letter ( )ٻhaving already turned out well.
We indicate the ( )ٿin its positions.
Then we consider the symbol ( ) as the initial letter in two three-
character words; of the one we have already known the letters ( ٿand
)ي, and of other the letters ( ٷand )ي. We attempt the letter and find
that it could probably be either (٣ or )ڇ, and so conclude these
possibilities: (ًڂ٥, ًڇځ, ًٺ٥, ً)ڇٹ. But our choice is settled on the letter
(٣) because the frequency of this letter does not rise up to the order
of ((ڇ.
Our attention is also drawn to a heptagram (seven-character word)
of which just one letter is still covert. Upon experimentation with
letters, no other word than ( )اٹجٍزبٿarises.
[The letter ]ةis represented by this symbol ( ) prior to the word
اٹٍَئبد, and so it is labelled in its due positions.
We try likewise at a hexagram (six-character word), the third letter
of which is yet concealed. The word ( )اٹٶزبةshows up.
110
We now consider the five-character word preceding the current
word by two. It has the middle letter still obscure. We experiment with
the letters and get the words: ( ٬ٹپغڂ, ٬ ٹپلځand ٬)ٹپٖڂ. Of these the
context renders necessary the choice of ( ٬ )ٹپٖڂas it is the fittest of all
three to chime in with the word ()اٹٶزبة. So we designate the letter (ٓ).
The same procedure is repeated with the last word, the fourth letter
of which is yet close. In consequence of experimentation with letters,
the word ( ً )اٹپڈٕٺturns out clear, and this gives rise to uncovering the
word ( )أٍٺڈfollowing ()ٹَذ. Thus we label the letter ()ڇ.
We now look at the first word, a bigram starting with the letter )ٓ),
the manipulation of which we have purposely delayed on account of
the infrequency of its letters. Identification unveils the word ( ّ)ٕل.
Labelling the letter ( )كin its locations, we run across another bigram
ending with the letter ()ك, which we match against the rest of letters
unrevealed as yet. These words get out: (عل, []فل, ٱلand )څل.
Then we take up a trigram, the middle letter of which is represented
by the symbol ( ), the initial and terminal letters being ( )دand ()ٷ
respectively. Consequent upon matching the word against the four
letters: (ط, ؿ, ٯand )څـ, the letter ( )څـis dropped as unfeasible, and
these words: (رغٸ, رقٸand )رٲٸremain as possibilities.
It is brought home to us from the context that the word before ( )أٍب
is ( ), and the trigram ( ); thus the statement goes: ()ال رٲٸ ٱل أٍب.
We seek the sixth word, with all its component letters already
unfolded except the second. On experimentation with the rest of
letters, we come away with the word ( ًنڇٹ٥). The letter ( )مis thus
indicated in its positions on the cryptogram.
112
We examine the trigram placed between the words: ( ٬ )ٹپٖڂand
( )اٹٶزبة. This trigram starts with the symbol ( ) followed by ()ما. The
word is decided to be ()څنا, and the letter ( )څـis pointed out throughout.
The pentagram in between ( ً )٭ٮand ( )ٽڂڄis as much treated to
unfold the fourth letter yet covert. The result is the word ()اٹڈعڄ.
The second to last word, a heptagram, is likewise tackled to unveil
the fourth and only remaining letter in the cipher. The word ( )اٹلهٌچټ
flows.
Cryptanalysis thereupon is done, and the plaintext is now
developed full and for good:
114
[Example 2]
let us give another example to further illustrate algorithms towards
cryptanalysis:
116
On scrutinizing the symbols we learn that the highest frequency is
for the symbol , then the following, in descending order: , , ,
and (equally), and (equally), , and and (equally).
That order makes an impression that the symbol represents the letter
( )اand the symbol the letter []ٷ, being higher in frequency than all
others. Our notion is based on the fact that ( )ٷall often goes after ()ا
- to form the definite article -, not so here. The situation gives
evidence to the contrary. We so realize that the symbol is ( )اand
this is ()ٷ, marking them both in their positions on the cryptogram.
The second word holds our attention on the spot: a trigram with the
letter ( )ٷrepeated as initial and middle letters. We match the word
against the letters and find the letter ( )څـonly, which we label
throughout as the terminal letter, and thus come away with the word
()هلل.
We then search the fifth word, a pentagram with the fourth letter
still unknown. In consequence of experimentation the following
possibilities turn up: ( اٹچجب, اٹچغب, اٹچپبand )اٹچڂب. We note that the letter
we are seeking have the highest frequency of all letters next to ( )اand
( ;)ٷso we attach credence to the letter ()ٻ, leaving room for ()ٿ, too,
and dropping the letters ( )ةand ()ط. We resolve on ( )ٻas the choice in
the light of its occurrence before ( )اin two bigrams. Thus the letter ()ٻ
is designated throughout.
We also observe that ( )ٻis followed by a letter that could, together
with ٻ, be one of these bigrams: ( ٽل, ٽن, ٽو, ٌٽ, ٔٽ, ٜٽ, ٤ ٽand )ٽڀ.
Seeing that that letter occurs at high frequency, with that bigram
repeated three times in the cipher, we hold the bigram to be ( )ٽڀ, and
rule out the others as irrelevant possibilities, labelling the ( )ٿin its
locations.
118
Next we consider this frequent symbol before the definite article
at the beginning of words. According to the letter order of occurrence
we fix upon the letter ()ڇ.
We survey the last word of the cryptogram, the terminal letter of
which is its fourth letter unknown as yet. Giving it a trial, we obtain
the words: (ڇاٹجچټ, ڇاٹزچټ, ڇاٹغچټ, ڇاٹلڅټ, ڇاٹَچټ, ڇاٹْچټ, ڇاٹٮچټand )ڇاٹٍچټ.
The symbol in this last word - of the cryptogram - occurs in a
bigram before another letter of which frequency of occurrence comes
next to ()ا, ( )ٷand ( ;)ٻhence we say it might be ()ي. Our belief is
enhanced through another word, with this very symbol still covert.
The word ( )اٹڂچىcomes out, and thereby the preceding word ( ً)أڇٹ, too.
Deciding on ()ي, we match the symbol against it and come away with
(ً )ثand (ً)٭.
We move on to a pentagram, with this symbol standing for the
fourth letter, followed by another letter which we experiment with ))ة
and (٫), and elicit these words: ( اٹٺجش, اٹٺجل, ٌاٹٺج, ٜاٹٺج, اٹٺجٴ, اٹٺٮذ, اٹٺٮظ,
اٹٺٮؼ, ٠ اٹٺٮand ٰ)اٹٺٮ.
Next we find this symbol ( ) representing initial letter in a word,
followed by a double ()ٷ. On trail, these words develop: ( كٹّٺڄ, ٵٺٺڄ, رٺٺڄ,
عٺٺڄ, ؽٺٺڄ, ٺٺڄ١ and )ٱٺٺڄ. The letters ( )سand (ٛ) are dismissed.
120
The following word is a hexagram, with all its component letters
already unfolded except the third. We give it a trial and develop the
words: ( اٹزپبٻ, اٹؾپبٻ, اٹنٽبٻ, اٹْپبٻ, پبٻ٪ اٹand )اٹٶپبٻ. From the context it is
quite easy to educe ( پبٻ٪ٺّٺڄ اٹ١), and, as a corollary, we determine on
the pentagram ( ) and the other word ( )ڇاٹٮچټ, besides the bigram
122
Still unsolved is the third letter, represented by the character ( ),
of the hexagram next to the word ( ْ)ٽِڀ. It is also the third letter of a
tetragram the initial letter of which is ()ا, the second (٫) and the
terminal ()ػ. In yet another word the same character symbolizes the
second letter of a pentagram starting with ()ڇ, ending with ( )څـand
having ( )ػand ( )ةas the third and fourth letters. Consequently the
letter (ٓ) is designated, and the first of the above-described words
thus turns out to be ( )اٹٖڈاة, the second ( )أ٭ٖؼ, and the last ( )ڇٕؾجڄ.
The first word of the second line, a bigram, is thereby developed to be
( )صټ, and the following word ( ;)ٕالحthe letter (ً) of the word ( )اٹَالٻ
shows up, too, so that the hemistich gets all clear and reads: ( صټ ٕالح اهلل
)ڇاٹَالٻ.
It goes without saying that the more one gets and keeps one's hand
in, the faster cryptanalysis is accomplished.
It ensues that the fourth letter of the hexagram following ( )أ٭ٖؼ ٽڀ
is the letter (ٗ) and that the word is (بكٚ)ثبٹ. The context suggests that
the word after ( ٠ )٭ً اٹٺٮis ( ٰٞ)ځ, and so we mark the letter ()ٯ. This
last-mentioned immediately gives rise to the appearance of its
counterpart (ٰ )فٺin the first hemistich of the same line - i.e. the third -.
The letter ( )ؿis so designated as well, and therefore the word ( )فٍو,
preceding ( ٰ)ٽڀ فٺ, manifests itself, and thereupon manifesting the
whole cleartext that flows:
124
- My Lord! By Thy grace I seek guidance;
By Thine inspiration I learn and be favoured.
Bestow Thy divine peace on him, oh, God:
On the Prophet whom a canopy of clouds
Shaded; who was endowed with eloquence;
The gem of humankind of all ages,
And all his folk of reason and intellect. -
That is quite enough for the sapient to be in the fair way to succeed.
God is the One to be sought for help, and unto whom souls are
committed. He is sufficient for us! Most Excellent is He in Whom we
trust. May His bounteous blessing and peace be upon our Prophet
Mu ammad and his magnanimous folk till the Day of Doom. Praise
belongs to God, the Lord of the World.
* * *
(*)
AD 1736.
49
بسن اهلل الشحوي الشحين
1
2
3
)(1
107 3 723 209
723
)(2
)(3
51
1
(1)
927 656
(2)
231 9
53
1 1
2
3
5 4
6
)(1
15 3 231 9
)(4
15 3
523
65 64
)(5
523
)(6
239
55
1
1
(1)
57
59
2
1
(1)
232 9
(2)
232 9
(3)
61
1
(1)
91
(2)
(3)
63
1
(1)
649 646 1
180 5 1194 590 1144 538
111 110 8
(2)
65
3
1
2
4
3
(1)
(2)
(3)
16
67
5
1
3 2
4
(1)
(2)
67 66
53
325 324
(3)
232 9
(4)
(5)
69
1
6
(1)
71
(1)
73
(1)
(2)
232 9
75
1
7
(1)
(2)
(3)
(4)
77
1
4 3
6 5
9 8 7
(1)
262 3
(2)
(3)
142 2
(4)
(5)
(6)
418 2
(7)
393 3
(8)
396 5
(9)
79
8
81
9
(1)
233 9
83
1
(1)
233 9
(2)
234 9
(3)
85
2 1
(1)
34 57 1
13 44 1 61
(2)
235 9
87
1
3 2
6 5
(1)
(2)
(3)
(4)
(5)
235 9
(6)
(7)
89
1
5 4 3 2
10 9 8 7 6
11
12
13
14
(1)
269 134
(2)
154 1 149
(3)
142
(4)
158
(5)
144
(6)
355 353
(7)
142
(8)
144
(9)
(10)
(11)
163
(12)
310 309
(13)
(14)
271
5
91
1
(1)
236 9
(2)
(3)
(4)
(5)
93
2 1
7 6 5
(1)
236 9
(2)
236 9
(3)
(4)
237 9
(5)
(6)
(7)
(8)
95
2 1
(1)
237 9
(2)
(3)
(4)
295
(5)
5 246
(6)
238 9
(7)
238 9
97
3 2 1
5 4
10 9
11
(1)
237 9
(2)
(3)
(4)
(5)
(6)
237 9
(7)
238 9
(8)
239 9
(9)
239 9
(10)
239 9
(11)
239 9
99
1
(1)
238 9
(2)
238 9
(3)
239 9
101
103
105
1
2 1
(1)
(2)
241 9
(3)
242 9
(4)
242 9
107
1
(1)
242 9
(2)
(3)
242 9
109
1
6 5
(1)
242 9
(2)
243 9
(3)
243 9
(4)
243 9
(5)
243 9
(6)
243 9
111
1
(1)
243 9
(2)
243 9
(3)
244 9
113
1
(1)
244 9
(2)
244 9
(3)
244 9
(4)
244 9
115
1
(1)
245 9
117
1
(1)
245 9
(2)
119
1
(1)
246 9
(2)
246 9
(3)
246 9
(4)
246 9
(5)
246 9
121
1
4 3
(1)
247 9
(2)
(3)
247 9
(4)
247 9
123
125
1
(1)
127