Over time, designations for syllables, words and even whole phrases that were used most often began to be added to the classical alphabet of replacements. Such nomenclatures were quite primitive: they contained a special vocabulary called "supplement", consisting of a small number of words, which included proper names, geographical designations or other stable phrases.
A typical cipher of the Petrine era was a handwritten key of the replacement table, where, usually, the corresponding elements of the cipher alphabet were signed under horizontally arranged Cyrillic letters in alphabetical order. Sometimes the supplement was separately recorded along with dummies and brief rules for using the cipher. You could also find cipher alphabets made up of a hellish mixture of numbers, several alphabets, and the like. So, in a letter that Peter personally wrote in June 1708 and encrypted on his own, Russian, Latin, Greek letters, Arabic numerals and even specially invented signs were used. By the way, the tsar wrote to Prince Dolgoruky an assignment to suppress the peasant uprising of K. Bulavin in the southern part of Russia. Peter 1 began his epistle as follows: ““Mister Mayor. Your letters reached me, from which I understood that you intend both regiments, that is, Kropotov's dragoon regiments and those from Kiev, to keep with you, to which I will answer that if it is dangerous to pass through Azov, then keep, not moshkav, of course, send it to Taganrog. Also, there is a withdrawal of your letters, which is somewhat slow, that we are not terribly pleased when you wait for our battalion and the Ingermonland and Bilsov regiments, then immediately … … This technique made it possible to encrypt and subsequently decrypt messages faster.
One of the most important users of the ciphers of the Petrine era was, of course, the diplomatic department. In particular, in August 1699, Peter I sent a delegation to Constantinople to sign a peace treaty with the Turks. This was necessary to guarantee the inviolability of Russia's southern borders in the planned war with Sweden, which was needed for access to the Baltic Sea. Such an important mission to conclude a peace treaty with Constantinople was entrusted to Yemelyan Ignatievich Ukraintsev, a famous Russian diplomat. To ostracize, Peter I put the entire delegation on the powerful 30-gun ship "Fortress", and for escort gave it smaller-scale "Strength", "Opened Gates", "Color of War", "Scorpio" and "Mercury". Such power and diplomatic skills were able to persuade the Turks to peace only by July 3, 1700 for a period of 30 years. And here, in all its glory, the skills of the cipher clerks of Peter I came in handy. On the day of the signing of the treaty, Ukrainians sent an encrypted message by couriers, which went to Moscow for 36 long days. As soon as Peter received the long-awaited news, he declared war on Sweden the next day. Later, Peter I sent to Turkey the first permanent diplomatic representative abroad in the history of Russia, Pyotr Andreyevich Tolstoy. And he sent it for a reason, but provided him with a specific digital alphabet or, in modern language, a cipher. Tolstoy was entrusted with a very serious mission - to monitor the changeable mood of the Sultan and at any time to notify Peter about the possible withdrawal of Turkey from the peace treaty. Tolstoy's cipher was based on a simple replacement and dated back to 1700. The Cyrillic alphabet in it was replaced by simple characters and was supplemented with an information message: "A list with an exemplary digital alphabet, which is written and sent to the land of Tours with the ambassador and steward with Tolstoy of these letters." The second inscription seems to be very important: "This is the alphabet I have voted (that is, I have deigned) in 1700 to write with my own hand the Great Sovereign for another miracle". The author of the code was Tsar Peter I himself! Historians claim that this was the first cipher made by Peter I. In addition to diplomatic tasks in Turkey, Tolstoy was assigned intelligence work goals.
Peter Andreevich Tolstoy
Before leaving for Constantinople, Peter handed the ambassador "secret articles" in which he described in great detail what and who to watch in the neighboring, still friendly state. With whom the Turks want to fight, whom they love and who do not love among the peoples, the customs of the Muslim state, the state of the Ottoman Empire's navy - all this was part of Tolstoy's sphere of interests.
P. A. Tolstoy's code
In his work, the ambassador to Turkey succeeded - he not only established strong ties with the highest echelons of power in Constantinople, but was also able to obtain information about the system of conventional coded signs and signals of the Ottoman fleet. It is certainly difficult to overestimate the importance of such intelligence to the Russian state. In addition, Tolstoy was able to scout data on the sending of Turkish spies to Voronezh, which at that time was a major center of Russian shipbuilding. Turkey was also very interested in the Russian fortress of Azov on the Black Sea, which also did not escape the attention of the ambassador. By the way, Peter, by the way, according to the data from Tolstoy, wrote a directive for Admiral Apraksin: “Beware of the spies on Voronezh; and no one can be allowed on the Donskoye estuary, except for their own sailors, neither peasants, nor Cherkas”. With the declaration of war on Russia by Turkey, the Sultan hid Tolstoy in the Seven-Tower Castle for a year and a half. It would seem that the ambassador's intelligence activities have come to an end? But no, even in the Turkish dungeons, Pyotr Andreevich received political and military information, which he shared with the ambassador of the Moldovan ruler Cantemir. He had previously managed to swear allegiance to the Russian emperor and became a liaison in sending encrypted messages to Peter I.
Andrey Yakovlevich Khilkov
Another Russian diplomat, Andrei Yakovlevich Khilkov, arrived in Sweden in 1700, knowing in advance that Russia would declare war on this European power. Just like Tolstoy, Khilkov had to, on the order of the tsar, find out "with what affairs and for what envoys of foreign powers live in Stockholm." I must say that on the day of the presentation of credentials to King Charles XII from Khilkov, Russia declared war on Sweden, and this angered the royal court a lot. However, the ambassador was not executed, but only confiscated property, and he and his assistants were put under house arrest in the Russian embassy. Here Khilkov was able to organize his imprisonment in such a way that he was allowed to communicate with captive compatriots and even correspond with Peter I. Moreover, Andrei Yakovlevich created a developed agent network, which included many employees of the royal court of Sweden. Khilkov corresponded with the help of encryption and steganography (secret writing). The ambassador wrote in prison with special invisible ink, which, when heated, changed its color. And here Peter I was among the pioneers of the use of steganography in Russia. He used both simple hidden encryption techniques and exotic sympathetic ink. Peter, in particular, wrote to his commander Georg Benedict Ogilvy in 1706: “February, 17th day of the figure of Renova. And they were sent on the 22nd day: they hesitated over the fact that the alphabet was rewritten and put into a button. Sent with Maer Weir”[32]. Secret reports in those days, apparently, were sewn into clothes, hid in heels and the like.
Northern War (1700-1721)
Peter writes about invisible ink in a diplomatic letter to one of his subjects abroad in 1714: “I am sending to you three vials for the secret letters: what is the first thing to write under A. which will go into the paper and will not know anything; then under V. - those ink then write what you want explicitly; and the third sweat S. - when you receive a letter from us, it will be anointed, then the ink will come off, and the first will come out. Such is the secret chemistry of the Petrine era.
In 1714, Khilkov, being imprisoned, conveyed very important information about the difficult situation in Sweden - about the growing discontent among the people, about high taxes, about the constant recruitment of new reservists. This played a significant role in the strategic planning of the Russian army.
And Khilkov, his colleague from Turkey Tolstoy could not have become so useful for the fatherland, if it were not for the codes of Peter I. One of the contemporaries of that era expressed himself on this matter: “Peter's ambassadors wrote all their slightly important reports in“numbers”, in codes”.
To be continued….