{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

applied cryptography - protocols, algorithms, and source code in c

# Since the data is short and random none of the

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o those of OFB. Counter mode solves the OFB mode problem of n-bit output where n is less than the block length. Figure 9.13 A keystream generator in output-feedback mode. Nothing is sacred about the counter; it does not have to count through all the possible inputs in order. You can use any of the random-sequence generators in Chapters 16 and 17, whether cryptographically secure or not, as input to the block algorithm. Stream Ciphers in Counter Mode Stream ciphers in counter mode have simple next-state functions and complicated output functions dependent on the key. This technique, illustrated in Figure 9.14, was suggested in [498,715]. The next-state function can be something as simple as a counter, adding one to the previous state. With a counter mode stream cipher, it is possible to generate the ith key bit, ki, without first generating all the previous key bits. Simply set the counter manually to the ith internal state and generate the bit. This is useful to secure random-access data files; you can decrypt a specific block of data without decrypting the entire file. 9.10 Other Block-Cipher Modes Block Chaining Mode To use a block algorithm in block chaining (BC) mode, simply XOR the input to the block cipher with the XOR of all the previous ciphertext blocks. As with CBC, an IV starts the process. Mathematically, this looks like: Ci = EK(Pi • Fi); Fi+1 = Fi • Ci Pi = Fi • DK(Ci); Fi+1 = Fi • Ci Like CBC, BC’s feedback process extends errors in the plaintext. The primary problem with BC is that because the decryption of a ciphertext block depends on all the previous ciphertext blocks, a single error in the ciphertext will result in the incorrect decryption of all subsequent ciphertext blocks. Figure 9.14 A keystream generator in counter mode. Propagating Cipher Block Chaining Mode Propagating cipher block chaining (PCBC) [1080] mode is similar to CBC mode, except that both the previous plaintext block and the previous ciphertext block are XORed with the...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online