All public Sources
Public document

Mathematical Recreations and Essays

PDF document375 original pagesAdded to Pandi 6 November 2026
AskTalkView media
Reading progressPage 59 of 81
The fox jumped over the garden gate.
a b c d e f g h i j k l m n o p q r s t u v w x y z a b c.

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

le gouvernement provisoire.
ab c d e f g h i j k l m n o p q r s t u v w x y.

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.

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.

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*. 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.

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.

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†.

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.

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


  • 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. Bazines in Comptes Rendus, Association Francais pour l’avancement des sciences, vol. xx (Marseilles), 1891, p. 160, et seq.

† 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.

readings were appended, on the field of Naseby, where they fell into the hands of Fairfax*. 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†, 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:

catolicksinF
1118453523271125472840148haue layed
thirpursestogether
453127513362504774845352174632751
forsuplyofarmes.– – –
153550a4762332374k1175142747.– – –

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 aa is represented by 17 or 18, bb by 13, cc by 11 or 12, dd by 5, ee by 7 or 8 or 9 or 10, ff by 15 or 16, gg by 21, hh by 31 or 32, ii by 27 or 28, kk by 25, ll by 23 or 24, mm by 42 or 44, nn by 39 or 40 or 41, oo by 35 or 36 or 37 or 38, pp by 33 or 34, rr by 50 or 51 or 52, ss by 47 or 48, tt by 45 or 46, uu by 62 or 63, ww by 58, and yy 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 k1k1 stood for but, n1n1 for to, and f1f1 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.


* First Report of the Royal Commission on Historical Manuscripts, 1870, pp. 2, 4.

† See his letters on Cryptography, Opera, vol. III, pp. 659–672.

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 extremement 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*. 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.

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†. 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


Continue reading
Page 59 of 81