“Of course, it helped us a lot that we always knew your emperor's intentions from his own dispatches. During the last operations in the country there was a lot of discontent, and we managed to capture a lot of dispatches,"
- this is how Emperor Alexander I tried to console the French Marshal Etienne MacDonald in 1812.
When the commander asked Alexander I about the sources of information about the ciphers, hinting that the Russians had simply stolen the keys, the emperor exclaimed:
“Not at all! I give you my word of honor that nothing like this took place. We just decoded them."
This conversation, quoted by the American historian Fletcher Pratt, very eloquently shows what role Russian cryptographers played in the victory over the most powerful army in the world.
Together with Napoleonic France, Russia entered the eve of war with a sufficiently developed cryptographic service. In the newly formed Ministry of Foreign Affairs, three secret expeditions were created in 1802, which were later renamed branches. In the first two, digital, they were engaged in encryption and decryption, and in the third, they looked through correspondence. Civilian or "unclassified" expeditions were responsible for contacts with Asia (1st expedition), correspondence with the Constantinople mission (2nd expedition), issuance of foreign passports, "correspondence in French with ministers" (3rd expedition), and dealt with notes and other correspondence from foreign ambassadors (4th expedition). The main character in the secret work of the Ministry of Foreign Affairs was the Director of the Chancellery, which since 1809 was headed by Andrei Andreevich Zherve, who had previously headed the first digital expedition.
As in France, the special services of the Russian Empire used two types of ciphers, differing in the level of cryptographic strength - general and individual. The former were intended for routine work with several recipients at once, usually within a country or region. And individual codes were for communication with officials of the highest government levels. In terms of their complexity, such cryptographic systems were not much more complicated than the French ones, but their protection was incomparably better organized - dispatches rarely fell into the hands of the enemy. At the same time, it is worth remembering that the cipher clerks moved away from the manual writing of encoded texts - the Ministry of Foreign Affairs had a modern lithograph at that time, which allowed printing. But the cryptographically protected dispatches had to be somehow delivered to the addressees. This was previously taken care of by Emperor Paul I, when on December 12, 1796, he established the Courier Corps, consisting initially of one officer and 13 couriers. Over time, the staff of this department will significantly expand, and the functionality will include the delivery of correspondence not only to addressees in Russia, but also abroad. In wartime, it was the couriers who ensured the uninterrupted and prompt delivery of especially important documents from the headquarters of Emperor Alexander I.
Simultaneously with the courier service, the Higher Military Police appeared in Russia, which in many respects performed counterintelligence functions in the active army. It was the specialists of this unit who ensured the protection of information exchanged by the highest military-political ranks. In this case, several approaches were used. First of all, whenever there was any suspicion of discrediting or replacing an agent, it was necessary to change the "tsifiri" for new ones. When sending especially important dispatches, the Higher Military Police demanded that at least three copies be sent with three different couriers along different routes, which practically guaranteed protection from interceptions. In case of extreme urgency when sending letters, when it was impossible to use encryption, writing in sympathetic ink was allowed, but strictly only with those "which will be delivered from the Headquarters."
Among the measures that allowed Russia to successfully resist the Napoleonic army on an invisible front, one can single out the creation in February 1812 of the Ministry of War, which included the Special Chancellery. The head of the chancellery, which actually became the first foreign intelligence body of its kind, was Alexei Voeikov, who began his career as an orderly for Alexander Suvorov. The most important agent of the Russian special services in Paris even before the war was Alexander Ivanovich Chernyshev - he not only successfully recruited employees of the French Foreign Ministry, but managed to supply Napoleon himself with fake cards of Russia. This seriously slowed down the path of the French to Moscow.
In cryptographic terms, France was a fairly easy object of study for the Russian special services - domestic decoders and perlustrators have been reading the secret correspondence of the French since the middle of the 18th century. At the same time, Napoleon himself was surrounded by agents supplying the Russian imperial court with information of strategic importance. One of these was Foreign Minister Charles Talleyrand, who offered his services to Alexander I back in 1808. Talleyrand leaked everything - the internal and external affairs of the country, the combat readiness and size of the army, as well as the date of the attack on Russia. There is little information in historical sources about whether the French Foreign Minister disclosed the decryption keys to Russian messengers, but the likelihood of this was high. Still, Talleyrand had access to encryption of the entire diplomatic mail of France and could share the keys with Alexander I for an acceptable fee. However, as soon as the corrupt Frenchman offered his services to Austria (and even raised prices to the skies), the Russians gradually curtailed contacts with him.
Dmitry Larin, Candidate of Technical Sciences, Associate Professor of the MIREA Department, in one of his articles quotes the words that characterize Talleyrand very well:
"The main quality of money is its quantity."
In France, the name Talleyrand is still associated with venality, greed and unscrupulousness.
The whole range of measures of the special services allowed Russia to successfully prepare for the invasion of Napoleon and always be several steps ahead of the enemy.
Napoleon loses the initiative
The Emperor of France paradoxically ignored the cryptographic service in the army. One of the historians of France wrote:
"This military genius certainly did not attach much importance to cryptography, although in these matters he was not a completely limited person, as some historians have characterized him."
At the same time, Napoleon was definitely let down by his too arrogant attitude towards the Russian people - he seriously believed that his codes could not be revealed to backward eastern neighbors.
At the same time, the intelligence agencies under the emperor were in the prime of their influence. In 1796, an intelligence and counterintelligence "Secret Bureau" was formed under the leadership of Jean Landre. The department had many branches throughout Europe, but in Russia it was not possible to create anything like that. Napoleon also had his own "Black Cabinets" under the direction of the postmaster Antoine Lavalette. This Lavalette deserves a separate mention. The fact is that with the restoration of the Bourbons, the former chief of the post office and the entire perlustration of France, naturally, they decided to execute. And literally the day before, his wife came to the unfortunate's cell, who changed dresses with Lavalette and he left the prison unharmed in a woman's dress. Of course, no one decapitated his wife, but they did not release her from captivity either - she went mad in prison.
But back to the cryptographers of Napoleon, who used several ciphers in their practice. The simplest ones were intended for the exchange of information between small army units, and the so-called Small and Large ciphers of the emperor served to communicate Napoleon with important military leaders. Needless to say, Russian cryptanalysts read all the correspondence of the French emperor? In many ways, this was aided by the carelessness with which dispatches were encrypted in the army. Often, in the intercepted French documents, only the most important content was encrypted, the rest was written in plain text, which greatly simplified the "cracking" of the encoding. And in the Moscow fire, Napoleon's keys to the ciphers generally burned out, so for some time they also had to use the plain text. The extended communications of the French troops became a real scourge for Napoleon's correspondence to France. Partisans and flying detachments of Russian hussars intercepted a considerable part of the letters of the military leadership to their homeland and controlled units. One of the most effective "interceptors" was Denis Davydov, who with enviable regularity sent reports to the center about the deployment of French troops, their numbers and leadership plans.
The information war unleashed by the Russians turned out to be effective against Napoleon. So, with the advance of the French on Russia, the emperor was immediately declared outside the church and called the antichrist. This virtually closed all attempts by the French to persuade the local population to their side and made it impossible to recruit spies. Even for the most insane money, it was not possible to find intelligence officers who would agree to infiltrate Moscow or St. Petersburg.
“The emperor complained all the time that he could not get information about what was happening in Russia. And in fact, nothing reached us from there; not a single secret agent dared to get there. For no amount of money it was impossible to find a person who would agree to go to Petersburg or get into the Russian army. The only enemy troops with whom we came into contact were the Cossacks; no matter how much the emperor wanted to get a few prisoners in order to get any information about the army from them, we were not able to capture prisoners during skirmishes … And since not a single spy dared to get into the location of the Russian army, we did not know what was happening there, and the emperor was deprived of any information , - wrote the French diplomat Armand Colencourt in his memoirs.
More or less it was possible to negotiate the delivery of secret dispatches to France - the average price for such a trip was 2,500 francs.
In the end, I will give an example of the successful interception and decryption of the order of the Marshal of the Empire Louis Berthier to one of his generals on October 5, 1812. Such a valuable letter (it said about the redeployment of all the equipment and equipment of the army to the Mozhaisk road) was taken by a detachment of Colonel Kudashev. Kutuzov immediately stopped the pursuit of the remnants of Marshal Murat's undead units and blocked the Kaluga road. This blocked the road to the south for the French, and they were forced to retreat along the Smolensk road. And this area was previously plundered and devastated by them …