Computer and Information Security Chapter 6 Advanced Cryptanalysis 1.

Slides:



Advertisements
Similar presentations
Data Encryption Standard (DES)
Advertisements

1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Cryptography and Network Security Chapter 3
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.
1 The AES block cipher Niels Ferguson. 2 What is it? Block cipher: encrypts fixed-size blocks. Design by two Belgians. Chosen from 15 entries in a competition.
Session 6: Introduction to cryptanalysis part 2. Symmetric systems The sources of vulnerabilities regarding linearity in block ciphers are S-boxes. Example.
JLM :161 Homework 6 – Problem 1 S-box 4 is observed to have the indicated output xor when presented with the indicated inputs In1: 0x22, In2:
FEAL FEAL 1.
Akelarre 1 Akelarre Akelarre 2 Akelarre  Block cipher  Combines features of 2 strong ciphers o IDEA — “mixed mode” arithmetic o RC5 — keyed rotations.
DES 1 Data Encryption Standard DES 2 Data Encryption Standard  DES developed in 1970’s  Based on IBM Lucifer cipher  U.S. government standard  DES.
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.
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.
Cryptanalysis on Substitution- Permutation Networks Jen-Chang Liu, 2005 Ref: Cryptography: Theory and Practice, D. R. Stinson.
Chapter 3 – Block Ciphers and the Data Encryption Standard
CSE 651: Introduction to Network Security
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
The Digital Encryption Standard CSCI 5857: Encoding and Encryption.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Cryptanalysis. The Speaker  Chuck Easttom  
Cryptanalysis of Modern Symmetric-Key Block Ciphers [Based on “A Tutorial on Linear and Differential Cryptanalysis” by Howard Heys.] Modern block ciphers.
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.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY COMP 425: Information Security CHAPTER 7 Symmetric Key Crypto (Chapter 3 in the textbook) INFORMATION.
CSCI 5857: Encoding and Encryption
Cryptography and Network Security Chapter 3. Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types of cryptographic.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 3 – The Data Encryption.
Differential Cryptanalysis - quite similar to linear cryptanalysis - exploits the relationship between the difference of two inputs and the difference.
Chapter 20 Symmetric Encryption and Message Confidentiality.
1 Lect. 10 : Cryptanalysis. 2 Block Cipher – Attack Scenarios  Attacks on encryption schemes  Ciphertext only attack: only ciphertexts are given  Known.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Cryptography and Network Security Block Ciphers and DES, and modes of operation M. Sakalli Reviewed, from Stallings.
Data Encryption Standard (DES) © 2000 Gregory Kesden.
DIFFERENTIAL CRYPTANALYSIS Chapter 3.4. Ciphertext only attack. The cryptanalyst knows the cryptograms. This happens, if he can eavesdrop the communication.
Le Trong Ngoc Security Fundamentals (2) Encryption mechanisms 4/2011.
Chapter 3 Encryption Algorithms & Systems (Part D)
Lecture 23 Symmetric Encryption
Block Ciphers and the Advanced Encryption Standard
Data Encryption Standard (DES)
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
Linear Cryptanalysis of DES
1 The Data Encryption Standard. 2 Outline 4.1 Introduction 4.4 DES 4.5 Modes of Operation 4.6 Breaking DES 4.7 Meet-in-the-Middle Attacks.
David Evans CS551: Security and Privacy University of Virginia Computer Science Lecture 4: Dissin’ DES The design took.
CS519, © A.SelcukDifferential & Linear Cryptanalysis1 CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk.
Linear Cryptanalysis of DES M. Matsui. 1.Linear Cryptanalysis Method for DES Cipher. EUROCRYPT 93, 1994.Linear Cryptanalysis Method for DES Cipher 2.The.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
@Yuan Xue Announcement Project Release Team forming Homework 1 will be released next Tuesday.
Lecture 4 Data Encryption Standard (DES) Dr. Nermin Hamza
CS480 Cryptography and Information Security
Practical Aspects of Modern Cryptography Josh Benaloh & Brian LaMacchia.
Introduction to Modern Symmetric-key Ciphers
Hellman’s TMTO Attack Hellman’s TMTO 1.
6b. Practical Constructions of Symmetric-Key Primitives.
Simplified IDEA Cryptography and Network Security.
Lecture 2.2: Private Key Cryptography II
Lecture 3: Symmetric Key Encryption
Block cipher & Fiestel Structure
Introduction to Modern Symmetric-key Ciphers
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Chapter -2 Block Ciphers and the Data Encryption Standard
SYMMETRIC ENCRYPTION.
Padding Oracle Attacks
Cryptanalysis of Block Ciphers
Differential Cryptanalysis
Modern Cryptography.
Florida State University
Presentation transcript:

Computer and Information Security Chapter 6 Advanced Cryptanalysis 1

Part 1  Cryptography 2 Chapter 6: Advanced Cryptanalysis For there is nothing covered, that shall not be revealed; neither hid, that shall not be known.  Luke 12:2 The magic words are squeamish ossifrage  Solution to RSA challenge problem posed in 1977 by Ron Rivest, who estimated that breaking the message would require 40 quadrillion years. It was broken in 1994.

Introduction More Advanced Attacks –WW II – the Enigma –Attack on RC4 as used in WEP –Linear and Differential attacks –Lattice Reduction attack on the knapsack –A timeing attack on RSA 3

Part 1  Cryptography 4 Advanced Cryptanalysis Modern cryptanalysis –Differential cryptanalysis –Linear cryptanalysis Side channel attack on RSA Lattice reduction attack on knapsack Hellman’s TMTO attack on DES

Part 1  Cryptography 5 Linear and Differential Cryptanalysis

Part 1  Cryptography 6 Introduction Both linear and differential cryptanalysis developed to attack DES Applicable to other block ciphers Differential  Biham and Shamir, 1990 –Apparently known to NSA in 1970’s –For analyzing ciphers, not a practical attack –A chosen plaintext attack Linear cryptanalysis  Matsui, 1993 –Perhaps not know to NSA in 1970’s –Slightly more feasible than differential cryptanalysis –A known plaintext attack

Part 1  Cryptography 7 DES Overview 8 S-boxes Each S-box maps 6 bits to 4 bits Example: S-box 1 LR S-boxes XOR K i subkey LR Linear stuff input bits (0,5)  input bits (1,2,3,4) | A B C D E F | E 4 D 1 2 F B 8 3 A 6 C | 0 F 7 4 E 2 D 1 A 6 C B | 4 1 E 8 D 6 2 B F C A | F C B 3 E A 0 6 D

Part 1  Cryptography 8 Overview of Differential Cryptanalysis

Part 1  Cryptography 9 Differential Cryptanalysis Consider DES All of DES is linear except S-boxes Differential attack focuses on nonlinearity Idea is to compare input and output differences For simplicity, first consider one round and one S-box

Part 1  Cryptography 10 Differential Cryptanalysis Spse DES-like cipher has 3 to 2 bit S-box column row  Sbox(abc) is element in row a column bc  Example: Sbox(010) = 11

Part 1  Cryptography 11 Differential Cryptanalysis column row  Suppose X 1 = 110, X 2 = 010, K = 011  Then X 1  K = 101 and X 2  K = 001  Sbox(X 1  K) = 10 and Sbox(X 2  K) = 01

Part 1  Cryptography 12 Differential Cryptanalysis column row  Suppose o Unknown: K o Known: X = 110, X = 010 o Known: Sbox(X  K) = 10, Sbox(X  K) = 01  Know X  K  {000,101}, X  K  {001,110}  Then K  {110,011}  {011,100}  K = 011  Like a known plaintext attack on S-box

Part 1  Cryptography 13 Differential Cryptanalysis column row  Suppose o Unknown: K o Known: X = 110, X = 010 o Known: Sbox(X  K) = 10, Sbox(X  K) = 01  Know X  K  {000,101}, X  K  {001,110}  Then K  {110,011}  {011,100}  K = 011  Like a known plaintext attack on S-box

Part 1  Cryptography 14 Differential Cryptanalysis Attacking one S-box not very useful! –And Trudy can’t always see input and output To make this work we must do 2 things 1.Extend the attack to one round –Must account for all S-boxes –Choose input so only one S-box “active” 2.Then extend attack to (almost) all rounds –Note that output is input to next round –Choose input so output is “good” for next round

Part 1  Cryptography 15 Differential Cryptanalysis We deal with input and output differences Suppose we know inputs X and X –For X the input to S-box is X  K –Key K is unknown –Input difference: ( X  K)  ( X  K) = X  X Input difference is independent of key K Output difference: Y  Y is (almost) input difference to next round Goal is to “chain” differences thru rounds

Part 1  Cryptography 16 Differential Cryptanalysis If we obtain known output difference from known input difference… –May be able to chain differences thru rounds –It’s OK if this only occurs with some probability If input difference is 0… –…output difference is 0 –Allows us to make some S-boxes “inactive” with respect to differences

Part 1  Cryptography 17 S-box Differential Analysis column row Sbox(X)  Sbox(X) X  X  Input diff 000 not interesting  Input diff 010 always gives output diff 01  More biased, the better (for Trudy)

Part 1  Cryptography 18 Overview of Linear Cryptanalysis

Part 1  Cryptography 19 Linear Cryptanalysis Like differential cryptanalysis, we target the nonlinear part of the cipher But instead of differences, we approximate the nonlinearity with linear equations For DES-like cipher we need to approximate S-boxes by linear functions How well can we do this?

Part 1  Cryptography 20 S-box Linear Analysis column row output y 0 y 1 y 0  y i x n x p x u x 0  x t x 0  x x 1  x x 0  x 1  x  Input x 0 x 1 x 2 where x 0 is row and x 1 x 2 is column  Output y 0 y 1  Count of 4 is unbiased  Count of 0 or 8 is best for Trudy

Part 1  Cryptography 21 Linear Analysis column row output y 0 y 1 y 0  y i x n x p x u x 0  x t x 0  x x 1  x x 0  x 1  x  For example, y 1 = x 1 with prob. 3/4  And y 0 = x 0  x 2  1 with prob. 1  And y 0  y 1 =x 1  x 2 with prob. 3/4

Part 1  Cryptography 22 Linear Cryptanalysis Consider a single DES S-box Let Y = Sbox(X) Suppose y 3 = x 2  x 5 with high probability –This is a linear approximation to output y 3 Can we extend this so that we can solve linear equations for the key? As in differential cryptanalysis, we need to “chain” thru multiple rounds

Part 1  Cryptography 23 Linear Cryptanalysis of DES DES is linear except for S-boxes How well can we approximate S-boxes with linear functions? DES S-boxes designed so there are no good linear approximations to any one output bit But there are linear combinations of output bits that can be approximated by linear combinations of input bits

Part 1  Cryptography 24 Tiny DES

Part 1  Cryptography 25 Tiny DES (TDES) A much simplified version of DES –16 bit block –16 bit key –4 rounds –2 S-boxes, each maps 6 bits to 4 bits –12 bit subkey each round Plaintext = (L 0,R 0 ) Ciphertext = (L 4,R 4 ) No useless junk

Part 1  Cryptography 26 LR expand shift key SboxLeft XOR compress LR One Round of TDES SboxRight 6 4 KiKi

Part 1  Cryptography 27 TDES Fun Facts TDES is a Feistel Cipher (L 0,R 0 ) = plaintext For i = 1 to 4 L i = R i-1 R i = L i-1  F(R i-1,K i ) Ciphertext = (L 4,R 4 ) F(R i-1, K i ) = Sboxes(expand(R i-1 )  K i ) where Sboxes( x 0 x 1 x 2 …x 11 ) = (SboxLeft( x 0 x 1 …x 5 ),SboxRight( x 6 x 7 …x 11 ))

Part 1  Cryptography 28 TDES Key Schedule Key: K = k 0 k 1 k 2 k 3 k 4 k 5 k 6 k 7 k 8 k 9 k 10 k 11 k 12 k 13 k 14 k 15 Subkey –Left: k 0 k 1 …k 7 rotate left 2, select 0,2,3,4,5,7 –Right: k 8 k 9 …k 15 rotate left 1, select 9,10,11,13,14,15 Subkey K 1 = k 2 k 4 k 5 k 6 k 7 k 1 k 10 k 11 k 12 k 14 k 15 k 8 Subkey K 2 = k 4 k 6 k 7 k 0 k 1 k 3 k 11 k 12 k 13 k 15 k 8 k 9 Subkey K 3 = k 6 k 0 k 1 k 2 k 3 k 5 k 12 k 13 k 14 k 8 k 9 k 10 Subkey K 4 = k 0 k 2 k 3 k 4 k 5 k 7 k 13 k 14 k 15 k 9 k 10 k 11

Part 1  Cryptography 29 TDES expansion perm Expansion permutation: 8 bits to 12 bits r0r1r2r3r4r5r6r7r0r1r2r3r4r5r6r7 r4r7r2r1r5r7r0r2r6r5r0r3r4r7r2r1r5r7r0r2r6r5r0r3  We can write this as expand(r 0 r 1 r 2 r 3 r 4 r 5 r 6 r 7 ) = r 4 r 7 r 2 r 1 r 5 r 7 r 0 r 2 r 6 r 5 r 0 r 3

Part 1  Cryptography 30 TDES S-boxes Right S-box SboxRight A B C D E F 0 C 5 0 A E D F 1 B 1 1 C E B 2 F D A F A E 6 D B C 3 0 A 3 C E 9 7 F 6 B 5 D A B C D E F A 3 4 D 7 8 E 1 2 B 5 C F E B A C D 1 F C 2 D 3 E F A 4 B A D 6 E 1 8 B C F  Left S-box  SboxLeft

Part 1  Cryptography 31 Differential Cryptanalysis of TDES

Part 1  Cryptography 32 TDES TDES SboxRight A B C D E F 0 C 5 0 A E D F 1 B 1 1 C E B 2 F D A F A E 6 D B C 3 0 A 3 C E 9 7 F 6 B 5 D 4  For X and X suppose X  X =  Then SboxRight(X)  SboxRight(X) = 0010 with probability 3/4

Part 1  Cryptography 33 Differential Crypt. of TDES The game plan… Select P and P so that P  P = = 0x0002 Note that P and P differ in exactly 1 bit Let’s carefully analyze what happens as these plaintexts are encrypted with TDES

Part 1  Cryptography 34 TDES If Y  Y = then with probability 3/4 SboxRight(Y)  SboxRight(Y) = 0010 Y  Y =  (Y  K)  (Y  K) = If Y  Y = then for any S-box, Sbox(Y)  Sbox(Y) = 0000 Difference of ( ) is expanded by TDES expand perm to diff. ( ) The bottom line: If X  X = then F(X,K)  F(X,K) = with prob. 3/4