WINTER SCHOOL ON COMPUTER SECURITY. Prof. Eli Biham



Similar documents
1 Data Encryption Algorithm

On the Security of Double and 2-key Triple Modes of Operation

Modes of Operation of Block Ciphers

Lecture 4 Data Encryption Standard (DES)

Table of Contents. Bibliografische Informationen digitalisiert durch

Lecture Note 8 ATTACKS ON CRYPTOSYSTEMS I. Sourav Mukhopadhyay

Cryptography and Network Security Block Cipher

How To Attack A Block Cipher With A Key Key (Dk) And A Key (K) On A 2Dns) On An Ipa (Ipa) On The Ipa 2Ds (Ipb) On Pcode)

lundi 1 octobre 2012 In a set of N elements, by picking at random N elements, we have with high probability a collision two elements are equal

A New 128-bit Key Stream Cipher LEX


Network Security. Chapter 3 Symmetric Cryptography. Symmetric Encryption. Modes of Encryption. Symmetric Block Ciphers - Modes of Encryption ECB (1)

Network Security. Modes of Operation. Steven M. Bellovin February 3,

Message authentication

Error oracle attacks and CBC encryption. Chris Mitchell ISG, RHUL

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

IT Networks & Security CERT Luncheon Series: Cryptography

CIS433/533 - Computer and Network Security Cryptography

A PPENDIX H RITERIA FOR AES E VALUATION C RITERIA FOR

The Misuse of RC4 in Microsoft Word and Excel

IronKey Data Encryption Methods

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

Network Security - ISA 656 Introduction to Cryptography

The Advanced Encryption Standard (AES)

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

SD12 REPLACES: N19780

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

GCM-SIV: Full Nonce Misuse-Resistant Authenticated Encryption at Under One Cycle per Byte. Yehuda Lindell Bar-Ilan University

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Cryptographic mechanisms

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Karagpur

Lecture 10: CPA Encryption, MACs, Hash Functions. 2 Recap of last lecture - PRGs for one time pads

Message Authentication Codes

MAC. SKE in Practice. Lecture 5

Cryptography and Network Security

Cryptography and Network Security Chapter 3

The Order of Encryption and Authentication for Protecting Communications (Or: How Secure is SSL?)

How To Encrypt With A 64 Bit Block Cipher

The Encryption Technology of Automatic Teller Machine Networks

Symmetric Crypto MAC. Pierre-Alain Fouque

Introduction. Where Is The Threat? Encryption Methods for Protecting Data. BOSaNOVA, Inc. Phone: Web:


Talk announcement please consider attending!

Block encryption. CS-4920: Lecture 7 Secret key cryptography. Determining the plaintext ciphertext mapping. CS4920-Lecture 7 4/1/2015

Password-based encryption in ZIP files

Network Security: Cryptography CS/SS G513 S.K. Sahay

Digital Signatures. Prof. Zeph Grunschlag

Common Pitfalls in Cryptography for Software Developers. OWASP AppSec Israel July The OWASP Foundation

Cryptographic Algorithms and Key Size Issues. Çetin Kaya Koç Oregon State University, Professor

Message Authentication Codes. Lecture Outline

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

CSCE 465 Computer & Network Security

Data Encryption WHITE PAPER ON. Prepared by Mohammed Samiuddin.

Cryptanalysis of Grain using Time / Memory / Data Tradeoffs

Developing and Investigation of a New Technique Combining Message Authentication and Encryption

Security Evaluation of the SPECTR-128. Block Cipher

How To Understand And Understand The History Of Cryptography

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 13

Cryptography Lecture 8. Digital signatures, hash functions

Split Based Encryption in Secure File Transfer

AES Cipher Modes with EFM32

Multiplicative Ciphers. Cryptography of Multiplicative Ciphers

Message Authentication Code

Serpent: A Proposal for the Advanced Encryption Standard

EXAM questions for the course TTM Information Security May Part 1

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

A Comparative Study Of Two Symmetric Encryption Algorithms Across Different Platforms.

Chapter 8. Network Security

Ky Vu DeVry University, Atlanta Georgia College of Arts & Science

AN3270 Application note

CS Computer Security Third topic: Crypto Support Sys

1 Construction of CCA-secure encryption

Authenticated encryption

Cryptography and Network Security Chapter 12

Techniques of Asymmetric File Encryption. Alvin Li Thomas Jefferson High School For Science and Technology Computer Systems Lab

Secure Network Communications FIPS Non Proprietary Security Policy

A Practical Attack on Broadcast RC4

1.1 Terminology and Assumptions

Cryptographic Engine

Massachusetts Institute of Technology Handout : Network and Computer Security October 9, 2003 Professor Ronald L. Rivest.

SYMMETRIC ENCRYPTION. Mihir Bellare UCSD 1

SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128

AES1. Ultra-Compact Advanced Encryption Standard Core. General Description. Base Core Features. Symbol. Applications

EDA385 Embedded Systems Design. Advanced Course

Cryptography & Network Security. Introduction. Chester Rebeiro IIT Madras

SAMPLE EXAM QUESTIONS MODULE EE5552 NETWORK SECURITY AND ENCRYPTION ECE, SCHOOL OF ENGINEERING AND DESIGN BRUNEL UNIVERSITY UXBRIDGE MIDDLESEX, UK

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

1. a. Define the properties of a one-way hash function. (6 marks)

Security Aspects of. Database Outsourcing. Vahid Khodabakhshi Hadi Halvachi. Dec, 2012

Overview of Symmetric Encryption

Introduction To Security and Privacy Einführung in die IT-Sicherheit I

Bounds for Balanced and Generalized Feistel Constructions

Transcription:

WINTR SCHOOL ON COMPUTR SCURITY Prof. li Biham Computer Science Department Technion, Haifa 3200003, Israel January 27, 2014 c li Biham c li Biham - January 27, 2014 1

Cryptanalysis of Modes of Operation c li Biham - January 27, 2014 2 Cryptanalysis of Modes of Operation

Single Modes: the DS Modes of Operation Modes of Operation are used to hide patterns in the plaintexts, protect against chosen plaintext attacks, and to support fast on-line encryption with precomputation. None of the modes can protect against known plaintext attacks. c li Biham - January 27, 2014 3 Cryptanalysis of Modes of Operation

Single Modes: the DS Modes of Operation (cont. The standard modes of DS are: CB CBC CFB OFB Other modes were proposed: PCBC, counter mode, PFF, etc. We will call these modes single modes. c li Biham - January 27, 2014 4 Cryptanalysis of Modes of Operation

Multiple Modes of Operation Due to the recent development in the analysis of DS (including the ability to exhaustively search for keys, it was proposed to use multiple (cascaded modes of operation. c li Biham - January 27, 2014 5 Cryptanalysis of Modes of Operation

xample: The Triple-CB Mode: Triple-DS P 0 P 1 P 2 P 3 P 4 box 1 box 2 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 6 Cryptanalysis of Modes of Operation

xample: The Triple-CBC Mode Claimed to be as secure as triple-ds in (single CBC mode: P 0 P 1 P 2 P 3 P 4 IV 1 box 1 IV 2 box 2 IV 3 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 7 Cryptanalysis of Modes of Operation

xample: The CBC CBC 1 CBC Mode Was almost accepted as an ANSI standard: P 0 P 1 P 2 P 3 P 4 IV 1 box 1 IV 2 box 2 IV 3 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 8 Cryptanalysis of Modes of Operation

Advantages of Multiple Modes Multiple modes were claimed to have several advantages: 1. More secure than single modes, 2. As fast as single encryption on pipelinable hardware, 3. Attackers cannot know the feedbacks used during encryption, and thus cannot even mount known plaintext attacks! c li Biham - January 27, 2014 9 Cryptanalysis of Modes of Operation

ANSI Triple Modes Standardization ANSI X9F1 committee is working on a triple modes standard, already several years, which had to be accepted at the end of 1997. It included three kinds of modes: 1. The standard DS modes, with (two or three-key triple DS as the underlying cipher. 2. Interleaved variants of the same modes, to allow efficient hardware implementations. 3. The CBCM mode. c li Biham - January 27, 2014 10 Cryptanalysis of Modes of Operation

Multiple Modes Cannot Reduce Strength Let A and B be two modes and let C be the combined double mode C=AB, whose component keys K A and K B are chosen independently. The following theorem shows that C is not weaker than either of its components. theorem: The cracking problem of either A or B is efficiently reducible to the cracking problem of C=AB. conclusion: A multiple mode may not be weaker than its strongest component, if the component keys are chosen independently. c li Biham - January 27, 2014 11 Cryptanalysis of Modes of Operation

Multiple Modes Cannot Reduce Strength (cont. A counter-example when the keys are not independent: P 0 P 1 P 2 P 3 P 4 IV 1 Feal Feal Feal Feal Feal IV 2 Feal Feal Feal Feal Feal IV 3 DS DS DS DS DS C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 12 Cryptanalysis of Modes of Operation

Multiple Modes Cannot Reduce Strength (cont. The weakest components in this mode are those using Feal. By methods described later, we can find the key K 1 of the first component using 2 18 chosen ciphertexts, and thus also of the third component using DS. The key of the second component can then be easily found using 1000 chosen ciphertexts (or 2 24 known plaintexts. The third component (which uses DS by itself is much more resistant than the whole system, and cannot be attacked successfully by any known method with complexity smaller than 2 43. c li Biham - January 27, 2014 13 Cryptanalysis of Modes of Operation

Cryptanalysis of Multiple Modes of Operation All the triple (cascaded modes of operation of DS are not much more secure than single modes (as they require up to 2 56 2 66 complexity and plaintexts. The cryptanalytic techniques to attack multiple modes attack one single componentmodeatatime, andcanbebasedonanytechniquetoattacksinglemodes, including differential and linear cryptanalysis, Davies attack, and exhaustive search. The main observation is that the attacker can have some control over the unknown feedbacks, and can thus feed them with the data required to apply cryptanalysis of the single modes. To feed these values, the attacks are usually chosen plaintext or chosen ciphertext. c li Biham - January 27, 2014 14 Cryptanalysis of Modes of Operation

Technique A: Differential Cryptanalysis As an example we attack the CB CBC CBC mode: P 0 P 1 P 2 P 3 P 4 box 1 IV 2 box 2 IV 3 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 15 Cryptanalysis of Modes of Operation

Technique A: Differential Cryptanalysis (cont. 1. Let Ω T be the ciphertext difference required to attack DS with chosen ciphertexts (the usual attack from the opposite direction. 2. Assume that n pairs are required for an attack of DS using this Ω T. c li Biham - January 27, 2014 16 Cryptanalysis of Modes of Operation

Technique A: Differential Cryptanalysis (cont. 3. The attacker chooses n pairs of ciphertext tuples (C 0,C 1,C 2, and (C 0 Ω T,C 1,C 2, with arbitrary C 0,C 1,C 2. 4. The attacker requests to decrypt the 6n blocks by the triple mode under the unknown keys. 5. The ciphertext difference in each pair of tuples is (Ω T,0,0. 6. After decryption of one component the difference is (,Ω T,0. 7. After decryption of two components the difference is (,,Ω T. 8. The plaintexts are known, and in particular P 2 and P 2. c li Biham - January 27, 2014 17 Cryptanalysis of Modes of Operation

Technique A: Differential Cryptanalysis (cont. P 0 P 1 P 2 P 3 P 4 P 2 box 1 Ω T IV 2 Ω T 0 box 2 IV 3 box 3 Ω T 0 0 C 0 C 1 C 2 C 3 C 4 Legend: Known differences Known values (underlined c li Biham - January 27, 2014 18 Cryptanalysis of Modes of Operation

Technique A: Differential Cryptanalysis (cont. 9. We result with n pairs P 2, P 2, for which K1 (P 2 K1 (P 2 = Ω T This is exactly the data required for differential cryptanalysis! 10. If the underlying cipher is DS, we need 2 47 chosen ciphertext blocks to find the key of the CB component. The other component keys can be recovered by other techniques. c li Biham - January 27, 2014 19 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search This technique uses exhaustive search for the component keys, and can thus be applied for any underlying cipher, independent of its internal operations. All the techniques described later use exhaustive search as a basic tool for more complex analysis, and thus also have this property. c li Biham - January 27, 2014 20 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. As an example we attack the CBC CBC CB mode: P 0 P 1 P 2 P 3 P 4 IV 1 box 1 IV 2 box 2 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 21 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. 1. The attacker chooses one pair of tuples (C 0,C 1,C 2, (C 0,C 1,C 2, where C 0 C 0. 2. He requests the plaintexts (P 0,P 1,P 2 and (P 0,P 1,P 2. 3. The value P 2 P 2 is the difference of the CB mode in the first block! c li Biham - January 27, 2014 22 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. P 0 P 1 P 2 P 3 P 4 IV 1 IV 2 P 2 P 2 P 2 P 2 0 0 P 2 P 2 0 0 0 box 1 box 2 box 3 0 0 C 0 C 1 C 2 C 3 C 4 Legend: Differences c li Biham - January 27, 2014 23 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. 4. The attacker exhaustively search all keys for D K3 (C 0 D K3 (C 0 = P 2 P 2 5. The two tuples can be generated with only four chosen ciphertext blocks. c li Biham - January 27, 2014 24 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. A known plaintext variant: Given about 2 65 random known plaintext tuples, the birthday paradox predicts the existence of a pair (C 0,C 1,C 2 and (C 0,C 1,C 2 with C 1 = C 1 and C 2 = C 2! c li Biham - January 27, 2014 25 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. Another example: CBC 1 CB CBC P 0 P 1 P 2 P 3 P 4 IV 1 box 1 box 2 IV 3 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 26 Cryptanalysis of Modes of Operation

Technique : Using xhaustive Search (cont. xercise: Find all the three keys with 3 chosen plaintexts, or 2 64 known plaintexts. c li Biham - January 27, 2014 27 Cryptanalysis of Modes of Operation

Technique F: The Birthday Technique Described on the triple-cbc mode: P 0 P 1 P 2 P 3 P 4 IV 1 box 1 IV 2 box 2 IV 3 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 28 Cryptanalysis of Modes of Operation

Technique F: The Birthday Technique (cont. 1. We choose ciphertext tuples of the form (C,C,C,C. c li Biham - January 27, 2014 29 Cryptanalysis of Modes of Operation

Technique F: The Birthday Technique (cont. 2. During decryption we get P 0 P 1 P 2 P 3 P 4 Z IV 1 Y Y box 1 IV 2 X X X box 2 IV 3 box 3 C C C C C 0 C 1 C 2 C 3 C 4 Legend: Values c li Biham - January 27, 2014 30 Cryptanalysis of Modes of Operation

Technique F: The Birthday Technique (cont. 3. The function X = D K3 (C C behaves like a random function, thus, given 2 33 such tuples, a collision is expected to occur with a high probability. 4. This collision can be identified by comparing the resultant plaintext block Z. A key search can be applied with 2 57 DS encryptions. 5. Note: Collisions can occur in each of the CBC components, thus only a third occur in the last component. This increases the complexity by a factor of at most 3, without increase in the number of chosen ciphertexts. c li Biham - January 27, 2014 31 Cryptanalysis of Modes of Operation

Technique G This technique enables to attack modes whose plaintext and ciphertext are mixed with some unknown feedback, or do not affect the encryption box at all. It is later used as a building block by the techniques described afterwards. We describe two variants of this technique on two examples: the triple mode CB CB OFB and on the double mode CBC OFB. c li Biham - January 27, 2014 32 Cryptanalysis of Modes of Operation

The CB CB OFB mode: Technique G (cont. P 0 P 1 P 2 P 3 P 4 box 1 box 2 IV 3 box 3 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 33 Cryptanalysis of Modes of Operation

Technique G (cont. To attack this mode we choose a plaintext consisting of 2 64 equal blocks P. We result with a ciphertext C 0, C 1,..., which equals the output of the OFB component V i XORed with a fixed value. We choose some value u arbitrarily, and guess that it appears in the OFB stream. We encrypt it under all possible keys K, and test whether the difference u K (u is a difference between two consecutive ciphertext blocks. We usually succeed, as the cycle of the OFB mode includes about 2 63 different blocks. Otherwise, we try another value u. c li Biham - January 27, 2014 34 Cryptanalysis of Modes of Operation

Technique G (cont. The CBC OFB mode: P 0 P 1 P 2 P 3 P 4 IV 1 IV 2 C 0 C 1 C 2 C 3 C 4 c li Biham - January 27, 2014 35 Cryptanalysis of Modes of Operation

Technique G (cont. In this case we attack the CBC component: we choose the ciphertext to consist of 2 64 C followed by 2 64 C. We get p pairs of the form C V i = K1 (P i C V i 1 C V i = K1 (P i C V i 1 where p is the period of the OFB component. Again, we guess a value u arbitrarily, and hope that it is one of the V i s in the cycle (whose period is very easily identified from the plaintexts. WecomputeP i V i 1 andpi V i 1 (fortheunknownibytheaboveequations, and test whether the resultant difference equals P i Pi for some i. As a bonus we also recover the OFB stream. c li Biham - January 27, 2014 36 Cryptanalysis of Modes of Operation

Summary Using these and other cryptanalytic techniques, it is possible to cryptanalyze all the 6 3 1 = 215 triple-modes of operation. A related-model with known oe chosen IV s (by Wagner may require even fewer amouts of data. c li Biham - January 27, 2014 37 Cryptanalysis of Modes of Operation

The nd c li Biham - January 27, 2014 38 The nd