Page 5 of The Code Book


  Another attempt to shore up the monoalphabetic substitution cipher involved the introduction of codewords. The term code has a very broad meaning in everyday language, and it is often used to describe any method for communicating in secret. However, as mentioned in the Introduction, it actually has a very specific meaning, and applies only to a certain form of substitution. So far we have concentrated on the idea of a substitution cipher, whereby each letter is replaced by a different letter, number or symbol. However, it is also possible to have substitution at a much higher level, whereby each word is represented by another word or symbol—this would be a code. For example,

  Technically, a code is defined as substitution at the level of words or phrases, whereas a cipher is defined as substitution at the level of letters. Hence the term encipher means to scramble a message using a cipher, while encode means to scramble a message using a code. Similarly, the term decipher applies to unscrambling an enciphered message, and decode to unscrambling an encoded message. The terms encrypt and decrypt are more general, and cover scrambling and unscrambling with respect to both codes and ciphers. Figure 7 presents a brief summary of these definitions. In general, I shall keep to these definitions, but when the sense is clear, I might use a term such as “codebreaking” to describe a process that is really “cipher breaking”-the latter phrase might be technically accurate, but the former phrase is widely accepted.

  Figure 7 The science of secret writing and its main branches.

  At first sight, codes seem to offer more security than ciphers, because words are much less vulnerable to frequency analysis than letters. To decipher a monoalphabetic cipher you need only identify the true value of each of the 26 characters, whereas to decipher a code you need to identify the true value of hundreds or even thousands of codewords. However, if we examine codes in more detail, we see that they suffer from two major practical failings when compared with ciphers. First, once the sender and receiver have agreed upon the 26 letters in the cipher alphabet (the key), they can encipher any message, but to achieve the same level of flexibility using a code they would need to go through the painstaking task of defining a codeword for every one of the thousands of possible plaintext words. The codebook would consist of hundreds of pages, and would look something like a dictionary. In other words, compiling a codebook is a major task, and carrying it around is a major inconvenience.

  Second, the consequences of having a codebook captured by the enemy are devastating. Immediately, all the encoded communications would become transparent to the enemy. The senders and receivers would have to go through the painstaking process of having to compile an entirely new codebook, and then this hefty new tome would have to be distributed to everyone in the communications network, which might mean securely transporting it to every ambassador in every state. In comparison, if the enemy succeeds in capturing a cipher key, then it is relatively easy to compile a new cipher alphabet of 26 letters, which can be memorized and easily distributed.

  Even in the sixteenth century, cryptographers appreciated the inherent weaknesses of codes, and instead relied largely on ciphers, or sometimes nomenclators. A nomenclator is a system of encryption that relies on a cipher alphabet, which is used to encrypt the majority of a message, and a limited list of codewords. For example, a nomenclator book might consist of a front page containing the cipher alphabet, and then a second page containing a list of codewords. Despite the addition of codewords, a nomenclator is not much more secure than a straightforward cipher, because the bulk of a message can be deciphered using frequency analysis, and the remaining encoded words can be guessed from the context.

  As well as coping with the introduction of the nomenclator, the best cryptanalysts were also capable of dealing with badly spelled messages and the presence of nulls. In short, they were able to break the majority of encrypted messages. Their skills provided a steady flow of uncovered secrets, which influenced the decisions of their masters and mistresses, thereby affecting Europe’s history at critical moments.

  Nowhere is the impact of cryptanalysis more dramatically illustrated than in the case of Mary Queen of Scots. The outcome of her trial depended wholly on the battle between her codemakers and Queen Elizabeth’s codebreakers. Mary was one of the most significant figures of the sixteenth century-Queen of Scotland, Queen of France, pretender to the English throne-yet her fate would be decided by a slip of paper, the message it bore, and whether or not that message could be deciphered.

  The Babington Plot

  On November 24, 1542, the English forces of Henry VIII demolished the Scottish army at the Battle of Solway Moss. It appeared that Henry was on the verge of conquering Scotland and stealing the crown of King James V. After the battle, the distraught Scottish king suffered a complete mental and physical breakdown, and withdrew to the palace at Falkland. Even the birth of a daughter, Mary, just two weeks later could not revive the ailing king. It was as if he had been waiting for news of an heir so that he could die in peace, safe in the knowledge that he had done his duty. Just a week after Mary’s birth, King James V, still only thirty years old, died. The baby princess had become Mary Queen of Scots.

  Mary was born prematurely, and initially there was considerable concern that she would not survive. Rumors in England suggested that the baby had died, but this was merely wishful thinking at the English court, which was keen to hear any news that might destabilize Scotland. In fact, Mary soon grew strong and healthy, and at the age of nine months, on September 9, 1543, she was crowned in the chapel of Stirling Castle, surrounded by three earls, bearing on her behalf the royal crown, scepter and sword.

  The fact that Queen Mary was so young offered Scotland a respite from English incursions. It would have been deemed unchivalrous had Henry VIII attempted to invade the country of a recently dead king, now under the rule of an infant queen. Instead, the English king decided on a policy of wooing Mary in the hope of arranging a marriage between her and his son Edward, thereby uniting the two nations under a Tudor sovereign. He began his maneuvering by releasing the Scottish nobles captured at Solway Moss, on the condition that they campaign in favor of a union with England.

  However, after considering Henry’s offer, the Scottish court rejected it in favor of a marriage to Francis, the dauphin of France. Scotland was choosing to ally itself with a fellow Roman Catholic nation, a decision which pleased Mary’s mother, Mary of Guise, whose own marriage with James V had been intended to cement the relationship between Scotland and France. Mary and Francis were still children, but the plan for the future was that they would eventually marry, and Francis would ascend the throne of France with Mary as his queen, thereby uniting Scotland and France. In the meantime, France would defend Scotland against any English onslaught.

  The promise of protection was reassuring, particularly as Henry VIII had switched from diplomacy to intimidation in order to persuade the Scots that his own son was a more worthy groom for Mary Queen of Scots. His forces committed acts of piracy, destroyed crops, burned villages and attacked towns and cities along the border. The “rough wooing,” as it is known, continued even after Henry’s death in 1547. Under the auspices of his son, King Edward VI (the would-be suitor), the attacks culminated in the Battle of Pinkie Cleugh, in which the Scottish army was routed. As a result of this slaughter it was decided that, for her own safety, Mary should leave for France, beyond the reach of the English threat, where she could prepare for her marriage to Francis. On August 7, 1548, at the age of six, she set sail for the port of Roscoff.

  Mary’s first few years in the French court would be the most idyllic time of her life. She was surrounded by luxury, protected from harm, and she grew to love her future husband, the dauphin. At the age of sixteen they married, and the following year Francis and Mary became King and Queen of France. Everything seemed set for her triumphant return to Scotland, until her husband, who had always suffered from poor health, fell gravely ill. An ear infection that he had nursed since a child had worsened, the inflammatio
n spread toward his brain, and an abscess began to develop. In 1560, within a year of being crowned, Francis was dead and Mary was widowed.

  From this point onward, Mary’s life would be repeatedly struck by tragedy. She returned to Scotland in 1561, where she discovered a transformed nation. During her long absence Mary had confirmed her Catholic faith, while her Scottish subjects had increasingly moved toward the Protestant church. Mary tolerated the wishes of the majority and at first reigned with relative success, but in 1565 she married her cousin, Henry Stewart, the Earl of Darnley, an act that led to a spiral of decline. Darnley was a vicious and brutal man whose ruthless greed for power lost Mary the loyalty of the Scottish nobles. The following year Mary witnessed for herself the full horror of her husband’s barbaric nature when he murdered David Riccio, her secretary, in front of her. It became clear to everyone that for the sake of Scotland it was necessary to get rid of Darnley. Historians debate whether it was Mary or the Scottish nobles who instigated the plot, but on the night of February 9, 1567, Darnley’s house was blown up and, as he attempted to escape, he was strangled. The only good to come from the marriage was a son and heir, James.

  Mary’s next marriage, to James Hepburn, the Fourth Earl of Bothwell, was hardly more successful. By the summer of 1567 the Protestant Scottish nobles had become completely disillusioned with their Catholic Queen, and they exiled Bothwell and imprisoned Mary, forcing her to abdicate in favor of her fourteen-month-old son, James VI, while her half-brother, the Earl of Moray, acted as regent. The next year, Mary escaped from her prison, gathered an army of six thousand royalists, and made a final attempt to regain her crown. Her soldiers confronted the regent’s army at the small village of Langside, near Glasgow, and Mary witnessed the battle from a nearby hilltop. Although her troops were greater in number, they lacked discipline, and Mary watched as they were torn apart. When defeat was inevitable, she fled. Ideally she would have headed east to the coast, and then on to France, but this would have meant crossing territory loyal to her half-brother, and so instead she headed south to England, where she hoped that her cousin Queen Elizabeth I would provide refuge.

  Mary had made a terrible misjudgment. Elizabeth offered Mary nothing more than another prison. The official reason for her arrest was in connection with the murder of Darnley, but the true reason was that Mary posed a threat to Elizabeth, because English Catholics considered Mary to be the true queen of England. Through her grandmother, Margaret Tudor, the elder sister of Henry VIII, Mary did indeed have a claim to the throne, but Henry’s last surviving offspring, Elizabeth I, would seem to have a prior claim. However, according to Catholics, Elizabeth was illegitimate because she was the daughter of Anne Boleyn, Henry’s second wife after he had divorced Catherine of Aragon in defiance of the Pope. English Catholics did not recognize Henry VIII’s divorce, they did not acknowledge his ensuing marriage to Anne Boleyn, and they certainly did not accept their daughter Elizabeth as Queen. Catholics saw Elizabeth as a bastard usurper.

  Mary was imprisoned in a series of castles and manors. Although Elizabeth thought of her as one of the most dangerous figures in England, many Englishmen admitted that they admired her gracious manner, her obvious intelligence and her great beauty. William Cecil, Elizabeth’s Great Minister, commented on “her cunning and sugared entertainment of all men,” and Nicholas White, Cecil’s emissary, made a similar observation: “She hath withal an alluring grace, a pretty Scotch accent, and a searching wit, clouded with mildness.” But, as each year passed, her appearance waned, her health deteriorated and she began to lose hope. Her jailer, Sir Amyas Paulet, a Puritan, was immune to her charms, and treated her with increasing harshness.

  By 1586, after 18 years of imprisonment, she had lost all her privileges. She was confined to Chartley Hall in Staffordshire, and was no longer allowed to take the waters at Buxton, which had previously helped to alleviate her frequent illnesses. On her last visit to Buxton she used a diamond to inscribe a message on a windowpane: “Buxton, whose warm waters have made thy name famous, perchance I shall visit thee no more—Farewell.” It appears that she suspected that she was about to lose what little freedom she had. Mary’s growing sorrow was compounded by the actions of her nineteen-year-old son, King James VI of Scotland. She had always hoped that one day she would escape and return to Scotland to share power with her son, whom she had not seen since he was one year old. However, James felt no such affection for his mother. He had been brought up by Mary’s enemies, who had taught James that his mother had murdered his father in order to marry her lover. James despised her, and feared that if she returned then she might seize his crown. His hatred toward Mary was demonstrated by the fact that he had no qualms in seeking a marriage with Elizabeth I, the woman responsible for his mother’s imprisonment (and who was also thirty years his senior). Elizabeth declined the offer.

  Mary wrote to her son in an attempt to win him over, but her letters never reached the Scottish border. By this stage, Mary was more isolated then ever before: all her outgoing letters were confiscated, and any incoming correspondence was kept by her jailer. Mary’s morale was at its lowest, and it seemed that all hope was lost. It was under these severe and desperate circumstances that, on January 6, 1586, she received an astonishing package of letters.

  The letters were from Mary’s supporters on the Continent, and they had been smuggled into her prison by Gilbert Gifford, a Catholic who had left England in 1577 and trained as a priest at the English College in Rome. Upon returning to England in 1585, apparently keen to serve Mary, he immediately approached the French Embassy in London, where a pile of correspondence had accumulated. The Embassy had known that if they forwarded the letters by the formal route, Mary would never see them. However Gifford claimed that he could smuggle the letters into Chartley Hall, and sure enough he lived up to his word. This delivery was the first of many, and Gifford began a career as a courier, not only passing messages to Mary but also collecting her replies. He had a rather cunning way of sneaking letters into Chartley Hall. He took the messages to a local brewer, who wrapped them in a leather packet, which was then hidden inside a hollow bung used to seal a barrel of beer. The brewer would deliver the barrel to Chartley Hall, whereupon one of Mary’s servants would open the bung and take the contents to the Queen of Scots. The process worked equally well for getting messages out of Chartley Hall.

  Meanwhile, unknown to Mary, a plan to rescue her was being hatched in the taverns of London. At the center of the plot was Anthony Babington, aged just twenty-four but already well known in the city as a handsome, charming and witty bon viveur. What his many admiring contemporaries failed to appreciate was that Babington deeply resented the establishment, which had persecuted him, his family and his faith. The state’s anti-Catholic policies had reached new heights of horror, with priests being accused of treason, and anybody caught harboring them punished by the rack, mutilation and disemboweling while still alive. The Catholic mass was officially banned, and families who remained loyal to the Pope were forced to pay crippling taxes. Babington’s animosity was fueled by the death of Lord Darcy, his great-grandfather, who was beheaded for his involvement in the Pilgrimage of Grace, a Catholic uprising against Henry VIII.

  The conspiracy began one evening in March 1586, when Babington and six confidants gathered in The Plough, an inn outside Temple Bar. As the historian Philip Caraman observed, “He drew to himself by the force of his exceptional charm and personality many young Catholic gentlemen of his own standing, gallant, adventurous and daring in defense of the Catholic faith in its day of stress; and ready for any arduous enterprise whatsoever that might advance the common Catholic cause.” Over the next few months an ambitious plan emerged to free Mary Queen of Scots, assassinate Queen Elizabeth and incite a rebellion supported by an invasion from abroad.

  The conspirators were agreed that the Babington Plot, as it became known, could not proceed without the blessing of Mary, but there was no apparent way to communicate with her. Then, on
July 6, 1586, Gifford arrived on Babington’s doorstep. He delivered a letter from Mary, explaining that she had heard about Babington via her supporters in Paris, and looked forward to hearing from him. In reply, Babington compiled a detailed letter in which he outlined his scheme, including a reference to the excommunication of Elizabeth by Pope Pius V in 1570, which he believed legitimized her assassination.

  Myself with ten gentlemen and a hundred of our followers will undertake the delivery of your royal person from the hands of your enemies. For the dispatch of the usurper, from the obedience of whom we are by the excommunication of her made free, there be six noble gentlemen, all my private friends, who for the zeal they bear to the Catholic cause and your Majesty’s service will undertake that tragical execution.

  As before, Gifford used his trick of putting the message in the bung of a beer barrel in order to sneak it past Mary’s guards. This can be considered a form of steganography, because the letter was being hidden. As an extra precaution, Babington enciphered his letter so that even if it was intercepted by Mary’s jailer, it would be indecipherable and the plot would not be uncovered. He used a cipher which was not a simple monoalphabetic substitution, but rather a nomenclator, as shown in Figure 8. It consisted of 23 symbols that were to be substituted for the letters of the alphabet (excluding j, v and w), along with 35 symbols representing words or phrases. In addition, there were four nulls () and a symbol which signified that the next symbol represents a double letter (“dowbleth”).