- Security
- A
Cryptography of the Middle Ages: from alchemical ciphers to magic squares
Among the bright symbols of the Middle Ages are sorcerers, witches, and alchemists who "enchant and turn mercury into gold." Cryptography at this time also went hand in hand with magic: take, for example, the ciphers of occult communities.
What were medieval ciphers like? Were they simple "abracadabra" or did they really contain the key to secret knowledge? Today, these questions will be answered by Anastasia Ashaeva, Ph.D. in History, Senior Researcher at the Moscow Museum of Cryptography. We give her the floor.
Roman Heritage
Let's start with the prehistory and the Roman Empire. Even late Roman authors, such as the historian Ammianus Marcellinus, mention the encryption of information. The Romans taught cryptography to some servants and slaves who protected their masters' messages with substitution ciphers. It is believed that in the III-IV centuries AD, entire cipher schools were formed in the empire. At this time, Coptic, Syrian, and Gothic cryptography appeared.
The Romans not only invented their own ciphers, relying on Greek techniques, but also "brought to light" the secret writings of conquered peoples. Thus, another ancient Roman historian, Publius Cornelius Tacitus, in his work "On the Origin and Location of the Germans," wrote about the system of secret signs used by the barbarians to conduct sacred rites. These symbols resembled runes and constituted magical formulas understandable only to the initiated. Subsequently, these legends formed the basis of medieval runic cipher alphabets, which we will discuss below.
Ancient Roman encryption reached its peak in the III - early IV century, after which it began to decline with the fall of the empire itself. As mentioned in one of the previous publications, several new centers of cryptography development emerged based on the ancient heritage. Their schools were formed in the Byzantine Empire and the Middle East. Europe, however, remained among the laggards for many years. When the Arab scientist Al-Kindi described his advanced method of cryptanalysis, Europeans were still only mastering the basics of encryption.
Puzzles instead of Utility
So, with the fall of the Roman Empire, Europe plunged into the Middle, or, in other words, the "Dark" Ages. There was a sharp decline in culture and technology, and cryptography was no exception. Only with the Renaissance did Europeans emerge from the cultural pit, giving the world Leonardo da Vinci, Titian, Shakespeare, as well as outstanding cryptographers Leon Battista Alberti, Blaise de Vigenère, and many other figures. This is a stereotypical and simplified "picture of the world" — in reality, everything was more complex and contradictory.
The era was marked not only by mass illiteracy but also by the formation of national languages, the emergence of the first European universities, and discoveries in mathematics, astronomy, and chemistry. Cryptography did not stand still either.
Medieval manuscripts, letters, book excerpts, miniatures, and drawings with ciphers still surface in libraries and repositories. The real purpose and content of many finds remain a mystery. One thing is clear: such ciphers were practically not used in state administration, diplomacy, and military affairs.
In the Middle Ages, there is no trace of the development of methods related to cryptography, such as steganography. Researchers do not know of a single named cipher (like the ciphers of Caesar, Vigenère, or Vernam) from this period of European history. Medieval state acts with encoded information can be counted on the fingers.
However, the encryption of the "Dark Ages" and partly the Renaissance is filled with mysteries in the spirit of the novels of Umberto Eco and Dan Brown. It makes you want to see traces of a world conspiracy, the solution to the mystery of the universe, or the recipe for the philosopher's stone in all this. But first things first.
Early Medieval Ciphers: Witchcraft or Mind Games?
Even ordinary text in the Early Middle Ages was a cipher. Since only a small part of the population was literate, any letter looked like a meaningless set of symbols to most people. An enlightened feudal lord or a member of the clergy could safely send their messages and not worry that an illiterate messenger would poke his nose into the master's affairs.
Real ciphers were considered black magic by the people, and medieval cryptographers were sometimes seen as sorcerers. Since they are able to extract meaning from incomprehensible "krokozyabrs", they can surely communicate with the dead or read minds from a distance. The ability to encrypt and decrypt texts frightened illiterate medieval townspeople, who were accustomed to seeing the devil's machinations everywhere. Moreover, secret signs and ciphers were widely used in such "witchcraft" fields as alchemy and astrology.
Educated and enlightened people, as a rule, looked at cryptography differently. In their eyes, the encrypted name of the author, the name of the locality, the chemical element or the planet only added attractiveness to the text. If the author is able to skillfully encrypt, then he is a real intellectual who will not write nonsense.
How exactly was information encrypted in the Middle Ages? Substitution ciphers were in use in Europe. The simplest cipher systems consisted of writing phrases vertically or in reverse order, sometimes vowels were replaced with dots. Letters were also masked with letters from foreign alphabets: Greek, ancient Hebrew or Arabic. Sets of runes and pictograms (greetings from ancient Germans and Romans) also served as cipher alphabets.
As for the areas of application of cryptography in the early "Dark Ages", this is primarily epic, church environment and to a lesser extent state affairs.
Royal encryption
Early medieval state acts with ciphers have practically not survived to this day. Nevertheless, the monarchs' entourage developed methods of information protection. There was also a cryptographer at the court of the famous Charlemagne, the king of the Franks and the founder of the Carolingian Empire.
Charlemagne's court scholar named Alcuin created a collection of logical "Problems for sharpening the young mind". Along with logic exercises, this work contains many cryptographic puzzles. Alcuin even developed his own simple substitution cipher, described in Chapter 26 of the "Problems...":
In Alcuin's cipher b = a, k = i, f = e, and two dots represent o.
It is unknown how widely this cipher was used, but Charlemagne himself definitely could not use it. Despite the king's familiarity with the seven liberal arts (artes liberales), training in rhetoric, dialectics, astronomy, he never mastered writing. At least, this is reported by his biographer Einhard. Therefore, all attempts by researchers to link the rise of encryption in Europe with Charlemagne's name have been unsuccessful.
Medieval Epic Ciphers
A striking example of such cryptography is found in the famous Anglo-Saxon poem of the turn of the VII–VIII centuries "Beowulf", written in Old English. The action of this epic work unfolds in Scandinavia. In short, the poem tells of the victory of a noble Geatish warrior named Beowulf over a number of terrible monsters: the giant cannibal Grendel with his mother and the dragon.
The text is literally stuffed with mysterious runes. At the same time, researchers have still not been able to fully decipher many episodes from the work. The meaning of the runic names (signs) themselves has long been solved, but it is not always clear what to consider a sign and what is a so-called "decoy". Runes are used as separate words, transitions between them, or ligatures in the middle of sentences. For example, the symbol "ethel" is used in the meaning of "home, homeland" and is placed between two dots. In turn, the rune "thorn" often means the abbreviated word "that". It seems that sometimes runes do not carry semantic load, but only draw the reader's attention to certain fragments of the text.
Church Encryption
Ironically, it was the church that initially was the main opponent of cryptography and declared encrypted texts heretical. Who knows what is hidden in them, and does it contradict the Scriptures or church norms? This position of the clergy even more strongly associated cryptography with magic and witchcraft in the mass consciousness.
However, the forbidden fruit is sweet, and monks are also people. And is cryptography so ungodly if it is found even in the Old Testament, some fragments of which are encrypted using the ancient Hebrew method of atbash?
When encrypting using the Atbash method, the position of a specific letter from the beginning of the alphabet is calculated, after which it is replaced by a letter with a similar position from the end. For example, in the Russian language, "a" is written as "я", "b" as "ю". Returning to the Old Testament, in the book of the prophet Jeremiah, the word "Babylon" is transformed into "Sesach" ("Shishach"). The initial letter of the word Babel and the second in the alphabet "bet" is replaced by the penultimate Hebrew letter "shin", and so on.
Biblical encryption did not carry a utilitarian load and was used to give the text an aura of mystery. One way or another, it aroused the interest of European monks in cryptography. The holy fathers began to use long-forgotten substitution methods, and then to invent their own ciphers. These methods of information protection are mostly as simple as the Hebrew Atbash, so they were unlikely to be highly trusted in terms of security. Cryptographers in cassocks sought to dazzle readers and show their erudition. On the other hand, most of the known methods of decryption from antiquity were lost, so even an elementary cipher turned out to be reliable.
Among the well-known monk-cryptographers of the early Middle Ages is the 8th-century Anglo-Saxon missionary Saint Boniface. He used substitution ciphers to hide proper names in his letters. Boniface adapted a code known from the work of Tacitus. The missionary replaced vowels with dots. One dot represented "i", two dots "a", and so on. In addition to Tacitus, Boniface was probably inspired by the already familiar cipher of Alcuin.
Similar "Boniface ciphers" are found in letters to the Archbishop of Canterbury Dunstan (959–988) and a number of other texts.
Another monk-cryptographer is Notker the Stammerer, a 9th-century monk of the Abbey of Saint Gall. His cipher stands out from the rest for its relative complexity.
Notker's method involved replacing Latin letters in names with Greek ones, more precisely, with their accepted numerical values. Let's write out this sequence verbatim:
The initial sum is the number 481, representing the first letters of the Greek names of the Father, the Son, and the Holy Spirit;
The numerical value of the first letter of the author's name;
The value of the second letter of the addressee's name;
The value of the third letter of the presenter's name;
The value of the fourth letter of the name of the city where the message was written;
The number of the current papal indiction;
The number 99, which masked the Greek "Amen".
The cipher turned out to be too intricate for its time and did not gain wide acceptance: the recipients did not want to become stutterers themselves, like Notker, when deciphering messages. Nevertheless, the method left a certain mark in medieval cryptography.
The Anglo-Saxon monk Bede the Venerable described a simpler numerical cipher in his work "The Reckoning of Time". In it, each letter was replaced by its ordinal number in the alphabet. For example, instead of the English word abba (not the name of the legendary Swedish pop group, but the word "abbot"), it would be "1221". Following the Arab scholar Ibn Dunaynir, Bede the Venerable developed a system of hand gestures to denote numbers, so that it was possible to encrypt not only on paper but also directly during a conversation. The monk wrote the following:
"By this method, it is possible, forming one letter at a time, to convey words to another person who knows this procedure, so that he can read and understand them even at a distance. Thus, it is possible either to indicate the necessary information with a secret hint or to deceive the uninitiated, as if by magic... if you want to warn a friend who is among traitors to act cautiously, show the fingers [signs for] 3, 1, 20, 19, 5 and 1, 7, 5; in this order, the letters mean
"act cautiously"".
Monks encrypted information not only in the main texts but also in monograms and colophons — pages indicating the author, time, and place of creation of the book. For example, a scribe from the mid-11th century named Elefsig created a manuscript in which he encrypted his name and the book's patron. The cipher consisted of replacing vowels with adjacent consonants in the alphabet. The author's name Aelsinus (Latin Ælfsige) was encoded as "Flsknxs" (in medieval manuscripts, the letter "s" resembled the letter "f"). The patron of the manuscript was a monk named Elfwin (Latin Ælfwinus), transformed into "Flf ƿ knp". The entire encrypted text stated that the book was written by Elefsig, "the humblest brother and monk," and its owner was "Elfwin, monk and deacon." Such "colophon messages" make up the lion's share of the ciphers of the early Middle Ages found by researchers. And again, no "secrets of the Madrid court" — just an intellectual game of the authors.
Encryption of the developed Middle Ages: late 12th–15th centuries
During this time, there was a surge in encryption and cryptography. After all, society was gradually developing. Some scientific knowledge was penetrating Europe from the progressive Arab East, and the first European universities were not idle. Educated segments of the population began to take an interest not only in theology but also in astronomy, medicine, and finally, the mysterious alchemy.
There was a need for new forms of communication, text, and manuscript design. According to medieval concepts, knowledge is, of course, power, but it is dangerous to endow everyone with it. Many thinkers tried to protect their works from prying eyes and make them accessible only to the chosen few. And what could be more useful for this than cryptography?
The birth of European cryptanalysis
It is not necessary to talk about full-fledged scientific cryptanalysis in the Middle Ages. However, in the 13th century, an important step was taken in this direction. The English philosopher and monk Roger Bacon wrote the first theoretical work that summarized knowledge about cryptography and justified its necessity. The very title of the treatise — "The Epistle of Brother Roger Bacon Concerning the Marvelous Power of Art and of Nature and Concerning the Nullity of Magic" — set readers in a scientific mood.
Bacon categorically stated:
"A fool is he who writes a secret in any other way than to hide it from the vulgar."
By "secret" here is meant scientific knowledge in general. Let us repeat that there was no talk of "Education for the masses!" in the Middle Ages.
Bacon identifies six ways to encrypt text:
allegories and figurative expressions;
using only consonant letters when writing a word;
replacing Latin letters with Arabic or Syriac ones;
mixing letters from different languages;
replacing letters with geometric signs or invented symbols;
abbreviated writing of words.
A clear example of the application of the first method is contained in another work of Bacon called "The Secret of Secrets". The author allegedly quotes Aristotle, who addresses his student Alexander the Great:
"Take the stone which is not a stone and is in any man, any place and any time, and is called the philosopher's egg and the limit of the egg."
As it is easy to guess, this fragment refers to the philosopher's stone. Roger Bacon was not only a monk and philosopher, but also an alchemist. He and his "scientific colleagues" made a significant contribution to the development of medieval cryptography. However, this is worth talking about separately.
Alchemists' Encryption
Everyone has probably heard about alchemy. In a nutshell, it is a philosophical and esoteric teaching about the transformation of matter and spirit. Medieval and Renaissance alchemists sought to obtain the fifth element, also known as the philosopher's stone, capable of turning base metals into gold and giving immortality.
It would seem that such a "playing God" should have caused a sharp opposition from the Catholic Church. So the poor fellows had to encrypt their texts so as not to end up at the stake. But no, alchemists were not executed, not thrown into dungeons, and not even excommunicated from the church.
The vast majority of such "scientists" were themselves monks and priests. Even Saint Thomas Aquinas conducted alchemical experiments and stated that obtaining gold artificially is not witchcraft at all. It is only known about the struggle of the church and secular authorities with unscrupulous alchemists who found gullible sponsors from the nobility and merchants, "divorced" them for investments, and left them with nothing. Such charlatans were equated with counterfeiters and severely punished. But there was no religious background here: only "business" and the fight against fraud.
The scientific community also did not condemn alchemy. Of course, such a discipline did not become academic, and it was not taught in medieval universities. However, many official scientists were also not averse to experimenting at the alchemical table in their spare time. In the 13th century, students and professors of the medical academy in Montpellier shared with each other the results of experiments on obtaining the philosopher's stone.
So the encryption of alchemists is not at all connected with the fear of execution. They considered their occupation to be the highest knowledge, which not everyone can touch, so they hid recipes and formulas from the uninitiated.
Substitution ciphers were mainly used in alchemical treatises. Individual words were hidden behind special signs. Latin letters and words were often replaced with Hebrew, Syrian, Arabic, or Greek. Names and artifacts from ancient mythology masked the names of substances:
Mars — iron;
Venus — copper;
Apollo — gold;
Diana — silver;
golden fleece — philosopher's stone.
The famous alchemist of the second half of the 13th century, Ramon Llull, designated various components with Latin letters:
"... if you take F and put it in C, you will get H, i.e. the first figure F.C.H."
F — metals;
C — acids;
H — fire.
Alchemists also widely used acrostics and charades. Among others, such techniques were used by the monk of the XIV-XV centuries Basilius Valentinus. There is a version that in fact this is the creative pseudonym of a whole group of German "scientists".
In one of Basilius Valentinus' works called "Azoth" there is an engraving where the first letters of the words are inscribed in a circle clockwise. The key to the solution is a special symbol — a flower near the word Visita. The image encodes the word V.I.T.R.I.O.L., which translates to "vitriol". Alchemists included this element in the composition of the philosopher's stone.
An even more intricate alchemical cipher is contained in the work of the 16th-century author Stephan Michelspacher "Cabala: The Alchemical Mirror of Art and Nature". The engraving depicted in the treatise combines several puzzles, acrostics, and charades.
Rebus 1. Four letters at the edges of the picture — G, O, T, T — are depicted in a square framing circles. In German, "Gott" means "God".
Rebus 2. A sign of the letter "A" inscribed in "O". This is a monogram of the Greek alpha (A — Alpha) and omega (O — Omega). In Christianity, such monograms are used to denote the omnipotence and infinity of God.
Rebus 3. Four circles with German words heiss (hot), kalt (cold), trvcken (dry), fevcht (wet). This is a deliberately disturbed order of the properties of the four elements, which corresponds only to fire and water.
Rebus 4. An anagram with encrypted words vitriol and azot.
Rebus 5. Stars with planetary signs. The hidden meaning lies in the arrangement of astrological signs in the rays of the star. This scheme shows the degree of perfection of the seven metals. In the center is the most important and perfect metal — gold (Sun), followed by silver (Moon), mercury (Mercury), iron (Mars), tin (Jupiter), copper (Venus) and lead (Saturn).
As can be seen from the charade, alchemy went hand in hand with astronomy and astrology, which also left their ciphers.
Astronomical ciphers
Unlike alchemy, astronomy in the Middle Ages belonged to the revered academic sciences or, in other words, the "higher arts" and was studied at universities. The derivative astrology was not considered some kind of heresy. On the contrary, scientists astronomers often made astrological forecasts themselves and explained real events by how the stars converged. This was important for alchemists, who, when performing their experiments, were guided by the cycles of earthly renewal, parades of planets, etc. Hence the aforementioned star-planetary symbolism in alchemical cryptography.
The most famous astronomical treatise with encryption is the work of the scientist and at the same time the great poet of the second half of the 14th century Geoffrey Chaucer "Equator of the planets". However, today historians argue whether the work really belongs exclusively to Chaucer's pen.
«The Equator of the Planets» serves as a supplement to the 1391 work «Treatise on the Astrolabe», which provides a guide to the operation of the astronomical instrument. Six excerpts of the supplement are written in cipher. The encryption system is a substitution alphabet: for example, «b» is replaced by «δ».
At first glance, the text consisting of incomprehensible characters seems impregnable to cryptanalysts. In fact, the strength of such a cipher is exactly the same as with a regular letter-to-letter substitution.
Occult, Religious, and Magical Encryption
Science is science, but religion and magical thinking still influenced all areas of human activity, including cryptography. Moreover, starting from the Crusades, new monastic orders and occult communities appeared, which also sought to protect their secrets. Some occult ciphers simply «cast a mystical fog» on the reader, while others really protected important information.
Many encrypted codices of the Late Middle Ages have not been deciphered to this day. The so-called «Voynich Manuscript» has become a real «cryptographic Grail». For reference, the artifact was named after the antiquarian Wilfred Voynich, who bought it in 1912.
Researchers have not established the author, content, alphabet, or language of the manuscript. The methods of text encryption also remain a mystery. The examination only dated the parchment of the manuscript to 1404–1438. Since the codex is full of images of herbs and plants, some researchers associate it with medieval medicine, others with witchcraft potions. At the same time, the manuscript contains astronomical drawings. Cryptographers and scientists have been puzzling over the decryption of the document since the 17th century to this day, but no attempt has been successful. Even modern computers and specialized software did not help.
Another cryptographic symbol of the mysterious Middle Ages was the "Witch's Alphabet," described in detail by the monk Trithemius in the 16th century. It is also called the "Honorian Alphabet" in honor of the legendary magician Honorius of Thebes. It is a set of 24 symbols, 23 of which correspond to Latin letters. There are no separate signs for the letters "j," "u," and "w": they are depicted the same as "i" and "v." The last 24th symbol denotes the end of a sentence. Interestingly, the signs of the "Witch's Alphabet" resemble alchemical drawings, but there is no semantic connection between them. Although alchemists also used such a cryptographic method in their treatises. The "language of witches" was popular among members of monastic orders, as well as adepts of various cults.
In the 14th–15th centuries, "musical encryption" also spread in Europe. If you think about it, music is one big cipher for replacing sounds with symbols. So why not use notes to convey secret messages? Notes could denote certain letters, syllables, or words. For example, vowel letters in the text corresponded to similar note names. There is a version that the French composer Josquin Desprez, who lived in the late 15th–16th century, encrypted the phrase laisse faire moy, which translates as "do not disturb me," in one of his symphonies in this way.
One cannot fail to mention the magic squares. One of them is depicted in Albrecht Dürer's engraving "Melancholia," created in 1514. Visual transposition cipher was used in magic squares.
To read the message, it was necessary to add up the depicted numbers in any sequence (vertically or horizontally). Thus, the sum of all the numbers in Dürer's engraving in any combination gives 34. In addition, the two middle numbers in the bottom row indicate the date of creation of the engraving — 1514. You can rotate the square 180 degrees and swap the numbers — the sum remains unchanged. The meaning of such ciphers is not fully understood. Probably, the creators thus reported their belonging to some order or occult group. Its adepts could immediately recognize "their own" with the help of such images.
It cannot be said that with the beginning of the Renaissance, medieval methods of information protection immediately disappeared. Until the end of the 16th century, alchemists, astronomers, and thinkers often used the described puzzles, acrostics, and "Witch's alphabet" in their works. Cryptography still retained a certain mystical flair in the eyes of many people. In parallel, more advanced cryptographic methods were developed on the basis of medieval encryption. Ultimately, cryptography broke with its magical past and began to serve mainly diplomats, politicians, and the military. But we will talk about this in other publications.
Write comment