Rail-Fence Cipher Presentation

30
The Rail-Fence Cipher Matt Brems Melissa Hannebaum Franklin College

description

Presented by Matthew Brems and Melissa Hannebaum, students at Franklin College, documenting results of summer research under the direction of Dr. Robert Talbert, PhD.

Transcript of Rail-Fence Cipher Presentation

Page 1: Rail-Fence Cipher Presentation

The Rail-Fence Cipher

Matt BremsMelissa Hannebaum

Franklin College

Page 2: Rail-Fence Cipher Presentation

Cryptology

Matt Melissa

Be Rational.

Get Real.

Page 3: Rail-Fence Cipher Presentation

Methods of Character Encryption

Substitution Transposition

FRANKLIN

PQLUFITU

Plaintext

Ciphertext

Page 4: Rail-Fence Cipher Presentation

Methods of Character Encryption

Substitution

FRANKLIN

PQLUFITU

Plaintext

Ciphertext

Plaintext

Ciphertext

Part Of Key

Page 5: Rail-Fence Cipher Presentation

Methods of Character Encryption

Transposition

FRANKLIN

NILKNARF

Plaintext

Ciphertext

Page 6: Rail-Fence Cipher Presentation

Transposition Cipher• Columnar• A method of encryption in which the plaintext

is shifted according to a regular system, so that the ciphertext constitutes a permutation of the plaintext.

Function

Page 7: Rail-Fence Cipher Presentation

Columnar Transposition As A Function

f(x)=y

f(x) = y

Page 8: Rail-Fence Cipher Presentation

Columnar Transposition As A Function

Transposition Cipher

f(plaintext)=ciphertext

Plaintext

Ciphertext

Page 9: Rail-Fence Cipher Presentation

Columnar Transposition As A Function

• The columnar transposition cipher uses a bijective (one-to-one and onto) function to encrypt the text and an inverse function to decrypt the text.

f (ciphertext)=plaintext-1

f(plaintext)=ciphertext

Page 10: Rail-Fence Cipher Presentation

Columnar Transposition

• Three ColumnsC = 3

COLUMNARC O L

U M N

A RCUAOMRLN

Page 11: Rail-Fence Cipher Presentation

Rail-Fence Cipher

• Two Columns• C = 2

COLUMNARC

U

A

O

MR

LN

CLMAOUNR

Page 12: Rail-Fence Cipher Presentation

Rail-Fence Cipher

• C = 2

C A

RN

M

U

L

OCLMAOUNR

COLUMNAR

Page 13: Rail-Fence Cipher Presentation

Selected Formulas

Page 14: Rail-Fence Cipher Presentation

Rail-Fence Cipher

S M I T HS I H M TS H T I MS T M H IS M I T H

Page 15: Rail-Fence Cipher Presentation

Rail-Fence Cipher

• 4 permutations• Conjecture: Length n

implies order (n-1)

S M I T HS I H M TS H T I MS T M H IS M I T H

Page 16: Rail-Fence Cipher Presentation

Rail-Fence CipherF R A N K L I N C O L L E G E M A T H A N D C O M P U T I N G !

F A K I C L E E A H N C M U I G R N L N O L G M T A D O P T N !

F K C E A N M I R L O G T D P N A I L E H C U G N N L M A O T !

F C A M R O T P A L H U N L A T K E N I L G D N I E C G N M O !

F A R T A H N A K N L D I C N O C M O P L U L T E I G N E G M !

F R A N K L I N C O L L E G E M A T H A N D C O M P U T I N G !

Order = 5

Page 17: Rail-Fence Cipher Presentation

Rail-Fence Cipher

• Length of plaintext = 5• Cycles of characters• Can be numerous cycles

in one encryption

S M I T HS I H M T

0 1 2 3 4

0 1 2 3 4

(0) (1, 3, 4, 2)

Trivia

l Cycl

e Initial Cycle

Page 18: Rail-Fence Cipher Presentation

Length = 16F R A N K L I N C O L L E G E !F A K I C L E E R N L N O L G !

(0) (1-8-4-2) (3-9-12-6) (5-10) (7-11-13-14) (15)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Page 19: Rail-Fence Cipher Presentation

Length = 16

1

8

4

2

3

9

12

6

7

11

13

14

5

10

(0) (1-8-4-2) (3-9-12-6) (5-10) (7-11-13-14) (15)

F R A N K L I N C O L L E G E !F A K I C L E E R N L N O L G !

Page 20: Rail-Fence Cipher Presentation

Length = 16

1

8

4

2

3

9

12

6

7

11

13

14

5

10

(0) (1-8-4-2) (3-9-12-6) (5-10) (7-11-13-14) (15)

F R A N K L I N C O L L E G E !F A K I C L E E R N L N O L G !

Page 21: Rail-Fence Cipher Presentation

Length = 16

1

8

4

2

3

9

12

6

7

11

13

14

5

10

(0) (1-8-4-2) (3-9-12-6) (5-10) (7-11-13-14) (15)

F R A N K L I N C O L L E G E !F A K I C L E E R N L N O L G !

Page 22: Rail-Fence Cipher Presentation

Length = 16

1

8

4

2

3

9

12

6

7

11

13

14

5

10

(0) (1-8-4-2) (3-9-12-6) (5-10) (7-11-13-14) (15)

F R A N K L I N C O L L E G E !F A K I C L E E R N L N O L G !

Page 23: Rail-Fence Cipher Presentation

Length = 16

1

8

4

2

3

9

12

6

7

11

13

14

5

10

(0) (1-8-4-2) (3-9-12-6) (5-10) (7-11-13-14) (15)

F R A N K L I N C O L L E G E !F A K I C L E E R N L N O L G !

Page 24: Rail-Fence Cipher Presentation

Length Cycle

2 1

3 2

4 2

5 4

6 4

7 3

8 3

9 6, 2

10 6, 2

Length Cycle

11 10

12 10

13 12

14 12

15 4, 2

16 4, 2

32 5

49 21

64 6

Length of 2 = n-cycle n

Page 25: Rail-Fence Cipher Presentation

F R A N K L I N C O L L E G E M A T H A N D C O M P U T I N G !

F A K I C L E E A H N C M U I G R N L N O L G M T A D O P T N !

F K C E A N M I R L O G T D P N A I L E H C U G N N L M A O T !

F C A M R O T P A L H U N L A T K E N I L G D N I E C G N M O !

F A R T A H N A K N L D I C N O C M O P L U L T E I G N E G M !

F R A N K L I N C O L L E G E M A T H A N D C O M P U T I N G !

Primes

Length = 32 = 2 5 5-Cycle

Page 26: Rail-Fence Cipher Presentation

General Rules

Page 27: Rail-Fence Cipher Presentation
Page 28: Rail-Fence Cipher Presentation

Answered Questions

• What are the fixed points in a RFC?

• What are the fixed points in a general CTC?

• Can we tell when the RFC has a k-cycle?

Page 29: Rail-Fence Cipher Presentation

Unanswered Questions

• Simple way to calculate length of initial cycle?

• Can we tell when the CTC has a k-cycle?

• How much of this works if C > 2?

Page 30: Rail-Fence Cipher Presentation

Questions?