__What is Blowfish Encryption?__ Blowfish is an another algorithm designed by Bruce Schneier in 1993 to replace DES. This symmetric cipher splits messages into blocks of 64 bits and encrypts them individually. Blowfish can be found in software categories ranging from e-commerce platforms for securing payments to password management tools, where it used to protect passwords. It’s definitely one of the more **flexible encryption methods** available.

It is known for both its tremendous speed and overall effectiveness as many claim that it has never been defeated. Meanwhile, vendors have taken full advantage of its free availability in the public domain.

__Structure of blowfish algorithm__Blowfish has a 64-bit block size and a key length of anywhere from 32 bits 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.

Here is the visual representation of this encryption algorithm.

__How it works?__

__1. Key-expansion__**The p-array consists of 18, 32-bit subkeys:**

**P1,P2,………….,P18**

**Four 32-bit S-Boxes consists of 256 entries each:**

**S1,0, S1,1,………. S1,255**

**S2,0, S2,1,……….. S2,255**

**S3,0, S3,1,……….. S3,255**

**S4,0, S4,1,…………..S4,255**

__The subkeys are calculated using the Blowfish algorithm:__

__2. Data-Encryption__

__Practical Examples of Blowfish Algorithm__**Here is the example,**

*Let’s say an embedded system wants to establish a secure data-exchange session with a laptop, perhaps over a wireless medium. At the start of the session, both the embedded system and laptop compute a private Blowfish key and public and private RSA keys. The embedded system and laptop exchange the public RSA keys and use them to encrypt and exchange their private Blowfish keys. The two machines then encrypt the remainder of their communications using Blowfish. When the communications session is over, all the keys are discarded.*

CRYPT_ALGORITHMS_ALLOW=1,2a,md5

#CRYPT_ALGORITHMS_DEPRECATE=__unix__

CRYPT_DEFAULT=2a

** References:**

1. E. Biham and A. Shamir, Differential Cryptanalysis of the Data Encryption Standard, Springer-Verlag, 1993.

2. T.W. Cusick and M.C. Wood, “The REDOC-II Cryptosystem,” Advances in Cryptology–CRYPTO ’90 Proceedings, Springer- Verlag, 1991, pp. 545-563.

3. J. Deamen, R. Govaerts, and J. Vandewalle, “Block Ciphers Based on Modular Arithmetic,” Proceedings of the 3rd Symposium on State and Progress of Research in Cryptography, Rome, Italy, 15-16 Feb 1993, pp. 80-89.

4. J.-H. Evertse, “Linear Structures in Blockciphers,” Advances in Cryptology–EUROCRPYT ’87, Springer-Verlag, 1988, pp. 249- 266.

5. H. Feistel, “Cryptography and Computer Privacy,” Scientific American, v. 228, n. 5, May 73, pp. 15-23.

**Message:** *I hope that you have enjoyed ‘ Blowfish Encryption Algorithm: [Explanation with Examples]‘ article. However, if you want me to deliver more items, then please share my post. You can use Social Sharing Widget provided at the end of every post. After all, Sharing is Caring!*