130 likes | 274 Views
Ciphers and Permutations. Monoalphabetic Cipher is simply a permutation. abcdefghijklmnopqrstuvwxyz SATBUCVDWEXFYGZRQPONMLKJIH. Cycle Form (ASOZHDB) (CTNGVLF) (EUMYIWKXJ) (PR) (Q) Four cycles, lengths 9, 7, 7, 2, 1. 8 Character examples. C1 = (ADE) (FGH) (BC) P = (AD) (BG) (EF) (C) (H)
E N D
Monoalphabetic Cipher is simply a permutation abcdefghijklmnopqrstuvwxyz SATBUCVDWEXFYGZRQPONMLKJIH Cycle Form (ASOZHDB) (CTNGVLF) (EUMYIWKXJ) (PR) (Q) Four cycles, lengths 9, 7, 7, 2, 1
8 Character examples C1 = (ADE) (FGH) (BC) P = (AD) (BG) (EF) (C) (H) Note: second example is self-inverse could be plugboard setting.
Theorem C1 = (ADE) (FGH) (BC) P = (AD) (BG) (EF) (C) (H) P C1 P = (AFD) (BHE) (CG) Theorem: P C1 P will have the form of permutation cycles as C1 (same lengths, different letters)
Question • What are the possible permutations chains for the cipher for a single setting of the Enigma – self-inverse with no letters going to themselves? Since it is self inverse, if letter s1 goes to letter s2, then s2 goes to s1. Since no letter goes to itself, s1 and s2 are different. Thus, every chain in the permutation is a transposition (s1 s2). The pattern is all pairs. (s1 s2) (s3 s4) … (s25 s26)
Application to Polish deciphering • Based on the German system of sending message key twice at the beginning of message (encrypted with day key) then message (encrypted with message key) • Consider the machine at step 1 and step 4 • two different ciphers encoding the same unknown letter • Same for steps 2 and 5, 3 and 6
Example L1 L2 L3 L1 L2 L3 B L V X P R
Consider step 1, step 4 settings Enigma Step 1 Enigma Step 4 L1 B L1 X Since Enigma is self-inverse, reverse the first one
Consider step 1, step 4 settings Enigma Step 1 Enigma Step 4 B L1 L1 X Produces a new cipher that takes B to X Can be characterized by its permutation cycles What is the effect of the plugboard?
Plugboard is P, rotors are R1 and R4 R1 P P R4 P P B L1 L1 X What is the effect of the plugboard?
Plugboard has no effect on cycle form! P R1 R4 P B X R1 followed by R4 forms a cipher with characteristic cycle form, not self-inverse. Plugboard has no effect on the cycle form, only the specific letters!
Idea of Polish Bombe R1 R2 X Q X B B Q Form machine from two Enigma Rotor machines, setup the same, but one 3 steps ahead of the other. Then step through settings. For each setting, check electrically for cycles
Polish procedure • Find cycle pattern for S1-S4, S2-S5,S3-S6 • Find machine settings with matching pattern • Originally done by hand cataloging all enigma settings • Later, when rotors were modified, automated with Bombes • Also used “females” – one element cycles • Pattern of number of females for each step pairing could often reduce possible machine settings to a few that could then be tested. • Punch card system to find matches