Mathematical Recreations and Essays · W. W. Rouse Ball
The art of constructing cryptographs or ciphers--intelligible
to those who know the key and unintelligible to others--has been studied for centuries. Their usefulness on certain occasions, especially in time of war, is obvious, while it may be a matter of great importance to those from whom the key is concealed to discover it. But the romance connected with the subject, the not uncommon desire to discover a secret, and the implied challenge to the ingenuity of all from whom the key is hidden, have attracted to the subject the attention of many to whom its utility is a matter of indifference.
The leading authorities on the subject, few of which are less than a century old, are enumerated in an article by J.E. Bailey in the ninth edition of the Encyclopaedia Britannica, and references to various historic ciphers are there given. My knowledge of the subject, however, is limited to ciphers which I have met with in the course of casual reading, and I prefer to discuss the subject as it has presented itself to me, with no attempt to make it historically complete and no reference to other authorities. In fact the theory of the subject is not sufficiently important to make it worth while to try to deal with it historically or exhaustively.
Most writers use the words cryptograph and cipher as synonymous. I employ them, however, with different meanings, which I proceed to define.
A Cryptograph. Definition. Illustration A cryptograph may be defined as a manner of writing in which the letters or symbols employed are used in their normal sense, but are so arranged that the communication is intelligible only to those possessing the key. The word is sometimes used to denote the communication made. A simple example is a communication in which every word is spelt backwards. Thus: ymene deveileb ot eb gniriter troper noitisop no ssorc daor.
A Cipher. Definition. Illustration A cipher may be defined as a manner of writing by characters arbitrarily invented or by an arbitrary use of letters, words, or characters in other than their ordinary sense, intelligible only to those possessing the key. The word is sometimes used to denote the communication made. A simple example is when each letter is replaced by the one that immediately follows it in the natural order of the alphabet, a being replaced by b, b by c, and so on, and finally z by a. In this cipher the above message would read: fofnz cfmjfwfe up cf sfujsjoh sfqpsu qptjujpo po dsptt spbe.
Essential Features of Cryptographs and Ciphers In both cryptographs and ciphers the essential feature is that the communication may be freely given to all the world though it is unintelligible save to those who possess the key. The key must not be accessible to anyone, and if possible it should be known only to those using the cryptograph or cipher. The art of constructing a cryptograph lies in the concealment of the proper order of the essential letters or words: the art of constructing a cipher lies in concealing what letters or words are represented by the symbols used. In an actual communication cipher symbols may be arranged cryptographically, and thus further hinder a reading of the message. Thus the message given above would read in a cryptographic cipher as znfof efwfjmfc pu fc hojsjufs uspqfs opjujtpq op ttpsd ebps. If the message were sent in Latin or some foreign language it would further diminish the chance of it being read by a
stranger through whose hands it passed. But I may confine myself to messages in English, and for the present to simple cryptographs and ciphers.
A communication in cryptograph or cipher must be in writing or in some permanent form. Thus to make small muscular movements--such, , as talking on the fingers, or breathing long and short in the Morse dot and dash system, or making use of pre-arranged signs by a fan or stick, or flashing signals by light--do not here concern us.
Again, the mere fact that the message is concealed or conveyed secretly does not make it a cryptograph or cipher. The majority of stories dealing with secret communications are concerned with the artfulness with which the message is concealed or conveyed and have nothing to do with cryptographs or ciphers. Many of the ancient instances of secret communication are of this type (A long list of classical authorities for different devices used in ancient times for concealing messages is given in Mercury by J. Wilkins, London, 1641, pp. 27--36.). Illustrations are to be found in messages conveyed by pigeons, or wrapped round arrows shot over the head of a foe, or written on the paper wrapping of a cigarette, or the use of ink which becomes visible only when the recipient treats the paper on which it is written by some chemical or physical process.
Again, a communication in a foreign language or in any recognized notation like shorthand is not an instance of a cipher. A letter in Chinese or Polish or Russian might be often used for conveying a secret message from one part of England to another, but it fails to fulfil our test that if published to all the world it would be concealed from everyone, unless submitted to some special investigation. On the other hand, in practice, foreign languages or systems of shorthand which are but little known may serve to conceal a communication better than an easy cipher, for in the last case the key may be found with but little trouble, while in the other cases, though the key may be accessible, it is probable
that there are only a few who know where to look for it. An illustration of this is afforded by the system used by Pepys in writing his Diary which is further alluded to below.
Cryptographs of Three Types. IllustrationsCryptographs I proceed to enumerate some of the better known types of cryptographs. There are at least three distinct types. The first type comprises those in which the order of the letters is changed in some pre-arranged manner. The second type comprises those in which the concealment is due to the introduction of non-significant letters. The third type comprises those in which the letters used are written in fragments. The types are not exclusive, and any particular cryptograph may comprise the distinctive feature of two or all the types.
tocsubsectionOrder of letters re-arranged A cryptograph of the first type is one in which the successive letters of the message are re-arranged in some pre-determined manner.
One of the most obvious cryptographs of this type is to write each word or the message itself backwards. He would, however, be a careless reader who could be deceived by this. Here is an instance in which the whole message is written backwards: tsop yb tnes tnemeerga fo seniltuo smret ruo tpecca yeht. In such a case it is unnecessary to indicate the division into words by leaving spaces between them, and we might divide the letters artificially, as thus: Ts opybtne stne meer gafos eniltu osmret ruot peccaye ht.
Systems of this kind which depend on altering the places of letters or lines in some pre-arranged manner have always been common. I quote a couple of instances (Mercury, or the Secret and Swift Messenger, by footnote:wilkinsJ. Wilkins, London, 1641, pp. 50--52.) from Wilkins's book to which I have already referred--it was a work which seems to have been studied diligently by many of those who took part in the civil disturbances of the 17th century, and gives an excellent account of some of the easier systems of cryptographs and ciphers.
The first example I take from him is where the letters which make up the communication are written vertically up or down. Thus the message: The pestilence continues to increase might be written thus: 1pt 0
Again, Wilkins says that the cryptograph may be yet further obscured by placing the letters which make up the message in any pre-arranged but discontinuate order. For instance if the message runs to four lines we may put the first letter at the beginning of the first line, the second at the beginning of the fourth line, the third at the end of the first line, the fourth at the end of the fourth line, the fifth at the beginning of the second line, the sixth at the beginning of the third line, the seventh at the end of the second line, the eighth at the end of the third line, and so on. Thus the message: Wee shall make an Irruption upon the Enemie, from the North, at ten of the clock this night would read thus: 1 where, to obscure the message further, it is divided arbitrarily into what appear to be words.
Another instance of a cryptograph of this type may be constructed thus. First, by writing the message in lines of some arranged length, say, for instance, each containing seventeen letters--the letters in successive lines being arranged vertically under those corresponding to them in the upper line--and either leaving no spaces between the words or inserting some pre-arranged letter or letters or digits between them, such as j , q , z. The message can be then sent as a cryptograph by writing the letters in order in successive
vertical lines. This only comes to saying that we write successively the 1st, 18th, 35th letters of the original message, and then the 2nd, 19th, 36th letters, and so on. To confuse the decipherer the final reading may be arbitrarily put into what might represent words. If, however, we know the clue number, say c , it is easy enough to read the communication. For if it divides into the number of letters n times with a remainder r it suffices to re-write the message in lines putting n + 1 letters in each of the first r lines, and n letters in each of the last c - r lines, and then the communication can be read by reading the columns downwards. For instance, if the following communication, containing 270 letters, were received:
A.h.t.z.e.i.p.q.h.g.e.s.o.a.e.o.u.a.z.s.e.s.e. w.a.e.q.t.m.u.s.f.d.t.b.e.n.z.c.e.s.j.t.e.o.t.t.q. i.z.y.c.z. h.t.z.j.i.o.a.r.h.q.e.t.t.j.r.f.e.s.f.t.n.z.m.r.o. o.m.o.h.y.e.a.r.z.i.a.q.n.e.o.r.n.b.r.e.o.t.l.e.n. n.k.a.e.r.w.i.z.e.s.j.u. a.s.j.o.d.e.z.w.j.z.z.s.z.j.b.r.r.i.t.t.j.n.f.j.l. w.e.u.z.r.o.q.y.f.o.h.t.q.a.y.e.i.z.s.l.e.o.p.j.i. d.i.h.a.l.o.a.l.h.p.e.p.k.r. h.e.a.n.a.z.s.r.v.l.i.i.m.o.s.i.a.d.y.g.t.p.e.k.i. j.s.c.e.r.q.v.v.j.q.j.q.a.j.q.n.y.j.i.n.t.k.a.e.h. s.b.h.s.n.b.g.o.a.o.t.q. e.t.q.e.u.u.e.s.a.y.q.u.r.n.t.p.e.b.q.s.t.z.a.m.z. t.q.r.j, and the clue number were 17 we should put 16 letters in each of the first 15 lines and 15 letters in each of the last 2 lines. The communication could then be discovered by reading the columns downwards: the letters j, q, and z marking the ends of words.
Another cryptograph of this type may be constructed by arranging the letters cyclically, and agreeing that the communication is to be made by selected letters, as, for instance, every seventh, second, seventh, second, and so on. Thus if the communication were Ammunition too low to allow of a sortie, which consists of 32 letters, the successive significant letters would come in the order 7 , 9 , 16 , 18 , 25 , 27 , 2 , 4 , 13 , 15 , 24 , 28 , 5 , 8 , 20 , 22 , 1 , 6 , 21 , 26 , 11 , 14 , 32 , 10 , 31 , 12 , 17 , 23 , 3 , 29 , 30 , 19 --the numbers being selected as in the decimation problem given above on pages --, and being struck out from the 32 cycle as soon as they are determined. The above communication would then read
T.t.r.i.o.o.a.l.m.o.l.a.o.o.n.m.s.u.e.o.a. w.o.t.n.l.i.o.t.i.f.w. This is a good cryptograph, but it is troublesome to construct, especially if the message is long, and for that reason is not to be recommended.
tocsubsectionUse of non-significant symbols. The Grille A cryptograph of the second type is one in which the message is expressed in ordinary writing, but in it are introduced a number of dummies or non-significant letters or digits thus concealing which of the letters are relevant.
One way of picking out those letters which are relevant is by the use of a perforated card of the shape of (say) a sheet of note-paper, which when put over such a sheet permits only such letters as are on certain portions of it to be visible. Such a card is known as a grille. An example of a grille with four openings is figured [below]Grille. A communication made
in this way may be easily concealed from anyone who does not possess a card of the same pattern. If the recipient possesses such a card he has only to apply it in order to read the message.
The use of the grille may be rendered less easy to detect if it be used successively in different positions, for instance, with the edges AB and CD successively put along the top of the paper containing the message. [Below]Grillex, for instance, is a message which, with the aid of the grille figured [above]Grille, is at once intelligible. On applying the grille to it with the line AB along the top HK we get the first half of the communication, namely, 1000 rifles se. On applying the grille with the line CD along the top HK we get the rest of the message, namely, nt to L to-day. The other spaces in the paper are filled with non-significant letters or numerals in any way we please. Of course any one using such a grille would not divide
the sheet of paper on which the communication was written into cells, but in the figure I have done so in order to render the illustration clearer.
We can avoid the awkward expedient of having to use a perforated card, which may fall into undesired hands, by introducing a certain pre-arranged number of dummies or non-significant letters or symbols between those which make up the message. Thus, to take an extreme case, we might arrange that only every 101 st letter should form our communication, and the intervening 100 letters should be written at random. But such a communication would be 101 times longer than the message, a nearly fatal objection if it had to be written in a hurry or telegraphed. A better method, and one which is not easily discovered by a stranger, is to arrange that (say) only every alternate second and third letter shall be relevant. Thus the first, third, sixth, eighth, eleventh, etc., letters are those that make up the message. Such a communication would be only two and a half times as long as the message, but even that might be a great disadvantage if time in sending the message was of importance. For a message written at leisure this need not matter much, and in such a code the introduction of a sufficient number of unnecessary letters in some pre-arranged manner gives an effectual means of conveying a message in secret.
We can also avoid the use of a perforated card if it be arranged that every n th word shall give the message, the other
words being non-significant, though of course inserted as far as possible so as to make the complete communication run as a whole. But the difficulty of composing a document of this kind and its great length render it unsuitable for any purpose except an occasional communication composed at leisure and sent in writing. This method is said to have been used by the Earl of Argyle when plotting against James II.
Similarly any system that rests on picking out certain letters in a document, which letters form a communication in ordinary writing, is a cryptograph. Thus a communication conveyed by a newspaper, in which the letters making up the message are indicated by pen dots or pin pricks or in some other agreed way, is a cryptograph.
tocsubsectionUse of broken symbols. The Scytale A kind of secret writing which may perhaps be considered to constitute a third type of cryptograph is a communication on paper which is legible only when the paper is folded in a particular way. An example is a message written across the edges of a strip of paper wrapped spiral-wise round a stick called a scytale. When the paper is unwound and taken off the stick the letters appear broken, and may seem to consist of arbitrary signs, but by wrapping the paper round a similar stick the message can be again read. This system is said to have been used by the Lacedemonians (For references, see Wilkins, supra, p. 38.). The concealment can never have been effectual against an intelligent reader who got possession of the paper.
The defect of the method is that the broken letters at once attract attention and suggest the system used. If the fact can be concealed that the visible symbols are parts of letters the cryptograph would be much improved. As an illustration take the [appended communication][communication ]illus:319 which is said to have been given to the Young Pretender during his wanderings after Culloden.
If it be creased along the lines BB and CC ( CC being along the second line of the second score), and then folded over, with B inside, so that the crease C lies over the line A (which is the second line of the first score) thus
leaving only the top and bottom of the piece of paper visible, it will be found to read conceal yourself, your foes look for you. I have seen what purports to be the original, but of the truth of the anecdote I know nothing, and the desirability of concealing himself must have been so patent that it was hardly necessary to communicate it by a cryptograph.
Ciphers. Use of arbitrary symbols unnecessaryCiphers I proceed next to some of the more common types of ciphers. It is immaterial whether we invent characters to denote the various letters; or whether we employ special symbols to represent them, such as the symbol ( for a, the symbol : for b, and so on; or whether we use the letters in a non-natural sense, such as the letter z for a, the letter y for b, and so on. The rules for reading the cipher will be the same in each case.
In early times it was a common practice to invent arbitrary symbols to represent the letters. If the symbols are invented for the purpose they provoke attention, hence it would seem that preferably we should use symbols which are not likely to attract special notice. For instance, the symbols may be musical notes, in which case the message would appear as a piece of music. Geometrical figures have also been used for the same purpose. It is not even necessary to employ written signs. Natural objects have often been used, as in a necklace of beads, or a bouquet of flowers, where the different shaped or coloured beads or different flowers stand for different letters or words. An even more subtle form of disguising the cipher is to make the different
distances between consecutive knots or beads indicate the different letters.
Of all such systems we may say that a careful scrutiny shows that different symbols are being used, and as soon as the various symbols are distinguished one from the other no additional complication is introduced, while for practical purposes they are more trouble to send or receive than those written in symbols in current use. Accordingly I confine myself to ciphers written by the use of the current letters and numerals.
Ciphers of Four Types It is convenient to divide ciphers into four classes. The first class comprises ciphers in which the same letter or word is always represented by the same symbol, and this symbol always represents the same letter or word. The second class comprises ciphers in which the same letter or word is, in some or all cases, represented by more than one symbol, and this symbol always represents the same letter or word. The third class comprises ciphers in which the same symbol represents sometimes one letter or word and sometimes another. The fourth class comprises ciphers in which each letter or word is always represented by the same symbol, but more than one letter or word may be represented by the same symbol.
tocsubsectionCiphers of the First Type. Illustrations A cipher of the first type then is one in which the same letter or word is always represented by the same symbol, and this symbol always represents the same letter or word.
Perhaps the simplest illustration of a cipher of this type is to employ one language, but written as far as practical in the alphabet of another language. It is said that during the Indian Mutiny messages in English, but written in Greek characters, were used freely, and successfully baffled the ingenuity of the enemy, into whose hands they fell. If this is true, the intelligence of the Hindoos must have been much less than that with which they are usually credited. The device, however, is an old one, for we are told (Sir John Hayward, Life of Edward VI., edition of 1636, p. 20.) that Edward VI was accustomed to make notes in cipher "with
Greek characters, to the end that they who waited on him should not read them."
A common cipher of this type is made by using the actual letters of the alphabet, but in a non-natural sense as indicating other letters. Thus we may use each letter to represent the one immediately following it in the natural order of the alphabet--the letters being supposed to be cyclically arranged--a standing for b wherever it occurs, b standing for c, and so on, and finally z standing for a. Or more generally we may write the letters of the alphabet in a line, and under them re-write the letters in any order we like. For instance .25em In such a scheme, we must in our communication replace a by o, b by l, etc. The recipient will prepare a key by rearranging the letters in the second line in their natural order and placing under them the corresponding letter in the first line. Then wherever a comes in the message he receives he will replace it by e; similarly he will replace b by s, and so on.
A cipher of this kind is not uncommonly used in military signalling, the order of the letters being given by the use of a key-word. If, for instance, Pretoria is chosen as the key-word, we write the letters in this order, striking out any which occur more than once, and continue with the unused letters of the alphabet in their natural order, writing the whole in two lines thus: .25em Then in using the cipher p is replaced by z and vice versâ, r by y, and so on. A long message in such a cipher would be easily discoverable, but it is rapidly composed by the sender and read by the receiver, and for some purposes may be useful, especially if the discovery of the purport of the message is, after a few hours, immaterial.
A summary of the usual rules for reading ciphers of this type, whether written in English, French, German, Italian, Dutch, Latin, or Greek, was given by D.A. Conradus in 1742 (Gentleman's Magazine, 1742, vol. xii, pp. 133--135, 185--186, 241--242, 473--475. See also the Collected Works of E.A. Poe in 4 volumes, vol. i, p. 30); and similar rules have been given by various later writers. In English the letter which occurs most frequently is e. The next most common letters are said to be t, a, o, and i; then n; then r, s, and h; then d and l; then c, w, u, and m; then f, y, g, p, and b; then v and k; and then x, q, j, and z. The most common double letters are ee, ll, oo, and ss; while in more than half the cases of a double letter at the end of a word, the letter is either l or s. Also, t and h form a common conjunction. I need not, however, go here into further details of this kind.
Assuming that the division into words is given, that non-significant symbols are not introduced, and that the problem is not complicated by the avoidance of the use of common words, a communication of any considerable length can usually be read with but little difficulty. The hints given by Conradus will at once suggest certain hypotheses as to which letters stand for which. Taking one of these hypotheses we write the message, replacing the symbols by the letters we conjecture that they represent and replace the others by dots. If the hypothesis is tenable, the arrangement will probably suggest some of the missing letters. If, for example, we find two words emphs-all and empht-e where the missing letter is represented by the same symbol, the first word shows us that the missing letter is h, m, or t, and the second word shews us that it must be e, h, i, or o, hence it must be h. Every fresh letter so determined makes the hypothesis more probable and renders it easier to guess what the remaining symbols represent. The chief difficulty is to get a working hypothesis for the first few letters--if it is the true solution, probably the
puzzle will be readily solved--but to make up a working hypothesis for even a few letters requires patience.
Ciphers of this class in which the division between the words is given are to be avoided. If we leave a space between such words a would-be decipherer is given an immense help. He will naturally try if a word denoted by a single symbol can be an i or an a, while the words of two or three letters will often stand revealed and so provide a definite groundwork on which he can construct the key. A long word may also betray the secret. For instance, if the decipherer has reason to suspect that the message related to something connected with Birmingham, and he found that a particular word of ten letters had its second and fifth letters alike, as also its fourth and tenth letters, he would naturally see how the key would work if the word represented Birmingham, and on this hypothesis would at once know the letters represented by eight symbols. With reasonable luck this should suffice to enable him to tell if the hypothesis was tenable. The effect of this can be avoided by leaving no spaces between the words, but this might lead to confusion and is not to be recommended. We can also use letters which occur but rarely, such as j, q, x, z, to separate words, and probably this is the best method.
Ciphers of this type suggest themselves naturally to those approaching the subject for the first time, and are commonly made by merely shifting the letters a certain number of places forward. If this is done we may decrease the risk of detection by altering the amount of shifting at short (and preferably irregular) intervals. Thus it may be agreed that if initially we shift every letter one place forward then whenever we come to the letter (say) n we shall shift every letter one more place forward. In this way the cipher changes continually, and is essentially changed to one of the third class; but even with this improvement it is probable that an expert would decode a fairly long message without much difficulty.
We can have ciphers for numerals as well as for letters:
such ciphers are common in many shops. Any word or sentence containing ten different letters will answer the purpose. Thus, an old tradesman of my acquaintance used the excellent precept Be just O Man--the first letter representing 1, the second 2 , and so on. In this cipher the price 10 / 6 would be marked bn/t. This is an instance of a cipher of the first type.
tocsubsectionCiphers of the Second Type. Illustrations A cipher of the second type is one in which the same letter or word is, in some or all cases, represented by more than one symbol, and this symbol always represents the same letter or word. Such ciphers were uncommon before the Renaissance, but the fact that to those who held the key they were not more difficult to write or read than ciphers of the first type, while the key was not so easily discovered, led to their common adoption in the seventeenth century.
A simple instance of such a cipher is given by the use of numerals to denote the letters of the alphabet. Thus a may be represented by 11 or by 37 or by 63 , b by 12 or by 38 or by 64 , and so on, and finally z by 36 or by 62 or by 88 , while we can use 89 or 90 to signify the end of a word and the numbers 91 to 99 to denote words or sentences which constantly occur. Of course in practice no one would employ the numbers in an order like this, which suggests their meaning, but it will serve to illustrate the principle. I have deliberately used numbers of only two digits, as the recipient can then point off the symbols used in twos, and will know that each pair of symbols represents a letter, word, or sentence in the message. A disadvantage of this cipher is that since each letter is denoted by two symbols the length of the message is doubled by putting it in cipher.
The cipher can be improved by introducing after every (say) eleventh digit a non-significant digit. If this is done the recipient of the message must erase every twelfth digit before he begins to read the message. With this addition the difficulty of discovering the key is considerably increased.
The same principle is sometimes applied with letters instead of numbers. For instance, if we take a word (say) of n letters,
preferably all different, and construct a table as shown below of n^2 cells, each cell is defined by two letters of the key-word. Thus, if we choose the word smoking-cap we shall have 100
cells, and each cell is determined uniquely by the two letters denoting its row and column. If we fill these cells in order with the letters of the alphabet we shall have a system similar to that explained above, where a will be denoted by ss or og or no, and so for the other letters. The last 22 cells may be used to denote the first 22 letters of the alphabet, or better, three or four of them may be used after the end of a word to show that it is ended, and the rest may be used to denote words or sentences which are likely to occur frequently.
Like the similar cipher with numbers this can be improved by introducing after every m th letter any single letter which it is agreed shall be non-significant. To decipher a communication so written it is necessary to know the clue-word and the clue-number.
Here for instance is a communication written in the above cipher with the clue-word smoking-cap, and with 7 as the clue-number:
n.g.m.k.s.i.g.r.i.o.i.c.p.s.s.a.m.c.k.s.c.a.k .q.i.g.n.a.s.s.n.x.m.i.g.p.o.a.s.u.i.a.m.n.o.c.m .p.a.m.i.n.s.c.n.o.g.c.p.n.c.i.s.y.i.k.s.k.a.m.s .s.s.g.n.n .c.a.e.k.k.n.o.o.m.k.h.s.c.p.c.m.s.c .b.g.p.n.g.s.i.a.
w.s.s.g.i.g.g.n.d.i.i.c.aThe original text read sssgnnn, which leads to gobbledegook in the deciphered message..
In this sentence the letters denoting the 79th, 80th, 81st, and 82nd cells have been used to denote the end of a word, and no use has been made of the last 18 cells.
Another cipher of this type is made as follows (The method is well known. It is mentioned by E.A. Poe, Collected Works, vol. iii, pp. 338--9, but is much older.). The sender and recipient of the message furnish themselves with identical copies of some book. In the cipher only numerals are used, and these numerals indicate the locality of the letters in the book. For example, the first letter in the communication might be indicated by 79--8--5, meaning that it is the 5th letter in the 8th line of the 79th page. But though secrecy might be secured, it would be very tedious to prepare or decode a message, and the method is not as safe as some of those described below.
Another cipher of this type is for the sender and receiver to agree on some common book of reference and to agree further on a number which, if desired, may be communicated as part of the message. To employ this cipher the page of the book indicated by the given number must be used. The first letter in it is taken to signify a, the next b, and so on--any letter which occurs a second time or more frequently being neglected. It may be also arranged that after n letters of the message have been ciphered, the next n letters shall be written in a similar cipher taken from the p th following page of the book, and so on. Thus the possession of the code-book would be of little use to anyone who did not also know the numbers employed. It is so easy to conceal the clue number that with ordinary prudence it would be almost impossible for an unauthorized person to discover a message sent in this cipher. The clue number may be communicated indirectly in many ways. For instance, it may be arranged that the number to be used shall be the number sent, plus (say) q , or that the number to be used shall be an agreed multiple of the number actually sent.
tocsubsectionCiphers of the Third Type. Illustrations A cipher of the third type is one in which the same symbol represents sometimes one letter or word and sometimes another. Usually such ciphers are easily made or read by those who have the key, but are difficult to discover by those who do not possess it.
A simple example is the employment of pre-arranged numbers in shifting forward the letters that make the communication. For instance, if we agree on the clue number (say) 4276 , then the first letter in the communication is replaced by the fourth letter which follows it in the natural order of the alphabet: for instance, if it were an a it would be replaced by e. The next letter is replaced by the second letter which follows it in the natural order of the alphabet: for instance, if it were an a it would be replaced by c. The next letter is replaced by the seventh after it. The next by the sixth after it. The next by the fourth, and so on to the end of the message. Of course to read the message the recipient would reverse the process. If the letters of the alphabet are written at uniform intervals along a ruler, and another ruler similarly marked with the digits can slide along it, the letter corresponding to the shifting of any given number of places can be read at once.
It would be undesirable to allow the division into words to appear in the message, and either the words must be run on continuously, or preferably the less common letters j, q, z may be used to mark the division of words. It is also well to conceal the number of digits in the clue-number. This can be done and the cipher much improved by inserting after every (say) m th letter a non-significant letter.
Here for instance is a communication written in this cipher with the clue-numbers 4276 and 7 :
a.t.p.z.n.h.v.a.x.u.x.h.i.e.p.x. a.f.w.g.h.z.n.i.y.p.r.p.s.i.k.b.d.k.z.y.y.g.k.q. p.r.g.e.z.u.y.t.l.k.o.b.l.d.i.f.e.b.z.m.x.l.p.o. g.q.u.y.i.t.c.m.g.x. k.c.k.u.e.x.v.s.q.k.a.z.i.a.g.g.s.i.g.a.y.t.n.v. v.s.s.t.y.v.u.a.s.l.y.w.g.j.u.z.m.c.s.f.c.t.q.b. p.w.j.v.a.e.p.f.x.h.i. b.w.p.x.i.u.l.t.x.l.a.v.v.t.q.z.o.x.w.k.v.t.u.v. v.f.h.e.q.b.x.n.p.v.i.s.m.p.h.z.m.q.t.u.w.x.j.y. k.e.e.v.l.t.i.f.
The recipient would begin by striking out every eighth letter. He would then shift back every letter 4, 2, 7, 6, 4, 2, &c.,
places respectively, and in reading it would leave out the letters j, q, and z as only marking the ends of words.
This is an excellent cipher, and it has the additional merit of not materially lengthening the message. It can be rendered still more difficult by arranging that either or both the clue-numbers shall be changed according to some definite scheme, and it may be further agreed that they shall change automatically every day or week.
A somewhat similar system was proposed by Wilkins (Mercury, by J. Wilkins, London, 1641, pp. 59, 60.). He took a key-word, such as prudentia, and constructed as many alphabets as there were letters in it, each alphabet being arranged cyclically and beginning respectively with the letters p , r , u , d , e , n , t , i , and a. He thus got a table like the following, giving nine possible letters which might stand for any letter of the alphabetExcept j; perhaps the cipher was intended for use with Latin.. Using this we may vary the
cipher in successive words or letters of the communication. Thus the message The prisoners have mutinied and seized the railway station would, according as the cipher changes in successive words or letters, read as Hwt fhziedvhi bupy pxwmqmhg erh ervmrq max zirteig station or as Hyy svvlwnthm lehx
uukzgmiq tvd gvcciq mqe frcoanr atpkcrr. I have taken Wilkins's key-word, but it is obvious that it would be desirable to omit a wherever it appears in it, since otherwise, if the cipher changes in successive words, some of the words may appear unaltered in the cipher, as is shown in the first of the examples given above.
tocsubsectionCiphers of the Fourth Type. Illustrations A cipher of the fourth type is one in which each letter is always represented by the same symbol, but more than one letter may be represented by the same symbol. Such ciphers were not uncommon at the beginning of the nineteenth century, and were usually framed by means of a key-sentence containing about as many letters as there are letters in the alphabet.
Thus if the key-phrase is The fox jumped over the garden gate, we write under it the letters of the alphabet in their usual sequence as shown below: .15em Then we write the message replacing a by t or a, b by h or t, c by e, d by f, and so on. Here is such a message. M foemho nea ge eoo jmdhohg avf teg ev ume afrmeo.
But it will be observed that in the cipher a may represent a or u, d may represent l or w, e may represent c or k or o or s or x, g may represent t or z, h may represent b or r, o may represent e or m, r may represent p or v, and t may represent a or b or q. And the recipient, in deciphering it, must judge as best he can which is the right meaning to be assigned to these letters when they appear.
An instance of a cipher of the fourth type is afforded by a note sent by the Duchess de Berri to her adherents in Paris, in which she employed the key phrase .15em Hence in putting her message into cipher she replaced a by l, b by e, c by g, and so on. She forgot however to supply the
key to the recipients of the message, but her friend Berryer had little difficulty in reading it by the aid of the rules I have indicated, and thence deduced the key-phrase she had employed.
Requisites in a good Cipher Having considered various classes of cryptographs and ciphers I may now consider what features we should regard as important in choosing a cipher intended for practical use.
In the first place, it is obvious that the means employed should be such as not to excite suspicion if the communication falls into unauthorized hands. But this is a counsel of perfection, and almost impossible to attain.
In the second place, we may say that, under modern conditions in war, finance, or diplomacy, a cipher may be useless unless it can be telegraphed or telephoned. If this is deemed important, it will practically restrict us to the use of the 26 letters of the alphabet, the 10 numerical symbols for the digits, to which if we like we may add a few additional marks such as punctuation stops, brackets, &c. The same condition will require that the message should not be unduly lengthened by being turned into cipher. Hence any considerable use of non-significant symbols is to be deprecated.
In the third place, the key to the cipher should be such that it can be easily reproduced from memory. For, if the key is so elaborate that those who use it are obliged to preserve it in some tangible and accessible form, unauthorized persons may obtain the power of reading messages. Hence the key should be reproducible at will. Further, it is desirable that the key should be of such a character that it (or a change of it) can be telegraphed or otherwise communicated without the probability of exciting suspicion.
In the fourth place, a cipher should be capable of change at short intervals. So that if the reading of one message in it be discovered subsequent messages may be undecipherable even though the system used is unaltered.
Lastly, no ambiguity should be possible in deciphering the communication. This will exclude ciphers of the fourth type.
Accordingly in choosing a good cipher we should seek for one in which only current letters, symbols, or words are employed; such that its use does not unduly lengthen the message; such that the key to it can be reproduced at will and need not be kept in a form which might betray the secret to an unauthorized person; such that the key to it changes or can be changed at short intervals; and such that it is not ambiguous. Many ciphers of the second and third types fulfil these conditions, but it is generally desirable to avoid ciphers of the first type unless circumstances permit of the free use of a code-book.
Cipher Machines The use of instruments giving a cipher, which is or can be varied constantly and automatically, has been often recommended. Several have been constructed on the lines of the well-known letter-locks (See, for instance, the descriptions of those devised by Sir Charles Wheatstone, given in his Scientific Papers, London, 1879, pp. 342--347; and by Capt. Bazeries in Comptes Rendus, Association Français pour l'avancement des sciences, vol. xx (Marseilles), 1891, p. 160,). The possession of the key of the instrument as well as a knowledge of the clue-word is necessary to enable anyone to read a message, but the risk of some instrument, when set, falling into unauthorized hands must be taken into account. Since equally good ciphers can be constructed without the use of mechanical devices I do not think their employment can be recommended.
Historical Ciphers This chapter has already run to such a length that I cannot find space to describe more than one or two ciphers that appear in history or fiction, but, we may say that until recently most of the historical ciphers are not difficult to read.
tocsubsectionJulius Caesar, Augustus It is said that Julius Caesar in making secret memoranda was accustomed to move every letter four places forward,
writing d for a, e for b, &c. This would be a very easy instance of a cipher of the first type, but it may have been effective at that time. His nephew Augustus sometimes used a similar cipher, in which each letter was moved forward one place (Of some of Caesar's correspondence, Suetonius says (cap. 56) si quis investigare et persequi velit, quartam elementorum literam, id est, d pro a, et perinde reliquas commutet. And of Augustus he says (cap. 88) quoties autem per notas scribit, b pro a, c pro b, ac deinceps eadem ratione, sequentes literas ponit; pro x autem duplex a.).
tocsubsectionBacon Bacon proposed a cipher in which each letter was denoted by a group of five letters consisting of A and B only. Since there are 32 such groups, he had 6 symbols to spare, which he could use to separate words or to which he could assign special meanings. A message in this cipher would be five times as long as the original message. This may be compared with the far superior system of the five (or four) digit codebook system in use at the present time.
tocsubsectionCharles I Charles I used ciphers freely in important correspondence--the majority being of the second type. He was foolish enough to take a cabinet containing many confidential letters in cipher, to some of which their readings were appended, on the field of Naseby, where they fell into the hands of Fairfax (First Report of the Royal Commission on Historical Manuscripts, 1870, pp. 2, 4.). The House of Commons sent them to a committee presided over by a Mr Tate. It is commonly believed that the Committee referred the papers to J. Wallis (See his letters on Cryptography, Opera, vol. iii, pp. 659--672.), then Fellow of Queens' College, Cambridge, and subsequently Savilian Professor at Oxford, who discovered the key to them. At any rate the letters were read.
In these ciphers each letter was represented by a number. The clues to some of the ciphers were provided by the King who had written over the number the letter which it represented, as shown in the following quotation:
.3em
The published letters show that the King used different ciphers at different times, though perhaps he used the same one in all correspondence with any particular person, but the general character of those he employed is the same. The sentence quoted above is taken from a letter from Queen Henrietta Maria of January 26, 1643. In this and another letter a few months later a is represented by 17 or 18, b by 13, c by 11 or 12, d by 5, e by 7 or 8 or 9 or 10, f by 15 or 16, g by 21, h by 31 or 32, i by 27 or 28, k by 25, l by 23 or 24, m by 42 or 44, n by 39 or 40 or 41, o by 35 or 36 or 37 or 38, p by 33 or 34, r by 50 or 51 or 52, s by 47 or 48, t by 45 or 46, u by 62 or 63, w by 58, and y by 74 or 77. Numbers of three digits were used to represent particular people or places. Thus 148 stood for France, 189 for the King, 260 for the Queen, 354 for Prince Rupert, and so on. Further, there were a few special symbols, thus k 1 stood for butOr maybe of, as in the preceding example., n 1 for to, and f 1 for is. The numbers 2 to 4 and 65 to 72 were non-significant, and were to be struck out or neglected by the recipient of the message. Each symbol is separated from that which follows it by a full-stop.
The Queen seems to have found writing in cipher a great trouble. In the letter from which I have already quoted a sentence she says que je suis extrement tourmantee du mal de teete qui fait que je mesteray en syfre par un autre se qui jovois fait moy mesme, and she uses the cipher only for the particular words it was desired to conceal. Thus she writes Mr Capell nous a fait voir que sy 27, 23, &c., &c. If by this she saved herself trouble, she did it at the cost of rendering the cipher much easier to read.
The system used by Charles was in considerable repute during the seventeenth century, but even without extraneous help it is possible for a diligent student to discover the key if the message is fairly long. An excellent illustration of this fact is to be found in the writings of the late Sir Charles Wheatstone. A paper in cipher, every page of which was initialled by Charles I, and countersigned by Lord Digby, was purchased some years ago by the British Museum. It was believed to be a state paper of importance. It consists of a series of numbers (about 150 different symbols being used) without any clue to their meaning, or any indication of a division between the words employed. The task of reading it was rendered the more difficult by the supposition, which proved incorrect, that the document was in English; but notwithstanding this, Sir Charles Wheatstone discovered the key (The document, its translation, and the key used are given in Wheatstone's Scientific Papers, London, 1879, pp. 321--341.). In this cipher a was represented by any of the numbers 12 , 13 , 14 , 15 , 16 , or 17 , b by 18 or 19 , and so on, while some 65 special words were represented by particular numbers.
I may note in passing that Charles also used a species of shorthand, in which the letters were represented by four strokes varying in length and position. Essentially the system is simple, though it is troublesome to read or write.
tocsubsectionPepys The famous diary of Samuel Pepys is commonly said to have been written in cipher, but in reality it is written in shorthand according to a system invented by T. Shelton (Tachy-graphy by T. Shelton. The earliest edition I have seen is dated 1641. A somewhat similar system by W. Cartwright was issued by J. Rich under the title Semographie, London, 1644.). It is however somewhat difficult to read, for the vowels are usually omitted, and Pepys used some arbitrary signs for terminations, particles, and certain words--so far turning it into a cipher. Further, in certain places, when the matter is such that it can hardly be expressed with decency, he changed
from English to a foreign language, or inserted non-significant letters. Shelton's system had been forgotten when attention was first attracted to the diary. Accordingly we may say that, to those who first tried to read it, it was written in cipher, but Pepys's contemporaries would have properly described it as being written in shorthand, though with a few modifications of his own invention.
A system of shorthand specially invented for the purpose is a true cipher. One such system in which each letter is represented either by a dot or by a line of constant length was used by the Earl of Glamorgan, better known by his subsequent title as Marquis of Worcester, in 1645, as also by Charles I. in some of his private correspondence. It is a cipher of the first type and has the defects inherent in almost every cipher of this kind: in fact Glamorgan's letter was deciphered, and the system discovered by Mr Dircks (Life of the Marquis of Worcester by H. Dircks, London, 1865. Worcester's system of shorthand was described by him in his Century of Inventions, London, 1663, sections 3, 4, 5.). Obsolete systems of shorthand (Various systems, including those used in classical and medieval times, are described in the History of Shorthand by T. Anderson, London, 1882.) might be thus used to form an effective cipher.
tocsubsectionDe Rohan It is always difficult to read a very short message in cipher, since necessarily the clues are few in number. When the Chevalier de Rohan was sent to the Bastille, on suspicion of treason, there was no evidence against him except what might be extracted from Monsieur Latruaumont. The latter died without making any admission. De Rohan's friends had arranged with him to communicate the result of Latruaumont's examination, and accordingly in sending him some fresh body linen they wrote on one of the shirts Mg dulhxcclgu ghj yxuj, lm ct ulgc alj.
For twenty-four hours de Rohan pored over the message, but, failing to read it, he admitted his guilt, and was executed November 27, 1674.
The cipher is a very simple one of the first type, but the communication is so short that unless the key were known it would not be easy to read it. Had de Rohan suspected that the second word was prisonnier, it would have given him 7 out of the 12 letters used, and as the first and third words suggest the symbols used for l and t, he could hardly have failed to read the message.
tocsubsectionMarie Antoinette The [following cipher][cipher ]Antoinette is said to have been employed by Marie Antoinette (The key is given, but without explanation, in Juniper Hall, by C. Hill, London, 1904, p. 13.). I take it that it was used in the method
indicated on page above. If so, the first word in the communication would be rewritten according to the scheme given in the first line, a being replaced by o, and vice versâ, b by p, and so on. The second word would be rewritten according to the scheme in the second line, and so on.
tocsubsectionThe Code Dictionary One of the modern systems is the five digit code-book cipher, to which I have already alluded. According to the general belief, it is frequently employed in certain official communications at the present day. A code dictionary is prepared in which every word likely to be used is printed, and the words are numbered consecutively 00000 , 00001... up, if necessary, to 99999. Thus each word is represented
by a number of five digits, and there are 10^5 such numbers available. The message is first written down in words. Below that it is written in numbers, each word being replaced by the number corresponding to it. To each of these numbers is added some definite prearranged clue-number--the words in the dictionary being assumed to be arranged cyclically, so that if the resulting number exceeds 10^5 it is denoted only by the excess above 10^5. The resulting numbers are sent as a message. On receipt of a message it is divided into consecutive groups of five numbers, each group representing a word. From each number is subtracted the prearranged clue-number, and then the message can be read off by the code dictionary. When a code message is published by the Government receiving it, the construction of the sentences is usually altered before publication, so that the key may not be discoverable by anyone in possession of the code-book or who has seen the cipher message. This is a rule applicable to all cryptographs and ciphers.
This is a cipher with 10^5 symbols, and as each symbol consists of five digits, a message of n words is denoted by 5n digits, and probably is not longer than the message when written in the ordinary way. Since however the number of words required is less than 10^5 , the spare numbers may be used to represent collocations of words which constantly occur, and if so the cipher message may be slightly shortened.
If the clue number is the same all through the message it would be possible by not more than 10^5 trials to discover the message. This is not a serious risk, but, slight though it is, it can be avoided if the clue number is varied; the clue number might, for instance, be 781 for the first three words, 791 for the next five words, 801 for the next seven words, and so on. Further it may be arranged that the clue numbers shall be changed every day; thus on the seventh day of the month they might be 781 , 791 , &c., and on the eighth day 881 , 891 , &c., and so on.
This cipher can however be further improved by inserting at some step, say after each m th digit, an unmeaning digit. For example, if, in the original message written in numbers, we insert a 9 after every seven digits we shall get a collection of words (each represented by five digits), most of which would have no connection with the original message, and probably the number of digits used in the message itself would no longer be a multiple of 5. Of course the receiver has only to reverse the process in order to read the message.
It is however unnecessary to use five symbols for each word. For if we make a similar code with the twenty-six letters of the alphabet instead of the ten digits, four letters for each word or phrase would give us 26^4 , that is, 456976 possible variations. Thus the message would be shorter and the power of the code increased. Further, if we like to use the ten digits and the twenty-six letters of the alphabet--all of which are easily telegraphed--we could, by only using three symbols, obtain 36^3 , that is, 46656 possible words, which would be sufficient for all practical purposes.
This code, at any rate with these modifications, is undecipherable by strangers, but it has the disadvantages that those who use it must always have the code dictionary available, and that it takes a considerable time to code or decode a communication. For practical purposes its use would be confined to communications which could be deciphered at leisure in an office, It is especially suitable in the case of
communications between officials, each supplied with a competent staff of secretaries or clerks--as from an ambassador to his chief, or a commander in the field to his war office. It is an excellent example of a cipher of the first type, but it is not clear that it possesses any superiority over some of the simple ciphers of the third type.
tocsubsectionPoe's Writings One of the best known writers on the subject of cryptographs and ciphers is E.A. Poe, indeed probably a good many readers have made their first acquaintance with a cipher in his story of The Gold Bug, the interest of which turns on reading a simple cipher of the first type. In earlier times J. Tritheim of Spanheim, G. Porta of Naples, Cardan, Niceron, and J. Wilkins occupied much the same position, while whenever ciphers were freely used skilful decipherers seem to have arisen.12pt
Poe wrote an essay on cryptography in which he said that it may be roundly asserted that human ingenuity cannot concoct a cipher which human ingenuity cannot resolve--a conclusion which is hardly justified by the known facts. In an earlier article he once made a similar remark so far as ciphers of the first class are concerned, with the implied limitation that only 26 symbols may be used. In this sense the observation is correct. His assertion excited some attention, and numerous communications in cipher were sent to him. More than one of his correspondents did not play the game fairly, not only employing foreign languages, but using several different ciphers in the same communication. Nevertheless he resolved all except one; and he proved that this last was a fraud, being merely a jargon of random characters, having no meaning whatever.
· · ·
End of part 13 of 16
Continue readingChapter XII: Hyper-space