Double-DES, Triple-DES & Modes of Operation

Similar documents
Chapter 6 Contemporary Symmetric Ciphers

Network Security Essentials Chapter 2

Block Cipher Operation. CS 6313 Fall ASU

Chapter 6: Contemporary Symmetric Ciphers

Cryptography and Network Security Chapter 7

Chapter 3 Block Ciphers and the Data Encryption Standard

Block Cipher Operation

Symmetric Encryption Algorithms

CENG 520 Lecture Note III

Network Security Essentials

Introduction to Modern Cryptography. Lecture 2. Symmetric Encryption: Stream & Block Ciphers

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some

Secret Key Cryptography Overview

CHAPTER 6. SYMMETRIC CIPHERS C = E(K2, E(K1, P))

page 1 Introduction to Cryptography Benny Pinkas Lecture 3 November 18, 2008 Introduction to Cryptography, Benny Pinkas

Crypto: Symmetric-Key Cryptography

IDEA, RC5. Modes of operation of block ciphers

ECE 646 Lecture 8. Modes of operation of block ciphers

Stream ciphers. Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 91

ECE 646 Lecture 7. Modes of Operation of Block Ciphers. Modes of Operation. Required Reading:

Symmetric Encryption. Thierry Sans

Simple DES DES Modes of operation Triple DES AES RSA Attacks Primality test factoring.

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

Information Security CS526

Stream Ciphers - RC4. F. Sozzani, G. Bertoni, L. Breveglieri. Foundations of Cryptography - RC4 pp. 1 / 16

Information Security CS526

CIS 6930/4930 Computer and Network Security. Topic 3.1 Secret Key Cryptography (Cont d)

Content of this part

Cryptography Symmetric Encryption Class 2

Introduction to Cryptography. Lecture 3

Introduction to Symmetric Cryptography

Using block ciphers 1

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

CSC 474/574 Information Systems Security

Introduction to Cryptography. Lecture 3

6 Block Ciphers. 6.1 Block Ciphers CA642: CRYPTOGRAPHY AND NUMBER THEORY 1

Lecture 4: Symmetric Key Encryption

Secret Key Cryptography

Introduction to Network Security Missouri S&T University CPE 5420 Data Encryption Standard

P2_L6 Symmetric Encryption Page 1

EEC-484/584 Computer Networks

CIS 4360 Secure Computer Systems Symmetric Cryptography

Practical Aspects of Modern Cryptography

CS6701- CRYPTOGRAPHY AND NETWORK SECURITY UNIT 2 NOTES

Introduction to Cryptography. Lecture 2. Benny Pinkas. Perfect Cipher. Perfect Ciphers. Size of key space

Modern Symmetric Block cipher

1 Achieving IND-CPA security

Symmetric Key Encryption. Symmetric Key Encryption. Advanced Encryption Standard ( AES ) DES DES DES 08/01/2015. DES and 3-DES.

Cryptography. Summer Term 2010

Stream Ciphers. Stream Ciphers 1

Acronyms. International Organization for Standardization International Telecommunication Union ITU Telecommunication Standardization Sector

Computer Security: Principles and Practice

Lecture 1 Applied Cryptography (Part 1)

RC4. Invented by Ron Rivest. A stream cipher Generate keystream byte at a step

Lecture 3: Symmetric Key Encryption

CSC574: Computer & Network Security

7. Symmetric encryption. symmetric cryptography 1

Cryptography. Dr. Michael Schneider Chapter 10: Pseudorandom Bit Generators and Stream Ciphers

BCA III Network security and Cryptography Examination-2016 Model Paper 1

Modes of Operation. Raj Jain. Washington University in St. Louis

Data Encryption Standard (DES)

ECE596C: Handout #7. Analysis of DES and the AES Standard. Electrical and Computer Engineering, University of Arizona, Loukas Lazos

Cryptography and Network Security Chapter 3. Modern Block Ciphers. Block vs Stream Ciphers. Block Cipher Principles

3 Symmetric Cryptography

Lecture 6: Symmetric Cryptography. CS 5430 February 21, 2018

Some Aspects of Block Ciphers

Stream Ciphers An Overview

Stream Ciphers and Block Ciphers

Cryptography MIS

Symmetric Cryptography

Block ciphers used to encode messages longer than block size Needs to be done correctly to preserve security Will look at five ways of doing this

Applied Cryptography Data Encryption Standard

NC7201 Communication. Dr.G.A.Sathish Kumar Professor EC

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Block cipher modes. Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 75

Unit-II. Symmetric Ciphers. To emphasize the 2 categories of traditional ciphers:substitution and transposition ciphers.

Block Encryption and DES

Block Ciphers and the Data Encryption Standard (DES) Modified by: Dr. Ramzi Saifan

Block Cipher Modes of Operation

CIS 4360 Introduction to Computer Security Fall WITH ANSWERS in bold. First Midterm

Principles of Information Security, Fourth Edition. Chapter 8 Cryptography

CPSC 467: Cryptography and Computer Security

Computer Security CS 526

CSCI 454/554 Computer and Network Security. Topic 3.2 Secret Key Cryptography Modes of Operation

Stream Ciphers and Block Ciphers

Cryptography and Network Security Block Ciphers + DES. Lectured by Nguyễn Đức Thái

Symmetric Encryption

Cryptography CS 555. Topic 11: Encryption Modes and CCA Security. CS555 Spring 2012/Topic 11 1

Symmetric key cryptography

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017

Block Ciphers, DES, 2DES, 3DES

Conventional Encryption Principles Conventional Encryption Algorithms Cipher Block Modes of Operation Location of Encryption Devices Key Distribution

The Rectangle Attack

U-II BLOCK CIPHER ALGORITHMS

Jaap van Ginkel Security of Systems and Networks

L3. An Introduction to Block Ciphers. Rocky K. C. Chang, 29 January 2015

Symmetric Cryptography. Chapter 6

Cryptography III: Symmetric Ciphers

Scanned by CamScanner

Transcription:

Double-DES, Triple-DES & Modes of Operation Prepared by: Dr. Mohamed Abd-Eldayem Ref.: Cryptography and Network Security by William Stallings & Lecture slides by Lawrie Brown

Multiple Encryption & DES clear a replacement for DES was needed theoretical attacks that can break it demonstrated exhaustive key search attacks AES is a new cipher alternative prior to this alternative was to use multiple encryption with DES implementations Triple-DES is the chosen form

Double-DES? could use 2 DES encrypts on each block C = E K2 (E K1 (P)) issue of reduction to single stage and have meet-in-the-middle attack works whenever use a cipher twice since X = E K1 (P) = D K2 (C) attack by encrypting P with all keys and store then decrypt C with keys and match X value can show takes O(2 56 ) steps

Triple-DES with Two-Keys hence must use 3 encryptions would seem to need 3 distinct keys but can use 2 keys with E-D-E sequence C = E K1 (D K2 (E K1 (P))) nb encrypt & decrypt equivalent in security if K1=K2 then can work with single DES standardized in ANSI X9.17 & ISO8732 no current known practical attacks The cost of a brute-force key search on 3DES is on the order of 2^112 (=5*10^33) brute-force key search on 3DES compared to single DES, exceeding 10^52.

Triple-DES with Three-Keys although are no practical attacks on two-key Triple-DES have some indications can use Triple-DES with Three-Keys to avoid even these C = E K3 (D K2 (E K1 (P))) Triple-DES with three keys (168-bits) is now being used in some Internet applications, including PGP and S/MIME, for greater security

Triple-DES with Three-Keys

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 of data in practise ANSI X3.106-1983 Modes of Use (now FIPS 81) defines 4 possible modes subsequently 5 defined for AES & DES have block and stream modes

Electronic Codebook Book (ECB) message is broken into independent blocks which are encrypted each block is a value which is substituted, like a codebook, hence name each block is encoded independently of the other blocks C i = DES K1 (P i ) uses: secure transmission of single values eg. a session key encrypted using a master key

Electronic Codebook Book (ECB)

Advantages and Limitations of ECB message repetitions (esp. with graphics ) may show in ciphertext if aligned with message block particularly with data such graphics or with messages that change very little, which become a code-book analysis problem weakness is due to the encrypted message blocks being independent main use is sending a few blocks of data

Cipher Block Chaining (CBC) To overcome the problems of repetitions and order independence in ECB message is broken into blocks linked together in encryption operation each previous cipher blocks is chained with current plaintext block, hence name use Initial Vector (IV) to start process C i = DES K1 (P i XOR C i-1 ) C -1 = IV uses: large amounts of data need to be sent securely (bulk data encryption), provided that all data is available in advance (eg email, FTP, web etc). uses: authentication

Cipher Block Chaining (CBC)

Message Padding at end of message must handle a possible last short block which is not as large as block size of cipher pad last block along with count of pad size eg. [ b1 b2 b3 0 0 0 0 5] means have 3 data bytes, then 5 bytes pad + count this may require an extra entire block over those in message

Advantages and Limitations of CBC a ciphertext block depends on all blocks before it any change to a block affects all following ciphertext blocks need Initialization Vector (IV) which must be known to sender & receiver if sent in clear, attacker can change bits of first block, and change IV to compensate hence IV must either be a fixed value or must be sent encrypted in ECB mode before rest of message

Cipher FeedBack (CFB) message is treated as a stream of bits added to the output of the block cipher result is feed back for next stage (hence name) standard allows any number of bit (1,8, 64 or 128 etc) to be feed back denoted CFB-1, CFB-8, CFB-64, CFB-128 etc most efficient to use all bits in block (64 or 128) C i = P i XOR DES K1 (C i-1 ) C -1 = IV uses: stream data encryption, authentication

Cipher FeedBack (CFB)

Advantages and Limitations of CFB appropriate when data arrives in bits/bytes most common stream mode note that the block cipher is used in encryption mode at both ends errors propagate for several blocks after the error

Output FeedBack (OFB) message is treated as a stream of bits output of cipher is added to message output is then feed back (hence name) feedback is independent of message can be computed in advance C i = P i XOR O i O i = DES K1 (O i-1 ) = IV O -1 uses: stream encryption on noisy channels (eg satellite TV transmissions etc)

Output FeedBack (OFB)

Advantages and Limitations of OFB bit errors do not propagate more vulnerable to message stream modification a variation of a Vernam cipher hence must never reuse the same sequence (key+iv) sender & receiver must remain in sync originally specified with m-bit feedback

Counter (CTR) a new mode, though proposed early on similar to OFB but encrypts counter value rather than any feedback value must have a different key & counter value for every plaintext block (never reused) C i = P i XOR O i O i = DES K1 (i) uses: high-speed network encryptions It is being used with applications in ATM (asynchronous transfer mode) network security and IPSec (IP security).

Counter (CTR)

Advantages and Limitations of CTR efficiency can do parallel encryptions in h/w or s/w can preprocess in advance of need good for bursty high speed links random access to encrypted data blocks provable security (good as other modes) but must ensure never reuse key/counter values, otherwise could break (cf OFB)

Stream Ciphers process message bit by bit (as a stream) have a pseudo random keystream combined (XOR) with plaintext bit by bit randomness of stream key completely destroys statistically properties in message C i = M i XOR StreamKey i but must never reuse stream key otherwise can recover messages (cf book cipher)

Stream Cipher Structure

Stream Cipher Properties 1.The encryption sequence should have a large period, the longer the period of repeat the more difficult it will be to do cryptanalysis. 2. The keystream should approximate the properties of a true random number stream as close as possible, the more random-appearing the keystream is, the more randomized the ciphertext is, making cryptanalysis more difficult. 3. To guard against brute-force attacks, the key needs to be sufficiently long. The same considerations as apply for block ciphers are valid here.thus, with current technology, a key length of at least 128 bits is desirable. 4.large linear complexity 5.properly designed, can be as secure as a block cipher with same size key 6.but usually simpler & faster

RC4 a proprietary stream cipher owned by RSA DSI another Ron Rivest design, simple but effective variable key size, byte-oriented stream cipher widely used (web SSL/TLS, wireless WEP) key forms random permutation of all 8-bit values uses that permutation to scramble input info processed a byte at a time

RC4 Key Schedule starts with an array S of numbers: 0..255 use key to well and truly shuffle S forms internal state of the cipher for i = 0 to 255 do S[i] = i T[i] = K[i mod keylen]) j = 0 for i = 0 to 255 do j = (j + S[i] + T[i]) (mod 256) swap (S[i], S[j])

RC4 Encryption encryption continues shuffling array values sum of shuffled pair selects "stream key" value from permutation XOR S[t] with next byte of message to en/decrypt i = j = 0 for each message byte M i i = (i + 1) (mod 256) j = (j + S[i]) (mod 256) swap(s[i], S[j]) t = (S[i] + S[j]) (mod 256) C i = M i XOR S[t]

RC4 Overview

RC4 Security claimed secure against known attacks have some analyses, none practical result is very non-linear since RC4 is a stream cipher, must never reuse a key have a concern with WEP, but due to key handling rather than RC4 itself