2
$\begingroup$

How does CFB (Cipher feedback mode) self correction work? And if the initialization vector (IV) is corrupted during transmission, how will it affect encryption or decryption?

$\endgroup$

1 Answer 1

3
$\begingroup$

Depends on the type of corruption (mangled vs. lost data) and what the segment size is.

If you use a segment size equal to the block size, which is most efficient from a computational point of view, you can recover from corruption that changes data. However, you cannot recover from dropped bytes unless you happen to fall on the same block boundary – i.e. the dropped data is a multiple of the block size.

Recovery is based on the fact that to decrypt a block of data you only need that block's ciphertext and the previous block's. This is similar to CBC. The "advantage" (see below) CFB has is that you can use a segment size of a single byte and recover from any number of dropped bytes. In that case to decrypt a byte you only need the ciphertext of a sliding window up to that byte and its alignment does not matter. You could even do that with bits if you wanted to.

However, in practice such error recovery is not very useful. Indeed, we usually want to use authentication and discard any message that has changed in transit. Otherwise an attacker could be able to change the message, even if only in random ways.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.