You are on page 1of 8

IT2352 Cryptography and Network Security

04-Jan-2013

Modulo 7 Arithmetic
Define S = {0,1,2, , 6} Define +7 : S x S S as +7(a,b) = a+b mod 7 Define .7 : S x S S as .7(a,b) = a . b mod 7 Note that .7 operation can also described in the table below

Modulo 7 Arithmetic
Note that The multiplicative identity is 1 All non zero elements have inverses

Exercise
Try the modulo arithmetic for S = {0, 1, 2, 3} What is the multiplicative inverse for 2?

Point to Note
Let S = {0, 1, 2, , n-1}, where n > 1. For any a S, if gcd(a,n) = 1, then a-1 exists. So, if n is a prime number, we have no issues (why?) The next best thing is to have a and n being co-primes

Affine Cipher
Encryption: for plaintext x, compute y = ax + b Key K = (a,b)

a can not take some values (e.g., 0)


(a,b) = (1,0) does not make sense Decryption: a-1(y-b) a-1 exists only when gcd(a,26)=1 the choices for a are {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21}

Cryptanalysis Affine cipher


Use statistics of the language to break the key!

In English 'e' occurs most frequently followed by 't'


Observe the top 2 most frequent numbers in the cipher text; let them be m, n

Equate a 4 + b = m and a19 + b = n

To read
From the reading material posted, read the following attacks 1. Ciphertext only 2. Known plaintext 3. Chosen plaintext 4. Chosen ciphertext for the cipher systems we have studied.

You might also like