Module 1b
Module 1b
C= =
• C=
One time pad (Vernam cipher) - Encryption
One time pad (Vernam cipher) - Decryption
Rotor cipher
Enigma machine
Transposition Ciphers
Transposition Ciphers
• Changes locations of symbols
oKeyless transposition ciphers
oKeyed transposition ciphers
oCombination of above two ciphers
Keyless transposition ciphers
Rail fence technique
• Write down plain text in sequence of diagonals
• Read plaintext as a sequence of rows
• Ex –
Ciphertext - iibihsnyatsrgtundy
Simple columnar technique
1. Write plaintext row by row in rectangle of pre defined size
2. Read message column by column. Column order – random
3. Message obtained – ciphertext
4. Ex –
Plaintext – it is bright sunny day
i t i s b r
i g h t s u
n n y d a y
Encryption 4 1 3 2 5
Decryption
1 2 3 4 5
• Binary operations
Ex – binary operation
Integer division
• a=q*n+r
Graph of division algorithm
Divisibility
• a = q*n
GCD
• Largest integer that can divide both integers
Euclidean algorithm
• gcd (a, 0) = a
• gcd (a, b) = gcd (b, r), where r – remainder of dividing a by b
Ex – Euclidean algorithm
• Find GCD of 25 and 60.
Extended Euclidean algorithm
s = s1 – q *s2 t = t1 – q*t2
Contd.
Ex – Extended Euclidean Algorithm
• Find gcd (161, 28). Also find s and t.
Ex – Extended Euclidean Algorithm
• Find gcd (17,0). Also find s and t.
Linear Diophantine Equation
• ax + by = c
• d = gcd(a,b)
• Particular solution:
x0 = (c/d)s and y0 = (c/d)t
• General solutions:
• x = x0 + k (b/d) and y = y0 − k(a/d)
where k is an integer
Modular arithmetic
Set of residues