Stream and Block Ciphers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

3-4 STREAM AND BLOCK CIPHERS

The literature tlivules lhe symmetric ciphers into two


broatl' categories.· stream ciphers and blDelc ciphers.
Althoi,gh the definitions are normally applied' lo modern
ciphers, this categorization also applies to traditional1
1

ciphers,.

Topics discussed in this section:


3.4.1 Stream Ciphers
3.4.2 Block Ciphers
3.4.3 Combination

3.60
3.4.1 Stream Ciphers

Call the plaintext stream P, the ciphertext stream C, and


the key stream K.

Figure 3.26 Stream cipher


Plaintext Ciphertext
p 1a i n
so ,,

.,-
l
D = Ek3 (a)

Encryption algorithm
3.61
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.

3.62
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,

K = (k1, k2, ... km, k1, k2, ... k,n, .. . )

Exa1nple 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.
3.63
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.

3.64
3.4.2 Stream 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
Plaintext Ciphertext

p l a i n t ex t SO D DP V
K

. . . _ _ _ _ _ {D, P, V}
l
= EK {i, n, t} _ _ ____,

Encryption algorithm
3.65
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 x m values, it is considered as a single key.
Example 3.36
From the deC-mition of the block cipher, it is clear that every block
cipher is a polyalphabetic cipher because each character in a
ciphertext block depends on all characters in the plaintext block.
3.66
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.

3.67

You might also like