Experimentally Verifying a Complex Algebraic Attack on the Grain-128 Cipher Using Dedicated Reconfigurable Hardware SHARCS 2012 – Washington D.C. Itai Dinur 1 , Tim Güneysu 2 , Christof Paar 2 , Adi Shamir 1 , and Ralf Zimmermann 2 1 Computer Science Dept., The Weizmann Institute, Israel 18.03.2012 2 Horst Görtz Institute for IT Security, Ruhr-University Bochum
Outline Introduction Implementation Problems and Solutions Results and Conclusion SHARCS 2012 | Washington D.C. | 18.03.2012 2
Introduction Experimentally Explaining The Title Experimentally Verifying a Complex Algebraic Attack on the Grain-128 Cipher Using Dedicated Reconfigurable Hardware SHARCS 2012 | Washington D.C. | 18.03.2012 3
Introduction Experimentally Explaining The Title Experimentally Verifying a Complex Algebraic Attack on the Grain-128 Cipher Using Dedicated Reconfigurable Hardware SHARCS 2012 | Washington D.C. | 18.03.2012 4
Introduction Experimentally Explaining The Title Experimentally Verifying a Complex Algebraic Attack on the Grain-128 Cipher Using Dedicated Reconfigurable Hardware SHARCS 2012 | Washington D.C. | 18.03.2012 5
Introduction Experimentally Explaining The Title Experimentally Verifying a Complex Algebraic Attack on the Grain-128 Cipher Using Dedicated Reconfigurable Hardware SHARCS 2012 | Washington D.C. | 18.03.2012 6
Introduction Experimentally Explaining The Title Experimentally Verifying a Complex Algebraic Attack on the Grain-128 Cipher Using Dedicated Reconfigurable Hardware SHARCS 2012 | Washington D.C. | 18.03.2012 7
Introduction Grain-128 128-bit key, 96-bit IV Boolean functions 256 clock cycles SHARCS 2012 | Washington D.C. | 18.03.2012 8
Introduction Cube Attack (very brief ) Algebraic Attack • Dinur/Shamir (FSE 2011), improved (Asiacrypt 2011) Complexity d*2 d+e-10 (d = 50, e = 39) • Implication: 2 128 2 85 • SHARCS 2012 | Washington D.C. | 18.03.2012 9
Introduction Cube Attack (very brief ) Algebraic Attack • Dinur/Shamir (FSE 2011), improved (Asiacrypt 2011) Complexity d*2 d+e-10 (d = 50, e = 39) • Implication: 2 128 2 85 • Uses CubeTesters • Aumasson/Dinur/Meier/Shamir (FSE 2009) • Related to higher order differential attacks • Distinguishes (special) polynomials from random functions SHARCS 2012 | Washington D.C. | 18.03.2012 10
Introduction Cube Attack (very brief ) Algebraic Attack • Dinur/Shamir (FSE 2011), improved (Asiacrypt 2011) Complexity d*2 d+e-10 (d = 50, e = 39) • Implication: 2 128 2 85 • Uses CubeTesters • Aumasson/Dinur/Meier/Shamir (FSE 2009) • Related to higher order differential attacks • Distinguishes (special) polynomials from random functions Multiple Steps • Guess and generate scores • Determine most likely values of secret expression • Recover the key SHARCS 2012 | Washington D.C. | 18.03.2012 11
Introduction Cube Attack - Partial Simulation Motivation : • Attack complexity only estimated • Theoretical success probability realistic? SHARCS 2012 | Washington D.C. | 18.03.2012 12
Introduction Cube Attack - Partial Simulation Motivation : • Attack complexity only estimated • Theoretical success probability realistic? Simulate correct guess for known key 1. Compute cube summations 2. Compute score of correct guess 3. Estimate position in sorted guess list SHARCS 2012 | Washington D.C. | 18.03.2012 13
Introduction Cube Attack - Partial Simulation Motivation : • Attack complexity only estimated • Theoretical success probability realistic? Simulate correct guess for known key 1. Compute cube summations 2. Compute score of correct guess 3. Estimate position in sorted guess list Details: Dinur et al. (Asiacrypt 2011) SHARCS 2012 | Washington D.C. | 18.03.2012 14
Outline Introduction Implementation Problems and Solutions Results and Conclusion SHARCS 2012 | Washington D.C. | 18.03.2012 15
Implementation Hardware Design Goals Considerations Flexibility Operability SHARCS 2012 | Washington D.C. | 18.03.2012 16
Implementation Hardware Design Goals Considerations • Needs high performance! • Data complexity? • Bottlenecks? Flexibility Operability SHARCS 2012 | Washington D.C. | 18.03.2012 17
Implementation Hardware Design Goals Considerations • Needs high performance! • Data complexity? • Bottlenecks? Flexibility • Adaptable to modified cube attacks • Adaptable to modified parameter sets Operability SHARCS 2012 | Washington D.C. | 18.03.2012 18
Implementation Hardware Design Goals Considerations • Needs high performance! • Data complexity? • Bottlenecks? Flexibility • Adaptable to modified cube attacks • Adaptable to modified parameter sets Operability • Fully working post-place and route design • Fully working on RIVYERA FPGA Cluster SHARCS 2012 | Washington D.C. | 18.03.2012 19
Implementation RIVYERA Architecture 8 Spartan-3 5000 FPGAs SHARCS 2012 | Washington D.C. | 18.03.2012 20
Implementation RIVYERA Architecture 8 Spartan-3 5000 FPGAs 16 Boards SHARCS 2012 | Washington D.C. | 18.03.2012 21
Implementation RIVYERA Architecture 8 Spartan-3 5000 FPGAs 16 Boards i7 Processor SHARCS 2012 | Washington D.C. | 18.03.2012 22
Implementation The Algorithm - Hands-On SHARCS 2012 | Washington D.C. | 18.03.2012 23
Implementation The Algorithm - Hands-On SHARCS 2012 | Washington D.C. | 18.03.2012 24
Implementation The Algorithm - Hands-On SHARCS 2012 | Washington D.C. | 18.03.2012 25
Implementation The Algorithm - Hands-On SHARCS 2012 | Washington D.C. | 18.03.2012 26
Implementation The Algorithm - Hands-On Focus on time consuming steps 1. Chose random key 2. Generate boolean functions (polynomials to evaluate) Compute 2 50 times the first output bit (Grain-128 Initialization) 3. 4. XOR the results in some way SHARCS 2012 | Washington D.C. | 18.03.2012 27
Implementation The Algorithm - Hands-On Focus on time consuming steps 1. Chose random key 2. Generate boolean functions (polynomials to evaluate) Compute 2 50 times the first output bit (Grain-128 Initialization) 3. 4. XOR the results in some way Sounds easy! Let’s try it in Software… SHARCS 2012 | Washington D.C. | 18.03.2012 28
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 1 0 0 0 1 1 0 1 0 1 0 0 1 0 1 • Red: cube indices • Blue: dynamic variables SHARCS 2012 | Washington D.C. | 18.03.2012 29
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 0 0 • Red: cube indices • Blue: dynamic variables Update the IV: • Increment cube indices by 1 SHARCS 2012 | Washington D.C. | 18.03.2012 30
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 0 • Red: cube indices • Blue: dynamic variables Update the IV: • Increment cube indices by 1 SHARCS 2012 | Washington D.C. | 18.03.2012 31
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 0 1 0 • Red: cube indices • Blue: dynamic variables Update the IV: • Increment cube indices by 1 SHARCS 2012 | Washington D.C. | 18.03.2012 32
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 • Red: cube indices • Blue: dynamic variables Update the IV: • Increment cube indices by 1 • Evaluate polynomials 0 and 1 xor 0 and 1 and 1 Polynomial Evaluation • Loop over all Monomials • Simple Array-Lookup SHARCS 2012 | Washington D.C. | 18.03.2012 33
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 • Red: cube indices • Blue: dynamic variables Update the IV: • Increment cube indices by 1 • Evaluate polynomials 0 and 1 xor 0 and 1 and 1 Polynomial Evaluation • Loop over all Monomials • Simple Array-Lookup But: Very slow in Software (2 50 Grain iterations per key) SHARCS 2012 | Washington D.C. | 18.03.2012 34
Implementation Software View Prepare IV in an array Example • Unfilled: initial IV (unchanged) … 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 • Red: cube indices • Blue: dynamic variables Update the IV: Let’s try hardware! • Increment cube indices by 1 • Evaluate polynomials 0 and 1 xor 0 and 1 and 1 Polynomial Evaluation • Loop over all Monomials • Simple Array-Lookup But: Very slow in Software (2 50 Grain iterations per key) SHARCS 2012 | Washington D.C. | 18.03.2012 35
Recommend
More recommend