ABSTRACT

Recall that the two types of symmetric-key algorithms are block

ciphers and stream ciphers, and that block ciphers operate on

a block of data whereas stream ciphers encrypt individual bits.

Therefore, in the case of a stream cipher we have the plaintext

message X = x1, x2, . . ., the key Z = z1, z2, . . ., and the ci-

phertext Y = y1, y2, . . .. Because stream ciphers encrypt a sin-

gle bit at a time, xi, yi, zi {0, 1}. The ciphertext Y is defined as y1 = ez1(x1), y2 = ez2(x2), . . . where the most com-

mon form of stream cipher encryption is modulo 2 addition, i.e.

yi = ezi(xi) = xi + zi mod 2. Decryption is of the form of mod-

ulo 2 subtraction, which is equivalent to modulo 2 addition, i.e.

xi = dzi(yi) = yi − zi mod 2 = yi + zi mod 2. Moreover, both operations are equivalent to the bit-wise exclusive-OR (denoted as

XOR) operation, as detailed in Table 4.1.