























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























2
(P , C , K , E , D ) satisfying
4
5
Letters are identified with numbers: A=0, B=1, .... , Z= Z 26 P = C = K = Z 26 eK ( x ) = ( x + K ) mod 26 dK ( y ) = ( y โ K ) mod 26
7
8
Taking any group G (even non-commutative) can generalize shift cipher by using G โs โadditionโ rule:
10
11
DEF: The ring is the set with addition and multiplication taken mod m. LEMMA: x is invertible in iff gcd(x, m) = 1. COR: is a field iff m is prime. DEF:. In other words, is the number of elements in which are relatively prime to m.
!( m ) = |Z โ m | Z m !( m ) Z m { 0 , 1 ,... , m โ 1 } Z m Z m
13
Can define a general cipher over any ring, even non-commutative rings (where multiplication non-commutative, but addition commutative).
14
Shift and Affine cipher have limited key spaces. Better to use all possible permutations of :
16
THM: Let A be a square matrix whose entries are in. A is invertible modulo m iff det( A ) is invertible in. Furthermore the inverse of A mod- m is given by where is the inverse of A over.
17
19
**>> A = [ [21 10] ; [18 5] ];
d = det(A) d = - [g, e, t] = gcd(d,26) g = 1 e = 9 t = 26 B = A^- B = -0.0667 0. 0.2400 -0. B = Bde B = 45.0000 -90. -162.0000 189. B = round(B) B = 45 - -162 189 B = mod(B,26) B = 19 14 20 7 C = AB C = 599 364 442 287 mod(C,26) ans = 1 0 0 1*
20