Cryptanalysis on Substitution- Permutation Networks Jen-Chang Liu, 2005 Ref: Cryptography: Theory and Practice, D. R. Stinson.

Slides:



Advertisements
Similar presentations
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Advertisements

Cryptography and Network Security Chapter 3
Cryptography and Network Security
Rachana Y. Patil 1 Data Encryption Standard (DES) (DES)
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.
Block ciphers 1 Session 3. Contents Design of block ciphers Non-linear transformations 2/25.
Block Ciphers: Workhorses of Cryptography COMP 1721 A Winter 2004.
Cryptography Course 2008 Lecture 4 Jesper Buus Nielsen Modern Block Ciphers 1/43 Contents Encryption modes –Cipher-Block Chaining (CBC) Mode –Counter mode.
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.
Advanced Encryption Standard(AES) Presented by: Venkata Marella Slide #9-1.
Akelarre 1 Akelarre Akelarre 2 Akelarre  Block cipher  Combines features of 2 strong ciphers o IDEA — “mixed mode” arithmetic o RC5 — keyed rotations.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Chapter 3 – Block Ciphers and the Data Encryption Standard Jen-Chang Liu, 2004 Adopted from lecture slides by Lawrie Brown.
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
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.
CS555Spring 2012/Topic 91 Cryptography CS 555 Topic 9: Block Cipher Construction & DES.
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.
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.
CSCI 5857: Encoding and Encryption
Linear Fault Analysis of Block Ciphers Zhiqiang Liu 1, Dawu Gu 1, Ya Liu 1, Wei Li 2 1. Shanghai Jiao Tong University 2. Donghua University ACNS 2012 June.
Block ciphers 2 Session 4. Contents Linear cryptanalysis Differential cryptanalysis 2/48.
Differential Cryptanalysis - quite similar to linear cryptanalysis - exploits the relationship between the difference of two inputs and the difference.
Cryptography Lecture 4 Stefan Dziembowski
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
Feistel Cipher Structure
13. Other Block Ciphers 13.1 LUCIFER 13.2 MADRYGA 13.3 NEWDES 13.4 FEAL 13.5 REDOC 13.6 LOKI.
DES Attacks and Triple DES
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
CS555Spring 2012/Topic 101 Cryptography CS 555 Topic 10: Block Cipher Security & AES.
Le Trong Ngoc Security Fundamentals (2) Encryption mechanisms 4/2011.
Lecture 23 Symmetric Encryption
Computer and Network Security Rabie A. Ramadan Lecture 3.
Block Ciphers and the Advanced Encryption Standard
Data Encryption Standard (DES)
Chapter 2 Symmetric Encryption.
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
Linear Cryptanalysis of DES
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
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.
CS548_ ADVANCED INFORMATION SECURITY Jong Heon, Park / Hyun Woo, Cho Paper Presentation #1 Improved version of LC in attacking DES.
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.
CST 312 Pablo Breuer. A block of plaintext is treated as a whole and used to produce a ciphertext block of equal length Typically a block size of 64 or.
@Yuan Xue CS 285 Network Security Block Cipher Principle Fall 2012 Yuan Xue.
@Yuan Xue Announcement Project Release Team forming Homework 1 will be released next Tuesday.
CS480 Cryptography and Information Security
Introduction to Modern Symmetric-key Ciphers
Introduction to Modern Symmetric-key Ciphers
Cryptanalysis of Block Ciphers
Cryptography Lecture 16.
Cryptography Lecture 17.
Presentation transcript:

Cryptanalysis on Substitution- Permutation Networks Jen-Chang Liu, 2005 Ref: Cryptography: Theory and Practice, D. R. Stinson

Outline Substitution-permutation networks (SPN) Linear cryptanalysis Linear approximation of S-boxes Bias and pilling-up lemma A linear attack on an SPN Differential cryptanalysis Differential distribution table of S-boxes

Substitution-permutation networks (1) Substitution function (S-box) z ABCDEF S(z)S(z) E4D12FB83A6C5907 Ex. =4, 4-bit input

Substitution-permutation networks (2) Permutation function z P(z)P(z) Ex. =m=4, 16-bit input

SPN example Round 1 Round 2 Round 3 Round 4 (no permutation) K i : subkeys XOR with input whitening: Prevent attack

Substitution-permutation networks (3) Implementation issues: S-Box: using look-up tables 4-bit input: 2 4  4=2 6 bits memory space 16-bit input: 2 16  16=2 20 bits memory space DES: 6-bits to 4-bits, AES: 8-bits to 8-bits Variations of SPN: Different S-Boxes in each round, ex. DES Include invertible linear transformation in addition to permutation, ex. AES

Question about S-box: Are these S-boxes secure? We will try to find some probabilistic relationship between (differential) input and (differential) output to S-boxes

Linear approximation table (1) S-box z ABCDEF S(z)S(z) E4D12FB83A6C5907 Input 4-bits Output 4-bits

Linear approximation table (2) consider T=X 1  X 4  Y 2 Input 4-bitsOutput 4-bits Pr[T=0]=1/2 Pr[T=1]=1/2

Linear approximation table (3) consider T=X 3  X 4  Y 1  Y 4 Input 4-bitsOutput 4-bits Pr[T=0]=1/8 Pr[T=1]=7/8

Linear approximation table (4) XOR of input and output bits can be taken as linear combination T=X 1  X 4  Y 2 a :( ) b :( ) T=X 3  X 4  Y 1  Y 4 a :( ) b :( ) For all a and b, we compute N L (a,b ): number of occurrences such that T=0

Linear approximation table (5) Idea: away from 8 means some probabilistic relationship between input and output

Outline Substitution-permutation networks (SPN) Linear cryptanalysis Linear approximation of S-boxes Bias and pilling-up lemma A linear attack on an SPN Differential cryptanalysis Differential distribution table of S-boxes

Bias of a random variable X is a random variable taking on values from {0, 1} Pr[X=0]=p Pr[X=1]=1-p Bias of X is defined to be  =p-1/2 * Bias with high absolute value implies non-randomness Ex. Pr[X=0]=1/2 bias = 0 Ex. Pr[X=0]=1 bias = 1/2

Pilling-up lemma Let  T denotes the bias of the random variable T=X 1  X 2...  X k Then Ex. T=X 1  X 2, bias  T = 2  1  2

A Linear Attack on an SPN (1) T 1 has bias 1/4 T 2 has bias -1/4 T 3 has bias -1/4 T 4 has bias -1/4 T1T2T3T4T1T2T3T4 has bias

A Linear Attack on an SPN (2) T1T2T3T4T1T2T3T4 X1X1 X2X2 X3X3 X1X2X3X1X2X3  (subkey bits) U1U1 U2U2 U3U3 U4U4 =U 1  U 2  U 3  U 4 =T1T2T3T4=T1T2T3T4 X1X2X3X1X2X3  (subkey bits) U1U2U3 U4U1U2U3 U4

A Linear Attack on an SPN (3) Previous result: Fix the subkey bits (assume the same key) Thus, =T1T2T3T4=T1T2T3T4 X1X2X3X1X2X3  (subkey bits) U1U2U3 U4U1U2U3 U4 =T1T2T3T4=T1T2T3T4 X1X2X3X1X2X3  (0 or 1) U1U2U3 U4U1U2U3 U4 X1X2X3X1X2X3 U1U2U3 U4U1U2U3 U4 has the same bias as T1T2T3T4T1T2T3T4 (may have different sign, depending on subkey bits)

A Linear Attack on an SPN (4) T1T2T3T4T1T2T3T4 has bias X1X1 X2X2 X3X3 U1U1 U2U2 U3U3 U4U4 X1X2X3X1X2X3 U1U2U3 U4U1U2U3 U4

Known-plaintext attack Assume 8000 (x, y) pairs are known x y Goal: solve the 8-bit subkey Initialize: Counter[256] For each (x,y) pair For subkey value s=0 to 255 determine U1U1 U2U2 U3U3 U4U4 U 1,U 2,U 3, U 4 If X1X2X3X1X2X3  U 1  U 2  U 3  U 4 =0 X1X1 X2X2 X3X3 Counter[s] ++ Final: Find s, such that Counter[s]/8000

Linear cryptanalysis on DES 1994, Matsui (inventor of linear cryptanalysis) Using 2 43 plaintext-ciphertext pairs (generated using the same key) : it takes 40 days Use linear cryptanalysis to find the key: 10 days However, it is unlikely to accumulate such a large number of plaintext-ciphertext pairs

Outline Substitution-permutation networks (SPN) Linear cryptanalysis Linear approximation of S-boxes Bias and pilling-up lemma A linear attack on an SPN Differential cryptanalysis Differential distribution table of S-boxes

Differential cryptanalysis Two binary streams Differential cryptanalysis Find the probabilistic relationship between XOR of two inputs and XOR of two output … …  … Different bits will be labeled as 1 after XOR

4  4 S-box : input X =[X 1 X 2 X 3 X 4 ], output Y =[Y 1 Y 2 Y 3 Y 4 ] input pair (X’, X’’), by Analyzing the Cipher Components

Given Δx, we want to determine the associated probabilities for each ΔY

Difference distribution table = 0010, =1011 (hex B), probability = 8/2 4 = 8/16 = 1011, =1000 (hex 8), probability = 4/16 = 1010, =0100 (hex 4), probability = 0/16

ΔX=[ ] ΔU=[xxxx 0110 xxxx 0110] with prob. = chosen plaintext pairs: [ , ] [ , ] [ , ] … 5000 ciphertext pairs: [Y 1, Y ’ 1 ], [Y 2, Y ’ 2 ], [Y 3, Y ’ 3 ], …

Differential Cryptanalysis on DES Biham and Shamir, 1993 Complexity: order of 2 47, requiring 2 47 chosen plaintext Recall: brute-force search: 2 55 In fact, the DES designers knew differential cryptanalysis early in 1974 They had strengthened S-boxes

Programming project#2 Generate tables for the following DES S-Box linear approximation table difference distribution table Output your results in well-formatted ASCII text file Due date: 11/1

Notes for Programming Project#1 You must submit PowerPoint slides, which includes Description of your DES source code, how to use it (write a small sample program to demo how to use it) How do you evaluate the avalanche effects of DES? The results of your experiments All programs