Network Security Lecture 4 Modes of Operation Waleed Ejaz

Slides:



Advertisements
Similar presentations
Block Cipher Modes of Operation and Stream Ciphers
Advertisements

Chapter 4: Modes of Operation CS 472: Fall Encrypting a Large Massage 1.Electronic Code Book (ECB) 2.Cipher Block Chaining (CBC) 3.Output Feedback.
ECE454/CS594 Computer and Network Security
“Advanced Encryption Standard” & “Modes of Operation”
Modern Symmetric-Key Ciphers
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.2 Secret Key Cryptography.
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.
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.
Block Ciphers 1 Block Ciphers Block Ciphers 2 Block Ciphers  Modern version of a codebook cipher  In effect, a block cipher algorithm yields a huge.
Chapter 4 Modes of Operation Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
Chapter 5 Cryptography Protecting principals communication in systems.
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.
Modes of Operation CS 795. Electronic Code Book (ECB) Each block of the message is encrypted with the same secret key Problems: If two identical blocks.
Security Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to: –Describe the reasons for having system.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Chapter 3 – Block Ciphers and the Data Encryption Standard Jen-Chang Liu, 2004 Adopted from lecture slides by Lawrie Brown.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Dr Alejandra Flores-Mosri Security Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to: –Describe the.
Lecture 23 Symmetric Encryption
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Block Cipher Transmission Modes CSCI 5857: Encoding and Encryption.
The Data Encryption Standard - see Susan Landau’s paper: “Standing the test of time: the data encryption standard.” DES - adopted in 1977 as a standard.
Modes of Operation. Topics  Overview of Modes of Operation  EBC, CBC, CFB, OFB, CTR  Notes and Remarks on each modes.
Cryptography and Network Security Chapter 6. Multiple Encryption & DES  clear a replacement for DES was needed theoretical attacks that can break it.
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Lecture 4: Using Block Ciphers
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Lecture 3 Feistel based algorithms. Today 1.Block ciphers - basis 2.Feistel cipher 3.DES 4.DES variations 5.IDEA 5.NEWDES.
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
3DES and Block Cipher Modes of Operation CSE 651: Introduction to Network Security.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
Chapter 9: Algorithms Types and Modes Dulal C. Kar Based on Schneier.
More About DES Cryptography and Network Security Reference: Sec 3.1 of Stallings Text.
Data Encryption Standard (DES) © 2000 Gregory Kesden.
Chapter 2 (B) – Block Ciphers and Data Encryption Standard.
Shambhu Upadhyaya Security – AES-CCMP Shambhu Upadhyaya Wireless Network Security CSE 566 (Lecture 13)
Modes of Usage Dan Fleck CS 469: Security Engineering These slides are modified with permission from Bill Young (Univ of Texas) 11 Coming up: Modes of.
Modes of Operation INSTRUCTOR: DANIA ALOMAR. Modes of Operation A block cipher can be used in various methods for data encryption and decryption; these.
Stream Ciphers and Block Ciphers A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. Examples of classical stream.
1 Network Security Lecture 5 Hashes and Message Digests Waleed Ejaz
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
Cryptography and Network Security Chapter 6 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 2: Introduction to Cryptography
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 23 Symmetric Encryption
Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,
Symmetric Encryption Lesson Introduction ●Block cipher primitives ●DES ●AES ●Encrypting large message ●Message integrity.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
Network Security Lecture 3 Secret Key Cryptography
@Yuan Xue 285: Network Security CS 285 Network Security Message Authentication Code Data integrity + Source authentication.
Block Cipher Modes Last Updated: Aug 25, ECB Mode Electronic Code Book Divide the plaintext into fixed-size blocks Encrypt/Decrypt each block independently.
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.
Algorithm Modes ECB, CBC, CFB, OFB.
Block Cipher Modes CS 465 Make a chart for the mode comparisons
مروري برالگوريتمهاي رمز متقارن(كليد پنهان)
PART VII Security.
Algorithm Types & Algorithm Modes
Block vs Stream Ciphers
Counter Mode, Output Feedback Mode
Secret-Key Encryption
Presentation transcript:

Network Security Lecture 4 Modes of Operation Waleed Ejaz

Overview 1. Modes of Operation: ECB, CBC, OFB, CFB, CTR 2. Privacy + Integrity 3. DES Attacks 4. 3DES and its design Ref: Chapter 4 of textbook.

Modes of Operation 1. Electronic Code Book (ECB) 2. Cipher Block Chaining (CBC) 3. Cipher Feedback Mode (CFB) 4. Output Feedback Mode (OFB) 5. Counter Mode (CTR)

1. Electronic Code Book (ECB) Each block is independently encoded Problem:  Identical Input ⇒ Identical Output  Can insert encoded blocks

2. Cipher Block Chaining (CBC) Add a random number before encoding

CBC (contd.) Use C i as random number for i+1 Need Initial Value (IV) If no IV, then one can guess changed blocks Example: Continue Holding, Start Bombing

CBC (contd.) Attack 1: Change selected bits in encrypted message  Garbled text not detected by computers Attack 2: Attacker knows plain text and cipher text. Can change plain text.  32-bit CRC may not detect. 64-bit CRC may be better.

3. k-bit Output Feedback Mode (OFB) IV is used to generate a stream of blocks Stream is used a one-time pad and XOR'ed to plain text

OFB (contd.) Advantages:  Stream can be generated in advance  1-bit error in transmission affects only one bit of plain text  Message can be any size  All messages are immediately transmitted Disadvantage: Plain text can be trivially modified Only left-most k-bits of the block can be used

4. k-bit Cipher Feedback Mode (CFB) Key Stream blocks use previous block as IV k-bits of encoded streams are used to generate next block

CFB (contd.) Stream cannot be generated in advance. In practice, k=8 bit or 64 bit If a byte is added or deleted, that byte and next 8 bytes will be affected No block rearranging effect

5. Counter Mode (CTR) If the same IV and key is used again,  Xor of two encrypted messages = Xor of plain text IV is incremented and used to generated one-time pad Advantage: Pre-computed

Message Authentication Code (MAC) Cryptographic checksum or Message Integrity Code (MIC) CBC residue is sent with plain text

Weak and Semi Weak Keys Recall that 56-bit DES key is divided in two halves and permuted to produce C0 and D0 Keys are weak if C0 and D0 (after permutation) result in:  All 0's  All 1's  Alternating 10 or 01 Four possibilities for each half ⇒ 16 weak keys

Privacy + Integrity Can't send encrypted message and CBC residue. 1. Use strong CRC 2. Use CBC residue with another key.  The 2nd CBC can be weak, as in Kerberos.  Kerberos uses K+F0F0…F0F0 as the 2nd key.

Privacy + Integrity (contd.) 3. Use hash with another key. Faster than encryption. 4. Use Offset Code Book (OCB), tkrovetz-ocb-00.txt tkrovetz-ocb-00.txt

MISTY1 Block cipher with 128 bit keys With 4 to 8 rounds. Each round consists of 3 subrounds. Secure against linear and differential cryptanalysis Named after the inventors: Matsui Mitsuru, Ichikawa Tetsuya, Sorimachi Toru, Tokita Toshio, and Yamagishi Atsuhiro A.k.a. Mitsubishi Improved Security Technology Recommended for Japanese government use. Patented Described in RFC 2994 Ref:

KASUMI Selected by 3GPP 64-bit block cipher with 128 bit key A variant of MISTY1 Needs limited computing power Works in real time (voice) KASUMI with counter mode and output feedback modes. This algorithm is known as f8.

GSM Encryption Three stream ciphers: A5/1, A5/2, A5/3 Description of A5/1 and A5/2 were never released to public but were reverse engineered and broken A5/3 is based KASUMI

DES Attacks 1997 RSA Lab set a prize of $10k Curtin and Dolske used combined power of Internet computers to find the key using a brute force method Electronic Frontier Foundation (EFF) showed that a $250k machine could find any DES key in max 1 week. Avg 3 days EFF combined the cracker with Internet to crack DES in 1 day. Differential Cryptanalysis and Linear cryptanalysis can be used to crack DES NIST recommended 3DES

3DES c = e k1 (d k2 (e k3 (m))) m = d k3 (e k2 (d k1 (c))) k1 and k2 should be independent but k3 can be independent or k3=k1 k3 = k1 results in 112 bit strength

CBC: Outside vs. Inside

CBC: Outside vs. Inside (contd.)

Key 3DES Design Decisions 1. 3 stages 2. Two keys 3. E-D-E 4. CBC Outside

1. Why not 2DES? ek1(ek2(m)) 2DES is only twice as secure as DES (57-bit key) Suppose you know (m1,c1), (m2,c2),... c1=ek1(ek2(m1)) dk1(c1)=ek2(m1) k1 and k2 can be found by preparing two 2^56 entry tables Table 1 contains all possible encryptions of m1. Table 2 contains all possible decryptions of c1. Sort both tables. Find matching entries ⇒ potential (k1,k2) pairs Try these pairs on (m2, c2),...

2. Why only Two Keys? k3=k1 is as secure as k3\=k1 Given (m,c) pairs, it is easy to find 3 keys such that ek1(dk2(ek3(m)))=r But finding the keys when k3=k1 is difficult.

3. Why E-D-E and not E-E-E? E and D are both equally strong encryptions. With k1=k2, EDE = E ⇒ a 3DES system can talk to DES by setting k1=k2

Why CBC outside? 1. Bit Flipping:  CBC Outside: One bit flip in the cipher text causes that block of plain text and next block garbled ⇒ Self-Synchronizing  CBC Inside: One bit flip in the cipher text causes more blocks to be garbled. 2. Pipelining:  More pipelining possible in CBC inside implementation. 3. Flexibility of Change:  CBC outside: Can easily replace CBC with other feedback modes (ECB, CFB,….)

Summary 1. To encrypt long messages, we need to use different modes of operation 2. Five modes of operation: ECB, CBC, OFG, CFB, CTR 3. Privacy + Integrity: Use CRC or CBC residue 4. 3DES uses two keys and E-D-E sequence and CBC on the outside.

References 1. C. Kaufman, R. Perlman, and M. Speciner, “Network Security: Private Communication in a Public World,” 2nd Ed, Prentice Hall, 2002, ISBN: William Stallings, “Cryptography and Network Security,” 4 th Ed, Prentice-Hall, 2006, ISBN: W. Dent and C. J. Mitchell, “User’s Guide to Cryptography and Standards,” Artech House, 2005, ISBN: N. Ferguson and B. Schneier, “Practical Cryptography,” Wiley, 2003, ISBN: X

Assignment 2 Read chapter 4 of the textbook Submit answer to Exercise 4.4 Exercise 4.4: What is a practical method of finding a triple of keys that maps a given plain text to a given cipher text using EDE? Hint: 1. You have only one (m, c) pair 2. Worst case is to have 3 nested loops for trying allk1, k2, k3 ⇒ 264 × 264 × 264 = 2192 steps but requires storing only 1 intermediate result. 3. How can you reduce the number of steps using more storage for intermediate results.

Questions!