The Zschweigert Cryptograph – a Remarkable Early Encryption Machine
Total Page:16
File Type:pdf, Size:1020Kb
The Zschweigert Cryptograph – A Remarkable Early Encryption Machine Klaus Schmeh Private Scholar www.schmeh.org [email protected] Abstract chiffrierter Schriftstucke¨ (“Machine for produc- The Zschweigert Cryptograph is one ing enciphered documents”) by German engineer of the many cipher machine designs Rudolf Zschweigert. We will refer to this machine developed in the years following the First as Zschweigert Cryptograph. World War (1914-1918). It was invented To the author’s knowledge, the Zschweigert by textile engineer Rudolf Zschweigert, Cryptograph was never built (perhaps with the ex- who had designed programmable stitching ception of prototypes that are now lost), let alone machines before and apparently transfered used in practice. The only known source de- his computing expertise to cryptology. scribing this machine is a patent filed by Rudolf Unlike the Enigma and as good as all Zschweigert in 1919 and granted one year later other crypto devices of the time, the (Zschweigert, 1920). Zschweigert Cryptograph implements a Though it was never used in practive, the transposition cipher, not a substitution Zschweigert Cryptograph is note-worthy for sev- cipher. To the author’s knowledge, it was eral reasons: the first encryption machine that worked • Contrary to virtually all other mechani- with keys provided on punched cards. cal and electric cipher machine designs, The goal of this paper is to introduce the the Zschweigert Cryptograph implements a Zschweigert Cryptograph and its history, transposition cipher (not a substitution ci- to provide a mathematical specification of pher). This property is the reason why this its encryption algorithm, and to explore machine is mentioned in (LANAKI, 1996) how it can be cryptanalyzed. It will be and (Nichols, 1998). However, both sources shown that the Zschweigert Cryptograph, give no description of the Zschweigert Cryp- which was probably never used in prac- tograph. As far as the author knows, nothing tice, was insecure even by the standards detailed has ever been published about this of the 1920s and not convenient enough to device, except the patent. The Zschweigert compete with other encryption machines Cryptograph should not be confused with the of the time. transposition cipher tool (it’s not really a ma- chine) invented by Luigi Nicoletti in 1918, which is mentioned in (Kahn, 1996). 1 Introduction • The Zschweigert Cryptograph was invented It is a well-known fact that the failure of almost all by a textile entrepreneur. As is well known, important (manual) encryption systems used in the the textile industry adapted computing hard- First World War led to the invention of numerous ware long before encryption technology did. encryption machines in the years after. Among As will be shown, the Zschweigert Cryp- the best-known crypto devices of this era are the tograph represents a design that transferred Enigma, the Hebern rotor designs, the Kryha en- computing expertise from the textile industry cryption machines and Arvid Damm’s cipher de- to cryptology. vices – just to name a few. A lesser known encryption machine from the • The Zschweigert Cryptograph is the earliest post-WW1 years is the Maschine zum Herstellen cipher machine the author is aware of that ap- Proceedings of the 3rd International Conference on Historical Cryptology, HistoCrypt 2020 126 plies a punched card as key. 0 0 0 0 1 0 0 0 0 0 1 B 0 0 0 0 0 0 1 0 0 C B C B 0 0 0 0 0 1 0 0 0 C B C 2 Rudolf Zschweigert @ 1 0 0 0 0 0 0 0 0 A 0 0 0 0 0 1 0 0 0 Rudolf Zschweigert (1873-1947) was a German In the following, we will denote the position of engineer, who lived in the cities of Chemnitz, the one in row i as ki. In other words: Plauen, and Hof, Germany. In the 1930s, he was a member of the city council of Hof. He was mar- ki = j :, Ki; j = 1 ried to Gertrud (1891-1982). Zschweigert is best remembered for having built up a major mineral The key space of the Zschweigert Cryptograph and meteorite collection, which is today preserved is, of course, dependent on n, the number of rows in the Museum Reich der Kristalle in Munich, Ger- of the matrix. As there are nine possibilities for many (Wilson, 2019). each row, the number of keys is 9n. This means Rudolf Zschweigert’s professional dedication that with a 40-rows matrix, exhaustive key search was that of a textile manufacturer and factory is about as laborious as with a 128-bit key. owner. The Weberei Zschweigert (“Weaving Mill The alphabet used by the Zschweigert Crypto- Zschweigert”) existed from 1921 to the 1960s. Be- graph is not specified in the patent. Instead, it is tween 1909 and 1934, Zschweigert was granted assumed that every character provided by the type- at least 15 patents in Germany, Austria, Switzer- writer in use can be encrypted. To keep things sim- land and the USA. 14 of these patents concerned ple, we assume that only upper-case letters from A textile technology, especially looms and stitching to Z are encrypted, which makes an alphabet of 26 machines. Zschweigert’s only patent not related characters. It seems likely that such an alphabet to textiles is the one relating to the encryption ma- would also have been used in practice. chine discussed in this paper. We denote the plaintext as P = pi with i = Rudolf Zschweigert was not the only cipher 0;1;:::;l − 1 and l being the number of letters in machine inventor with a background in the tex- the plaintext. As an example, we take Pexample := tile industry. A second and much more promi- ”HISTOCRYPTTWENTY”, which means that nent person of this kind was Swedish engineer p0 = ”H”; p1 = ”I”; p2 = ”S”;:::; p15 = ”Y” and Arvid Damm (1869-1927), who cooperated with l = 16. his country man Boris Hagelin in the 1920s and The ciphertext is represented by another matrix, laid the foundation of what was to become Crypto C. C has nine columns. The elements of C are AG, a company that still exists today (Hagelin, from the set fA;:::;Z;−g with ”−” representing a 1994). null character. At the beginning, all elements of C are set to ”−”. When we write C, we omit all lines containing only the null character. 3 Specification of the Encryption Algorithm 3.1 Encryption To define the encryption algorithm, we need the In the following, we provide a formal specifica- following function: tion of the encryption algorithm implemented by the Zschweigert Cryptograph. It is based on the Write-to-Matrix (C;column 2 f1:::9g; p 2 informal description in the patent. fA;:::;Zg) The Zschweigert Cryptograph uses a 9×n i = 0 binary matrix K as key, with n being a positive while Ci;column 6= ” − ”: i = i + 1 integer. Every row of K has a Hamming weight Ci;column := p of one, which means that there is exactly one one return C per row, while the eight other values are set to zero. Here’s an example (with n = 5) we denote The encryption algorithm is specified as fol- as Kexmpl: lows: Proceedings of the 3rd International Conference on Historical Cryptology, HistoCrypt 2020 127 Encrypt (P;K) 4 Construction of the Machine n := number of rows of K For i = 0 to l − 1: While the patent provides only short coverage of the encryption method (not to mention a theoreti- C := Write-to-Matrix (C;ki mod n; pi) return C cal foundation), the construction of the machine is described in great detail. This is probably because This means that the first letter of the plain- Rudolf Zschweigert was familiar with mechanical text takes the column of the one in the first line engineering, but not with cryptology. of the key matrix. The second character takes the As can be seen in figure 2, the Zschweigert column of the one in the second line and so on. Cryptograph is based on a mechanical typewriter. Each letter is written into the highest line of the Instead of printing on a piece of paper, this type- plaintext matrix that is still empty. writer prints on nine separate paper rolls. The roll used for a certain letter is controled by a unit that With Pexmpl and Kexmpl, we get the following works with a punched card. This punched card ciphertext (denoted as Cexmpl, see also figure 1): corresponds with the matrix introduced in the pre- vious chapter. 0 T − − H − SI − − 1 The punched card has nine columns and an ar- B P − − C − OR − − C B C bitrary number of rows. In each row, there is ex- B N − − T − YW − − C B C actly one hole. The mechanics of the machine al- B − − − Y − T − − − C B C ways move the type used to the paper roll that cor- @ − − − − − E − − − A responds with the column of the current punched − − − − − T − − − card row and types a letter. Noting the ciphertext this way is unpractical After a letter has been typed, the respective if it is, for instance, sent by telegram. The patent roll turns up by one unit and the next row of therefore suggests the use of separators, but the punched card is read. When the end of the details are not given. A possible way to write punched card is reached, the control unit starts down the ciphertext is: TPN - - HCTY - SOYTET with the first row again. IRW - -. At the end, the user takes the nine paper rolls and reads the letter sequences on them. According to the patent, this can be done in a key-dependent 3.2 Decryption order.