[ Sometime the LATEX does not render properly. Just refresh the page and it should do. ]

OFB Encryption

OFB Decryption
Output feedback mode is similar to CFB mode except that the quantity XORed with each plain text block is generated independently of both the plain text and cipher text. An initialization vector $$s_0$$ is used as a seed for a sequence of data blocks $$s_i$$, and each data block $$s_i$$ is derived from the encryption of the previous data block $$s_{i-1}$$. The encryption of a plain text block is derived by taking the XOR of the plain text block with the relevant data block.
It is essential for security that the initial value is chosen randomly and independently from the previous ones. This prevents almost with certainty that the same initial value $$s_0$$ is used for more than one encryption.
A transmission bit error in block $$c_i$$ only affects the decryption of that block. The block recovered from $$c_i$$ has bit errors precisely where $$c_i$$ did. However, the output feedback mode will not recover from a lost cipher text block – all following cipher text blocks will be decrypted incorrectly.
The speed of encryption is identical to that of the block cipher. Even though the process cannot easily be parallelized, time can be saved by generating the key stream before the data is available for encryption.
The output feedback mode is implemented by the following algorithm
Algorithm:
bitStream ofbEncrypt(bitStream $$m$$, $$s_0$$)
divide $$m$$ into $$m_0m_1…m_l$$
for $$i \gets 1$$ to $$l$$ do
$$c_i \gets m_i \oplus {msb_r}{({E_K}({s_i}))}$$
$$x_i \gets {E_k}({s_i})$$
return $$c_1c_2…c_l$$
[ This is a part of a series of post on Modes Of Encryption. I had to scribe a lecture as a requirement of a course on the Foundations Of Cryptology at the Indian Institute Of Technology. The scribe has been broken into smaller chunks so that it is easily readable. ]
Popularity: 1% [?]



