The Blowfish Cipher is a symmetric-key block cipher designed by Bruce Schneier in 1993. It was created as a fast, free alternative to older encryption standards and operates on 64-bit blocks using variable key lengths ranging from 32 bits to 448 bits. Blowfish is known for its speed in software implementations and its flexible key size, making it widely adopted in secure applications for many years.
Unlike classical substitution ciphers such as the Caesar Cipher or polyalphabetic systems like the Vigenère Cipher, Blowfish is a modern block cipher built on complex mathematical operations including substitution boxes (S-boxes), permutations, and key-dependent transformations. It is designed for computational security rather than manual encryption.
Blowfish Cipher: Encryption
Blowfish encrypts data in 64-bit blocks using a 16-round Feistel network. A Feistel network splits each block into two halves and repeatedly applies a round function that mixes data with portions of the secret key.
Plaintext Block (64-bit)
Split into: Left (32-bit) | Right (32-bit)
For 16 rounds:
Left = Left XOR P[i]
Right = F(Left) XOR Right
Swap Left and Right
After final round:
Undo last swap
Right = Right XOR P[17]
Left = Left XOR P[18]
Ciphertext Block (64-bit)The function F uses key-dependent S-box substitutions and arithmetic operations to create strong nonlinearity and diffusion.
Blowfish Cipher: Decryption
Decryption uses the same structure as encryption, but the round keys (P-array values) are applied in reverse order. This symmetry simplifies implementation while maintaining security.
Blowfish Cipher: Notes
The Blowfish Cipher was widely trusted for decades and is still considered secure when used properly, though its 64-bit block size makes it less suitable for encrypting very large volumes of data by modern standards. It influenced later designs, including its successor, Twofish.
Blowfish represents the evolution from classical hand ciphers to computational cryptography, where security relies on algorithmic complexity, key length, and resistance to cryptanalysis rather than secrecy of method.