Arabic Origins of Cryptolog Vol. 4

Embed Size (px)

Citation preview

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    1/322

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    2/322

    Series on

    Arabic Origins of Cryptology

    Volume Four

    ibn Dunaynir's Book:

    Expositive Chapters on

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

    Series Editors

    M. Mrayati, Ph.D.

    Y. Meer Alam, Ph.D. M. H. at-Tayyan, Ph.D.

    Published by

    KFCRIS & KACST

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    3/322

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    4/322

    Acknowledgments

    The editors of this series greatly appreciate the encouragement theyhad from Dr. Yahya Mahmoud Ben Jonayd, Secretary General ofKing Faisal Center for Research and Islamic Studies, to publish thisSeries. We are also in the debt to Dr. Saleh Athel, the president ofKing Abdulaziz City for Science and Technology (KACST), for

    supporting the project of translating this series to English.Many thanks to Dr. Daham Ismail Alani, the Secretary General of theScientific Council of KACST, for all his efforts to make thispublication possible.The typesetting of this bilingual version of the series was realized withskill and dedication by Mr. Ousama Rajab; we offer hearty thanks tohim.Finally, we would like to mention our recognition to the many whohad previously contributed to the Arabic version of this series, andparticularly to Dr. Wathek Shaheed, Dr. Shaker al-Faham, the lateProf. Rateb an-Naffakh, and Dr. Fouad Sezgin.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    5/322

    Series onArabic Origins of Cryptology

    Volume 4

    Translated by

    Said M. al-Asaad

    Revised byMohammed I. al-Suwaiyel, Ph.D.

    Ibrahim A. al-Kadi, Ph.D.

    Marwan al-Bawab

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    6/322

    v

    Contents

    List of Figures ............................................................................ viiList of Tables .......................................................................... viiiTransliterating Arabic words ....................................................... ix

    Preface ............................................................................................ xi

    Section 1: Analytical Study of ibn Dunayn rs Book:Expositive Chapters on Cryptanalysis ....................... 1

    1.1. Biography of ibn Dunayn r ................................................. 31.2. Study and Analysis of ibn Dunayn rs Book.......................... 5

    1.2.1. ibn Dunayn rs Sources .................................................... 51.2.2. ibn Dunayn rs Cryptological Practice ............................. 8

    1.3. Structure of the Book ............................................................. 101.3.1. Cryptanalysis of Prose Ciphers ...................................... 11

    1.3.1.1. Principles and Tools of Cryptanalysis ............... 111.3.1.2. Types of Encipherment ...................................... 131.3.1.3. Algorithms of Cryptanalysis .............................. 151.3.1.4. Composite Encipherment ....................................... 32

    1.3.2. Cryptanalysis of Poetry Ciphers .................................... 471.3.2.1. Tools for Cryptanalysing Poetry Ciphers .............. 481.3.2.2. On Prosody (Metrics)........................................ 491.3.2.3. On Rhymes........................................................ 491.3.2.4. Insight into Writing Knack................................ 501.3.2.5. Other Useful Observations.................................... 531.3.2.6. Practical Examples............................................ 54

    1.3.2.7. Conclusion............................................................. 561.4. Originality of ibn Dunayn r .................................................. 58

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    7/322

    vi

    Section 2:ibn Dunayn rs Edited Book:Expositive Chapters on Cryptanalysis ...................... 60

    2.1. Editing Methodology.............................................................622.2. Description of the Manuscript............................................... 632.3. ibn Dunayn rs Book (Original Arabic Text and English

    Translation) ............................................................................ 67PART ONE. Cryptanalysis of Prose Ciphers ........................... 70

    Principles and Tools of Cryptanalysis (Chapters 1-2) ..... 72

    Types of Encipherment- Simple (Chapters 3-5) ............................................... 76

    - Composite (Chapter 6) .............................................. 82Algorithms of Cryptanalysis (Chapters 7-35) ................ 84

    PART TWO. Cryptanalysis of Poetry Ciphers ........................142

    Tools for Cryptanalysing Poetry Ciphers(Chapters 36-37) ......................................................... 142

    On Prosody (Chapters 38-40) ........................................ 144

    On Rhymes (Chapter 41) ............................................... 148

    Writing Knack (Chapters 42-52) ................................... 154

    Other Useful Observations (Chapters 53-59) ................ 168- Comment on an important cipher method from The

    Two Essays (Chapter 60) ................................... 176Practical Examples (Chapters 61-62) ............................ 178

    Conclusion (Chapters 63-66) ......................................... 184

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    8/322

    vii

    List of Figures

    1.1. ibn Dunayn r's types of encipherment ........................................ 14

    1.2.Encipherment by numerical processing using ADWNA .......... . 40

    2.1.A photocopy of the first sheet of ibn Dunayn r's book ............... 642.2. A photocopy of the second sheet of ibn Dunayn r's book ......... 65

    2.3. A photocopy of the last sheet of ibn Dunayn r's book .......... 66

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    9/322

    viii

    List of Tables

    1.1. ibn Dunayn r's work on the orders of letter frequency(statistical cryptanalysis) .......................................................... 18

    1.2. Noncombinable letters (in texts) as observed by ibn Dunayn r

    (without repetition) .................................................................. 221.3. Noncombinable letters (in texts) according to ibn Dunayn r,

    arranged alphabetically (with repetition) ................................. 23

    1.4. Noncombinable letters as demonstrated in our statisticalanalysis of Arabic roots ........................................................... 24

    1.5. Table of noncombinable letters as observed by al-Kind ......... 25

    1.6. Numerical values of letters ....................................................... 36

    1.7. Finger-spelling using ADWNA ................................................ 38

    1.8. The first of ibn Dunayn r's two practical examples .................. 55

    1.9. The second of ibn Dunayn r's two practical examples ............. 56

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    10/322

    ix

    Transliterating Arabic words

    For transliterating Arabic words (names, titles, etc.) we have adopted theInternational System for the Transliteration of Arabic characters, devised by theInternational Standards Organization (ISO). The system constitutes ISORecommendation R233 (December 1961). Given below is this system, with someadditional explanations found to be necessary.

    Vowels:

    Arabic characters Transliteration Examples

    ShortVowels

    (fat a) a as u in cup.

    ( amma) uas o in rock,and u in put.

    (kasra) ias e in red,and i in big.

    LongVowels

    As a in last.

    (preceded by ) as oo in moon.

    (preceded by ) as ee in sheet.

    Consonants:Arabic

    charactersTransliteration Examples

    ' (e.g. 'amr, 'ibr h m, fu' d, kis ' , t ').

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

    b as b in back. t as t in tea. as th in thin. as g in logic.

    (e.g. tim). (e.g. lid). d as d in day. as th in then. r as r in red.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    11/322

    x

    z as z in zoo. s as s in soon. as sh in show. (e.g. mi r). (e.g. ir r). (e.g. riq). (e.g. fir). (e.g. Abb s).

    (e.g. lib).

    f as f in few. q (e.g. qur' n). k as k in key. l as l in led. m as m in sum. n as n in sun. h as h in hot. w as w in wet (e.g. wahab, nawfal).

    y as ie in orient (e.g. y q t, dunayn r).

    Notes:

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

    the construct state, rendered by (t) (mad nat annab ).

    (suk n): Ignored in transliteration.

    ( adda): Rendered by doubling the consonant.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    12/322

    xi

    Preface

    This is the fourth book ofThe Arabic Origins of Cryptologyseries,which addresses the cryptological contributions of the Arabs, andtranslates a number of treatises by Arab cryptologists.

    An individual book is dedicated to each treatise. The first book wasdevoted to the oldest ever found treatise on cryptanalysis, written by

    the well-known Arab philosopher al-Kind about 1200 years ago. Thesecond book of the series tackles ibn Adl n's treatise al-mu'allaf lil-malik al-'A raf (The manual written for King al-A raf). The thirdbook deals with ibn ad-Durayhim's treatise Mift al-Kun z f al-Marm z (Key to treasures on clarifying ciphers), while the fourthbook (this one) covers ibn Dunayn r's work. For the time being, ninebooks are envisaged, unless more manuscripts are discovered.

    In Book One we have devoted a full chapter to study and analysethe birth of cryptology by the Arab civilization. This would highlightimportant aspects and prove useful for understanding the whole series.

    * * *This book is divided into two sections. Section 1 is an analytical

    study of the edited book of ibn Dunayn r. It aims at introducing thebook and elucidating difficult or vague points, spotting particularfeatures and, more remarkably, highlighting aspects of originality andinnovation in ibn Dunayn r's book. This section is divided into foursub-sections: one gives a brief biography of ibn Dunayn r, anotherprovides an account of his sources and cryptological practice, a thirddetails the structure of the book as regards cryptanalysis of both proseand poetry ciphers, and a fourth sub-section summing up the

    analytical study of the book, exposing ibn Dunayn r's cryptologicalcontributions and aspects of originality.

    Section 2 comprises an English translation of the original Arabictext of ibn Dunayn r's edited book. It opens with a statement outliningthe editing methodology adopted, which basically conforms to thatcommonly used by the scientific community. The edited book is

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    13/322

    xii

    preceded by a brief description of the manuscript, followed by samplephotocopies of selected pages from the original.

    The task of editing the manuscript text was a challenge indeed.Special care has been taken to present the text in due form. TheEnglish translation appears on the left-hand (even) pages, and theoriginal Arabic text on the right-hand (odd) pages. No effort has beenspared correcting the mistakes and clearing the ambiguities. For easeof reference, individual chapters have been assigned numbers (by theeditors). Wherever appropriate, lead-in headings have beenintroduced.

    * * *

    Damascus, May 2005

    Dr. M. Mrayati

    Dr. Y. Meer Alam Dr. M. H. Tayyan

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    14/322

    Section 1

    Analytical Study of ibn Dunayn r's Book:Expositive Chapters on Cryptanalysis

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

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    15/322

    2

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    16/322

    3

    1.1. Biography of ibn Dunaynir

    He is 'Ibr h m ibn Mu ammad ibn 'Ibr h m ibn Al ibn Hibat

    All h ibn Y suf ibn Na r ibn 'A mad, alias ibn Dunayn r1

    al-La m ,

    son of King Q b s ibn al-Mun ir ibn M ' as-Sam '. Born in Mosul in

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

    son of Sultan Saladin, and governor of Aleppo and its administrative

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

    ad-D n A mad ibn Abdull h al-Muhr n on whom he made

    panegyrics. He was then reported to have worked for N ir ad-D nMu ammad ibn 'Ayy b, king of Egypt (d. AH 635/AD 1238).

    ibn Dunayn r journeyed between Greater Syria and Egypt and

    lauded a number of kings and notobilities there. His life ended at the

    hands of King al- Az z U m n ibn al-Malik al- dil, who crucified

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

    His works

    According to his biographies, ibn Dunayn r wrote primarily in the

    following two fields:

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

    collection (divan), and al-K f ilm al-qaw f (Sufficiency in the

    science of rhymes), which is still missing.

    b)Cryptology, the science in which he excelled and was particularly

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

    AD 1363] has mentioned two books on cryptology by ibn

    Dunayn r, i.e.

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

    in the science of making ciphers), also numbered among the

    missing compilations. ibn Dunayn r, however, refers to it in

    Maq id al-fu l.2

    1Diminutive of dinar .a unit of currency

    2See p.98.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    17/322

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    18/322

    5

    1.2. Study and Analysis of ibn Dunaynir's Book

    This study involves a general review of ibn Dunayn r's Maq idal-Fu l al-Mutar ima an all at-Tar ama, along the same lines asin the previous treatises. Thus, the book is to be analysed according tothe order of topics that it covers. It has been found useful to add, insquare brackets, explicatory headings to the already numberedchapters of the edited text. This would make life easier for the reader,and mark the sequence of ideas. A full analysis of every chapter isprovided, along with illustrative examples where necessary, to rule out

    any possibility of ambiguity that might be encountered especially bynonprofessionals. It is only natural, on our part, to highlight ibnDunayn r's novel additions to the contributions of his predecessors,and point out his refinements of already existing ideas. A briefappraisal is also given for each of the chapters of his book, then toconclude with a statement manifesting the aspects of ibn Dunayn r'soriginality.

    1.2.1. ibn Dunaynir's Sources

    In his book, ibn Dunayn r has attained a high degree of excellenceas regards his extensive knowledge, precise methodology, and well-organized access to both cryptography and cryptanalysis. His soundsystematic approach is in fact an outcome of a broad personalknowledge of the work of his predecessors in this art; he manages tomake full use of their efforts, to set straight their mistakes, to redresstheir omissions, as well as to add his own new contributions. ibnDunayn r's scientific method is reflected in that he considerscryptography and cryptanalysis as separate sciences, each having itsown set of principles and concepts. He demonstrates this distinctionparticularly in the designation of two of his compilations, namely a -

    ih b an-n im f ilm wa at-tar im, which is dedicated tocryptography, and Maq id al-fu l al-mutar ima an all at-tar ama, devoted to cryptanalysis a fact revealing his insistence ontreating them as separate sciences. In this respect he precedes ibn ad-Durayhim (d. AH 762/ AD 1361) who states in his treatise Mift al-kun z f ' al-marm z, describing the cryptologue's tools: "It is

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    19/322

    6

    necessary for one experiencing cryptanalysis to develop a thorough

    knowledge"3ibn Dunayn r seems keen to glean and marshal whatever earlier

    manuscripts he has run down of this science. He does proclaim that hequoted from al-Kind , and from "the Author of the Two Essays", aswell as from Ab al- asan ibn ab ab (d. AH 322/ AD 934). It isalso likely that he tapped the works of ibn Wahab al-K tib and theauthor of the book Adab a - u ar ' (The art of poets), among othergreat figures of this art who lived between the third and sixth centuriesof the Hegira (9th - 12th AD). This is so because ibn Dunayn r's

    professional scientific life began in the early part of the seventhcentury of the Hegira.

    But his main source is really al-Kind 's treatise on cryptanalysis(Volume One of this series). He leans heavily on it and quotes muchof its contents, yet he has been shrewd enough to adjust and modifywhat he takes, bidding fair to succeed at times, and falling wide of themark at other times. He does well in explaining the points summed upby al-Kind , while he misses the mark in overlooking some things thatal-Kind mentions. In this context, ibn Dunayn r's citations are not aslavish indiscriminate repetition, but a leisurely premeditated practicebased on verification and experimentation. For example, he does not

    only cite al-Kind 's computation of letter frequency of occurrence andthe resultant orders, but also emulates him in reckoning the letters oftexts that appear in some sheets, and setting the letters in order, as perhis own calculations, and in substantiation of al-Kind 's results. At thebeginning of Chapter 8 of his book, ibn Dunayn r says: "I haveconsidered the orders of letter frequencies according to the reckoningof Ya q b al-Kind , peace be on his soul. He said he had turned toseven parchments and counted all the orders of letter frequency ofoccurrence in them It so occurred to me to take up [other] writtensheets myself and count the letter frequency orders in them So itcame home to me the validity of the statement of Ya q b ibn 'Is q,

    peace be on his soul."4

    The fact that ibn Dunayn r adapts his quotations from al-Kind ismaintained by his own statement: "and I abridged that considerably

    3See his treatise, Volume Three of this series, p.52.

    4See his book, p.86.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    20/322

    7

    such that my version should suffice instead of al-Kind 's treatise and

    its long-winded prolixity."5

    This very account, however, remains amoot point, since al-Kind 's treatise is, by rights, a typical example ofconciseness, concentration and richness a fact which denies theclaim of any substitute that can do duty for it, and which refutes anyredundance in it, with the exception perhaps of some repetitionmarking his treatment of letter non-combination.

    ibn Dunayn r's enlargement on al-Kind 's text, and also hisacquaintance with the bulk of material written on the subject, areevident in his discussion of composite encipherment. He says thatal-Kind did not in the least touch upon it, and that those who dealtwith it later fumbled and disarranged things. He adds: "But Imentioned a good few of them [i.e. composite ciphers] to serve as aguideline in deciding on unmentioned cases, if any. al-Kind neverattended to composite encipherment except incidentally [withoutdwelling on details]. Whoever attempted to deal with it, other than

    al-Kind , certainly raved and went astray on that score".6By the same token, ibn Dunayn r proposes novel ideas overlooked

    by his predecessors for some reason. For example his approach toencipherment by utilizing the chessboard to communicate with

    someone who is present, and his notion of the possibility ofdeveloping it so as to convey a cipher message to an absent person. Ashe puts it: "It [chessboard encipherment] may be employed to address

    an absent person in a way I shall tell you without precedent."7

    Among those whom ibn Dunayn r proclaims to have drawn on andquoted is the Author of the Two Essays. This is manifested in his ownwords: "Towards the end of his Second Essay, the Author of the TwoEssays on cryptanalysis states that we are destined to follow an

    intricate path."8

    This is the second of ibn Dunayn r's sources.The third reference is Ab al- asan ibn ab ab 's Treatise on

    Cryptanalysis. ibn Dunayn r writes: "I have [herein] adducedsomething novel that none else had ever broached before, because

    5See his book, p.94.

    6Ibid., p.108.

    7Ibid., p.120.8

    Ibid., p.176.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    21/322

    8

    al-Kind 's book [treatise] tackles prose simple encipherment only; andAb al- asan's book treats poetry encipherment. Both failed to

    develop the topic exhaustively in either case."9

    This shows that ibn Dunayn r is keen to explicitly bring his ownnew and original views to notice, insomuch that he asserts that nonehad ever before him taken the lead in introducing them. His keennessis all-often associated with observing the concepts that hispredecessors overlooked, or imperfectly handled, or those that eludedtheir attention. It seems that he opts to cite some of his referencesespecially to point out any one of these implications. Upon comparing

    ibn Dunayn r's work with that of the author of Adab a - u ar '(in histreatise on cryptanalysis of poetry), one realizes that the latter is notonly extensively quoted by ibn Dunayn r, but is sometimes literallycopied in many places.

    1.2.2. ibn Dunaynir's Cryptological Practice

    In addition to his mastery of cryptography and cryptanalysis, ibnDunayn r attained high practical expertise. This is evident in theworks he left and the nature of activity he pursued. He says, for

    instance, concluding his discussion of the encipherment implementedby adding insignificant letters (nulls): "I was asked to cryptanalyse aciphered message, but found it incompatible with any of the [simpleencipherment] divisions. I pondered on it, sorted out its charactersand by the good assistance of the Almighty, I managed to solve it

    straightway."10

    A similar picture of ibn Dunayn r's practicalknowledge lies in his statement, closing his argument about compositeencipherment: "And we have straightforward methods out ofcomposites This method is within easy reach of the enlightenedpeople of this profession, who consider it carefully."

    11It goes without

    saying that the last quotation above reflects ibn Dunayn r's conviction

    of the fact that cryptography is an established science based on rules

    9His book, p.184.

    10Ibid., p.104.

    11Ibid., p.136.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    22/322

    9

    and regulations, and exercised by qualified professionals, just likeother sciences.

    ibn Dunayn r practiced encipherment and cryptanalysis by virtue ofhis personal contacts with a number of Ayyubid kings and princes ofhis time, and his approaches to gain their favour in Egypt and GreaterSyria. Considering, as stated earlier, that he was in the employ of KingN ir ad-D n Mu ammad ibn 'Ayy b of Egypt, and Prince Asad ad-D n 'A amad ibn Abdull h al-Muhr n , it is all-probable that he haswritten this treatise at the behest of one of the sovereigns of the time.There are reasons to believe that, after the fashion of many

    cryptologists, he may have made mention of the assignment in theintroduction, which was left out by the scribe for some reason. This istestified right from the outset of the treatise: "He [ibn Dunayn r] said,following the honorific opening statement in praise of God and the

    introduction: This book is divided into two parts".12 We live inhope of time to come and reveal the original of this copy so as to setright our assumptions once and for all.

    12ibn Dunayn r's book, p.70.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    23/322

    10

    1.3. Structure of the Book

    ibn Dunayn r's book is characterized by its rich content andinclusive coverage of the requisites for those engaged in cryptanalysis.It covers quantitative and qualitative data and a variety of algorithmsfor cryptanalysis, arranged in a way similar to the arrangement of thecompilations of cryptology today.

    ibn Dunayn r divides his book into two broad parts: The first part(1.3.1.) treats of cryptanalysis of prose ciphers, featuring the mainprinciples and tools thereof, and surveying, among other things, thetechniques utilized in cryptanalysing the various types ofencipherment, including what he calls "composite" encipherment. Inaddition to his use of statistical techniques in cryptanalysis pioneeredearlier by al-Kind , ibn Dunayn r was the first to describe anarithmetical cipher using the decimal numerical alphabet.

    The other part (1.3.2.) addresses algorithms peculiar to thecryptanalysis of poetical ciphers, considering the topics of prosody,rhyme, meter, word-patterns, and principles regulating proper writingskills. ibn Dunayn r also explores snags that can possibly hamper thecryptologue's endeavour towards cryptanalysis. He winds up with a

    couple of practical illustrative examples, followed by verses intended,he says, for sustained mental exertion in pursuit of solution.

    This is a bird's eye view of ibn Dunayn r's book in its totality. Asystematic analysis of the work follows; organized in conformity withthe order of chapters in the edited text, so as to help the readernavigate and keep step, with a view to appreciate the author's ultimateobjectives. We shall augment our analysis with illustrative examplesas often as necessary, highlighting in the meanwhile the scientificvalue of ibn Dunayn r's achievement in the light of the past fromwhich he has drawn, and the sophisticated present to which we

    belong.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    24/322

    11

    1.3.1. Cryptanalysis of Prose Ciphers

    1.3.1.1. Principles and Tools of Cryptanalysis

    ibn Dunayn r establishes, right from the beginning, the significantfact that cryptanalysis is actually based on conjecture, or what isknown in today's terminology as "tentative assumption". Thisconjecture is by no means arbitrary, but measured according to fixed

    rules and principles "so that what is assumed by the cryptanalyst is anoutcome of reasoning and argument by analogy"

    13. ibn Dunayn r

    limits the rules and principles in two aspects and one "instrument"14

    .The first aspect is the conversancy with letter frequency count; theother is the knowledge of variety contact of letters; and the instrumentis the familiarity with the methods of encipherment.

    He then enumerates the personal attributes characteristic of theperson involved in this science, i.e. intelligence, observation, tenacity,insightful delicacy (which helps comprehend underlying obscurity),keen intuition, equanimity of mind, proper flair and apt conjecture.

    Chapters 1 & 2The Quantitative Methods

    ibn Dunayn r expands on the two aspects of cryptanalysis, usingal-Kind 's term of quantitative and qualitative expedients.

    By the quantitative expedients he means the utilization of letterfrequency of occurrence (or frequency count) in the cipher text, andmatching it against the order of letter frequency in the given language.ibn Dunayn r indicates that vowel letters have the highest frequency ofoccurrence in the Arabic language. In this respect, however, hiscoverage probably falls short of al-Kind 's splendidcomprehensiveness and precision of treatment. First and foremost, hefails to be on a level with al-Kind , who gives the exact meaning ofvowels as including the three long (or major) vowels [i.e. the letters: , and ], as well as the three short (or minor) ones [i.e. the diacritical

    13See ibn Dunayn r's book, p.70.

    14Ibid., p.72.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    25/322

    12

    marks in Arabic: fat a, amma and kasra]15

    . This is an importantphonetic question of which former linguists were fully conscious.Then came a time when it was neglected and remained under wraps,so much so that it was unfortunately attributed to more recentphoneticians rather than to its real originators.

    ibn Dunayn r maintains that the most frequently occurring letters inArabic are the vowels; but adds the two consonant letters of (l) and (m), so that the order of the highly-frequent letters, according to him,is: (a), (l), (m), (w) and (y). Nevertheless, he considers thevowels to "have the highest frequency among all letters in all

    tongues"16

    . Other letters vary in their frequency from one languageto another. Here ibn Dunayn r reviews some of the languagesprevalent there and then, such as Latin, in which the letter (s) ishighly frequent

    17; Seljuk Turkish and Mongol, in both of which the

    letter (n) has high frequency. But then one wonders why French isnot among these languages, although the Crusades were peaking up atthe time of ibn Dunayn r. Considering that ibn ad-Durayhim does

    refer to French in thecontextof citingcalligraphsandalphabetsizes18

    ,one finds no good reason why it has slipped ibn Dunayn r's mind. Infact this question remains to be answered.

    The last lines of Chapter 2 indicate knowledge, on the part of theauthor, of these different tongues, suggesting a certain degree ofcryptanalytical practice in them: "If we set out to describe thealgorithms of cryptanalysis in each tongue, the book would grow

    larger"19.

    15See al-Kind 's treatise, p.170.

    16See his book, p.74. This fact has been established by al-Kind before; see his

    treatise (Volume One of this series), p.122. 17

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

    and confirmed by ibn ad-Durayhim later (see his treatise, p.52). 18

    See ibn ad-Durayhim's treatise, p.19 and p.54.19

    See ibn Dunayn r's book, p.74.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    26/322

    13

    1.3.1.2. Types of Encipherment

    ibn Dunayn r discusses the types of encipherment on almost thesame lines as al-Kind , starting from Chapter 3 through Chapter 6.We have summed up his citation in a tree-diagram similar to that of

    al-Kind20

    . A quick comparison between the two diagrams shows thatibn Dunayn rs drops the encipherment method No. 13., probablyinadvertently due to scribing omission or a scribes oversight. Thispossibility is supported by the fact that he does mention this methodlater when he tackles cryptanalysis. In fact there is nothingparticularly novel in ibn Dunayn rs discussion of the types ofencipherment except his separating up composite encipherment intotwo divisions, which will be explored in detail later in this study, inthe course of handling algorithms of cryptanalysis.

    It is worthy to note that these divisions of encipherment include thethree established conventional divisions adopted to date of thisscience. These are:

    1. Concealment Cipher

    This includes all the cases pertaining to encipherment by changingletters with conceptual relationship and diffusion. It is done by

    choosing words for each letter, with a relation of some kind betweenthem. The true letters are replaced by words, chosen such as to form aplausible-sounding plaintext in which it is impossible to suspect theexistence of a secret message. This method is customarily attributed tothe German Trithemius (1462-1516); modern findings, however,confirm, beyond a doubt, that it was documented by the Arabs severalcenturies before.

    2. Transposition CipherThis involves all the cases that belong to the encipherment by retaining

    the forms (identities) of letters, by changing their relative positions.

    3. Substitution Cipher

    This embraces all the cases that fall under encipherment bychanging the forms (identities) of letters without relationship anddiffusion.

    20See al-Kind s treatise (Volume One of this series), p.87 and p.144.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    27/322

    14

    Figure 1.1.

    ibnDunayn rs Types of Encipherment

    With relationshipand diffusion

    Letters change their formsLetters retain their forms

    QuantitativeQualitative

    Repetitionof letters

    Someletters

    Allletters

    Mergingletters

    Someletters

    Allletters

    Linkingseparateletters

    Separatinglinkedletters

    Without relationshipand diffusion

    Simple substitution

    ? Cipher alphabetof devised shapesor symbols

    Polygraphic Monographic

    Transposition Species Genus

    Poly-word

    Mono-word

    Poly-word

    Mono-word

    SimpleTransposition

    Addition oromission

    Transposition(word or line)

    Transposition (letter)

    nulls

    Onenull Severalnulls

    Someletters

    Allletters

    Someletters

    Allletters

    Simple EnciphermentComposite (or Super-) Encipherment

    Corollaries of combiningsim le methods

    Combining simple methods

    No nulls

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    28/322

    15

    1.3.1.3. Algorithms of Cryptanalysis

    ibn Dunayn r elaborates, in eleven chapters (i.e. Chapters 7 through17), the different cryptanalysis algorithms related to simpleencipherment methods, outlining the quantitative (statistical) andqualitative (textural) methods. In the next seventeen chapters (i.e.Chapters 18-35) he turns to discuss composite encipherment, itsmethods and algorithms of cryptanalysis.

    The following table depicts some of the algorithms forcryptanalysing individual cipher methods, identified by their numbers

    in al-Kind 's tree diagram21 against their corresponding chapternumbers in ibn Dunayn rs book:

    Cryptanalysis of cipher method no. 14 Chapter 7

    Cryptanalysis of cipher method no. 15 Chapter 7Cryptanalysis of cipher method no. 13 Chapter 11Cryptanalysis of cipher method no. 14 Chapter 12

    Cryptanalysis of cipher method no. 19 Chapter 13Cryptanalysis of composite cipher method no. (15+19) Chapter 13Cryptanalysis of cipher method no. 20 Chapter 13

    Cryptanalysis of cipher method no. 21 Chapter 14Cryptanalysis of cipher method no. 22 Chapter 15Cryptanalysis of cipher method no. 22 Chapter 16

    Cryptanalysis of cipher method no. 7 and 8 Chapter 17

    Next, each chapter will be examined individually as follows:

    Chapter 7

    Cryptanalysis of Simple Substitution Cipher22

    This method is known, in today's terminology, as the

    monoalphabetic simple substitution. In this method "every letter isrepresented by a symbol that is unique to it,"23

    ibn Dunayn r says.The cryptanalysis is accomplished according to the following steps:

    21See Volume One (of this series ), p.87.

    22Methods Nos. 14 and 15.

    23See his book, p.84.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    29/322

    16

    1. Counting the enciphered forms (symbols), and arranging them ina list.

    2. Establishing the frequency of occurrence of each form, andaffixing the frequency numbers to the respective forms.

    3. Disposing the forms in descending order of frequency.4. Writing down the language letters, conformably with their order

    of frequency, against the corresponding forms in cipher.5. Maneuvering for correct combination of letters and intelligible

    articulateness of words.6.Turning over intractable forms again and over again, assuming all

    possible alternatives and combinations, and using fairconjecture, until the cipher makes sense.

    ibn Dunayn r then goes to mention the orders of the letters ofhighest frequency of occurrence in the Arabic language. These are:, , , , , , and . Perhaps his full awareness of the importance ofthis group of letters makes him reiterate them elsewhere, but with the

    slight difference where the letter comes before the letter .24

    Chapter 8

    Orders of Arabic Letters,

    or the Quantitative MethodThe application of the approach described in Chapter 7 demands a

    knowledge of the orders of Arabic letter frequency of occurrence intypical clear texts. ibn Dunayn r states that he has come to knowthese orders from al-Kind 's treatise, and that he has conducted hisown count of letter frequency in a three-sheet Arabic text. As he putsit: "It so occurred to me to take up [other] written sheets myself andcount the letter frequency orders in them. Thus I took three sheets ofproseepistolarytextsandIcalculatedthefrequencyoftheletter(alif);it turned out to be So it came home to me the validity of the

    statement of Ya q b ibn Is q [al-Kind ], peace be on his soul."

    25

    ibnDunayn r's statement bespeaks an exquisite scientific technique that isworthy of note: He begins by studying the works of his predecessors,then he systematically verifies his results, through the independent

    24See his book, p.86.

    25Ibid., p.86.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    30/322

    17

    examination of samples of appropriate data. This, needless to say, is aprinciple of vital importance in statistical linguistics today, and aprerequisite for sound results, taking into account a period of eightlong centuries that separate him from us. It should be pointed out thatthe total number of letters contained in those sheets was 3430,amounting to around 1100 letters per sheet and 550 letters per page.

    The following table (Table 1.1.) lists ibn Dunayn r's statisticalfindings as regards frequencies, in three sheets, of the letters of theArabic alphabet, rendered in descending order of occurrence.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    31/322

    18

    LetterFrequency of

    occurrence

    Percentage of

    occurrence

    575 16.76 % 360 10.50 % 265 7.73 % 260 7.58 % 250 7.29 % 230 6.71 % 225 6.56 % 195 5.69 % 170 4.96 %

    145 4.23 % 115 3.35 % 105 3.06 % 95 2.77 % 80 2.33 % 75 2.19 % 62 1.81 % 50 1.46 % 43 1.25 % 32 0.93 %

    28 0.82 % 17 0.50 %

    % 0.37 13 11 0.32 % 9 0.26 % 8 0.23 % 7 0.20 % 5 0.14 %

    0 0.00 %Total/ % 3430 100 %

    Table 1.1. ibn Dunayn r's work on the orders of letter frequency26

    (statistical cryptanalysis)

    One point that is highly relevant, and probably unknown to some,

    is that the computation of Arabic root-letters differs from thecomputation of word-letters as such; hence the disparity in the ordersof letter occurrence in each case. The letter (r), a moderate-frequency letter in words, takes precedence over high-frequencyletters in Arabic roots. It goes without saying that, to cryptologists,

    26-Cf. al-Kind 's table in Volume One, p.58.-

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    32/322

    19

    letter orders relate to full words including affixes (rather than rootsonly).

    Chapter 9

    Preamble to Letter Combination

    In this chapter ibn Dunayn r discusses the second principle ofcryptanalysis; it is based on making use of linguistic knowledgeassociated with the combination and non-combination of letters inlanguage. The effective utilization of this principle is related to thelength of the message or the sufficiency of the number of its letters.

    A very short cryptogram implies a shortage of constituent words andletters a factor that precludes the proper application of the statisticallaws and calls for using the qualitative tool of cryptanalysis instead.This in itself is a skilful gesture on the part of ibn Dunayn r, reflectinghis familiarity with the principle of the so-called law of large numbers.He says: "If the cryptogram is very short, there exists insufficiency init of the frequency of letter occurrence. The expedient for cryptanalysisto be used here is to determine those letters [of the alphabet] whichadmit combination with each other, and those which do notuntil[thecryptologue]elicitstheintendedmeaningof thatscantcipher."

    27

    ibn Dunayn r, however, is not the first to point out to this issue;

    al-Kind takes the lead on that score when he states in his treatise oncryptanalysis that "it could happen sometimes that short cryptogramsare encountered, too short to contain all the symbols of the alphabet,and where the order of letter frequency cannot be applied. Indeed theorder of letter frequency can normally be applied in long texts, wherethe scarcity of letters in one part of the text is compensated for by theirabundance in another part. Consequently, if the cryptogram was tooshort, then the correlation between the order of letter frequency in itand in that of the language would no longer be reliable, and thereuponyou should use another, qualitative expedient in cryptanalysing the

    letters."

    28

    A simple comparison immediately shows that al-Kind 'sstatement, though three centuries earlier than ibn Dunayn r's, is richer,more precise and transparent.

    27See ibn Dunayn r's book, p.88.

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

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    33/322

    20

    Some of ibn Dunayn r's successors also make reference to howcritical the length of the cryptogram is. An example is ibn Adl n (d.

    AH 666/ AD 1268)29

    , who goes a step further to set a minimumlength to the cipher sought for cryptanalysis. He writes: "The length ofthe text to be cryptanalysed should be at least in the neighborhood ofninety letters as a rule of thumb, because the letters thus would havehad three rotations, Yet, the number of letters may be less than that in

    certain cases."30

    ibn Dunayn r concludes this chapter by maintaining that decryptionby the qualitative means requires considerable professional expertise.

    He undertakes to establish, in the next chapter, what he terms "therules of this art", by means of a "simplified" table of those Arabicletters which are combinable and those which are not.

    Chapter 10

    Combination of Letters,

    or the Qualitative Method

    This chapter can be aptly described as a summary of al-Kind 'sideas regarding letter combination and non-combination, althoughibn Dunayn r falls comparatively short of al-Kind 's finesse inexpounding the combination phenomenon. He states towards the end

    of the chapter: "and I abridged that considerably such that myversion should suffice instead of al-Kind 's treatise and its long-

    winded prolixity".31

    In point of fact, however, al-Kind 's investigationof the laws regulating combination and non-combination of eachArabic letter,although sometimes characterized by repetition, provesotherwise very useful because these laws are, by nature, so prone toambiguity, misspelling or distortion that their repetition by al-Kindguards against any possible misrepresentation. ibn Dunayn r'scontribution in this respect has been to round up the scattered rules,bring them together, and eliminate repetition by means of presenting

    them in one table, which itself is not without repetition in more placesthan one.

    29-In fact ibn Adl n was a contemporary, rather than a successor, of ibn Dunayn r,

    although he outlived ibn Dunayn r by some 40 years.- (Translator)30

    See ibn Adl n's treatise (Volume Two of this series), p.52.31

    See ibn Dunayn r's book, p.94.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    34/322

    21

    ibn Dunayn r divides Arabic letters into four groups:1. Letters which combine with all other letters in both anterior and

    posterior positions, i.e. pre-positively and post-positively. Theseare: a, b, t, f, k, l, m, n, h, w/ , and y/ .

    2. Letters that do not combine with some others neither in anteriornor in posterior position. This relates particularly to the lettersthat belong for their utterance to points quite close together inthe human articulatory system, such as the apical letters ( z, s, ) in relation to each other, gingival letters ( , , ),and some of the guttural letters.

    3. Letters that combine with some others in anterior position, butdo not combine in posterior position, such as the letter ( )with z, s, , , , ,

    4. Letters that combine with some others in posterior positions, butdo not combine in anterior positions, such as the letter ( ) with and ; and ( z) with and

    ibn Dunayn r's table of letter combination covers the last threegroups, excluding the first, since it is considered as being the

    baseline.32

    Immediately noticeable in his table is the needlessrepetition of letters in his treatment of the second group (i.e. lettersnon-combinable anteriorly nor posteriorly). This is due to his citing a

    certain letter against all those non-combinable with it, then citing itagain upon handling each of those letters individually. For example,he starts his table with the letter s, citing all the letters non-combinable with it anteriorly nor posteriorly. He then reiterates theletter s when he treats each of those letters non-combinable with it.Consequently, we have opted to make a table of our own (Table 1.2.),incorporating the content of ibn Dunayn r's without repetition, alongwith another table (Table 1.3.) presenting the letters in alphabeticalorder, flanked on the right-hand side by the anterior non-combinables,and on the left-hand side by the posterior ones. Besides, a third table(Table 1.4.) is given representing non-combinable letters in Arabicroots (radicals); it is based on the outcome of a comperhensivestatistical study we have conducted on five major Arabic dictionaries,foremost of which are Lis n al- Arab and al-Q m s al-Mu . al-

    32

    However, al-Kind mentions it "in the interest of making the statement most

    explicit". See al-Kind 's treatise, p.200.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    35/322

    22

    Kind 's table (Table 1.5.) has also been found useful to quote here forcomparative purposes. Together, these tables would serve to facilitatecomparison and educe the results that follow.

    Letter(s) non-combinable with it Sign Letter

    Table 1.2. Noncombinable letters (in texts) as observed by ibn Dunayn r(without repetition).

    N.B. non-combinable in anterior position (pre-positively)non-combinable in posterior position (post-positively)non-combinable in both anterior and posterior positions (pre- andpost-positively)

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    36/322

    23

    Posterior non-combinables Letter Anterior non-combinables

    Table 1.3. Noncombinable letters (in texts) according to ibn Dunayn r,arranged alphabetically (with repetition).

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    37/322

    24

    Letter(s) non-combinable with it pre-positively Letter

    Table 1.4. Noncombinable letters as demonstrated in our statisticalanalysis of Arabic roots33.

    33Extracted from al-Mu am al- Arab : dir sa 'i 'iyya lidawar n al- ur f f al-u r al- Arabiyya (The Arabic Dictionary: A Statistical Study of Letter

    Frequencies in Arabic Roots); Table no. 60, p.205.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    38/322

    25

    Resultant noncombinable bigramsLetter(s)

    noncombinable with itSign Letter

    Table 1.5. Table of noncombinable letters as observed by al-Kind

    Key: pre-positively (anteriorly)post-positively (posteriorly)neither post- nor pre-positively.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    39/322

    26

    Results of Comparison

    A. Between ibn Dunayn r's table and al-Kind 's table:Upon checking ibn Dunayn r's table against that of al-Kind , we see

    that ibn Dunayn r correctly adds one bigram of non-combinable lettersto those of al-Kind , i.e. the bigram ( ), while he incorrectly missesone, i.e. the bigram ( ).

    B. Between ibn Dunayn r's table and that of the Arabic-rootstatistical findings:

    An essential difference between the table of ibn Dunayn r (and thatof al-Kind before) and our Arabic-root table is that while the former

    deals with Arabic words just as they occur in context, the latter treatsof Arabic roots only (without affixation); hence its inclusion of non-combination cases not covered by ibn Dunayn r. This is quite natural aphenomenon because the area of non-combining letters grows widerthe narrower the word inflection becomes, and the more the word isdivested of its affixes, so much so that the non-combination scopeculminates in root-words. Conversely, the non-combining letters growless and progressively dwindle the broader the word inflectionbecomes, and the more the word is linked up with prefixes andsuffixes. Thus the scope of non-combination keeps tightening until itbecomes narrowest in words usually used in context and ordinary

    speech, regardless of their being bare, augmented, prefixed, suffixed,etc.

    As a matter of fact, al-Kind and indeed all later cryptologists,including ibn Dunayn r does not state explicitly the technique headopts in constructing his rules of non-combination. However,contextual connections show his intention to be the ordinary speech assuch. This is in evidence first from the fact that the examples heinvokes of letters that combine pre-positively only or post-positivelyonly do involve augmented as well as uaugmented words alike.Second, and this is no slight evidence, is his division of letters intobasic ( ur f 'a liyya), which are always original and form an intrinsic

    part of words; and variable ( ur f muta ayyira), which may be nowbasic and now affixing ( ur f az-ziy da) and include the well-knownaffixing letters ) those making up the Arabic word ), plus theletters: , and . His addition of these last three to the affixingletters is an extra indication that he actually intends words ordinarilyused in speech and writing, because the affixings alone do not coverall the letters that may be added to root words, so as to consummate a

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    40/322

    27

    word inflection in time, number, gender, genitive, comparison,causality, succession, and the like34.

    One more point that is crucially important to note is that these rulesof non-combination are effectively utilized in cryptanalysis so long asthe ciphertext is "spaced", that is provided with word spacers, but theypractically prove useless in no-word-spacers. That is so on account ofthe possibility then of the occurrence of two consecutivenon-combinable letters from two originally separate (but adjacent)letters, such as the occurrence of the letter ( s) at the end of a wordand the letter ( ) at the beginning of the next word, e.g. .

    In fact no-word-spacer encipherment is considered among the mostintricate types of simple encipherment, since the cryptologue then failsto make use of a good few cryptanalysis algorithms, such as initial andfinal letters of words, word lengths (bigrams, trigrams, etc.), thefrequency of the space symbol, and combination and noncombinationof letters.

    Chapter 11

    Simple Substitution

    This chapter handles encipherment by simple substitution35. It isdone by substituting for each letter the form of another, such as using

    the form of the letter (a) to mean the letter (b), and the form of (b) toindicate (a); (d) for (c) and (c) for (d), and so forth. In today'sterminology this method of encipherment is called monalphabeticsimple substitution. ibn Dunayn r here makes reference to his otherbook a ih a i i a at-tar i (The shooting star inthe science of making ciphers), where he elaborates the cryptanalysisalgorithms of this method. However, he indicates that the process hasbeen outlined earlier, meaning in Chapter 7, as part of treating thequantitative principles of cryptanalysis.

    34See al-Kind 's treatise in Volume One, p.174.

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

    see Volume One, p.144.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    41/322

    28

    Chapter 12

    Substitution Using Devised Forms

    This is a variety of monographic substitution [corresponding to themethod no.14 in al-Kind 's tree diagram], in which encipherment isaccomplished by changing letter forms into symbols not pertaining toletter forms (substitution by symbol). For example, given that a= =m , , n= , the word "man" is enciphered: .

    A possible variation of this method is to retain some of theplaintext letters beside their respective devised forms. The aboveexample may look like this: a= , m= m , n= n, and the word "man"

    becomes: mn.Cryptanalysis of this method would also entail the utilization of thequantitative expedient afore-stated.

    Chapter 13

    Simple Transposition

    ibn Dunayn r addresses three types of encipherment bytransposition. The first is the simple transposition based on changingthe relative positions of letters without changing their forms. Thismethod is easy to cryptanalyse, by restoring the letters to their originalorder through continuously re-arranging letter positions until a

    comprehensible message emerges. Most probably ibn Dunayn r'sintention here is the simplest method of transposition, i.e.transposition within a single word. Accordingly, the message: "Foldthe paper" is ciphered: "dlof eht repap".

    The second type, a composite one, is based on implementing bothtransposition and simple substitution. Undoubtedly this type is ofparamount importance, since it incorporates the core of today's mostsophisticated encipherment methods (for instance the currentinternational Data Encryption Standard (DES), and the newerAdvanced Encryption Standard (AES), both grounded on the principleof encipherment using substitution and transposition together, but

    carrying it to a higher degree of complication, using a binary numbersystem).

    ibn Dunayn r expands on the decryption of this method, first bymeans of the quantitative resource, and then by transposition. As heputs it: "If the letters are devised forms [i.e. employing simplesubstitution] and interchanged as we have already stated [i.e. bytransposition], the way for cryptanalysing them consists in the

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    42/322

    29

    utilization of the first instrument [i.e. the quantitative technique vialetter computation]. Once the cryptologue works out the letter orders[of frequency], and places each letter of the alphabet against itsdevised counterpart in the cryptogram, he interchanges their relativepositions reciprocally, shifting the letters backward and forward inrelation to one another, until they slot into place and the intendedmeaning shows up."

    36 It is such a pity ibn Dunayn r does not stateexplicitly that this is composite encipherment, nor does he give it duedeliberation, much proud as he is of understanding what others fail tounderstand for that matter!

    The third type is the encipherment by changing the position of theletter in relation to itself (i.e. its standard orientation), just by alteringthe angle of its setup (without changint its relative position within theword), assuming various angles of presentation such as writing itupside down or standing on its end.

    Example:

    A B C D E Plain

    Cipher

    OR Cipher

    Obviously, this type is so easy to unfold that "it would never missthe common sense of anyone with perceptive insight," ibn Dunayn rsays.

    Chapter 14

    Encipherment by Adding Nulls

    ibn Dunayn r's discussion of this method is something of anelaboration of al-Kind 's notions.

    37 Here two distinct cases can beidentified:

    a) Addition of nulls within the single word, by splitting it andembedding one or more nulls in between its constituent letters. Notethat nulls can be letters chosen from the alphabet, or devised forms

    irrelative to the alphabet. For Example:

    Clear: familiar

    Cipher: fazmidlizard

    36See ibn Dunayn r's book, p.100.

    37See al-Kind 's treatise, p.138.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    43/322

    30

    The nulls used in this example are the letters "z" and "d" introducedalternately after every other letter.

    The algorithm for cryptanalysing this type of encipherment, whenused in message cryptograms, is rendered through applying thequantitative tool, namely, counting the letters. If the occurrencefrequency of the letters or forms in the cryptogram is found to begreater than the typical letter frequency in the alphabet of the languageconcerned, one ascertains that they are nulls, and are left out.ibn Dunayn r says: "The cryptanalysis of this encipherment isreasoned out by calculating the forms and sorting them out. If you find

    them in excess of the letter orders, try to work out some of them bythe first expedients we have previously mentioned."

    38

    b) Addition of one or more nulls at the end of words, indicating thespace or the word spacer. ibn Dunayn r's frequent use of the word"null" in the plural indicates that he utilizes more than one null torepresent a space.

    The cryptanalysis of this type of cipher involves manipulatingthose letters that are still covert amongst others already identified. Thenulls-spacers are then dropped. As ibn Dunayn r says: "You now lookinto the letters none of which has yet shown, and seek their identical

    instances among those already puzzled out. If, by eliminating thoseletters sought for solution, the context makes sense and wordcomposition straightens, you conclude the letters left out are all nulls-spacers. When the encipherment is done using one null only, in thatcase you have already solved it ipso facto, since the single null isemployed as a word-spacer."

    39

    Chapter 15

    Cryptanalysis of Composite Cipher

    ibn Dunayn r refers to his experience in cryptanalysing a composite

    cipher that is difficult to solve. Although not expressly stated, the factthat it is of the composite type manifests itself in the example heinvokes, which is composed of the following three methods:

    38See his book, p.102.

    39Ibid., p.102.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    44/322

    31

    (a) Changing letter forms (simple substitution).

    (b) Changing letter positions (transposition).

    (c) Omitting some letters and using null forms instead.

    In this connection he says: "By changing the forms of letters,altering their positions, and at the same time omitting [certain] lettersof the alphabet to replace them with null forms, the cipher would bevery hard to solve indeed. Nevertheless, and by the good assistance ofthe Almighty, I managed to solve it straightway." 40

    Chapter 16Encipherment by Omitting a Letter

    In this chapter ibn Dunayn r explains the algorithm forcryptanalysing the method of encipherment conducted by omitting oneletter of the alphabet throughout the whole encrypted message. Itseems that the employment of this method is always concomitant withthe use of simple substitution. This is clear from ibn Dunayn r'sexposition of the method: "The cryptanalysis here lies in computingthe forms; if they are found less in number than the alphabet count,you detect them through the first expedients we have mentionedearlier in this book. Work out some letters of the cryptogram soughtfor cryptanalysis. If you notice, by seeking their identical counterpartselsewhere therein, the existence of one and the same letter omitted sothat the context does not straighten, examine the context closely andweigh up what is [purposely] omitted, as the words and import would,in all likelihood, point to it." 41

    ibn Dunayn r illustrates this method by an example, maintainingthat the purposely omitted letter is retrieved by sampling the vacancy(in several places) against all the letters of the alphabet, one by one, soas to exhaust all likely possibilities, until the dropped letter is

    determined once and for all.

    40See his book, p.104.

    41Ibid., p.106.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    45/322

    32

    Chapter 17

    Encipherment by Changing the Forms of Letters

    with Conceptual Relationship and Diffusion

    This method is analogous to the current "key-dependentencryption". In his discussion, ibn Dunayn r obviously relies on al-Kind 's ideas as cited in his treatise. 42 The fullness of the explanationthere should suffice for its reiteration here. Further, ibn Adl nconcludes his treatise with a rich practical example of cryptanalysingone variety of this method, where the relationship is bird species; eachletter being replaced by the name of a bird. 43

    1.3.1.4. Composite Encipherment

    Having demonstrated in the previous eleven chapters (7 through17) some of the simple encipherment methods and algorithms for theircryptanalysis, ibn Dunayn r shifts to discuss what he calls compositeencipherment. In eighteen chapters (18 through 35) of his book hedilates on his own perception of composite encipherment, whichdiffers from al-Kind 's and also the present-day established views onthat respect. Examining the encipherment methods that ibn Dunayn r

    terms composite, as well as those he classifies under simpleencipherment while considered composite in today's criteria, one canlist the following conclusions regarding ibn Dunayn r's perception ofcomposite encipherment:

    1. The current view of composite encipherment is that it is aproduct of simple methods combined44. This is in conformity with al-Kind 's notion, so impressively demonstrated in his treatise.

    2. In the context of addressing simple methods of encipherment,ibn Dunayn r goes (in Chapters 13, 15 and 16) to handle compositemethods, mistakenly considering them, as simple. However, he

    specifically declares earlier that composite encipherment "falls into

    42See al-Kind 's treatise, p.93, and pp. 158-160.

    43See ibn Adl n's treatise, pp.104-113.

    44-I choose to dub it "eclectic encipherment", using a wide range of cipher

    methods.- [Translator].

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    46/322

    33

    two divisions: the one is a combination of simple methods, and theother is what ensues in consequence." 45

    3. It is evident from ibn Dunayn r's book that the concept of"composition" according to him is to manipulate the letters to beenciphered in such a way as to disguise the intended meaning throughenveloping it in any device or medium that has nothing to do with thepurport aimed at. This encipherment may take a host of forms such asbuilding on a tale, a dream, a chessboard, beads, the motion of planets,or the arithmetic using decimally-weighted numerical alphabet ( is bal- ummal). In fact these methods bear no relation to composite

    ciphering, and would more correctly be associated with what is knownas "concealment cipher", which is intended to pass without beingsuspected as the conveyor of a secret communication.

    To ibn Dunayn r's credit, it should be noted, he has developed anumber of encipherment methods, which he might have taken overfrom his predecessors, and which are based on such accessory devicesas the punctured wood sheet with a thread, folded paper, colour beads,etc.

    Chapter 18

    An Overview of Composite Enciphermentibn Dunayn r seems fully conscious of the fact that the range of

    composite encipherment is so wide it is not confined to any limits;thus it is impossible to deal with all its multiplicity of forms. He statesthat what he is going to discuss is just an example for handling othercomposite instances. He argues that al-Kind has not considered theseexamples of composite encipherment and indeed so, because theyare worlds apart in their views about it. To ibn Dunayn r it is more ofa concealment cipher than proper composite encipherment, as we shallsee in subsequent chapters.

    Chapter 19

    A Preamble to Solving Composite Cipher

    Of all types of encipherment the composite type is regarded byibn Dunayn r as the most complicated. Its decryption requires a lot of

    45See his book, p.82.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    47/322

    34

    expertise and thorough training. The algorithm for cryptanalysis isattained by:

    1) Experimenting with each and every type of simpleencipherment. If, after all, the cipher remains inscrutable, it isconcluded to be composite.

    2) Experimenting with the types of composite encipherment, someof which ibn Dunayn r will mention in the following chapters.

    Chapter 20

    Encipherment by Replacing Letters with Generic Names

    ibn Dunayn r considers this method as composite encipherment,although it, in fact, belongs under simple substitution using theprinciple of conceptual relationship and diffusion. It is based on theidea of enciphering letters in terms of genera, thereby a letter can berepresented by more than one symbol. This type is analogous topolyalphabetic encipherment, but with a symbol-letter relationship,i.e. relationship of the different symbols to each letter. For instance,the letter ( a) may be enciphered using the "people" genus throughemploying any proper name to symbolize it.

    Keen to help his reader in cryptanalysing this type of cipher, ibn

    Dunayn r proposes a table of generic names (relationships)representing each letter of the Arabic alphabet, followed by a practicalillustrative example. The cryptanalysis assumes taking up the genericnames and combining the letters that they stand for.

    ibn Dunayn r suggests that this cipher defies cryptanalysis. That isprobably so, because each letter is replaced by more than one symbola process which turns void the quantitative as well as the qualitativetechniques of cryptanalysis. Furthermore, a message enciphered thisway, if put in a well-chosen context, is likely to mislead thecryptanalyst and distract his/her thought from suspecting the message

    to be a cryptogram. It is patently evident that ibn Dunayn r'sdemonstration of this type of encipherment puts him one up over hisfellow scholars for that matter. His predecessor al-Kind gives only abrief account of it46; his contemporary ibn Adl n restricts himself to a

    46See al-Kind 's treatise, p.132, and pp.158-160.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    48/322

    35

    simple example towards the end of his treatise47; whereas hissuccessor ibn ad-Durayhim makes use of his description, as can bereadily observed from the uniformity of generic denominations of ibnad-Durayhim in his treatise48 and ibn Dunayn r in this chapter.

    Chapter 21

    Encipherment Using the Arithmetic of Decimally-Weighted

    Numerical Alphabet (ADWNA)

    Or " is b al- ummal"

    Important as it is, this method of encipherment has been

    overlooked by al-Kind in his treatise on cryptanalysis, despite hisawareness of is b al- ummal, and his reference to it elsewhere49. TheAuthor of the Two Essays, however, does refer to it in his First Essay,and ibn Dunayn r seems to have quoted from him particularly the useof the "quarter" and "half" fractions.

    " is b al- ummal" is an old method of encipherment, well-knownto the Arabs at an early stage of their civilization, and was practisedlater in other languages such as Hebrew. ibn Dunayn r addresses thismethod in its two divisions, the major and the minor, expanding on itssignificant applications by developing highly relevant ways of

    ciphering that have subsequently been adopted by ibn ad-Durayhim.The following table (Table 1.6.) shows the letters of the numerical

    alphabet, with corresponding decimal numerical values in ADWNA.

    47See ibn Adl n's treatise, p.104 ff.

    48See ibn ad-Durayhim's treatise, pp.76-80.

    49As reported by ibn an-Nad m in his al-Fihrist, p.21 quoting al-Kind .

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    49/322

    36

    1 2 3 4 5 6 7 8 9

    10 20 30 40 50 60 70 80 90

    100 200 300 400 500 600 700 800 900

    1000

    x1 2 3 4 5 6 7 8 9

    1 10 100 1000

    Table 1.6. Numerical values of letters.

    Thus, the numerical cipher of the proper name , for example, canbe expressed: 7, 10, 4; or (in words): seven, ten, four.

    Equally important is that this type of encipherment is simplesubstitution, with each letter substituted by a single symbol throughoutthe cryptogram. Cryptanalysis is accomplished by utilizing thequantitative technique stated earlier.

    According to ibn Dunayn r, the concept of composition in the area-dependant decimal numerical alphabet as a "composite" method ofencipherment is predicated on making the cryptogram look like apeasant-farming financial register. The measurement is done throughadopting length units in common use at the time, such as al- ar b, al-qafz, and al- a r. The cryptogram is composed by representing theletters as land dimensions, simulating an outward semblance of

    buying, selling, or otherwise similar bargains. This, ibn Dunayn rsuggests, tends to boost the concealment of the cipher and renders iteven more difficult to cryptanalyse. He says: "If you fail to do like wehave told you as regards giving the cryptogram the semblance of afinancial register of expenditure, an episode about somebody, taking,buying or giving, you would incur a raw and unhappy [state ofaffairs], over and above an unmistakable clue to exposing the intended

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    50/322

    37

    encipherment. Otherwise, this course of action would be quaint andpretty efficient." 50

    Chapter 22

    Encipherment by Communication through Finger-Spelling,

    Using the Manual Alphabet and ADWNA

    In this type of encipherment ADWNA is instrumental in lettersubstitution; letters are replaced with numbers communicated bybending the fingers in specific shapes so as to convey to a recipientthe numerical values corresponding to the respective letters. This kind

    of esoteric communication is particularly used by those speciallyinitiated, in the presence of another who is not meant to understandthe discourse.

    Such a "manual alphabet" is an already well-known Arab signalingmethod of communication. It can assume many different shapes.ibn Dunayn r's method is based on representing the intended numberby relative finger configurations. Thus he represents the units andnumber ten, referring to other numbers by analogy. The followingtable (Table 1.7.) demonstrates the Arabic numerical alphabet, withthe corresponding values in ADWNA of the individual letters, and the

    finger configuration for each; the units being quoted fromibn Dunayn r, the rest from other sources.

    50See his book, p.116.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    51/322

    38

    Hand Letter Value Finger Configuration

    Right (a) 1 Ring finger folded and pinkie rested on it from behind.

    Right (b) 2 Little and ring fingers folded to their base in palm.

    Right ( ) 3Little, ring, and middle fingers folded to their base inpalm.

    Right (d) 4 Pinkie spread up; ring and middle fingers folded.

    Right (h) 5Middle finger folded in palm, with little and ring fingersspread out.

    Right (w/ ) 6Ring finger folded in palm, with middle finger spreadup.

    Right (z) 7 Little finger bent inside, with all the rest spread.

    Right ( ) 8 Little and ring fingers folded.Right ( ) 9 Little, ring, and middle fingers folded.

    Right (y/ ) 10 Thumb and index fingers made into a loop.

    Right (k) 20 Thumb tip placed between index and middle fingers.Right (l) 30 Index inner tip placed on thumb inner tip.

    Right (m) 40 Inner tip of thumb placed on outer tip of index finger.

    Right (n) 50Tip of thumb placed on back of index finger whilestretched out.

    Right (s) 60 Index tip placed on thumb tip.

    Right ( ) 70Tip of thumb nail placed between inner joints of indexfinger that is twisted.

    Right (f) 80 Thumb tip placed in the index joint towards its tip.Right ( ) 90 Index-finger tip placed on thumb tip.

    Left (q) 100Index-finger tip placed in joint of thumb while spreadout.

    Left (r) 200Thumb tip placed between index and middle fingerstowards their base.

    Left ( ) 300 Inner tip of index finger joined to inner tip of thumb.

    Left (t) 400 Inner tip of thumb placed on outer tip of index finger.

    Left ( ) 500Tip of thumb placed on back of index finger whilestretched out.

    Left ( ) 600 Index tip mounted on thumb tip.

    Left ( ) 700Tip of thumb nail placed after inner joints of indexfinger that is twisted.

    Left ( ) 800 Thumb tip placed in the index joint towards its tip.

    Left ( ) 900 Index-finger tip placed on thumb tip.

    Left ( ) 1000Pinkie folded to its base in left palm, with ring fingermounted on it.

    Table 1.7. Finger-spelling (dactylology) using ADWNA

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    52/322

    39

    Chapters 23 & 24

    Encipherment by "Composing" Letters on the Chessboard

    This method is based on simple substitution. It is originallyintended to address someone who is present, but can also be employedto communicate with absent people a method which ibn Dunayn rcredits to himself, maintaining that he establishes the precedent for it.His explanation is lucid enough to spare any elucidation. Onenoteworthy remark here is that ibn ad-Durayhim, in his Mift al-kun z f ' al-marm z, seems to have taken over this method from

    his predecessor ibn Dunayn r.51

    Chapter 25

    Cryptanalysis of Cipher "Composed" on the Arithmetic of

    Decimally-Weighted Numerical Alphabet (ADWNA)

    ibn Dunayn r asserts, right from the outset, that this type of cipheris "very easy to cryptanalyse," 52 and rightly so, because that kind ofarithmetic was then widespread and in common use. The cryptanalysisis effected by reconstructing letters against their correspondingnumbers in ADWNA. It is interesting to remark here thatibn Dunayn r discusses encipherment using ADWNA twice in his

    book, but he has not been consistent in the symbols he uses to denotethe orders of tens, hundreds, and thousands. While in the first instance(that composed on area) he uses numbers with super-dots to indicatethe tens order, and numbers with under-dots to indicate the hundredsorder, he in this chapter opts to use numbers preceded by one circle toindicate the tens, two circles to indicate the hundreds, and three circlesto denote the thousand. Nevertheless, it is understood that the circleshere are equivalent to the dots there.

    Moreover, ibn Dunayn r observes the nicety that is b al- ummalis basically one of three varieties of the Hindi calligraph (cipheralphabet). In his words: "The algorithm is to place each letter of the

    alphabet against its Indian decimal numerical equivalent in thesystem Consequently, if you wanted to encipher the statement

    51See ibn ad-Durayhim's treatise, p.66.

    52See his book, p.124.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    53/322

    40

    by this method, you would have to replace the letters withtheir corresponding Indian characters"53.

    ibn Dunayn r's description of this method as easy to solve may bemeant to serve as a preamble to what he is about to develop in the nextchapter. Through the introduction of sophisticated improvements thisencipherment turns out to be complicated and difficult to decrypt. Thisfact is attested by his repetition in the following chapter of the sameillustrative example " ", probably to enable the reader toappreciate how far the method has been developed.

    Chapter 26Encipherment by ADWNA Using Further

    Numerical Processing

    Though simple substitution in substance, this method of ciphering,which is credited to ibn Dunayn r as its originator, is extremelyimportant in terms of its content and effect. Its importance stemsespecially from the fact that it lends itself to a special numericalprocessing, through arithmetical operations governed by a set rule,that makes it assume more complicated forms. This may berepresented by the following model (Figure 1.2.).

    Figure 1.2.Encipherment by numerical processing using ADWNA.

    Numerical processing involves making the representative numberstwo, three, four, etc. times as great in value, thus increasing thedifficulty of cryptanalysis. For example, we encipher the phrase as follows:

    53See his book, p.124.

    TheCleartext(LETTERS)

    Substitutionof Numbers

    for Letters

    NumericalProcessing

    Resubstitutionof Numbersfor Letters

    TheCipher-text(CRYPTOGRAM)

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    54/322

    41

    Cleartext Numerical

    value inADWNA

    100 10 80 6 400 30 1 10 30 6 5 30 30 1

    Enciphermentby doublingthe number(twofold)

    200 20 160 12 800 60 2 20 60 12 10 60 60 2

    Reconversionto letters

    Enciphermentby

    quadruplingthe number(fourfold)

    400 40 320 24 1600 120 4 40 120 24 20 120 120 4

    Reconversionto letters

    Fully awake to the significance of this method, ibn ad-Durayhimlater takes up this method from where ibn Dunayn r left off,developing it and further expanding on it. He makes the numericalprocessing take other forms by breaking up the number into a sum oftwo or more numbers of various choices, each corresponding to its

    respective letter in ADWNA. For instance, enciphering the propername this way gives:

    Plaintext Numerical value in ADWNA 4 40 8 40

    Numerical processing of one choice (3+1) (10+30) (6+2) (10+30)

    Corresponding letters

    Numerical processing of another choice (2+2) (20+20) (7+1) (20+20)54

    Corresponding letters

    It is well worth emphasizing that although far more sophisticatednumerical processing is used in cipher algorithms nowadays, this

    54See ibn ad-Durayhim's treatise, pp.24-25 and p.68.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    55/322

    42

    method forms, in principle, the basis of many algorithms inpresent-day cryptography.

    Chapter 27

    Encipherment by Substituting For Letters the Days of

    the Week and Hours

    In this type of encipherment the cryptogram is "composed" on theseven days of the week, by coining seven words that cover all theletters of the Arabic alphabet in such a way as to avoid the repetitionof any of them. The words are then associated with the days of theweek one apiece, assigning to each letter of the cryptogram a specific

    hour of the day. ibn Dunayn r elucidates this method by encipheringthe phrase: as follows (with a slight change, as most of theseven words in the original Arabic manuscript are illegible):

    Days ofthe week:

    Friday Saturday Sunday Monday Tuesday Wednesday Thursday

    Coinedwords:

    Numberof letters

    5 + 4 + 5 + 4 + 3 + 4 + 3 = 28

    +++++++=

    = the second hour of Friday = the last hour of Sunday = the second hour of Wednesday = the second hour of Thursday = the first hour of Tuesday = the last hour of Sunday = the last hour of Sunday = the last hour of Wednesday

    ibn Dunayn r concludes by establishing that "the algorithm ofcryptanalysing such ciphers is pursued through the application of the

    quantitative expedients, namely by computing the order of letteroccurrence frequencies. This type of encipherment is mostconveniently performed by way of a tale." 55

    55See his book, p.128.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    56/322

    43

    Chapter 28

    Encipherment by Folded Paper

    This method of encipherment is not based on letter substitution, buthas more the appearance of a concealment than real cipher. Oneshould think, in all probability, that ibn ad-Durayhim has picked it upfrom ibn Dunayn r. 56 It is more or less similar to a cryptographicdevice that dates back to the Spartans of ancient Greece, as early asthe fifth century B.C., called the "skytale", which is "the earliestapparatus used in cryptology and one of the few ever devised in thewhole history of the science for transposition ciphers." 57 The idea is

    to write the secret message down a narrow strip of papyrus orparchment wrapped round a staff of wood close-packed, with edgesmeeting uniformly at all points. The parchment is then unwound andsent on its way. The disconnected letters and fragments make no senseunless the parchment is rewrapped (by the recipient) round a baton ofthe same thickness as the first, thus forming the message. Thedecryptor of today, however, would make short work of such asystem.

    Another related encipherment method is achieved by writing thesecret message on a sheet of paper folded in pleats, and concealed byunfolding it, filling up the spaces by adding extra letters that, together

    with the original letters of the cryptogram, make new innocent-looking context of different import from the one intended.

    Chapter 29

    Encipherment by a Punched Board

    Much as this method employs a device, it belongs under simplesubstitution cipher. Encipherment is achieved by puncturing holes, ina sheet of wood, equal in number to the language letters (28 forArabic), not necessarily arranged alphabetwise but according to anagreed succession. The cryptogram is represented by a thread driventhrough the intended holes, marking a route which defines the letters

    of the message. The recipient reads the letters represented by the holesthrough which goes the thread. Obviously, decrypting this kind of

    56See ibn ad-Durayhim's treatise, p.82.

    57Kahn, D. The Codebreakers, New York: Macmillan, 8th printing, 1976, p.82; and

    Gaines, Helen Fouch Cryptanalysis: A Study of Ciphers and their Solutions,New York: Dover Publications, 1956, p.14.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    57/322

    44

    cipher depends on the quantitative technique, explained by ibnDunayn r so fully as to make any addition here redundant.

    Chapter 30

    Encipherment by Coloured Beads

    This method uses beads distributed, according to their colours,among the letters of the alphabet. Encipherment is done by threadingor "composing" letters represented by beads on a string as a rosary, inwhich the succession of colours tallies with the succession of letters ofthe text to be enciphered. Note that colour-bead encipherment can take

    numerous methods, as ibn ad-Durayhim later states in his Mift al-Kun z: "This type gives rise to scores of ramifications." 58

    The algorithm for cryptanalysing this cipher is also through theemployment of the quantitative technique of counting the frequency ofcoloured beads against each letter.

    ibn Dunayn r's method of coding, however, is by no meanseconomical; alternative methods can be utilized, pursuing an agreedrule, to produce the same result with a fewer number of beads. Morsecode (alphabet) is a case in point much in evidence; with just a coupleof colours the Code permits the representation of the whole gamut ofletters.

    Chapter 31

    Encipherment by Concealment within Context

    In this method the true message is "concealed" within anothercontext by spreading the intended words at the beginning, middle, andend of lines, according to some rule known only to the sender and therecipient.

    To exemplify this let us agree that the message is to be readclockwise starting end first. The concealed message would read:"Don't just stand there, do something":

    There's a lot to say and do before I leave, darling. Say something;

    stand before me. Let's just not forget our love; please don't.

    58pp. 80-82.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    58/322

    45

    Chapter 32

    Encipherment by Letters Embedded in Words

    The message is "composed" on the words of a written epistle,conformably with a fixed rule. This can be accomplished by taking thefirst, second, last, etc. letter of each word. The following exampledemonstrates enciphering the name in this way twice: the oneby taking the last letter, the other by taking the first.

    ibn ad-Durayhim later handles this method down to the smallest

    detail, citing several varieties and giving many examples. 59

    Chapter 33

    Encipherment by Reversing Letter Order of a Word

    This type comes under encipherment by transposition, and isperformed by writing each word of the cryptogram in reverse order. 60 The name , for example, is enciphered: and (plain)= (cipher). It would have been more accurate if ibn Dunayn r were

    to classify this method under simple rather than compositeencipherment. We do not know for certain the reason for his choice,but it is probably motivated by a personal confused definition ofcomposite encipherment.

    Chapter 34

    Encipherment by Numerical Calculations

    This method is closely akin to the method of encipherment"composed" on area (Chapter 21), with the slight difference ofemploying whole dinars for the units order, fractions of quarters of thedinar for the tens, fractions of halves for the hundreds, and fractions ofboth halves and quarters for the thousands. It seems likely thatibn Dunayn r has taken this method from the Author of the Two

    59See his treatise, pp.26-27 and p.70 ff.

    60This type of encipherment has been later handled by ibn ad-Durayhim in more

    detail and diversification. See his treatise under the "transposition" type ofencipherment, p.56 ff.

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    59/322

    46

    Essays (in his First Essay). In both manuscripts, however, thetranscription suffers much from corruption and misrepresentation,owing to omission on the part of the scribes. It might be for thisreason that ibn ad-Durayhim does not make any reference to thismethod in his treatise. Indeed we have managed, by studying theexamples in both manuscripts, to make out the following correct formof ibn Dunayn r's example illustrating this method:

    dinar

    1 2 3 4 5 6 7 8 9

    quarters of the dinar, indicatingthe number times 101 2 3 4 5 6 7 8 9

    halves of the dinar, indicatingthe number times 1001 2 3 4 5 6 7 8 9

    Three-quarters of the dinar, indicating the number times 1000

    1

    Thus, the proper name , for instance, can be enciphered:

    1 3 7 5 2 4 4 8 1

    quarter Quarters quarters quarters dinars dinars quarters dinars dinar

    Chapter 35

    Encipherment by Conditions of planets

    and Other Celestial Bodies

    With this chapter ibn Dunayn r concludes his discussion of proseencipherment. Here the cryptogram is "composed" on an astronomicaltext addressing planets and other heavenly bodies: their motions,distances, durations, mansions, revolutions, rotations, etc. He bringsforth an example of enciphering the name by this method:"Having completedforty revolutions, the Moon eclipsed at such andsuch degrees of such and such constellation. Eight revolutions thenceremained. Its motion straightened after it had waned in appearanceand faded in colour. Thereafter it moved to Sagittarius and completedforty revolutions thus far. At the end of Sagittarius the planet Venusapproached it. Four turns elapsed before its motion evened out in

  • 8/7/2019 Arabic Origins of Cryptolog Vol. 4

    60/322

    47

    orbit, and its light became as bright as to emulate planets".61 It is clearthat the algorithm for cryptanalysis lies in the realization of the letterscorresponding to the numbers [set in boldface] in ADWNA.

    ibn Dunayn r attributes this type of encipherment to HermesTrismegistus of wisdom and learning, the legendary author ofmystical, astrological and alchemical works, and one of seven wisemen known to have possessed calligraphs of their own, barred off toall but the "sons of wisdom", hence the epithet "hermetic" (in English)or "hermetique" (in French), meaning completely sealed or imperviousto external influences. Many ciphers were ascribed to Hermes; ibn

    Wa iyya an-Naba , in his awq al-mustah m f ma rifat rum z al-'aql m (The seeker's joy in identifying the written symbols oflanguages) gives a detailed account of the Hermetic calligraphs.

    ibn Dunayn r concludes this chapter by pointing out the followingtwo notions:

    1. that "the cryptanalyst of this cipher should be knowledgeableabout arithmetic and astron