## Section1.2Arabic Numerical Ciphers

Mathematics played no role in the ciphers we examined in the previous section. In fact math played no role in cryptology at all until Arabic scholars 1  performed basic data analysis on the Arabic language in the 9th century CE. They quickly realized that their observations could be used to break the basic ciphers we have been considering. However, that is a topic for the next chapter.

When math historians, or historians in general, speak of Arabic scholars it is a reference to the language and not the ethnicity or location of the scholars.

In this section we will introduce some other work done by Arabic scholars. [12, vol. 3] We are going to look at some methods of enciphering text by first changing the text to numbers, some of these methods today would be called affine ciphers.

They began by associating each letter of the alphabet with a number in a manner similar to the following:

Once this is done there are then a variety of ways in which we may encipher our message. Carefully read through these passages from ibn ad-Durayhim's treatise written in the $12^{th}$ century CE; try to get an idea of how his encipherments worked before going on.

"5. On the replacement of letters using the decimally-weighted numerical alphabet:

• By substituting decimal numerical alphabet for letters in four different ways: by writing the numbers in words as pronounced; or by finger-bending, using the fingers to communicate the message visually to a recipient; or by writing the numbers as numerals such as writing (mhmd: forty, eight, forty, four); or by giving the cryptogram a semblance of a page of a financial register.
• By recovering the cryptogram numeral into a number of letters - a method of encipherment which involves more sophistication. There are many combinations that can be used in this method; for example in (mhmd: jl, fb, jl, ca) or (kk, ga, kk, bb) . One can even form delusive words such as (mhmd: lead, cad, deal, baa), or substitute two words for a letter, e.g. (ali: $\overline{dig\ fad}\text{,}$ $\overline{cab\ ab}$), in which case a line is to be drawn over two words to denote that they represent one letter.
• By multiplying the number representing the letter by two, and so write (mhmd: q, jf, q, h) and (ali: ob, jh), etc; or multiply it by three, thus writing (mhmd: sk, kd, sk, jb) and (ali: rc, kg). Numbers can also be multiplied by four or five."  2  [12, vol. 3, pp. 69-70]
The examples here are very loosely based on the Arabic examples in the translation. The "mhmd" is Mohamed since Arabic is written without vowels, and for "ali" the a and l together are treated as a single letter.

Comprehension Check: (Be sure to reference Table 1.2.1 as you try to answer these questions.)

• In the first paragraph how did mhmd become forty, eight, forty, four?
• In the second paragraph above, how did the author derive jl from m or $\overline{cab\ ab}$ from i$\ \text{?}$
• When converting letters to delusive words, m was enciphered as lead and deal, how did this work? Can you find another word to encipher it as?
• What letter(s) would be easier to translate into a variety of words? Which letters would be harder to change into words?
• In the third paragraph why is the m enciphered as a single q in the first example, but requires two letters, sk in the second?

Demonstrate your understanding of the systems above by enciphering "ibex" using each of the methods described above.

1. By writing the letters as numerals.
2. By writing letters in combinations of two or more letters.
3. By tripling the values of the letters.
Hint

For all of these the first step is to use Table 1.2.1 to translate the letters to numbers. Then you will need to in some way manipulate those numbers and/or translate them back to words and letters using the table. How specifically this happens depends on the cipher method, also for some methods there will be more than one answer.

1. NINE TWO FIVE SIXHUNDRED
2. HA AA CB VT
3. KG DB JE ZXV

Encipher the word "tan" by doubling the values of the letters. In how many ways do you think you can encipher each letter if you are allowed to use up to four letters to represent each letter?

Hint

As an example b doubled is 4 which we could represent as a D or as AC or as CA or as BB (though the last one is kind of silly). Also, remember that you will need to use Table 1.2.1.

There are multiple possible encipherments, a couple are V B S and another is QUK AA JJOK.

The following cipher text was enciphered using one of the above ciphers.

YU II J S JH ZT B J V V SK X S H J SQ T V B S H YU
IG B SU GAJ T JF B SM QO FD S JH OM JD UT KS EC B
ZX OO SLN V QS XVUS RJU SK EC J DB HJ H J YU JF B
QKU UY JH O MK FJ B XZ YVU J MO SU KS Q SQ RPK MQ
XV HJ O SK NP M D B F M NP Q B SQ M JF B VZT WXU B Q

Hint
• The message is a quote from a famous Arabic poet and mathematician.
• There is at least one letter substitution which by necessity is always the same.
• Each pair or triple of letters represents only a single plaintext letter.
• The order of a pair or triple of letters doesn't change which letter it enciphers.
• As before you will need Table 1.2.1.

“When I want to understand what is happening today or try to decide what will happen tomorrow, I look back.” - Omar Khayyam

Enciphering by forming delusive words is potentially useful but also can also be very hard. See if you can convert the word “math” to delusive words.

Hint

Recall that before we could encipher “m” as either “LEAD” or “DEAL” this way. And, as with all of the ciphers here, you need to use Table 1.2.1.