0
$\begingroup$

I'm trying to implement the Blowfish cipher in Output Feedback mode.

OFB mode

OFB mode has two operations, XOR and the block cipher. XOR inputs two blocks of the same length and outputs one block of the same length. Blowfish inputs two blocks of the same length and outputs two blocks of the same length.

How can XOR and Blowfish be used together if they have different outputs?

Does the Blowfish cipher work with OFB mode?

$\endgroup$
2
  • $\begingroup$ I completely forgot blowfish's key was separate from the inputed block. It works now! $\endgroup$
    – 54 69 6D
    Jun 30, 2016 at 16:40
  • 1
    $\begingroup$ In theory yes. In practice: Why would you use a 64 bit blockcipher in 2016? $\endgroup$ Jul 1, 2016 at 15:41

1 Answer 1

2
$\begingroup$

Blowfish inputs two blocks of the same length and outputs two blocks of the same length.

That is where you are running into an issue. Blowfish inputs a single 64-bit block and outputs a single 64-bit block, just like the picture shows. All the standard 64-bit compatible block cipher modes are compatible with Blowfish.

$\endgroup$

Your Answer

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

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