You are on page 1of 22

Classical Cryptography

Transposition Ciphers

Also called permutation ciphers.

Shuffle the plaintext, without altering the actual letters


used.
Example: Row Transposition Ciphers

10

Row Transposition Ciphers

Plaintext is written row by row in a rectangle.

Ciphertext: write out the columns in an order


specified by a key.
Key: 3 4 2 1 5 6 7

a t t a c k p
o s t p o n e

Plaintext:

d u n t i l t
wo a mx y z

Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
11

Transposition Decrypt Example

Cipher Text

A L E STY E C R O OW AW O A S N R I D N I X F LT P I
Z

Key Column = 5
Key Line = 35124

A
W
O
A
S
N

R
I
D
N
I
X
12

A
L
E
S
T
Y

F
L
T
P
I
Z

E
C
R
O
O
W

ARAFEWILLCODETRANSPOSITIONXYZW

13

Affine Cypher

where a-1 is the modular multiplicative inverse of a


modulo m. I.e., it satisfies the equation
1 = a a-1 mod m.

The multiplicative inverse of a only exists if a and m are


coprime.

14

15

Affine Cipher

Assume K=(5,8)

16

Affine Cipher -Encryption

17

Affine Cipher - Decryption

18

Affine Cipher - Example


Decipher HPCCXAQ if the encipherment function is
E(x) = (5x+ 8)MOD26
Solution: We begin by finding the decipherment function,

Since 5x1 (mod26) is solved with x 21 (mod26) we see 51 (mod26) = 21


Therefore, E1(y) = 21(y8)MOD26

19

20

21

22

You might also like