Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography (Traditional Ciphers)

Similar presentations


Presentation on theme: "Cryptography (Traditional Ciphers)"— Presentation transcript:

1 Cryptography (Traditional Ciphers)
Week-7

2 Substitution Ciphers Monoalphabetic Substitution Ciphers
An improvement over the Caesar cipher Change/replace one symbol with another Obscures the meaning of a symbol (confusion) P : 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 C : Z X Y W U V T R S Q O P N L M K I J H F G E C D B A Each symbol in the plain alphabet P maps onto some other symbol in the cipher alphabet C

3 Substitution Ciphers Monoalphabetic Substitution Ciphers
Effectively, we are using a 26-character key (26-letter string) corresponding to the alphabet In how many ways can all the 26-character be rearranged (permutation)? Brute force attack Not feasible: 26! (4 x 1026 ) – Enormous the key space At 1 nsec (billionth of a second) per solution, a computer would take ~10 billion years (1010) to try all the keys

4 Substitution Ciphers 4 x 1026 Incomprehensible!

5 Substitution Ciphers Cryptanalysis Attack
Basic attack takes advantage of statistical properties of English: In English, e (most common letter) followed by t, o, a, n, i, etc. Common two-letter combinations (digrams): th, in, er, re, an Common three-letter combinations (trigrams): the, ing, and, ion

6 Substitution Ciphers Cryptanalysis Attack
First, count relative frequencies of all letters in the ciphertext Second, tentatively assign most common letter to e, next common one to t and so on Third, find common trigrams of the form [t ? e], strongly suggesting that ? is h Fourth, check if [t h ? t] occurs frequently, suggesting that ? stands for a

7 Substitution Ciphers English Letter Frequencies

8 Substitution Ciphers Multiple Substitution
Two or more substitution ciphers used in series Letters 1, 3, 5 .. encrypted under cipher (or key) 1; Letter 2, 4, 6 encrypted cipher (or key) 2 etc.

9 Substitution Ciphers Multiple Substitution - Example
q r s t u v w x y z 13 14 15 16 17 18 19 20 21 22 23 24 25 I THINK THAT I SHALL NEVER SEE Under cipher 1: I H N T A I H L N V R E Under cipher 2: T I K H T S A L E E S E Cipher 1 = n + 3; cipher 2 = n + 5 Ciphertext 1 : L K Q W D L K O Q Y U H Ciphertext 2 : Y N P M Y X F Q J J X J Result: LYKNQPWMDYLXKFOQQJYJUXHJ

10 Transposition Ciphers
Various Types Plaintext symbols are simply reordered and not replaced like substitution cipher (diffusion) Each letter represents itself keeping the frequency distribution intact Simple Example Plaintext : CAT Possible Ciphertext: { CTA, ACT, ATC, TCA, TAC }

11 Transposition Ciphers
Columnar Transposition Simple Example Plaintext written in fixed-length rows, read off by columns Example: SAM PLE becomes SPALME Other more complex Examples Use of a key to number the columns. “we lost the war” W E L O S T T H E W A R Result: Lta ohr etw wse

12 One-Time Pad The only unbreakable cipher (Theoretically) Example:
First, convert the plaintext message into a bit string (ASCII) e.g. “ I love you.” Second, choose random bit string key (key pad) with same length as the plaintext Third, compute XOR (eXclusive OR) of the two strings, bit by bit plaintext: … key pad: … Ciphertext: …

13 Book Cipher Similar to one-time pad
Uses book (poem, piece of music, newspaper) to which both sender and receiver have access Starting at a predetermined place in the shared object, use the element of the object as random numbers for a on-time pad Weaknesses due to predictability in written objects, possible availability of shared objects to third party

14 Book Cipher Example uaopm kmkvt unhbl jmed because row M column i is u, row A column a is a, and so on.

15 Hardware Implementation
Transposition P-Box (Permutation Box or P-Box) device Substitution S-Box (Substitution Box or S-Box) device Product Cipher Combines P-Boxes and S-Boxes

16 Thank You !


Download ppt "Cryptography (Traditional Ciphers)"

Similar presentations


Ads by Google