Encryption and decryption using Blow Fish algorithm
Abstract: Blowfish, a new secret-key block cipher, is proposed. It is a Feistel network, iterating a simple encryption function 16 times. The block size is 64 bits, and the key can be any length up to 448 bits. Although there is a complex initialization phase required before any encryption can take place, the actual encryption of data is very efficient on large microprocessors. The cryptographic community needs to provide the world with a new encryption standard. DES [16], the workhorse encryption algorithm for the past fifteen years, is nearing the end of its useful life. Its 56-bit key size is vulnerable to a brute-force attack [22], and recent advances in differential cryptanalysis [1] and linear cryptanalysis [10] indicate that DES is vulnerable to other attacks as well. If the world is to have a secure, unpatented, and freely- available encryption algorithm by the turn of the century, we need to develop several candidate encryption algorithms now. These algorithms can then be subjected to years of public scrutiny and cryptanalysis. Then, the hope is that one or more candidate algorithms will survive this process, and can eventually become a new standard. This paper discusses the requirements for a standard encryption algorithm. While it may not be possible to satisfy all requirements with a single algorithm, it may be possible to satisfy them with a family of algorithms based on the same cryptographic principles
Existing System: Advanced Encryption Standard was proposed by National Institute of Standard and technology (NIST) in order to replace DES. The only known attack to AES is the brute force attack that allows an attacker to test combination of characters in order to break the security. However, Brute Force is not an easy job even for a super computer if the number of combination is arbitrarily high.
Proposed system:
Blowfish is the most commonly used algorithm around the world, developed by Bruce Schneier, the president of Counterpane Systems, a firm that deals with cryptography and security. Blowfish is known to be the secret-key cipher that uses a variable number of bits ranging from 16 - 448 bits and encrypts the data 16 times to make it impossible for a hacker to decrypt it. Until now, no attack has been discovered to break the blowfish encryption.
Performance Comparison As far as performance comparison is confirmed, AES and blowfish perform better in comparison to others. For a data of about 256 MB, following were the results. The performance of each algorithm depends on the configuration of the system used. These tests were conducted on P4 2.1 GHZ CPU running Windows XP SP1. The above test clearly shows that Blowfish is the best of all, where the performance is very high. Also, AES had a high performance rate in comparison to DES and 3DES, and the throughput is almost 1/3 rd of them. Module Discription: Encryption Algorithm: Blowfish is a variable-length key block cipher. It is suitable for applications where the key does not change often, like a communications link or an automatic file encryptor. It is significantly faster than most encryption algorithms when implemented on 32-bit microprocessors with large data caches.
Encryption Blowfish has 16 rounds. The input is a 64-bit data element, x. Divide x into two 32-bit halves: xL, xR. Then, for i = 1 to 16: xL = xL XOR Pi xR = F(xL) XOR xR Swap xL and xR After the sixteenth round, swap xL and xR again to undo the last swap. Then, xR = xR XOR P17 and xL = xL XOR P18. Finally, recombine xL and xR to get the ciphertext.
Decryption Algorithm; The decryption algorithm of a block cipher should be identical to encryption algorithm step by step in reverse order. But for Blowfish cipher, the encryption algorithm is so well designed, that the decryption algorithm is identical to the encryption algorithm step by step in the same order, only with the sub-keys applied in the reverse order. To help us to approve the decryption algorithm, we have to write the encryption algorithm and the decryption algorithm with temporary variables. Encryption algorithm with temporary variables: Input: T: 64 bits of clear text P1, P2, ..., P18: 18 sub-keys F(): Round function