The codebooks of Napoleon I () ()

My crypto Home page

The legacy of royalty

Since the Renaissance, in Europe, encryption has protected mail exchanged between the central power and the embassies and general staff of the army. In France, at the end of the reign of Louis XIV, Rossignol invents the two-part codes. This technique is used by the successors of the Sun King (Louis XV, Louis XVI) but is also spreading throughout Europe. The generals of the revolution and Napoleon inherited this technology and it is this technology that is used almost exclusively for encryption.

Several codes exist, the Great and the Small Cipher

To ensure code security. These have a limited lifespan and a particular use. So for example the code used by Napoleon to communicate with Marshal Davout is commissioned on August 23, 1813 and is withdrawn on December 1 of the same year.

Depending on the level of security desired, a codebook uses a variable number of codegroups. Each codegroup corresponds to either a letter, a set of letters or even a complete word. To have maximum security, codes of more than a thousand codegroups are used. They are called the "Grand Chiffre" (Great Cipher). For example, the code used during the campaign in Spain in 1812 was 1200 codegroups. They are typically used by the Emperor himself or by the general staff for exchange with his main generals. Other codes, made up of only a few hundred groups, are called "Petit Chiffre" (Small Cipher). They are for example used for correspondance between two generals.

Note: the 1812 code has undergone additions: groups from 1201 to 1400. The additions were often handwritten at the end of the encrypting table and essentially contained proper names associated specifically with the use of the code (here the war in Spain).

Concrete examples

In the archives of the French army, I found a manual that teaches a cipher clerk how to encode and decode a message. This manual was accompanied by encryption and decryption tables. This information allows to understand concretely the functioning of codebooks. This code book was used for Hundred days in 1815.

Commander Bazeries is known to have reconstructed one of the Great Cipher of Louis XIV. He also attacked several cryptograms of the Napoleonic era. We present excerpts from his decipherments. One concerns several letters encrypted using a Great Cipher dating from 1813. It was used for communication between the Emperor and Marshal Davout. Another example, using a small cipher, also dates from 1813. It was used to ensure communication between Generals Berthier and Augereau.

A poorly mastered technique, Scovell and the Spanish campaign

If we look at cryptograms from the Revolutionary or Napoleonic era, we can see that cipher clerks are less competent than their predecessors from the royal era. One may wonder the reason. In my opinion, the revolution to turn the hushed world of encryption firms upside down. Cipher clerks were instructed by codebooks designers who also decrypted enemy messages and could tell cipher clerks what mistakes not to make. This culture was lost during the revolution. Educated cipher clerks and code breakers have gone out into the wild.

The biggest mistake is the mixture of plain text and cipher text. On its own, this practice can completely jeopardise a codebook. A well-educated cipher clerk should not make this mistake. The extracts published by Bazeries swarm with this misuse.

Other security breaches can be observed during the Napoleonic era:

  • The same text encrypted in several copies and each time encrypted differently.
  • The stapling of plain text and cipher text.
  • Finally, unlike in the royal era, there are no more tables in reserve.

The errors of the French cipher clerks made it possible for Scovell, an officer in Wellington's army, to decipher important missives during the campaign in Spain in 1812.

The deciphering table of the codebook used during this campaign and partly reconstructed by Scovell is present in the archives of the SHD.

An exceptional document

In 2021, Mr. Karsten Hansky bought at auction a partly encrypted letter dating from the period of the campaign in Spain of 1812. Such a handwritten letter is very rare outside the national archives.

Mr. Karsten Hansky has given me permission to publish this letter and his work on it. His document is available in English and German.


  • Les Chiffres secrets dévoilés, par le Commandant BAZERIES, PARIS: Librairie Charpentier et Fasquelle, 1901.
  • Les chiffres de Napoléon 1er, par le Commandant BAZERIES, PARIS, M. Bourges, 1896.
  • The man who broke Napoleon’s codes. The story of George Scovell. Mark Urban, Faber and Faber. 2001.
  • Great Ciphers of Napoleon's Grande Armée (Cryptania)
  • The National Archives: General Scovell (1774-1861) (Secret & Spy)