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

Block and Stream Ciphers

The document discusses stream ciphers and block ciphers. [1] Stream ciphers operate on a character-by-character basis, using a key stream to encrypt each plaintext character individually. [2] Block ciphers encrypt fixed-length blocks of text together using a single key. [3] Some ciphers combine aspects of stream and block ciphers by encrypting messages block-by-block but using a changing key stream.

Uploaded by

mahesh palem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Block and Stream Ciphers

The document discusses stream ciphers and block ciphers. [1] Stream ciphers operate on a character-by-character basis, using a key stream to encrypt each plaintext character individually. [2] Block ciphers encrypt fixed-length blocks of text together using a single key. [3] Some ciphers combine aspects of stream and block ciphers by encrypting messages block-by-block but using a changing key stream.

Uploaded by

mahesh palem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

3-4 STREAM AND BLOCK CIPHERS

The literature divides the symmetric ciphers into two broad categories: stream ciphers and
block ciphers. Although the definitions are normally applied to modern ciphers, this
categorization also applies to traditional ciphers.

Topics discussed in this section:

3.4.1 Stream Ciphers


3.4.2 Block Ciphers
3.4.3 Combination

Cryptography & Network Security - Behrouz


59
A. Forouzan
3.4.1 Stream Ciphers

Call the plaintext stream P, the ciphertext stream C, and the key stream K.

Figure 3.26 Stream cipher

Cryptography & Network Security - Behrouz


60
A. Forouzan
3.4.1 Continued

Example 3.30
Additive ciphers can be categorized as stream ciphers in which the key
stream is the repeated value of the key. In other words, the key
stream is considered as a predetermined stream of keys or
K = (k, k, …, k). In this cipher, however, each character in the
ciphertext depends only on the corresponding character in the
plaintext, because the key stream is generated independently.

Example 3.31
The monoalphabetic substitution ciphers discussed in this chapter are
also stream ciphers. However, each value of the key stream in this
case is the mapping of the current plaintext character to the
corresponding ciphertext character in the mapping table.
Cryptography & Network Security - Behrouz
61
A. Forouzan
3.4.1 Continued

Example 3.32
Vigenere ciphers are also stream ciphers according to the definition.
In this case, the key stream is a repetition of m values, where m is the
size of the keyword. In other words,

Example 3.33
We can establish a criterion to divide stream ciphers based on their
key streams. We can say that a stream cipher is a monoalphabetic
cipher if the value of ki does not depend on the position of the
plaintext character in the plaintext stream; otherwise, the cipher is
polyalphabetic.
Cryptography & Network Security - Behrouz
62
A. Forouzan
3.4.1 Continued
Example 3.33 (Continued)

 Additive ciphers are definitely monoalphabetic because ki in the


key stream is fixed; it does not depend on the position of the
character in the plaintext.

 Monoalphabetic substitution ciphers are monoalphabetic because


ki does not depend on the position of the corresponding character in
the plaintext stream; it depends only on the value of the plaintext
character.

 Vigenere ciphers are polyalphabetic ciphers because ki definitely


depends on the position of the plaintext character. However, the
dependency is cyclic. The key is the same for two characters m
positions apart.
Cryptography & Network Security - Behrouz
63
A. Forouzan
3.4.2 Block Ciphers

In a block cipher, a group of plaintext symbols of size m (m > 1) are encrypted together
creating a group of ciphertext of the same size. A single key is used to encrypt the whole
block even if the key is made of multiple values. Figure 3.27 shows the concept of a block
cipher.

Figure 3.27 Block cipher

Cryptography & Network Security - Behrouz


64
A. Forouzan
3.4.2 Continued

Example 3.34
Playfair ciphers are block ciphers. The size of the block is m = 2. Two
characters are encrypted together.
Example 3.35
Hill ciphers are block ciphers. A block of plaintext, of size 2 or more is
encrypted together using a single key (a matrix). In these ciphers, the
value of each character in the ciphertext depends on
all the values of the characters in the plaintext. Although the key is
made of m × m values, it is considered as a single key.
Example 3.36
From the definition of the block cipher, it is clear that every block
cipher is a polyalphabetic cipher because each character in a
ciphertext block dependsCryptography
on all&characters in the plaintext block. 65
Network Security - Behrouz
A. Forouzan
3.4.3 Combination

In practice, blocks of plaintext are encrypted individually, but they use a stream of keys to
encrypt the whole message block by block. In other words, the cipher is a block cipher when
looking at the individual blocks, but it is a stream cipher when looking at the whole message
considering each block as a single unit.

Cryptography & Network Security - Behrouz


66
A. Forouzan

You might also like