Cipher Feedback Mode

Specifications

 * message size of $$s$$
 * underlying cipher block size $$n$$

CFB Encryption
$$I_1 = IV$$

$$I_i = LSB_{n-s}(I_{i-1}) || C_{i-1}$$

$$O_i = E(I_i)$$

$$C_i = P \oplus MSB_s(O_i)$$



CFB Decryption
$$I_1 = IV$$

$$I_i = LSB_{n-s}(I_{i-1}) || C_{i-1}$$

$$O_i = E(I_i)$$

$$P_i = C_i \oplus MSB_s(O_i)$$