Block Cipher Modes of Operation
Block Cipher Modes of Operation
• Each encryption step takes an input block, enciphers it with the key
provided to generate an output block, takes the most significant s bits of
the output block, and then exclusive ORs that with the plaintext segment.
The first input block is the ICV and each subsequent input block is formed
by concatenating the (b-s) least significant bits of the previous input block
and the ciphertext (s bits) from the previous step to form a full block. The
input text can be of any length. The output text will have the same length
as the input text.
Cipher Feedback Mode (CFB)
In this mode the cipher is given as feedback to
the next block of encryption with some new
specifications: first, an initial vector IV is used for
first encryption and output bits are divided as a
set of s and b-s bits. The left-hand side s bits are
selected along with plaintext bits to which an
XOR operation is applied. The result is given as
input to a shift register having b-s bits to lhs,s
bits to rhs and the process continues.
Output Feedback Mode
• The output feedback mode follows nearly the
same process as the Cipher Feedback(CFB) mode
except that it sends the encrypted output as
feedback instead of the actual cipher which is
XOR output.
• In this output feedback mode, all bits of the block
are sent instead of sending selected s bits. The
Output Feedback mode of block cipher holds
great resistance towards bit transmission errors.
It also decreases the dependency or relationship
of the cipher on the plaintext.
OFB
Counter Mode(CTR)
• The Counter Mode or CTR is a simple counter-
based block cipher implementation. Every
time a counter-initiated value is encrypted
and given as input to XOR with plaintext which
results in cipher text block. The CTR mode is
independent of feedback use and thus can be
implemented in parallel.