11.01.2013 Views

Arabic_Origins_of_Cryptology4

Arabic_Origins_of_Cryptology4

Arabic_Origins_of_Cryptology4

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Series on<br />

<strong>Arabic</strong> <strong>Origins</strong> <strong>of</strong> Cryptology<br />

Volume Four<br />

ibn Dunaynir's Book:<br />

Expositive Chapters on<br />

Cryptanalysis<br />

(Maq id al-Fu l al-Mutar ima an all at-Tar ama)<br />

Series Editors<br />

M. Mrayati, Ph.D.<br />

Y. Meer Alam, Ph.D. M. H. at-Tayyan, Ph.D.<br />

Published by<br />

KFCRIS & KACST


Acknowledgments<br />

The editors <strong>of</strong> this series greatly appreciate the encouragement they<br />

had from Dr. Yahya Mahmoud Ben Jonayd, Secretary General <strong>of</strong><br />

King Faisal Center for Research and Islamic Studies, to publish this<br />

Series. We are also in the debt to Dr. Saleh Athel, the president <strong>of</strong><br />

King Abdulaziz City for Science and Technology (KACST), for<br />

supporting the project <strong>of</strong> translating this series to English.<br />

Many thanks to Dr. Daham Ismail Alani, the Secretary General <strong>of</strong> the<br />

Scientific Council <strong>of</strong> KACST, for all his efforts to make this<br />

publication possible.<br />

The typesetting <strong>of</strong> this bilingual version <strong>of</strong> the series was realized with<br />

skill and dedication by Mr. Ousama Rajab; we <strong>of</strong>fer hearty thanks to<br />

him.<br />

Finally, we would like to mention our recognition to the many who<br />

had previously contributed to the <strong>Arabic</strong> version <strong>of</strong> this series, and<br />

particularly to Dr. Wathek Shaheed, Dr. Shaker al-Faham, the late<br />

Pr<strong>of</strong>. Rateb an-Naffakh, and Dr. Fouad Sezgin.


Series on<br />

<strong>Arabic</strong> <strong>Origins</strong> <strong>of</strong> Cryptology<br />

Volume 4<br />

Translated by<br />

Said M. al-Asaad<br />

Revised by<br />

Mohammed I. al-Suwaiyel, Ph.D.<br />

Ibrahim A. al-Kadi, Ph.D.<br />

Marwan al-Bawab


Contents<br />

List <strong>of</strong> Figures .…........................................................................... vii<br />

List <strong>of</strong> Tables ......…….................................................................... viii<br />

Transliterating <strong>Arabic</strong> words ....................................................... ix<br />

Preface ............................................................................................ xi<br />

Section 1: Analytical Study <strong>of</strong> ibn Dunayn r’s Book:<br />

Expositive Chapters on Cryptanalysis ....................... 1<br />

1.1. Biography <strong>of</strong> ibn Dunayn r ......................…........................... 3<br />

1.2. Study and Analysis <strong>of</strong> ibn Dunayn r’s Book .......................... 5<br />

1.2.1. ibn Dunayn r’s Sources .................................................... 5<br />

1.2.2. ibn Dunayn r’s Cryptological Practice ............................. 8<br />

1.3. Structure <strong>of</strong> the Book ............................................................. 10<br />

1.3.1. Cryptanalysis <strong>of</strong> Prose Ciphers ...................................... 11<br />

1.3.1.1. Principles and Tools <strong>of</strong> Cryptanalysis ...............… 11<br />

1.3.1.2. Types <strong>of</strong> Encipherment .........................…............. 13<br />

1.3.1.3. Algorithms <strong>of</strong> Cryptanalysis ….............................. 15<br />

1.3.1.4. Composite Encipherment ....................................... 32<br />

1.3.2. Cryptanalysis <strong>of</strong> Poetry Ciphers .................................... 47<br />

1.3.2.1. Tools for Cryptanalysing Poetry Ciphers .............. 48<br />

1.3.2.2. On Prosody (Metrics) ............................…............ 49<br />

1.3.2.3. On Rhymes ....................….................................... 49<br />

1.3.2.4. Insight into Writing Knack ...…............................. 50<br />

1.3.2.5. Other Useful Observations .................................... 53<br />

1.3.2.6. Practical Examples .................…........................... 54<br />

1.3.2.7. Conclusion ............................................................. 56<br />

1.4. Originality <strong>of</strong> ibn Dunayn r .................................................. 58<br />

v


Section 2: ibn Dunayn r’s Edited Book:<br />

Expositive Chapters on Cryptanalysis ...................... 60<br />

2.1. Editing Methodology .............................................................62<br />

2.2. Description <strong>of</strong> the Manuscript ............................................... 63<br />

2.3. ibn Dunayn r’s Book (Original <strong>Arabic</strong> Text and English<br />

Translation) ............................................................................ 67<br />

PART ONE. Cryptanalysis <strong>of</strong> Prose Ciphers ........................... 70<br />

� Principles and Tools <strong>of</strong> Cryptanalysis (Chapters 1-2) ..... 72<br />

� Types <strong>of</strong> Encipherment<br />

- Simple (Chapters 3-5) ............................................... 76<br />

- Composite (Chapter 6) .............................................. 82<br />

� Algorithms <strong>of</strong> Cryptanalysis (Chapters 7-35) ................ 84<br />

PART TWO. Cryptanalysis <strong>of</strong> Poetry Ciphers ........................142<br />

� Tools for Cryptanalysing Poetry Ciphers<br />

(Chapters 36-37) ......................................................... 142<br />

� On Prosody (Chapters 38-40) ........................................ 144<br />

� On Rhymes (Chapter 41) ............................................... 148<br />

� Writing Knack (Chapters 42-52) ................................... 154<br />

� Other Useful Observations (Chapters 53-59) ................ 168<br />

- Comment on an important cipher method from The<br />

Two Essays (Chapter 60) ................................... 176<br />

� Practical Examples (Chapters 61-62) ............................ 178<br />

� Conclusion (Chapters 63-66) ......................................... 184<br />

vi


List <strong>of</strong> Figures<br />

1.1. ibn Dunayn r's types <strong>of</strong> encipherment ........................................ 14<br />

1.2. Encipherment by numerical processing using ADWNA .......... . 40<br />

2.1. A photocopy <strong>of</strong> the first sheet <strong>of</strong> ibn Dunayn r's book ............... 64<br />

2.2. A photocopy <strong>of</strong> the second sheet <strong>of</strong> ibn Dunayn r's book ......... 65<br />

2.3. A photocopy <strong>of</strong> the last sheet <strong>of</strong> ibn Dunayn r's book ........….. 66<br />

vii


List <strong>of</strong> Tables<br />

1.1. ibn Dunayn r's work on the orders <strong>of</strong> letter frequency<br />

(statistical cryptanalysis) .......................................................... 18<br />

1.2. Noncombinable letters (in texts) as observed by ibn Dunayn r<br />

(without repetition) .................................................................. 22<br />

1.3. Noncombinable letters (in texts) according to ibn Dunayn r,<br />

arranged alphabetically (with repetition) ................................. 23<br />

1.4. Noncombinable letters as demonstrated in our statistical<br />

analysis <strong>of</strong> <strong>Arabic</strong> roots ........................................................... 24<br />

1.5. Table <strong>of</strong> noncombinable letters as observed by al-Kind ......... 25<br />

1.6. Numerical values <strong>of</strong> letters ....................................................... 36<br />

1.7. Finger-spelling using ADWNA ................................................ 38<br />

1.8. The first <strong>of</strong> ibn Dunayn r's two practical examples .................. 55<br />

1.9. The second <strong>of</strong> ibn Dunayn r's two practical examples ............. 56<br />

viii


Transliterating <strong>Arabic</strong> words<br />

For transliterating <strong>Arabic</strong> words (names, titles, etc.) we have adopted the<br />

International System for the Transliteration <strong>of</strong> <strong>Arabic</strong> characters, devised by the<br />

International Standards Organization (ISO). The system constitutes ISO<br />

Recommendation R233 (December 1961). Given below is this system, with some<br />

additional explanations found to be necessary.<br />

Vowels:<br />

Short<br />

Vowels<br />

Long<br />

Vowels<br />

<strong>Arabic</strong> characters Transliteration Examples<br />

(fat a) a as u in cup.<br />

( amma) u<br />

(kasra) i<br />

ix<br />

as o in rock,<br />

and u in put.<br />

as e in red,<br />

and i in big.<br />

As a in last.<br />

ٚ (preceded by ) as oo in moon.<br />

ٞ (preceded by ) as ee in sheet.<br />

Consonants:<br />

<strong>Arabic</strong><br />

characters<br />

Transliteration Examples<br />

' (e.g. 'amr, 'ibr h m, fu' d, kis ' , t ').<br />

ة b as b in back.<br />

د t as t in tea.<br />

س as th in thin.<br />

ط as g in logic.<br />

ػ (e.g. tim).<br />

ؿ (e.g. lid).<br />

ك d as d in day.<br />

م as th in then.<br />

ه r as r in red.<br />

as a in add (e.g. ' dam, qur' n).


ى z as z in zoo.<br />

ً s as s in soon.<br />

ُ as sh in show.<br />

ص (e.g. mi r).<br />

ض (e.g. ir r).<br />

ط (e.g. riq).<br />

ظ (e.g. fir).<br />

ع (e.g. Abb s).<br />

ؽ (e.g. lib).<br />

ف f as f in few.<br />

ق q (e.g. qur' n).<br />

ن k as k in key.<br />

ي l as l in led.<br />

َ m as m in sum.<br />

ْ n as n in sun.<br />

ـ٘ h as h in hot.<br />

ٚ w as w in wet (e.g. wahab, nawfal).<br />

ٞ y as ie in orient (e.g. y q t, dunayn r).<br />

Notes:<br />

(t ' marb a): In the absolute state, ignored in transliteration (e.g. mad na); in<br />

the construct state, rendered by (t) (mad nat annab ).<br />

(suk n): Ignored in transliteration.<br />

( adda): Rendered by doubling the consonant.<br />

x


Preface<br />

This is the fourth book <strong>of</strong> The <strong>Arabic</strong> <strong>Origins</strong> <strong>of</strong> Cryptology series,<br />

which addresses the cryptological contributions <strong>of</strong> the Arabs, and<br />

translates a number <strong>of</strong> treatises by Arab cryptologists.<br />

An individual book is dedicated to each treatise. The first book was<br />

devoted to the oldest ever found treatise on cryptanalysis, written by<br />

the well-known Arab philosopher al-Kind about 1200 years ago. The<br />

second book <strong>of</strong> the series tackles ibn Adl n's treatise al-mu'allaf lilmalik<br />

al-'A raf (The manual written for King al-A raf). The third<br />

book deals with ibn ad-Durayhim's treatise Mift al-Kun z f al-<br />

Marm z (Key to treasures on clarifying ciphers), while the fourth<br />

book (this one) covers ibn Dunayn r's work. For the time being, nine<br />

books are envisaged, unless more manuscripts are discovered.<br />

In Book One we have devoted a full chapter to study and analyse<br />

the birth <strong>of</strong> cryptology by the Arab civilization. This would highlight<br />

important aspects and prove useful for understanding the whole series.<br />

* * *<br />

This book is divided into two sections. Section 1 is an analytical<br />

study <strong>of</strong> the edited book <strong>of</strong> ibn Dunayn r. It aims at introducing the<br />

book and elucidating difficult or vague points, spotting particular<br />

features and, more remarkably, highlighting aspects <strong>of</strong> originality and<br />

innovation in ibn Dunayn r's book. This section is divided into four<br />

sub-sections: one gives a brief biography <strong>of</strong> ibn Dunayn r, another<br />

provides an account <strong>of</strong> his sources and cryptological practice, a third<br />

details the structure <strong>of</strong> the book as regards cryptanalysis <strong>of</strong> both prose<br />

and poetry ciphers, and a fourth sub-section summing up the<br />

analytical study <strong>of</strong> the book, exposing ibn Dunayn r's cryptological<br />

contributions and aspects <strong>of</strong> originality.<br />

Section 2 comprises an English translation <strong>of</strong> the original <strong>Arabic</strong><br />

text <strong>of</strong> ibn Dunayn r's edited book. It opens with a statement outlining<br />

the editing methodology adopted, which basically conforms to that<br />

commonly used by the scientific community. The edited book is<br />

xi


preceded by a brief description <strong>of</strong> the manuscript, followed by sample<br />

photocopies <strong>of</strong> selected pages from the original.<br />

The task <strong>of</strong> editing the manuscript text was a challenge indeed.<br />

Special care has been taken to present the text in due form. The<br />

English translation appears on the left-hand (even) pages, and the<br />

original <strong>Arabic</strong> text on the right-hand (odd) pages. No effort has been<br />

spared correcting the mistakes and clearing the ambiguities. For ease<br />

<strong>of</strong> reference, individual chapters have been assigned numbers (by the<br />

editors). Wherever appropriate, lead-in headings have been<br />

introduced.<br />

Damascus, May 2005<br />

* * *<br />

Dr. M. Mrayati<br />

Dr. Y. Meer Alam Dr. M. H. Tayyan<br />

xii


Section 1<br />

Analytical Study <strong>of</strong> ibn Dunayn r's Book:<br />

Expositive Chapters on Cryptanalysis<br />

(Maq id al-Fu l al-Mutar ima an all at-Tar ama)


1.1. Biography <strong>of</strong> ibn Dunaynir<br />

He is 'Ibr h m ibn Mu ammad ibn 'Ibr h m ibn Al ibn Hibat<br />

All h ibn Y suf ibn Na r ibn 'A mad, alias ibn Dunayn r 1 al-La m ,<br />

son <strong>of</strong> King Q b s ibn al-Mun ir ibn M ' as-Sam '. Born in Mosul in<br />

AH 583/ AD 1187, he lived during the reign <strong>of</strong> King a - hir z ,<br />

son <strong>of</strong> Sultan Saladin, and governor <strong>of</strong> Aleppo and its administrative<br />

districts (d. AH 613/ AD 1216). He was in the employ <strong>of</strong> Prince Asad<br />

ad-D n A mad ibn Abdull h al-Muhr n on whom he made<br />

panegyrics. He was then reported to have worked for N ir ad-D n<br />

Mu ammad ibn 'Ayy b, king <strong>of</strong> Egypt (d. AH 635/AD 1238).<br />

ibn Dunayn r journeyed between Greater Syria and Egypt and<br />

lauded a number <strong>of</strong> kings and notobilities there. His life ended at the<br />

hands <strong>of</strong> King al- Az z U m n ibn al-Malik al- dil, who crucified<br />

him in as-Subayta Fort near Banyas in the year AH 627/ AD 1229.<br />

His works<br />

According to his biographies, ibn Dunayn r wrote primarily in the<br />

following two fields:<br />

a) Poetry, in which he wrote two books, i.e. his own poetical<br />

collection (divan), and al-K f ilm al-qaw f (Sufficiency in the<br />

science <strong>of</strong> rhymes), which is still missing.<br />

b) Cryptology, the science in which he excelled and was particularly<br />

well-known. a - afad [a biographer and historian, d. AH 764/<br />

AD 1363] has mentioned two books on cryptology by ibn<br />

Dunayn r, i.e.<br />

1. a - ih b an-n im f ilm wa at-tar im (The shooting star<br />

in the science <strong>of</strong> making ciphers), also numbered among the<br />

missing compilations. ibn Dunayn r, however, refers to it in<br />

Maq id al-fu l. 2<br />

1 Diminutive <strong>of</strong> dinar ـــa unit <strong>of</strong> currency.<br />

2 See p.98.<br />

3


2. Maq id al-fu l al-mutar ima an all at-tar ama<br />

(Expositive chapters on cryptanalysis) ـــthe subject <strong>of</strong> this<br />

volume <strong>of</strong> the series.<br />

4


1.2. Study and Analysis <strong>of</strong> ibn Dunaynir's Book<br />

This study involves a general review <strong>of</strong> ibn Dunayn r's Maq id<br />

al-Fu l al-Mutar ima an all at-Tar ama, along the same lines as<br />

in the previous treatises. Thus, the book is to be analysed according to<br />

the order <strong>of</strong> topics that it covers. It has been found useful to add, in<br />

square brackets, explicatory headings to the already numbered<br />

chapters <strong>of</strong> the edited text. This would make life easier for the reader,<br />

and mark the sequence <strong>of</strong> ideas. A full analysis <strong>of</strong> every chapter is<br />

provided, along with illustrative examples where necessary, to rule out<br />

any possibility <strong>of</strong> ambiguity that might be encountered especially by<br />

nonpr<strong>of</strong>essionals. It is only natural, on our part, to highlight ibn<br />

Dunayn r's novel additions to the contributions <strong>of</strong> his predecessors,<br />

and point out his refinements <strong>of</strong> already existing ideas. A brief<br />

appraisal is also given for each <strong>of</strong> the chapters <strong>of</strong> his book, then to<br />

conclude with a statement manifesting the aspects <strong>of</strong> ibn Dunayn r's<br />

originality.<br />

1.2.1. ibn Dunaynir's Sources<br />

In his book, ibn Dunayn r has attained a high degree <strong>of</strong> excellence<br />

as regards his extensive knowledge, precise methodology, and wellorganized<br />

access to both cryptography and cryptanalysis. His sound<br />

systematic approach is in fact an outcome <strong>of</strong> a broad personal<br />

knowledge <strong>of</strong> the work <strong>of</strong> his predecessors in this art; he manages to<br />

make full use <strong>of</strong> their efforts, to set straight their mistakes, to redress<br />

their omissions, as well as to add his own new contributions. ibn<br />

Dunayn r's scientific method is reflected in that he considers<br />

cryptography and cryptanalysis as separate sciences, each having its<br />

own set <strong>of</strong> principles and concepts. He demonstrates this distinction<br />

particularly in the designation <strong>of</strong> two <strong>of</strong> his compilations, namely a -<br />

ih b an-n im f ilm wa at-tar im, which is dedicated to<br />

cryptography, and Maq id al-fu l al-mutar ima an all attar<br />

ama, devoted to cryptanalysis ـــa fact revealing his insistence on<br />

treating them as separate sciences. In this respect he precedes ibn ad-<br />

Durayhim (d. AH 762/ AD 1361) who states in his treatise Mift alkun<br />

z f ' al-marm z, describing the cryptologue's tools: "It is<br />

5


necessary for one experiencing cryptanalysis to develop a thorough<br />

knowledge…" 3<br />

ibn Dunayn r seems keen to glean and marshal whatever earlier<br />

manuscripts he has run down <strong>of</strong> this science. He does proclaim that he<br />

quoted from al-Kind , and from "the Author <strong>of</strong> the Two Essays", as<br />

well as from Ab al- asan ibn ab ab (d. AH 322/ AD 934). It is<br />

also likely that he tapped the works <strong>of</strong> ibn Wahab al-K tib and the<br />

author <strong>of</strong> the book Adab a - u ar ' (The art <strong>of</strong> poets), among other<br />

great figures <strong>of</strong> this art who lived between the third and sixth centuries<br />

<strong>of</strong> the Hegira (9 th - 12 th AD). This is so because ibn Dunayn r's<br />

pr<strong>of</strong>essional scientific life began in the early part <strong>of</strong> the seventh<br />

century <strong>of</strong> the Hegira.<br />

But his main source is really al-Kind 's treatise on cryptanalysis<br />

(Volume One <strong>of</strong> this series). He leans heavily on it and quotes much<br />

<strong>of</strong> its contents, yet he has been shrewd enough to adjust and modify<br />

what he takes, bidding fair to succeed at times, and falling wide <strong>of</strong> the<br />

mark at other times. He does well in explaining the points summed up<br />

by al-Kind , while he misses the mark in overlooking some things that<br />

al-Kind mentions. In this context, ibn Dunayn r's citations are not a<br />

slavish indiscriminate repetition, but a leisurely premeditated practice<br />

based on verification and experimentation. For example, he does not<br />

only cite al-Kind 's computation <strong>of</strong> letter frequency <strong>of</strong> occurrence and<br />

the resultant orders, but also emulates him in reckoning the letters <strong>of</strong><br />

texts that appear in some sheets, and setting the letters in order, as per<br />

his own calculations, and in substantiation <strong>of</strong> al-Kind 's results. At the<br />

beginning <strong>of</strong> Chapter 8 <strong>of</strong> his book, ibn Dunayn r says: "I have<br />

considered the orders <strong>of</strong> letter frequencies according to the reckoning<br />

<strong>of</strong> Ya q b al-Kind , peace be on his soul. He said he had turned to<br />

seven parchments and counted all the orders <strong>of</strong> letter frequency <strong>of</strong><br />

occurrence in them … It so occurred to me to take up [other] written<br />

sheets myself and count the letter frequency orders in them … So it<br />

came home to me the validity <strong>of</strong> the statement <strong>of</strong> Ya q b ibn 'Is q,<br />

peace be on his soul." 4<br />

The fact that ibn Dunayn r adapts his quotations from al-Kind is<br />

maintained by his own statement: "and I abridged that considerably<br />

3 See his treatise, Volume Three <strong>of</strong> this series, p.52.<br />

4 See his book, p.86.<br />

6


such that my version should suffice instead <strong>of</strong> al-Kind 's treatise and<br />

its long-winded prolixity." 5 This very account, however, remains a<br />

moot point, since al-Kind 's treatise is, by rights, a typical example <strong>of</strong><br />

conciseness, concentration and richness ـــa fact which denies the<br />

claim <strong>of</strong> any substitute that can do duty for it, and which refutes any<br />

redundance in it, with the exception perhaps <strong>of</strong> some repetition<br />

marking his treatment <strong>of</strong> letter non-combination.<br />

ibn Dunayn r's enlargement on al-Kind 's text, and also his<br />

acquaintance with the bulk <strong>of</strong> material written on the subject, are<br />

evident in his discussion <strong>of</strong> composite encipherment. He says that<br />

al-Kind did not in the least touch upon it, and that those who dealt<br />

with it later fumbled and disarranged things. He adds: "But I<br />

mentioned a good few <strong>of</strong> them [i.e. composite ciphers] to serve as a<br />

guideline in deciding on unmentioned cases, if any. al-Kind never<br />

attended to composite encipherment except incidentally [without<br />

dwelling on details]. Whoever attempted to deal with it, other than<br />

al-Kind , certainly raved and went astray on that score…". 6<br />

By the same token, ibn Dunayn r proposes novel ideas overlooked<br />

by his predecessors for some reason. For example his approach to<br />

encipherment by utilizing the chessboard to communicate with<br />

someone who is present, and his notion <strong>of</strong> the possibility <strong>of</strong><br />

developing it so as to convey a cipher message to an absent person. As<br />

he puts it: "It [chessboard encipherment] may be employed to address<br />

an absent person in a way I shall tell you without precedent." 7<br />

Among those whom ibn Dunayn r proclaims to have drawn on and<br />

quoted is the Author <strong>of</strong> the Two Essays. This is manifested in his own<br />

words: "Towards the end <strong>of</strong> his Second Essay, the Author <strong>of</strong> the Two<br />

Essays on cryptanalysis states that we are destined to follow an<br />

intricate path." 8 This is the second <strong>of</strong> ibn Dunayn r's sources.<br />

The third reference is Ab al- asan ibn ab ab 's Treatise on<br />

Cryptanalysis. ibn Dunayn r writes: "I have [herein] adduced<br />

something novel that none else had ever broached before, because<br />

5 See his book, p.94.<br />

6 Ibid., p.108.<br />

7 Ibid., p.120.<br />

8 Ibid., p.176.<br />

7


al-Kind 's book [treatise] tackles prose simple encipherment only; and<br />

Ab al- asan's book treats poetry encipherment. Both failed to<br />

develop the topic exhaustively in either case." 9<br />

This shows that ibn Dunayn r is keen to explicitly bring his own<br />

new and original views to notice, insomuch that he asserts that none<br />

had ever before him taken the lead in introducing them. His keenness<br />

is all-<strong>of</strong>ten associated with observing the concepts that his<br />

predecessors overlooked, or imperfectly handled, or those that eluded<br />

their attention. It seems that he opts to cite some <strong>of</strong> his references<br />

especially to point out any one <strong>of</strong> these implications. Upon comparing<br />

ibn Dunayn r's work with that <strong>of</strong> the author <strong>of</strong> Adab a - u ar ' (in his<br />

treatise on cryptanalysis <strong>of</strong> poetry), one realizes that the latter is not<br />

only extensively quoted by ibn Dunayn r, but is sometimes literally<br />

copied in many places.<br />

1.2.2. ibn Dunaynir's Cryptological Practice<br />

In addition to his mastery <strong>of</strong> cryptography and cryptanalysis, ibn<br />

Dunayn r attained high practical expertise. This is evident in the<br />

works he left and the nature <strong>of</strong> activity he pursued. He says, for<br />

instance, concluding his discussion <strong>of</strong> the encipherment implemented<br />

by adding insignificant letters (nulls): "I was asked to cryptanalyse a<br />

ciphered message, but found it incompatible with any <strong>of</strong> the [simple<br />

encipherment] divisions. I pondered on it, sorted out its characters…<br />

and by the good assistance <strong>of</strong> the Almighty, I managed to solve it<br />

straightway." 10 A similar picture <strong>of</strong> ibn Dunayn r's practical<br />

knowledge lies in his statement, closing his argument about composite<br />

encipherment: "And we have straightforward methods out <strong>of</strong><br />

composites… This method is within easy reach <strong>of</strong> the enlightened<br />

people <strong>of</strong> this pr<strong>of</strong>ession, who consider it carefully." 11 It goes without<br />

saying that the last quotation above reflects ibn Dunayn r's conviction<br />

<strong>of</strong> the fact that cryptography is an established science based on rules<br />

9 His book, p.184.<br />

10 Ibid., p.104.<br />

11 Ibid., p.136.<br />

8


and regulations, and exercised by qualified pr<strong>of</strong>essionals, just like<br />

other sciences.<br />

ibn Dunayn r practiced encipherment and cryptanalysis by virtue <strong>of</strong><br />

his personal contacts with a number <strong>of</strong> Ayyubid kings and princes <strong>of</strong><br />

his time, and his approaches to gain their favour in Egypt and Greater<br />

Syria. Considering, as stated earlier, that he was in the employ <strong>of</strong> King<br />

N ir ad-D n Mu ammad ibn 'Ayy b <strong>of</strong> Egypt, and Prince Asad ad-<br />

D n 'A amad ibn Abdull h al-Muhr n , it is all-probable that he has<br />

written this treatise at the behest <strong>of</strong> one <strong>of</strong> the sovereigns <strong>of</strong> the time.<br />

There are reasons to believe that, after the fashion <strong>of</strong> many<br />

cryptologists, he may have made mention <strong>of</strong> the assignment in the<br />

introduction, which was left out by the scribe for some reason. This is<br />

testified right from the outset <strong>of</strong> the treatise: "He [ibn Dunayn r] said,<br />

following the honorific opening statement in praise <strong>of</strong> God and the<br />

introduction: This book is divided into two parts…". 12 We live in<br />

hope <strong>of</strong> time to come and reveal the original <strong>of</strong> this copy so as to set<br />

right our assumptions once and for all.<br />

12 ibn Dunayn r's book, p.70.<br />

9


1.3. Structure <strong>of</strong> the Book<br />

ibn Dunayn r's book is characterized by its rich content and<br />

inclusive coverage <strong>of</strong> the requisites for those engaged in cryptanalysis.<br />

It covers quantitative and qualitative data and a variety <strong>of</strong> algorithms<br />

for cryptanalysis, arranged in a way similar to the arrangement <strong>of</strong> the<br />

compilations <strong>of</strong> cryptology today.<br />

ibn Dunayn r divides his book into two broad parts: The first part<br />

(1.3.1.) treats <strong>of</strong> cryptanalysis <strong>of</strong> prose ciphers, featuring the main<br />

principles and tools there<strong>of</strong>, and surveying, among other things, the<br />

techniques utilized in cryptanalysing the various types <strong>of</strong><br />

encipherment, including what he calls "composite" encipherment. In<br />

addition to his use <strong>of</strong> statistical techniques in cryptanalysis pioneered<br />

earlier by al-Kind , ibn Dunayn r was the first to describe an<br />

arithmetical cipher using the decimal numerical alphabet.<br />

The other part (1.3.2.) addresses algorithms peculiar to the<br />

cryptanalysis <strong>of</strong> poetical ciphers, considering the topics <strong>of</strong> prosody,<br />

rhyme, meter, word-patterns, and principles regulating proper writing<br />

skills. ibn Dunayn r also explores snags that can possibly hamper the<br />

cryptologue's endeavour towards cryptanalysis. He winds up with a<br />

couple <strong>of</strong> practical illustrative examples, followed by verses intended,<br />

he says, for sustained mental exertion in pursuit <strong>of</strong> solution.<br />

This is a bird's eye view <strong>of</strong> ibn Dunayn r's book in its totality. A<br />

systematic analysis <strong>of</strong> the work follows; organized in conformity with<br />

the order <strong>of</strong> chapters in the edited text, so as to help the reader<br />

navigate and keep step, with a view to appreciate the author's ultimate<br />

objectives. We shall augment our analysis with illustrative examples<br />

as <strong>of</strong>ten as necessary, highlighting in the meanwhile the scientific<br />

value <strong>of</strong> ibn Dunayn r's achievement in the light <strong>of</strong> the past from<br />

which he has drawn, and the sophisticated present to which we<br />

belong.<br />

10


1.3.1. Cryptanalysis <strong>of</strong> Prose Ciphers<br />

1.3.1.1. Principles and Tools <strong>of</strong> Cryptanalysis<br />

ibn Dunayn r establishes, right from the beginning, the significant<br />

fact that cryptanalysis is actually based on conjecture, or what is<br />

known in today's terminology as "tentative assumption". This<br />

conjecture is by no means arbitrary, but measured according to fixed<br />

rules and principles "so that what is assumed by the cryptanalyst is an<br />

outcome <strong>of</strong> reasoning and argument by analogy" 13 . ibn Dunayn r<br />

limits the rules and principles in two aspects and one "instrument" 14 .<br />

The first aspect is the conversancy with letter frequency count; the<br />

other is the knowledge <strong>of</strong> variety contact <strong>of</strong> letters; and the instrument<br />

is the familiarity with the methods <strong>of</strong> encipherment.<br />

He then enumerates the personal attributes characteristic <strong>of</strong> the<br />

person involved in this science, i.e. intelligence, observation, tenacity,<br />

insightful delicacy (which helps comprehend underlying obscurity),<br />

keen intuition, equanimity <strong>of</strong> mind, proper flair and apt conjecture.<br />

Chapters 1 & 2<br />

The Quantitative Methods<br />

ibn Dunayn r expands on the two aspects <strong>of</strong> cryptanalysis, using<br />

al-Kind 's term <strong>of</strong> quantitative and qualitative expedients.<br />

By the quantitative expedients he means the utilization <strong>of</strong> letter<br />

frequency <strong>of</strong> occurrence (or frequency count) in the cipher text, and<br />

matching it against the order <strong>of</strong> letter frequency in the given language.<br />

ibn Dunayn r indicates that vowel letters have the highest frequency <strong>of</strong><br />

occurrence in the <strong>Arabic</strong> language. In this respect, however, his<br />

coverage probably falls short <strong>of</strong> al-Kind 's splendid<br />

comprehensiveness and precision <strong>of</strong> treatment. First and foremost, he<br />

fails to be on a level with al-Kind , who gives the exact meaning <strong>of</strong><br />

vowels as including the three long (or major) vowels [i.e. the letters: ا,<br />

ٚ and ٞ], as well as the three short (or minor) ones [i.e. the diacritical<br />

13 See ibn Dunayn r's book, p.70.<br />

14 Ibid., p.72.<br />

11


marks in <strong>Arabic</strong>: fat a, amma and kasra] 15 . This is an important<br />

phonetic question <strong>of</strong> which former linguists were fully conscious.<br />

Then came a time when it was neglected and remained under wraps,<br />

so much so that it was unfortunately attributed to more recent<br />

phoneticians rather than to its real originators.<br />

ibn Dunayn r maintains that the most frequently occurring letters in<br />

<strong>Arabic</strong> are the vowels; but adds the two consonant letters <strong>of</strong> ي (l) and<br />

َ (m), so that the order <strong>of</strong> the highly-frequent letters, according to him,<br />

is: ا (a), ي (l), َ (m), ٚ (w) and ٞ (y). Nevertheless, he considers the<br />

vowels to "have the highest frequency among all letters in all<br />

tongues" 16 . Other letters vary in their frequency from one language<br />

to another. Here ibn Dunayn r reviews some <strong>of</strong> the languages<br />

prevalent there and then, such as Latin, in which the letter ً (s) is<br />

highly frequent 17 ; Seljuk Turkish and Mongol, in both <strong>of</strong> which the<br />

letter ْ (n) has high frequency. But then one wonders why French is<br />

not among these languages, although the Crusades were peaking up at<br />

the time <strong>of</strong> ibn Dunayn r. Considering that ibn ad-Durayhim does<br />

refer to French in the context <strong>of</strong> citing calligraphs and alphabet sizes 18 ,<br />

one finds no good reason why it has slipped ibn Dunayn r's mind. In<br />

fact this question remains to be answered.<br />

The last lines <strong>of</strong> Chapter 2 indicate knowledge, on the part <strong>of</strong> the<br />

author, <strong>of</strong> these different tongues, suggesting a certain degree <strong>of</strong><br />

cryptanalytical practice in them: "If we set out to describe the<br />

algorithms <strong>of</strong> cryptanalysis in each tongue, the book would grow<br />

larger…" 19 .<br />

15<br />

See al-Kind 's treatise, p.170.<br />

16<br />

See his book, p.74. This fact has been established by al-Kind before; see his<br />

treatise (Volume One <strong>of</strong> this series), p.122.<br />

17<br />

This notion has also been mentioned earlier by al-Kind (see his treatise, p.122),<br />

and confirmed by ibn ad-Durayhim later (see his treatise, p.52).<br />

18<br />

See ibn ad-Durayhim's treatise, p.19 and p.54.<br />

19 See ibn Dunayn r's book, p.74.<br />

12


1.3.1.2. Types <strong>of</strong> Encipherment<br />

ibn Dunayn r discusses the types <strong>of</strong> encipherment on almost the<br />

same lines as al-Kind , starting from Chapter 3 through Chapter 6.<br />

We have summed up his citation in a tree-diagram similar to that <strong>of</strong><br />

al-Kind 20 . A quick comparison between the two diagrams shows that<br />

ibn Dunayn r’s drops the encipherment method No. 13., probably<br />

inadvertently due to scribing omission or a scribe’s oversight. This<br />

possibility is supported by the fact that he does mention this method<br />

later when he tackles cryptanalysis. In fact there is nothing<br />

particularly novel in ibn Dunayn r’s discussion <strong>of</strong> the types <strong>of</strong><br />

encipherment except his separating up composite encipherment into<br />

two divisions, which will be explored in detail later in this study, in<br />

the course <strong>of</strong> handling algorithms <strong>of</strong> cryptanalysis.<br />

It is worthy to note that these divisions <strong>of</strong> encipherment include the<br />

three established conventional divisions adopted to date <strong>of</strong> this<br />

science. These are:<br />

1. Concealment Cipher<br />

This includes all the cases pertaining to encipherment by changing<br />

letters with conceptual relationship and diffusion. It is done by<br />

choosing words for each letter, with a relation <strong>of</strong> some kind between<br />

them. The true letters are replaced by words, chosen such as to form a<br />

plausible-sounding plaintext in which it is impossible to suspect the<br />

existence <strong>of</strong> a secret message. This method is customarily attributed to<br />

the German Trithemius (1462-1516); modern findings, however,<br />

confirm, beyond a doubt, that it was documented by the Arabs several<br />

centuries before.<br />

2. Transposition Cipher<br />

This involves all the cases that belong to the encipherment by retaining<br />

the forms (identities) <strong>of</strong> letters, by changing their relative positions.<br />

3. Substitution Cipher<br />

This embraces all the cases that fall under encipherment by<br />

changing the forms (identities) <strong>of</strong> letters without relationship and<br />

diffusion.<br />

20 See al-Kind ’s treatise (Volume One <strong>of</strong> this series), p.87 and p.144.<br />

13


Linking<br />

separate<br />

letters<br />

Some<br />

letters<br />

Composite (or Super-) Encipherment<br />

Corollaries <strong>of</strong> combining<br />

simple methods<br />

All<br />

letters<br />

Qualitative<br />

Letters retain their forms<br />

Separating<br />

linked<br />

letters<br />

Some<br />

letters<br />

All<br />

letters<br />

Combining simple methods<br />

Repetition<br />

<strong>of</strong> letters<br />

Some<br />

letters<br />

Quantitative<br />

All<br />

letters<br />

Merging<br />

letters<br />

Some<br />

letters<br />

All<br />

letters<br />

Figure 1.1.<br />

ibn Dunayn r’s Types <strong>of</strong> Encipherment<br />

One<br />

null<br />

Simple Encipherment<br />

Addition or<br />

omission<br />

nulls<br />

Without relationship<br />

and diffusion<br />

14<br />

Letters change their forms<br />

With relationship<br />

and diffusion<br />

Transposition Simple substitution Species Genus<br />

No nulls<br />

Several<br />

nulls<br />

Simple<br />

Transposition<br />

Transposition<br />

(word or line)<br />

Transposition (letter)<br />

?<br />

Cipher alphabet<br />

<strong>of</strong> devised shapes<br />

or symbols<br />

Polyword<br />

Polygraphic Monographic<br />

Monoword <br />

Polyword <br />

Monoword


1.3.1.3. Algorithms <strong>of</strong> Cryptanalysis<br />

ibn Dunayn r elaborates, in eleven chapters (i.e. Chapters 7 through<br />

17), the different cryptanalysis algorithms related to simple<br />

encipherment methods, outlining the quantitative (statistical) and<br />

qualitative (textural) methods. In the next seventeen chapters (i.e.<br />

Chapters 18-35) he turns to discuss composite encipherment, its<br />

methods and algorithms <strong>of</strong> cryptanalysis.<br />

The following table depicts some <strong>of</strong> the algorithms for<br />

cryptanalysing individual cipher methods, identified by their numbers<br />

in al-Kind 's tree diagram 21 against their corresponding chapter<br />

numbers in ibn Dunayn r’s book:<br />

Cryptanalysis <strong>of</strong> cipher method no. 14 Chapter 7<br />

Cryptanalysis <strong>of</strong> cipher method no. 15 Chapter 7<br />

Cryptanalysis <strong>of</strong> cipher method no. 13 Chapter 11<br />

Cryptanalysis <strong>of</strong> cipher method no. 14 Chapter 12<br />

Cryptanalysis <strong>of</strong> cipher method no. 19 Chapter 13<br />

Cryptanalysis <strong>of</strong> composite cipher method no. (15+19) Chapter 13<br />

Cryptanalysis <strong>of</strong> cipher method no. 20 Chapter 13<br />

Cryptanalysis <strong>of</strong> cipher method no. 21 Chapter 14<br />

Cryptanalysis <strong>of</strong> cipher method no. 22 Chapter 15<br />

Cryptanalysis <strong>of</strong> cipher method no. 22 Chapter 16<br />

Cryptanalysis <strong>of</strong> cipher method no. 7 and 8 Chapter 17<br />

Next, each chapter will be examined individually as follows:<br />

Chapter 7<br />

Cryptanalysis <strong>of</strong> Simple Substitution Cipher 22<br />

This method is known, in today's terminology, as the<br />

monoalphabetic simple substitution. In this method "every letter is<br />

represented by a symbol that is unique to it," 23 ibn Dunayn r says.<br />

The cryptanalysis is accomplished according to the following steps:<br />

21 See Volume One (<strong>of</strong> this series ), p.87.<br />

22 Methods Nos. 14 and 15.<br />

23 See his book, p.84.<br />

15


1. Counting the enciphered forms (symbols), and arranging them in<br />

a list.<br />

2. Establishing the frequency <strong>of</strong> occurrence <strong>of</strong> each form, and<br />

affixing the frequency numbers to the respective forms.<br />

3. Disposing the forms in descending order <strong>of</strong> frequency.<br />

4. Writing down the language letters, conformably with their order<br />

<strong>of</strong> frequency, against the corresponding forms in cipher.<br />

5. Maneuvering for correct combination <strong>of</strong> letters and intelligible<br />

articulateness <strong>of</strong> words.<br />

6.Turning over intractable forms again and over again, assuming all<br />

possible alternatives and combinations, and using fair<br />

conjecture, until the cipher makes sense.<br />

ibn Dunayn r then goes to mention the orders <strong>of</strong> the letters <strong>of</strong><br />

highest frequency <strong>of</strong> occurrence in the <strong>Arabic</strong> language. These are:<br />

ا, ي, ٚ, َ, ـ٘, ٞ, and ْ. Perhaps his full awareness <strong>of</strong> the importance <strong>of</strong><br />

this group <strong>of</strong> letters makes him reiterate them elsewhere, but with the<br />

slight difference where the letter َ comes before the letter ٚ. 24<br />

Chapter 8<br />

Orders <strong>of</strong> <strong>Arabic</strong> Letters,<br />

or the Quantitative Method<br />

The application <strong>of</strong> the approach described in Chapter 7 demands a<br />

knowledge <strong>of</strong> the orders <strong>of</strong> <strong>Arabic</strong> letter frequency <strong>of</strong> occurrence in<br />

typical clear texts. ibn Dunayn r states that he has come to know<br />

these orders from al-Kind 's treatise, and that he has conducted his<br />

own count <strong>of</strong> letter frequency in a three-sheet <strong>Arabic</strong> text. As he puts<br />

it: "It so occurred to me to take up [other] written sheets myself and<br />

count the letter frequency orders in them. Thus I took three sheets <strong>of</strong><br />

prose epistolary texts and I calculated the frequency <strong>of</strong> the letter ا (alif);<br />

it turned out to be… So it came home to me the validity <strong>of</strong> the<br />

statement <strong>of</strong> Ya q b ibn Is q [al-Kind ], peace be on his soul." 25 ibn<br />

Dunayn r's statement bespeaks an exquisite scientific technique that is<br />

worthy <strong>of</strong> note: He begins by studying the works <strong>of</strong> his predecessors,<br />

then he systematically verifies his results, through the independent<br />

24 See his book, p.86.<br />

25 Ibid., p.86.<br />

16


examination <strong>of</strong> samples <strong>of</strong> appropriate data. This, needless to say, is a<br />

principle <strong>of</strong> vital importance in statistical linguistics today, and a<br />

prerequisite for sound results, taking into account a period <strong>of</strong> eight<br />

long centuries that separate him from us. It should be pointed out that<br />

the total number <strong>of</strong> letters contained in those sheets was 3430,<br />

amounting to around 1100 letters per sheet and 550 letters per page.<br />

The following table (Table 1.1.) lists ibn Dunayn r's statistical<br />

findings as regards frequencies, in three sheets, <strong>of</strong> the letters <strong>of</strong> the<br />

<strong>Arabic</strong> alphabet, rendered in descending order <strong>of</strong> occurrence.<br />

17


Letter<br />

Frequency <strong>of</strong><br />

occurrence<br />

Percentage <strong>of</strong><br />

occurrence<br />

ا 575 16.76 %<br />

ي 360 10.50 %<br />

َ 265 7.73 %<br />

ـ٘ 260 7.58 %<br />

ٚ 250 7.29 %<br />

ٞ 230 6.71 %<br />

ْ 225 6.56 %<br />

ه 195 5.69 %<br />

ع 170 4.96 %<br />

ف 145 4.23 %<br />

د 115 3.35 %<br />

ة 105 3.06 %<br />

ن 95 2.77 %<br />

ك 80 2.33 %<br />

ً 75 2.19 %<br />

ق 62 1.81 %<br />

ػ 50 1.46 %<br />

ط 43 1.25 %<br />

م 32 0.93 %<br />

ص 28 0.82 %<br />

ُ 17 0.50 %<br />

ؿ 13 0.37 %<br />

س 11 0.32 %<br />

ى 9 0.26 %<br />

ط 8 0.23 %<br />

ظ 7 0.20 %<br />

ؽ 5 0.14 %<br />

ض 0 0.00 %<br />

Total/ % 3430 100 %<br />

Table 1.1. ibn Dunayn r's work on the orders <strong>of</strong> letter frequency 26<br />

(statistical cryptanalysis)<br />

One point that is highly relevant, and probably unknown to some,<br />

is that the computation <strong>of</strong> <strong>Arabic</strong> root-letters differs from the<br />

computation <strong>of</strong> word-letters as such; hence the disparity in the orders<br />

<strong>of</strong> letter occurrence in each case. The letter ه (r), a moderatefrequency<br />

letter in words, takes precedence over high-frequency<br />

letters in <strong>Arabic</strong> roots. It goes without saying that, to cryptologists,<br />

26 -Cf. al-Kind 's table in Volume One, p.58.-<br />

18


letter orders relate to full words including affixes (rather than roots<br />

only).<br />

Chapter 9<br />

Preamble to Letter Combination<br />

In this chapter ibn Dunayn r discusses the second principle <strong>of</strong><br />

cryptanalysis; it is based on making use <strong>of</strong> linguistic knowledge<br />

associated with the combination and non-combination <strong>of</strong> letters in<br />

language. The effective utilization <strong>of</strong> this principle is related to the<br />

length <strong>of</strong> the message or the sufficiency <strong>of</strong> the number <strong>of</strong> its letters.<br />

A very short cryptogram implies a shortage <strong>of</strong> constituent words and<br />

letters ـــa factor that precludes the proper application <strong>of</strong> the statistical<br />

laws and calls for using the qualitative tool <strong>of</strong> cryptanalysis instead.<br />

This in itself is a skilful gesture on the part <strong>of</strong> ibn Dunayn r, reflecting<br />

his familiarity with the principle <strong>of</strong> the so-called law <strong>of</strong> large numbers.<br />

He says: "If the cryptogram is very short, there exists insufficiency in<br />

it <strong>of</strong> the frequency <strong>of</strong> letter occurrence. The expedient for cryptanalysis<br />

to be used here is to determine those letters [<strong>of</strong> the alphabet] which<br />

admit combination with each other, and those which do not…until<br />

[the cryptologue] elicits the intended meaning <strong>of</strong> that scant cipher." 27<br />

ibn Dunayn r, however, is not the first to point out to this issue;<br />

al-Kind takes the lead on that score when he states in his treatise on<br />

cryptanalysis that "it could happen sometimes that short cryptograms<br />

are encountered, too short to contain all the symbols <strong>of</strong> the alphabet,<br />

and where the order <strong>of</strong> letter frequency cannot be applied. Indeed the<br />

order <strong>of</strong> letter frequency can normally be applied in long texts, where<br />

the scarcity <strong>of</strong> letters in one part <strong>of</strong> the text is compensated for by their<br />

abundance in another part. Consequently, if the cryptogram was too<br />

short, then the correlation between the order <strong>of</strong> letter frequency in it<br />

and in that <strong>of</strong> the language would no longer be reliable, and thereupon<br />

you should use another, qualitative expedient in cryptanalysing the<br />

letters."<br />

28 A simple comparison immediately shows that al-Kind 's<br />

statement, though three centuries earlier than ibn Dunayn r's, is richer,<br />

more precise and transparent.<br />

27 See ibn Dunayn r's book, p.88.<br />

28 See al-Kind 's treatise in Volume One, p.124 and p.126.<br />

19


Some <strong>of</strong> ibn Dunayn r's successors also make reference to how<br />

critical the length <strong>of</strong> the cryptogram is. An example is ibn Adl n (d.<br />

29<br />

AH 666/ AD 1268) , who goes a step further to set a minimum<br />

length to the cipher sought for cryptanalysis. He writes: "The length <strong>of</strong><br />

the text to be cryptanalysed should be at least in the neighborhood <strong>of</strong><br />

ninety letters as a rule <strong>of</strong> thumb, because the letters thus would have<br />

had three rotations, Yet, the number <strong>of</strong> letters may be less than that in<br />

certain cases." 30<br />

ibn Dunayn r concludes this chapter by maintaining that decryption<br />

by the qualitative means requires considerable pr<strong>of</strong>essional expertise.<br />

He undertakes to establish, in the next chapter, what he terms "the<br />

rules <strong>of</strong> this art", by means <strong>of</strong> a "simplified" table <strong>of</strong> those <strong>Arabic</strong><br />

letters which are combinable and those which are not.<br />

Chapter 10<br />

Combination <strong>of</strong> Letters,<br />

or the Qualitative Method<br />

This chapter can be aptly described as a summary <strong>of</strong> al-Kind 's<br />

ideas regarding letter combination and non-combination, although<br />

ibn Dunayn r falls comparatively short <strong>of</strong> al-Kind 's finesse in<br />

expounding the combination phenomenon. He states towards the end<br />

<strong>of</strong> the chapter: "…and I abridged that considerably such that my<br />

version should suffice instead <strong>of</strong> al-Kind 's treatise and its longwinded<br />

prolixity". 31 In point <strong>of</strong> fact, however, al-Kind 's investigation<br />

<strong>of</strong> the laws regulating combination and non-combination <strong>of</strong> each<br />

<strong>Arabic</strong> letter, although sometimes characterized by repetition, proves<br />

otherwise very useful because these laws are, by nature, so prone to<br />

ambiguity, misspelling or distortion that their repetition by al-Kind<br />

guards against any possible misrepresentation. ibn Dunayn r's<br />

contribution in this respect has been to round up the scattered rules,<br />

bring them together, and eliminate repetition by means <strong>of</strong> presenting<br />

them in one table, which itself is not without repetition in more places<br />

than one.<br />

29 -In fact ibn Adl n was a contemporary, rather than a successor, <strong>of</strong> ibn Dunayn r,<br />

although he outlived ibn Dunayn r by some 40 years.- (Translator)<br />

30 See ibn Adl n's treatise (Volume Two <strong>of</strong> this series), p.52.<br />

31 See ibn Dunayn r's book, p.94.<br />

20


ibn Dunayn r divides <strong>Arabic</strong> letters into four groups:<br />

1. Letters which combine with all other letters in both anterior and<br />

posterior positions, i.e. pre-positively and post-positively. These<br />

are: ا a, ة b, د t, ف f, ن k, ي l, َ m, ْ n, ـ٘ h, ٚ w/ , and ٞ y/ .<br />

2. Letters that do not combine with some others neither in anterior<br />

nor in posterior position. This relates particularly to the letters<br />

that belong for their utterance to points quite close together in<br />

the human articulatory system, such as the apical letters ( ى z, ً<br />

s, ص ) in relation to each other, gingival letters (س , م , ظ ),<br />

and some <strong>of</strong> the guttural letters.<br />

3. Letters that combine with some others in anterior position, but<br />

do not combine in posterior position, such as the letter (ُ )<br />

with ى z, ً s, ظ , ص , س , م ,…<br />

4. Letters that combine with some others in posterior positions, but<br />

do not combine in anterior positions, such as the letter (م ) with<br />

ُ and ؽ ; and (ى z) with ُ and ض …<br />

ibn Dunayn r's table <strong>of</strong> letter combination covers the last three<br />

groups, excluding the first, since it is considered as being the<br />

32<br />

baseline. Immediately noticeable in his table is the needless<br />

repetition <strong>of</strong> letters in his treatment <strong>of</strong> the second group (i.e. letters<br />

non-combinable anteriorly nor posteriorly). This is due to his citing a<br />

certain letter against all those non-combinable with it, then citing it<br />

again upon handling each <strong>of</strong> those letters individually. For example,<br />

he starts his table with the letter ً s, citing all the letters noncombinable<br />

with it anteriorly nor posteriorly. He then reiterates the<br />

letter ً s when he treats each <strong>of</strong> those letters non-combinable with it.<br />

Consequently, we have opted to make a table <strong>of</strong> our own (Table 1.2.),<br />

incorporating the content <strong>of</strong> ibn Dunayn r's without repetition, along<br />

with another table (Table 1.3.) presenting the letters in alphabetical<br />

order, flanked on the right-hand side by the anterior non-combinables,<br />

and on the left-hand side by the posterior ones. Besides, a third table<br />

(Table 1.4.) is given representing non-combinable letters in <strong>Arabic</strong><br />

roots (radicals); it is based on the outcome <strong>of</strong> a comperhensive<br />

statistical study we have conducted on five major <strong>Arabic</strong> dictionaries,<br />

foremost <strong>of</strong> which are Lis n al- Arab and al-Q m s al-Mu . al-<br />

32 However, al-Kind mentions it "in the interest <strong>of</strong> making the statement most<br />

explicit". See al-Kind 's treatise, p.200.<br />

21


Kind 's table (Table 1.5.) has also been found useful to quote here for<br />

comparative purposes. Together, these tables would serve to facilitate<br />

comparison and educe the results that follow.<br />

Letter(s) non-combinable with it<br />

ى ض ص ظ م س<br />

ظ ض ص ى م<br />

ض ص ظ ى ط<br />

ض ظ ط<br />

ُ ظ ط<br />

ط ط ك<br />

ؽ ػ<br />

ؽ ط ق<br />

ظ ص<br />

ع ػ<br />

ع<br />

ؽ ُ<br />

ض ُ<br />

ُ ط<br />

ق<br />

ض ى ص<br />

ى<br />

ؽ ؿ ُ ق ػ<br />

س ً<br />

ؽ<br />

ُ<br />

22<br />

Sign Letter<br />

ً<br />

س<br />

م<br />

ص<br />

ض<br />

ظ<br />

ؿ<br />

ط<br />

ى<br />

ؽ<br />

ػ<br />

م<br />

ى<br />

ص<br />

ض<br />

ك<br />

ط<br />

ظ<br />

ُ<br />

ق<br />

س<br />

Table 1.2. Noncombinable letters (in texts) as observed by ibn Dunayn r<br />

(without repetition).<br />

N.B. non-combinable in anterior position (pre-positively)<br />

non-combinable in posterior position (post-positively)<br />

non-combinable in both anterior and posterior positions (pre- and<br />

post-positively)


Posterior non-combinables<br />

ظ ض ص ُ ً ى م<br />

ق ؽ ظ ط<br />

ؽ ع ؿ<br />

ؽ ػ<br />

ض ص ظ ى<br />

ؽ ظ ط ض ص ُ ً ى س<br />

ظ ض ص ُ ً م س<br />

ظ ض ص ُ ى م س<br />

ض<br />

ظ ط ض ُ ً ى م ط س<br />

ق ظ ط ص ُ ً م س<br />

ظ ض ص ى م<br />

ق ؽ ط ض ص ُ ً ى م ك ؿ ػ ط س<br />

ع ؿ ػ ط<br />

Letter Anterior non-combinables<br />

س ظ ض ص ً ى م<br />

ط ق ؽ ظ ط<br />

ػ ؽ ع ظ ؿ<br />

ؿ ؽ ظ ػ<br />

ك ظ<br />

م ظ ط ض ص ً ى س<br />

ى ظ ط ص ً م ك س<br />

ً ظ ض ص ى م س<br />

ُ ظ ض ص ً ى م س<br />

ص ظ ط ض ً ى م ك س<br />

ض ظ ط ص ُ ً ى م ك س<br />

ط ظ ض ص م<br />

ظ ط ض ص ً ى م ك ط س<br />

ؽ ق ع ظ م ؿ ػ ط<br />

Table 1.3. Noncombinable letters (in texts) according to ibn Dunayn r,<br />

arranged alphabetically (with repetition).<br />

23


Letter(s) non-combinable with it pre-positively Letter<br />

ع ء<br />

ء<br />

ف<br />

ة<br />

ط ض ص م ظ<br />

د<br />

ُ ظ ض ص ً ى م<br />

س<br />

ظ ق ؽ د<br />

ط<br />

ؿ ـ٘ ؽ ع<br />

ػ<br />

ن ػ ـ٘ ؽ ء<br />

ؿ<br />

ظ ض ط د<br />

ك<br />

ط ك ظ ض ص ُ ً ى س د<br />

م<br />

ظ<br />

ه<br />

م ظ ض ص ُ ً س<br />

ى<br />

ظ ض ص ُ ى س<br />

ً<br />

ض ُ<br />

ى م ظ ض ُ ً س ص<br />

ق ُ س د ظ ص ً م<br />

ض<br />

ظ ض ص م د<br />

ط<br />

ُ ً ى م ك<br />

ن<br />

ؿ<br />

ق<br />

ػ<br />

ؽ<br />

ط<br />

ط<br />

س<br />

ض<br />

د<br />

ص<br />

ظ<br />

ؽ ؿ ػ ء<br />

ع<br />

ن ع ؿ ط ػ ء<br />

ؽ<br />

ة<br />

ف<br />

ن ط<br />

ق<br />

ق ط<br />

ن<br />

ف ة<br />

َ<br />

ظ ؿ ػ<br />

ـ٘<br />

Table 1.4. Noncombinable letters as demonstrated in our statistical<br />

analysis <strong>of</strong> <strong>Arabic</strong> roots 33 .<br />

33 Extracted from al-Mu am al- Arab : dir sa 'i 'iyya lidawar n al- ur f f alu<br />

r al- Arabiyya (The <strong>Arabic</strong> Dictionary: A Statistical Study <strong>of</strong> Letter<br />

Frequencies in <strong>Arabic</strong> Roots); Table no. 60, p.205.<br />

24


Resultant noncombinable bigrams<br />

25<br />

Letter(s)<br />

noncombinable with it<br />

Sign<br />

Letter<br />

Table 1.5. Table <strong>of</strong> noncombinable letters as observed by al-Kind<br />

Key: pre-positively (anteriorly)<br />

post-positively (posteriorly)<br />

neither post- nor pre-positively.


Results <strong>of</strong> Comparison<br />

A. Between ibn Dunayn r's table and al-Kind 's table:<br />

Upon checking ibn Dunayn r's table against that <strong>of</strong> al-Kind , we see<br />

that ibn Dunayn r correctly adds one bigram <strong>of</strong> non-combinable letters<br />

to those <strong>of</strong> al-Kind , i.e. the bigram (ؽ ظ), while he incorrectly misses<br />

one, i.e. the bigram (ط ك).<br />

B. Between ibn Dunayn r's table and that <strong>of</strong> the <strong>Arabic</strong>-root<br />

statistical findings:<br />

An essential difference between the table <strong>of</strong> ibn Dunayn r (and that<br />

<strong>of</strong> al-Kind before) and our <strong>Arabic</strong>-root table is that while the former<br />

deals with <strong>Arabic</strong> words just as they occur in context, the latter treats<br />

<strong>of</strong> <strong>Arabic</strong> roots only (without affixation); hence its inclusion <strong>of</strong> noncombination<br />

cases not covered by ibn Dunayn r. This is quite natural a<br />

phenomenon because the area <strong>of</strong> non-combining letters grows wider<br />

the narrower the word inflection becomes, and the more the word is<br />

divested <strong>of</strong> its affixes, so much so that the non-combination scope<br />

culminates in root-words. Conversely, the non-combining letters grow<br />

less and progressively dwindle the broader the word inflection<br />

becomes, and the more the word is linked up with prefixes and<br />

suffixes. Thus the scope <strong>of</strong> non-combination keeps tightening until it<br />

becomes narrowest in words usually used in context and ordinary<br />

speech, regardless <strong>of</strong> their being bare, augmented, prefixed, suffixed,<br />

etc.<br />

As a matter <strong>of</strong> fact, al-Kind ـــ and indeed all later cryptologists,<br />

including ibn Dunayn r ـــ does not state explicitly the technique he<br />

adopts in constructing his rules <strong>of</strong> non-combination. However,<br />

contextual connections show his intention to be the ordinary speech as<br />

such. This is in evidence first from the fact that the examples he<br />

invokes <strong>of</strong> letters that combine pre-positively only or post-positively<br />

only do involve augmented as well as uaugmented words alike.<br />

Second, and this is no slight evidence, is his division <strong>of</strong> letters into<br />

basic ( ur f 'a liyya), which are always original and form an intrinsic<br />

part <strong>of</strong> words; and variable ( ur f muta ayyira), which may be now<br />

basic and now affixing ( ur f az-ziy da) and include the well-known<br />

affixing letters ـــthose making up the <strong>Arabic</strong> word (بٙ١ّٔٛزٌؤٍ), plus the<br />

letters: ة, ف and ن. His addition <strong>of</strong> these last three to the affixing<br />

letters is an extra indication that he actually intends words ordinarily<br />

used in speech and writing, because the affixings alone do not cover<br />

all the letters that may be added to root words, so as to consummate a<br />

26


word inflection in time, number, gender, genitive, comparison,<br />

causality, succession, and the like 34 .<br />

One more point that is crucially important to note is that these rules<br />

<strong>of</strong> non-combination are effectively utilized in cryptanalysis so long as<br />

the ciphertext is "spaced", that is provided with word spacers, but they<br />

practically prove useless in no-word-spacers. That is so on account <strong>of</strong><br />

the possibility then <strong>of</strong> the occurrence <strong>of</strong> two consecutive<br />

non-combinable letters from two originally separate (but adjacent)<br />

letters, such as the occurrence <strong>of</strong> the letter (ً s) at the end <strong>of</strong> a word<br />

and the letter (م ) at the beginning <strong>of</strong> the next word, e.g. … ٚم ًِهلِ.<br />

In fact no-word-spacer encipherment is considered among the most<br />

intricate types <strong>of</strong> simple encipherment, since the cryptologue then fails<br />

to make use <strong>of</strong> a good few cryptanalysis algorithms, such as initial and<br />

final letters <strong>of</strong> words, word lengths (bigrams, trigrams, etc.), the<br />

frequency <strong>of</strong> the space symbol, and combination and noncombination<br />

<strong>of</strong> letters.<br />

Chapter 11<br />

Simple Substitution<br />

This chapter handles encipherment by simple substitution 35 . It is<br />

done by substituting for each letter the form <strong>of</strong> another, such as using<br />

the form <strong>of</strong> the letter (a) to mean the letter (b), and the form <strong>of</strong> (b) to<br />

indicate (a); (d) for (c) and (c) for (d), and so forth. In today's<br />

terminology this method <strong>of</strong> encipherment is called monalphabetic<br />

simple substitution. ibn Dunayn r here makes reference to his other<br />

book a ih a i i a at-tar i (The shooting star in<br />

the science <strong>of</strong> making ciphers), where he elaborates the cryptanalysis<br />

algorithms <strong>of</strong> this method. However, he indicates that the process has<br />

been outlined earlier, meaning in Chapter 7, as part <strong>of</strong> treating the<br />

quantitative principles <strong>of</strong> cryptanalysis.<br />

34 See al-Kind 's treatise in Volume One, p.174.<br />

35 This is the method no.13 in al-Kind 's tree diagram <strong>of</strong> the types <strong>of</strong> encipherment;<br />

see Volume One, p.144.<br />

27


Chapter 12<br />

Substitution Using Devised Forms<br />

This is a variety <strong>of</strong> monographic substitution [corresponding to the<br />

method no.14 in al-Kind 's tree diagram], in which encipherment is<br />

accomplished by changing letter forms into symbols not pertaining to<br />

letter forms (substitution by symbol). For example, given that a= =m ,ٱ<br />

Ø , n= Ω, the word "man" is enciphered: ØٱΩ.<br />

A possible variation <strong>of</strong> this method is to retain some <strong>of</strong> the<br />

plaintext letters beside their respective devised forms. The above<br />

example may look like this: a= ٱ, m= Øm , n= Ωn, and the word "man"<br />

becomes: ØmٱΩn.<br />

Cryptanalysis <strong>of</strong> this method would also entail the utilization <strong>of</strong> the<br />

quantitative expedient afore-stated.<br />

Chapter 13<br />

Simple Transposition<br />

ibn Dunayn r addresses three types <strong>of</strong> encipherment by<br />

transposition. The first is the simple transposition based on changing<br />

the relative positions <strong>of</strong> letters without changing their forms. This<br />

method is easy to cryptanalyse, by restoring the letters to their original<br />

order through continuously re-arranging letter positions until a<br />

comprehensible message emerges. Most probably ibn Dunayn r's<br />

intention here is the simplest method <strong>of</strong> transposition, i.e.<br />

transposition within a single word. Accordingly, the message: "Fold<br />

the paper" is ciphered: "dl<strong>of</strong> eht repap".<br />

The second type, a composite one, is based on implementing both<br />

transposition and simple substitution. Undoubtedly this type is <strong>of</strong><br />

paramount importance, since it incorporates the core <strong>of</strong> today's most<br />

sophisticated encipherment methods (for instance the current<br />

international Data Encryption Standard (DES), and the newer<br />

Advanced Encryption Standard (AES), both grounded on the principle<br />

<strong>of</strong> encipherment using substitution and transposition together, but<br />

carrying it to a higher degree <strong>of</strong> complication, using a binary number<br />

system).<br />

ibn Dunayn r expands on the decryption <strong>of</strong> this method, first by<br />

means <strong>of</strong> the quantitative resource, and then by transposition. As he<br />

puts it: "If the letters are devised forms [i.e. employing simple<br />

substitution] and interchanged as we have already stated [i.e. by<br />

transposition], the way for cryptanalysing them consists in the<br />

28


utilization <strong>of</strong> the first instrument [i.e. the quantitative technique via<br />

letter computation]. Once the cryptologue works out the letter orders<br />

[<strong>of</strong> frequency], and places each letter <strong>of</strong> the alphabet against its<br />

devised counterpart in the cryptogram, he interchanges their relative<br />

positions reciprocally, shifting the letters backward and forward in<br />

relation to one another, until they slot into place and the intended<br />

meaning shows up."<br />

36 It is such a pity ibn Dunayn r does not state<br />

explicitly that this is composite encipherment, nor does he give it due<br />

deliberation, much proud as he is <strong>of</strong> understanding what others fail to<br />

understand for that matter!<br />

The third type is the encipherment by changing the position <strong>of</strong> the<br />

letter in relation to itself (i.e. its standard orientation), just by altering<br />

the angle <strong>of</strong> its setup (without changint its relative position within the<br />

word), assuming various angles <strong>of</strong> presentation such as writing it<br />

upside down or standing on its end.<br />

Example:<br />

A B C D E Plain<br />

29<br />

Cipher<br />

OR Cipher<br />

Obviously, this type is so easy to unfold that "it would never miss<br />

the common sense <strong>of</strong> anyone with perceptive insight," ibn Dunayn r<br />

says.<br />

Chapter 14<br />

Encipherment by Adding Nulls<br />

ibn Dunayn r's discussion <strong>of</strong> this method is something <strong>of</strong> an<br />

37<br />

elaboration <strong>of</strong> al-Kind 's notions. Here two distinct cases can be<br />

identified:<br />

a) Addition <strong>of</strong> nulls within the single word, by splitting it and<br />

embedding one or more nulls in between its constituent letters. Note<br />

that nulls can be letters chosen from the alphabet, or devised forms<br />

irrelative to the alphabet. For Example:<br />

36 See ibn Dunayn r's book, p.100.<br />

37 See al-Kind 's treatise, p.138.<br />

Clear: familiar<br />

Cipher: fazmidlizard


The nulls used in this example are the letters "z" and "d" introduced<br />

alternately after every other letter.<br />

The algorithm for cryptanalysing this type <strong>of</strong> encipherment, when<br />

used in message cryptograms, is rendered through applying the<br />

quantitative tool, namely, counting the letters. If the occurrence<br />

frequency <strong>of</strong> the letters or forms in the cryptogram is found to be<br />

greater than the typical letter frequency in the alphabet <strong>of</strong> the language<br />

concerned, one ascertains that they are nulls, and are left out.<br />

ibn Dunayn r says: "The cryptanalysis <strong>of</strong> this encipherment is<br />

reasoned out by calculating the forms and sorting them out. If you find<br />

them in excess <strong>of</strong> the letter orders, try to work out some <strong>of</strong> them by<br />

the first expedients we have previously mentioned."<br />

38<br />

b) Addition <strong>of</strong> one or more nulls at the end <strong>of</strong> words, indicating the<br />

space or the word spacer. ibn Dunayn r's frequent use <strong>of</strong> the word<br />

"null" in the plural indicates that he utilizes more than one null to<br />

represent a space.<br />

The cryptanalysis <strong>of</strong> this type <strong>of</strong> cipher involves manipulating<br />

those letters that are still covert amongst others already identified. The<br />

nulls-spacers are then dropped. As ibn Dunayn r says: "You now look<br />

into the letters none <strong>of</strong> which has yet shown, and seek their identical<br />

instances among those already puzzled out. If, by eliminating those<br />

letters sought for solution, the context makes sense and word<br />

composition straightens, you conclude the letters left out are all nullsspacers.<br />

When the encipherment is done using one null only, in that<br />

case you have already solved it ipso facto, since the single null is<br />

employed as a word-spacer."<br />

39<br />

Chapter 15<br />

Cryptanalysis <strong>of</strong> Composite Cipher<br />

ibn Dunayn r refers to his experience in cryptanalysing a composite<br />

cipher that is difficult to solve. Although not expressly stated, the fact<br />

that it is <strong>of</strong> the composite type manifests itself in the example he<br />

invokes, which is composed <strong>of</strong> the following three methods:<br />

38 See his book, p.102.<br />

39 Ibid., p.102.<br />

30


(a) Changing letter forms (simple substitution).<br />

(b) Changing letter positions (transposition).<br />

(c) Omitting some letters and using null forms instead.<br />

In this connection he says: "By changing the forms <strong>of</strong> letters,<br />

altering their positions, and at the same time omitting [certain] letters<br />

<strong>of</strong> the alphabet to replace them with null forms, the cipher would be<br />

very hard to solve indeed. Nevertheless, and by the good assistance <strong>of</strong><br />

the Almighty, I managed to solve it straightway."<br />

40<br />

Chapter 16<br />

Encipherment by Omitting a Letter<br />

In this chapter ibn Dunayn r explains the algorithm for<br />

cryptanalysing the method <strong>of</strong> encipherment conducted by omitting one<br />

letter <strong>of</strong> the alphabet throughout the whole encrypted message. It<br />

seems that the employment <strong>of</strong> this method is always concomitant with<br />

the use <strong>of</strong> simple substitution. This is clear from ibn Dunayn r's<br />

exposition <strong>of</strong> the method: "The cryptanalysis here lies in computing<br />

the forms; if they are found less in number than the alphabet count,<br />

you detect them through the first expedients we have mentioned<br />

earlier in this book. Work out some letters <strong>of</strong> the cryptogram sought<br />

for cryptanalysis. If you notice, by seeking their identical counterparts<br />

elsewhere therein, the existence <strong>of</strong> one and the same letter omitted so<br />

that the context does not straighten, examine the context closely and<br />

weigh up what is [purposely] omitted, as the words and import would,<br />

in all likelihood, point to it."<br />

41<br />

ibn Dunayn r illustrates this method by an example, maintaining<br />

that the purposely omitted letter is retrieved by sampling the vacancy<br />

(in several places) against all the letters <strong>of</strong> the alphabet, one by one, so<br />

as to exhaust all likely possibilities, until the dropped letter is<br />

determined once and for all.<br />

40 See his book, p.104.<br />

41 Ibid., p.106.<br />

31


Chapter 17<br />

Encipherment by Changing the Forms <strong>of</strong> Letters<br />

with Conceptual Relationship and Diffusion<br />

This method is analogous to the current "key-dependent<br />

encryption". In his discussion, ibn Dunayn r obviously relies on al-<br />

42<br />

Kind 's ideas as cited in his treatise. The fullness <strong>of</strong> the explanation<br />

there should suffice for its reiteration here. Further, ibn Adl n<br />

concludes his treatise with a rich practical example <strong>of</strong> cryptanalysing<br />

one variety <strong>of</strong> this method, where the relationship is bird species; each<br />

43<br />

letter being replaced by the name <strong>of</strong> a bird.<br />

1.3.1.4. Composite Encipherment<br />

Having demonstrated in the previous eleven chapters (7 through<br />

17) some <strong>of</strong> the simple encipherment methods and algorithms for their<br />

cryptanalysis, ibn Dunayn r shifts to discuss what he calls composite<br />

encipherment. In eighteen chapters (18 through 35) <strong>of</strong> his book he<br />

dilates on his own perception <strong>of</strong> composite encipherment, which<br />

differs from al-Kind 's and also the present-day established views on<br />

that respect. Examining the encipherment methods that ibn Dunayn r<br />

terms composite, as well as those he classifies under simple<br />

encipherment while considered composite in today's criteria, one can<br />

list the following conclusions regarding ibn Dunayn r's perception <strong>of</strong><br />

composite encipherment:<br />

1. The current view <strong>of</strong> composite encipherment is that it is a<br />

product <strong>of</strong> simple methods combined 44 . This is in conformity with al-<br />

Kind 's notion, so impressively demonstrated in his treatise.<br />

2. In the context <strong>of</strong> addressing simple methods <strong>of</strong> encipherment,<br />

ibn Dunayn r goes (in Chapters 13, 15 and 16) to handle composite<br />

methods, mistakenly considering them, as simple. However, he<br />

specifically declares earlier that composite encipherment "falls into<br />

42<br />

See al-Kind 's treatise, p.93, and pp. 158-160.<br />

43<br />

See ibn Adl n's treatise, pp.104-113.<br />

44<br />

-I choose to dub it "eclectic encipherment", using a wide range <strong>of</strong> cipher<br />

methods.- [Translator].<br />

32


two divisions: the one is a combination <strong>of</strong> simple methods, and the<br />

other is what ensues in consequence."<br />

45<br />

3. It is evident from ibn Dunayn r's book that the concept <strong>of</strong><br />

"composition" according to him is to manipulate the letters to be<br />

enciphered in such a way as to disguise the intended meaning through<br />

enveloping it in any device or medium that has nothing to do with the<br />

purport aimed at. This encipherment may take a host <strong>of</strong> forms such as<br />

building on a tale, a dream, a chessboard, beads, the motion <strong>of</strong> planets,<br />

or the arithmetic using decimally-weighted numerical alphabet ( is b<br />

al- ummal). In fact these methods bear no relation to composite<br />

ciphering, and would more correctly be associated with what is known<br />

as "concealment cipher", which is intended to pass without being<br />

suspected as the conveyor <strong>of</strong> a secret communication.<br />

To ibn Dunayn r's credit, it should be noted, he has developed a<br />

number <strong>of</strong> encipherment methods, which he might have taken over<br />

from his predecessors, and which are based on such accessory devices<br />

as the punctured wood sheet with a thread, folded paper, colour beads,<br />

etc.<br />

Chapter 18<br />

An Overview <strong>of</strong> Composite Encipherment<br />

ibn Dunayn r seems fully conscious <strong>of</strong> the fact that the range <strong>of</strong><br />

composite encipherment is so wide it is not confined to any limits;<br />

thus it is impossible to deal with all its multiplicity <strong>of</strong> forms. He states<br />

that what he is going to discuss is just an example for handling other<br />

composite instances. He argues that al-Kind has not considered these<br />

examples <strong>of</strong> composite encipherment ـــand indeed so, because they<br />

are worlds apart in their views about it. To ibn Dunayn r it is more <strong>of</strong><br />

a concealment cipher than proper composite encipherment, as we shall<br />

see in subsequent chapters.<br />

Chapter 19<br />

A Preamble to Solving Composite Cipher<br />

Of all types <strong>of</strong> encipherment the composite type is regarded by<br />

ibn Dunayn r as the most complicated. Its decryption requires a lot <strong>of</strong><br />

45 See his book, p.82.<br />

33


expertise and thorough training. The algorithm for cryptanalysis is<br />

attained by:<br />

1) Experimenting with each and every type <strong>of</strong> simple<br />

encipherment. If, after all, the cipher remains inscrutable, it is<br />

concluded to be composite.<br />

2) Experimenting with the types <strong>of</strong> composite encipherment, some<br />

<strong>of</strong> which ibn Dunayn r will mention in the following chapters.<br />

Chapter 20<br />

Encipherment by Replacing Letters with Generic Names<br />

ibn Dunayn r considers this method as composite encipherment,<br />

although it, in fact, belongs under simple substitution using the<br />

principle <strong>of</strong> conceptual relationship and diffusion. It is based on the<br />

idea <strong>of</strong> enciphering letters in terms <strong>of</strong> genera, thereby a letter can be<br />

represented by more than one symbol. This type is analogous to<br />

polyalphabetic encipherment, but with a symbol-letter relationship,<br />

i.e. relationship <strong>of</strong> the different symbols to each letter. For instance,<br />

the letter (ا a) may be enciphered using the "people" genus through<br />

employing any proper name to symbolize it.<br />

Keen to help his reader in cryptanalysing this type <strong>of</strong> cipher, ibn<br />

Dunayn r proposes a table <strong>of</strong> generic names (relationships)<br />

representing each letter <strong>of</strong> the <strong>Arabic</strong> alphabet, followed by a practical<br />

illustrative example. The cryptanalysis assumes taking up the generic<br />

names and combining the letters that they stand for.<br />

ibn Dunayn r suggests that this cipher defies cryptanalysis. That is<br />

probably so, because each letter is replaced by more than one symbol<br />

ـــa process which turns void the quantitative as well as the qualitative<br />

techniques <strong>of</strong> cryptanalysis. Furthermore, a message enciphered this<br />

way, if put in a well-chosen context, is likely to mislead the<br />

cryptanalyst and distract his/her thought from suspecting the message<br />

to be a cryptogram. It is patently evident that ibn Dunayn r's<br />

demonstration <strong>of</strong> this type <strong>of</strong> encipherment puts him one up over his<br />

fellow scholars for that matter. His predecessor al-Kind gives only a<br />

brief account <strong>of</strong> it 46 ; his contemporary ibn Adl n restricts himself to a<br />

46 See al-Kind 's treatise, p.132, and pp.158-160.<br />

34


simple example towards the end <strong>of</strong> his treatise 47 ; whereas his<br />

successor ibn ad-Durayhim makes use <strong>of</strong> his description, as can be<br />

readily observed from the uniformity <strong>of</strong> generic denominations <strong>of</strong> ibn<br />

ad-Durayhim in his treatise 48 and ibn Dunayn r in this chapter.<br />

Chapter 21<br />

Encipherment Using the Arithmetic <strong>of</strong> Decimally-Weighted<br />

Numerical Alphabet (ADWNA)<br />

Or " is b al- ummal"<br />

Important as it is, this method <strong>of</strong> encipherment has been<br />

overlooked by al-Kind in his treatise on cryptanalysis, despite his<br />

awareness <strong>of</strong> is b al- ummal, and his reference to it elsewhere 49 . The<br />

Author <strong>of</strong> the Two Essays, however, does refer to it in his First Essay,<br />

and ibn Dunayn r seems to have quoted from him particularly the use<br />

<strong>of</strong> the "quarter" and "half" fractions.<br />

" is b al- ummal" is an old method <strong>of</strong> encipherment, well-known<br />

to the Arabs at an early stage <strong>of</strong> their civilization, and was practised<br />

later in other languages such as Hebrew. ibn Dunayn r addresses this<br />

method in its two divisions, the major and the minor, expanding on its<br />

significant applications by developing highly relevant ways <strong>of</strong><br />

ciphering that have subsequently been adopted by ibn ad-Durayhim.<br />

The following table (Table 1.6.) shows the letters <strong>of</strong> the numerical<br />

alphabet, with corresponding decimal numerical values in ADWNA.<br />

47 See ibn Adl n's treatise, p.104 ff.<br />

48 See ibn ad-Durayhim's treatise, pp.76-80.<br />

49 As reported by ibn an-Nad m in his al-Fihrist, p.21 quoting al-Kind .<br />

35


ا<br />

ة<br />

ط<br />

ك<br />

ـ٘<br />

1 2 3 4 5 6 7 8 9<br />

ٞ<br />

ن<br />

ي<br />

َ<br />

ْ<br />

10 20 30 40 50 60 70 80 90<br />

ق<br />

ه<br />

ُ<br />

د<br />

س<br />

100 200 300 400 500 600 700 800 900<br />

ؽ<br />

1000<br />

x 1 2 3 4 5 6 7 8 9<br />

1 ا<br />

10 ٞ<br />

100 ق<br />

1000 ؽ<br />

ة<br />

ن<br />

ه<br />

ط<br />

ي<br />

ُ<br />

ك<br />

َ<br />

د<br />

36<br />

ـ٘<br />

ْ<br />

س<br />

Table 1.6. Numerical values <strong>of</strong> letters.<br />

Thus, the numerical cipher <strong>of</strong> the proper name ل٠ى, for example, can<br />

be expressed: 7, 10, 4; or (in words): seven, ten, four.<br />

Equally important is that this type <strong>of</strong> encipherment is simple<br />

substitution, with each letter substituted by a single symbol throughout<br />

the cryptogram. Cryptanalysis is accomplished by utilizing the<br />

quantitative technique stated earlier.<br />

According to ibn Dunayn r, the concept <strong>of</strong> composition in the areadependant<br />

decimal numerical alphabet as a "composite" method <strong>of</strong><br />

encipherment is predicated on making the cryptogram look like a<br />

peasant-farming financial register. The measurement is done through<br />

adopting length units in common use at the time, such as al- ar b, alqaf<br />

z, and al- a r. The cryptogram is composed by representing the<br />

letters as land dimensions, simulating an outward semblance <strong>of</strong><br />

buying, selling, or otherwise similar bargains. This, ibn Dunayn r<br />

suggests, tends to boost the concealment <strong>of</strong> the cipher and renders it<br />

even more difficult to cryptanalyse. He says: "If you fail to do like we<br />

have told you as regards giving the cryptogram the semblance <strong>of</strong> a<br />

financial register <strong>of</strong> expenditure, an episode about somebody, taking,<br />

buying or giving, you would incur a raw and unhappy [state <strong>of</strong><br />

affairs], over and above an unmistakable clue to exposing the intended<br />

ٚ<br />

ً<br />

ؿ<br />

ٚ<br />

ً<br />

ؿ<br />

ى<br />

ع<br />

م<br />

ى<br />

ع<br />

م<br />

ػ<br />

ف<br />

ض<br />

ػ<br />

ف<br />

ض<br />

ط<br />

ص<br />

ظ<br />

ط<br />

ص<br />

ظ


encipherment. Otherwise, this course <strong>of</strong> action would be quaint and<br />

pretty efficient."<br />

50<br />

Chapter 22<br />

Encipherment by Communication through Finger-Spelling,<br />

Using the Manual Alphabet and ADWNA<br />

In this type <strong>of</strong> encipherment ADWNA is instrumental in letter<br />

substitution; letters are replaced with numbers communicated by<br />

bending the fingers in specific shapes so as to convey to a recipient<br />

the numerical values corresponding to the respective letters. This kind<br />

<strong>of</strong> esoteric communication is particularly used by those specially<br />

initiated, in the presence <strong>of</strong> another who is not meant to understand<br />

the discourse.<br />

Such a "manual alphabet" is an already well-known Arab signaling<br />

method <strong>of</strong> communication. It can assume many different shapes.<br />

ibn Dunayn r's method is based on representing the intended number<br />

by relative finger configurations. Thus he represents the units and<br />

number ten, referring to other numbers by analogy. The following<br />

table (Table 1.7.) demonstrates the <strong>Arabic</strong> numerical alphabet, with<br />

the corresponding values in ADWNA <strong>of</strong> the individual letters, and the<br />

finger configuration for each; the units being quoted from<br />

ibn Dunayn r, the rest from other sources.<br />

50 See his book, p.116.<br />

37


Hand Letter Value Finger Configuration<br />

Right ا (a) 1 Ring finger folded and pinkie rested on it from behind.<br />

Right ة (b) 2 Little and ring fingers folded to their base in palm.<br />

Right ط ( ) 3<br />

Little, ring, and middle fingers folded to their base in<br />

palm.<br />

Right ك (d) 4 Pinkie spread up; ring and middle fingers folded.<br />

Right ـ٘ (h) 5<br />

Middle finger folded in palm, with little and ring fingers<br />

spread out.<br />

Right ٚ (w/ ) 6<br />

Ring finger folded in palm, with middle finger spread<br />

up.<br />

Right ى (z) 7 Little finger bent inside, with all the rest spread.<br />

Right ػ ( ) 8 Little and ring fingers folded.<br />

Right ط ( ) 9 Little, ring, and middle fingers folded.<br />

Right ٞ (y/ ) 10 Thumb and index fingers made into a loop.<br />

Right ن (k) 20 Thumb tip placed between index and middle fingers.<br />

Right ي (l) 30 Index inner tip placed on thumb inner tip.<br />

Right َ (m) 40 Inner tip <strong>of</strong> thumb placed on outer tip <strong>of</strong> index finger.<br />

Right ْ (n) 50<br />

Tip <strong>of</strong> thumb placed on back <strong>of</strong> index finger while<br />

stretched out.<br />

Right ً (s) 60 Index tip placed on thumb tip.<br />

Right ع ( ) 70<br />

Tip <strong>of</strong> thumb nail placed between inner joints <strong>of</strong> index<br />

finger that is twisted.<br />

Right ف (f) 80 Thumb tip placed in the index joint towards its tip.<br />

Right ص ( ) 90 Index-finger tip placed on thumb tip.<br />

Left ق (q) 100<br />

Index-finger tip placed in joint <strong>of</strong> thumb while spread<br />

out.<br />

Left ه (r) 200<br />

Thumb tip placed between index and middle fingers<br />

towards their base.<br />

Left ُ ( ) 300 Inner tip <strong>of</strong> index finger joined to inner tip <strong>of</strong> thumb.<br />

Left د (t) 400 Inner tip <strong>of</strong> thumb placed on outer tip <strong>of</strong> index finger.<br />

Left س ( ) 500<br />

Tip <strong>of</strong> thumb placed on back <strong>of</strong> index finger while<br />

stretched out.<br />

Left ؿ ( ) 600 Index tip mounted on thumb tip.<br />

Left م ( ) 700<br />

Tip <strong>of</strong> thumb nail placed after inner joints <strong>of</strong> index<br />

finger that is twisted.<br />

Left ض ( ) 800 Thumb tip placed in the index joint towards its tip.<br />

Left ظ ( ) 900 Index-finger tip placed on thumb tip.<br />

Left ؽ ( ) 1000<br />

Pinkie folded to its base in left palm, with ring finger<br />

mounted on it.<br />

Table 1.7. Finger-spelling (dactylology) using ADWNA<br />

38


Chapters 23 & 24<br />

Encipherment by "Composing" Letters on the Chessboard<br />

This method is based on simple substitution. It is originally<br />

intended to address someone who is present, but can also be employed<br />

to communicate with absent people ـــa method which ibn Dunayn r<br />

credits to himself, maintaining that he establishes the precedent for it.<br />

His explanation is lucid enough to spare any elucidation. One<br />

noteworthy remark here is that ibn ad-Durayhim, in his Mift alkun<br />

z f ' al-marm z, seems to have taken over this method from<br />

51<br />

his predecessor ibn Dunayn r.<br />

Chapter 25<br />

Cryptanalysis <strong>of</strong> Cipher "Composed" on the Arithmetic <strong>of</strong><br />

Decimally-Weighted Numerical Alphabet (ADWNA)<br />

ibn Dunayn r asserts, right from the outset, that this type <strong>of</strong> cipher<br />

is "very easy to cryptanalyse,"<br />

52 and rightly so, because that kind <strong>of</strong><br />

arithmetic was then widespread and in common use. The cryptanalysis<br />

is effected by reconstructing letters against their corresponding<br />

numbers in ADWNA. It is interesting to remark here that<br />

ibn Dunayn r discusses encipherment using ADWNA twice in his<br />

book, but he has not been consistent in the symbols he uses to denote<br />

the orders <strong>of</strong> tens, hundreds, and thousands. While in the first instance<br />

(that composed on area) he uses numbers with super-dots to indicate<br />

the tens order, and numbers with under-dots to indicate the hundreds<br />

order, he in this chapter opts to use numbers preceded by one circle to<br />

indicate the tens, two circles to indicate the hundreds, and three circles<br />

to denote the thousand. Nevertheless, it is understood that the circles<br />

here are equivalent to the dots there.<br />

Moreover, ibn Dunayn r observes the nicety that is b al- ummal<br />

is basically one <strong>of</strong> three varieties <strong>of</strong> the Hindi calligraph (cipher<br />

alphabet). In his words: "The algorithm is to place each letter <strong>of</strong> the<br />

alphabet against its Indian decimal numerical equivalent in the<br />

system… Consequently, if you wanted to encipher the statement<br />

51 See ibn ad-Durayhim's treatise, p.66.<br />

52 See his book, p.124.<br />

39


ك١فٛزٌا ٌٟٚ للها by this method, you would have to replace the letters with<br />

their corresponding Indian characters…" 53 .<br />

ibn Dunayn r's description <strong>of</strong> this method as easy to solve may be<br />

meant to serve as a preamble to what he is about to develop in the next<br />

chapter. Through the introduction <strong>of</strong> sophisticated improvements this<br />

encipherment turns out to be complicated and difficult to decrypt. This<br />

fact is attested by his repetition in the following chapter <strong>of</strong> the same<br />

illustrative example " ك١فٛزٌا ٌّٟٚ للها", probably to enable the reader to<br />

appreciate how far the method has been developed.<br />

Chapter 26<br />

Encipherment by ADWNA Using Further<br />

Numerical Processing<br />

Though simple substitution in substance, this method <strong>of</strong> ciphering,<br />

which is credited to ibn Dunayn r as its originator, is extremely<br />

important in terms <strong>of</strong> its content and effect. Its importance stems<br />

especially from the fact that it lends itself to a special numerical<br />

processing, through arithmetical operations governed by a set rule,<br />

that makes it assume more complicated forms. This may be<br />

represented by the following model (Figure 1.2.).<br />

The<br />

Cleartext<br />

(LETTERS)<br />

Substitution<br />

<strong>of</strong> Numbers<br />

for Letters<br />

Figure 1.2. Encipherment by numerical processing using ADWNA.<br />

Numerical processing involves making the representative numbers<br />

two, three, four, etc. times as great in value, thus increasing the<br />

difficulty <strong>of</strong> cryptanalysis. For example, we encipher the phrase<br />

ك١فٛزٌا ٌّٟٚ للها as follows:<br />

53 See his book, p.124.<br />

Numerical<br />

Processing<br />

40<br />

Resubstitution<br />

<strong>of</strong> Numbers<br />

for Letters<br />

The<br />

Cipher-text<br />

(CRYPTOGRAM)


Cleartext ق<br />

Numerical<br />

value in<br />

ADWNA<br />

Encipherment<br />

by doubling<br />

the number<br />

(tw<strong>of</strong>old)<br />

Reconversion<br />

to letters<br />

Encipherment<br />

by<br />

quadrupling<br />

the number<br />

(fourfold)<br />

Reconversion<br />

to letters<br />

ٞ<br />

ف<br />

ٚ<br />

د<br />

ي<br />

41<br />

ا<br />

100 10 80 6 400 30 1 10 30 6 5 30 30 1<br />

200 20 160 12 800 60 2 20 60 12 10 60 60 2<br />

ه<br />

ن<br />

ٌل<br />

ت٠<br />

ض<br />

ً<br />

ة<br />

400 40 320 24 1600 120 4 40 120 24 20 120 120 4<br />

د<br />

َ<br />

هش<br />

لو<br />

ـغ<br />

هل<br />

Fully awake to the significance <strong>of</strong> this method, ibn ad-Durayhim<br />

later takes up this method from where ibn Dunayn r left <strong>of</strong>f,<br />

developing it and further expanding on it. He makes the numerical<br />

processing take other forms by breaking up the number into a sum <strong>of</strong><br />

two or more numbers <strong>of</strong> various choices, each corresponding to its<br />

respective letter in ADWNA. For instance, enciphering the proper<br />

name لّؾِ this way gives:<br />

ك<br />

Plaintext ك َ ػ َ<br />

Numerical value in ADWNA 4 40 8 40<br />

Numerical processing <strong>of</strong> one choice (3+1) (10+30) (6+2)<br />

Corresponding letters طا ٌٟ ٛث ٌٟ<br />

Numerical processing <strong>of</strong> another choice (2+2) (20+20) (7+1)<br />

Corresponding letters تث هو ىا هو<br />

ٞ<br />

ن<br />

َ<br />

ي<br />

ً<br />

هل<br />

ٚ<br />

ت٠<br />

لو<br />

ٖ<br />

ٞ<br />

ن<br />

ي<br />

ً<br />

هل<br />

ي<br />

ً<br />

هل<br />

ا<br />

ة<br />

ك<br />

(10+30)<br />

(20+20)<br />

It is well worth emphasizing that although far more sophisticated<br />

numerical processing is used in cipher algorithms nowadays, this<br />

54 See ibn ad-Durayhim's treatise, pp.24-25 and p.68.<br />

54


method forms, in principle, the basis <strong>of</strong> many algorithms in<br />

present-day cryptography.<br />

Chapter 27<br />

Encipherment by Substituting For Letters the Days <strong>of</strong><br />

the Week and Hours<br />

In this type <strong>of</strong> encipherment the cryptogram is "composed" on the<br />

seven days <strong>of</strong> the week, by coining seven words that cover all the<br />

letters <strong>of</strong> the <strong>Arabic</strong> alphabet in such a way as to avoid the repetition<br />

<strong>of</strong> any <strong>of</strong> them. The words are then associated with the days <strong>of</strong> the<br />

week one apiece, assigning to each letter <strong>of</strong> the cryptogram a specific<br />

hour <strong>of</strong> the day. ibn Dunayn r elucidates this method by enciphering<br />

the phrase: لله لّؾٌا as follows (with a slight change, as most <strong>of</strong> the<br />

seven words in the original <strong>Arabic</strong> manuscript are illegible):<br />

Days <strong>of</strong><br />

the week:<br />

Coined<br />

words:<br />

Number<br />

<strong>of</strong> letters<br />

Friday Saturday Sunday Monday Tuesday Wednesday Thursday<br />

5 + 4 + 5 + 4 + 3 + 4 + 3 = 28<br />

ـ٘ + ي + ي + ك + َ + ػ + ي + ا = لله لّؾٌا<br />

ا = the second hour <strong>of</strong> Friday<br />

ي = the last hour <strong>of</strong> Sunday<br />

ػ = the second hour <strong>of</strong> Wednesday<br />

َ = the second hour <strong>of</strong> Thursday<br />

ك = the first hour <strong>of</strong> Tuesday<br />

ي = the last hour <strong>of</strong> Sunday<br />

ي = the last hour <strong>of</strong> Sunday<br />

ـ٘ = the last hour <strong>of</strong> Wednesday<br />

ibn Dunayn r concludes by establishing that "the algorithm <strong>of</strong><br />

cryptanalysing such ciphers is pursued through the application <strong>of</strong> the<br />

quantitative expedients, namely by computing the order <strong>of</strong> letter<br />

occurrence frequencies. This type <strong>of</strong> encipherment is most<br />

conveniently performed by way <strong>of</strong> a tale."<br />

55<br />

55 See his book, p.128.<br />

42


Chapter 28<br />

Encipherment by Folded Paper<br />

This method <strong>of</strong> encipherment is not based on letter substitution, but<br />

has more the appearance <strong>of</strong> a concealment than real cipher. One<br />

should think, in all probability, that ibn ad-Durayhim has picked it up<br />

56<br />

from ibn Dunayn r. It is more or less similar to a cryptographic<br />

device that dates back to the Spartans <strong>of</strong> ancient Greece, as early as<br />

the fifth century B.C., called the "skytale", which is "the earliest<br />

apparatus used in cryptology and one <strong>of</strong> the few ever devised in the<br />

whole history <strong>of</strong> the science for transposition ciphers."<br />

57 The idea is<br />

to write the secret message down a narrow strip <strong>of</strong> papyrus or<br />

parchment wrapped round a staff <strong>of</strong> wood close-packed, with edges<br />

meeting uniformly at all points. The parchment is then unwound and<br />

sent on its way. The disconnected letters and fragments make no sense<br />

unless the parchment is rewrapped (by the recipient) round a baton <strong>of</strong><br />

the same thickness as the first, thus forming the message. The<br />

decryptor <strong>of</strong> today, however, would make short work <strong>of</strong> such a<br />

system.<br />

Another related encipherment method is achieved by writing the<br />

secret message on a sheet <strong>of</strong> paper folded in pleats, and concealed by<br />

unfolding it, filling up the spaces by adding extra letters that, together<br />

with the original letters <strong>of</strong> the cryptogram, make new innocentlooking<br />

context <strong>of</strong> different import from the one intended.<br />

Chapter 29<br />

Encipherment by a Punched Board<br />

Much as this method employs a device, it belongs under simple<br />

substitution cipher. Encipherment is achieved by puncturing holes, in<br />

a sheet <strong>of</strong> wood, equal in number to the language letters (28 for<br />

<strong>Arabic</strong>), not necessarily arranged alphabetwise but according to an<br />

agreed succession. The cryptogram is represented by a thread driven<br />

through the intended holes, marking a route which defines the letters<br />

<strong>of</strong> the message. The recipient reads the letters represented by the holes<br />

through which goes the thread. Obviously, decrypting this kind <strong>of</strong><br />

56 See ibn ad-Durayhim's treatise, p.82.<br />

57 Kahn, D. The Codebreakers, New York: Macmillan, 8 th printing, 1976, p.82; and<br />

Gaines, Helen Fouché Cryptanalysis: A Study <strong>of</strong> Ciphers and their Solutions,<br />

New York: Dover Publications, 1956, p.14.<br />

43


cipher depends on the quantitative technique, explained by ibn<br />

Dunayn r so fully as to make any addition here redundant.<br />

Chapter 30<br />

Encipherment by Coloured Beads<br />

This method uses beads distributed, according to their colours,<br />

among the letters <strong>of</strong> the alphabet. Encipherment is done by threading<br />

or "composing" letters represented by beads on a string as a rosary, in<br />

which the succession <strong>of</strong> colours tallies with the succession <strong>of</strong> letters <strong>of</strong><br />

the text to be enciphered. Note that colour-bead encipherment can take<br />

numerous methods, as ibn ad-Durayhim later states in his Mift al-<br />

Kun z: "This type gives rise to scores <strong>of</strong> ramifications."<br />

The algorithm for cryptanalysing this cipher is also through the<br />

employment <strong>of</strong> the quantitative technique <strong>of</strong> counting the frequency <strong>of</strong><br />

coloured beads against each letter.<br />

ibn Dunayn r's method <strong>of</strong> coding, however, is by no means<br />

economical; alternative methods can be utilized, pursuing an agreed<br />

rule, to produce the same result with a fewer number <strong>of</strong> beads. Morse<br />

code (alphabet) is a case in point much in evidence; with just a couple<br />

<strong>of</strong> colours the Code permits the representation <strong>of</strong> the whole gamut <strong>of</strong><br />

letters.<br />

Chapter 31<br />

Encipherment by Concealment within Context<br />

In this method the true message is "concealed" within another<br />

context by spreading the intended words at the beginning, middle, and<br />

end <strong>of</strong> lines, according to some rule known only to the sender and the<br />

recipient.<br />

To exemplify this let us agree that the message is to be read<br />

clockwise starting end first. The concealed message would read:<br />

"Don't just stand there, do something":<br />

There's a lot to say and do before I leave, darling. Say something;<br />

stand before me. Let's just not forget our love; please don't.<br />

58 pp. 80-82.<br />

44<br />

58


Chapter 32<br />

Encipherment by Letters Embedded in Words<br />

The message is "composed" on the words <strong>of</strong> a written epistle,<br />

conformably with a fixed rule. This can be accomplished by taking the<br />

first, second, last, etc. letter <strong>of</strong> each word. The following example<br />

demonstrates enciphering the name ٍٟػ لّؾِ in this way twice: the one<br />

by taking the last letter, the other by taking the first.<br />

ٞ ي ع ك َ ػ َ<br />

ٍٟػ ًضِ غفاه َكوف ُى١ٍػ ؼٌبص ٍٍَُ<br />

ٖاو٠ ٟىٌ وِبػ هاك ًب٠مبؾِ لِبؽ ٝشِ<br />

ibn ad-Durayhim later handles this method down to the smallest<br />

59<br />

detail, citing several varieties and giving many examples.<br />

Chapter 33<br />

Encipherment by Reversing Letter Order <strong>of</strong> a Word<br />

This type comes under encipherment by transposition, and is<br />

60<br />

performed by writing each word <strong>of</strong> the cryptogram in reverse order.<br />

The name لّؽا,<br />

for example, is enciphered: بؾِك and ْاٛضه (plain)=<br />

وضٚبٔ (cipher). It would have been more accurate if ibn Dunayn r were<br />

to classify this method under simple rather than composite<br />

encipherment. We do not know for certain the reason for his choice,<br />

but it is probably motivated by a personal confused definition <strong>of</strong><br />

composite encipherment.<br />

Chapter 34<br />

Encipherment by Numerical Calculations<br />

This method is closely akin to the method <strong>of</strong> encipherment<br />

"composed" on area (Chapter 21), with the slight difference <strong>of</strong><br />

employing whole dinars for the units order, fractions <strong>of</strong> quarters <strong>of</strong> the<br />

dinar for the tens, fractions <strong>of</strong> halves for the hundreds, and fractions <strong>of</strong><br />

both halves and quarters for the thousands. It seems likely that<br />

ibn Dunayn r has taken this method from the Author <strong>of</strong> the Two<br />

59 See his treatise, pp.26-27 and p.70 ff.<br />

60 This type <strong>of</strong> encipherment has been later handled by ibn ad-Durayhim in more<br />

detail and diversification. See his treatise under the "transposition" type <strong>of</strong><br />

encipherment, p.56 ff.<br />

45


Essays (in his First Essay). In both manuscripts, however, the<br />

transcription suffers much from corruption and misrepresentation,<br />

owing to omission on the part <strong>of</strong> the scribes. It might be for this<br />

reason that ibn ad-Durayhim does not make any reference to this<br />

method in his treatise. Indeed we have managed, by studying the<br />

examples in both manuscripts, to make out the following correct form<br />

<strong>of</strong> ibn Dunayn r's example illustrating this method:<br />

ا ة ط ك ـ٘ ٚ ى ػ ط<br />

1 2 3 4 5 6 7 8 9<br />

46<br />

dinar<br />

ٞ ن ي َ ْ ً ع ف ص quarters <strong>of</strong> the dinar, indicating<br />

1 2 3 4 5 6 7 8 9 the number times 10<br />

ق ه ُ د س ؿ م ض ظ<br />

1 2 3 4 5 6 7 8 9<br />

ؽ<br />

1<br />

halves <strong>of</strong> the dinar, indicating<br />

the number times 100<br />

Three-quarters <strong>of</strong> the dinar, indicating the number times 1000<br />

Thus, the proper name ٍٟػ ٓث لّؽأ, for instance, can be enciphered:<br />

ٞ ي ع ْ ة ك َ ػ أ<br />

1 3 7 5 2 4 4 8 1<br />

quarter Quarters quarters quarters dinars dinars quarters dinars dinar<br />

Chapter 35<br />

Encipherment by Conditions <strong>of</strong> planets<br />

and Other Celestial Bodies<br />

With this chapter ibn Dunayn r concludes his discussion <strong>of</strong> prose<br />

encipherment. Here the cryptogram is "composed" on an astronomical<br />

text addressing planets and other heavenly bodies: their motions,<br />

distances, durations, mansions, revolutions, rotations, etc. He brings<br />

forth an example <strong>of</strong> enciphering the name لّؾِ by this method:<br />

"Having completed forty revolutions, the Moon eclipsed at such and<br />

such degrees <strong>of</strong> such and such constellation. Eight revolutions thence<br />

remained. Its motion straightened after it had waned in appearance<br />

and faded in colour. Thereafter it moved to Sagittarius and completed<br />

forty revolutions thus far. At the end <strong>of</strong> Sagittarius the planet Venus<br />

approached it. Four turns elapsed before its motion evened out in


orbit, and its light became as bright as to emulate planets". 61 It is clear<br />

that the algorithm for cryptanalysis lies in the realization <strong>of</strong> the letters<br />

corresponding to the numbers [set in boldface] in ADWNA.<br />

ibn Dunayn r attributes this type <strong>of</strong> encipherment to Hermes<br />

Trismegistus <strong>of</strong> wisdom and learning, the legendary author <strong>of</strong><br />

mystical, astrological and alchemical works, and one <strong>of</strong> seven wise<br />

men known to have possessed calligraphs <strong>of</strong> their own, barred <strong>of</strong>f to<br />

all but the "sons <strong>of</strong> wisdom", hence the epithet "hermetic" (in English)<br />

or "hermetique" (in French), meaning completely sealed or impervious<br />

to external influences. Many ciphers were ascribed to Hermes; ibn<br />

Wa iyya an-Naba , in his awq al-mustah m f ma rifat rum z al-<br />

'aql m (The seeker's joy in identifying the written symbols <strong>of</strong><br />

languages) gives a detailed account <strong>of</strong> the Hermetic calligraphs.<br />

ibn Dunayn r concludes this chapter by pointing out the following<br />

two notions:<br />

1. that "the cryptanalyst <strong>of</strong> this cipher should be knowledgeable<br />

about arithmetic and astronomy" 62 , and rightly so, in order that he/she<br />

can identify the text as a cryptogram, and that the astronomical<br />

content is not what is intended.<br />

2. that the cryptanalyst "should make use <strong>of</strong> the first statistical<br />

principles <strong>of</strong> calculating the frequencies <strong>of</strong> letter occurrence" 63 ,<br />

namely the quantitative technique. Here ibn Dunayn r is wide <strong>of</strong> the<br />

mark. It may be an unfortunate oversight on his part, because<br />

cryptanalysing such a cipher requires nothing else but an acquaintance<br />

with the arithmetic using decimally-weighted numerical alphabet, or<br />

is b al- ummal.<br />

1.3.2. Cryptanalysis <strong>of</strong> Poetry Ciphers<br />

ibn Dunayn r's work, much important as it is, is not without<br />

precedent <strong>of</strong> its kind; it is simply one link <strong>of</strong> an integral chain in<br />

which every scholar make good use <strong>of</strong>, and adds to, the contributions<br />

<strong>of</strong> his predecessors. It has already been noted (1.2.1.) that ibn<br />

Dunayn r tends to draw upon quite a few <strong>of</strong> his earlier peers, quoting<br />

61 See ibn Dunayn r's book, p.140.<br />

62 Ibid., p.140.<br />

63 Ibid., p.140.<br />

47


their ideas, recapitulating their concepts, or building on their findings.<br />

This tendency, in fact, is even more pronounced in this part, where he<br />

seems to lean notably on al-Kind , ibn ab ab and the Author <strong>of</strong><br />

'Adab a - u ar ' (The Art <strong>of</strong> Poets).<br />

1.3.2.1. Tools for Cryptanalysing Poetry Ciphers<br />

Chapters 36 and 37 <strong>of</strong> ibn Dunayn r's book serve as an introduction<br />

to cryptanalysing poetry ciphers. In Chapter 36 he reiterates the tools<br />

<strong>of</strong> cryptanalysis that are common to both prose and poetry; these are:<br />

1. Determining the orders <strong>of</strong> letter frequency <strong>of</strong> occurrence;<br />

2. Familiarity with the variable and basic letters; and<br />

3. Knowledge <strong>of</strong> letter combination and non-combination.<br />

In Chapter 37 he mentions those principles <strong>of</strong> cryptanalysis<br />

exclusive to poetical ciphers, considering them as indispensable<br />

conditions to any cryptanalyst <strong>of</strong> poetical cryptograms: "Thereafter,<br />

the keynote element <strong>of</strong> this science is that the cryptologue should be:<br />

1. widely conversant with prosody and metrical structures;<br />

2. thoroughly acquainted with rhymes;<br />

3. deeply familiar with the science <strong>of</strong> poetry [the art <strong>of</strong> appreciating<br />

poetical delicacy];<br />

4. a person <strong>of</strong> insight into the knack <strong>of</strong> writing;<br />

5. a person with capacious memory for committing to heart poetry<br />

galore; and<br />

6. skilful and resourceful in cryptography."<br />

64<br />

To be noted is the fact that poetical ciphers do not typically exceed<br />

65<br />

a few verses. It follows that the letter order <strong>of</strong> frequency is scarcely<br />

sufficient to render the quantitative techniques reliably applicable in<br />

cryptanalysis. Nevertheless, adopting the afore-stated principles is apt<br />

to make the process less difficult.<br />

64 See ibn Dunayn r's book, p.142.<br />

65 See the practical examples <strong>of</strong> ibn ad-Durayhim and ibn Adl n in their respective<br />

treatises, p.102 ff and p.104 ff.<br />

48


1.3.2.2. On Prosody (Metrics)<br />

� Metrical Circles (Chapter 38)<br />

ibn Dunayn r dedicates this chapter to the five circles <strong>of</strong> <strong>Arabic</strong><br />

prosody, from which all poetical meters (measures <strong>of</strong> versification)<br />

originate. This is so because the meters themselves are so engaged or<br />

overlapped that one meter disengages itself from the other. Each<br />

group <strong>of</strong> meters that are capable <strong>of</strong> undergoing such disengagement<br />

share in a circle designated according to the nature <strong>of</strong> its parts. These<br />

metrical circles are: circle 1 <strong>of</strong> the different, circle 2 <strong>of</strong> the consistent,<br />

circle 3 <strong>of</strong> the similar, circle 4 <strong>of</strong> the extraneous, and circle 5 <strong>of</strong> the<br />

harmonious.<br />

� Poetical Meters (Chapters 39 & 40)<br />

Chapter 39 deals with the sixteen meters <strong>of</strong> <strong>Arabic</strong> poetry and the<br />

feet [the basic units] that are peculiar to each meter. In Chapter 40 the<br />

meters are distributed to their respective circles. Then ibn Dunayn r<br />

points out to three prosodic terms, all belong under metrical variations<br />

in <strong>Arabic</strong> poetry, namely, az-zi f, (an optional variation that befalls<br />

the second <strong>of</strong> a couple <strong>of</strong> letters, called sabab, in a line <strong>of</strong> verse),<br />

al- arm (a measured omission <strong>of</strong> the first vocalized letter <strong>of</strong> a threeletter<br />

foot segment, called watid, occurring at the beginning <strong>of</strong> a line<br />

<strong>of</strong> verse), and al- azm (a measured addition <strong>of</strong> up to four letters made<br />

at the beginning <strong>of</strong> a verse, not considered in scansion).<br />

ibn Dunayn r's specific reference to these variations is apparently<br />

due to their direct effect on poetic meters ـــan effect that could turn<br />

them away from what is familiar in <strong>Arabic</strong> poetry. Other variations,<br />

however, do not have such an effect.<br />

1.3.2.3. On Rhymes<br />

ibn Dunayn r devotes Chapter 41 to rhymes in poetry<br />

[correspondence <strong>of</strong> terminal sounds in lines <strong>of</strong> verse, involving<br />

identity <strong>of</strong> sound rather than spelling. "Fix" and "sticks", like "buffer"<br />

and "rougher" are perfect rhymes]. He refers to their names, letter<br />

structures ( aw ri ) and defects, inasmuch as is necessary for the<br />

cryptanalyst.<br />

49


1.3.2.4. Insight into Writing Knack<br />

This term, also used by the Author <strong>of</strong> Adab a - u ar ', means the<br />

penetrating discernment in the art <strong>of</strong> writing, its rules an principles.<br />

ibn Dunayn r discusses this topic at length, covering more than ten<br />

chapters (42-52) <strong>of</strong> his book. Arranged along the same lines as the<br />

Author <strong>of</strong> Adab a - u ar ', these rules and principles include the<br />

following:<br />

� The letters ا ( ) and ي (l) (Chapter 42)<br />

This bigram is <strong>of</strong> highest frequency and combinability, since it<br />

occurs, more <strong>of</strong>ten than not, as the definite article. Definition is a<br />

prevalent feature in most <strong>Arabic</strong> nouns.<br />

� Two-letter words (Chapter 42)<br />

These words are bigrams either inherently (words like ِٓ, ٓػ) or by<br />

inflection (e.g. imperative verbs like عك, ًٍ, and letters governed by<br />

prepositions such as ٗث, هٌ, etc.). Pure bigrams, in fact, are limited in<br />

number (there are 115 <strong>of</strong> them according to our statistics on <strong>Arabic</strong><br />

root-words). Seeking words <strong>of</strong> this kind (called "word-spotting" in<br />

today's terminology) in a cryptogram contributes favourably towards<br />

solution; indeed it is an algorithm <strong>of</strong> cryptanalysis, as ibn Dunayn r<br />

states.<br />

� The relation between the number <strong>of</strong> letters <strong>of</strong> a verse<br />

and its meter (Chapter 43)<br />

The number <strong>of</strong> letters contained in a line <strong>of</strong> verse is likely to<br />

indicate its meter. ibn Dunayn r sets boundaries to the approximate<br />

number <strong>of</strong> letters in a verse for each meter. Example: the number <strong>of</strong><br />

a - aw l (the long) and al-bas (the simple) meters ranges between 40<br />

and 50 letters. The shortest meter in <strong>Arabic</strong> poetry, however, consists<br />

<strong>of</strong> seven letters and is called manh k ar-ra az.<br />

He proceeds to consider algorithms <strong>of</strong> cryptanalysis, which include<br />

the following in order:<br />

1. Cryptanalysing the letter (ا ) ـــmainly through the well-known<br />

quantitative fact that the letter (ا) has the highest frequency <strong>of</strong><br />

occurrence <strong>of</strong> all the letters <strong>of</strong> the alphabet.<br />

2. Cryptanalysing the letter (ي l) ـــdepending either on its<br />

combinability with the letter (ا), or on its combinability with itself, i.e.<br />

its occurrence repeated in words such as: للها, ش١ٌٍا, ت١جٌٍا.<br />

50


3. Cryptanalysing the letter preceding or following (ا) ـــtaking into<br />

account that decrypting (ا) <strong>of</strong>ten makes for working out two-letter<br />

words starting or ending with it, particularly those frequently<br />

occurring bigrams such as:<br />

ٚأ, مإ, ْإ, ٞأ (starting with ا); and بِ, ب٠, ام (ending with ا).<br />

4. Cryptanalysing the letter preceding (يا al) ـــdepending on the<br />

fact that, in one word, (يا) is preceded mostly by one <strong>of</strong> the letters: (ٚ<br />

w), (ف f) or (ن k).<br />

5. Spotting five- and seven-letter words ـــconcentrating especially<br />

on the six labials in them, i.e. the letters: ي, ة, ْ, ٚ, ف and َ. Linguists,<br />

however, include the letter (ه) in place <strong>of</strong> (ٚ), dubbing these letters as<br />

the "liquid letters" or al- ur f a - ulq. No pentagram or heptagram,<br />

ibn Dunayn r maintains, is practically devoid <strong>of</strong> at least one <strong>of</strong> these<br />

letters, with very rare exceptions.<br />

� Silent letters: letters written but not pronounced (Chapter 44)<br />

ibn Dunayn r draws attention to a set <strong>of</strong> properties inherent in the<br />

<strong>Arabic</strong> language, which are beneficial to cryptologues. He begins with<br />

those letters that are orthographically written, but not vocalized, and<br />

therefore they are not considered in metrical scansion since, in<br />

prosody, it is only the enunciated letters that count. Of these letters<br />

ibn Dunayn r mentions:<br />

1. the letter (ا) that is added to the letter (ٚ) in verbs denoting<br />

plurality, e.g. اٚهبص, اٍٛهك (the functional (ا) <strong>of</strong> differentiation, called<br />

alif at-tafr q or al-f riqa), as distinguished from the intrinsic (ٚ)<br />

terminating verbs like ٚيغ٠, ٚلج٠, etc.<br />

2. the terminal "hamza" in some words such as ءبش, ءبٕث, which used<br />

to be written as بش, بٕث and nonetheless pronounced. This is common<br />

practice in ancient manuscripts. In fact this item would have been<br />

more aptly subsumed by ibn Dunayn r under the following heading,<br />

i.e. letters pronounced but not written.<br />

3. the terminal (ٚ) <strong>of</strong> the proper name ٚوّػ ( Amr), written to<br />

differentiate it from another proper name وّػ ( Umar). ibn Dunayn r<br />

favours not writing this (ٚ) in enciphered poetry lest it should cause<br />

ambiguity. However, since poetry is metrically measured, there would<br />

be no possibility <strong>of</strong> any mix-up in these two proper names.<br />

� Voiced letters: letters pronounced but not written (Chapter 45)<br />

These are mainly ا's (alifs) within proper names, <strong>of</strong>ten dropped by<br />

scribes since times <strong>of</strong> old, probably in the interest <strong>of</strong> damping the<br />

51


vocalization. Examples: ُ١٘وثإ (for ُ١٘اوثإ ), ً١ؼٍّإ (for ً١ػبٍّإ).<br />

ibn Dunayn r favours spelling out such (ا) in poetry, as the meter<br />

necessitates its retention.<br />

� The letters ( ٚ : w, ) and ( ٞ : y, ) (Chapter 46)<br />

Being <strong>of</strong> high frequency, these two letters are <strong>of</strong> service towards<br />

cryptanalysis; hence the need, on the part <strong>of</strong> the cryptanalyst, to spot<br />

them "in mid- and end-positions", 66 and consider their different modes<br />

<strong>of</strong> usage with vowel points. They occur as "geminated (mu addad),<br />

67<br />

neutral (s kin) and vocalized (muta arrik)", says ibn Dunayn r.<br />

� On glottal stops (hamzas) (Chapter 47)<br />

ibn Dunayn r refers briefly to examples <strong>of</strong> hamzas that might prove<br />

problematic, such as the mid-glottal catch (or medial hamza).<br />

� Prefixes and suffixes (Chapters 48 & 49)<br />

Also helpful in cryptanalysis is a fair knowledge <strong>of</strong> <strong>Arabic</strong> prefixes<br />

and suffixes ـــletters that, when joined to other letters make up integral<br />

entities <strong>of</strong> significance. Of the prefixes ibn Dunayn r states the letters:<br />

ٚ (w), ف (f), ة (b), ن (k), and ي (l); and <strong>of</strong> the suffixes he makes<br />

reference to the letter د (t) in three modes.<br />

� Doubled letters (Chapter 50)<br />

Consecutive repetition <strong>of</strong> the same letter contributes towards<br />

cryptanalysis. ibn Dunayn r gives examples <strong>of</strong> words containing a<br />

letter repeated:<br />

ًٍَف (in which the letter ي repeated)<br />

كَلَِ (in which the letter ك repeated)<br />

ُّل (in which the letter َ repeated).<br />

� Word patterns defined with (يا) (Chapters 51 & 52)<br />

If the letter (ي) is repeated, after (يا) at the beginning <strong>of</strong> a word, this<br />

word is all but certain to be the name <strong>of</strong> God (للها). However,<br />

ibn Dunayn r suggests alternatives. By that he is alluding to the<br />

possibility <strong>of</strong> cryptanalysing certain letters by an assumption based on<br />

their positions in a word, and on the structure and measure <strong>of</strong> the<br />

word. This principle <strong>of</strong> cryptanalysis is further expounded by the<br />

Author <strong>of</strong> Adab a - u ar '.<br />

66 See ibn Dunayn r's book, p.162.<br />

67 See ibn Dunayn r's book, p.162.<br />

52


1.3.2.5. Other Useful Observations<br />

In chapters 53 through 59 ibn Dunayn r draws attention to a<br />

number <strong>of</strong> special problems that may crop up and hinder the<br />

cryptologue's endeavour towards solution:<br />

1) long words which are devoid <strong>of</strong> the definite article (يا), such as:<br />

ُٙعهلزََٕف (10 letters); ُٙى١فى١َف (9 letters); ْٕٛ٠لزَزٍ (9 letters).<br />

2) nonsensical verses, though with sound meter ـــwhich requires<br />

the cryptanalyst to be conversant with such tools as rhyme,<br />

language, prosody, and competent to cope with any possible<br />

metrical variations and defects. This kind <strong>of</strong> meaningless poetry<br />

is described by ibn Dunayn r (in Chapter 59) as "sheer raving". 68<br />

3) absence <strong>of</strong> letter-dotting, either through the deliberate use <strong>of</strong><br />

undotted letters alone, or by choosing not to dot letters whose<br />

shape causes ambiguity. For example, the first letter <strong>of</strong> the<br />

undotted word ( ) might just as well be one <strong>of</strong> these letters:<br />

ة , س , ٞ or ْ .<br />

4) employing separate letters (letters that cannot be linked with<br />

following letters); e.g. ػٚه هاك كٚاك هاى .<br />

5) using each letter just once without repetition, as in the verses<br />

that round up all the letters <strong>of</strong> the alphabet ـــthe so-called<br />

"keys", such as the following line attributed to al- al l ibn<br />

'A mad al-Far h d :<br />

6) the verse sought for cryptanalysis being <strong>of</strong> a new form and<br />

unheard-<strong>of</strong> before.<br />

7) the intended verse being too short to allow sufficient letter<br />

frequency; the longer the verse the better for the cryptologue.<br />

8) unsound meter and language scales, owing to the poet being <strong>of</strong><br />

inferior class or shallow knowledge.<br />

9) problematic peculiarities in rhyme and meter, such as curtailing<br />

the seven-unit metric foot (ٍٓ١ػبفِ) by at once omitting the fifth<br />

and seventh neutral units <strong>of</strong> the foot, which is unacceptable in<br />

poetry.<br />

68 ibn Dunayn r's book, p.174.<br />

53


ibn Dunayn r, moreover, cautions (in Chapter 58) against the<br />

possibility <strong>of</strong> erroneous conclusions in cryptanalysis resulting from<br />

some default on the part <strong>of</strong> the encipherer. This might well impede<br />

cryptanalysis, too.<br />

- COMMENT ON AN IMPORTANT CIPHER METHOD (Chapter 60)<br />

ibn Dunayn r puts forward this method in the context <strong>of</strong> his<br />

discussion <strong>of</strong> cryptanalysis barriers. It is actually quoted from the<br />

Author <strong>of</strong> the Two Essays: "Towards the end <strong>of</strong> his Second Essay, the<br />

Author <strong>of</strong> the Two Essays on cryptanalysis states that we are destined<br />

to follow an intricate path."<br />

69 ibn Dunayn r settles for propounding<br />

the basis <strong>of</strong> the method, which involves assuming for the same letter<br />

[<strong>of</strong> the plaintext] three different symbols [in the cryptogram], to be<br />

used, one at a time, to represent that letter. On the other hand, a single<br />

symbol is assumed to represent three letters [<strong>of</strong>ten <strong>of</strong> the same<br />

orthographic pattern such as ة , د , س ]. He criticizes the method and<br />

its proponent on the basis <strong>of</strong> its susceptibility <strong>of</strong> equivocality, and<br />

concludes by saying that the Author <strong>of</strong> the Two Essays was "not wellinformed<br />

in ciphers". 70<br />

It turns out, however, that ibn Dunayn r's statement is not without<br />

prejudice for that matter. Complicated as it may seem, this method is<br />

deemed one <strong>of</strong> the important substitution methods that answer to the<br />

latest theories and principles <strong>of</strong> encipherment, in which two or more<br />

letters are substituted for one letter (homophonic substitution).<br />

1.3.2.6. Practical Examples (Chapters 61 & 62)<br />

In keeping with the common practice <strong>of</strong> most writers in this<br />

science, ibn Dunayn r works out practical examples to illustrate his<br />

71<br />

ideas. He therefore chooses two lines <strong>of</strong> verse, the first<br />

(Chapter 61) is <strong>of</strong> his own composition:<br />

in which the letters ا , ي , ٚ are found to be especially frequent. He<br />

restricts himself to disposing the letters <strong>of</strong> the verse, attaching to each<br />

69<br />

See ibn Dunayn r's book, p.176.<br />

70<br />

Ibid., p.176.<br />

71<br />

See also ibn Adl n's treatise, p.104 ff., and ibn ad-Durayhim's treatise, p.102 ff.<br />

54


letter its symbol. The following table (Table 1.8.) shows these letters<br />

arranged in descending order according to their frequency <strong>of</strong><br />

occurrence. Note that all symbols are chosen to be three-letter words<br />

ending with the letter (ه), with the middle letter diacritically marked<br />

with the neutral "suk n".<br />

Letter Symbol Frequency<br />

ا<br />

وفظ 9<br />

ي<br />

وفٍ<br />

8<br />

ٚ وؼش 8<br />

ع وغف<br />

3<br />

ة وّغ 2<br />

ك<br />

وؼٍ 2<br />

د وؾث<br />

2<br />

َ وغؽ 1<br />

ْ<br />

هلث<br />

1<br />

ى وٙش 1<br />

ف ومش<br />

1<br />

ق<br />

هنٔ<br />

1<br />

م<br />

وّش 1<br />

ً وفص 1<br />

ن<br />

وٙف<br />

1<br />

SPACE ْ<br />

7<br />

Table 1.8. The first <strong>of</strong> ibn Dunayn r's two practical examples.<br />

In the other verse (Chapter 62) ibn Dunayn r expands on the<br />

algorithm <strong>of</strong> cryptanalysis, which is conducted according to the<br />

following steps:<br />

1. Calculating the number <strong>of</strong> letters that constitute the verse (34 in<br />

this example), to deduce its meter (al-bas in our case).<br />

2. Based on step 1, inferring that the rhyme is <strong>of</strong> the overlapping<br />

type.<br />

3. Preceiving that the final letter <strong>of</strong> the verse is the same as that at<br />

the end <strong>of</strong> its first hemistich ـــa phenomenon in <strong>Arabic</strong> poetry<br />

called at-ta r .<br />

4. Sorting out the letters according to their order <strong>of</strong> frequency, and<br />

thereupon eliciting the name <strong>of</strong> God للها , utilizing the repetition<br />

<strong>of</strong> the letter (ي). Three letters are thus determined, i.e. ا, ي and ـ٘.<br />

55


5. Checking the next high-frequency letters (after ا and ي ), holding<br />

that they would probably be َ and then ٞ .<br />

6. Experimenting with probable words, based on letters so far<br />

uncovered.<br />

7. Composing a word-group that carries meaning and meter:<br />

... ٟٔأ ٍُؼ٠ للها<br />

8. Carrying on after this pattern, always building on what has<br />

already come out, and guessing yet unknown letters in three- or<br />

four-letter words, until the following verse develops:<br />

Right from the outset, ibn Dunayn r lists the letters <strong>of</strong> the verse,<br />

together with their respective symbols. In the following table (Table<br />

1.9.) these letters are re-arranged according to their descending order<br />

<strong>of</strong> frequency.<br />

Letter Symbol Frequency<br />

َ<br />

لٍِ<br />

6<br />

ي<br />

لٙف<br />

4<br />

ا<br />

لؼٍ<br />

3<br />

ٞ<br />

لجٌ<br />

3<br />

ن<br />

لٍع<br />

3<br />

ـ٘ كهٚ<br />

2<br />

ْ<br />

لٍٙ<br />

2<br />

ه<br />

لٔى<br />

2<br />

ة<br />

لؼث<br />

2<br />

ػ<br />

كوِ<br />

2<br />

ع<br />

لجػ<br />

1<br />

ؽ<br />

لمػ<br />

1<br />

ٚ<br />

لغٔ<br />

1<br />

ط<br />

لٕ٘<br />

1<br />

د كوغ 1<br />

Table 1.9. The second <strong>of</strong> ibn Dunayn r's two practical examples.<br />

1.3.2.7. Conclusion (Chapters 63-66)<br />

ibn Dunayn r brings his book to a close by priding himself on<br />

having broken fresh ground, suggesting that he manages to run the<br />

56


gamut <strong>of</strong> encipherment from simple to composite on the one hand, and<br />

from prose to poetry on the other. He insinuates that al-Kind 's and<br />

ibn ab aba's treatises on cryptanalysis "both failed to develop the<br />

topic exhaustively in either case". 72<br />

He then cites lines <strong>of</strong> verse [cipher alphabets or cryptographic<br />

keys], each embracing the <strong>Arabic</strong> alphabet in such a way as to avoid<br />

the repetition <strong>of</strong> any letter. These are quoted almost entirely from the<br />

treatise extracted from Adab a - u ar ', to be followed by verses<br />

sometimes used in encipherment, and intended for sustained mental<br />

exertion in pursuit <strong>of</strong> solution. The difficulty underlying these verses<br />

stems from one or more <strong>of</strong> the following practices:<br />

1) using undotted letters <strong>of</strong> identical spelling patterns.<br />

2) repeating such letters in a manner so unfamiliar as to upset the<br />

principle <strong>of</strong> letter frequency.<br />

3) purposely using letters that do not admit linking with one<br />

another all through the verse; e.g.<br />

4) repeating in the second hemistich the same words <strong>of</strong> the first<br />

hemistich, but in different order. Example:<br />

5) writing the verse adroitly such that the first hemistich is read<br />

forward as the second hemistich is read backward. Example:<br />

6) using odd or out-<strong>of</strong>-the-way poetic meters, or yet neo-meters<br />

that never belong to the well-known meters <strong>of</strong> al- al l. Also,<br />

failure to observe a uniform rhyme or rhyme letter.<br />

ibn Dunayn r subjoins a statement restricting the limits <strong>of</strong> the<br />

cryptanalyst by analogy: "The cryptanalyst is not obliged to puzzle out<br />

ciphers intended for mental exertion, just as the grammarian is not<br />

bound to enter into intricate issues."<br />

73<br />

72 See ibn Dunayn r's book, p.184.<br />

73 Ibid., p.186.<br />

57


1.4. Originality <strong>of</strong> ibn Dunaynir<br />

Regardless <strong>of</strong> his drawing upon the works <strong>of</strong> his predecessors,<br />

ibn Dunayn r stands great amidst cryptological figures. The features <strong>of</strong><br />

his originality are manifested first and foremost in the following<br />

contributions:<br />

1. The utilization <strong>of</strong> numbers in substitution encipherment.<br />

2. The employment <strong>of</strong> several numbers in ciphering each letter by<br />

substitution. This method as developed by ibn Dunayn r (though<br />

tackled before him by the Author <strong>of</strong> the Two Essays,<br />

substituting several symbols for a single letter) underscores his<br />

pr<strong>of</strong>ound cryptographical knowledge, and is known today as the<br />

principle <strong>of</strong> "frequency reversals". To be noted is that the<br />

earliest instances <strong>of</strong> using this method in Europe date from the<br />

reign <strong>of</strong> King Henry IV <strong>of</strong> France, in his correspondence with<br />

74<br />

the Landgrave <strong>of</strong> Hesse between 1602-1606, that is four<br />

hundred years after ibn Dunayn r.<br />

3. The demonstration <strong>of</strong> composite methods <strong>of</strong> encipherment such<br />

as the one implementing transposition and substitution together,<br />

which has proved important in today’s block cipher algorithms<br />

such as the Data Encryption Standard (DES) and the more<br />

recent Advanced Encryption Standard (AES), both are based on<br />

the principle <strong>of</strong> encipherment using both methods<br />

simultaneously, but carrying it to a higher degree <strong>of</strong><br />

sophistication by means <strong>of</strong> a binary number system.<br />

4. The abundant use <strong>of</strong> encipherment by concealment, which he<br />

describes as composition on a background or medium that<br />

disguises the actual intent, such as composing on a tale, dream,<br />

chessboard, financial register, planets, etc.<br />

5. The utilization <strong>of</strong> encipherment devices such as coloured beads,<br />

punched board and thread, folded paper, etc.<br />

6. The use <strong>of</strong> encipherment by signaling, applying the arithmetic <strong>of</strong><br />

decimally-weighted numerical alphabet (ADWNA) and the<br />

finger-spelling method <strong>of</strong> communication between two<br />

individuals (manual alphabet).<br />

74 See Treatise on Cryptography, A. Lange and E. A. Soudart; Laguna Hills, CA:<br />

Aegean Park Press, 1981, p.10.<br />

58


It would finally be just as well to remark that most <strong>of</strong> ibn Dunayn r's<br />

contributions listed above relate to prose encipherment. Not that his<br />

contribution in poetry is any less worthy, but contributions there are<br />

common ground among fellow authors <strong>of</strong> similar treatises; hence the<br />

difficulty defining clear-cut aspects <strong>of</strong> ibn Dunayn r's originality.<br />

Suffice it to say that it is to his credit that he could exhaust the subject<br />

<strong>of</strong> encipherment and cryptanalysis <strong>of</strong> both prose and poetry at such<br />

length that is unique to him among all those who have written on this<br />

art.<br />

59


Section 2<br />

ibn Dunayn r's Edited Book:<br />

Expositive Chapters on Cryptanalysis<br />

60


2.1. Editing Methodology<br />

The main purpose <strong>of</strong> editing is the reproduction <strong>of</strong> a text as close to<br />

the author's original as possible. In line with this objective we have<br />

opted for preserving the statement <strong>of</strong> the original whenever possible.<br />

� The very nature <strong>of</strong> the original manuscripts required the<br />

addition -where appropriate- <strong>of</strong> explicatory titles in the<br />

interest <strong>of</strong> marking out divisions or classifications. This<br />

would prove useful for easy understanding and clarity <strong>of</strong><br />

ideas.<br />

� No effort has been spared in the interpretation <strong>of</strong> citations<br />

(Koranic verses, Prophetic traditions, lines <strong>of</strong> poetry,<br />

sayings, etc.) contained in the treatises. We have given brief<br />

biographical identification <strong>of</strong> personalities (in footnotes to<br />

<strong>Arabic</strong> text only), relegating interested readers (in <strong>Arabic</strong>)<br />

to such authorities as al-A l m by ayr al-D n al-Zirkily or<br />

Mu am al-mu'allif n by Omar Ri Ka la, for further<br />

and more detailed biographical reference. Those citations<br />

and personalities that our efforts fell short <strong>of</strong> their<br />

interpretation or identification have also been properly<br />

recorded.<br />

� In explaining the linguistic terms included in the treatise we<br />

have made use <strong>of</strong> various dictionaries, old and modern,<br />

foremost <strong>of</strong> which are: Lis n al- Arab and Matn al-lu a.<br />

Unless otherwise helpful, no reference has been made to<br />

any dictionary.<br />

� We have adopted the same symbols and signs commonly<br />

employed by editors <strong>of</strong> <strong>Arabic</strong> manuscripts, and conformed to<br />

the modern spelling norms. We have enclosed requisite<br />

contextual additions -i.e. explanatory insertions and comments<br />

other than the writer's own words- within square brackets [ ];<br />

examples illustrating rules <strong>of</strong> encipherment have been set <strong>of</strong>f by<br />

round brackets (parentheses) ( ); book titles in italics; quoted<br />

material and Prophetic traditions have appeared within<br />

quotation marks ― ‖ , while floral brackets �� have been used to<br />

enclose Koranic verses. 75<br />

75 Translator's explanatory additions are placed between pairs <strong>of</strong> hyphens: -…-.<br />

62


2.2. Description <strong>of</strong> the manuscript<br />

ibn Dunayn r’s book is one <strong>of</strong> several treatises making up the<br />

assemblage <strong>of</strong> cryptology, which is part <strong>of</strong> the stock <strong>of</strong> the F ti<br />

Library, preserved in as-Sulaym niyya Ottoman Archives in Istanbul<br />

under number 5359. The largest in that aggregate, ibn Dunayn r’s<br />

book spans the sheets 54/A to 80/A. The first sheet contains the title:<br />

Zubad fu l ibn Dunayn r f all at-tar im (The gist <strong>of</strong> ibn<br />

Dunayn r’s chapters on cryptanalysis), followed immediately by six<br />

lines <strong>of</strong> poetry on rhymes and related topics. 76 The second sheet bears<br />

the title: Maq id al-Fu l al-Mutar ima an all at-Tar ama.<br />

Following are photocopies <strong>of</strong> these two sheets, as well as the last sheet<br />

<strong>of</strong> the book.<br />

76 It has been found appropriate to shift the contents <strong>of</strong> this sheet to the end <strong>of</strong> the<br />

book, where it fits more snugly in the context <strong>of</strong> cryptanalysing poetry.<br />

63


Figure 2.1. A photocopy <strong>of</strong> the first sheet <strong>of</strong> ibn Dunayn r's book<br />

(Document No. 5359, as-Sulaym niyya Ottoman Archives, Turkey)<br />

64


Figure 2.2. A photocopy <strong>of</strong> the second sheet <strong>of</strong> ibn Dunayn r's book<br />

(Document No. 5359, as-Sulaym niyya Ottoman Archives, Turkey)<br />

65


Figure 2.3. A photocopy <strong>of</strong> the last sheet <strong>of</strong> ibn Dunayn r's book<br />

(Document No. 5359, as-Sulaym niyya Ottoman Archives, Turkey)<br />

66


2.3. ibn Dunaynir’s Book<br />

Expositive Chapters on<br />

Cryptanalysis<br />

(Original <strong>Arabic</strong> Text and English Translation)<br />

67


In the name <strong>of</strong> God<br />

the Compassionate, the Merciful.<br />

Maq id al-Fu l al-Mutar ima<br />

an all at-Tar ama<br />

68


He said, following the honorific opening statement in praise <strong>of</strong> God<br />

and the introduction: This book is divided into two parts: the first<br />

tackles the cryptanalysis <strong>of</strong> prose ciphers; the other deals with<br />

cryptanalysing poetry ciphers. I have further divided each part up into<br />

well-organized chapters, covering all types <strong>of</strong> encipherment and their<br />

respective algorithms for cryptanalysis. In so doing I always turn to<br />

God for right guidance and support; most sufficient unto me is He, the<br />

Holy One, in whom I trust.<br />

[PART ONE]<br />

[Cryptanalysis <strong>of</strong> Prose Ciphers] 77<br />

I say: It is true that cryptanalysis is achieved first and foremost<br />

through conjecturing about the cipher sought for solution. The<br />

cryptanalyst keeps trying alternatives and assuming possibilities until<br />

all the forms <strong>of</strong> the ciphertext reveal all their corresponding letters <strong>of</strong><br />

the alphabet. However, there are measured principles and rules<br />

governing this art, so that what is assumed by the cryptanalyst is an<br />

outcome <strong>of</strong> reasoning and argument by analogy, and not an issue <strong>of</strong><br />

haphazard, hit-or-miss endeavour. Successful cryptanalysis involves<br />

two aspects: First, familiarity with the order <strong>of</strong> letter frequency <strong>of</strong><br />

occurrence; namely knowledge <strong>of</strong> the letters <strong>of</strong> high occurrence<br />

[abundant letters], those <strong>of</strong> medium occurrence [common letters], and<br />

those <strong>of</strong> least occurrence [scarce letters].<br />

77 Square brackets contain useful explanatory additions to the original text.<br />

70


The second aspect is a thorough knowledge <strong>of</strong> letter combination<br />

and non-combination; namely having cognizance <strong>of</strong> the combinable<br />

and non-combinable letters, letters combinable in both pre- and post-<br />

positions [anteriorly and posteriorly], those non-combinable both in<br />

pre- and post-positions, those combinable pre-positively only, and<br />

those combinable post-positively in relation to each other. I am herein<br />

stating them in a way that serves the purpose well without much toil.<br />

Moreover, every pursuit needs some kind <strong>of</strong> instrument expressive<br />

<strong>of</strong>, and responsive to, one’s intention. The requisite instrument <strong>of</strong> this<br />

art is the familiarity with the methods <strong>of</strong> encipherment I am going to<br />

mention in the course <strong>of</strong> the book.<br />

Any person involved in this science should be endowed with<br />

intelligence, observation, insightful delicacy, keen intuition,<br />

equanimity <strong>of</strong> mind, proper flair and apt speculation. Otherwise he<br />

would never stand to benefit by any <strong>of</strong> the methods conducive to<br />

cryptanalysis. Nay, some may have the plaintext already right under<br />

their very nose, yet they are not well-guided to read the cipher<br />

message contained therein, let alone to put to use or even grasp my<br />

say!<br />

Chapter [1] 78<br />

Cryptanalysing enciphered letters can be done through the<br />

utilization <strong>of</strong> either quantitative or qualitative expedients. By<br />

―quantitative‖ is meant the frequency <strong>of</strong> occurrence <strong>of</strong> a letter sought<br />

for cryptanalysis in a ciphertext. By ―qualitative‖ is meant the mode <strong>of</strong><br />

the letter occurrence [as regards combinability] in the ciphertext.<br />

78 Chapter numbering is an addition for easier cross-referencing.<br />

72


Chapter [2]<br />

As for cryptanalysis by the quantitative occurrence <strong>of</strong> a letter in a<br />

ciphertext, I say:<br />

Of all the letters <strong>of</strong> the alphabet, long and s<strong>of</strong>t letters, or what is<br />

called ―vowel letters‖, have the highest frequency in the <strong>Arabic</strong><br />

tongue. These are ا ( ), ٚ (w/ ) and ٞ (y/ ). Some give preference to<br />

the letter ي (l) over ٚ on account <strong>of</strong> the fact that the letter ي is <strong>of</strong> high<br />

occurrence with the letter ا, specifically to form the <strong>Arabic</strong> definite<br />

article (يا), although it <strong>of</strong>ten occurs with other letters or doubled.<br />

Because <strong>of</strong> its high frequency in use, which exceeds the frequency <strong>of</strong><br />

the letter ٚ, the letter ي takes precedence [over ٚ], and so is the case<br />

with the letter َ (m), which has priority over ٚ and ٞ 79 .<br />

The letters ا , ٚ and ٞ are called the vowel letters because they<br />

represent the voiced speech sounds created with air passing out free<br />

without causing undue friction. That is why they have the highest<br />

frequency among all letters in all tongues. Other letters vary in their<br />

frequency from one language to another. The letter ً (s), for example,<br />

is more abundant in Latin than all other letters except for the vowels.<br />

Turkish and Mongol are abundant in the letter ْ (n), and so forth. If<br />

we set out to describe the algorithms <strong>of</strong> cryptanalysis in each tongue,<br />

the book would grow larger. Let us now start to address the methods<br />

<strong>of</strong> encipherment in the <strong>Arabic</strong> language, and their algorithms for<br />

cryptanalysis.<br />

79 Thus the frequency count <strong>of</strong> abundant letters according to ibn Dunayn r, in order<br />

<strong>of</strong> precedence, is: ا, ي, َ, ٚ and ٞ.<br />

74


Chapter [3]<br />

Encipherment <strong>of</strong> letters falls naturally into two major types: i.e.<br />

simple encipherment and composite (or super-) encipherment.<br />

SIMPLE encipherment is divided into two parts: in the first part<br />

letters change their forms; in the other, letters retain their forms.<br />

Simple encipherment where letters change their forms can either be<br />

with conceptual relationship and diffusion, or without conceptual<br />

relationship and diffusion.<br />

That with relationship and diffusion can be either relation by<br />

species, or relation by genus. In each case the symbol indicative <strong>of</strong> a<br />

letter may be either one symbol or numerous symbols. By one we<br />

mean representing the letter ط ( ), for instance, by a symbol suggesting<br />

a single bird such as a pigeon. By numerous is meant the<br />

representation <strong>of</strong> the letter ط by a symbol suggesting any bird, since<br />

the bird genus includes all species <strong>of</strong> birds.<br />

76


Chapter [4]<br />

The other division [<strong>of</strong> simple encipherment where letters change<br />

their forms] is that without relationship and diffusion. This splits up<br />

into two subdivisions: EITHER by changing the forms <strong>of</strong> letters<br />

-substitution-, OR by keeping the forms <strong>of</strong> letters -transposition-.<br />

Changing the forms <strong>of</strong> letters is accomplished by adopting a cipher<br />

alphabet <strong>of</strong> devised shapes [or symbols] not having the usual forms <strong>of</strong><br />

letters. This may be done EITHER by replacing each letter by one<br />

symbol, OR by assuming symbols for those letters that <strong>of</strong>ten go<br />

together.<br />

Simple encipherment by keeping the forms <strong>of</strong> letters branches into<br />

two types: the one involves changing the original positions <strong>of</strong> letters;<br />

the other is without changing the original positions.<br />

Changing the original positions <strong>of</strong> letters is divided into two<br />

methods: the one is transposition by changing the position <strong>of</strong> a letter<br />

in relation to surrounding letters, viz in anterior and posterior<br />

positions; the other is transposition by changing the position <strong>of</strong> a letter<br />

in relation to itself, viz in terms <strong>of</strong> only changing its angle <strong>of</strong><br />

presentation.<br />

As for enciphering without changing the original positions <strong>of</strong><br />

letters, there are two methods: EITHER by the addition <strong>of</strong> extra<br />

symbols -nulls-; OR without adding such symbols [rather by omitting<br />

one or more symbols]. If nulls are used, they may be either one or<br />

numerous.<br />

78


Chapter [5]<br />

The other part <strong>of</strong> simple encipherment [where letters retain their<br />

forms] is achieved via two principles: the one is quantitative; the other<br />

is qualitative.<br />

The quantitative principle divides into two subdivisions: the one is<br />

to double, triple, quadruple, etc. the letter. Duplication may be applied<br />

to all or some <strong>of</strong> the letters. The other subdivision <strong>of</strong> the quantitative<br />

principle is to merge all the letters that can be merged, by assuming<br />

one common symbol for those which have the same contour. This may<br />

be exercised over all the letters, or only over some.<br />

The qualitative principle, on the other hand, can be accomplished<br />

either by linking all or some <strong>of</strong> the letters that are inherently<br />

separated, or by separating all or some <strong>of</strong> the letters that are inherently<br />

linked.<br />

80


Chapter [6]<br />

The other major type <strong>of</strong> encipherment <strong>of</strong> letters, i.e. COMPOSITE<br />

(or super-) encipherment, falls into two divisions: the one is a<br />

combination <strong>of</strong> simple methods, and the other is what ensues in<br />

consequence 80 .<br />

Now then, I have gone through with all the types <strong>of</strong> simple as well<br />

as composite encipherment, numerous and diverse as they are 81 . This<br />

is all that is necessary for the encipherer to know, as these divisions<br />

cover the long and the short <strong>of</strong> encipherment. If we set out to dilate on<br />

them all, it would take long, and time would press. Now let us start<br />

with simple ciphers that are prerequisites for the encipherer in<br />

practice. Then we state the relevant algorithms <strong>of</strong> cryptanalysis,<br />

before we embark on composite ciphers. What applies to<br />

cryptanalysing simple ciphers also applies to cryptanalysing<br />

corresponding composites; and thus developing a thorough knowledge<br />

<strong>of</strong> simple methods <strong>of</strong> encipherment will render superfluous the<br />

exposition <strong>of</strong> all composite methods, since these would then never<br />

miss the cryptologue’s perspicacity and insight a priori. Nevertheless,<br />

I am to mention the various divisions <strong>of</strong> composite encipherment, and<br />

algorithms for their decryption [in due course].<br />

80 There is no mention to the latter division in al-Kind ’s treatise (q.v., p.142). ibn<br />

Dunayn r is probably referring to composing through a medium, as we shall see.<br />

81 In fact ibn Dunayn r’s handling <strong>of</strong> the types <strong>of</strong> encipherment here tends to be<br />

more <strong>of</strong> an honest rendition <strong>of</strong> his predecessor al-Kind than an original<br />

investigation. Compare with al-Kind , Volume One, p. 132 ff.<br />

82


Chapter [7]<br />

I say: The type <strong>of</strong> encipherment characterized by changing the<br />

forms <strong>of</strong> letters is achieved by devising shapes or symbols not<br />

attributed to letters at all. In this method every letter is represented by<br />

a symbol that is unique to it. The cryptanalysis is accomplished by<br />

counting the symbols <strong>of</strong> the cipher message, and establishing the<br />

frequency <strong>of</strong> occurrence for each symbol, by affixing the frequency<br />

number to the respective symbols <strong>of</strong> the cipher. Having done that, you<br />

dispose the symbols in order <strong>of</strong> frequency precedence, designating the<br />

most frequently-occurring symbol in its locations throughout the<br />

cryptogram. Do the same with the next frequently-occurring symbol,<br />

and so forth until you exhaust all the symbols <strong>of</strong> enciphered letters.<br />

Now place the highest-frequency symbol against the highest-<br />

frequency letter <strong>of</strong> the <strong>Arabic</strong> alphabet, doing the same with the rest,<br />

conformably with their order <strong>of</strong> frequency. Keep going in the same<br />

vein until you use up all the letters and symbols. Make sure to place<br />

the symbol <strong>of</strong> highest frequency against the <strong>Arabic</strong> letter (ا), for it has<br />

the highest frequency <strong>of</strong> all letters in all languages, as we have already<br />

stated in the context <strong>of</strong> discussing the vowel letters. Remember also<br />

that the letter (ي) is the next highly frequent letter after (ا) in all<br />

tongues, followed by the letter (ٚ), then (َ), ( ـ٘), (ٞ) and (ْ)<br />

respectively. You keep on matching letters until they begin to show<br />

intelligible relationship. Symbols defying solution should be tracked<br />

down time and again, using fair conjecture until their purport comes<br />

right for you.<br />

84


Chapter [8]<br />

I have considered the orders <strong>of</strong> letter frequencies according to the<br />

reckoning <strong>of</strong> Ya q b al-Kind , peace be on his soul. He said he had<br />

turned to seven parchments and counted all the orders <strong>of</strong> letter<br />

frequency <strong>of</strong> occurrence in them, to find that the frequency <strong>of</strong> the<br />

letter ا ( ) was 600. the frequency <strong>of</strong> the letter ي (l) was 437, that <strong>of</strong> the<br />

letter َ (m) was 320, and so on till the end <strong>of</strong> his citation 82 . It so<br />

occurred to me to take up [other] written sheets myself and count the<br />

letter frequency orders in them. Thus I took three sheets <strong>of</strong> prose<br />

epistolary texts and calculated the frequency <strong>of</strong> the letter ا ( ); it turned<br />

out to be 575. the frequencies <strong>of</strong> other letters were found to be as<br />

follows [in descending rank]: the letter ي (l) occurred as <strong>of</strong>ten as 360<br />

times; the letter َ (m) 265 times; ـ٘ (h) 260; ٚ (w/ ) 250; ٞ (y/ ) 230;<br />

ْ (n) 225; ه (r) 195; ع ( ) 170; ف (f) 145; د (t) 115; ة (b) 105;<br />

ن (k) 95; ك (d) 80; ً (s) 75; ق (q) 62; ػ ( ) 50; ط ( ) 43; م ( ) 32;<br />

ص ( ) 28; ُ ( ) 17; ؿ ( ) 13; س ( ) 11; ى (z) 9; ط ( ) 8; ظ ( ) 7;<br />

ؽ ( ) 5. 83 So it came home to me the validity <strong>of</strong> the statement <strong>of</strong><br />

Ya q b ibn 'Is q [al-Kind ], peace be on his soul.<br />

82<br />

See other letter frequencies according to al-Kind and ibn Adl n in Volume One,<br />

p.168 and Volume Two, p.48 respectively.<br />

83<br />

The letter ض ( ) does not appear in this count, neither does it in al-Kind ’s count;<br />

see al-Kind ’s treatise, p.168. Its frequency according to ibn Adl n is 23; see his<br />

treatise, p.48.<br />

86


Chapter [9]<br />

If the cryptogram is very short, there exists insufficiency in it <strong>of</strong> the<br />

frequency <strong>of</strong> letter occurrence. The expedient for cryptanalysis to be<br />

used here is to determine those letters [<strong>of</strong> the alphabet] which admit<br />

combination with each other, and those which do not. The cryptologue<br />

should be ambly experienced to cope, until he elicits the intended<br />

meaning <strong>of</strong> that scant cipher. Let us then start to address combinable<br />

and non- combinable letters, so as to guide the seekers <strong>of</strong><br />

cryptanalysis to this honourable science, and acquaint them with the<br />

rules <strong>of</strong> this art. In the following table, we shall demonstrate the<br />

various divisions <strong>of</strong> letters and their relative non-combinability,<br />

numerous and diverse as they are, with the good assistance <strong>of</strong> God.<br />

88


ً (s)<br />

س م ى<br />

م ( ) س ى<br />

ى (z) س م<br />

ص ( ) س م<br />

does not<br />

ض ( ) س م<br />

combine<br />

ظ ( ) س مك<br />

with<br />

ػ ( ) ؿ ع<br />

ؿ ( ) ػ ؽ<br />

ط ( ) ق ط<br />

ؽ ( ) ط ػ<br />

س ( ) م ى<br />

ط<br />

ص<br />

ى<br />

ص<br />

ى<br />

ؽ<br />

ظ<br />

ؿ<br />

ص<br />

90<br />

ص<br />

ظ<br />

ظ<br />

ط<br />

ط<br />

ط<br />

ؽ<br />

ع<br />

ض<br />

ض<br />

ص<br />

ً<br />

ظ<br />

ظ<br />

ص<br />

ظ<br />

ض<br />

ً<br />

ً<br />

ط ض<br />

[Relative non-combinability <strong>of</strong> letters]<br />

ظ<br />

ً<br />

ً<br />

ض<br />

ُ<br />

ً<br />

anteriorly<br />

nor<br />

posteriorly


Chapter [10]<br />

I say: Letters are divided into four groups: the first group represents<br />

letters that combine with each other in both anterior and posterior<br />

positions; the second group covers those letters that do not combine<br />

with other letters neither in anterior nor in posterior position; the third<br />

designates those letters combinable with other letters anteriorly, but<br />

non-combinable posteriorly; and the fourth group embraces letters that<br />

combine with some others posteriorly rather than anteriorly. These are<br />

the possible divisions <strong>of</strong> all letters with respect to their combinability,<br />

disparate as they are in their characteristics and peculiarities.<br />

Letters combinable anteriorly as well as posteriorly are all the<br />

[variable] letters, with the exception <strong>of</strong> those that I am to exclude for<br />

you. These are: ا ة د ً ف ن ي َ ْ ـ٘ ٚ ٞ , <strong>of</strong> which the letter<br />

(ً) combine with some letters rather than some others. It does not<br />

combine in anterior nor posterior position with these letters:<br />

س م ظ ص ض ى ; but it does combine [in both positions] with:<br />

ط ػ ؿ ك م ه ُ ط ع ؽ ف ق ن ي َ ْ ـ٘ ٚ ٞ ا ة د.<br />

The basic letters, sixteen in number, are these:<br />

س ط ػ ؿ ك م ه ى ُ ص ض ط ظ ع ؽ ق , which are intrinsic and<br />

never change. Variable letters are not sheer basics, but they occur now<br />

as basic now as affixing letters.<br />

92


Basic letters are so designated because some <strong>of</strong> them are not<br />

combinable with one another prepositively nor postpositively; some<br />

are combinable prepositively only; while some others are combinable<br />

postpositively only. Variables are so denominated owing to the fact<br />

that they vary, i.e. can combine with all letters anteriorly and<br />

posteriorly, save the letter ً as already stated.<br />

Let us now draw up a comprehensive table <strong>of</strong> non-combinable<br />

letters, letters combinable anteriorly, and those combinable<br />

posteriorly; also those letters that are used and that are not used. This<br />

is particularly helpful to elucidate the matter at issue, and expose it<br />

smoothly without striking snags to its pursuer, who should be keen to<br />

attend to it, ponder on it, and seek the advice <strong>of</strong> those who know<br />

better.<br />

This table, together with the previous one, portrays all letter<br />

potentials <strong>of</strong> combinables, non-combinables, variables, basics, letters<br />

used and not used. And I abridged that considerably such that my<br />

version should suffice instead <strong>of</strong> al-Kind ’s treatise and its long-<br />

winded prolixity. 84<br />

84 Contrary to ibn Dunayn r’s belief, al-Kind 's treatise is far from prolix; it is a<br />

typical example <strong>of</strong> brevity and depth <strong>of</strong> investigation.<br />

94


Letters not used<br />

are these<br />

Letters used are<br />

these<br />

96<br />

(2) (1)<br />

These letters do<br />

combine<br />

anteriorly with<br />

all letters in<br />

column 1<br />

These letters do<br />

not combine<br />

anteriorly with<br />

any letter in<br />

column 2


Chapter [11]<br />

Encipherment by changing the forms <strong>of</strong> letters [monoalphabetic<br />

simple substitution] is accomplished by substituting for each letter the<br />

form <strong>of</strong> another, such as using the form <strong>of</strong> the letter (ق) to denote the<br />

letter (ؽ), and (ن) to indicate (ك), and the like. I have already<br />

elaborated this method fully in my book [a - ih b an-n im f ilm]<br />

wa at-tar im, which serves well instead <strong>of</strong> restatement here. The<br />

algorithm <strong>of</strong> cryptanalysis there<strong>of</strong> has been outlined earlier.<br />

Chapter [12]<br />

Encipherment by changing the forms <strong>of</strong> letters can also be attained<br />

by devising a symbolic cipher alphabet, not in the least pertaining to<br />

the plaintext letters [substitution by symbol]. These devised forms<br />

may be substituted one for each letter and aligned beside one another.<br />

However, substitution can be applied to all or only some <strong>of</strong> the letters.<br />

The algorithm <strong>of</strong> cryptanalysing this method entails the utilization <strong>of</strong><br />

the [quantitative] expedients mentioned earlier.<br />

98


Chapter [13]<br />

I say: If encipherment is done by maintaining the forms <strong>of</strong> letters<br />

but changing their relative positions in relation to the surrounding<br />

letters, it is very easy to cryptanalyse. Observing the incoherence <strong>of</strong><br />

the connection, you realize that letters have been interchanged. You<br />

try to restore their original arrangement time and again, and you are in<br />

line for hitting the mark.<br />

If the letters are devised forms [i.e. employing simple substitution]<br />

and interchanged as we have already stated [i.e. by transposition], the<br />

way for cryptanalysing them consists in the utilization <strong>of</strong> the first<br />

instrument [i.e. the quantitative expedient]. Once the cryptologue<br />

works out the letter orders [<strong>of</strong> frequency], and places each letter <strong>of</strong> the<br />

alphabet against its devised counterpart in the cryptogram, he<br />

interchanges their relative positions reciprocally, shifting the letters<br />

backward and forward in relation to one another, until they slot into<br />

place and the intended meaning shows up 85 .<br />

Encipherment by changing the position <strong>of</strong> a letter in relation to<br />

itself is done simply by altering the angle <strong>of</strong> its setup, assuming<br />

various angles <strong>of</strong> presentation, such as writing it upside down or<br />

standing on its end. Cryptanalysing this type is so easy that it would<br />

never miss the common sense <strong>of</strong> anyone with perceptive insight. It is<br />

to set straight the forms by turning the angles <strong>of</strong> their setup. Once any<br />

<strong>of</strong> the letters is adjusted, you take that form as a clue to that letter in<br />

all places.<br />

85 This is the first indication to a composite cipher achieved by substitution and<br />

transposition together.<br />

100


Chapter [14]<br />

Encipherment without changing the positions and forms <strong>of</strong> letters is<br />

rendered by embedding [within or between words] additional<br />

insignificant letters [nulls], that must not be vowels. The cryptanalysis<br />

<strong>of</strong> this encipherment is reasoned out by calculating the forms and<br />

sorting them out. If you find them in excess <strong>of</strong> the letter orders, try to<br />

work out some <strong>of</strong> them by the first expedients we have previously<br />

mentioned. You now look into the letters non <strong>of</strong> which has yet shown,<br />

and seek their identical instances among those already puzzled out. If,<br />

by eliminating those letters sought for solution, the context makes<br />

sense and word composition straightens, you conclude the letters left<br />

out are all nulls-spacers. When the encipherment is done using one<br />

null only, in that case you have already solved it ipso facto, since the<br />

single null is employed as a word-spacer.<br />

102


Chapter [15]<br />

I was asked to cryptanalyse a ciphered message, but found it<br />

incompatible with any <strong>of</strong> the [simple encipherment] divisions. I<br />

pondered on it, sorted out its characters against the letters <strong>of</strong> the<br />

alphabet, but it was still impenetrable through utilizing those<br />

algorithms. When I dropped certain characters and re-composed the<br />

letters they fell into place and turned out well. I did the same<br />

elsewhere in the cipher, and words also tied in. So I kept dropping<br />

those letters wherever they occurred in the cryptogram, and the thread<br />

came right for me. I grasped its content to the end, and realized that<br />

the characters dropped were all nulls, and that some letters <strong>of</strong> the<br />

alphabet might be omitted, to be replaced by nulls. That is perhaps the<br />

most intricate and problematic encipherment possible. By changing<br />

the forms <strong>of</strong> letters, altering their positions, and at the same time<br />

omitting [certain] letters <strong>of</strong> the alphabet to replace them with null<br />

forms, the cipher would be very hard to solve indeed. Nevertheless,<br />

and by the good assistance <strong>of</strong> the Almighty, I managed to solve it<br />

straightway.<br />

104


Chapter [16]<br />

There is another method <strong>of</strong> encipherment [without relationship and<br />

diffusion] and without changing the forms <strong>of</strong> letters, their positions or<br />

setup, and implemented not by adding nulls, but by omitting letters<br />

from the cipher message 86 . The cryptanalysis here lies in computing<br />

the forms; if they are found less in number than the alphabet count,<br />

you detect them through the first expedients we have mentioned<br />

earlier in this book. Work out some letters <strong>of</strong> the cryptogram sought<br />

for cryptanalysis. If you notice, by seeking their identical counterparts<br />

elsewhere therein, the existence <strong>of</strong> one and the same letter omitted so<br />

that the context does not straighten, examine the context closely and<br />

weigh up what is [purposely] omitted, as the words and import would,<br />

in all likelihood, point to it. For example, instead <strong>of</strong> writing للها َُث you<br />

write للها ٌث, dropping the letter َ. You will soon realize that the<br />

context tends to bespeak its existence. To establish the identity <strong>of</strong> the<br />

missing letter, you sample the vacancies against all the letters <strong>of</strong> the<br />

alphabet [one by one]. If, in two or three places <strong>of</strong> the cipher, the<br />

cryptanalyst finds that the same letter is missing, he concludes, in<br />

positive assertion, that it has been [deliberately] dropped.<br />

Chapter [17]<br />

The next type <strong>of</strong> [simple] encipherment to consider is that where<br />

letter forms are changed with relationship and diffusion; namely the<br />

letters here are conceptually related by species or by genus. Their<br />

relationship by species involves representing the ciphered letter ط ( ),<br />

for instance, with the symbol <strong>of</strong> a single bird, say a dove. Their<br />

relationship by genus entails designating the same letter ط using the<br />

symbol <strong>of</strong> every bird, as flight is a feature that all birds have in<br />

common. This is the most demanding aspect <strong>of</strong> this type <strong>of</strong><br />

encipherment. Once it is observed, the rest would be manipulated by<br />

the first afore-stated technique.<br />

86 This is the method ibn Dunayn r drops in his discussion <strong>of</strong> the types <strong>of</strong><br />

encipherment; see p.13.<br />

106


Chapter [18]<br />

In the preceding chapters we have tackled simple ciphers<br />

accomplished via the qualitative principle, given that there are just a<br />

few simple methods which remain unmentioned. Now let us enter<br />

upon composite ciphers here as they also pertain under the qualitative<br />

principle. So I say: Ciphers that are intended to be composite could<br />

really be a combination <strong>of</strong> practically all the afore-mentioned simple<br />

methods. Composition <strong>of</strong> [simple] methods tends to give rise to quite<br />

a large multitude <strong>of</strong> ciphers, too many to be addressed all herein. But I<br />

mentioned a good few <strong>of</strong> them to serve as a guideline in deciding on<br />

unmentioned cases, if any. al-Kind never attended to composite<br />

encipherment except incidentally 87 [without dwelling on details].<br />

Whoever attempted to deal with it, other than al-Kind , certainly raved<br />

and went astray on that score. I am going to present it to you on the<br />

spot, along with the algorithm for its cryptanalysis, by the good<br />

assistance <strong>of</strong> God Almighty.<br />

87 In fact al-Kind ’s treatment <strong>of</strong> composite encipherment and the algorithms for its<br />

cryptanalysis is precise and in conformity with the system <strong>of</strong> brevity and<br />

compactness that he adopts and observes throughout. See his treatise p.142 and<br />

p. 164.<br />

108


Chapter [19]<br />

To identify a cipher as composite, check it against all types <strong>of</strong><br />

simple encipherment individually. If, after all, the cipher remains<br />

abstruse, it is concluded to be composite; thereupon it should be<br />

matched up against the type by which a part <strong>of</strong> the cryptogram has<br />

been worked out, until it makes sense. Bear in mind that the composite<br />

type <strong>of</strong> encipherment is definitely the most complicated; its<br />

cryptanalysis for those with insufficient expertise is virtually<br />

impossible. Let us proceed to mention some <strong>of</strong> the types [<strong>of</strong> composite<br />

encipherment], as they are the ultimate in cryptanalysis.<br />

Chapter [20]<br />

One type <strong>of</strong> composite encipherment is to represent each letter <strong>of</strong><br />

the alphabet by instruments, foods, clothing, jewellery, animals, and<br />

such other items listed in the following extensive table <strong>of</strong> generic<br />

names. It is rewarding to always be at pains to study this table over<br />

and over again until you exhaust it and comprehend its content<br />

perfectly well. We pray to God, the Ever-Nigh, the All-Hearing for<br />

that He has guided us to, and from Him we invoke support.<br />

110


<strong>of</strong> people: someone, whom you know or whom you do not.<br />

b <strong>of</strong> herbs: endive, cress, etc.<br />

t <strong>of</strong> dates: varieties <strong>of</strong> dates, e.g. makt m, barn , etc.<br />

<strong>of</strong> clothing: shirt, turban, etc.<br />

<strong>of</strong> leather: hide (raw or dressed),skin, etc.<br />

<strong>of</strong> iron: swords (varieties <strong>of</strong> swords, e.g. Damascene,<br />

Indian, etc.), steel<br />

<strong>of</strong> wood: sandal, fir, etc.<br />

d <strong>of</strong> animals: horse, bull, etc.<br />

<strong>of</strong> gold: varieties <strong>of</strong> gold, e.g. Egyptian, etc.<br />

r <strong>of</strong> aromatic plants: lily, lotus, violet, etc.<br />

z <strong>of</strong> glass: bottle, cup, etc.<br />

s <strong>of</strong> fishes: carp, mackerel, etc.<br />

<strong>of</strong> chess: pawns, individual chess pieces.<br />

<strong>of</strong> brass: brassware, e.g. (drinking) glass, tazza, etc.<br />

<strong>of</strong> regions: specific regions.<br />

<strong>of</strong> birds: hawk, falcon, etc.<br />

<strong>of</strong> deer: gazelle, stag, roe, etc.<br />

<strong>of</strong> perfumes: specific makes and types <strong>of</strong> scents.<br />

<strong>of</strong> sheep: goats, ewes, rams, lambs, etc.<br />

f <strong>of</strong> fruits: apples, quinces, etc.<br />

q <strong>of</strong> villages: so-and-so’s village, etc.<br />

k<br />

<strong>of</strong> books: names <strong>of</strong> books, e.g. al-'A<br />

lu a, etc.<br />

, al-mu mal f al-<br />

l <strong>of</strong> milk: types <strong>of</strong> milk (e.g. colostrum), milk products, etc.<br />

m <strong>of</strong> towns: Mosul, Cairo, etc.<br />

n <strong>of</strong> stars [and planets]: Sirius, Canopus; Saturn, Jupiter, etc.<br />

h <strong>of</strong> vermin, pests, etc.: scorpion, snake, etc.<br />

w/ <strong>of</strong> paper: varieties <strong>of</strong> paper, e.g. papyrus, stock paper, etc.<br />

Y/ <strong>of</strong> jewellery: emerald, diamond, etc.<br />

112


To take up one <strong>of</strong> these letters, you turn to each genus and to the<br />

species there<strong>of</strong> relevant to that letter. From that species you name one<br />

<strong>of</strong> its types. For example, to encipher the statement " " you<br />

may write: "Mr. so-and-so bought colostrum and yoghurt in which he<br />

found a scorpion. He bought stockpaper and used it to wrap wet<br />

cheese in which he found a sapphire stone. He went with such-and-<br />

such a person somewhere on the outskirts <strong>of</strong> the town, to buy wet<br />

cheese and dates. He put them in a paper, along with some apples. He<br />

saw a crystal kohl jar. Together they walked to the judge's village."<br />

Our saying "so-and-so"signifies the letter ا ( ); the words "colostrum"<br />

and "yoghurt" indicate the letter ي (l) twice; the word "scorpion"<br />

stands for the letter ـ٘ (h), and so on you proceed to the end by<br />

analogy. This is one type <strong>of</strong> composite encipherment that defies<br />

cryptanalysis. The words in between are inane redundancy; the<br />

intended purport is sought via the nouns placed against the letters<br />

indicative <strong>of</strong> cryptanalysis. Note that such a cipher can be [and is<br />

better] presented in the framework <strong>of</strong> a dream, a tale, an episode or the<br />

like.<br />

114


Chapter [21]<br />

Another type <strong>of</strong> encipherment is the one that is "composed" on<br />

numbers. Each letter is designated by its numerical value in the system<br />

<strong>of</strong> is b al- ummal (the arithmetic using decimally-weighted<br />

numerical alphabet) the minor and the major. That numerical value<br />

having been written indicates the letter it represents. I am about to<br />

elucidate the manipulation <strong>of</strong> letters according to is b al- ummal in<br />

both its minor and major divisions, God being willing. 88<br />

The highest degree <strong>of</strong> concealment using this type is attained in an<br />

area-dependent cipher, where letters are rendered in terms <strong>of</strong> numbers<br />

suggestive <strong>of</strong> what used to be called ar bs, qaf zes and a rs [old-<br />

fashioned length units]. Qaf zes and a rs are expressed by upper dots<br />

and lower dots respectively. The technique is based on making the<br />

cryptogram look like a peasant-farming financial record or something<br />

<strong>of</strong> the kind, simulating an outward aspect <strong>of</strong> buying, selling, or other<br />

similar bargains. Meanwhile you state the number <strong>of</strong> ar bs placed<br />

against the letters, one by one. Letters with upper dots 89 serve to<br />

represent qaf zes; letters with lower dots 90 serve to represent a rs.<br />

These should go after ar bs. If you fail to do like we have told you as<br />

regards giving the cryptogram the semblance <strong>of</strong> a financial register <strong>of</strong><br />

expenditure, an episode about someone, taking, buying or giving, you<br />

would incur a raw and unhappy [state <strong>of</strong> affairs], over and above an<br />

unmistakable clue to exposing the intended encipherment. Otherwise,<br />

this course <strong>of</strong> action would be quaint and pretty efficient.<br />

88<br />

See Chapter 25.<br />

89<br />

i.e. the letters (ٞ, ن, ي, َ, ْ, ً, ع, ف, ص) according to the numerical-alphabet<br />

order, representing the tens places.<br />

90<br />

The rest <strong>of</strong> letters, i.e. (ق, ه, ُ, د, س, ؿ, م, ض, ظ) designating the hundreds places,<br />

followed by the letter (ؽ) in the thousands position.<br />

116


Chapter [22]<br />

This type is used to address a person who is in attendance, through<br />

finger signaling the numbers [numerical values] corresponding to the<br />

respective letters. It is a straightforward method <strong>of</strong> composition. To<br />

express a letter you give its numerical equivalent [in ADWNA] by<br />

means <strong>of</strong> relative finger configurations using the right-hand fingers for<br />

the numbers one to hundred, 91 and the left-hand fingers for the<br />

numbers hundred to thousand. I shall demonstrate the method for the<br />

numbers one to ten to serve as a clear example for representing other<br />

numbers. The communicator signals the number one [designating the<br />

letter ] by folding his ring finger and mounting his pinkie onto it from<br />

behind. He folds the little and ring fingers inwards to represent the<br />

number two [for the letter ]. Then he joins the middle finger to both<br />

<strong>of</strong> them to represent the number three [corresponding to ]. He now<br />

spreads the little finger whilst keeping the ring and middle fingers<br />

folded, thus expressing the number four [i.e. the letter ]. Next he<br />

spreads out the ring finger leaving the middle finger folded to<br />

represent the number five [i.e. the letter ]. Now he spreads the<br />

middle finger whilst keeping the ring finger folded, and so<br />

representing the number six [ ]. Thereafter he spreads out all fingers<br />

but the pinkie, and that is the number seven [ ]. If he folds the ring<br />

finger and the pinkie together, then he is representing the number<br />

eight [ ]. With the middle finger also folded, the number nine [ ] is<br />

thereby demonstrated. The number ten [ ] is indicated by spreading<br />

out all fingers, with the thumb and index made into a loop. After this<br />

pattern he proceeds to the number [ninety]; and, now using the left<br />

hand, to hundred and to thousand until what he intends to<br />

communicate is figured out exactly right.<br />

91 -Rather "ninety"-.<br />

118


Chapter [23]<br />

A cipher that is rendered by composing its letters on a chessboard<br />

is also addressed to someone who is present. It may be employed to<br />

address an absent person in a way I shall tell you without precedent.<br />

For instance, to convey to your fellow a private message intended<br />

solely for him, you resort to a chessboard and two chessmen: black<br />

and white. Putting on an air <strong>of</strong> play, you leave the piece in the square<br />

assigned for the first letter <strong>of</strong> your message, then you move it to the<br />

square assigned for the next letter, then to that meant for the letter that<br />

follows, until you exhaust all you have got to say. Your fellow, in<br />

turn, does the same until the message is driven home to both <strong>of</strong> you. It<br />

can be outlined as follows:<br />

Example: To convey the word " " you place the chessman in the<br />

first, sixth, twenty-fourth and eighth squares representing the letter ,<br />

, and respectively.<br />

120


Chapter [24]<br />

Thus to set down a cryptogram opening with the word " ", you<br />

write: Two men were on hand and started a game <strong>of</strong> chess. They took<br />

two playing pieces. One <strong>of</strong> the two guys left his chessman in the first<br />

square, then moved it to the twenty-third square twice, thereupon he<br />

moved it to the twenty-sixth square.<br />

What does that mean? The first square signifies the letter , the<br />

twenty-third square denotes the letter twice, and the twenty-sixth<br />

square indicates the letter . It is after this pattern that you should<br />

reason and identify cases <strong>of</strong> the kind.<br />

122


Chapter [25]<br />

Ciphers rendered by is b al- ummal (the arithmetic utilizing<br />

decimally-weighted numerical alphabet) are very easy to cryptanalyse.<br />

The algorithm is to place each letter <strong>of</strong> the alphabet against its Indian<br />

decimal numerical equivalent in the system. The following are the<br />

shapes <strong>of</strong> the Indian numerical character units:<br />

When the number one is preceded by a small circle it becomes ten.<br />

If the circle is placed before the number two it becomes twenty; and<br />

that is how you get the tens orders. If the number one is preceded by<br />

two circles it becomes a hundred. If these two circles go prior to the<br />

number two, it is then two hundred; and these are the hundreds orders.<br />

Likewise, the use <strong>of</strong> three circles in front <strong>of</strong> the number one makes it a<br />

thousand, and in front <strong>of</strong> the number two makes it two thousand, etc.<br />

Consequently, if you wanted to encipher the statement ( ) by<br />

this method, you would have to replace the letters with their<br />

corresponding Indian characters, as follows:<br />

10 30 6 5 30 30 1<br />

(ten) (thirty) (six) (five) (thirty) (thirty) (one)<br />

ٞ ي ٚ ـ٘ ي ي ا<br />

100 10 80 6 400 30 1<br />

(one hundred) (ten) (eighty) (six) (four hundred) (thirty) (one)<br />

ق ٞ ف ٚ د ي ا<br />

This is an example <strong>of</strong> encipherment using the decimal numerical<br />

alphabet. Examine it carefully, and always keep this book within your<br />

reach.<br />

124


Chapter [26]<br />

One method <strong>of</strong> composite ciphering is to multiply the numerical<br />

value <strong>of</strong> a letter tw<strong>of</strong>old, threefold, or more— a process which makes<br />

the cryptogram even more complicated to solve. For instance, you<br />

may write the statement ( ك١فٛزٌا ٌّٟٚ للها ) in cipher like this:<br />

" ه ن ٌل ت٠ ض ً ة ن ً ت٠ ٞ ً ً ة",<br />

increasing the numerical values tw<strong>of</strong>old; the letter ة whose value in<br />

ADWNA is 2 represents the letter ا whose value is 1. Similarly, the<br />

letter ً (= 60 in ADWNA) is twice the value <strong>of</strong> the intended ي, and so<br />

on for the rest <strong>of</strong> letters and other multiplications. Note how<br />

interesting this nicety is.<br />

126


Chapter [27]<br />

Encipherment may be accomplished by having the letters <strong>of</strong> the<br />

alphabet rounded up in seven words, specially coined to represent the<br />

days <strong>of</strong> the week, a word apiece. Each letter <strong>of</strong> the word is further<br />

assigned a specific hour <strong>of</strong> that day, so that you may say: the first<br />

hour, the second hour, the third hour, etc., thereby building your<br />

cipher as follows:<br />

Thursday Wednesday Tuesday Monday Sunday Saturday Friday<br />

ٌّش خظؾٌ هٚك قوجع ي ٓ١زٕص ا<br />

For example, to encipher the phrase ( لله لّؾٌا) you write: the second<br />

hour <strong>of</strong> the day <strong>of</strong> Friday, the last hour <strong>of</strong> the day <strong>of</strong> Sunday, the<br />

second hour <strong>of</strong> Wednesday, the second hour <strong>of</strong> Thursday, the first<br />

hour <strong>of</strong> Tuesday, the last hour <strong>of</strong> Sunday (twice), and the last hour <strong>of</strong><br />

Wednesday. Our statement "the second hour <strong>of</strong> Friday" denotes the<br />

letter (ا), "the last hour <strong>of</strong> Sunday" indicates the letter (ي), and all the<br />

other hours signify the rest <strong>of</strong> the letters. The algorithm <strong>of</strong><br />

cryptanalysing such ciphers is pursued through the application <strong>of</strong> the<br />

quantitative expedients, namely by computing the order <strong>of</strong> letter<br />

occurrence frequencies. This type <strong>of</strong> encipherment is most<br />

conveniently performed by way <strong>of</strong> a tale.<br />

92 Most the words in the <strong>Arabic</strong> original are practically illegible; see p.42.<br />

128<br />

92


Chapter [28]<br />

Ciphers can also be effected by folding a scroll [writing sheet], on<br />

which pleats the sender writes whatever they want to convey. Upon<br />

unfolding it, writing would look something like dots and strokes on<br />

those pleats. The concealment is done by unfurling the scroll and<br />

making the dots and strokes into [extra] complete letters until all<br />

pleats are covered. Employing the same technique you can also write<br />

the message on the back <strong>of</strong> a sheet which has already been used to<br />

write irrelevant material. The dots and letter fragments give the<br />

impression that the sheet was folded while still wet, and that the back<br />

therefore soiled. The exposure <strong>of</strong> the intended text is very easy. All<br />

you have to do is to re-fold the sheet and read the message.<br />

130


Chapter [29]<br />

Encipherment can be implemented by puncturing twenty-eight<br />

holes in a sheet <strong>of</strong> wood, one hole for each letter <strong>of</strong> the alphabet. The<br />

cryptogram is rendered by a thread driven through the intended holes.<br />

For example, to write the word ( لّؽأ) using this method the thread is<br />

driven into the first, sixth, twenty-fourth and eighth holes in<br />

succession. Uncovering the message requires correct identification <strong>of</strong><br />

the letters in relation to their respective threaded holes. You remove<br />

the thread from the holes one after another, marking the representative<br />

letters in their due positions. Having done that, you read the letters in<br />

reverse, starting with the hole from which the thread has been<br />

removed last, and ending up with the one from which the thread has<br />

been removed first. The same process is also applicable with long<br />

cryptograms. This method is illustrated as follows:<br />

132


Chapter [30]<br />

Another method <strong>of</strong> encipherment [using cipher devices] is that<br />

which uses beads <strong>of</strong> different colours substituted for the letters <strong>of</strong> the<br />

alphabet. One way <strong>of</strong> so enciphering is to designate specific colour<br />

beads to represent a letter. The beads are threaded on a string as a<br />

rosary, with identical colours separated by a distinctive mark. For<br />

example, to represent the proper names ( لّؾِ) and (ٍٟػ) using this<br />

method, you thread one <strong>of</strong> the beads designated to the letter (َ), then<br />

you thread one <strong>of</strong> those designated to the letter (ػ), followed by one<br />

assigned to (َ) again, and another <strong>of</strong> those designated for (ك). Now you<br />

carry on with individual beads corresponding to the letters (ع), (ي) and<br />

(ٞ) respectively. Do the same for whatever message you want to<br />

convey. The algorithm <strong>of</strong> solution comes down to perceiving the<br />

colour bead <strong>of</strong> highest recurrence and judging it to be against the<br />

letter (ا). The next highest would be determined to stand for the letter<br />

(ي); the following one for (َ), and so on, utilizing the [quantitative]<br />

expedients stated earlier.<br />

134


Chapter [31]<br />

Encipherment may be accomplished by concealing the intended<br />

message within another context. The procedure is to take a white sheet<br />

<strong>of</strong> paper, on which to write any form <strong>of</strong> account. The cipher message<br />

is embedded within the context by dispersing it abroad at the<br />

beginning, end, or middle <strong>of</strong> the account, or yet diagonally, splitting<br />

the sheet into two triangular parts [according to an agreed rule]. The<br />

algorithm <strong>of</strong> cryptanalysis is very easy by carefully considering the<br />

contextual connection, or otherwise setting apart the beginnings, the<br />

ends, the middle sections, and the diagonal. On such basis the message<br />

bids fairly to come out.<br />

Chapter [32]<br />

And we have straightforward methods out <strong>of</strong> composites. One such<br />

method is implemented by simulating words [consistently with a set<br />

rule], <strong>of</strong> which the intended letters are made to be the first, the second,<br />

the third, etc. For instance, the name ( ٍٟػ لّؾِ) may be enciphered:<br />

ٍٟػ ًضِ غفاه َكوف ُى١ٍػ ؼٌبص ٍٍُ [taking the last letter <strong>of</strong> each word]. This<br />

method is within easy reach <strong>of</strong> the enlightened people <strong>of</strong> this<br />

pr<strong>of</strong>ession, who consider it carefully.<br />

Chapter [33]<br />

Another <strong>of</strong> these methods is to encipher by writing each word <strong>of</strong><br />

the cryptogram in reverse order. That is easy indeed; to render the<br />

word (لّؽأ), for example, in cipher you write ( بؾِك). Cryptanalysis is<br />

also very easy, by experimenting with various algorithms, or<br />

otherwise trying to read it inversely, if the cryptogram is made up <strong>of</strong><br />

letters.<br />

136


Chapter [34]<br />

This type <strong>of</strong> encipherment is fulfilled using special numerical<br />

calculations based on whole numbers and fractions <strong>of</strong> quarters and<br />

halves. Whole [dinars] are employed to express the units order [i.e.<br />

numbers from 1 to 9]; quarters are utilized to indicate the tens order<br />

[10-90]; halves for the hundreds [100-900]. Thus, the name لّؽأ, for<br />

example, can be written in cipher: 93<br />

Four [dinars] Four quarters<br />

[<strong>of</strong> the dinar]<br />

138<br />

Eight [dinars] One [dinar]<br />

Cryptanalysing such ciphers requires the cryptologue to be<br />

knowledgeable about arithmetic and keen on investigation. To him<br />

one dinar means the letter (ا) and eight dinars are equivalent to the<br />

letter (ػ), and like this he proceeds till he exhausts all.<br />

93 ibn Dunayn r's example in the <strong>Arabic</strong> original does not consist with his above and<br />

subsequent explanation; it takes the same lines as simple ADWNA rather than<br />

the fraction concept <strong>of</strong> quarters and halves. It is herein set right, however .


Chapter [35]<br />

Encipherment can be rendered on an astronomical text<br />

demonstrating the conditions <strong>of</strong> planets [and other celestial bodies]:<br />

their motions, distances, periods, durations, mansions, revolutions,<br />

and their mutual relationship. The technique is to impart numbers to<br />

some planets in terms <strong>of</strong> distance covered in orbit or in the<br />

constellation, or suchlike.<br />

For instance, to encipher the name (لّؾِ) you may write: Having<br />

completed forty revolutions, the Moon eclipsed at such and such<br />

degrees <strong>of</strong> such and such constellation. Eight revolutions thence<br />

remained. Its motion straightened after it had waned in appearance<br />

and faded in colour. Thereafter it moved to Sagittarius and completed<br />

forty revolutions thus far. At the end <strong>of</strong> Sagittarius the planet Venus<br />

approached it. Four turns elapsed before its motion evened out in<br />

orbit, and its light became as bright as to emulate planets.<br />

Our statement "forty revolutions" designates the letter (َ); the<br />

"eight revolutions" suggests the letter (ػ); and so on for the rest. This<br />

method <strong>of</strong> encipherment is complicated, and is ascribed to [the<br />

learned] Hermes in his treatise entitled: The war <strong>of</strong> planets, denoting<br />

the generous nature. The cryptanalyst <strong>of</strong> this cipher should be<br />

knowledgeable about arithmetic and astronomy, and should make use<br />

<strong>of</strong> the first statistical principles <strong>of</strong> calculating the frequencies <strong>of</strong> letter<br />

occurrence. 94<br />

Thus far I have addressed the bulk <strong>of</strong> simple and composite<br />

encipherment types encompassed by the first part <strong>of</strong> this book, viz.<br />

prose ciphers, numerous and diverse as they are, with the good<br />

assistance <strong>of</strong> Almighty God.<br />

94 -As a matter <strong>of</strong> fact the cryptanalysis <strong>of</strong> this method has more to do with<br />

ADWNA than with the quantitative technique.- (Translator)<br />

140


PART TWO<br />

Cryptanalysis <strong>of</strong> Poetry Ciphers<br />

Chapter [36]<br />

I am going to provide you with rules that serve for a basis in this<br />

highly sought-after art, and also to guide you to the right way therein.<br />

I say: Among the tools that are utilized in cryptanalysing cipher<br />

rendered in poetry [as well as prose] is a thorough knowledge <strong>of</strong> the<br />

orders <strong>of</strong> letter frequency <strong>of</strong> occurrence stated earlier. Frequency <strong>of</strong><br />

certain forms is, more <strong>of</strong>ten than not, an indication <strong>of</strong> expected letters.<br />

The pursuer <strong>of</strong> this art also need to be familiar with the variable and<br />

basic letters, and well-informed in the letter combination and noncombination<br />

phenomenon—letters that combine pre-positively<br />

(anteriorly), those that combine post-positively (posteriorly), others<br />

that combine both pre- and post-positively, and those that do not<br />

combine pre-positively nor post-positively. He should also be<br />

acquainted with letters that are used and those that are not used, as<br />

discussed in PART ONE. 95<br />

Chapter [37]<br />

Thereafter, the keynote element <strong>of</strong> this science is that the<br />

cryptologue should be widely conversant with prosody, rhymes, and<br />

metrical structures; deeply familiar with the science <strong>of</strong> poetry; a<br />

person <strong>of</strong> insight into the knack <strong>of</strong> writing, with capacious memory for<br />

committing to heart poetry galore, and skilful and resourceful in<br />

cryptography [consequent on long experience and exercise]. Meeting<br />

such requisites, the cryptologue is apt to be able to handle the more<br />

difficult aspects <strong>of</strong> poetical ciphers.<br />

95 Chapters 8, 9 & 10.<br />

142


Chapter [38]<br />

Prosody has five metrical circles: (1) the circle <strong>of</strong> the different<br />

(al-mu talif), the pentameters and heptameters <strong>of</strong> which tend to vary;<br />

(2) the circle <strong>of</strong> the consistent (al-mu'talif), the heptameters <strong>of</strong> which<br />

are regular and steadily in tune; (3) the circle <strong>of</strong> the extraneous (almu<br />

talab), whose measures are drawn from the first circle; and (4) the<br />

circle <strong>of</strong> the similar (al-mu tabih), whose constituent meters are<br />

marked by correspondence or resemblance; (5) the circle <strong>of</strong> the<br />

harmonious (al-muttafiq), whose pentameters are in agreement.<br />

Further expansion on these circles would take long, and is outside our<br />

terms <strong>of</strong> reference.<br />

Chapter [39]<br />

Poetical meters, according to al- al l [ibn 'A mad al-Far h d ], 96<br />

are fifteen in number, supplemented or "redressed" later by 'Ab alasan<br />

al-'A fa [Sa d ibn Mas ada al-'Awsa ] 97 with one more meter,<br />

the so-called al-mutadarak [=the redresser], thus scaling up the<br />

number <strong>of</strong> meters to sixteen. The poetical meters are: a - aw l, based<br />

on the feet <strong>of</strong> fa lun maf lun; al-mad d, based on the metrons <strong>of</strong><br />

f il tun f ilun; al-bas , its basic units being mustaf ilun f ilun;<br />

al-w fir, which is based on muf alatun; al-k mil, based on<br />

mutaf ilun; al-haza , with its feet maf lun [six times]; ar-ra az,<br />

mustaf ilun; ar-ramal, f il tun; as-sar , mustaf ilun mustaf ilun<br />

maf l tun; al-munsari , mustaf ilun maf l tu mustaf ilun; al- af f,<br />

f il tun mustaf ilun f il tun; al-mu ra , maf lun f il tun<br />

maf lun; al-muqta ab, maf latu mustaf ilun mustaf ilun; al-mu ta ,<br />

mustaf ilun f il tun f il tun; al-mutaq rib, based on fa lun.<br />

Ab al- asan said: and al-mutad rak, which is based on f ilun.<br />

Each <strong>of</strong> these meters has its own particularities, ramifications, and<br />

views on it, which are not <strong>of</strong> interest for our purpose.<br />

96 d. AD 786.<br />

97 d. AD 830.<br />

144


Chapter [40]<br />

As for the first [metrical] circle, it has three meters, i.e. a - aw l,<br />

al-mad d and al-bas ; the second circle has two meters, i.e. al-w fir<br />

and al-k mil; the third has three, i.e. al-haza , ar-ra az and ar-ramal;<br />

the fourth has six, i.e. as-sar , al-munsari , al- af f, al-mu ra ,<br />

al-muqta ab and al-mu ta ; the fifth circle contains one meter, i.e.<br />

al-mutaq rib (according to al- al l), or al-mutad rak (according to<br />

al-'A fa ).<br />

He [The cryptanalyst] must also be familiar with such metrical<br />

variations as az-zi f, al- arm, and al- azm.<br />

As for az-zi f, it may occur in all meters, and varies with them. Its<br />

occurrence is peculiar to the so-called sabab. In a - aw l meter, for<br />

example, the ْ <strong>of</strong> the foot ٌٓٛؼف can be omitted and يٛؼف remains. This<br />

phenomenon is called qab .<br />

As to al- arm, it is the omission <strong>of</strong> the first vocalized letter <strong>of</strong> a<br />

[three-letter] foot segment called watid, that occurs at the beginning <strong>of</strong><br />

a stich.<br />

al- azm, on the other hand, concerns the addition [<strong>of</strong> letters] made<br />

at the beginning <strong>of</strong> a stich, that is taken into consideration in terms <strong>of</strong><br />

meaning and counted insignificant in terms <strong>of</strong> poetic scanning.<br />

146


Chapter [41]<br />

Rhymes 98 are five, namely al-mutak wis, al-mutar kib, almutad<br />

rik, al-mutaw tir, and al-mutar dif.<br />

al-Mutak wis is that rhyme in which are found four vocalized<br />

letters located between two neutral letters (suk ns). al-Mutar kib is<br />

that rhyme in which are found three vocalized letters between two<br />

neutral letters. al-Mutad rik is a rhyme in which are found two<br />

vocalized letters between two neutrals. al-Mutaw tir <strong>of</strong> rhymes is the<br />

one in which is found one vocalized letter between two neutrals. The<br />

last <strong>of</strong> rhymes is al-mutar dif, in which are found two [consecutive]<br />

neutral letters.<br />

These rhymes has six letter structures or aw ri , namely the exit,<br />

the relief, the basal (ا), the linkage, the extraneous, and the rhyme<br />

letter.<br />

The rhyme letter (or raw ) is that on which the entire poem is built.<br />

For example, in the following verse,<br />

the letter ق <strong>of</strong> the word قاّوط is the rhyme letter, and the rhyme <strong>of</strong> the<br />

whole poem is also ق. Note that all letters may occur as rhyme letters<br />

except for the three vowel letters, i.e. ا ( ), ٚ (w/ ), and ٞ (y/ ) which<br />

<strong>of</strong>ten form the so-called release letters (i l q). Supposing the final<br />

word <strong>of</strong> a stich be بػٌٛٚ, you see that the rhyme is عٌٛٚ, the letter ع is<br />

the rhyme letter, and the letter ا is for release. The same is true with<br />

ِٛب١قٌا or ِٛلاٌَا in which the rhyme, according to some, is َلاٌَا, the َ is<br />

the rhyme letter, and the ٚ the release letter. Similarly, the rhyme in<br />

ٟؼثوٌا and ٟػوغٌا is غثوٌا and عوغٌا.<br />

98 See also ibn Adl n's treatment <strong>of</strong> drawing on prosody and rhyme towards<br />

cryptanalysis in his treatise (Volume Two <strong>of</strong> this series), rules 16 & 17, pp.88-98.<br />

148


The relief letter (or ridf) is a vowel letter ( ا, ٚ or ٞ) that occurs<br />

immediately before the rhyme letter. It is a common practice [in<br />

<strong>Arabic</strong> poetry] to alternate ٚ with ٞ as relief letters in one poem. 99<br />

The basal (or ta's s) is the letter (ا) occurring prior to the rhyme<br />

letter but one. It is not counted basal if it occurs in a word while the<br />

rhyme letter is in another word. Moreover, if the rhyme letter is an<br />

implicit noun or part <strong>of</strong> such a noun, it is possible that the (ا) emerging<br />

from it be now basal now not. [To be noted is that the basal (ا) is a<br />

requisite element; once used in a poem, it should be observed<br />

throughout.]<br />

The linkage letter (or wa l) is a vowel ( ا, ٚ or ٞ) resultant [among<br />

other things] from fully lengthening the sound value <strong>of</strong> the rhymeletter<br />

diacritic; or the letter ـ٘, neutral or vocalized, that follows the<br />

rhyme letter.<br />

The exit (or ur ) is any one <strong>of</strong> the vowel letters (ا, ٚ or ٞ)<br />

occasioned by the linkage ـ٘ when fully lengthened in articulation.<br />

[Like the basal (ا), the exit is a requisite element that, when adopted,<br />

should be adhered to throughout the poem without fail.]<br />

The extraneous (or da l) is the letter that lies between the basal (ا)<br />

and the rhyme letter. 100<br />

99 -Example:<br />

(Translator)<br />

100 -It is interesting to note that in one rhyme it is possible to have a combination <strong>of</strong><br />

the basal (ا), the extraneous, the rhyme letter, the linkage, and the exit<br />

simultaneously. In the following verse:<br />

the letter (ا) <strong>of</strong> the word ٗؼعبضِ is basal, The letter (ط) is extraneous, the (ع)<br />

rhyme letter, the (ـ٘) linkage, and the (ٚ) that results from lengthening the sound<br />

value <strong>of</strong> the (ـ٘) diacritic is the exit.<br />

Also possible is a combination <strong>of</strong> the relief letter, the rhyme letter, the<br />

linkage, and the exit. In the following verse:<br />

the letter (ا) <strong>of</strong> the word ِٗبضٌ is relief, the (َ) rhyme letter, the (ـ٘) linkage, and the<br />

(ٚ) resultant from lengthening the final (ـ٘) exit.-<br />

(Translator)<br />

150


Rhyme, however, may undergo some flaws or defects; these are:<br />

al-'ikf '—the use [in one poem] <strong>of</strong> two rhyme letters that belong to<br />

slightly different points <strong>of</strong> articulation. 101<br />

al-'iqw '—the use in one poem <strong>of</strong> different rhyme-letter<br />

diacritic. 102<br />

al-' '—the repetition <strong>of</strong> rhyme by using two rhyming words that<br />

agree in form and meaning (identical rhyme). 103<br />

at-ta m n—the state in which the rhyme <strong>of</strong> one stich, though<br />

metrically complete, is dependent upon the following stich so that<br />

both lines incorporate an integral whole as far as meaning is<br />

concerned. 104<br />

as-sin d—the occurrence, in one poem, <strong>of</strong> a line with a basal (ا),<br />

and another without one. 105 This has many ramifications that are not<br />

within our scope here.<br />

101 Example: and in this verse:<br />

102 Example: and in the following:<br />

103 Example: and in the following lines:<br />

104 Example: and in:<br />

105 Example: and in:<br />

152


Chapter [42]<br />

It is those with expertise and discernment in orthography who are<br />

the aptest to break ciphers, since they are likely to recognize the<br />

mainstream principles underlying proper writing. The letters (ا) and<br />

(ي), forming the [<strong>Arabic</strong>] definite article يا [=the] as in ًعوٌا [=the<br />

man], حوغؾٌا [=the room], and the like, are <strong>of</strong> highest frequency among<br />

all letters. The cryptologue should be able to spot two-letter words<br />

[bigrams], three-letter words [trigrams] and four-letter words<br />

[tetragrams], as these are favourably promotive to cryptanalysis. Pure<br />

bigrams are words such as the following: ِْٓ, َِْٓ, َ سـَـ , َ سـُـ , َةُه, ِةَه, ٓػ,<br />

َيػ, ًََع, ْ نُِ,<br />

َلَِ, َوَِ, ّوُِ, َلَػ, ْلُػ , َُه, ّوث, ّكه, ٌّؽ, َك, ل٠, ؿأ, ةأ, ُػ, َأ, ُّغ, ّلَع,<br />

ّلف. Bigrams, however, may be single letters governed by prepositions<br />

such as: هث, ٗث, هٌ, ٌٗ, etc. They could also be verbal nouns like َْٗص and<br />

َِْٗ, or even verbs expressing command as ْعَك, ْوٍِ and َْ ـ ُـل.<br />

Trigrams are<br />

words such as ل٠ى, ٚوّػ 106 , وىث, لجػ, ًعه, هاك, ةٛص, ػٛٔ, طٌٛ, فوؽ, et<br />

cetera. Spotting some words <strong>of</strong> the kind is likely to conduce towards<br />

spotting the rest, seeing that they lend significant indications indeed.<br />

Thus we have established rules wherewith algorithms <strong>of</strong> cryptanalysis<br />

are fulfilled.<br />

106 Numbered by ibn Dunayn r among 3-letter words in respect <strong>of</strong> its utterance. The<br />

extra final in it he will discuss soon (in Chapter 44).<br />

154


Chapter [43]<br />

Upon trying to work out a line <strong>of</strong> poetry ciphered for you by<br />

someone else, you start by counting the number <strong>of</strong> constituent letters.<br />

Should they be found between forty and fifty, the verse would<br />

probably belong to the aw l or bas meter in view <strong>of</strong> the fact that<br />

these are <strong>of</strong> the longest meters. If the number is found to be forty more<br />

or less, the meter would probably be one <strong>of</strong> the whole meters such as:<br />

a - aw l, al-mad d, al-bas , al-w fir, al-k mil, perfect ra az, perfect<br />

ramal, as-sar , al-munsari , al- af f, or perfect mutaq rib. Thirty<br />

letters or thereabouts suggest brachycatalectic mad d, brachycatalectic<br />

bas , square k mil, al-w fir, al-haza , ar-ra az, ar-ramal, as-sar , alaf<br />

f, al-mu ra , al-muqta ab, al-mu ta or al-mutaq rib. In case the<br />

number is found some ten odd, it indicates certain varieties <strong>of</strong> such<br />

short meters as curtailed munsari and ra az. A ten-letter line<br />

expresses a variety <strong>of</strong> ra az. A line <strong>of</strong> verse might sometimes consist<br />

<strong>of</strong> as few as seven letters like:<br />

[How splendid the moon is.<br />

Rain poured down in torrents.]<br />

Such one unit verse is the shortest possible in <strong>Arabic</strong> poetry; it<br />

rhymes with (ٍٓؼفزَِ). In fact I have here estimated the number to be in<br />

the neighborhood <strong>of</strong> forty because a line <strong>of</strong> verse, when enciphered, is<br />

transcribed according to the standards that are familiar to people. Thus<br />

a geminated letter is metrically represented as two letters, while<br />

considered one letter in ordinary writing. A line <strong>of</strong> poetry may<br />

undergo some foot variations, in which case the letters so affected take<br />

the place <strong>of</strong> those geminated.<br />

Having decided on the number <strong>of</strong> letters, and pondered deeply over<br />

relevant poetic meters, you look closely at the names juxtaposed with<br />

each letter <strong>of</strong> the poetic cipher. The most highly frequent name is held<br />

to represent the letter (ا), although, in some rare occasions, other<br />

letters may take precedence. Of course, by no means do rarities stand<br />

for established rules.<br />

156


The letter (ي) can be sought by observing in the cipher verse long<br />

words beginning with the letter (ا). The letter that follows immediately<br />

is likely to recur once or twice, and it is positively thought to be the<br />

letter (ي), since it is far more combinable with (ا) than any other letter.<br />

Further, a line <strong>of</strong> verse may contain a signal clue to the definite (يا),<br />

by observing the occurrence <strong>of</strong> the letter (ي) repeated in words such<br />

as: للها, ً١ٌٍا, ش١ٌٍا, ت١جٌٍا, and the like.<br />

If you encounter, in a cipher verse, a bigram the first <strong>of</strong> whose<br />

letters has already been identified as (ا), you have a good reason to<br />

hold that, with the other letter, the bigram may be one <strong>of</strong> the following<br />

(descending from the odds-on probability): ٚأ, مإ, ْإ, َأ or ٞأ.<br />

Conversely, where the first letter is still covert and the other being (ا),<br />

you can then assume the bigram to be one <strong>of</strong> these: بِ, ب٠, ام, بش or بؽ. 107<br />

Other bigrams are yet possible.<br />

On the other hand, the letter preceding (يا) in one word should, in<br />

all probability, be (ـ٘) 108 or ن.<br />

Having made out most <strong>of</strong> the highly frequent letters in the cipher,<br />

you now turn to those <strong>of</strong> less frequent occurrence. Thus you guess on<br />

heptagrams [seven-letter words] and pentagrams [five-letter words].<br />

Such words should incorporate one or more <strong>of</strong> the labial letters: ي, ة,<br />

ْ, ٚ, ف, [and َ], which are all but inherent in pentagrams and<br />

heptagrams. Exceptions are too rare to merit consideration.<br />

107<br />

The last two bigrams are actually not all that frequent in usage; they can<br />

possibly and more rightly be: لا & ب٘.<br />

108<br />

So in the original <strong>Arabic</strong> manuscript; perhaps (ٚ) or (ف) is the correct letter.<br />

158


Chapter [44]<br />

Special attention should be paid to the [terminal] letter (ا) [added to<br />

te letter (ٚ) <strong>of</strong> plurality] in verbs like: اٛٔبو, اٚهبص, اٌٛبل, اٛػبث. Such an (ا)<br />

is not metrically considered, yet it might pose ambiguity for the<br />

cryptanalyst. Also problematic are verbs [with an intrinsic terminal ٚ]<br />

such as: ٚيغ٠, ٚلغ٠, ٛجؾ٠, which might wrongly be written by some with<br />

a terminal (ا) in the same way as they mistakenly write verbs like اِٛبل<br />

and اٛٔبو without one. A cryptologue should also keep an eye on<br />

terminal hamza's in words like ءبش and ءبٕث, and be equally heedful <strong>of</strong><br />

the extra (ٚ) subjoined to the proper name ( ٚوّػ) to differentiate it<br />

from another name, i.e. ( وّػ). It might just as well be avoided<br />

altogether in ciphered poetry because it can be problematic. However,<br />

since poetry is strictly qualified by metrical measures, it would be<br />

realized on the spot which <strong>of</strong> the two names is intended.<br />

Chapter [45]<br />

A cryptologue ought to be aware <strong>of</strong> the letter (ا) that is <strong>of</strong>ten<br />

dropped in writing in the interest <strong>of</strong> damping the vocalization. In<br />

poetry I favour fixing it in names such as: ُ١٘وثإ [for ُ١٘اوثإ], ً١ؼٍّإ [for<br />

ً١ػبٍّإ] and كؾٍإ [for قبؾٍإ] since poetry calls for its retention to put<br />

up the meter. Likewise, variants in writing the word (يلا٘) are (ًٍ٘)<br />

and (ً١ٍ٘), which are equally baffling and should therefore be avoided.<br />

160


Chapter [46]<br />

He has to be alert to the letters (ٚ) and (ٞ). All-<strong>of</strong>ten they occur in<br />

mid- and end-positions as diacritically geminated, neutral and<br />

vocalized. They also occur following the rhyme in the form <strong>of</strong> release<br />

letters, as has previously been stated.<br />

Their occurrence as neutral is pr<strong>of</strong>use; e.g. ٓ٠ل٠, ٓ١ٕ١ػ, ٗ١ٌإ, ٗ١ٍػ, فٛف,<br />

فٛع, فٛط, ىٌٛ and يٛم٠.<br />

They may occur at end-positions; e.g. ٟف, ٌٝإ, ٍٝػ 109 , ٛ٘, ٛف, ٌٛ.<br />

They may occur geminated; e.g. لّ١ٍ, ّٞك ط,<br />

كّٛع, كّٛػ, كّٛل.<br />

They may occur following the rhyme letter; e.g. بِلاٍ, بِبمٍ, in<br />

which the (ا) is for release; and ِٟلاٍ , ِٟلاغ, ِٝبمٍ, ِٛبمٍ, ِٛلاغ, ِٛلاٍ,<br />

where the (َ) is the rhyme letter, and the next for release.<br />

When they occur as rhyme letters they may be diacritically neutral<br />

(e.g. ُٝٙٔ, ٜلُ٘, ٞٚم, ٚٚم, ََٚٛ٘); or geminated (e.g. بّ٠وص, بّ١َُّؽ, بّ١زٌٍا, بّ٠نٌٍا, ّٚلػ,<br />

ُّٛجُٔ); or vocalized (e.g. ٟػه<br />

ٍ<br />

, ٟمٍ,<br />

ْٚلَػ,<br />

ٚيغ).<br />

ٍ<br />

ٍ<br />

Chapter [47]<br />

He ought to be particularly familiar with the modes <strong>of</strong> [medial]<br />

hamza; for instance: حلئفأ, حكُٚءِٛ, حكٚؤفِ.<br />

109 It is the graphic representation rather than the way <strong>of</strong> reading that matters by<br />

cryptanalytical standards; hence, undotted (ٜ) is considered (ٞ), not a special<br />

variant <strong>of</strong> (ا).<br />

ٍ<br />

162


Chapter [48]<br />

He should also be fully acquainted with:<br />

1) The five types <strong>of</strong> the letter (ٚ), viz. the conjunctive, the<br />

circumstantial, the comitative, the potential, and that <strong>of</strong><br />

oath. Some add to these the so-called "(ٚ) <strong>of</strong> the<br />

number eight".<br />

2) The eight categories <strong>of</strong> the letter (ف), i.e. that <strong>of</strong><br />

comment and succession; also the (ف) that occurs in<br />

response to command, prohibition, negation,<br />

interrogation, wish, statement, and invocation.<br />

3) The three categories <strong>of</strong> the letter (ة); i.e. as a<br />

preposition, as a letter for oath-taking, and as a<br />

"narrative" letter underlying an implicit noun, such as:<br />

4) The two categories <strong>of</strong> the letter (ن), viz. the<br />

superfluous (ن), and that governed by a pronoun.<br />

5) The three categories <strong>of</strong> the letter (ي); namely as a<br />

preposition, as an initial letter, and as an emphatic<br />

letter. An additional occurrence <strong>of</strong> (ي) is its use as<br />

emphatic in the predicate <strong>of</strong> (َْإ).<br />

6) The high recurrence <strong>of</strong> the definite (يا = the), as in: ان٘<br />

ُءبٌَٕاٚ ًُعوٌا (= This man and the women), ًَعوٌا ُذ٠أه<br />

َءبٌَٕاٚ (= I saw the man and the women), and ُدهوِ<br />

ِءبٌَٕاٚ ِيبعوٌبث (= I walked past the men and the women).<br />

In fact (يا) is a vigorous leading light toward<br />

cryptanalysis. However, it can be problematical if<br />

preceded by such letters as ٚ, ف, ة, and superfluous ن.<br />

164


Chapter [49]<br />

The letter (د) occurs in such words as: ذِبل, دلؼل, برهبٍ, برَلؼل, بزَثوض,<br />

َ<br />

ب٘ ذَثَه ـْـ َضـ , بٙـ ذِ ْـ ـــ ً,<br />

and ب٘ دـْـ مـؿأ.<br />

When repeated it serves as a robust<br />

lead-in to its solution, especially if used immediately next to (يا).<br />

Chapter [50]<br />

You should also see to letters repeated consecutively [doubled<br />

letters] such as (ي/l) in words like: ًٍـ قُـ , ًٍِ, ًٍِػ, ًٍِؽ, ًٍَف; (ك/d) in words<br />

like: ككول, ككوِ, كّلشِ, كّلَِ; and (َ/m) in: ُّ٘, ُّل, ُِأ, and َُِ ـَـ ي.<br />

Moreover, the occurrence <strong>of</strong> the letter ( ـ٘/h) next to a double (ي/l)<br />

creates an impression that the word sought is likely to be the name <strong>of</strong><br />

God (للها). It can also be one <strong>of</strong> these words: ّتٌٍا, ّظٌٍا, ت١جٌٍا, ف١فٌٍا, ً١ٌٍا,<br />

ٓجٌٍا, ْب٠ ـَـٌٍا,<br />

and نـ ًٌا ّـ –a typical Arab dialect for ٞنٌا.<br />

Chapter [51]<br />

One <strong>of</strong> the reliable conjectures in cryptanalysis is that the letter<br />

between the definite (يا) and an (ا) is fairly guessed to be َ, ك, or ُ,<br />

making these words: آٌّا, آلٌا or آشٌا. In case the (ا) is followed by<br />

another letter, then you may guess at words like: ًبٌٕا, هالٌا, هبٌٕا, هبؼٌا,<br />

قبٌٕا, قبٌَا, and so forth. If the letter next to (يا) and the final letter were<br />

identical, the word produced would possibly be: ُةبجٌا, ٚاٌٛا, َبٌّإ, ػبؾٌإ,<br />

ٌةبجٌأ (plural <strong>of</strong> ّتٌُ), or suchlike.<br />

166


Chapter [52]<br />

Two identical letters after the definite (يا), followed by [ا plus]<br />

another letter, are together guessed to be a word such as ىبٌّّا, ْبججٌا (a<br />

Turkish noun), etc. If the two letters were found unidentical, take a<br />

guess at: َبٌّٕا, َبمٌّا, َبّغٌا, ةاٛصٌا, ةاوضٌا. If the (ا) is followed by two<br />

other letters, these words are possible options: تلبٌّٕا, تٔبمٌّا, َهاٛصٌا,<br />

ُغاوضٌا, and the like.<br />

If one letter is there immediately after (يا), and two letters next to<br />

the other (ا), then the possibilities are words such as: تئبغٌا, ل٘بشٌا,<br />

تصبٌٕا, ِٟاوٌا, and ٟفبىٌا.<br />

Chapter [53]<br />

Remember that there exist long words which are devoid <strong>of</strong> the<br />

definite (يا), such as: ُٙعهلزََٕف, ُٙى١فى١َف, ٍُّٙؼزٍَٕ, and ْٕٛ٠لزَزٍ. The<br />

cipher verse may also be nonsensical though sound in its meter.<br />

Knowledge <strong>of</strong> metrics <strong>of</strong>ten leads to hit the entire verse. The<br />

cryptanalyst ought to be conversant with all the possible cases <strong>of</strong> the<br />

verse in hand, such as its metrics, rhyme, language, as well as the<br />

predominant trends and variations there<strong>of</strong>. Proper familiarity with<br />

these requisites, together with the utilization <strong>of</strong> the afore-mentioned<br />

directive indicators to letters and words, and also reasoning in the light<br />

<strong>of</strong> the orders <strong>of</strong> letter frequency <strong>of</strong> occurrence, would make<br />

favourably for cryptanalysis. You should also be fully aware to the<br />

[deliberate] use <strong>of</strong> undotted or non-combinable letters, the stinted<br />

employment <strong>of</strong> repeated letters, or choosing new or unheard-<strong>of</strong> verse<br />

as the cipher sought for cryptanalysis. Notice that the longer the verse<br />

the better for the cryptologue, since in that case it allows for sufficient<br />

frequency <strong>of</strong> letters to be achieved.<br />

168


Chapter [54]<br />

Encipherment may be rendered by the poet himself, who can be<br />

ignorant <strong>of</strong>, or otherwise deficiently acquainted with, poetic meters,<br />

parsing and the language in general. Subsequently he comes up with a<br />

syntactically erroneous and metrically unsound poetry. This kind <strong>of</strong><br />

cipher is very problematic indeed. The following sample<br />

has nothing to do with prosody. To be noted is that much <strong>of</strong> the poetry<br />

<strong>of</strong> Ab al- At hiya, among others, does not pertain under prosody,<br />

too. For example, one says:<br />

Chapter [55]<br />

An enciphered line <strong>of</strong> verse may contain some disincentives in<br />

meter and rhyme that prove to the cryptanalyst extremely<br />

problematical. The meter peculiarities include the occurrence <strong>of</strong> the<br />

so-called phenomena <strong>of</strong> al-qab and al-kaff at the end <strong>of</strong> a verse. This<br />

involves curtailing the seven-unit metric foot ٍٓ١ػبفِ by at once<br />

dropping its fifth unit so that ٍٓػبفِ remains (qab ), and the seventh<br />

unit <strong>of</strong> the foot so that ًػبفِ remains (kaff). The occurrence <strong>of</strong> either<br />

<strong>of</strong> them alone is not much <strong>of</strong> a problem, but their occurrence<br />

simultaneously poses a knotty problem to the cryptologue. What<br />

augments the difficulty is the occurrence <strong>of</strong> alm, arm, arm or azm<br />

at the beginning <strong>of</strong> a verse. We have already addressed the arm and<br />

azm. 110 As for alm, it is like ٌٓٛؼف, if subjected to arm, ٌٓٛػ<br />

remains, which is shifted to ْ ـُـ يـْـع<br />

فـَـ .<br />

110 See Chapter 40.<br />

170


Chapter [56]<br />

Besides, the first hemistich <strong>of</strong> a verse that belongs to the aw l<br />

meter may undergo the arm phenomenon, making it into the k mil<br />

meter, while the other hemistich remains <strong>of</strong> the aw l. Example:<br />

(Zuha r ibn Ab Sulm ) 111<br />

Note that the first hemistich is k mil and the other is aw l. Had the<br />

poet said ْطِوػٚ or ْطَوؼر or ْطِوؼف instead <strong>of</strong> ْطِوػ, the measure would have<br />

straightened. But it seems that he has been more attentive to meaning<br />

than to measure.<br />

Chapter [57]<br />

Bear in mind that you ought to practise on prosody, rhymes and<br />

verse composition in order that you keep your hand in, and get the feel<br />

<strong>of</strong> this art that I have given you. As for the cryptanalysis <strong>of</strong> prose<br />

ciphers, use the algorithms propounded towards the end <strong>of</strong> PART<br />

ONE <strong>of</strong> this book <strong>of</strong> mine: they should suffice for the one who<br />

experiences them, and sure enough they should.<br />

111 This verse is rather attributed to Ku ayyir Azza in praise <strong>of</strong> the Caliph Umar<br />

ibn Abd al- Az z. The exact wording as stated in his poetical corpus (divan) is<br />

as follows:<br />

172


Chapter [58]<br />

And beware <strong>of</strong> cryptograms that might have been wrongly<br />

enciphered through slipping up on a letter or so. That would prejudice<br />

your chances <strong>of</strong> success in cryptanalysis.<br />

Chapter [59]<br />

You may encounter cryptograms made up <strong>of</strong> opaque lines <strong>of</strong><br />

meaningless verse, whose component words are sheer raving, intended<br />

only to establish the meter. The following is a case in point:<br />

It goes without saying the meaninglessness <strong>of</strong> these lines in the<br />

<strong>Arabic</strong> language. A similar example reads:<br />

Like the preceding lines, this verse is a senseless inanity with<br />

sound metrics.<br />

174


Chapter [60]<br />

Towards the end <strong>of</strong> his Second Essay, the Author <strong>of</strong> the Two<br />

Essays on cryptanalysis states that we are destined to follow an<br />

intricate path. Nevertheless we shall be able to cope with it to achieve<br />

cryptanalysis. This method involves assuming for the letter (ا ) a light<br />

name such as ( وفظ), whose component letters [ظ, ف & ه] are<br />

systematically used to represent the letter (ا) wherever it occurs in the<br />

cryptogram. Then he says that a single symbol is also assumed to at<br />

once represent three letters having the same orthographic pattern such<br />

as (ة, د, س) or ( ط, ػ, ؿ), thereby suggesting the method <strong>of</strong><br />

encipherment but not the algorithm for cryptanalysis. Obviously that<br />

is something <strong>of</strong> an idle talk. 112 If the encipherer intends to write a<br />

word containing the letter (ة), for example, then how would he come<br />

to know his own intention so long as this shape ( )suggests (ة) and<br />

two more letters? A cipher rendered by this method is likely to be<br />

equivocal in case it is left over for days and the cipher itself forgotten,<br />

let alone the mix-up expected on the part <strong>of</strong> the cryptanalyst with<br />

regard to the orders <strong>of</strong> letter frequency, considering that the letter (س )<br />

is <strong>of</strong> low frequency, the (ة b) <strong>of</strong> medium frequency, and the (د t) <strong>of</strong><br />

higher frequency than (ة). On the other hand, assigning three symbols<br />

to represent one letter, whilst assigning just one symbol to represent<br />

three letters would make the count <strong>of</strong> letters versus symbols in the<br />

cryptogram proportionate. This shows the Author <strong>of</strong> the Two Essays<br />

not well-informed in ciphers. 113<br />

112 See p.54.<br />

113 On the contrary, the Author <strong>of</strong> the Two Essays has proved himself to be a<br />

seasoned old hand at cryptography and cryptanalysis. This method, which<br />

conforms to the latest principles <strong>of</strong> encipherment, is intended to augment the<br />

number <strong>of</strong> cipher symbols.<br />

176


Chapter [61]<br />

Now I am to give you an illustrative example by enciphering the<br />

following verse <strong>of</strong> my own composition, in which the letters ا, ي and ٚ<br />

are highly frequent, and a few more also circulate:<br />

114<br />

114 From the previous letters one can string together the following verse:<br />

- What made the heart grow fonder is the tattler who said: be obedient!-<br />

178


Chapter [62]<br />

A line <strong>of</strong> verse has once been given to me in cipher, <strong>of</strong> which I<br />

contrived to break only the initial words in the first instance. I,<br />

however, managed to go through with it later, and came <strong>of</strong>f well. It<br />

took me several hours <strong>of</strong> exertion before it ran full and for good as<br />

follows:<br />

115<br />

115 From the letters above one can piece together the following verse:<br />

- God knows how much I am besotted with you heart and soul.-<br />

180


For cryptanalysis I started on telling the occurrence frequency <strong>of</strong><br />

letters right through. Having found thirty-four letters, I concluded that<br />

the verse belongs to al-bas al-ma b n meter. It also came home to<br />

me that the last word involved the rhyme, which was <strong>of</strong> the<br />

overlapping type as it consisted <strong>of</strong> three vocalized letters lying<br />

between two neutral suk ns. I further perceived that the final letter <strong>of</strong><br />

the second hemistich is identical with the final letter <strong>of</strong> the first<br />

hemistich. Sorting out the letters according to their order <strong>of</strong> frequency,<br />

I elicited first and foremost the name <strong>of</strong> God (للها), utilizing the<br />

repetition <strong>of</strong> the letter (ي) in it and the fact that His name all-<strong>of</strong>ten<br />

goes in front position. I thus labeled the letters ( ا, ي and ـ٘). Then I<br />

checked the form <strong>of</strong> the letter (َ) and found it repeated six times, i.e.<br />

exceeding in frequency the form <strong>of</strong> the letters (ا) and (ي). Therefore I<br />

held it would probably be (َ). Switching over to the next frequent<br />

form <strong>of</strong> the letter (ٞ), I found it recurring three times, and I made it<br />

(ٞ). Thereupon I took up the tetragram (four-letter word) following<br />

the name <strong>of</strong> God, with the letters (ي), (ٞ) and (َ) already known, and<br />

sampled such words as: ٍَُ٠, ٍُؼ٠, ٍُظ٠, ٍُض٠, etc. to reserve judgement on<br />

it for a while. I now sought the next word—a trigram (three-letter<br />

word) the middle letter <strong>of</strong> which was still covert, the initial and<br />

terminal letters being (ا) and (ٞ) respectively. By sampling words such<br />

as ِٟأ, ٟثأ, ٟٔأ the following got out as possibilities: ( ٚأ ٟثأ ٚأ ِٟأ ٍُظ٠ للها<br />

ٟٔأ), which I immediately dismissed as out <strong>of</strong> the question. Of these<br />

words I had my heart set on ٟٔأ, promptly turning my assumption to<br />

the word ( ٍُؼ٠) instead <strong>of</strong> ( ٍُظ٠) by extension, and thus sounding<br />

meaningful and poetical. The next word was another tetragram<br />

beginning and ending with the letter (َ). I guessed at words such as<br />

َوغِ, َيؼِ and the like, but the context soon lent credence to َوغِ as the<br />

apposite choice, and so the word-group read: ( َوغِ ٟٔأ ٍُؼ٠ للها). Now I<br />

looked into the next word which was a trigram ending with the letter<br />

(َ). Experimenting with letters in the light <strong>of</strong> contextual connection,<br />

the word (ُىث) developed. It was along these lines that cryptanalysis<br />

was carried out.<br />

182


Chapter [63]<br />

I have [herein] adduced something novel that none else had ever<br />

broached before, because al-Kind 's book [treatise] tackles prose<br />

simple encipherment only; and Ab al- asan's book treats poetry<br />

encipherment. Both failed to develop the topic exhaustively in either<br />

case.<br />

Chapter [64]<br />

And I supplement this [discourse] with lines <strong>of</strong> verse that embrace<br />

the letters <strong>of</strong> the alphabet [without repetition]. Examples:<br />

1) 116<br />

2)<br />

3)<br />

The second hemistich <strong>of</strong> this last line has another variant:<br />

4)<br />

116 Termed by ibn ad-Durayhim al-Fahlaw cipher alphabet, and by ibn- Adl n one<br />

<strong>of</strong> the regulators or cryptographic keys. See Volume Three, p. 62 and Volume<br />

Two, p. 42.<br />

184


Chapter [65]<br />

Many verses have been indited to be used in encipherment, and are<br />

intended for sustained mental exertion in pursuit <strong>of</strong> solution. The<br />

following are some:<br />

1) 117<br />

2)<br />

3)<br />

4)<br />

Of the poetry that is particularly tough to crack is that composed on<br />

al-mad d meter in its original, rather than catalectic, version. Another<br />

such type is a special reversed form <strong>of</strong> al-mutaq rib meter (called<br />

bad ), not reported to have been ever used in the refined traditional<br />

poetry.<br />

Chapter [66]<br />

Cryptanalysis can be extremely demanding if poetical ciphers are<br />

rendered using meters that are not based on the established rules <strong>of</strong><br />

prosody and uniformity <strong>of</strong> rhyme. I say: The cryptanalyst is not<br />

obliged to puzzle out ciphers intended for mental exertion, just as the<br />

grammarian is not bound to enter into intricate issues.<br />

Glory be to God, the Lord <strong>of</strong> grace and favour, the granter <strong>of</strong><br />

natural gifts and talents. Sufficient unto me is God! Most Excellent is<br />

He in Whom I place my trust.<br />

Not e: The following verse also encompasses the alphabet:<br />

118<br />

117 This verse appears in the treatise on cryptanalysis <strong>of</strong> poetry by the author <strong>of</strong><br />

'Adab a - u ar ', as an illustrative example <strong>of</strong> the deliberate use in<br />

encipherment <strong>of</strong> letters that never link with each other, but are used as separate<br />

disconnected letters.<br />

118 This verse is appended malapropos to the book, probably by the scribe. No<br />

reference to it has been made in any <strong>of</strong> the treatises incorporating the<br />

assemblage <strong>of</strong> cryptology.<br />

186


The Gist Of ibn Dunayn r's Chapters<br />

On Cryptanalysis<br />

The rhyme structures are six; take them as concisely as can be:<br />

LETTERS: raw , wa l, ur , ridf, ta's s, and da l.<br />

DIACRITICS: naf , 'i b , mu r , a w, rass, and taw h.<br />

The rhyme defects are five; take them as tractably wrought as<br />

possible: sin d, ' ', ta m n, 'ikf ', and 'iqw '.<br />

� raw : the letter on which the poem is based.<br />

� ridf: the pre-raw vowel letter; e.g. , and respectively<br />

in , and .<br />

� ta's s: the letter ( ) prior to the raw but one; e.g. .<br />

� da l: the letter between ta's s and raw ; e.g. in .<br />

� wa l: one <strong>of</strong> the vowel letters ( , , ) or the letter ,<br />

next to the raw .<br />

� ur : a post- raw vowel letter; e.g. the final ( ) in ( ).<br />

� naf : the vowel point <strong>of</strong> the letter <strong>of</strong> wa l.<br />

� taw h: the vowel point <strong>of</strong> the restricted pre-raw letter.<br />

� mu r : the vowel point <strong>of</strong> the raw .<br />

� 'i b : the vowel point <strong>of</strong> the unrestricted pre-raw letter.<br />

� rass (or ras s): the vowel point <strong>of</strong> the pre-ta's s.<br />

* * *<br />

188


5<br />

2<br />

3<br />

1<br />

71<br />

4<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


215 1<br />

5<br />

) 2(<br />

] 1[<br />

73<br />

3<br />

1<br />

4<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


6<br />

4<br />

5<br />

1<br />

216<br />

215<br />

1<br />

2<br />

237 236 216 215 1<br />

126<br />

124 3<br />

75<br />

84<br />

3<br />

19 1<br />

2<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


1<br />

3<br />

77<br />

(1)


4<br />

3<br />

14<br />

13<br />

11<br />

4<br />

79<br />

2<br />

221 1<br />

114 1<br />

1<br />

62<br />

(1)<br />

(2)<br />

(3)<br />

(4)


5<br />

223 1<br />

4<br />

224 1<br />

24<br />

5<br />

23<br />

81<br />

2<br />

1<br />

225 1<br />

3<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


3<br />

224 1<br />

2<br />

5<br />

224 1<br />

6<br />

224<br />

1<br />

83<br />

1<br />

6<br />

4<br />

224 220 1<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


4<br />

58<br />

3<br />

55<br />

58<br />

] 7[<br />

85<br />

لصف<br />

1<br />

2<br />

(1)<br />

(2)<br />

(3)<br />

(4)


23<br />

274 1<br />

600<br />

6<br />

3<br />

274 1<br />

4307<br />

360<br />

274 1<br />

236 1<br />

7<br />

] 8[<br />

8<br />

236 1<br />

87<br />

2<br />

لصف<br />

236 2<br />

236 1<br />

5<br />

575<br />

4<br />

600<br />

437<br />

1<br />

275<br />

1<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)<br />

(8)


1<br />

] 9[<br />

89<br />

لصف<br />

(1)


4<br />

1<br />

3<br />

239 1<br />

239 1<br />

] 10[<br />

2<br />

7<br />

93<br />

5<br />

لصف<br />

240<br />

1<br />

8<br />

240 1<br />

6<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)<br />

(8)


4<br />

2<br />

3<br />

1<br />

95<br />

6<br />

5<br />

241 240 238 1<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


3<br />

�<br />

2<br />

ڤ<br />

x<br />

] 11[<br />

] 12[<br />

ڤ<br />

99<br />

لصف<br />

لصف<br />

81 1<br />

1<br />

62 1<br />

(1)<br />

(2)<br />

(3)


2<br />

5<br />

6<br />

1<br />

Substitution<br />

] 13[<br />

101<br />

لصف<br />

4<br />

7<br />

3<br />

Transposition<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)


3<br />

5<br />

223 222 1<br />

2<br />

8<br />

] 14[<br />

103<br />

4<br />

لصف<br />

57<br />

1<br />

256<br />

6<br />

7<br />

230<br />

225<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)<br />

(8)


1<br />

2<br />

] 15[<br />

105<br />

لصف<br />

(1)<br />

(2)


3<br />

5<br />

2<br />

1<br />

57<br />

16<br />

4<br />

17<br />

107<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


2<br />

] 18[<br />

109<br />

لصف<br />

1<br />

3<br />

234،224 1<br />

234 1<br />

(1)<br />

(2)<br />

(3)


2<br />

] 19[<br />

] 20[<br />

111<br />

لصف<br />

1<br />

لصف<br />

(1)<br />

(2)


113


115


1<br />

7<br />

50 11<br />

92<br />

5<br />

25<br />

92<br />

] 21[<br />

4<br />

67<br />

92<br />

2<br />

117<br />

لصف<br />

0.7456<br />

2304<br />

3<br />

6<br />

147.456<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)


5<br />

4<br />

3<br />

1<br />

] 22[<br />

119<br />

لصف<br />

5<br />

44<br />

31<br />

4<br />

~<br />

2<br />

(1)<br />

(2)<br />

(3)<br />

(4)


1<br />

331 330 1<br />

] 23[<br />

762<br />

121<br />

لصف<br />

2<br />

(1)<br />

(2)


]<br />

24[<br />

123<br />

لصف


332 331 1<br />

6<br />

5<br />

4<br />

2<br />

74 1<br />

3<br />

] 25[<br />

125<br />

لصف<br />

4<br />

1<br />

10 30<br />

100 10 80<br />

6<br />

6<br />

5 30 30 1<br />

74<br />

1<br />

400 30 1<br />

(1)<br />

(2)<br />

(3)<br />

(4)


75<br />

1<br />

1<br />

] 26[<br />

127<br />

لصف<br />

(1)


] 27[<br />

129<br />

لصف<br />

1<br />

(1)


339<br />

1<br />

1<br />

] 28[<br />

131<br />

2<br />

لصف<br />

3<br />

(1)<br />

(2)<br />

(3)


3<br />

2<br />

1<br />

29<br />

133<br />

(1)<br />

(2)<br />

(3)


10<br />

4<br />

3<br />

7<br />

2<br />

] 30[<br />

لصف<br />

135<br />

1<br />

6<br />

9<br />

5<br />

8<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)<br />

(8)<br />

(9)<br />

(10)


2<br />

325<br />

1<br />

] 31[<br />

] 32[<br />

] 33[<br />

137<br />

لصف<br />

لصف<br />

لصف<br />

1<br />

(1)<br />

(2)


2<br />

4<br />

] 34[<br />

139<br />

لصف<br />

1<br />

3<br />

1000<br />

(1)<br />

(2)<br />

(3)<br />

(4)


1<br />

13<br />

2<br />

] 35[<br />

141<br />

4<br />

لصف<br />

17<br />

15<br />

3<br />

5<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


1<br />

54<br />

3<br />

] 36[<br />

] 37[<br />

143<br />

لصف<br />

لصف<br />

4<br />

204<br />

1<br />

10<br />

2<br />

9<br />

8<br />

(1)<br />

(2)<br />

(3)<br />

(4)


) 3(<br />

2<br />

5<br />

178<br />

) 5(<br />

135<br />

18<br />

4<br />

6<br />

] 38[<br />

] 39[<br />

) 5(<br />

101 3<br />

145<br />

لصف<br />

لصف<br />

194<br />

215<br />

1974<br />

3<br />

1<br />

52<br />

1394<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


61<br />

4<br />

187<br />

] 40[<br />

147<br />

لصف<br />

1<br />

3<br />

) 2(<br />

2<br />

(1)<br />

(2)<br />

(3)<br />

(4)


7<br />

299 297 1<br />

6<br />

3<br />

] 41[<br />

149<br />

لصف<br />

208<br />

2<br />

5<br />

119<br />

4<br />

1<br />

231<br />

224<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)


2<br />

4<br />

3<br />

228<br />

151<br />

5<br />

31<br />

29<br />

28<br />

1<br />

228<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


137<br />

134<br />

227<br />

215<br />

153<br />

74<br />

46<br />

1<br />

2<br />

(1)<br />

(2)


3<br />

1<br />

] 42[<br />

155<br />

4<br />

لصف<br />

2<br />

5<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

44<br />

(5)


5<br />

185<br />

1<br />

3<br />

] 43[<br />

157<br />

لصف<br />

297 1<br />

4<br />

74<br />

73<br />

1989<br />

2<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)


1<br />

3<br />

6<br />

5<br />

2<br />

159<br />

4<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


1<br />

122<br />

2<br />

] 44[<br />

] 45[<br />

161<br />

لصف<br />

لصف<br />

(1)<br />

(2)


1<br />

5<br />

363 1<br />

) 3(<br />

46<br />

2<br />

3<br />

4<br />

] 47[<br />

163<br />

6<br />

لصف<br />

123<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


165<br />

ًصف<br />

[<br />

48<br />

]<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

10<br />

11<br />

(1)<br />

463<br />

482<br />

(2)<br />

(3)<br />

213<br />

223<br />

(4)<br />

137<br />

151<br />

(5)<br />

(6)<br />

2<br />

366<br />

2<br />

148<br />

1<br />

112<br />

64<br />

1<br />

330<br />

279<br />

3<br />

62<br />

29<br />

8<br />

1<br />

3<br />

2<br />

153<br />

1<br />

6<br />

2<br />

120<br />

9<br />

388<br />

762<br />

(7)<br />

(8)<br />

233<br />

241<br />

(9)<br />

(10)<br />

274<br />

312<br />

(11)<br />

123


124<br />

124<br />

4<br />

3<br />

] 49[<br />

] 50[<br />

] 51[<br />

167<br />

لصف<br />

لصف<br />

لصف<br />

158<br />

157<br />

124<br />

2<br />

1<br />

(1)<br />

(2)<br />

(3)<br />

(4)


3<br />

60<br />

] 52[<br />

] 53[<br />

169<br />

لصف<br />

لصف<br />

4<br />

1<br />

2<br />

(1)<br />

(2)<br />

(3)<br />

(4)


5<br />

32<br />

31<br />

2<br />

3<br />

1<br />

6<br />

178<br />

128<br />

43<br />

43<br />

] 54[<br />

] 55[<br />

321 1<br />

171<br />

لصف<br />

لصف<br />

4<br />

826<br />

71<br />

211<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


333<br />

2<br />

4<br />

38<br />

5<br />

128<br />

] 56[<br />

] 57[<br />

6<br />

128<br />

173<br />

لصف<br />

3<br />

لصف<br />

128<br />

1<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


] 58[<br />

] 59[<br />

175<br />

لصف<br />

لصف<br />

تفضرجت بوجطمخلاب ىمر امل ِلطْعَبْرَخلا يف ضافو ُهاتفاّرـش<br />

2<br />

4<br />

3<br />

129<br />

1<br />

(1)<br />

(2)<br />

(3)<br />

(4)


4<br />

115<br />

118<br />

Homophones<br />

108<br />

115<br />

2<br />

36 1<br />

] 60[<br />

لصف<br />

1<br />

177<br />

82<br />

81<br />

6<br />

3<br />

5<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


2<br />

1<br />

] 61[<br />

179<br />

لصف<br />

(1)<br />

(2)


3<br />

4<br />

] 62[<br />

181<br />

1<br />

2<br />

لصف<br />

(1)<br />

2<br />

3<br />

4


2<br />

3<br />

183<br />

54<br />

1<br />

4<br />

(1)<br />

(2)<br />

(3)<br />

(4)


322<br />

7<br />

6<br />

5<br />

8<br />

272،327 1<br />

169 168 144 1<br />

4<br />

353<br />

353<br />

352<br />

] 63[<br />

] 64[<br />

185<br />

لصف<br />

لصف<br />

81<br />

53<br />

80<br />

2<br />

1<br />

48<br />

559 1<br />

101<br />

3<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

(7)<br />

(8)


5<br />

3<br />

6<br />

4<br />

44<br />

1<br />

41<br />

2<br />

173<br />

353<br />

352<br />

169<br />

353<br />

] 65[<br />

] 66[<br />

187<br />

لصف<br />

لصف<br />

225<br />

74<br />

47<br />

(1)<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)


2<br />

39<br />

205<br />

15<br />

54<br />

1<br />

72<br />

71<br />

70<br />

189<br />

54<br />

41<br />

3<br />

233<br />

221<br />

(1)<br />

(2)<br />

(3)


190

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!