Week3 Classical Encryption (1)
Week3 Classical Encryption (1)
Techniques
Transposition Ciphers
A transposition ciphers changes the position of the plaintext using various
techniques to get the cipher text instead of substitution
Rail Fence Technique
Alice wants to send Bob a message as follows: attack is at 3pm today
Key known to both Bob and Alice is 3
Grid is created as follows:
Number of rows = key
Number of columns =characters in the message
a c a m a
t a k s t p t d y
t i 3 o
Rail Cipher - Decryption
Cipher text is : ACAMA TAKSTPTDY TI30
A C A M A
T A K S T P T D Y
T I 3 0
Easy to cryptanalyze
More complex method is to use a key or keyword to change the
order in which the plaintext is encrypted
Transposition cipher
Key used is 4312567 (or a keyword can be used eg:PASWORD)
Plaintext is: attack postponed until two am
4 3 1 2 5 6 7
a t t a c k p
o s t p o n e
d u n t i l t
w o a m x y z
Transpose the columns based on the key to get the cipher text(1234567)
TTNAAPTMTSUOAODWCOIXKNLYPETZ
Repeat the procedure with the ciphertext to achieve double transposition
Polyalphabetic ciphers
Polyalphabetic substitution cipher – one that uses multiple monoalphabetic
substitutions for the plaintext message
All such ciphers have the following features
Set of related monoalphabetic substitution rules is used
A key determines which particular rule is used for a given
transformation
Polyalphabetic cipher examples
Vignére cipher
Vernam Cipher
One-time pad
Vigenére Cipher
Using the key word PASWD encrypt the message: make it happen now
Steps
Determine the letter positions of the key word
P – 15
A–0
S – 18
W – 22
D–3
Using the keyword shift the letters of the plain text
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
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
Vigenére Cipher - Encryption
Enter the shift for the plaintext message
m a k e i t h a p p e n n o w
15 0 18 22 3 15 0 18 22 3 15 0 18 22 3
Steps
BEach
A letter
C isA shifted
L inI theH opposite
S L direction
S T to get
N the
F plaintext
K Z
15 0 18 22 3 15 0 18 22 3 15 0 18 22 3
m a k e i t h a p p e n n o w