I'm using the Blowfish block cipher to encrypt messages of 64 bit without using any block cipher mode of operation. Can I still have a collision?

I'm asking this to understand if Blowfish is susceptible to the birthday attack when used on plaintexts of 64 bit.

  • $\begingroup$ What specifically is your goal? What do you need your construction to achieve? $\endgroup$
    – Ella Rose
    May 11 '18 at 13:17
  • $\begingroup$ I would like to understand if the birthday attacks is applicable to the use of blowfish on messages of 64 bits, without using operaitonl mode $\endgroup$ May 11 '18 at 13:19
  • $\begingroup$ I'm asking this to understand if blowfish used on plaintexts of 64 bit is susceptible to the birthday attack. In other words, the birthday attack is a problem only when using blowfish for longer messages that require the use of operational modes such as CBC? $\endgroup$ May 11 '18 at 13:20
  • 1
    $\begingroup$ n-bit block ciphers can't have collisions with no mode of operation. Inputs are n bits, outputs are n bits, and encryption is reversible. It's therefore a bijective function. Bijective functions can't have collisions. So no. If you do any truncation or other lossy transformations on the output then yes. $\endgroup$ May 11 '18 at 18:12
  • $\begingroup$ The birthday attack is relevant to a block cipher on a sequence of distinct inputs because they are all unique, enabling an adversary to distinguish them from a uniform random sequence of blocks: a sequence of $2^{32}$ 64-bit blocks chosen uniformly at random is nearly guaranteed to have a collision, but a sequence of $\operatorname{Blowfish}_k(x_i)$ on distinct $x_i$ is guaranteed not to have a collision. Also, what are you doing with Blowfish in this century except to maintain compatibility with an existing protocol? $\endgroup$ May 12 '18 at 13:26

No, you cannot, unless you have repeated messages, or use different keys. A block cipher such as Blowfish is a keyed random permutation or bijective mapping.

That means for each key any plaintext block is mapped to exactly one ciphertext block during encryption, and the ciphertext block is mapped to that particular plaintext block during decryption.

For different keys there are different mappings. So if you mix keys you may get a collision.


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.