Presentation is loading. Please wait.

Presentation is loading. Please wait.

@Yuan Xue Quick Review.

Similar presentations


Presentation on theme: "@Yuan Xue Quick Review."— Presentation transcript:

1 @Yuan Xue (yuan.xue@vanderbilt.edu) Quick Review

2 @Yuan Xue (yuan.xue@vanderbilt.edu) Cryptography Overview Cryptography is a strong tool against many kinds of security threats. Encryption Symmetric Encryption Asymmetric Encryption

3 @Yuan Xue (yuan.xue@vanderbilt.edu) Symmetric Encryption Model The “key” is the key. The encryption/decryption algorithms (E and D) are published The key K is kept secret

4 @Yuan Xue (yuan.xue@vanderbilt.edu) Attacking Encryption Scheme Approach Brute-force attack, Cryptanalysis

5 @Yuan Xue (yuan.xue@vanderbilt.edu) Classical Ciphers Outline Mono-Alphabetic Ciphers Frequency Analysis Multiple-letter Ciphers (Block Cipher) Playfair cipher (use a key table) Hill Cipher (use key matrix) Polyalphabetic Ciphers (Stream Cipher) Vigenere cipher One-time Pad Rotor Machine From Substitution to Transposition

6 @Yuan Xue (yuan.xue@vanderbilt.edu) Playfair Cipher Use a table to specify the mapping

7 @Yuan Xue (yuan.xue@vanderbilt.edu) Playfair Cipher Playfair cipher was invented in 1854 by Charles Wheatstone, but bears the name of Lord Playfair who promoted the use of the cipher. Playfair cipher takes two-letter combinations (digrams) as single units for encryption. The encryption algorithm takes a 5*5 matrix of letters as a key table to translate digrams. The key table is constructed by a keyword.

8 @Yuan Xue (yuan.xue@vanderbilt.edu) Playfair Cipher Details To encrypt a message, 1. If both letters are the same (or only one letter is left), add an ``x'' (any uncommon letter will do) after the first letter. For example, ``balloon'' would be treated as ``ba lx lo on''. 2. If the letters appear on the same row of the table, replace them with the letters to their immediate right respectively (the table wraps around). For example, ar is encrypted as RM. 3. If the letters appear on the same column of the table, replace them with the letters immediately below respectively. For example, mu is encrypted as CM. 4. If the letters are not on the same row or column, replace them with the letters on the same row respectively but at the other pair of corners of the rectangle defined by the original pair. For example, hs is encrypted as BP, and ea is encrypted as IM (or JM).

9 @Yuan Xue (yuan.xue@vanderbilt.edu) Hill Cipher Use a mathematical function to specify a mapping

10 @Yuan Xue (yuan.xue@vanderbilt.edu) Hill Cipher Hill cipher was invented by Lester Hill in 1929. In the encryption algorithm, n successive letters in plaintext are considered as a n-dimension vector P. The algorithm takes a n*n matrix K as a key. The ciphertext C of P is also a n-dimension vector derived by multiplying P by K, modulo 26.

11 @Yuan Xue (yuan.xue@vanderbilt.edu) Hill Cipher Example Key P: pay

12 @Yuan Xue (yuan.xue@vanderbilt.edu) Hill Cipher Security Issue Known-plaintext attack For an m*m Hill cipher, if m plaintext-ciphertext pairs are known then the key matrix K can be derived by K = C*P -1, where P and C are the plaintext and ciphertext matrices. How to get m plaintext-ciphertext pairs?

13 @Yuan Xue (yuan.xue@vanderbilt.edu) Cryptanalytic Attack Classification Based on the knowledge of the attacker Ciphertext only attack encryption algorithm and ciphertext Known plaintext attack  Encryption algorithms are designed to withstand known plaintext attacks encryption algorithm, ciphertext, and one or more plaintext-ciphertext pairs formed with the secret key. Chosen plaintext attack encryption algorithm, ciphertext, and chosen plaintext and its corresponding ciphertext generated with the secret key. Chosen ciphertext attack encryption algorithm, ciphertext, and chosen ciphertext and its corresponding decrypted plaintext with the secret key. Chosen text attack chosen plaintext attack + chosen ciphertext attack

14 @Yuan Xue (yuan.xue@vanderbilt.edu) Multiple-letter Ciphers How to design a stronger block cipher? Larger key space Larger block size (more letters) Relationship between key and plaintext-to-ciphertext map needs to be complex (e.g., can not be a linear mapping) Any other idea?  Stream cipher

15 @Yuan Xue (yuan.xue@vanderbilt.edu) Polyalphabetic Ciphers Polyalphabetic cipher uses different monoalphabetic substitution as it proceeds through the plaintext. A set of monoalphabetic substitution rules; A key that determines which particular rule is chosen for a given transformation. Vigenere cipher One-time pad For each message encryption, a new key of the same length as the message is used. perfect secrecy

16 @Yuan Xue (yuan.xue@vanderbilt.edu) Vigener cipher (16’th century, Rome) k = C R Y P T O C R Y P T O P = W H A T A N I C E D A Y T O D A Y C R Y P T (+ mod 26) c = Z Z Z J U C L U D T U N W G C Q S suppose most common = “H” first letter of key = “H” – “E” = “C” Credit: Dan Boneh, “Introduction to Cryptography”

17 @Yuan Xue (yuan.xue@vanderbilt.edu) One-time Pad (Vernam 1917) P = 0 1 1 0 1 0 1 1 0 0 (XOR) K = 1 0 0 0 1 1 0 0 1 0 C = 1 0 0 0 1 1 0 0 1 0 Random sequence with same length as P

18 @Yuan Xue (yuan.xue@vanderbilt.edu) Perfect secure cipher Attacker’s abilities: Ciphertext only attack (for now) Shannon: [1949]: Ciphertext should reveal no “info” about plaintext Information Theoretic Security Def: A cipher (E,D) over (K,P,C) has perfect secrecy if ∀ m 0, m 1 ∈ M ( |m 0 | = |m 1 | ) and ∀ c ∈ C Pr [ E(k,p 0 )=c ] = Pr [ E(k,p 1 )=c ] where k is randomly sampled from K with uniform distribution Credit: Dan Boneh, “Introduction to Cryptography”

19 @Yuan Xue (yuan.xue@vanderbilt.edu) Rotor Machines (1870-1943) Early example: the Hebern machine (single rotor) ABC..XYZABC..XYZ ABC..XYZABC..XYZ KST..RNEKST..RNE KST..RNEKST..RNE EKST..RNEKST..RN EKST..RNEKST..RN NEKST..RNEKST..R NEKST..RNEKST..R key Credit: Dan Boneh, “Introduction to Cryptography” Defines a mono-alphabetic substitution Rotates after each input is processed, leading to a polyalphabetic substitution with period of 26

20 @Yuan Xue (yuan.xue@vanderbilt.edu) Rotor Machines (cont.) Most famous: the Enigma (3-5 rotors)

21 @Yuan Xue (yuan.xue@vanderbilt.edu) Transposition Transposition technique changes the order of the letters in a message. Columnar Transposition Cipher Permutation Cipher

22 @Yuan Xue (yuan.xue@vanderbilt.edu) Summary Two types of ciphers Stream cipher -- encrypts one letter at a time  E.g. Vigenere cipher Block cipher -- treats a n-letter block of plaintext as a whole and produce a ciphertext block of equal length  E.g. Hill cipher Two basic building components for block ciphers Substitution Transposition Relationship to modern ciphers Hill cipher  RSA Vigenere cipher  RC4 Rotor machine  DES

23 @Yuan Xue (yuan.xue@vanderbilt.edu)


Download ppt "@Yuan Xue Quick Review."

Similar presentations


Ads by Google