5 Preliminaries
5.1 Underlying Block Cipher Algorithm
This recommendation assumes that a FIPS-approved symmetric key block cipher algorithm has
been chosen as the underlying algorithm, and that a secret, random key, denoted
K
, has been
established among all of the parties to the communication. The cryptographic key regulates the
functioning of the block cipher algorithm and, thus, by extension, regulates the functioning of the
mode. The specifications of the block cipher and algorithms and the modes are public, so the
security of the mode depends, at a minimum, on the secrecy of the key.
A confidentiality mode of operation of the block cipher algorithm consists of two processes that
are inverses of each other: encryption and decryption. Encryption is the transformation of a
usable message, called the plaintext, into an unreadable form, called the ciphertext; decryption is
the transformation that recovers the plaintext from the ciphertext.
For any given key, the underlying block cipher algorithm of the mode also consists of two
functions that are inverses of each other. These two functions are often called encryption and
decryption, but in this recommendation, those terms are reserved for the processes of the
confidentiality modes. Instead, as part of the choice of the block cipher algorithm, one of the two
functions is designated as the forward cipher function, denoted
CIPH
K
; the other function is then
called the inverse cipher function, denoted
CIPH
–1
. The inputs and outputs of both functions are
K
called input blocks and output blocks. The input and output blocks of the block cipher algorithm
have the same bit length, called the block size, denoted
b
.
5.2 Representation of the Plaintext and the Ciphertext
For all of the modes in this recommendation, the plaintext must be represented as a sequence of
bit strings; the requirements on the lengths of the bit strings vary according to the mode:
For the ECB and CBC modes, the total number of bits in the plaintext must be a multiple of the
block size,
b
; in other words, for some positive integer
n,
the total number of bits in the plaintext
must be
nb.
The plaintext consists of a sequence of
n
bit strings, each with bit length
b.
The bit
strings in the sequence are called data blocks, and the plaintext is denoted
P
1
,
P
2
,…,
P
.
n
For the CFB mode, the total number of bits in the plaintext must be a multiple of a parameter,
denoted
s
, that does not exceed the block size; in other words, for some positive integer
n,
the
total number of bits in the message must be
ns.
The plaintext consists of a sequence of
n
bit
strings, each with bit length
s.
The bit strings in the sequence are called data segments, and the
plaintext is denoted
P
#
1
,
P
#
2
,…,
P
#
.
n
For the OFB and CTR modes, the plaintext need not be a multiple of the block size. Let
n
and
u
denote the unique pair of positive integers such that the total number of bits in the message is
(
n
-1)
b
+
u
, where 1
≤
u
≤
b
. The plaintext consists of a sequence of
n
bit strings, in which the bit
length of the last bit string is
u
, and the bit length of the other bit strings is
b
. The sequence is
denoted
P
1
,
P
2
,…,
P
n-1
,
P
*
, and the bit strings are called data blocks, although the last bit string,
n
7