ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Cryptography encryption authentication digital signatures
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
CS 5950/6030 Network Security Class 5 (M, 9/12/05) Leszek Lilien Department of Computer Science Western Michigan University [Using some slides prepared.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
IN2150/TEL2810: Introduction to Computer Security1 October 25, 2005 Introduction to Computer Security Lecture 7 Basic Cryptography & Network Security.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide crypto1-1 Crypto – B/B mindmeld history symmetric hashes/macs/1-way etc public.
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Chapter 2 Basic Encryption and Decryption (part B)
Lecture 1 Overview.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
Chapter 2 – Classical Encryption Techniques
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Cryptography Week-6.
Cryptanalysis. The Speaker  Chuck Easttom  
Section 2.4 Transposition Ciphers Practice HW (not to hand in) From Barr Text p. 105 #
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Lecture 2 Overview.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 7 Oct 20, 2009 Basic Cryptography Network Security.
CIS 725 Security. Cryptosystem Quintuple ( E, D, M, K, C ) M set of plaintexts K set of keys C set of ciphertexts E set of encryption functions e: M 
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
Lec. 5 : History of Cryptologic Research II
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Classical Cryptography.
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Symmetric-Key Cryptography
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
CSCI 5857: Encoding and Encryption
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Classical Crypto By: Luong-Sorin VA, IMIT Dith Nimol, IMIT.
Cryptograpy By Roya Furmuly W C I H D F O P S L 7.
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
Traditional Symmetric-Key Ciphers
September 10, 2009Introduction to Computer Security ©2004 Matt Bishop Slide #8-1 Chapter 8: Basic Cryptography Classical Cryptography Public Key Cryptography.
Data Security and Encryption (CSE348) 1. Lecture # 3 2.
May 6, 2004ECS 235Slide #1 Clinical Information Systems Security Policy Intended for medical records –Conflict of interest not critical problem –Patient.
Lecture 4 Page 1 CS 236 Online Basic Encryption Methods Substitutions –Monoalphabetic –Polyalphabetic Permutations.
1.1 Introduction to Cryptography. 1.2 Basic Cryptography Cryptography is a deep mathematical subject. Cryptographic protocols provide a cornerstone for.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Lecture 2 Overview. Cryptography Secret writing – Disguised data cannot be read, modified, or fabricated easily – Feasibility of complexity for communicating.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.
Chapter Two: Classic Cryptography
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Classical Cryptography.
Lecture 3 Page 1 CS 236 Online Basic Encryption Methods Substitutions –Monoalphabetic –Polyalphabetic Permutations.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Chapter 2 Basic Encryption and Decryption
Asad Gondal Ali Haider Mansoor
Basic Encryption Methods
Taehyung Kim HPC Lab. POSTECH
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Traditional Symmetric-Key Ciphers
Symmetric Encryption or conventional / private-key / single-key
Presentation transcript:

ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang

2 Chapter 8: Basic Cryptography Classical Cryptography Public Key Cryptography Cryptographic Checksums

3 Overview Classical Cryptography (symmetric encryption) –Caesar cipher –Vigenère cipher –DES –AES Public Key Cryptography (asymmetric encryption) –RSA Cryptographic Checksums

4 Cryptosystem Quintuple ( E, D, M, K, C ) –M set of plaintexts –K set of keys –C set of ciphertexts –E set of encryption functions e: M  K  C –D set of decryption functions d: C  K  M –Usually, the cipher text is longer than or has the same length as the plaintext

5 Example Example: Caesar cipher (a circular shift mapping) –M = { sequences of letters } –K = { i | i is an integer and 0 ≤ i ≤ 25 } –E = { E k | k  K and for all letters m, E k (m) = (m + k) mod 26 } –D = { D k | k  K and for all letters c, D k (c) = (26 + c – k) mod 26 } –From the space point of view, C = M

6 Attacks Opponent whose goal is to break cryptosystem is the adversary –Assume adversary knows algorithm used, but not key –They are after the key and/or data contents Three types of attacks: –ciphertext only: adversary has only ciphertext; goal is to find plaintext, possibly key –known plaintext: adversary has ciphertext, corresponding plaintext; goal is to find key –chosen plaintext: adversary may supply plaintexts and obtain corresponding ciphertext; goal is to find key –It is not difficult to know both ciphertext and plaintext

7 Basis for Attacks Mathematical attacks –Based on analysis of underlying mathematics –For example: the safety of RSA is based on the difficulty to factor the product of two large prime numbers. If it is broken, then RSA will become unsafe. Statistical attacks –Make assumptions about the distribution of letters, pairs of letters (digrams), triplets of letters (trigrams), etc. Called models of the language –Examine ciphertext, correlate properties with the assumptions.

8 Classical Cryptography (symmetric) Sender, receiver share common key –Keys may be the same, or trivial to derive one from the other –Sometimes called symmetric cryptography –How to distribute keys: following chapters Two basic types –Transposition ciphers (shuffle the order) –Substitution ciphers (replacement) –Combinations are called product ciphers

9 Transposition Cipher Rearrange letters in plaintext to produce ciphertext Example (Rail-Fence Cipher) –Plaintext is HELLO WORLD –Rearrange as HLOOL ELWRD –Ciphertext is HLOOL ELWRD (order the letters in vertical, send out in horizontal)

10 Attacking the Cipher Anagramming –The frequency of the characters will not change –The key is a permutation function –If 1-gram frequencies match English frequencies, but other n-gram frequencies do not, probably transposition –Rearrange letters to form n-grams with highest frequencies

11 Example Ciphertext: HLOOLELWRD Frequencies of 2-grams beginning with H –HE –HO –HL, HW, HR, HD < Frequencies of 2-grams ending in H –WH –EH, LH, OH, RH, DH ≤ Implies E follows H

12 Example Arrange so the H and E are adjacent HE LL OW OR LD Read off across, then down, to get original plaintext May need to try different combinations or n- grams

13 Substitution Ciphers Change characters in plaintext to produce ciphertext –The replacement rule can be fixed or keep changing Example (Caesar cipher) –Plaintext is HELLO WORLD –Change each letter to the third letter after it in the alphabet (A goes to D, ---, X goes to A, Y to B, Z to C) Key is 3, usually written as letter ‘D’ (which letter to replace “A”) –Ciphertext is KHOOR ZRUOG

14 Attacking the Cipher Exhaustive search –If the key space is small enough, try all possible keys until you find the right one –Caesar cipher has 26 possible keys –On average, you only need to try half of them Statistical analysis –The ciphertext has a character frequency –Compare (and try to align it) to 1-gram model of English

15 Statistical Attack Compute frequency of each letter in ciphertext: G0.1H0.1K0.1O0.3 R0.2U0.1Z0.1 Apply 1-gram model of English –Frequency of characters (1-grams) in English is on next slide

16 Character Frequencies a0.080h0.060n0.070t0.090 b0.015i0.065o0.080u0.030 c j0.005p0.020v0.010 d0.040k0.005q0.002w0.015 e0.130l0.035r0.065x0.005 f0.020m0.030s0.060y0.020 g0.015z0.002

17 Frequency chart of English Frequency chart of ciphertext

18 Statistical Analysis Try to align the two charts f(c): frequency of character c in ciphertext  (i): correlation of frequency of letters in ciphertext with corresponding letters in English, assuming key is i –  (i) =  0 ≤ c ≤ 25 f(c)p(c – i) –  (i) = 0.1p(6 – i) + 0.1p(7 – i) + 0.1p(10 – i) + 0.3p(14 – i) + 0.2p(17 – i) + 0.1p(20 – i) + 0.1p(25 – i) p(x) is frequency of character x in English –This correlation value should be a maximum when the two charts are aligned

19 Correlation:  (i) for 0 ≤ i ≤ 25 i (i)(i) i (i)(i) i (i)(i) i (i)(i)

20 The Result Most probable keys, based on  : –i = 6,  (i) = plaintext EBIIL TLOLA –i = 10,  (i) = plaintext AXEEH PHKEW –i = 3,  (i) = plaintext HELLO WORLD –i = 14,  (i) = plaintext WTAAD LDGAS Only English phrase is for i = 3 –That’s the key (3 or ‘D’) The algorithm will become more complicated if the encryption is not a circular shift We are only reducing the searching space by guided guess

21 Caesar’s Problem Key is too short –Can be found by exhaustive search –Statistical frequencies not concealed well They look too much like regular English letters –The most frequently seen character could be “E” So make it longer –Multiple letters in key –Idea is to smooth the statistical frequencies to make cryptanalysis harder What if in the cipher text, every character has the same frequency? All correlation will have the same value

22 What we can get from this: –If the key contains only 1 character, we have 26 choices –If the key contains m characters, we need to try 26 ^ m combinations. m=5, 12 million choices.

23 Vigenère Cipher Like Caesar cipher, but use a longer key Example –Message THE BOY HAS THE BALL –Key VIG ( right shift 21, 8, 6 times, then repeat ) –Encipher using Caesar cipher for each letter: key VIG VIG VIG VIG VIG V plain THE BOY HAS THE BAL L cipher OPK WWE CIY OPK WIR G

24 Now we have: –Three groups of characters encrypted by V, I, and G respectively –Each group is a Caesar cipher (fixed shift offset) –Approach: Figure out the length of the key Decipher each group as a Caesar’s cipher –Hint: when the same plaintext is encrypted by the same segment of key, we have the same cipher Can be used to derive the period

25 Attacking the Cipher Approach –Establish period; call it n –Break message into n parts, each part being enciphered using the same key letter So each part is like a Caesar cipher –Solve each part You can leverage one part from another because English has its special rule

26 Establish Period Kasiski: repetitions in the ciphertext occur when characters of the key appear over the same characters in the plaintext Example: key VIG VIG VIG VIG VIG V plain THE BOY HAS THE BAL L cipherOPK WWE CIY OPK WIR G Note the key and plaintext line up over the repetitions (underlined). As distance between repetitions is 9, the period is a factor of 9 (that is, 1, 3, or 9)

27 We guess the period is 3, so we divide the cipher text into three groups –Each group is a Caesar cipher –Using previous approaches to solve them

28 One-Time Pad A Vigenère cipher with a random key at least as long as the message –Provably unbreakable –Why? Every character in the key is random. It has the same chance to be “a”, “b”, ---, “z” –Look at ciphertext DXQR. Equally likely to correspond to plaintext DOIT (key AJIY) and to plaintext DONT (key AJDY) and any other 4-letter words –Warning: keys must be random, or you can attack the cipher by trying to regenerate the key