Lecture 4 Page 1 CS 236 Stream and Block Ciphers Stream ciphers convert one symbol of plaintext immediately into one symbol of ciphertext Block ciphers.

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”
Encipherment Using Modern Symmetric-Key Ciphers. 8.2 Objectives ❏ To show how modern standard ciphers, such as DES or AES, can be used to encipher long.
Modern Symmetric-Key Ciphers
Modern Symmetric-Key Ciphers
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Making “Good” Encryption Algorithms
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.
1 Lect. 9 : Mode of Operation. 2 Modes of Operation – ECB Mode  Electronic Code Book Mode Break a message into a sequence of plaintext blocks Each plaintext.
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.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
CS470, A.SelcukModes of Operation1 Encrypting with Block Ciphers CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Block Cipher Transmission Modes CSCI 5857: Encoding and Encryption.
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.
A Survey of Authentication Protocol Literature: Version 1.0 Written by John Clark and Jeremy Jacob Presented by Brian Sierawski.
Lecture 4: Using Block Ciphers
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
Lecture 4 Page 1 CS 136, Fall 2014 More on Cryptography CS 136 Computer Security Peter Reiher October 14, 2014.
Lecture 4 Page 1 CS 136, Fall 2012 More on Cryptography CS 136 Computer Security Peter Reiher October 9, 2012.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Lecture 3 Page 1 Advanced Network Security Review of Cryptography Advanced Network Security Peter Reiher August, 2014.
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.
Encryption Types & Modes Chapter 9 Encryption Types –Stream Ciphers –Block Ciphers Encryption Modes –ECB - Electronic Codebook –CBC - Cipher Block Chaining.
More About DES Cryptography and Network Security Reference: Sec 3.1 of Stallings Text.
1.1 Chapter 8 Encipherment Using Modern Symmetric-Key Ciphers Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
BLOCK CIPHER SYSTEMS OPERATION MODES OF DATA ENCRYPTION STANDARD (DES)
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.
Cryptography and Network Security Chapter 6 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,
Lecture 2 Page 1 CS 236, Spring 2008 More on Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Lecture 4 Page 1 CS 236 Stream and Block Ciphers Stream ciphers convert one symbol of plaintext immediately into one symbol of ciphertext Block ciphers.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
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.
CS480 Cryptography and Information Security
Algorithm Modes ECB, CBC, CFB, OFB.
Computer and Network Security
Outline Desirable characteristics of ciphers Stream and block ciphers
Outline Desirable characteristics of ciphers Stream and block ciphers
Outline Desirable characteristics of ciphers Stream and block ciphers
Outline Desirable characteristics of ciphers Stream and block ciphers
Block Cipher Modes CS 465 Make a chart for the mode comparisons
Outline Desirable characteristics of ciphers Stream and block ciphers
Block cipher and modes of encryptions
PART VII Security.
Outline Desirable characteristics of ciphers Stream and block ciphers
Algorithm Types & Algorithm Modes
csci5233 computer security & integrity (Chap. 4)
Block vs Stream Ciphers
Outline Desirable characteristics of ciphers Stream and block ciphers
Encryption Basics Types of ciphers Algorithms Modes Key Length
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:

Lecture 4 Page 1 CS 236 Stream and Block Ciphers Stream ciphers convert one symbol of plaintext immediately into one symbol of ciphertext Block ciphers work on a given sized chunk of data at a time

Lecture 4 Page 2 CS 236 Stream Ciphers PlaintextCiphertext Key Encryption fsnarT fsnar T SS fsna r q qS fsn a zzqS fs n m mzqS f s rrmzqS f e ermzqS

Lecture 4 Page 3 CS 236 Advantages of Stream Ciphers +Speed of encryption and decryption Each symbol encrypted as soon as it’s available +Low error propagation Errors affect only the symbol where the error occurred

Lecture 4 Page 4 CS 236 Disadvantages of Stream Ciphers –Low diffusion Each symbol separately encrypted Each ciphertext symbol only contains information about one plaintext symbol –Susceptible to insertions and modifications –Not good match for many common uses of cryptography –Some disadvantages can be mitigated by use of proper cryptographic mode

Lecture 4 Page 5 CS 236 Block Ciphers PlaintextCiphertext Key Encryption T r a n s f e r $ 1 0 T s r f $ a e 1 n r 0 T r a n s f e r $ 1 0 T s r f $ a e 1 n r 0

Lecture 4 Page 6 CS 236 Advantages of Block Ciphers +Diffusion Easier to make a set of encrypted characters depend on each other +Immunity to insertions Encrypted text arrives in known lengths Most common Internet crypto done with block cyphers

Lecture 4 Page 7 CS 236 Disadvantages of Block Ciphers –Slower Need to wait for block of data before encryption/decryption starts –Worse error propagation Errors affect entire blocks

Lecture 4 Page 8 CS 236 Cryptographic Modes Let’s say you have a bunch of data to encrypt –Using the same cipher and key How do you encrypt the entire set of data? –Given block ciphers have limited block size –And stream ciphers just keep going

Lecture 4 Page 9 CS 236 The Basic Situation $ $ $ $ Let’s say our block cipher has a block size of 7 characters and we use the same key for all Now let’s encrypt sS^0’sq Dor72m/ 2ci;aE9 Sv&`>oo sS^0’sq Xl3lu*m #rdL04, There’s something odd here... sS^0’sq Is this good? Why did it happen?

Lecture 4 Page 10 CS 236 Another Problem With This Approach $ sS^0’sq Dor72m/ 2ci;aE9 Sv&`>oo sS^0’sq Xl3lu*m #rdL04, What if these are transmissions representing deposits into bank accounts? So far, so good... What if he owns account ? Dor72m/ 2ci;aE Insertion Attack!

Lecture 4 Page 11 CS 236 What Caused the Problems? Each block of data was independently encrypted –With the same key So two blocks with identical plaintext encrypt to the same ciphertext Not usually a good thing We used the wrong cryptographic mode –Electronic Codebook (ECB) Mode

Lecture 4 Page 12 CS 236 Cryptographic Modes A cryptographic mode is a way of applying a particular cipher –Block or stream The same cipher can be used in different modes –But other things are altered a bit A cryptographic mode is a combination of cipher, key, and feedback –Plus some simple operations

Lecture 4 Page 13 CS 236 So What Mode Should We Have Used? Cipher Block Chaining (CBC) mode might be better Ties together a group of related encrypted blocks Hides that two blocks are identical Foils insertion attacks

Lecture 4 Page 14 CS 236 Cipher Block Chaining Mode Adds feedback into encryption process The encrypted version of the previous block is used to encrypt this block For block X+1, XOR the plaintext with the ciphertext of block X –Then encrypt the result Each block’s encryption depends on all previous blocks’ contents Decryption is similar

Lecture 4 Page 15 CS 236 What About the First Block? If we send the same first block in two messages with the same key, Won’t it be encrypted the same way? Might easily happen with message headers or standardized file formats If CBC used as described, the same message sent twice would encrypt the same way both times

Lecture 4 Page 16 CS 236 Initialization Vectors A technique used with CBC –And other crypto modes –Abbreviated IV Makes sure that encryption results are always unique –Even for duplicate message using the same key XOR a random string with the first block –plaintext  IV –Then do CBC for subsequent blocks

Lecture 4 Page 17 CS 236 How To Decrypt With Initialization Vectors? First block received decrypts to P = plaintext  IV plaintext = P  IV No problem if receiver knows IV –Typically, IV is sent in the message Subsequent blocks use standard CBC –So can be decrypted that way

Lecture 4 Page 18 CS 236 Some Important Crypto Modes Electronic codebook mode (ECB) Cipher block chaining mode (CBC) Cipher-feedback mode (CFB) and Output-feedback mode (OFB) Both convert block to stream cipher