December 4--8, 2016 @Asiacrypt2016 Nonlinear Invariant Attack Practical Attack on Full SCREAM, iSCREAM, and Midori64 Name: Position: My research topics.

Slides:



Advertisements
Similar presentations
“Advanced Encryption Standard” & “Modes of Operation”
Advertisements

Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.2 Secret Key Cryptography.
SBSeg 2007, NCE/UFRJ, Rio de Janeiro Linear Analysis of reduced- round CAST-128 and CAST-256 Jorge Nakahara Jr 1 Mads Rasmussen 2 1 UNISANTOS, Brazil 2.
Cryptography and Network Security Chapter 6. Chapter 6 – Block Cipher Operation Many savages at the present day regard their names as vital parts of themselves,
Cryptography1 CPSC 3730 Cryptography Chapter 6 Triple DES, Block Cipher Modes of Operation.
1 Chapter 5 Hashes and Message Digests Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
Chapter 3 – Block Ciphers and the Data Encryption Standard Jen-Chang Liu, 2004 Adopted from lecture slides by Lawrie Brown.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
Lecture 23 Symmetric Encryption
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  
Block ciphers 2 Session 4. Contents Linear cryptanalysis Differential cryptanalysis 2/48.
Cryptography and Network Security Chapter 6. Multiple Encryption & DES  clear a replacement for DES was needed theoretical attacks that can break it.
Differential Cryptanalysis - quite similar to linear cryptanalysis - exploits the relationship between the difference of two inputs and the difference.
Towards Automated Security Proof for Symmetric Encryption Modes Martin Gagné Joint work with Reihaneh Safavi-Naini, Pascal Lafourcade and Yassine Lakhnech.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
Africacrypt 2008 Security of Challenge and Response Yu Sasaki 1, Lei Wang 2, Kazuo Ohta 2, Noboru Kunihiro 2 Impossible Differential Attack on Hash Functions.
DIFFERENTIAL CRYPTANALYSIS Chapter 3.4. Ciphertext only attack. The cryptanalyst knows the cryptograms. This happens, if he can eavesdrop the communication.
CS555Spring 2012/Topic 101 Cryptography CS 555 Topic 10: Block Cipher Security & AES.
Chapter 11 Message Authentication and Hash Functions.
Lecture 23 Symmetric Encryption
The RC5 Encryption Algorithm: Two Years On Lisa Yin RC5 Encryption –Ron Rivest, December 1994 –Fast Block Cipher –Software and Hardware Implementations.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
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.
CS519, © A.SelcukDifferential & Linear Cryptanalysis1 CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
1 CPCS425: Information Security (Topic 5) Topic 5  Symmetrical Cryptography  Understand the principles of modern symmetric (conventional) cryptography.
Block Cipher Modes Last Updated: Aug 25, ECB Mode Electronic Code Book Divide the plaintext into fixed-size blocks Encrypt/Decrypt each block independently.
Modes of Operation block ciphers encrypt fixed size blocks – eg. DES encrypts 64-bit blocks with 56-bit key need some way to en/decrypt arbitrary amounts.
Block Cipher Encrypting a large message Electronic Code Book (ECB) message m1 m2 m3 m4 m5 m6 c1 c2 c3 c4 c5 c6 E E E Secret.
Practical Aspects of Modern Cryptography Josh Benaloh & Brian LaMacchia.
Chapter 12 – Hash Algorithms
Attacks on Public Key Encryption Algorithms
Computer and Network Security
Chapter3: Block Ciphers and the Data Encryption Standard
Message Authentication and Hash Functions
Authenticated encryption
Modern symmetric-key Encryption
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 3: Symmetric Key Encryption
Block Cipher Modes CS 465 Make a chart for the mode comparisons
مروري برالگوريتمهاي رمز متقارن(كليد پنهان)
Cryptography Lecture 10.
Security through Encryption
Chapter 11 – Message Authentication and Hash Functions
PART VII Security.
Unit 2 “Implementation of a RC5 block cipher algorithm and implementing an attack on it”
Introduction to Modern Symmetric-key Ciphers
STREAM CIPHERS by Jennifer Seberry.
Security Of Wireless Sensor Networks
Rotors and Secret-Key Encryption
Block vs Stream Ciphers
Foundations of Network and Computer Security
Cryptanalysis of C2 Lee, Jae-song Cryptanalysis of C2.
Block Ciphers: DES and AES
Block Ciphers (Crypto 2)
Security of Wireless Sensor Networks
Padding Oracle Attacks
Cryptography Lecture 9.
Cryptography Lecture 16.
CRYPTOGRAPHY & NETWORK SECURITY
Counter Mode, Output Feedback Mode
Elect. Codebook, Cipher Block Chaining
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Secret-Key Encryption
Presentation transcript:

December 4--8, 2016 @Asiacrypt2016 Nonlinear Invariant Attack Practical Attack on Full SCREAM, iSCREAM, and Midori64 Name: Position: My research topics. Yosuke Todo1,3, Gregor Leander2, Yu Sasaki1  1: NTT Secure Platform Laboratories, Japan  2: Ruhr-Universität Bochum, Germany  3: Kobe University, Japan

What happened by new attack? Secret key (K) and tweak(T) Plaintex (P) Ciphertext (C) Under the weak-key setting, Scream has following magical Boolean function 𝑔 𝑥 = ⊕ 𝑖=0 16 𝑥 8𝑖+1 𝑥 8𝑖+2 ⊕ 𝑥 8𝑖 ⊕ 𝑥 8𝑖+2 ⊕ 𝑥 8𝑖+5 . Then, 𝑔 𝑃 ⊕𝑔 𝐶 =𝑔 𝑇 ⊕𝑔(𝐾) for any plaintext.

What happened by new attack? Secret key (K) and tweak(T) Plaintex (P) Ciphertext (C) Example T = F7 26 00 00 00 00 7A 00 E3 87 00 00 00 00 AD CF K = B7 C7 00 00 00 00 97 EF 3B 0A 77 D2 4D EC CC 22 𝑔 𝐾 ⊕𝑔 𝑇 =1 P = AE 14 AF A5 DE 96 36 2A 42 CF 98 1B 6C 9C 92 52 C = 31 77 8D B1 C6 4B 4E 6D 48 E5 0E 72 E8 53 AB CD 𝑔 𝑃 ⊕𝑔 𝐶 =1

Overview of nonlinear invariant attack New type of attacks. Nonlinear approximation is used under the weak-key setting. Practical, i.e., ciphertext-only message recovery attack under reasonable assumptions. Application to SCREAM CAESAR 2nd round candidate iSCREAM CAESAR 1st round candidate Midori64 Proposal of Asiacrypt2015

Summary of results 𝑘 1−2 1−𝑘 Distinguishing attack under known-plaintext setting. Target # of weak keys Data complexity. Distinguishing probability. SCREAM 2 96 𝑘 1−2 1−𝑘 iSCREAM Midori64 2 64 The distinguishing attack incidentally recovers 1 bit of secret key. Message-recovery attack under ciphertext-only setting. ℎ is the number of blocks in the mode of operations. Target # of weak keys Maximum # of recovered bits. Data complexity. Time complexity. SCREAM 2 96 32 bits 33 ciphertexts 32 3 = 2 15 iSCREAM Midori64-CTR 2 64 32h bits 33h ciphertexts 32 3 ℎ= 2 15 ℎ

Nonlinear invariant attack. Outline Nonlinear invariant attack. Related works. Distinguishing attack. Practical attack. What’s happened if vulnerable ciphers are used in well-known mode of operations? How to find nonlinear invariant. Nonlinear invariant for KSP round functions. Practical attack on full SCREAM.

Two streams join in new attacks Linear attack [Matsui 1993] Nonlinear attack [Harpes et al. 1995] Invariant subspace attack [Leander et al. 2011] Nonlinear invariant attack [Todo et al. 2016]

Stream from linear attacks [Matsui 1993] Nonlinear attack [Harpes et al. 1995] Invariant subspace attack [Leander et al. 2011] Nonlinear invariant attack [Todo et al. 2016]

Linear attack [Matsui 93] Key-alternating structure. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 𝑓 𝑖 𝑥 𝑖 ⊕ 𝑓 𝑖+1 𝑥 𝑖+1 ≈const 𝑓 𝑖 𝑥 𝑖 𝑓 𝑖+1 𝑥 𝑖+1 with high probability. next-round 𝑓 𝑖 and 𝑓 𝑖+1 are linearly Boolean functions.

Nonlinear attack [Harpes et al.95] Key-alternating structure. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖+1 𝑥 𝑖+1 ≈const 𝑔 𝑖 𝑥 𝑖 𝑔 𝑖+1 𝑥 𝑖+1 The actual propagation of nonlinear mask depends on the specific value of the state. Therefore, we cannot join nonlinear masks for two rounds. with high probability. 𝑔 𝑖 and 𝑔 𝑖+1 are nonlinearly Boolean functions.

Insurmountable problem Key-alternating structure. The probability for next round depends on the specific value. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖+1 𝑥 𝑖+1 ≈const 𝑔 𝑖 𝑥 𝑖 𝑔 𝑖+1 𝑥 𝑖+1 The actual propagation of nonlinear mask depends on the specific value of the state. with high probability. next-round We cannot join nonlinear masks for two rounds.

Nonlinear invariant attack Key-alternating structure. Alternatively, we limit the space of round keys. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖+1 𝑥 𝑖+1 =const 𝑔 𝑖 𝑥 𝑖 𝑔 𝑖+1 𝑥 𝑖+1 with probability one. next-round 𝑔 𝑖 and 𝑔 𝑖+1 are nonlinearly Boolean functions.

Appropriate nonlinear invariant Key-alternating structure. Alternatively, we limit the space of secret keys. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 𝑔 𝑥 𝑖 ⊕𝑔 𝑥 𝑖+1 =const 𝑔 𝑥 𝑖 𝑔 𝑥 𝑖+1 But, it troubles us to search for the list of nonlinear invariants. If gi is equal to gi+1, it’s trivially to hold this property with arbitrary number of rounds when all round keys are weak. with probability one. next-round This property is preserved in any number of rounds, if all round keys are weak.

Stream from linear attacks [Matsui 1993] Nonlinear attack [Harpes et al. 1995] Invariant subspace attack [Leander et al. 2011] Nonlinear invariant attack [Todo et al. 2016]

Invariant subspace attacks Key-alternating structure. weak keys. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 key-add F U+a U+a U+b next-round

Nonlinear invariant attack Key-alternating structure. weak keys. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 key-add F 𝑔0 𝑔0 𝑔0 𝑔1 𝑔1 𝑔1 next-round

We don’t need to choose plaintexts Key-alternating structure. weak keys. 𝑘 𝑖 F 𝑥 𝑖 𝑥 𝑖+1 key-add F The map turns over depending on the function F and key XORing. 𝑔0 𝑔0 𝑔0 𝑔1 𝑔1 𝑔1 next-round

Distinguishing attacks E k P j C j Assume E k has nonlinear invariant 𝑔. Collect 𝑘 known plaintexts ( P j , C j ). 𝑔 P j ⊕𝑔( C j ) is constant for 𝑘 pair. The probability that ideal ciphers have this property is 2 −𝑘+1 .

Nonlinear invariant attack. Outline Nonlinear invariant attack. Related works. Distinguishing attack. Practical attack. What’s happened if vulnerable ciphers are used in well-known mode of operations? How to find nonlinear invariant. Nonlinear invariant for KSP round functions. Practical attack on full SCREAM.

Attack assumptions Chosen-plaintext attacks (CPA) strong Chosen-plaintext attacks (CPA) is natural assumption for cryptographers. is debatable in practical case. Assumption. Known-plaintext attacks (KPA) is weaker assumption than CPA. sometimes holds in practical case. Ciphertext-only attacks (COA) We use several attack assumptions. CPA is natural attack assumption for cryptographers, and if the target cipher is broken under this assumption, we call this cipher is broken. But, the feasibility is debatable in the practical case. KPA is weaker assumption than CPA and sometimes holds in practical case. Clearly, ciphertext-only attack is very weak assumption. And it’s unlikely to happen for cryptographers because it’s information-theoretically impossible w/o assumption. But if possible, it cases non-negligible risks in practical use. is unlikely to happen for cryptographers. is information-theoretically impossible w/o assumptions. causes non-negligible risks in practical use. weak

Our attack assumptions Attackers can collect multiple ciphertext blocks whose original message is the same but the IV is different. Then, we can recover the part of message. E k,IV1 Ciphertext block E k,IV2 E k,IV3 Plaintext block Ciphertext block Ciphertext block

Is this assumption practical? It’s very difficult questions because it depends on applications. We believe it’s more practical than KPA. Example of vulnerable application. Application sometimes sends the ciphertext of a password for the authentication. And, attackers know the behavior of the application.

𝑔 C j−1 ⊕ P j ⊕𝑔 C j =const CBC mode If E k has nonlinear invariants, IV ( C 0 ) E E E E K K K K C 1 C 2 C 3 C ℎ If E k has nonlinear invariants, 𝑔 C j−1 ⊕ P j ⊕𝑔 C j =const

Message recovery attack P 1 P 2 P 3 P ℎ IV ( C 0 ) E E E E K K K K C 1 C 2 C 3 C ℎ If E k has nonlinear invariants, 𝑔 C j−1 ⊕ P j ⊕𝑔 C j =const known guess known Practically, the time complexity to recover 𝑡 bits of P j is at most 𝑡 3 .

Nonlinear invariant attack. Outline Nonlinear invariant attack. Related works. Distinguishing attack. Practical attack. What’s happened if vulnerable ciphers are used in well-known mode of operations? How to find nonlinear invariant. Nonlinear invariant for KSP round functions. Practical attack on full SCREAM.

How to find nonlinear invariants Assume that KSP-type round function. S S L S S

Nonlinear invariants for S-box 𝑥 1 S L 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖 𝑆 𝑥 𝑖 =cons 𝑥 2 The size of S-box is generally small. So, it’s not difficult to find nonlinear invariant for one S-box. 𝑥 3 𝑥 4 Example: for the S-box in Scream. 𝑔 𝑥 = 𝑥 1 𝑥 2 ⊕ 𝑥 0 ⊕ 𝑥 2 ⊕ 𝑥 5   Then, for all 𝑥∈ 𝔽 2 8 , 𝑔 𝑥 =𝑔 𝑆 𝑥 ⊕1.

Nonlinear invariants for S-box layer 𝑥 1 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖 𝑆 𝑥 𝑖 =cons 𝑥 2 𝑔 𝑥 = ⊕ 𝑖∈Λ 𝑔 𝑖 ( 𝑥 𝑖 ) 𝑥 3 𝑥 4 The function 𝑔 𝑖 is nonlinear invariant for the 𝑖th S-box. The sum function 𝑖∈Λ 𝑔 𝑖 ( 𝑥 𝑖 ) is nonlinear invariant for the S-box layer for any set Λ.

Nonlinear invariants for key XORing 𝑥 1 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖 𝑆 𝑥 𝑖 =cons S 𝑥 2 S 𝑔 𝑥 = ⊕ 𝑖∈Λ 𝑔 𝑖 ( 𝑥 𝑖 ) L 𝑥 3 S 𝑥 4 S If “1s” in 𝑘 are involved in only linear term of the function 𝑔, the sum function is nonlinear invariant for key XORing.

Nonlinear invariants for key XORing 𝑥 1 𝑔 𝑖 𝑥 𝑖 ⊕ 𝑔 𝑖 𝑆 𝑥 𝑖 =cons S 𝑥 2 S 𝑔 𝑥 = ⊕ 𝑖∈Λ 𝑔 𝑖 ( 𝑥 𝑖 ) L 𝑥 3 S 𝑥 4 S Example: for the S-box in Scream. 𝑔 𝑥 = 𝑥 1 𝑥 2 ⊕ 𝑥 0 ⊕ 𝑥 2 ⊕ 𝑥 5 If 𝑘 1 = 𝑘 2 =0, 𝑔 𝑥⊕𝑘 =𝑔 𝑥 ⊕𝑔(𝑘)

Nonlinear invariant for linear layer S L 𝑥 1 𝑔 𝑥 ⊕𝑔 𝐿 𝑥 =cons 𝑥 2 𝑔 𝑥 = ⊕ 𝑖=1 𝑛 𝑔 𝑖 ( 𝑥 𝑖 ) 𝑥 3 𝑥 4 If the linear function is binary orthogonal and there is a quadratic invariant for the S-box, ⊕ 𝑖=1 𝑛 𝑔 𝑖 ( 𝑥 𝑖 ) is nonlinear invariant for the linear layer.

Why binary orthogonal is weak? When 𝑔 is quadratic and 𝑀 is binary orthogonal, we can exploit the invariance of Inner product. 𝑔 𝐿(𝑥) = ⊕ 𝑖=1 𝑚 ⊕ 𝑗=1 𝑚 𝛾 𝑖,𝑗 𝑀 𝑥 𝑖 , 𝑀 𝑥 𝑗 = ⊕ 𝑖=1 𝑚 ⊕ 𝑗=1 𝑚 𝛾 𝑖,𝑗 〈 𝑥 𝑖 , 𝑥 𝑗 〉=𝑔 𝑥 Linear S-box 𝑥 𝑖 𝑥 𝑖 The use of the orthogonal matrix is not rare because it’s very useful to get the dual property between differential and linear cryptanalyses.

Nonlinear invariant attack. Outline Nonlinear invariant attack. Related works. Distinguishing attack. Practical attack. What’s happened if vulnerable ciphers are used in well-known mode of operations? How to find nonlinear invariant. Nonlinear invariant for KSP round functions. Practical attack on full SCREAM.

𝑥 0 𝑥 0 Linear S-box SCREAM SCREAM perfectly follows our assumption. Orthogonal for duality of differential and linear. The nonlinear term is applied to 2nd and 3rd rows. The round constant is XORed with only 1st row. All round keys are the same as the secret key. Linear S-box 𝑥 0 𝑥 0

Application to SCREAM AE SCREAM authenticated encryption. E K P T 1 m -2 C -1

Application to SCREAM AE SCREAM authenticated encryption. E K P T 1 m -2 C -1 𝑔 | 𝑃 𝑚−1 | ⊕𝑔 𝑃 𝑚−1 ⊕ 𝐶 𝑚−1 =const known guess known

Proposal of nonlinear invariant attack. Conclusion Proposal of nonlinear invariant attack. How to find nonlinear invariants. Application to Scream, iScream, and Midori64. We can recover the 32bits of message in the last block on SCREAM (iSCREAM) AEs. We can recover the 32bits of message in every block on CBC, CTR, CFB, OFB modes underlying Midori64.