0% found this document useful (0 votes)
24 views

Lecture 4 - Block CIphers and Methods of Operations

The document discusses different modes of operation for block ciphers. It describes Electronic Codebook (ECB) mode, which encrypts each block independently without consideration of other blocks. It then describes more secure modes like Cipher Block Chaining (CBC) mode, Cipher Feedback (CFB) mode, Output Feedback (OFB) mode, and Counter (CTR) mode. These modes aim to address weaknesses in ECB by linking the encryption of blocks or using feedback from previous encryptions. The document provides the encryption process and remarks for each mode.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Lecture 4 - Block CIphers and Methods of Operations

The document discusses different modes of operation for block ciphers. It describes Electronic Codebook (ECB) mode, which encrypts each block independently without consideration of other blocks. It then describes more secure modes like Cipher Block Chaining (CBC) mode, Cipher Feedback (CFB) mode, Output Feedback (OFB) mode, and Counter (CTR) mode. These modes aim to address weaknesses in ECB by linking the encryption of blocks or using feedback from previous encryptions. The document provides the encryption process and remarks for each mode.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Sanjivani Rural Education Society’s

Sanjivani College of Engineering, Kopargaon-423 603


(An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified

Department of Computer Engineering


(NBA Accredited)

Lecture-04 Block Ciphers and Methods of operations


Modes of Operation
• Block ciphers encrypt fixed size blocks
• eg. DES encrypts 64-bit blocks, with 56-bit key

• Need way to use in practise, given usually have arbitrary amount of


information to encrypt
• Partition message into separate block for ciphering

• A mode of operation describes the process of encrypting each of these


blocks under a single key

• Some modes may use randomized addition input value


Modes of Operation Taxonomy

• Current well-known modes of operation


Electronic Codebook (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


Ci = EK (Pi)
• Uses: secure transmission of single values
ECB Scheme
Remarks on ECB
• Strength: it’s simple.
• Weakness:
• Repetitive information contained in the plaintext may show in the
ciphertext, if aligned with blocks.
• If the same message is encrypted (with the same key) and sent twice, their
ciphertext are the same.
• Typical application:
• secure transmission of short pieces of information (e.g. a temporary
encryption key)

6
Cipher Block Chaining (CBC)

• Solve security deficiencies in ECB


• Repeated same plaintext block result different ciphertext block
• Each previous cipher blocks is chained to be input with current
plaintext block, hence name
• Use Initial Vector (IV) to start process
Ci = EK (Pi XOR Ci-1)
C0 = IV
• Uses: bulk data encryption, authentication
CBC scheme
Remarks on CBC

• The encryption of a block depends on the current and all blocks


before it.

• So, repeated plaintext blocks are encrypted differently.

• Initialization Vector (IV)


• May sent encrypted in ECB mode before the rest of ciphertext

9
Cipher FeedBack (CFB)
• Use Initial Vector to start process
• Encrypt previous ciphertext , then combined with the plaintext block using X-
OR to produce the current ciphertext
• Cipher is feed back (hence name) to concatenate with the rest of IV
• Plaintext is treated as a stream of bits
• Any number of bit (1, 8 or 64 or whatever) to be feed back (denoted CFB-
1, CFB-8, CFB-64)
• Relation between plaintext and ciphertext
Ci = Pi XOR SelectLeft(EK (ShiftLeft(Ci-1)))
C0 = IV
CFB Encryption/Decryption
Remark on CFB

• A ciphertext segment depends on the current and all preceding plaintext


segments.

• A corrupted ciphertext segment during transmission will affect the current


and next several plaintext segments.

12
Output FeedBack (OFB)

• Very similar to CFB


• But output of the encryption function output of cipher is feed back (hence
name), instead of ciphertext
• Feedback is independent of message
• Relation between plaintext and ciphertext
Ci = Pi XOR Oi
Oi = EK (Oi-1)
O0 = IV
• Uses: stream encryption over noisy channels
OFB Encryption and Decryption
Remarks on OFB

• Each bit in the ciphertext is independent of the previous bit or bits.


This avoids error propagation

• Pre-compute of forward cipher is possible


Counter (CTR)
• Encrypts counter value with the key rather than any feedback value (no
feedback)
• Counter for each plaintext will be different
• can be any function which produces a sequence which is guaranteed not to
repeat for a long time
• Relation
Ci = Pi XOR Oi
Oi = EK (i)
• Uses: high-speed network encryptions
CTR Encryption and Decryption
Remark on CTR

• Strengthes:
• Needs only the encryption algorithm
• Random access to encrypted data blocks
• blocks can be processed (encrypted or decrypted) in parallel
• Simple; fast encryption/decryption
• Counter must be
• Must be unknown and unpredictable
• pseudo-randomness in the key stream is a goal

18
Remark on each mode
• Basically two types:
• block cipher
• stream cipher
• CBC is an excellent block cipher
• CFB, OFB, and CTR are stream ciphers
• CTR is faster because simpler and it allows parallel processing

19
THANK YOU

You might also like