Presentation is loading. Please wait.

Presentation is loading. Please wait.

Classical Cryptosystems Shift Ciphers (Caesar) y= x+k (mod 26) Affine Ciphers y=ax+b (mod 26) Vigenere Ciphers codes=(02,14,03,04,18) Substitution Ciphers.

Similar presentations


Presentation on theme: "Classical Cryptosystems Shift Ciphers (Caesar) y= x+k (mod 26) Affine Ciphers y=ax+b (mod 26) Vigenere Ciphers codes=(02,14,03,04,18) Substitution Ciphers."— Presentation transcript:

1 Classical Cryptosystems Shift Ciphers (Caesar) y= x+k (mod 26) Affine Ciphers y=ax+b (mod 26) Vigenere Ciphers codes=(02,14,03,04,18) Substitution Ciphers (26! Permutations) Sherlock Holmes P27 (Visual Substitution) The Playfair and ADFG[V]X Ciphers Block Ciphers PseudoRandom Number Generators

2 Shift Cipher y=x+k (mod 26) attack  XQQXZH (k=23 mod 26) great  ITGCV (k=2 mod 26) 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 a b c d

3 Affine Cipher y=ax+b mod 26 how are you  QZNHOBXZD, (a,b)=(5,7) wo??er?u?  NZUWBOGDK, (a,b)=(5,7) gcd(a,26)=1 is required Table for ax=1 mod 26 1(1) 7(15) 15( 7) 21(5) 3(9) 9( 3) 17(23) 23(17) 5(21) 11(19) 19(11) 25(25)

4 Frequencies of Letters in English 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

5 Vigenere Cipher The same letter need not be enciphered as the same letter Key: vector=(21,4,2,19,14,17) h e r e i s h o w i t w o r k s v e c t o r v e c t o r v e c t C I T X W J C S Y B H N J V M L Attacks according to the following information (1) The frequencies of letters in English A0=[.082,.015,.028, …,.020,.001] is larger than, j=1,2,...,25 (2) Key length (3) Digrams (e.g., WX) or trigrams (e.g., FHQ)

6 Sherlock Holmes A visual substitution (use a visual pattern to replace each English letter)

7 The Playfair p l a y f i r b c d e g h k m n o q s t u v w x z meet at the schoolhouse  me et at th es ch ox ol ho us ex EG MN FQ QM KN BK SV VR GQ XN KU

8 ADFGX Cipher A D F G X A p g c e n D b q o z r F s l a f t G m d v i w X k u y x h Kaiser Wilhelm  XA FF GG FA AG DX GX GG FD XX AG FD GA

9 Block Ciphers Hill cipher, DES, AES, RSA, Electronic Codebook, Elliptic Curve cryptosystems Find the inverse of A and B (mod 26) A=3 4 inv-A= M = [1 2 3; 4 5 6; ] inv-M=[22 5 1; ; ]

10 Hill Cipher blockcipherx ( ) (2 10 2) (8 15 7) ( ) ( )M=( ) (mod 26) = RBZ (2 10 2)M =( ) (mod 26) = MUE blockcipher  RBZMUEPYONOM

11 Binary Numbers and ASCII ASCII – American Standard Code for Information Interchange A=65= ~ Z=90= a=97= ~ z=122= [33~47] ! “ # $ % & ' ( ) * +, -. / [48~64] : ; ¡ = ¿

12 One-time Pads By Gilbert Vernam and Joseph Mauborgne around 1918 The key is a random sequence of 0’s and 1’s of the same length as the message. Once a key is used, it is discarded and never used again ⊕ = Used in “hot line” between USSR and US

13 Pseudo-random Bit Generation Rand() based on a linear congruential generator x n =ax n-1 + b (mod m) with gcd(a,m)=1, m= = x 0 =seed, a=16847, b= Blum-Blum-Shub (BBS) bit generator Select n=pq, the product of two primes x 0 =seed=x 2 (mod n), where gcd(x,n)=1 x j =(x j-1 ) 2 (mod n) and b j = x j ^ 1

14 Linear Feedback Shift Register (LFSR) Sequences (mod 2) Plaintext (x 1, x 2, x 3, x 4, x 5 )=(0,1,0,0,0) X n+5 =X n + X n+2 (mod 2) X n+m =c 0 x n +c 1 x n+1 +····+c m-1 x n+m-1 (mod 2) X n+31 =X n + X n+3 (mod 2) has period

15 Proposition Let M be a matrix (mod 2) {x 1 x 2 x 3 ··· x m x 2 x 3 x 4 ··· x m+1 ︰ x m x m+1 x m+2 ··· x 2m-1 }={x j } If the sequence {x j } satisfies a linear recurrence of length less than m, then det(M)=0. Cinversely, if the sequence satisfies a linear recurrence of length m and det(M)=0, then the sequence also satisfies a linear recurrence of length than m.

16 (plaintext) (key) (ciphertext)

17 Cryptanalysis Suppose X n+2 =C 0 X n +C 1 X n+1

18 Cryptanalysis If the linear recurrence of length is less than m,then

19 Irreducible Polynomial mod 2 x n+m =c 0 x n +c 1 x n+1 +····+c m-1 x n+m-1 (mod 2) f(T)=T m –c m-1 T m-1 - ‥‥ - c 1 T 1 – c 0 If f(T) is irreducible, then its period divides 2 m – 1, an interesting case is when 2 m – 1 is a prime (Mersenne primes) 2 31 – 1 = is a prime number Further discuss this topic later

20 Enigma A mechanical encryption device used by the Germans in World War II. A rotor machine

21 Enigma

22 Schematic diagram of Enigma

23

24 K:keyboard R:revering drum S:plugboard L,M,M:rotors

25 Single Rotor 26 substitution cipher A1,A27,A53…. A2,A28,A54…. Frequency analysis

26 Three Rotors 26*26*26*6= possibilities ways of interchanging six pairs of letters on the plugboard.

27 To Attack Enigma A codebook containing the daily settings. During a given day,every first letters in plaintexts is encrypted in the same substitution cipher.

28 To Attack Enigma Message key:a sequence of three letters,for example,r,f,u. rfurfu Daily setting Encrypting the message key Reset

29 To Attack Enigma dmqvbn vonpuy pucfmq AD=(dvpf..)… AD=(dvpfkxgzyo)(eijmunqlht)(bc)(rw)(a)(s)

30 The Effect of the Plugboard AD has cycles of length 10,10,2,2,1,1. SADS -1 has cycles of length 10,10,2,2,1,1. The cycle lengths remain unchanged. Substitution cipher

31 Bletchley Park

32 Exercises Problems from 2.13 Exercises on p.55~59 Problems from 2.14 Exercises on p.59~62


Download ppt "Classical Cryptosystems Shift Ciphers (Caesar) y= x+k (mod 26) Affine Ciphers y=ax+b (mod 26) Vigenere Ciphers codes=(02,14,03,04,18) Substitution Ciphers."

Similar presentations


Ads by Google