Wednesday, August 29, 2007

The Blowfish Encryption Algorithm - GUI




Method blowfishDecrypt The normal entry to the decryption process. It is guaranteed to be called with enough bytes in the input to carry on a decryption of one full block. Because the Blowfish cipher engine is designed to handle two 32-bit blocks, this method's purpose is to transform on entry and exit the data to/from 32-bit blocks; ie. Java.int. The input becomes two 32-bit blocks as Left and Right halves onto which the Blowfish cipher function is applied ROUNDS times in reverse order to that of the encryption.



Method blowfishEncrypt The normal entry to the encryption process. It is guaranteed to be called with enough bytes in the input to carry on an encryption of one full block. The code of the Blowfish encryption engine, found here, is also replicated in the BF_encrypt method found later. The reason for this duplication is performance. This method, outputs the result in a byte array form, suitable for the user data encryption operations, while BF_encrypt outputs its result as an int array suitable for, and used during, the expansion of the user-key into a Blowfish session key.

2 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

I just knew the basics of this encryption algorithm. Thanks for uncovering all these interesting facts about the encryption and decryption method.
digital signature software