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

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

“Advanced Encryption Standard” & “Modes of Operation”
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Self-Healing in Wireless Networks. The self-healing property is expected in many aspects in wireless networks: – Encryption algorithms – Key distribution.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
Data Encryption Standard (DES)
Symmetric Encryption Example: DES Weichao Wang. 2 Overview of the DES A block cipher: – encrypts blocks of 64 bits using a 64 bit key – outputs 64 bits.
Announcement Grading adjusted –10% participation and two exams 20% each Newsgroup up Assignment upload webpage up Homework 1 will be released over the.
1 Overview of the DES A block cipher: –encrypts blocks of 64 bits using a 64 bit key –outputs 64 bits of ciphertext A product cipher –basic unit is the.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
Session 6: Introduction to cryptanalysis part 1. Contents Problem definition Symmetric systems cryptanalysis Particularities of block ciphers cryptanalysis.
Lecture 23 Symmetric Encryption
Lecture 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
CSE 651: Introduction to Network Security
Chapter 2 – Classical Encryption Techniques
Cryptography Week-6.
Cryptanalysis. The Speaker  Chuck Easttom  
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
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 
The Data Encryption Standard - see Susan Landau’s paper: “Standing the test of time: the data encryption standard.” DES - adopted in 1977 as a standard.
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Lec. 5 : History of Cryptologic Research II
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.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Symmetric-Key Cryptography
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.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Cryptography (Traditional Ciphers)
Data Encryption Standard (DES) © 2000 Gregory Kesden.
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 Computer Security ©2004 Matt Bishop Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester
Classical &ontemporyryptology 1 Block Cipher Today’s most widely used ciphers are in the class of Block Ciphers Today’s most widely used ciphers are in.
Traditional Symmetric-Key Ciphers
Security in Computing Cryptography (Traditional 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.
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
Lecture 23 Symmetric Encryption
Exam 1 Review CS461/ECE422 Fall Exam guidelines A single page of supplementary notes is allowed  8.5x11. Both sides. Write as small as you like.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
David Evans CS551: Security and Privacy University of Virginia Computer Science Lecture 4: Dissin’ DES The design took.
1.1 Introduction to Cryptography. 1.2 Basic Cryptography Cryptography is a deep mathematical subject. Cryptographic protocols provide a cornerstone for.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
Lecture 5 Page 1 CS 236 Online More on Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
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.
Chapter 2 Basic Encryption and Decryption
IS 2150 / TEL 2810 Information Security and Privacy
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 3: Symmetric Key Encryption
PART VII Security.
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 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, why?

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, the 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

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 Under many conditions, transposition cipher alone is not enough: –Example: is it “cat” or “act” –Example: I will come, she will not.

14 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’ –Ciphertext is KHOOR ZRUOG

15 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

16 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

17 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

18 Frequency chart of English Frequency chart of ciphertext

19 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

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

21 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

22 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

23 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.

24 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 start again ) –Encipher using Caesar cipher for each letter: key VIG VIG VIG VIG VIGV plainTHE BOY HAS THE BALL cipher OPK WWE CIY OPK WIRG

25 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

26 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

27 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 VIGV plain THE BOY HAS THE BALL cipherOPK WWE CIY OPK WIRG 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)

28 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

29 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

30 Overview of the DES A block cipher: –encrypts blocks of 64 bits using a 64 bit key –outputs 64 bits of ciphertext A product cipher –basic unit is the bit –performs both substitution and transposition (permutation) on the bits Cipher consists of 16 rounds (iterations), each with a 48-bit round key generated from the 64-bit key

31 Generation of Round Keys Round keys are 48 bits each

32 Encipherment

33 The f Function

34 S-Box –There are eight S-Box, each maps 6-bit input to 4-bit output –Each S-Box is a look-up table –This is the only non-linear step in DES and contributes the most to its safety P-Box –A permutation

35 Controversy Considered too weak –Diffie, Hellman said “in a few years technology would allow DES to be broken in days” DES Challenge organized by RSA In 1997, solved in 96 days; 41 days in early 1998; 56 hours in late 1998; 22 hours in Jan racker/HTML/ _deschallenge3.htmlhttp://w2.eff.org/Privacy/Crypto/Crypto_misc/DESC racker/HTML/ _deschallenge3.html –Design decisions not public S-boxes may have backdoors

36 Undesirable Properties 4 weak keys –They are their own inverses 12 semi-weak keys –Each has another semi-weak key as inverse Complementation property –DES k (m) = c  DES k (m) = c S-boxes exhibit irregular properties –Distribution of odd, even numbers non-random –Outputs of fourth box depends on input to third box

37 Number of rounds –After 5 rounds, every cipher bit is impacted by every plaintext bit and key bit –After 8 rounds, cipher text is already a random function –When the number of rounds is 16 or more, brute force attack will be the most efficient attack for known plaintext attack –So NSA knows a lot when it fixes the DES

38 Differential Cryptanalysis A chosen ciphertext attack –Requires 2 47 (plaintext, ciphertext) pairs Revealed several properties –Small changes in S-boxes reduce the number of (plaintext, ciphertext) pairs needed –Making every bit of the round keys independent does not impede attack Linear cryptanalysis improves result –Requires 2 43 (plaintext, ciphertext) pairs

39 DES Modes Electronic Code Book Mode (ECB) –Encipher each block independently Cipher Block Chaining Mode (CBC) –Xor each plaintext block with previous ciphertext block –Requires an initialization vector for the first one –The initialization vector can be made public Encrypt-Decrypt-Encrypt Mode (2 keys: k, k) Encrypt-Encrypt-Encrypt Mode (3 keys: k, k, k  )

40 CBC Mode Encryption  init. vector m1m1 DES c1c1  m2m2 c2c2 sent … … …

41 CBC Mode Decryption  init. vector c1c1 DES m1m1 … … …  c2c2 m2m2

42 Self-Healing Property What will happen if a bit gets lost during transmission? –All blocks will not be aligned When one bit in a block flipped, only the next two blocks will be impacted. –Plaintext “heals” after 2 blocks

43 Current Status of DES Design for computer system, associated software that could break any DES-enciphered message in a few days published in 1998 Several challenges to break DES messages solved using distributed computing NIST selected Rijndael as Advanced Encryption Standard, successor to DES –Designed to withstand attacks that were successful on DES