Lee Jae-song 1.  How to cryptanalysis DES?  C = E K (P)  E is DES encryption funtion  K is a key, 56-bit.  P is a plaintext, C is a ciphertext, both.

Slides:



Advertisements
Similar presentations
DES The Data Encryption Standard (DES) is a classic symmetric block cipher algorithm. DES was developed in the 1970’s as a US government standard The block.
Advertisements

Password Cracking With Rainbow Tables
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.
CMSC 414 Computer (and Network) Security Lecture 4 Jonathan Katz.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Block Ciphers and the Data Encryption Standard
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.
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Stream Ciphers.
CMSC 414 Computer (and Network) Security Lecture 5 Jonathan Katz.
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:
Chapter 5 Cryptography Protecting principals communication in systems.
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.
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.
Introduction to Modern Cryptography Lecture 2 Symmetric Encryption: Stream & Block Ciphers.
Announcements: Quizzes returned at end of class Quizzes returned at end of class This week: Mon-Thurs: Data Encryption Standard (DES) Mon-Thurs: Data Encryption.
Hellman’s TMTO 1 Hellman’s TMTO Attack. Hellman’s TMTO 2 Popcnt  Before we consider Hellman’s attack, consider simpler Time-Memory Trade-Off  “Population.
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 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena.
CMEA 1 CMEA. CMEA 2 CMEA  Cellular Message Encryption Algorithm  Designed for use with cell phones o To protect confidentiality of called number o For.
Cryptanalysis on Substitution- Permutation Networks Jen-Chang Liu, 2005 Ref: Cryptography: Theory and Practice, D. R. Stinson.
Once Upon a Time-Memory Tradeoff Mark Stamp Department of Computer Science San Jose State University.
IntroConcAnalysisPreviousSystemsRotors
Lecture 3: Cryptographic Tools modified from slides of Lawrie Brown.
Cryptanalysis. The Speaker  Chuck Easttom  
History and Background Part 1: Basic Concepts and Monoalphabetic Substitution CSCI 5857: Encoding and Encryption.
Hellman’s TMTO 1 Hellman’s TMTO Attack. Hellman’s TMTO 2 Popcnt  Before we consider Hellman’s attack, consider simpler Time-Memory Trade-Off  “Population.
Unix Security Use of a taxonomy of security faults By T. Aslam, I. Krsul, and E. H. Spafford.
Block ciphers 2 Session 4. Contents Linear cryptanalysis Differential cryptanalysis 2/48.
The Steganographic File System Ross Anderson, Roger Needlham, Adi Shamir Presented by: Pan Meng Presented by: Pan Meng.
Differential Cryptanalysis - quite similar to linear cryptanalysis - exploits the relationship between the difference of two inputs and the difference.
Based on Bruce Schneier Chapter 7: Key Length Dulal C. Kar.
DES Attacks and Triple DES
A New Time-Memory-Resource Trade-Off Method for Password Recovery Communications and Intelligence Information Security (ICCIIS), 2010 International Conference.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Password authentication Basic idea –User has a secret password –System checks password to authenticate user Issues –How is password stored? –How does system.
1 CSE 326: Data Structures: Hash Tables Lecture 12: Monday, Feb 3, 2003.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 5 – More About Block.
BLOCK CIPHER SYSTEMS OPERATION MODES OF DATA ENCRYPTION STANDARD (DES)
Exercises Information Security Course Eric Laermans – Tom Dhaene.
Confidentiality Confidentiality is maintained so long as private keys are secure. Authenticity is possible via public-key encryption by encrypting messages.
DIFFERENTIAL CRYPTANALYSIS Chapter 3.4. Ciphertext only attack. The cryptanalyst knows the cryptograms. This happens, if he can eavesdrop the communication.
Attacks Overview Nguyen Cao Dat 1. BK TP.HCM Outline  Cryptographic Attacks ▫ Frequency analysis ▫ Brute force attack ▫ Meet-in-the-middle attack ▫ Birthday.
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
Lecture 23 Symmetric Encryption
1 Symmetric key cryptography: DES DES: Data Encryption Standard US encryption standard [NIST 1993] 56-bit symmetric key, 64 bit plaintext input How secure.
Computer and Network Security Rabie A. Ramadan Lecture 3.
The RC5 Encryption Algorithm: Two Years On Lisa Yin RC5 Encryption –Ron Rivest, December 1994 –Fast Block Cipher –Software and Hardware Implementations.
Chapter 2 Symmetric Encryption.
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
Linear Cryptanalysis of DES
David Evans CS551: Security and Privacy University of Virginia Computer Science Lecture 4: Dissin’ DES The design took.
Query Processing CS 405G Introduction to Database Systems.
CS519, © A.SelcukDifferential & Linear Cryptanalysis1 CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
DES: Data Encryption Standard
Linear Cryptanalysis of DES M. Matsui. 1.Linear Cryptanalysis Method for DES Cipher. EUROCRYPT 93, 1994.Linear Cryptanalysis Method for DES Cipher 2.The.
Effective C# Item 10 and 11. Understand the Pitfalls of GetHashCode Item 10.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
Markov Ciphers and Differential Cryptanalysis Jung Daejin Lee Sangho.
Message Authentication Codes CSCI 5857: Encoding and Encryption.
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.
Prof. Reuven Aviv, Nov 2013 Public Key Infrastructure1 Prof. Reuven Aviv Tel Hai Academic College Department of Computer Science Problem Set 1: Cryptography.
Provides Confidentiality
Hellman’s TMTO Attack Hellman’s TMTO 1.
Lecture 3: Symmetric Key Encryption
Cryptanalysis of C2 Lee, Jae-song Cryptanalysis of C2.
Cryptanalysis of Block Ciphers
Presentation transcript:

Lee Jae-song 1

 How to cryptanalysis DES?  C = E K (P)  E is DES encryption funtion  K is a key, 56-bit.  P is a plaintext, C is a ciphertext, both 64-bit  Chosen-plaintext attack:  For a chosen plaintext P and a related ciphertext C, find the value of K among N=2 56 possible values. 2

 Method 1. Exhaustive search  Calculates C for all possible keys  Requires 2 56 time, small memory  Method 2. Table lookup  Find C from prepared table  Requires 2 56 memory, small time  Both requires huge cost  How to use reasonable time and memory?  For example, N 2/3 time and N 2/3 space? 3

 Idea: make “chains” of key K and ciphertext C.  K 0 → K 1 → K 2 → … → K t C 0 → C 1 → C 2 → … → C t where C i = E Ki (P) and K i+1 = f(K i ).  Save only both ends of chain (K 0, K t )  We can “recover” keys and ciphertexts again, if f is well-designed.  Actually what is f?  Hash function related to encryption function 4

 P is 64-bit, so E K (P) is also 64-bit  K is 56-bit  Some reduction function R: 64-bit to 56-bit  Ex) drop lower 8 bits of input, or higher 8 bits,...  f(K) = R(E K (P))  K 1 = R(E K0 (P)), K 2 = R(E K1 (P)),... 5

 Once we get some ciphertext C = E K (P)  We remember K 0, K t  Y 1 = R(C) = R(E K (P)) = f(K) ∴ K → Y 1  Check: Y 1 = K t ?  If true, f(K) = f(K t-1 ) so maybe K = K t-1, or just a false alarm. ▪ Compute K t-1 from K 0, and check if E Kt-1 (P) = C.  If false, always K ≠ K t-1. 6 K →K → Y1Y1 K 0 → … → K t-1 → KtKt

 If failed, compute Y 2 = f(Y 1 ) = f(f(K)),  Check: Y 2 = K t ?  If true, f(f(K)) = f(f(K t-2 )) so maybe K = K t-2.  Compute Y 1, Y 2, Y 3,..., Y t until we find the key.  O(t) time, with 2 memory space. 7 K →K → Y1 →Y1 → Y2Y2 K t-2 → K t-1 → KtKt

 Extend: make m chains!  Choose some initial values randomly (SP i ) (1<=i<=m)  X i0 = SP i, X ij = f(X i,j-1 ) = f j (SP i ), EP i = X it  Save (SP i, EP i ) only X 10 = SP 1 X 11 X 12 X 13 X 14...X 1t = EP 1 X 20 = SP 2 X 21 X 22 X 23 X 24...X 2t = EP 2... X m0 = SP m X m1 X m2 X m3 X m4...X mt = EP m 8

 But, what if X ij = X i’j’ for some values?  X 11 = X 23, f(X 11 ) = f(X 23 ), X 12 = X 24, X 13 = X 25,...  “collide and merge”  We may ignore the defect for small overlaps 9 X 10 = SP 1 X 11 X 12 X 13 X 14...X 1t = EP 1 X 20 = SP 2 X 21 X 22 X 23 X 24...X 2t = EP 2... X m0 = SP m X m1 X m2 X m3 X m4...X mt = EP m

 Extend more! Generate many tables, with different hashes 10 SP 1 X 11 X 12 X 13 X 14...EP 1 SP 2 X 21 X 22 X 23 X 24...EP 2... SP m X m1 X m2 X m3 X m4...EP m SP 1 X 11 X 12 X 13 X 14...EP 1 SP 2 X 21 X 22 X 23 X 24...EP 2... SP m X m1 X m2 X m3 X m4...EP m SP 1 X 11 X 12 X 13 X 14...EP 1 SP 2 X 21 X 22 X 23 X 24...EP 2... SP m X m1 X m2 X m3 X m4...EP m SP 1 X 11 X 12 X 13 X 14...EP 1 SP 2 X 21 X 22 X 23 X 24...EP 2... SP m X m1 X m2 X m3 X m4...EP m

 It is a probabilistic method!  Probability of success for each table is  If mt 2 << N, it is approximized to  P(S) >= mt/N  P >= 1 – (1 – mt/N) l, l is the number of tables  So we need to generate l = (N/mt) tables to achieve P ≒ 1. 11

 Pf) Since P(S) = E(# of keys)/N,  P(S) = sum P( X ij is newly appeared ) ▪ “new”: not appeared in previous rows or in this row yet  P(X ij is new) >= P(X i0, X i1,..., X ij are new)  = P(X i0 is new) * P(X i1 is new | X i0 is new) *... * P(X ij is new | X i0, X i1,..., X i,j-1 are new)  P(X ik is new|...) = (N - # of keys until now )/N >= (N-it)/N  ∴ P(Xij is new) >= 12

 The expected value of false alarm per table is not so high:  If mt 2 = N, E(F) <= ½  One false alarm: at most t operations required the computation is increased at most 50% 13

 DES: 2 56 ( ≒ 7*10 16 ) keys  Let N = 10 17, ignoring overlap  What values for m, t and l?  [1] chooses m = 10 5, t = 10 6 after some trial&error  P(S) = 10 -6, so l=10 6 tables are needed  ml = memory required  Compared to table lookup: 7*10 16 memory  tl = computation required  Compared to exhaustive search: 7*10 16 time 14

 Performance graph of RainbowCrack [4] 15

 It is basically for chosen-plaintext attack, but also applicable to:  Synchronous stream cipher (known-plaintext) ▪ C[t] = P[t] ⊕ E K [t], no need to choose plaintext  Partially known-plaintext attack ▪ Generate each table for possible plaintext  hash functions  Further improvements? 16

 Rainbow Table: P. Oechslin. [2]  Avoids collide-merge problems  Different hash function per each iteration, not per each table.  May collide with same probability, but not merge ▪ X 11 = X 23, f 2 (X 11 ) ≠ f 3 (X 23 ) 17 X 10 = SP 1 X 11 X 12 X 13 X 14...X 1t = EP 1 X 20 = SP 2 X 21 X 22 X 23 X 24...X 2t = EP 2 f1f2f3f4

 [1] M. Hellman. A cryptanalytic time-memory trade-off. IEEE Transactions on Information Theory, vol. 26, no. 4,  [2] P. Oechslin. Making a faster cryptanalytic time-memory trade-off. CRYPTO 03.Making a faster cryptanalytic time-memory trade-off  [3] Rainbow table, Wikipedia. (last visited Feb. 21, 2010)Rainbow table  [4] Project RainbowCrack. (last visited Feb. 21, 2010)Project RainbowCrack 18

 Q? 19