The Great Cipher (French: Grand chiffre) was a nomenclator cipher developed by the Rossignols, several generations of whom served the French monarchs as cryptographers. The Great Cipher was so named because of its excellence and because it was reputed to be unbreakable.

Modified forms were in use by the French Peninsular army until the summer of 1811. After it fell out of current use, many documents in the French archives were unreadable until it was decoded.

Historical background 
Antoine Rossignol's cryptographic skills became known in 1626, when an encrypted letter was taken from a messenger leaving the city of Réalmont, controlled by the Huguenots and surrounded by the French army. The letter stated that the Huguenots would not be able to hold on to the city for much longer, and by the end of the day, Rossignol had successfully deciphered it. The French returned the letter with the deciphered message and forced the Huguenots to surrender. He and his son, Bonaventure Rossignol, were soon appointed to prominent roles in the court.

Together, the two devised a cipher so strong that it baffled cryptanalysts for centuries. Commandant Étienne Bazeries managed to break the cipher around 1893 over a period of three years by realising that each number stood for a French syllable, rather than single letters, unlike traditional ciphers. He guessed that a particular sequence of repeated numbers, 124-22-125-46-345, stood for les ennemis ("the enemies") and from that information was able to unravel the entire cipher.

The Man in the Iron Mask 

In one of the encrypted letters between Louis XIV and his marshal Nicolas de Catinat appeared a possible solution to the mystery of the Man in the Iron Mask. The letter concerned a general named Vivien de Bulonde who was to attack the Italian town of Cuneo but instead fled, fearing the arrival of the Austrians, and consequently put in serious danger the success of the entire French campaign in Piedmont. The letter said:

His Majesty knows better than any other person the consequences of this act, and he is also aware of how deeply our failure to take the place will prejudice our cause, a failure which must be repaired during the winter. His Majesty desires that you immediately arrest General Bulonde and cause him to be conducted to the fortress of Pignerole, where he will be locked in a cell under guard at night, and permitted to walk the battlement during the day with a 330 309.

The "330" and "309" codegroups appeared only once in the correspondence, so it is impossible to confirm what they stand for. Bazeries verified General Bulonde was disgraced and removed from command, so he reasoned 330 and 309 stood for masque and a full stop. However, none of the cipher variants used in the Iron Mask period included masque, an unlikely word to include in the cipher's small repertory.

Technical nature 

The basis of the code cracked by Bazeries was a set of 587 numbers that stood for syllables. There were other variations, and Louis XIV's overseas ministers were sent different code sheets that encrypted not only syllables but also letters and words. To counter frequency analysis, some number sets were "nulls", meant to be ignored by the intended recipient. Others were traps, including a codegroup that meant to ignore the previous codegroup. 

As a nomenclator cipher, the Great Cipher replaced the names of key generals such as Auguste de Marmont, references to les ennemis and other sensitive terms with homophonic substitutions. Code sheets included alternative digits to modify the gender or letter case and so the rules of French composition held true to encryptions as well. Since e is the most commonly used letter in French, the Cipher typically allocated the most code numbers to writing that vowel. In one nomenclature, 131 out of the 711 code numbers stood for e.

References

Sources 
 Kahn, David. "The Man in Iron Mask -- Encore et Efin, Cryptologically." Cryptologia, January 2005, Volume XXIX, Number 1.
 Singh, Simon. The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography. New York: Anchor Books, 1999. .
 Urban, Mark. "The Blockade of Ciudad Rodrigo, June to November 1811 - The Great Cipher." in The Man Who Broke Napoleon's Codes. Harper Perennial, 2003. .

Classical ciphers
17th century in France
Man in the Iron Mask