Laura Tinney Dr. Greg Boudreaux 1 Outline Some definitions and background Trifid Cipher What does it look like? How does it work? Research Project What is being done to attack this cipher? 2 Some Definitions Cipher: a method of transforming a text in order to conceal its meaning Encipher: to convert a message into cipher Decipher: to convert into intelligible form. Cryptography: the enciphering and deciphering of messages in secret code or cipher 3 Some Background Felix Delastelle 1840-1902 Published 1902 Traité Élémentaire de Cryptographie “Delastelle invented a fractionating system of considerable importance in cryptology” David Kahn 4 The Trifid Algorithm 1 1 2 2 3 1 3 2 3 1 1 1 1 2 2 2 3 3 3 2 3 5 The Trifid Algorithm 1 1 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I M A T 2 1 3 2 3 S T U 2 V W X 3 Y Z ! H Layer Column Row 6 The Trifid Algorithm 1 1 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I M Layer 2 Column 1 Row 2 A T 2 1 3 2 3 S T U 2 V W X 3 Y Z ! H 7 The Trifid Algorithm 1 1 2 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I M A T H Layer 2 1 3 1 Column 1 1 2 2 Row 2 1 1 3 1 3 2 3 S T U 2 V W X 3 Y Z ! 8 The Trifid Algorithm 1 1 2 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I M A T H Layer 2 1 3 1 Column 1 1 2 2 Row 2 1 1 3 1 2 3 2 3 S T U 2 V W X 3 Y Z ! 1 2 9 The Trifid Algorithm 1 1 2 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I 1 3 2 3 S T U 2 V W X 3 Y Z ! M A T H Layer 2 1 3 1 2 1 2 1 Column 1 1 2 2 1 1 3 2 Row 2 1 1 3 1 1 2 10 3 The Trifid Algorithm 1 1 2 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I 1 3 2 3 S T U 2 V W X 3 Y Z ! M A T H J Layer 2 1 3 1 2 1 2 1 Column 1 1 2 2 1 1 3 2 Row 2 1 1 3 1 1 2 11 3 The Trifid Algorithm 1 1 2 2 3 J K L 1 2 M N O 3 P Q R 1 2 3 1 A B C 1 2 D E F 3 G H I 1 3 2 3 S T U 2 V W X 3 Y Z ! M A T H J A O H Layer 2 1 3 1 2 1 2 1 Column 1 1 2 2 1 1 3 2 Row 2 1 1 3 1 1 2 12 3 A little about the project Cryptology Class The Team The Programmer The Analyzer As a group 13 Specifics/Assumptions of the Project 14 Specifics/Assumptions of the Project Chosen plaintext attack: assumes the attacker has the ability to choose whatever text they want to be encrypted, submit that material and receive the corresponding cipher text. (Encryption here is applying the Trifid Algorithm) 15 Recall the grid… Text Layer Column Row 16 Recall the grid… Text Layer 0 1 2 Column 3 4 5 Row 6 7 8 17 Recall the grid… Text Layer 0 1 2 Column 3 4 5 Row 6 7 8 Layer 0 3 6 Column 1 4 7 Row 2 5 8 Text 18 Recall the grid… Text Layer 0 1 2 Column 3 4 5 Row 6 7 8 Layer 0 3 6 Column 1 4 7 Row 2 5 8 Layer 0 1 2 Column 3 4 5 Row 6 7 8 Text Text 19 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 -----------------0 9 18 1 10 19 2 11 20 3 12 21 4 13 22 5 14 23 6 15 24 7 16 25 8 17 26 -----------------0 3 6 9 12 15 18 21 24 1 4 7 10 13 16 19 22 25 2 5 8 11 14 17 20 23 26 ------------------ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 20 21 22 23 24 25 Conjecture 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 -----------------0 9 18 1 10 19 2 11 20 3 12 21 4 13 22 5 14 23 6 15 24 7 16 25 8 17 26 -----------------0 3 6 9 12 15 18 21 24 1 4 7 10 13 16 19 22 25 2 5 8 11 14 17 20 23 26 -----------------0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 26 T = the Trifid Algorithm i= the row j= the column n= the number of columns (or length of message) Recall: mod is remainder div is quotient 27 n=3 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 28 n=3 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 0,0 29 n=3 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 0,0 1,0 30 n=3 0,0 0,1 0,2 0,0 1,0 2,0 1,0 1,1 1,2 0,1 1,1 2,1 2,0 2,1 2,2 0,2 1,2 2,2 31 st 1 , Proof that middle, and last don’t move We want to find all (i,j) W x W that are fixed by T, where T(i,j)= (ni + j)mod3, (ni+j)div3. 32 st 1 , Proof that middle, and last don’t move 33 st 1 , Proof that middle, and last don’t move 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 And everything else moves!! 34 Conjecture The order of the Trifid Permutation where n=number of columns=3k, k N is k+1. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 -----------------0 9 18 1 10 19 2 11 20 3 12 21 4 13 22 5 14 23 6 15 24 7 16 25 8 17 26 -----------------0 3 6 9 12 15 18 21 24 1 4 7 10 13 16 19 22 25 2 5 8 11 14 17 20 23 26 -----------------0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 35 0 15 30 1 16 31 2 17 32 3 18 33 4 19 34 5 20 35 6 21 36 7 22 37 8 23 38 9 24 39 10 25 40 11 26 41 12 27 42 13 28 43 14 29 44 ------------------ 0 5 10 15 20 25 30 35 40 1 6 11 16 21 26 31 36 41 2 7 12 17 22 27 32 37 42 3 8 13 18 23 28 33 38 43 4 9 14 19 24 29 34 39 44 -----------------0 31 18 5 36 23 10 41 28 15 2 33 20 7 38 25 12 43 30 17 4 35 22 9 40 27 14 1 32 19 6 37 24 11 42 29 16 3 34 21 8 39 26 13 44 -----------------0 25 6 31 12 37 18 43 24 5 30 11 36 17 42 23 4 29 10 35 16 41 22 3 28 9 34 15 40 21 2 27 8 33 14 39 20 1 26 7 32 13 38 19 44 36 T(i) = ni mod(3n-1), 0<i<3n-1 37 T(i) = ni mod(3n-1), 0<i<3n-1 0 1 0 2 2 3 4 1 4 5 3 5 38 T(i) = ni mod(3n-1), 0<i<3n-1 0 1 0 2 2 3 4 1 4 5 3 5 0, 1, 2, 3, 4, 5 39 T(i) = ni mod(3n-1), 0<i<3n-1 Recall: n = message length i = location 0 1 0 2 2 3 4 1 4 5 3 5 0, 1, 2, 3, 4, 5 0, 1, 2, 3, 4, 5 T(0) = 2(0)mod(3*2-1)≡0mod5 40 T(i) = ni mod(3n-1), 0<i<3n-1 Recall: n = message length i = location 0 1 0 2 2 3 4 1 4 5 3 5 0, 1, 2, 3, 4, 5 0, 1, 2, 3, 4, 5 T(0) = 2(0)mod(3*2-1)≡0mod5 T(1) = 2(1)mod5 ≡ 2mod5 T(2) = 2(2)mod5 ≡ 4mod5 T(3) = 2(3)mod5 ≡ 1mod5 T(4) = 2(4)mod5 ≡ 3mod5 41 In addition … Tk(i) = (nki)mod(3n-1) Calculates the ith location in the kth permutation. 42 Theorem The order of the Trifid Permutation where n=number of columns=3k, and k N is k+1. 43 Proof Unfortunately, not enough time… 44 A Big Question… What is the order of a Trifid permutation for an arbitrary number of columns, n? 45 Theorem The order of the Trifid permutation for n columns is a divisor of φ(3n-1), where φ is the Euler Phi function. 46 Theorem The order of the Trifid permutation for n columns is a divisor of φ(3n-1), where φ is the Euler Phi function. Corollary: If we are using the chosen plaintext attack, we can apply the Trifid Algorithm φ(3n-1) times and the message will be automatically decrypted. 47 Resources Bowers, W. M. (1961). Practical ctyptanalysis. (Vol. 3). American Cryptogram Association. http://cryptogram.org/cdb/aca.info/aca.and.you/c hapter_09.pdf#TRIFID Kahn, David, The Codebreakers 48