2
$\begingroup$

In the "Introduction to Cryptography: With Coding Theory" by Trappe and Washington, in the chapter about OFB (Output Feedback) mode the authors say that:

The OFB mode produces a bit stream and it encrypts similarly to the LFSR(Linear-feedback shift register) method. The differences are that LFSR is faster, but OFB is more secure.

I don't understand why OFB operates as a LFSR. The author does not mention it. Can you explain to me ?

$\endgroup$
2
$\begingroup$

Both OFB and LFSR use the output of one iteration of the function as input for a new iteration. Furthermore, both OFB and LFSR generate a pseudo random stream of bits / bytes. This stream can be used as key stream to encrypt/decrypt data, turning the algorithm into a stream cipher.

There is a difference if the output of the last iteration is used to to perform another shift or to perform a full block encryption. Generally an LFSR is not considered cryptographically secure. So an LFSR would, by itself, not qualify as a secure stream cipher or Cryptographically Secure Pseudo Random Number Generator (CSPRNG).

The authors probably assume that you know LFSRs and try to explain that OFB is similar in how it operates. If you don't know the properties of LFSRs beforehand the comparison is probably lost on you.

$\endgroup$
0
$\begingroup$

Presumably they mean that in both cases, the output has the form $$f(\mathit{iv}) \mathbin\| f(f(\mathit{iv})) \mathbin\| f(f(f(\mathit{iv}))) \mathbin\| \dotsb,$$ where $f$ is a secret function—the LFSR update function or a block cipher $E_k$ with secret key $k$.

$\endgroup$
  • $\begingroup$ What does $iv$ represent ? $\endgroup$ – AleQuercia Oct 17 at 17:12
  • $\begingroup$ initialization vector $\endgroup$ – Squeamish Ossifrage Oct 17 at 17:15
  • $\begingroup$ And why $f$doesn't take also the plaintext ? $\endgroup$ – AleQuercia Oct 17 at 17:41
  • $\begingroup$ You combine the resulting stream by xoring it with the plaintext like a one-time pad. $\endgroup$ – Squeamish Ossifrage Oct 17 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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