2
$\begingroup$

I've seen that OFB is considered as a block cipher mode. But could we consider it also as a family of stream cipher?

$\endgroup$
1
  • 4
    $\begingroup$ OFB is not a block cipher but a block cipher mode. $\endgroup$
    – Mikero
    Jan 26, 2022 at 16:48

1 Answer 1

5
$\begingroup$

Output feedback (OFB) mode is a block cipher mode of operation that turns a block cipher into a synchronous stream cipher.

It is similar to CBC mode with constant encryption of zeros except that the plaintexts x-ored with the output and the output feedback as input to the next encryption. This doesn't mean that encryption is depend on the previous messages or ciphertexts, OFB is plaintext independent mode, like any stream cipher; the currently encrypted bytes don't depend on the previously encrypted bytes.

Encryption and decryption are the same;

\begin{align} C_j &= P_j \oplus O_j\\ P_j &= C_j \oplus O_j\\ O_j &= E_K(I_j)\\ I_j &= O_{j-1}\\ I_0 &= \text{IV}\\ \end{align}

Like CTR mode it produces a key stream and we don't need a PRP here, a PRF can work. However, it doesn't give random access as the CTR mode.

If we consider the stream cipher definition of Wikipedia

In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystream, to give a digit of the ciphertext stream

Yes, it is a family of stream ciphers that can be built from PRP/PRF.


It turns out that with high probability Carl M. Campbell Jr. is the inventor of the OFB mode around 1977. This was the missing point in this answer. Below is the original drawing for OFB mode.

enter image description here

$\endgroup$
0

Your Answer

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

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