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$
  • $\begingroup$ I completely forgot blowfish's key was separate from the inputed block. It works now! $\endgroup$ – 54 69 6D Jun 30 '16 at 16:40
  • 1
    $\begingroup$ In theory yes. In practice: Why would you use a 64 bit blockcipher in 2016? $\endgroup$ – CodesInChaos Jul 1 '16 at 15:41
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, privacy policy and cookie policy

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