Blowfish
Blowfish is a symmetric block cipher designed by Bruce Schneier in 1993, using variable-length keys (32-448 bits) and 64-bit blocks; it is fast and unencumbered by patents.
Purpose
It offered a secure alternative to DES with long keys and no licensing restrictions.
Mechanism
It is a 16-round Feistel network. The key schedule builds a P-array (18 32-bit words) and four S-boxes (256 entries each), initialized from the key and fixed constants (hexadecimal digits of π). Encryption iterates the two halves through XOR with the F function.
Use cases
- Optional OpenPGP algorithm
- The underlying cipher of bcrypt password hashing
- Embedded and software encryption
- Teaching examples
Examples
- Input
key=128bit, data=8bytesOutput8-byte ciphertextThe 64-bit block is now considered small
Common errors
- The 64-bit block invites Sweet32 attacks on large data volumes
- Use AES or Twofish with 128-bit blocks
Related terms
AES
The Advanced Encryption Standard (AES) is the symmetric block cipher NIST standardized in 2001, supporting 128/192/256-bit keys, and is the de facto standard of modern encryption. GLOSSARY
Twofish
Twofish is a symmetric block cipher designed by Bruce Schneier et al. for the AES competition, using 128-bit blocks with 128/192/256-bit keys; it was one of the AES finalists. GLOSSARY
DES
The Data Encryption Standard (DES) is the symmetric block cipher standardized in 1977, using a 56-bit key and 64-bit blocks; it is obsolete due to its short key. GLOSSARY
Block Cipher
A block cipher is a symmetric cipher that encrypts and decrypts fixed-length blocks (e.g., 128 bits) and requires a mode of operation to handle arbitrary-length data. GLOSSARY