
Block ciphers and the data encryption st andard 177
c
0
c
1
c
2
c
n
p
1
p
2
p
n
E
k
(c
0
) E
k
(c
1
) E
k
(c
n−1
)
FIGURE 8.7: Cipher feedback mode.
Counter mode (CTR)
This mode is less well known than the others, as it wasn’t accepted as a
standard mode until more r e c e ntly. However, it is bo th very easy to implement
and very secure. To start, a nonce value such as was needed for the other
modes is needed. The nonce needs to be expanded to a full block. This is
done by concatenating with the nonce a counter for the message blocks. For
a 128 block size, standard sizes are 48 bits for the message number, 16 bits
for the nonce data, and the remaining 6 4 bits for the counter ...