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

Objectives: DES or AES, Can Be Used To Encipher Long Messages

The document discusses five modes of operation for using modern block ciphers such as DES and AES to encrypt long messages: electronic codebook (ECB), cipher block chaining (CBC), cipher feedback (CFB), output feedback (OFB), and counter (CTR) mode. It aims to explain how to encrypt long messages using block ciphers and analyze the security and error propagation of each mode.

Uploaded by

RAJ TAPASE
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Objectives: DES or AES, Can Be Used To Encipher Long Messages

The document discusses five modes of operation for using modern block ciphers such as DES and AES to encrypt long messages: electronic codebook (ECB), cipher block chaining (CBC), cipher feedback (CFB), output feedback (OFB), and counter (CTR) mode. It aims to explain how to encrypt long messages using block ciphers and analyze the security and error propagation of each mode.

Uploaded by

RAJ TAPASE
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Objectives

❏ To show how modern standard ciphers, such as


DES or AES, can be used to encipher long
messages.
❏ To discuss five modes of operation designed to be
used with modern block ciphers.
❏ To define which mode of operation creates stream
ciphers out of the underlying block ciphers.
❏ To discuss the security issues and the error
propagation of different modes of operation.

8.1
8-1 USE OF MODERN BLOCK CIPHERS

Symmetric-key encipherment can be done using


modern block ciphers. Modes of operation have been
devised to encipher text of any size employing either
DES or AES.

Topics discussed in this section:


8.1.1 Electronic Codebook (ECB) Mode
8.1.2 Cipher Block Chaining (CBC) Mode
8.1.3 Cipher Feedback (CFB) Mode
8.1.4 Output Feedback (OFB) Mode
8.1.5 Counter (CTR) Mode

8.2
8-1 Continued

Figure 8.1 Modes of operation

8.3
8.1.1 Electronic Codebook (ECB) Mode

The simplest mode of operation is called the electronic


codebook (ECB) mode.

Figure 8.2 Electronic codebook (ECB) mode

8.4
8.1.1 Continued

Example 8.1
It can be proved that each plaintext block at Alice’s site is exactly
recovered at Bob’s site. Because encryption and decryption are
inverses of each other,

Example 8.2
This mode is called electronic codebook because one can
precompile 2K codebooks (one for each key) in which each
codebook has 2n entries in two columns. Each entry can list the
plaintext and the corresponding ciphertext blocks. However, if K
and n are large, the codebook would be far too large to precompile
and maintain.
8.5
8.1.1 Continued
Example 8.3

Assume that Eve works in a company a few hours per month (her
monthly payment is very low). She knows that the company uses
several blocks of information for each employee in which the
seventh block is the amount of money to be deposited in the
employee’s account. Eve can intercept the ciphertext sent to the
bank at the end of the month, replace the block with the
information about her payment with a copy of the block with the
information about the payment of a full-time colleague. Each
month Eve can receive more money than she deserves.

8.6
8.1.1 Continued

Error Propagation
A single bit error in transmission can create errors in
several in the corresponding block. However, the error
does not have any effect on the other blocks.

8.7
8.1.1 Continued

Ciphertext Stealing
A technique called 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, as shown below,
assuming that PN−1 has n bits and PN has m bits, where m
≤n.

8.8
8.1.2 Cipher Block Chaining (CBC) Mode

In CBC mode, each plaintext block is exclusive-ored with


the previous ciphertext block before being encrypted.
Figure 8.3 Cipher block chaining (CBC) mode

8.9
8.1.2 Continued
Figure 8.3 Cipher block chaining (CBC) mode

8.10
8.1.2 Continued
Example 8.4
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,

Initialization Vector (IV)


The initialization vector (IV) should be known by the
sender and the receiver.

8.11
8.1.2 Continued

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.

8.12
8.1.2 Continued

Ciphertext Stealing
The ciphertext stealing technique described for ECB
mode can also be applied to CBC mode, as shown below.

The head function is the same as described in ECB mode;


the pad function inserts 0’s.

8.13
8.1.3 Cipher Feedback (CFB) Mode
In some situations, we need to use DES or AES as secure
ciphers, but the plaintext or ciphertext block sizes are to
be smaller.
Figure 8.4 Encryption in cipher feedback (CFB) mode

8.14
8.1.3 Continued

Note
In CFB mode, encipherment and decipherment use
the encryption function of the underlying block
cipher.

The relation between plaintext and ciphertext blocks is


shown below:

8.15
8.1.3 Continued

CFB as a Stream Cipher

Figure 8.5 Cipher feedback (CFB) mode as a stream cipher

8.16
8.1.3 Continued

8.17
18.1.4 Output Feedback (OFB) Mode

In this mode each bit in the ciphertext is independent of


the previous bit or bits. This avoids error propagation.
Figure 8.6 Encryption in output feedback (OFB) mode

8.18
8.1.4 Continued
OFB as a Stream Cipher

Figure 8.7 Output feedback (OFB) mode as a stream cipher

8.19
8.1.4 Continued

8.20
8.1.5 Counter (CTR) Mode

In the counter (CTR) mode, there is no feedback. The


pseudorandomness in the key stream is achieved using a
counter.
Figure 8.8 Encryption in counter (CTR) mode

8.21
8.1.5 Continued

Figure 8.9 Counter (CTR) mode as a stream cipher

8.22
8.1.5 Continued

8.23
8.1.5 Continued

Comparison of Different Modes

8.24

You might also like