Lorenz cipherThe Lorenz SZ40, SZ42A and SZ42B rotor stream cipher machines were created by C. Lorenz AG used in World War II. SZ defines Schlüsselzusatz which is "cipher attachment" and used a Vernam stream cipher.
|
Note "[%"] is '\n' and "[^]" is '\r'.
Examples
The following are Vigenère ciphers:
- Hello: . Try
Outline
The first Lorenz Cipher Machine contained 12 wheels, which had settings of a 0 or a 1. Cipher letters are created by converting them to a five-digit binary number, and then combining them together using an XOR operation. The first few codes are:
0 1 2 3 4 5 6 7 8 9 '*' 'E' '\n' 'A' ' ' 'S' 'I' 'U' '\r' 'D' 10 11 12 13 14 15 16 17 18 19 'R' 'J' 'N' 'F' 'C' 'K' 'T' 'Z' 'L' 'W' 20 21 22 23 24 25 26 27 28 29 'H' 'Y' 'P' 'Q' 'O' 'B' 'G' '' 'M' 'X',
The plaintext of "INKWELL" then maps to [6, 12, 15, 19, 1, 18, 18]. In the following the cipher text is "%KOA*E%" and where "%" identifies a new line.
------------------------------ Plaintext: INKWELL Baudot Code: [6, 12, 15, 19, 1, 18, 18] Ciphertext: "%KOA*E%" Ciphertext ordinals: [2, 15, 24, 3, 0, 1, 2] Decrypted: INKWELL --- K Wheels --- State:7; Size:41; Wheel:[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1] State:7; Size:31; Wheel:[1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1] State:7; Size:29; Wheel:[0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0] State:7; Size:26; Wheel:[0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 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