📖 WIPIVERSE

🔍 Currently registered entries: 87,684건

Blowfish (cipher)

Blowfish is a symmetric-key block cipher, designed in 1993 by Bruce Schneier as a fast, free alternative to existing encryption algorithms. Notable for its speed, flexibility, and absence of licensing restrictions, Blowfish gained considerable popularity and was widely used in various applications, including password storage, e-commerce platforms, and software protection.

Blowfish is a 64-bit block cipher with a variable-length key, ranging from 32 bits to 448 bits. This variability allows users to adjust the key size based on their specific security requirements, trading off speed for stronger security. The algorithm employs a 16-round Feistel network, with key-dependent S-boxes and a complex key schedule. This key schedule involves pre-computing and storing a large number of subkeys, which contributes to the algorithm's resistance against certain types of cryptanalytic attacks.

The key schedule proceeds as follows: first, a P-array consisting of 18 32-bit entries is initialized with a fixed string, typically derived from the fractional part of pi. Then, the secret key is XORed with the P-array entries, cycling through the key as needed. Subsequently, the first block of the P-array is encrypted with the Blowfish algorithm using the current subkeys. This result replaces the first P-array block. This process is repeated for all the P-array and then repeated for four S-boxes, updating them sequentially by encrypting them with the updated P-array, creating a key-dependent transformation. This computationally intensive key schedule is part of the reason the cipher is considered more resistant to certain attacks.

The Feistel network operates by dividing the 64-bit input block into two 32-bit halves, left (L) and right (R). In each of the 16 rounds, the right half (R) is processed through a function that combines it with a subkey from the P-array and then uses the result to perform lookups in the S-boxes. The output of this function is XORed with the left half (L), and the halves are then swapped. This process is repeated for each round. After the final round, the halves are not swapped, and are combined with the last two P-array entries before producing the ciphertext.

Despite its widespread adoption, Blowfish has some limitations. The 64-bit block size makes it potentially vulnerable to birthday attacks, especially when encrypting large amounts of data with the same key. Because of this, newer ciphers with larger block sizes like AES are generally preferred for new applications. However, Blowfish remains a viable option for certain legacy systems and specific use cases where its speed and flexibility are advantageous. Its successor, Twofish, addresses some of the weaknesses of Blowfish while retaining many of its desirable properties.