[ 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
is used as a seed for a sequence of data blocks
, and each data block
is derived from the encryption of the previous data block
. 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
is used for more than one encryption.
A transmission bit error in block
only affects the decryption of that block. The block recovered from
has bit errors precisely where
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
,
)
divide
into 
for
to
do


return 
[ 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. ]


, the mathematical formula for CBC encryption is 

at random prevents almost with certainty that the same initial value
. Then, an eavesdropper can immediately detect whether the first
. Encryption in the cipher-block chaining mode is implemented by the following algorithm
at random


into 

. The block recovered from
is decrypted correctly. The cipher block chaining mode is self synchronizing, even if one or more entire blocks are lost. A lost ciphertext block results in the loss of the corresponding plaintext block and errors in the next plaintext block.
is applied for decryption. Hence, both modes are also applicable with public key encryption methods, where the computation of
can be easily computed by everyone.


. We fix a key
, and denote the encryption function with this key as 
. The individual blocks are encrypted iteratively.
need not equal
Recent Comments