Early modern ciphers as sources of history1

Early modern ciphers as sources of history1


Benedek Lang

date de sortie





There1is an apparent contradiction between the excitement ciphers induce in fiction, and the uninteresting impression they make in non-fiction. Authors from Edgar Allan Poe to Isaac Asimov, from Conan Doyle to Agatha Christie, from Edgar Wallace to Umberto Eco and from Jules Verne to Dan Brown offer central role to codes and ciphers in their bestsellers.2 In contrast to the popularity of ciphers in literature, however, real ciphers in history—particularly in the early modern times—rather provoke boredom, they seem to be fairly dull sources. Usually they are not more than long and monotonous lists of numbers or signs.


One could say, of course, that it is not their look but their content which deserves interest. This objection, however plausible it might sound, is not necessarily true. Ninety percent of the enciphered sources that survived from the early modern times are solved: usually it was the addressee who wrote the solution carefully above the enciphered text. In those cases when the letter was not deciphered at the time of its arrival to the addressee, we can make efforts today to find the hidden meaning —a surprisingly hard, but not impossible task. Most often than not, the historian is able to read the content of the cipher. And this is what stands in sharp contrast with the image portrayed by the novels: the deciphered message adds little to our historical knowledge, most of the times it contains diplomatic information already known by the specialists of the given age.


My argument is that the relevance of sixteenth and seventeenth century ciphers lay elsewhere: I wish to show the kind of information they contain beyond the message they attempt to hide. Through a few examples, I attempt to show what we lose if we read only the deciphered and edited version of the texts, and omit looking at the original sources.3 As we are going to see, techniques of cryptography were applied in a wider social environment than traditional scholarship–concentrating on its subject primarily as a scientific technology and as a diplomatic practice–had portrayed. The social milieus of the applicants and reception of cryptography go beyond diplomacy (where ciphers were used in the largest quantity and in their most professional form), and also cover science, religion, artisanal tradition, university context, the private life of noblemen, engineers, and “everyday” people, where previous research had neglected its role. Analyzing the variety of attitudes of this wider social environment to cryptography, the many ways people made use of enciphering methods, is an approach that will help reintegrate the history of ciphers in the growing scholarship on private, medical, scientific, religious, alchemical, magical, and political practices of secrecy, that is, into the context where it sui generis belongs. In other words: studying cryptography not only as a scientific technology, rather as a complex system of social practices, will enrich the traditional “internalistic” approach to this branch of the history of science, and situate it in the context of social history.


The number of the research questions to be answered is extensive. What was the relationship between various practices of intentional secrecy and cryptography? How did different techniques of cryptography spread in society: by way of printed or manuscript texts, or by personal transfer? How widespread were the ciphering and deciphering methods outside the political sphere? How much trust was laid in these methods? What was the exact purpose to encipher a text: to make it cryptic and hidden from the contemporaries, or something else. Why did certain diaries use ciphers that were easily solvable? How can we esteem whether a specific cipher key was used for diplomatic missions or for the communication of private secrets? What was the content of the hidden knowledge: politics, sexual secrets or scientific knowledge? What are the–often civilian–practitioners’ attitudes towards the technology they use? How far could they make use of the techniques, how far did they realize the potentials of the given methods? What were the typical mistakes, users made when applying ciphers, or more precisely, what steps did they make with which they decreased the efficiency of the techniques? What measures were made to protect the secret of a specific key? How frequently did users change their encryptions? To what extent were they aware of the fact that the key might be broken by their enemies?


To summarize, using a paraphrase of Jacques Le Goff’s famous words: what did the university student, the emperor’s clerk, and the master of the mint have in common —as far as their attitudes to and practices of cryptography were concerned?


The source material that will be used as a sample comes from early modern Hungary, which was a particularly unstable and consequently eventful territory in the period from 1500 to 1700, where diplomatic, scientific, and religious secrets and attempts at deciphering them played a crucial role. States of East-Central Europe became the battlefield of Christianity and Islam, Catholicism and Reformation, western Christianity and Orthodoxy. As a result of a series of internal fights, the kingdom became divided into three: its central part remained occupied by the Ottoman sultan until the end of the seventeenth century, its western and northern regions continued their existence as the Kingdom of Hungary under the Habsburg kings but became—due to its geographical situation—a permanent battlefield between the Turkish and the Christian armies, and finally, the Principality of Transylvania started enjoying a seriously limited independence as a vassal state of the Ottoman Empire.4 Due to its history particularly rich in conflicts in this period, Hungary provides ample resource for an analysis on the practices of cryptography.


On the basis of the rich source material, I only show a few examples to demonstrate, in what way the above questions might be answered. Fuller account of the methods and the sources will be presented in my longer articles and in my monograph.


The first example is related to Ferenc Rákóczi II, an influential magnate of Hungary, leader of the anti-Habsburg independence war between 1703 and 1711. During the years of the war, he was in diplomatic contact with many European kings and politicians, his main ally being the French king, Louis xiv. In his diplomatic correspondence he used cryptography, more than eighty different cipher keys have survived from his chancellery, each key having been used for many letters.5 Now, comparing the two best elaborated cipher keys might lead to interesting conclusions. One of these was a large table, including numbers not only for the letters and particles of the language, but also code-words for geographical territories and political actors. It was in French and made sophisticated diplomatic and military communication with Louis xiv possible. Due to its importance it survived in many further—less artistically elaborated—copies in the collection. The other cipher key looks almost the same, its language is also French, however, among its code-words, we only see two geographical units, Krakow and Varsaw, and no name of a politician. It also contains certain words lacking not only from the previous cipher key, but also from most, if not all of the keys survived. These are: “abandonne”, “adorable”, “chagrin”, “jaloux” “solicitude”, “sentiment”, “souvenir”. There is no indication of whom the addressee of the letters enciphered with this second method was, but the beautiful appearance of the key indicates that he (or she?) must have been not much less important for the fighting prince Rákóczi than the French king was. Looking at the back of a copy of this second key, however, we can read a love poem in French, with certain typical mistakes, that make it plausible to suppose that the prince himself wrote it to his close friend and lover, the Polish stateswoman and patron of arts, Elżbieta Helena Sieniawska (1669-1729), with whom he usually corresponded in French. All indications support the supposition that this key was never used for diplomatic messages; it rather served the privacy, not to say: love affair, of the Prince.6


Still remaining with the entourage of Ferenc Rákóczi, a further question can be raised: what safety measures were taken to defend the secret of the cipher keys? The prince fairly surprisingly, stuck to the same key for three years (1704-1706) in the communication with his Polish allies, and did not bother about the fact that dozens of the survived one hundred letters sent to him from Dansk start almost with the same French enciphered words: “a Danzik”.7 Nothing more is necessary for a code breaker to draw conclusions from the traffic analysis (that is, the fact that the letters were sent from Dansk) and the position of the words (letters usually start with the designation of the place from where they are sent), to solve the cipher. It seems that even when the technology provided serious measures of security, careless use undermined safety. Users did not always take seriously or recognized how important it is to change keys regularly and how crucial it is to avoid standardized formulas in the beginning and ending of their letters.


Representatives of considerably less dangerous professions also made use of enciphering techniques, among them university students, craftsmen, and even the first poet who wrote poetry in Hungarian. As for the students, several university manuals survived from the late fifteenth century which contain a great variety of secret alphabets scattered among scientific—astronomical, astrological and medical—texts.8 Interestingly, these secret alphabets remained on a fairly primitive level, they are easy to break, and thus they do not protect the content of the text, just the opposite, they call the readers’ attention, and make the text more appealing for him. The unusual characters stimulate communication between the author and the reader–instead of disguising it.


In the scientific and artisanal tradition, reasons for secrecy were different but its need equally pressing. In the Western European context, Galileo, Huygens, Boyle, and Hooke used occasionally ciphers and anagrams to document their scientific conjectures in an age, when copyrights and patents were in their embryonic form, and could not testify who discovered something first.9 From Hungarian history, a mid sixteenth century source, a hundred-twenty page long private diary might be mentioned. It belonged to Johannes Cementes of Kolozsvár (from Cluj-Napoca, present-day Romania), supervisor of the mint and master assayer. He kept record of events in both his private and professional life from 1530 to 1586. In the Hungarian text, he applied simple ciphers to encode details of his mining, minting, apothecary and alchemical knowledge, most often just singular words, but already on the first page, the title itself.10 Similar to late medieval student handbooks, Cementes turned to a simple and vulnerable substitution system which could be easily broken. The use of ciphers in the artisanal tradition as well as in science raises questions—What was to be disguised and what was not? Who were the persons not supposed to see the information, in other words: who was excluded from the communication with the help of ciphers? To what extent were ciphers used for the purposes of ensuring intellectual property or priority of invention etc?—that can be answered only understanding the context of the given field’s secrecy.


The poet, soldier, seducer castellan, Bálint Balassi (1554-1594) has also become actor of the history of ciphers. Due to his antisocial personality, several towns pursued court cases against him, and his many love affairs did not decrease the number of his conflicts. He led multiple legal processes against his relatives. In his eventful and difficult life, he needed to write many letters about private and financial secrets. He usually applied partial enciphering, in other words, he tried to hide the meaning of particular words–sometimes names, sometimes vulgar sexual expressions–in an otherwise readable text. The method was even simpler than the ciphers of Cementes and the students, he chose a most simple–not to say: primitive–version of it: letters in the first half of the alphabet were corresponded to letters of the second half of the alphabet. Instead of A, he wrote M, instead of B, he wrote N, instead of C, he wrote O, and so on following an easily breakable system. Whom he tried to deceive with this primitive means of secrecy is a mystery, but after all it is not probable that the professional code-breakers of the Habsburg Black Chamber were interested in the minuscule conflicts of his heritage or love affairs. His cipher system was secretive enough to keep the curious messengers out the communication.11


Privacy and sexual secrets were enciphered in other diaries as well. The Transylvanian politician, Gábor Haller (1614–1663) left a detailed and straightforward diary to posterity, however, when he wrote about the quantity of alcohol he drank, and the consequences, he enciphered the key words. He also recorded his nightly desires in ciphers, as well as a few political secrets. He wrote all this having his curious reader in mind: he used two different, systems, but he wanted to be certain that his secrets will be easily revealed, and copied the cipher keys at the end of his diary.12 Another Transylvanian nobleman, Zsigmond Szaniszló (c. 1655 – c. 1721) also used ciphers in his private diary, usually, when he wrote about financial secrets, but also when he wanted to record that his wife (as it turns out from another part of the diary: in the middle of her period of pregnancy) spent a night with their guest. Had the author wished to hide this information, he would have chosen a more complex cipher than the one he applied, which only substituted the vowels and left the original consonants in their place.13


The relevance of these latter sources is not the sophistication of their cryptographic system, but the fact that ciphers in Early Modern Hungary were not monopolized by state affairs, various social strata used them in their everyday life. In the three hundred year long period under study, certain trends might be highlighted. Central diplomacy abandoned the simple “monoalphabetic” ciphers (in which every letter had one cipher equivalent), and gradually turned to more complex “homophonic” methods, in which not only letters of the alphabet, but also syllables had separate signs or numbers in the ciphers, while nullities, and code words were more extensively used. Parallel to this development, simpler enciphering techniques appeared on various lower levels of society, in the practice of various professions. The further we descend, however, from diplomatic routines, the more dominant monoalphabetic ciphers become. This was probably due to the lack of professional code-breakers on the given level, to the less vital nature of the secret to be protected, and not least due to the fact that complex homophonic methods were not known and available to everyone.


The fact that sources (letters and diaries) being farther from diplomatic routines applied simpler cipher systems helps us reconstruct the ways of the transfer of cryptographic knowledge. Even though serious methods were available in the printed editions of Johannes Trithemius, Athanasius Kircher, Giambattista Della Porta, or Gustavus Selenus in Hungarian libraries, the main source of the actual cryptographic knowledge seems to have been diplomacy: authors having no relation to it applied ciphers outdated by then for several centuries, authors having some diplomatic practice in their past used more developed methods in their diaries, while professional ambassadors used the best homophonic methods available at the time. Level of cryptographic practice shows no correlation with the availability of the “secondary literature” on ciphers, rather with the proximity to diplomacy.


As was demonstrated above, various types of “everyday users” became part of the history of ciphers. Their growing popularity must have been related to the fact, that in the three-partite Hungary, partly occupied by the Turks, partly living under Austrian direction, and partly balancing between the two in Transylvania, a large portion of the population was living in the frontier zone, and participated (or was forced to participate) in the network of the information flow as possessors and transmitters of secrets. The depth they submerged into cryptography and the aims for which they used ciphers indicate a great variability in their attitudes to secrecy.



1.       My archival research was supported by several grants: the Bolyai János Postdoctoral grant, the OTKA K 101544, and the grant TÁMOP- 4.2.2.B-10/1--2010-0009. The article was written when I had the privilege to concentrate exclusively on my work in the Collegium de Lyon.

2.       John F. Dooley, “Codes and Ciphers in Fiction:An Overview.” Cryptologia29 (2005), 290 - 328.

3.       For a more complete description of my research, see Bendek Láng, “People’s Secrets: Towards a Social History of Early Modern cryptography” is forthcoming in The Sixteenth Century Journal.

4.       For a recent overview of the sixteenth-century history of Hungary, see Géza Pálffy, The Kingdom of Hungary and the Habsburg Monarchy in the Sixteenth Century (Boulder, Colorado–Wayne, New Jersey: Center for Hungarian Studies and Publications, Inc., 2009).

5.       Budapest, Hungarian National Archives, G 15, Caps. C. Fasc 43 and 44.

6.       The authorship of the poem was identified by: Markó Árpád, “A versíró Rákóczi” (The poet Rákóczi), Magyar Könyvszemle 26 (1936): 259-264.

7.       Hungarian National Archives G 15. Caps. C. Fasc 39.

8.       Benedek Láng, Unlocked Books, Manuscripts of Learned Magic in the Medieval Libraries of Central Europe, Penn State University Press, 2008, chapters 3 and 9.

9.       Lawrence M.Principe,Robert Boyle’s Alchemical Secrecy: Codes, Ciphers, and Concealments.” Ambix, 39 (1992): 63-74; Kristie Macrakis, “Confessing Secrets: Secret Communication and the Origins of Modern Science”, Intelligence and National Security, 25 (2010): 183–197.

10.    Armand Dezső Herzfelder „Kolozsvári Czementes János könyve” (The book of János Cementes of Kolozsvár) Magyar Könyvszemle (1896): 276-301, 351-373.

11.    Eckhardt Sándor, Balassi Bálint összesművei (Collected works of Bálint Balassi) (Budapest: Akadémiai Kiadó, 1951).

12.    Published by Károly Szabó, in Erdélyi Történelmi Adatok, 4 (Transylvanian Historical Data) (Kolozsvár: Erdélyi Múzeum Egyesület, 1862), 1—103.

13. The diary is edited by Károly Torma in Történelmi Tár, 1889 (12). 230–269, 503–522, 708–727, (13), 1890. 77–101, 307–327, 493–510, 757–770, (14), 1891. 267–295.


Benedek Láng est professeur associé à l’université de Technologie et d’Économie de Budapest où il enseigne l’histoire de la philosophie. Il a étudié l’histoire à l’université Eötvös Loránd et à la Central European University et a obtenu son doctorat en études médiévales en 2003. Il a été enseignant à l’université de Technologie et d’économie de Budapest, à l’ELTE et à l’université Corvinus de Budapest. De 2003 à 2004, il a été consultant pour le Bureau du Comité National des Bourses hongroises. Benedek Láng est également membre de différentes organisations de philosophie, d’histoire médiévale et d’études magiques.



17/09/2012 - 15/07/2013