Transcript Trifid Cipher
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
1 2 3
The Trifid Algorithm
1
1 2 3
2 3 1 2 3 1 2
1 2 3 1 2 3
3
5
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
M A T H
Layer Column Row 6
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
Layer Column Row
M
2 1 2
A T H
7
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
Layer Column Row
M
2 1 2
A
1 1 1 2 1
T
3
H
1 2 3 8
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
Layer Column Row
M
2 1 2
A
1 1 1 2 1
T
3
H
1 2 3 2 1 2 9
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
Layer Column Row
M
2 1 2
A
1 1 1 2 1
T
3
H
1 2 3 2 1 1 1 1 1 2 3 2 1 10 2 3
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
Layer Column Row
M
2 1 2
A
1 1 1 2 1
T
3
H
1 2 3
J
2 1 1 1 1 1 2 3 2 1 11 2 3
1 2 3 G D A
1
The Trifid Algorithm
1 2 3
2 3 1 2 3 1 2
1 J K L 1 S T B C 2 M N O 2 V W E F 3 P Q R 3 Y Z H I
3
U X !
Layer Column Row
M
2 1 2
A
1 1 1 2 1
T
3
H
1 2 3
J
2 1 1
A
1 1 1
O
2 3 2
H
1 12 2 3
A little about the project
Cryptology Class The Team The Programmer The Analyzer As a group 13
Specifics/Assumptions
14
Specifics/Assumptions
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 Column Row 0 3 6 1 4 7 2 5 8 17
Recall the grid…
Text
Layer Column Row 0 3 6 1 4 7 2 5 8
Text
Layer Column Row 0 1 2 3 4 5 6 7 8 18
Recall the grid…
Text
Layer Column Row 0 3 6 1 4 7 2 5 8
Text
Layer Column Row 0 1 2 3 4 5 6 7 8
Text
Layer Column Row 0 3 6 1 4 7 2 5 8 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 1,0 2,0 0,1 1,1 2,1 0,2 1,2 2,2
28
n=3
0,0 1,0 2,0 0,1 1,1 2,1 0,2 1,2 2,2
0,0
29
n=3
0,0 1,0 2,0 0,1 1,1 2,1 0,2 1,2 2,2
0,0 1,0
30
n=3
0,0 1,0 2,0 0,1 1,1 2,1 0,2 1,2 2,2
0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2
31
Proof that 1
st
, 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
Proof that 1
st
, middle, and last don’t move
33
Proof that 1
st
, middle, and
0,0 1,0 2,0 0,1 1,1 2,1 0,2 1,2 2,2
And everything else moves!!
34
The order of the Trifid Permutation where n=number of columns=3
k
,
k
Conjecture
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
37
T(i) = ni mod(3n-1), 0
0 2 4 1 3 5 0 4 3 2 1 5
38
T(i) = ni mod(3n-1), 0
0 2 4 1 3 5 0 4 3 2 1 5
0, 1, 2, 3, 4, 5 39
T(i) = ni mod(3n-1), 0
0 2 4 1 3 5 0 4 3 2 1 5
Recall: n = message length i = location 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
0 2 4 1 3 5 0 4 3 2 1 5
Recall: n = message length i = location 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 …
T k (i) = (n k i)mod(3n-1)
Calculates the i th location in the k th permutation. 42
Theorem
The order of the Trifid Permutation where n=number of columns=3
k
, 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