## ⓘ Blowfish (cipher)

In cryptography, Blowfish is a keyed, symmetric block cipher, made in 1993 by Bruce Schneier and since 1993 has been included in a large number of encryption products. Blowfish has a good encryption rate in software and until 2008 no cryptanalytic attack model of it has been found. However, the AES block cipher algorithm now has more attention.

Schneier made Blowfish as a general-purpose algorithm, to be used as a replacement for the old DES algorithm and to remove the problems and difficulties of other encryption algorithms. At the time Blowfish was released, many other algorithms were proprietary, or were secrets. Schneier has said that, "Blowfish is unpatented, and will remain so in all countries. The algorithm is hereby placed in the public domain, and can be freely used by anyone."

Main features of the design include key-dependent S-boxes and a very complex key schedule. Blowfish is one of the fastest block ciphers used by many people, except when changing keys. Each new key needs to be pre-processed which takes the same time as encrypting about 4 kilobytes of text, which is very slow compared to other block ciphers. This stops its use in certain applications such as in the smallest embedded systems like the early smartcards, but it is not a problem in other applications. In one of the applications, it is actually good: the password-hashing method used in OpenBSD uses an algorithm that comes from Blowfish which makes use of the slow key schedule; the idea is that the extra computational effort required gives protection against dictionary attacks. See key strengthening.

Blowfish has a 64-bit block size and a variable key length from 0 up to 448 bits It is a 16-round Feistel cipher and uses large key-dependent S-boxes. It is similar in structure to CAST-128, which uses fixed S-boxes.

In 1996, Serge Vaudenay found a known-plaintext attack needing 2 8 r + 1 known plaintexts to break, where r is the number of rounds. Moreover, he also found a class of weak keys that can be detected and broken by the same attack with only 2 4 r + 1 known plaintexts. This attack cannot be used against the regular Blowfish; it assumes knowledge of the key-dependent S-boxes. Vincent Rijmen, in his Ph.D. papers, introduced a second-order differential attack that can break four rounds and no more. Still there is no known way to break the full 16 rounds, apart from a brute-force search. A sign extension bug in one of the published C code has been found in 1996.

There is no good cryptanalysis on the full-round version of Blowfish known publicly till 2008. However, in 2007, Bruce Schneier noted that while Blowfish is still in use, he recommended using the new Twofish algorithm instead

## 1. Notes and references

- Serge Vaudenay, "On the weak keys of Blowfish," Fast Software Encryption FSE96, LNCS 1039, D. Gollmann, Ed., Springer-Verlag, 1996, pp. 27–32.
- Vincent Rijmen, "Cryptanalysis and design of iterated block ciphers", doctoral dissertation, October 1997.
- Bruce Schneier, Description of a New Variable-Length Key, 64-bit Block Cipher Blowfish. Fast Software Encryption 1993: 191-204.

## 2. Other websites

- Official Blowfish website
- List of products using Blowfish
- Blowfish Java implementation LGPL Archived 2008-10-13 at the Wayback Machine
- SCANs entry for Blowfish
- Blowfish PHP and JavaScript implementation with online demo
- Blowfish PHP implementation
- Blowfish JavaScript implementation and Page Encryption

Advanced Encryption Standard |

Avalanche effect |

Caesar cipher |

Chosen-ciphertext attack |

Cleartext |

Code |

Cryptographic hash function |

Cryptographic protocol |

Cypher |

Diffie-Hellman key exchange |

Digital signature |

Encryption |

Feistel cipher |

International Data Encryption Algorithm |

IPsec |

Kerberos (protocol) |

Kerckhoffss principle |

Key derivation function |

Needham-Schroeder protocol |

One-time pad |

Plaintext |

Pretty Good Privacy |

Proof-of-work system |

RC2 |

RC4 |

RC5 |

RC6 |

Secret sharing |

SHA hash functions |

Session key |

SP-network |

Stream cipher |

Substitution cipher |

Symmetric-key algorithm |

Transport Layer Security |

Triple DES |

Twofish |

Weak key |