How blowfish algorithm works?
The following article is highly techinical and is based on wikipedia article Blowfish is a 16 round feistel chiper that has key lenght from 32 to 448-bit and use large key dependent s boxes. Blowfish is similar to Cast 128 structuraly. In blowfish, every line represents 32 bits. Two subkey arrays are kept the 18 entry P-array and four 256-entry S boxes, which takes 8 bit input while producing 32 bit output. Every round one entry op P array is used, then the every halp of the data-block is XOR-ed with one of two entries that hasn’t been used. Blowfish’s key schedule starts by initializing the P-array and S-boxes with values derived from the hexadecimal digits of pi, which contain no obvious pattern. The secret key is then XORed with the P-entries in order (cycling the key if necessary). A 64-bit all-zero block is then encrypted with the algorithm as it stands. The resultant ciphertext replaces P1 and P2. The ciphertext is then encrypted again with the new subkeys, and P3 and P4 are repl