return

Celebratio Mathematica

A. Adrian Albert

Some mathematical aspects of cryptography

by A. A. Albert

1. Introduction

The idea of con­nect­ing cryp­to­graphy with math­em­at­ics is not new, but it has not been ex­ploited in the lit­er­at­ure of either sub­ject to the ex­tent of the present pa­per. Our top­ic should be a timely one not only be­cause of the present pub­lic in­terest in any­thing con­nec­ted with our war ef­fort, but also be­cause of the cur­rent ever in­creas­ing use by sci­ent­ists1 of the con­cepts of mod­ern ab­stract al­gebra.

We shall present here a math­em­at­ic­al for­mu­la­tion of a gen­er­al the­ory of crypto­logy2 with de­tailed ap­plic­a­tion to cryp­to­graphy. In this, we shall see that cryp­to­graphy is more than a sub­ject per­mit­ting math­em­at­ic­al for­mu­la­tion, for in­deed it would not be an ex­ag­ger­a­tion to state that ab­stract cryp­to­graphy is identic­al with ab­stract math­em­at­ics.

Our for­mu­la­tion will per­mit a rap­id present­a­tion of the meth­ods of cryp­to­graphy in com­mon use, and we shall show that all of these meth­ods are very spe­cial cases of the so-called al­geb­ra­ic cipher sys­tems. These lat­ter cipher sys­tems are en­tirely prac­tic­al in the simple cases, and we hope that our present­a­tion will des­troy the be­lief of many crypto­lo­gists that they are “only prac­tic­al provid­ing a ma­chine is used.”3

2. Cryptography as a theory of non-singular mappings

The func­tion concept has been de­scribed fre­quently as a uni­fy­ing concept for col­legi­ate math­em­at­ics. Ele­ment­ary func­tions are usu­ally giv­en by for­mu­las y=f(x), but this sort of defin­i­tion is not al­ways pos­sible and only makes sense in an en­vir­on­ment in which the ne­ces­sary ad­di­tion­al as­sump­tions are pre­sup­posed for all the func­tions con­sidered. Let us then for­mu­late the concept in com­plete gen­er­al terms.

Con­sider a set M con­sist­ing of any ob­jects whatever and call these ob­jects the quant­it­ies of M. (They might be num­bers or phys­ic­al ob­jects or even math­em­at­ic­al con­cepts!) We let x be a sym­bol which is per­mit­ted, dur­ing our dis­cus­sion, to rep­res­ent any quant­ity of M, so that we call x a vari­able whose range is M. Let N be a second set of quant­it­ies and set up a cor­res­pond­ence (1)xS(x) (read x goes to S(x)) whereby every x in M de­term­ines a unique S(x) in N. Then the sym­bol u=S(x) is a second vari­able, with N as its range, and we are ac­cus­tomed to say that the cor­res­pond­ence defines u as a func­tion of x.

Thus, a func­tion of x really con­sists of two sets M and N and the cor­res­pond­ence S giv­en by (1) of the quant­it­ies x of M on their im­ages S(x) in N. It will be bet­ter for our pur­poses to de­scribe this situ­ation by simply speak­ing of S rather than the func­tion, and we shall call S a map­ping of M on N.

Sup­pose that there is also a map­ping T giv­en by (2)uT(u) on N to M, so that every u of N de­term­ines a unique T(u) in M. Then we let T be such that if u=S(x), the quant­ity T(u)=x. In this case, the map­ping S is called a non-sin­gu­lar map­ping. T is called its in­verse, and we in­dic­ate this by writ­ing T=S1.

Cryp­to­graphy is the study of all non-sin­gu­lar map­pings S on M to N where M is the set of a mes­sages x and N is the set of all cryp­to­grams S(x). The map­pings are called cipher sys­tems. If a mes­sage x and a cipher sys­tem S are giv­en, the pro­cess of the ap­plic­a­tion of S to x, so as to ob­tain the cryp­to­gram S(x), is called the en­cipher­ment of x. When S and S(x) are giv­en, the pro­cess of the ap­plic­a­tion of S1 to the cryp­to­gram S(x), so as to ob­tain the mes­sage x, is called the de­cipher­ment of S(x).

There are many math­em­at­ic­al situ­ations in which it is pos­sible to de­term­ine a map­ping S on M to N from a giv­en list of a fi­nite num­ber of quant­it­ies x in M and their im­ages S(x) in N. However we wish to pro­pose the more dif­fi­cult prob­lem of de­term­in­ing S (and hence each x) from a giv­en fi­nite set of cryp­to­grams S(x). We use this in the defin­i­tion of crypt­ana­lys­is as the the­ory of those struc­tur­al prop­er­ties of mes­sages, cryp­to­grams, and cipher sys­tems which are re­quired in or­der to solve all prob­lems (which per­mit a solu­tion) of the kind above. The solu­tion of such a prob­lem is called the de­crypt­ment of its cryp­to­grams, and so crypt­ana­lys­is is the study of the meth­ods of de­crypt­ment. Crypto­logy is the sub­ject com­pris­ing both cryp­to­graphy and crypt­ana­lys­is. However, we shall be con­cerned only with the first of these two branches here.

3. Cipher systems on components, and codes

It is clear from what we have said that the most prim­it­ive cipher sys­tem would be simply a list of all the mes­sages to be used and an ad­ja­cent list of cor­res­pond­ing cryp­to­grams. However, some more soph­ist­ic­ated cipher sys­tems are de­scrib­able, as is the case for some math­em­at­ic­al func­tions, by for­mu­las. These for­mu­las will ex­press the cryp­to­gram S(x) in terms of the res­ult of ap­ply­ing the cipher sys­tem S to what we shall call com­pon­ents of the mes­sage x, and we shall for­mu­late this new concept.

The term mes­sage has not been in­ter­preted thus far but we now con­ceive of it as any se­quence of a fi­nite num­ber of sym­bols which are either let­ters, peri­ods, or com­mas and the like. We now par­ti­tion the mes­sage in­to blocks of sym­bols called com­pon­ents. The mes­sage x will then be­come a se­quence of com­pon­ents, each con­sist­ing of a group of sym­bols of the mes­sage x. These oc­cur in the com­pon­ent in the same or­der as in x. Also the or­der of the com­pon­ents them­selves is fixed by the or­der of the sym­bols in x. The com­pon­ents may be simply the words of x, or its sen­tences, or simply blocks of a fixed num­ber of let­ters. In the lat­ter case the fi­nal block may not con­tain enough let­ters to sat­is­fy the giv­en defin­i­tion. Then it will be ne­ces­sary to ad­join let­ters, called nulls, to bring up the num­ber of let­ters to the re­quired amount.

Sup­pose now that a mes­sage x has been broken up in­to n com­pon­ents where n is a pos­it­ive in­teger. Let i be any in­teger from 1 to n and let the sym­bol xi rep­res­ent the i-th com­pon­ent of x. Then we may rep­res­ent this situ­ation by writ­ing x in the fol­low­ing nota­tion (3)x=[x1,x2,,xn]. We wish also to use cipher sys­tems S which re­place x by se­quences (4)u=S(x)=[u1,u2,,um]. Here, the cryp­to­gram u has been broken up in­to m com­pon­ents of some pre­scribed kind and neither the pos­it­ive in­teger m nor the kind of com­pon­ents uj (j=1,,m) need be the same as for x.

The most prim­it­ive for­mula for a cipher sys­tem in terms of (3) and (4) is giv­en by (5)S(x)=[T(x1),T(x2),,T(xn)], where T is a non-sin­gu­lar map­ping on the set M0 of the com­pon­ents (of a pre­scribed kind) of mes­sages to the set N0 of com­pon­ents of cryp­to­grams (also of pre­scribed kind). The code is such a cipher sys­tem. Here, the com­pon­ents of x are the words, M0 is the set of all words in all the mes­sages which will be used, N0 is the set of all the words in all the res­ult­ing cryp­to­grams, T is a non-sin­gu­lar map­ping on M0 to N0.

In de­scrib­ing cipher sys­tems where more of a cipher sys­tem is to be giv­en by the for­mula and less by aux­il­i­ary map­ping, the nature of the com­pon­ents uj of the cryp­to­gram (4) may de­pend both on the nature of xi in x and also on its po­s­i­tion in the mes­sage, which we have in­dic­ated by its sub­script i. But then a for­mula de­scrib­ing the cipher sys­tem would de­pend upon the length n of the mes­sage x, and we are study­ing for­mu­las in­de­pend­ent of x. We may achieve our end, however, by the ad­junc­tion of new com­pon­ents, which are nulls, to bring up the num­ber of com­pon­ents to a fixed max­im­um pre­scribed in ad­vance. It may also be achieved in a some­what more prac­tic­al way by the use of (5) and the fact that each xi may it­self be re­garded as be­ing a mes­sage, the set of all mes­sages to con­sidered is now the set M0 or our com­pon­ents, T is a cipher sys­tem. But we may pre­scribe a par­ti­tion­ing of x. If we then define com­pon­ents for our mes­sage so that each com­pon­ent xi per­mits a fur­ther sub­di­vi­sion in­to sub­com­pon­ents xi1,, xiν, with ν the same for each i, the cipher sys­tem T will op­er­ate on mes­sages all of the same num­ber of com­pon­ents.

We have now seen how to lim­it our study to cipher sys­tems on mes­sages (3) for a fixed n, and we shall do this.

4. Transposition ciphers

A trans­pos­i­tion cipher is simply a cipher sys­tem giv­en by (3) and (6)S(x)=[xi1,xi2,,xin], where i1,,in is any per­muta­tion (i.e., re­arrange­ment) of the in­tegers 1,2,,n. This may be ac­com­plished most ef­fect­ively in the gen­er­al case by simply writ­ing the mes­sage and the per­muta­tion and then read­ing off the cryp­to­gram in the form: (7)Plain Textx1x2xnCipher System12niii2inCryptogramxi1xi2xin

To de­cipher such as mes­sage, we read up in the cipher sys­tem to ob­tain its in­verse, and then have: (8)Cryptogramu1u2un,Inverse Cipher12njij2jnMessageuj1uj2ujn For ex­ample, we may write: Plain TextINTHATPRECEDINGCipher System123456789101112131415711518131491526101243CryptogramPEAIRINEGNTCDHTInverse System123456789101112131415410151431115812213679 which we ap­ply to ob­tain the ori­gin­al mes­sage.

There are many devices for ac­com­plish­ing trans­form­a­tions of this kind but none of them can do more than what we have in­dic­ated above. They may need to be stud­ied in crypt­ana­lys­is but surely are not worth­while ad­di­tions to cryp­to­graphy. It would seem that their only pos­sible value in this lat­ter sub­ject is that they may be re­l­at­ively easy to re­mem­ber. However, the most prim­it­ive of them are worth­less, and the more com­plic­ated ones are not as easy to re­mem­ber as the fol­low­ing device.

Let us mem­or­ize any sen­tence and write it with a num­ber be­low each let­ter from 1 to the num­ber n of let­ters in the sen­tence. We then put num­bers be­low those ac­cord­ing to the al­pha­bet­ic­al or­der of the let­ters, giv­ing re­peated let­ters con­sec­ut­ive num­bers. The trans­pos­i­tion cipher sys­tem ob­tained in this way may be writ­ten down rap­idly, and is usu­ally much more gen­er­al in its struc­ture than those spe­cial sys­tems in com­mon use. For ex­ample, we have KeyANEFFORTSHOULDCipher1234567891011121314114691015171918111620124KeyBEMADECipher1516171819203713258

5. Products of cipher systems

If S is a non-sin­gu­lar map­ping xu=S(x) on M to a set N and T is a non-sin­gu­lar map­ping uT(u) on N to a set L the cor­res­pond­ence (9)xV(x)=T[S(x)] is a non-sin­gu­lar map­ping V on M to L. However, it may be more con­veni­ent to com­pute V(x) by first com­put­ing u=S(x), and then T(u), rather than V(x) dir­ectly. We shall call V the product ST of the map­pings S and T.

In cryp­to­graphy it is fre­quently pos­sible to think of cryp­to­grams them­selves as be­ing mes­sages, and thus study cipher sys­tems which are non-sin­gu­lar map­pings on M to M. But then the product ST of a cipher sys­tem S by a cipher sys­tem T is an­oth­er cipher sys­tem.

It is also pos­sible fre­quently to break down a cipher sys­tem in­to a product of sim­pler ones. This is usu­ally done in ana­lyz­ing cipher sys­tems, and much of our dis­cus­sion will be con­cerned with a de­scrip­tion of these sim­pler sys­tems rather than the more com­plic­ated sys­tems de­riv­able from them by the product op­er­a­tion de­scribed above.

It should be ob­served that the op­er­a­tion of product of map­pings is as­so­ci­at­ive, that is, (ST)U=S(TU) for any three map­pings S, T, U. In­deed, both of these map­pings are the same cor­res­pond­ences xU{T[S(x)]}. However the op­er­a­tion is not com­mut­at­ive and in­deed  TS may not even be defined. But even if S and T are map­pings on M to M, so that ST and TS are also map­pings on M to M, they may be dif­fer­ent. For ex­ample, let M con­sist of the sym­bols 1,2,3;  S be the cor­res­pond­ence 12, 23, 31; T be the cor­res­pond­ence 12, 21, 33. Then ST is giv­en by 11, 23, 32, and TS by 13, 22, 31.

6. The role of the ring in a cipher alphabet

It is fre­quently de­sir­able in cryp­to­graphy to use an in­ter­me­di­ate set N and so con­struct a cipher sys­tem S as the product TUT1, where T is a non-sin­gu­lar map­ping on the set M of all mes­sages to the in­ter­me­di­ate set N, U is a non-sin­gu­lar map­ping on N to N. Let us then write x=[x1,,xn], for com­pon­ents xi of our mes­sages x, and sup­pose that T is such that (10)u=T(x)=[u1,,un],ui=T0(xi). Here, T0 is a non-sin­gu­lar map­ping on the set M0 of all com­pon­ents of mes­sages, to a set N0 whose quant­it­ies are at our choice. Then u is formed as the se­quence above and we have (11)T1(u)=[T01(u1),,T01(un)]. We ap­ply a second trans­form­a­tion U on N to N and have (12)U(u)=[v1,,vn], so that (13)S(x)=[T01(v1),,T01(vn)]. Let us call the set N0, to­geth­er with the map­ping T0, a cipher al­pha­bet.

The cipher al­pha­bet is in­tro­duced to sim­pli­fy the de­scrip­tion of S. In par­tic­u­lar we may use a math­em­at­ic­al num­ber sys­tem A for the set N0 and so have a set N0 in which ad­di­tion and mul­ti­plic­a­tion of its quant­it­ies are defined. It may then be a very simple mat­ter to give for­mu­las for the map­ping U and to give T0 ex­pli­citly. However the con­sequent de­scrip­tion of S in terms of mes­sages alone would usu­ally be ex­tremely com­plic­ated.

The only sets A of which we shall use are the sets called com­mut­at­ive rings: A ring A is a set of quant­it­ies for which the sum a+b and the product ab of any a and b in A are quant­it­ies of A such that (14)a+b=b+a,(a+b)+c=a+(b+c),a(bc)=(ab)c,(15)a(b+c)=ab+ac,(b+c)a=ba+ca, for every a, b, and c of A. Moreover we as­sume that for every a and b of A there is a unique solu­tion x in A of the equa­tion (16)a+x=b. We call A a com­mut­at­ive ring if it is also true that (17)ab=ba for every a and b of A.

In every ring, there is a unique zero quant­ity 0 such that (18)a+0=a, for every a of A, and a unique quant­ity a, called the neg­at­ive of a, such that (19)a+(a)=0. Then in (15) we have x=b+(a). It can be shown that the prop­er­ties we have as­sumed im­ply that (a)=a, (a)b=a(b)=(ab), (a)(b)=ab for all quant­it­ies a and b of A.

The fa­mil­i­ar num­ber sys­tems con­sist­ing of all ra­tion­al num­bers, of all real num­bers, and of all com­plex num­bers are ex­amples of com­mut­at­ive rings. These rings are all fields, that is, com­mut­at­ive rings A with the prop­erty that if a and b are in A and a is not zero there is a unique solu­tion x in A of the equa­tion (20)ax=b. This quo­tient x has a prop­erty like the dif­fer­ence x=ba which is the solu­tion of (15). First there is a unity quant­ity 1 in A such that (21)1a=a1=a, for every quant­ity a of A. Also every a0 has a unique in­verse a1 such that (22)aa1=a1a=1, and then x=ba1.

The set of all in­tegers, and the set of all poly­no­mi­als f(λ) in a sym­bol λ with ra­tion­al coef­fi­cients, are both com­mut­at­ive rings with a unity qual­ity. But they are not fields.

7. Residue class rings in cipher alphabets

Let us now sup­pose that the com­pon­ents xi of a mes­sage x in its rep­res­ent­a­tion (3) as se­quence, are let­ters of the al­pha­bet, and per­haps oth­er sim­il­ar sym­bols like peri­ods or com­mas. Then, the set M0 of all pos­sible com­pon­ents is a fi­nite set and we shall wish to map it on a ring N0, also with a fi­nite num­ber of quant­it­ies. Let us then pro­ceed to define cer­tain very simple fi­nite rings.

The quant­it­ies of our new rings will not be or­din­ary in­tegers but classes of in­tegers. The read­er is already fa­mil­i­ar with the clas­si­fic­a­tion of in­tegers in­to two classes, namely, the class of all even in­tegers, and the class of all odd in­tegers. For these classes we have the rules that even+even=even,even+odd=odd+even=odd,even×odd=odd×even=even,odd×odd=odd. Then we may rep­res­ent the class of all even in­tegers by 0, the class of all odds by 1, and we have a ring of two ele­ments with the laws 0+0=0=1+1,1+0=0+1=1,(23)00=01=10=0,11=1.

We shall define sim­il­arly a ring Am of m classes of or­din­ary in­tegers, for every fixed in­teger m>1. If a is any in­teger there are in­tegers q and r such that (24)aqm=r, where the re­mainder r is one and only one of the in­tegers (25)0,1,2,,m1. Let us call two in­tegers a and b con­gru­ent and write (26)ab, if the cor­res­pond­ing re­main­ders are the same. Then a0 if and only if a is a mul­tiple of m,  ab if and only if ab=0.

Let us now put all in­tegers in­to a set of residue classes, each of which will be des­ig­nated by {a}. Here a is any in­teger of the class, {a}={b} if any only if ab. It is clear that there are m classes and that they are pre­cisely the classes {0},{1},,{m1}, where if r has any of the val­ues 0,1,,m1, the set {r} con­sists of all in­tegers dif­fer­ing from r by a mul­tiple of m.

It is a simple mat­ter to veri­fy the iden­tit­ies (a+c)(b+d)=(ab)+(cd),acbd=(ab)(cd)+[d(ab)+b(cd)]. They im­ply that if ab and cd then a+cb+d, acbd. But it fol­lows that {a+c} and {ac} are uniquely de­term­ined for every two classes {a},{c} and we define {a}+{c}={a+c},{a}{c}={ac}. The set Am of our residue classes is now known to be a com­mut­at­ive ring.

In ac­tu­al use we omit the braces and com­pute with in­tegers in the nor­mal way but al­ways drop off mul­tiples of m. We need not use 0,1,, m1 as a set of re­main­ders but may choose any oth­er m in­tegers provid­ing that there is one and only one from each class. For ex­ample, let us study A26.

To fa­cil­it­ate com­pu­ta­tions we use the table of products q26, q=2,3,, 25, which is giv­en by 52,78,104,130,156,182,208,234,260,286,312,338,364,390,416,442,468,494,520,546,572,598,624,650. To use A26, we set up a cipher al­pha­bet as a map­ping ABCDE FGHIJ KLMNO123456789101112131415(27)PQRST UVWXY Z1617181920212223242526 We may now add and mul­tiply in­tegers as usu­al provid­ing neither sum nor product ex­ceeds 26. Then 3+5=9, 35=15. However, 15+19=348, and so if we re­place 0 and S by what we may call their sum, this sum would be H. Sim­il­arly 1519=28525 by the table above, and this cor­res­ponds to Y.

8. The finite field in the construction of cipher systems

We shall con­struct cipher sys­tems as in equa­tions (10), (11), (12), (13), where the set N0 of com­pon­ents u1 will be a fi­nite ring and the map­ping U will be defined by al­geb­ra­ic ex­pres­sions for the com­pon­ents v1,, vn of U(u) in terms of the com­pon­ents u1,, un of u. A spe­cial in­stance of such a cipher sys­tem is that where N0=A26, (28)U(u)=[au1,,aun], for any non-zero quant­ity of A26. If a is the class {3} of A26 our cipher sys­tem re­places every let­ter of our mes­sage by a cor­res­pond­ing let­ter, such that A,,Z cor­res­pond, re­spect­ively, to (29)CFILO  RUXAD  GJMPS  VYBEH  KNQTW  Z. If we at­temp­ted to con­struct the sim­il­ar map­ping with a={2} we would re­place A,Z, re­spect­ively, by (30)BDFHJ  LNPRT  VXZBD  FHJLN  PRTVX  Z, and so the map­ping would not be non-sin­gu­lar.

The fact that the cipher sys­tem just de­scribed is sin­gu­lar arises from the prop­erty that the map­pings (31)xax(x in A), defined for each a0 of A, are sin­gu­lar for some quant­it­ies a of A26. Such a map­ping is non-sin­gu­lar for a giv­en a0 if it is true that for every b of A, there is a solu­tion x in A of the equa­tion (20). But then the map­pings (31) of A on A are all non-sin­gu­lar for a0 of A if and only if A is a field.

The fi­nite rings Am with m=st for pos­it­ive in­tegers s>1, t>1 are not fields. This fol­lows since {s}{t}={0}, the ex­ist­ence of a solu­tion x of {t}x={1} would im­ply that {s}{t}x={s}={0}x={0}. The rings Am with m a prime in­teger are fields and two in­stances of such rings im­port­ant for our use are (32)A29,A31. Let us now set up the cipher al­pha­bet giv­en by A29 and the cor­res­pond­ence ABCDE FGHIJ KLMNO112233445566778(33)PQRST UVWXY Z,.899101011111212131314140 We shall use the table of products q29 for q=2,,14, giv­en by 58,87,116,145,174,203,232,261,290,319,348,377,405. Then we see that the cipher sys­tem defined by the map­ping x{3}x of A on A sets up a cor­res­pond­ence of A,,Z, re­spect­ively, to (34)EFKLQ  RWX.,  VUPOJ  IDCAB  GHMNS  TYZ Here we have used prop­er­ties con­tained in the set of con­gru­ences 281,272,263,254,245,236,227,218,209,1910,1811,1712,1613,1514 modulo 29.

There are also oth­er fi­nite fields ob­tained from our fi­nite fields Am, where m is a prime. Such fields are the sets of poly­no­mi­als of the form a0+a1α+a2α2++atαt1(a0,,at in Am), where α is a root of an equa­tion f(x)=0 of de­gree t, coef­fi­cients in Am, and not factor­ing in Am. Then α is a prim­it­ive (q1)-st root of unity, q=mt is the num­ber of ele­ments in this field. We des­ig­nate such fields by (35)GF(mt) (read G, F, mt), and call such a field a Galois field of mt quant­it­ies. There are no oth­er fi­nite fields.

The fields Am=GF(m), t=1. An­oth­er im­port­ant ex­ample is the field GF(33) of 27 ele­ments. Then its quant­it­ies are sums (36)a0+a1α+a2α2, where ai={0},{1},{2}modulo 3, (37)α3=α+1.

9. Simple and multiple alphabet substitution ciphers

A sub­sti­tu­tion cipher is a non-sin­gu­lar map­ping (38)x=[x1,,xn]S(x)=[u1,,un], where the xi are the let­ters or oth­er sym­bols of our mes­sage, and the u1 are the cor­res­pond­ing sym­bols de­term­ined by S. An im­port­ant type of sub­sti­tu­tion cipher is a non-sin­gu­lar map­ping of the type above in which (39)S(x)=[T1(x1),,Tn(xn)], for non-sin­gu­lar map­pings Ti on M0 to M0, where M0 is the set of sym­bols we are us­ing. Thus the map­pings Ti=T giv­en by (29), (34) define such sub­sti­tu­tion ciphers. Let us also use any fi­nite ring A in a cipher al­pha­bet which is a non-sin­gu­lar map­ping (40)xiyi, on M0 to A. Then the map­pings (41)Ti:yiaiyi+bi(i=1,,n) on A to A are non-sin­gu­lar for every bi in A and every non-zero ai in A. It fol­lows that the cipher sys­tems defined by (38), (39), (40), (41) are defin­able as fol­lows. Re­place each let­ter of our mes­sage of n let­ters by a cor­res­pond­ing “num­ber” of the ring A de­term­ined by (40). Mul­tiply the i-th such num­ber by the fixed non-zero num­ber ai in A, add the fixed bi, and then re­place the res­ult by the cor­res­pond­ing let­ter de­term­ined also by (40). Such ciphers are usu­ally called mul­tiple al­pha­bet ciphers and are called simple or monoal­pha­bet ciphers if the trans­form­a­tions (41) are all the same, that is, if (42)yiay+b(i=1,,n).

10. Special multiple alphabet substitution ciphers

The so-called Caesar cipher is the case where (41) is giv­en by (43)yiyi+b, for b fixed. If we use A26 and use (27) for the map­ping (40) of the Ro­man let­ters on the quant­it­ies of our ring then b is a class {r} defined for r=0,1,, 25 and every let­ter x is re­placed by a let­ter ob­tained by shift­ing it r units in the se­quence A,, Z of which it is a mem­ber.

The Vi­genère, Gronsfield, Porta, and Beaufort cipher sys­tems are all vari­ants of our cipher sys­tems de­term­ined by (27), the use of A26, and (41) for ai±1. In the ori­gin­al Vi­genère, we use the form (44)yiyi+bi(i=1,,n) of (41), where bi={ri} for ri one of 0,1,, 25, and we carry each set of n let­ters xi of our mes­sages to cor­res­pond­ing let­ters z1,, zn. Here we ob­tain the let­ter zi by a shift of ri let­ters in the al­pha­bet on the let­ter xi. The amount of shift de­pends on i. Thus, a key word of n sym­bols g1,, gn may be giv­en, we carry each let­ter gi to a cor­res­pond­ing residue class {ri}, we use {26}={0}, we have 0ri<26, and we shift ri let­ters.

The Saint-Cyr cipher is also a true Vi­genère cipher and its mech­an­ism need not be de­scribed. The Gronsfield ciphers dif­fers only from the Vi­genère in that r1,, rn are giv­en rather than the key word. The so-called true Beaufort is the cipher sys­tem de­term­ined by (45)yizi=yibi(i=1,,n), where bi={ri}, each ri lies between 0 and 25, and we shift ri let­ters back­ward in the al­pha­bet. Math­em­at­ic­ally this is identic­al with the Vi­genère but with a dif­fer­ent cipher sys­tem. The so-called mod­i­fied Vi­genère and Beaufort sys­tems are giv­en by (46)yizi=yi+b1(i=1,,n), and (47)yizi=yibi(i=1,,n), re­spect­ively, and are math­em­at­ic­ally identic­al.

The Porta cipher is fun­da­ment­ally the Vi­genère but with the cipher al­pha­bet giv­en by ABCDE FGHIJ KLMNO12345 678910 11121312(48)PQRST UVWXY Z34567 89101112 13

11. Autoencipherment

A poly­gram sub­sti­tu­tion cipher is a cipher sys­tem giv­en by the use of a cipher al­pha­bet and non-sin­gu­lar map­ping y=[y1,,yn]T(y)=[z1,,zn], where each zj is a func­tion of all the yi rather than a single yi. A spe­cial case of such a sys­tem is that giv­en by (49)zi=yi+bi(i=1,,s), and by (50)zi=yi+yis(i=s+1,,n), for some fixed s<n. Thus it res­ults from a shift of ri units for the first s let­ters and is a Vi­genère for this part, and by a shift de­pend­ent on the mes­sage it­self for the re­main­ing let­ters in each group of n let­ters.

12. The cipher systems of Hill

Let us sup­pose that a cipher al­pha­bet in­volving a fi­nite ring A has been pre­scribed and thus that we may re­place any se­quence of n sym­bols of a mes­sage by a se­quence (51)y=[y1,,yn] of quant­it­ies of yi of the ring A. We as­sume that n2 quant­it­ies aij in A are giv­en as well as n oth­er quant­it­ies g1,, gn in A and let zj be giv­en by (52)zj=y1a1j+y2a2j++ynanj+gj for j=1,, m. Then the map­ping defined by (53)yz=[z1,,zm] is a non-sin­gu­lar map­ping if the quant­it­ies aij are such that it is pos­sible to solve for the yi uniquely in terms of the zj. This oc­curs if m=n and there ex­ist quant­it­ies bji in A such that (54)yi=z1b1i++znbni+hi(i=1,,n), where (55)hi=(g1b1i++gnbni)(i=1,,n).

If A is any com­mut­at­ive ring with a unity quant­ity 1 the ele­ment­ary the­ory of sys­tems of lin­ear equa­tions and de­term­in­ants is ap­plic­able. Its res­ults im­ply that the map­ping (53) is non-sin­gu­lar if and only if the de­term­in­ant (56)d=|a11a12a1na21a22a2nan1an2ann| has an in­verse d1 in A such that dd1=1. Then it is pos­sible to give ex­pli­cit for­mu­las for the bji in terms of d1 and the n1 rowed minors of the ar­ray of which d is the de­term­in­ant. In par­tic­u­lar, if A is a field, the map­ping (53) is a non-sin­gu­lar if and only if d0. Also (53) is non-sin­gu­lar when A is the residue-class ring mod­ulo m if and only if the residue class d={r} for a rep­res­ent­at­ive in­teger r prime to m.

It must be evid­ent by now that the com­mon sub­sti­tu­tion ciphers of Sec­tions 10 and 11 are all spe­cial cases of the sys­tems giv­en by the use of (53), (52). The gen­er­al trans­pos­i­tion cipher al­pha­bet is also such a spe­cial case, for we use a cipher al­pha­bet with A=A26 and thus re­place each se­quence x=[x1,, xn] of n let­ters by a se­quence y=[y1,, yn] of n residue classes. We use a per­muta­tion P re­pla­cing x by [xi1,, xin] and have our res­ult if we can use (52) to ob­tain z=[yi1,, yin]. This may be ac­com­plished when we take the gi all zero, the aij={0} for all val­ues of i and j ex­cept those where i=ij in which case aij={1}.

13. The Hill systems in matrix form

A rect­an­gu­lar ar­ray (57)A=(a11a12a1ta21a22a2tas1as2ast) is called an s by t mat­rix. It has s rows and t columns of ele­ments in a ring A and the ele­ment aij is that ele­ment in its i-th row and j-th column. Then we may re­place (57) by the ab­bre­vi­ated nota­tion (58)A=(aij)(i=1,,s;j=1,,t).

For every two s by t matrices A and (59)B=(bij)(i=1,,s;j=1,,t), we define (60)A+B=(cij),cij=aij+bij(i=1,,s;j=1,,t). Sim­il­arly AB is defined so as to have aijbij in the i-th row and j-th column.

We now let (61)Y=(yki)(k=1,,r;i=1,,s) be any r by s mat­rix. Then we define the product (62)W=YA=(wkj)(k=1,,r;j=1,,t) to be the r by t mat­rix whose ele­ment in the k-th row and j-th column is giv­en by (63)wkj=yk1a1j+yk2a2j++yksasj.

Equa­tions (52) may be writ­ten by the use of matrices in a very simple form. The se­quences y in (51) and z in (53) are both one by n matrices and we write g=[g1,, gm]. Let A be the n by m mat­rix whose ele­ment in the i-th row and j-th column is the coef­fi­cient aij in our equa­tions (52). Then (52) be­comes (64)z=yA+g. The iden­tity map­ping yz=y has the form (64) for g=[0,, 0], m=n, and A the mat­rix I whose ele­ments aij are all zero, ex­cept that the aii are all 1. Then (54) is giv­en by (65)y=(zg)B, where AB=I,B is the mat­rix in­verse of A.

One may now set up what ap­pears to be a gen­er­al­iz­a­tion of the equa­tions (52). We let y=[Y1,,Yn] for a set of q by s matrices Yi. Let A11,, Aij,, Anm be a set of s by t matrices, C11,, Cji,, Cmn be a set of r by q matrices, G1,, Gm be a set of r by t matrices. Then each CjiYiAij is an r by t mat­rix and so are the sums (66)Zj=Cj1Y1A1j++CjnYnAnj+Gj(j=1,,m). Nev­er­the­less the map­ping defined by (66) is only a pseudo­gen­er­al­iz­a­tion of (52) for y may be re­garded as be­ing a se­quence of nqs ele­ments in A, z=[z1,, zn], as be­ing a se­quence of mrt ele­ments in A, (66) can al­ways be ex­pressed in the form (52).

However, the form (66) may be more con­veni­ent to use than (52). For ex­ample, a map­ping on a se­quence [y1,y2,y3,y4] in­volves the use of a four rowed mat­rix. However we may write this se­quence as a mat­rix (67)Y=(y1y2y3y4), and then use the map­pings defined as in (66) by the equa­tion (68)Z=CYA+G for two rowed square matrices C, A, G. The map­ping is non-sin­gu­lar if matrices B and D ex­ist such that AB=DC=I, (69)Y=D(ZG)B. It is not as gen­er­al as the map­ping (52) but may be quite ad­equate for ac­tu­al use.

14. Fractional substitutions

We have now seen how to carry a se­quence of let­ters in a mes­sage in­to a cor­res­pond­ing ar­ray of what we may call the num­bers of a ring and how to carry each such ar­ray in­to an­oth­er by the use of a sys­tem of lin­ear equa­tions re­turn­ing to a cryp­to­gram con­sist­ing of a cor­res­pond­ing se­quence of let­ters. This may be com­plic­ated fur­ther by the use of non-lin­ear equa­tions and such sub­sti­tu­tion cipher sys­tems are known.4 Frac­tion­al cipher sys­tems do not dif­fer at all from the sub­sti­tu­tion cipher sys­tems already con­sidered in re­spect to the nature of the map­pings defined by (52) but do dif­fer in that a some­what more com­plic­ated cipher al­pha­bet is used. We let x=[x1,, xs] be a mes­sage of s let­ters and re­place each let­ter by a se­quence of t quant­it­ies of a ring A and thus x by y=[y1,, yn] for n=st, the yi in A. Clearly (52) re­places y by a se­quence z in which ele­ments arising from parts of se­quences cor­res­pond­ing to dif­fer­ent let­ters may be com­bined. For ex­ample we set up the map­ping ABCDEFG(0,0,0)(1,0,0)(2,0,0)(0,1,0)(1,1,0)(2,1,0)(0,2,0)HIJKLMN(1,2,0)(2,2,0)(0,0,1)(1,0,1)(2,0,1)(0,1,1)(1,1,1)OPQRSTU(2,1,1)(0,2,1)(1,2,1)(2,2,1)(0,0,2)(1,0,2)(2,0,2)VWXYZ.(0,1,2)(1,1,2)(2,1,2)(0,2,2)(1,2,2)(2,2,2) with ele­ments of our triples in the residue class ring mod­ulo S. Then the word FROM be­comes the se­quence (2,1,0,2,2,1,2,1,1,0,1,1), which we group in­to the set of three se­quences (2,1,0,2), (2,1,2,1), (1,0,1,1), and en­scribe by the use of (52) for n=4 and d=|2100110001121002|. The res­ult is the se­quence (1,0,0,1,0,2,2,0,0,2,1,1), which yields BTCO. Here we have com­bined the se­quence (2,1,0) arising from F with the first ele­ment in the se­quence (2,2,1) arising from R.

15. Involutorial cipher systems

A sub­sti­tu­tion cipher sys­tem defined by a cipher al­pha­bet and a non-sin­gu­lar map­ping T of (52) is said to be in­vol­utori­al if T1 is the same as T. A large class of such trans­form­a­tions may be de­term­ined as fol­lows. Let A be any non-sin­gu­lar  r-rowed square mat­rix with aij in the i-th row and j-th column. As­sume that A is sym­met­ric (that is, the aij=aji) or that r is even and A is skew (aij=aji). We carry a mes­sage in­to a cipher al­pha­bet (best taken to be a fi­nite field, say, A29) in which the ele­ments aij of A lie, and then break up the mes­sage in­to sets of se­quences of r ele­ments which we use in groups of r as rows of cor­res­pond­ing matrices Y. Then we form AYA1, where the columns of Y are the rows of A.

16. Special ciphers

Let us use the al­pha­bet giv­en by A29 in equa­tion (33). Con­sider the mes­sage giv­en by THEREARE,OFCOU1043930193148302811RSE,MOREEFFECTI9103147893033332105VEMETHODS.1130731048210140 and then form the matrices A1=(10439),A2=(3019),A3=(31483),A4=(02811),A5=(910314),A6=(7893),A7=(0333),A8=(32105),A9=(11307),A10=(31048),A11=(210140). Then we com­pute BAi, where B=(1112),B1=(2111), and the res­ult is en­scribed as ZIZ.  CQBU  JXYQ  PRZR  XH.Z  IGDEKLRY  FKOV  HUUM  UVFW  SET. The fre­quen­cies in the ori­gin­al mes­sage are thereby com­pletely des­troyed.

Us­ing the same B we may also define the Ai by A1=(10443),A2=(9330), ,A15=(14113) and then carry our ori­gin­al mes­sage of 43 sym­bols (plus one or two nulls) in­to one of 60 let­ters. It might be said that the second 4,3, etc., in our sym­met­ric matrices Bi are nulls but they are still really a part of our mes­sage.

The two sys­tems above may be com­bined and thus we write A1=(10443),A2=(9301),A4=(93314), ,A12=(48210),A13=(14552), in which the 5, 2 are nulls. Then our mes­sage is trans­formed in­to one of the 52 ele­ments. Yet, each of these sys­tems uses the same mat­rix for en­ci­pher­ing and could be de­ciphered by know­ing the pos­sib­il­it­ies with ex­pli­cit know­ledge as to when the en­cipher­er changes from or­din­ary to sym­met­ric Ai.

There are over 600,000 dis­tinct non-sin­gu­lar two-rowed matrices with ele­ments in A29, and the par­tic­u­lar mat­rix used as above may be changed at will. For ex­ample, in writ­ten text it might be agreed that cer­tain four pre­scribed let­ters rep­res­ent the mat­rix A used to en­cipher that para­graph. Or we might write I=(1001),A=(3523),B=(3345),C=(3712),D=(1112), and then use the first four let­ters of each para­graph to give the mat­rix used. Thus a para­graph be­gin­ning with CIAB would have been en­ciphered with CAB=(101231). However, it might be sim­pler to pre­scribe A and B as well, as four po­s­i­tions for let­ters d1d2d3d4 in a para­graph of a cryp­to­gram, and use the mat­rix products A(d1d2d3d4)B to en­cipher the para­graph. Of course, oth­er devices than para­graph­ing to in­dic­ate a change in cipher sys­tem could be used.