CS480 Cryptography and Information Security

Slides:



Advertisements
Similar presentations
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.
Advertisements

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
8.1 Chapter 8 Encipherment Using Modern Symmetric-Key Ciphers Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Modern Symmetric-Key Ciphers
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Cryptography and Network Security Chapter 6 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Lecture 23 Symmetric Encryption
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.
Lecture 4: Using Block Ciphers
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.
Data Encryption Standard (DES) © 2000 Gregory Kesden.
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.
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 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.
Part 1  Cryptography 1 Integrity Part 1  Cryptography 2 Data Integrity  Integrity  detect unauthorized writing (i.e., modification of data)  Example:
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 4. Traditional and Modern.
@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.
CS480 Cryptography and Information Security
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.
Modes of Operation.
Algorithm Modes ECB, CBC, CFB, OFB.
Computer and Network Security
Row Transposition Ciphers
Encryption
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography.
Outline Desirable characteristics of ciphers Stream and block ciphers
Block Cipher Modes CS 465 Make a chart for the mode comparisons
مروري برالگوريتمهاي رمز متقارن(كليد پنهان)
Block cipher and modes of encryptions
PART VII Security.
Cryptography and Network Security
Algorithm Types & Algorithm Modes
csci5233 computer security & integrity (Chap. 4)
Block vs Stream Ciphers
Overview Review of AES block cipher Block cipher modes of operation:
Block Ciphers: DES and AES
Block Ciphers (Crypto 2)
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:

CS480 Cryptography and Information Security 12/10/2017 CS480 Cryptography and Information Security 10. Encipherment using modern symmetric key ciphers Huiping Guo Department of Computer Science California State University, Los Angeles

Outline Use of modern standard ciphers( DES/AES) 12/10/2017 Outline Use of modern standard ciphers( DES/AES) Electronic Codebook (ECB) Mode Cipher Block Chaining (CBC) Mode Cipher Feedback (CFB) Mode Output Feedback (OFB) Mode Counter (CTR) Mode 10. Encipher CS480_W16

Use of modern standard ciphers Modern block ciphers (DES/AES) are designed to encipher and decipher a block of text of fixed size DES encrypts and decrypts a block of 64 bits AES encrypts and decrypts a block of 128 bits In real life applications, the text to be enciphered is of variable size Normally larger than 64 or 128 bits Modes of operation are devised to encipher text of any size employing either DES or AES 10. Encipher CS480_W16

Modes of operation 10. Encipher CS480_W16

Electronic Codebook (ECB) Mode The simplest mode of operation is called the electronic codebook (ECB) mode The plaintext is divided into N blocks The block size is n bits If the plaintext size is not a multiple of the block size, the text is padded to make the last block the same size as the other blocks The same key is used to encrypt and decrypt each block 10. Encipher CS480_W16

Electronic Codebook (ECB) Mode Figure 8.2 Electronic codebook (ECB) mode 10. Encipher CS480_W16

Security issues Patterns at the block level are preserved Equal blocks in the plaintext become equal blocks in the ciphertext The block independency creates opportunities for Eve to exchange some ciphertext block without knowing the key 10. Encipher CS480_W16

Error propagation A single bit error in transmission can create errors in many bits in the corresponding block However, the error does not have any effect on the other blocks 10. Encipher CS480_W16

Ciphertext Stealing In ECB mode, padding must be added to the last block if it is not n bits long Padding is not always possible Ciphertext stealing (CTS) can make it possible to use ECB mode without padding In this technique the last two plaintext blocks, PN−1 and PN , are encrypted differently and out of order 10. Encipher CS480_W16

Ciphertext Stealing Assuming that PN−1 has n bits and PN has m bits, where m ≤ n Headm (X) selects the leftmost m bits Tailn-m selects the rightmost n-m bits 10. Encipher CS480_W16

Applications The ECB mode of operation is not recommended for encryption of messages of more than one block to be transferred through an insecure channel Encryption of databases Records are encryption before they are stored in a database or decrypted before they are retrieved Because the order of encryption and decryption is not important in this mode, access to the database can be random if each record is a block or multiple blocks A record can be retrieved from the middle, decrypted and encrypted after modification without affecting other records We can use parallel processing if we need to create a very huge encrypted database 10. Encipher CS480_W16

Cipher Block Chaining (CBC) Mode In CBC mode, each plaintext block is exclusive-ored with the previous ciphertext block before being encrypted When a block is enciphered, the block is sent, but a copy of it is kept in memory to be used in the encryption of the next block To encipher the first block, a phony block called initialization vector (IV) us used The sender and the receiver agreed on IV 10. Encipher CS480_W16

Cipher Block Chaining (CBC) Mode 10. Encipher CS480_W16

Cipher Block Chaining (CBC) Mode It can be proved that each plaintext block at Alice’s site is recovered exactly at Bob’s site Because encryption and decryption are inverses of each other 10. Encipher CS480_W16

Security issues In CBC mode, equal plaintext blocks belong to the same message are enciphered into different ciphertext blocks The patterns at the block levels are not preserved However, if the two messages are equal, their encipherment is the same if they use the same IV It’s recommended to use a timestamp as an IV Eve can add some ciphertext blocks to the end of the ciphertext stream 10. Encipher CS480_W16

Error Propagation In CBC mode, a single bit error in ciphertext block Cj during transmission may create error in most bits in plaintext block Pj during decryption However, this single error toggles only one bit in plaintext block Pj+1 the bit in the same location Plaintext Pj+2 to PN are not affected by this single bit error A single bit error in ciphertext is self-recovered 10. Encipher CS480_W16

Applications The CBC mode of operation can be used to encipher messages Because of the chaining mechanism, parallel processing is not possible CBC mode is not used to encrypt and decrypt random-access files records CBC mode is also used for authentication 10. Encipher CS480_W16

Cipher Feedback (CFB) Mode ECB and CBC modes encrypt and decrypt blocks of the message The block size is predetermined by the underlying cipher In some situations, we need to use DES or AES as secure ciphers, but the plaintext or ciphertext block sizes are to be smaller The solution: use DES or AES in cipher feedback mode (CFB) 10. Encipher CS480_W16

Cipher Feedback (CFB) Mode In CFB mode, encipherment and decipherment use the encryption function of the underlying block cipher DES or AES is not used for encrypting/decrypting plaintext DES/AES is used for encrypting/decrypting the contents of a shift register S of size n Encryption is done exclusive-oring an r-bit plaintext block with r bits of the shift register For each block, the shift register Si is made by shifting Si-1 r bits to the left and filling the rightmost r bits with Ci-1. 10. Encipher CS480_W16

Cipher Feedback (CFB) Mode Si is then encrypted to Ti Only the leftmost r bits of Ti are exclusive-ored with the plain text block Pi to make the Ci S1 is set to the IV for the first block No padding is needed The relation between plaintext and ciphertext blocks is shown below: 10. Encipher CS480_W16

Cipher Feedback (CFB) Mode 10. Encipher CS480_W16

Security issues Just like CBC, the patterns at the block level are not preserved More than one message can be encrypted with the same key, but the value of the IV should be changed for each message Eve can add some ciphertext block to the end of the ciphertext stream 10. Encipher CS480_W16

Error propagation In CFB, a single bit error in ciphertext block Cj during transmission creates a single bit error (at the same position) in plaintext block Pj However, most of the bits in the following plaintext blocks are in error as long as some bits of Cj are still in the shift register 10. Encipher CS480_W16

Applications The CFB mode of operation can be used to encipher blocks of small size Such as one character or bit at a time There is no need for padding because the size of the plaintext block is normally fixed. 10. Encipher CS480_W16

Output Feedback (OFB) Mode OFB is very similar to CFB There is only one difference: each bit in the ciphertext is independent of the previous bits This avoids error propagation If an error occurs in transmission, it does not affect the bits that follow Like CFB, both the sender and the receiver use the encryption algorithm 10. Encipher CS480_W16

Output Feedback (OFB) Mode 10. Encipher CS480_W16

Output Feedback (OFB) Mode Security issues Just like CFB, patterns at the block level are not preserved Error propagation A single error in the ciphertext affects only the corresponding bit in the plaintext 10. Encipher CS480_W16

Counter (CTR) Mode In CTR mode, there is no feedback The pseudorandomness in the key stream is achieved using a counter An n-bit counter is initialized to a pre-determined value (IV) and incremented based on a predefined rule (mod 2n) To provide a better randomness, the increment value can depend on the block number to be incremented 10. Encipher CS480_W16

Counter (CTR) Mode 10. Encipher CS480_W16

CTR Mode as a stream cipher 10. Encipher CS480_W16

Comparison of Different Modes 10. Encipher CS480_W16