# Performance And Security Enhancement Using Blowfish Algorithm Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In this world, whatever information that we send can easily be cracked by any third party by intruding it. This obviously results us in a condition to rely upon the science of preserving secrecy and security to our message. This can be very much achieved via a strong encryption algorithm. Blowfish block cipher is one of its kind which still remains as one of the strong encryption algorithm. It also has a comfortable design which suits for any enhancement or modification in its structure. This is one such work which enhances the performance and provides even a bit more security to the already existing Blowfish Algorithm and it is proved and justified experimentally.

Keywords: Block cipher, Blowfish, F-Function, Security, Performance.

## INTRODUCTION

Cryptography is a well known and widely used technique that manipulate information in order to crypt their existence. More speciï¬cally, cryptography protects information by transforming it into an unreadable format [1]. The original text is transformed into a scramble equivalent text called cipher text and this process is called as "Encryption". This is achieved via an Encryption Algorithm. Only those who possess a secret key can decrypt the cipher text into plaintext. Simply it scrambles a message so it cannot be understood.

Cryptography is the study and practice of protecting information by data encoding and transformation techniques [1].There are two types of cryptographic schemes available on the basis of key.

1. Symmetric key Cryptography: This is the cryptographic scheme which uses a common key for enciphering and deciphering the message.

2. Assymetric or Public Key Cryptography: This type of cryptographic scheme uses two keys for encryption and decryption called Public key and Private Keys.

We adopted Symmetric key cryptographic scheme and hence only one key is needed for communication. So, the chosen cryptographic scheme involves,

1. Plaintext: The original message that has to be communicated to receiver.

2. Encryption: Enciphering of data by using a key via a desired encryption algorithm at sender side.

3. Transmission: Transfer of cipher message to receiver through a public communication channel.

4. Decryption: Deciphering of the ciphertext thus received via the same algorithm (reverse Encryption) by using the key.

## Fig 1: Symmetric Key Cryptography

We can also classify symmetric key cryptography into two types on the basis of their operations as

1. Stream Ciphers: It is a symmetric key cipher where plaintext bits are combined with a pseudorandom cipher bit stream (key stream), typically by an exclusive-or (xor) operation. In a stream cipher the plaintext digits are encrypted one at a time

2. Block Ciphers: It is also a symmetric key cipher operating on fixed-length groups of bits, called blocks. A block cipher encryption algorithm takes a n-bit block of plaintext as input, and produces a corresponding n-bit output block of ciphertext.

We have chosen block cipher for our cryptographic operation since it is the main tool for implementing private key encryption in practice.

## Blowfish Algorithm:

Blowfish, a symmetric block cipher that uses a Feistel network, iterating simple encryption and decryption functions of 16 times each. The block size is 64 bits, and the key can be any length up to 448 bits.the strength of the Blowfish algorithm relies on its sub-key generation and its encryption. Blowfish is a block cipher which uses a variable-length key . It is well fitted for applications in which the key size doesnot 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.

Blowfish cipher uses 18 each of 32-bit sun arrays commonly known as P-boxes and four Substitution boxes each of 32 bit size and having 256 entries each. It uses a Feistel cipher which is a general method of transforming a function into an another function by using the concept of permutation.The working of blowfish cipher can be illustrated as follows,

It splits the 64 bit block into two equal blocks having 32 bit size each. Lest block is XORred with first sub array P1 and thus obtained result is fed in to a function called F-function.Inside theF-function substitution operations are carried out which inturn converts 32 bit blocks in to an another 32 bit blocks.Thus resulted 32bit entries are XORed with the Right half and the result obtained is swapped as the left half for the next round.So, After the successful completion of each round Right half becomes the new left half or vice versa and fiestal structure is followed upto 16 rounds.The resultant left and right halves are not swapped but XORed with the seventeenth and eighteenth P-arrays.The fiestal Structure of blowfish algorithm is shown in the Fig-2

Fig 2: Fiestal structure of Blowfish Cipher

The transformation operations that actually happen inside an F-function are XOR Operation, ADD Operation and few table look up operations. These operations are carried out between four S-Boxes and as a result of all manipulations finally 32 bit entries are transformed into an another 32 bit entries.F-Function of a Blowfish algorithm can be depicted pictorially in Fig-3.

Fig 3: Structure of F-function

## Proposed System:

We proposed a system which actually brings some modification to the already existing Blowfish Algorithm in terms of its design. Since F-Function Plays a dominant role in Blowfish encryption it is decided to modify the F-function without changing its basic functionalities. The original F-function works algorithmically as,

32 Bit Addition of S-box 1 and S-box 2.

32 Bit XOR of result of step 1 and S-box 3 .

The result of step 2 is then XOR with S-4.

But we modify the order of execution of F-Function such that,

32 Bit XOR of S-box 1 and S-box 2.

32 Bit XOR of result of S-Box 3 and S-box 4 .

32 Bit Addition of the results of step 1 and 2.

Our Proposed system can be diagrammatically represented as,

Fig 4: Existing F-Function Fig 5: Modified F-Function

The Blowfish algorithm is enhanced both in terms of performance as well as security and they are as follows,

The Performance is enhanced because of the execution of steps 1 and 2 in the modified execution of F-function concurrently by performing multithreading and it is proved and justified.(Refer Simulation Results)

The execution time of Blowfish algorithm is approximately reduced upto 13.5% on comparing with the original Blowfish Algorithm.

Although, we used 2-XOR gates and 1-ADDER but the original F-function uses 2-ADDERs and 1-XOR gate and there is no abrupt change in the execution time or clock cycles required for execution. This is because all fundamental logical operations like AND,OR,XOR takes more or less equal time when running under any programming languages since those languages are logically driven.

It's quite hard for the eavesdroppers to realize that the F-function is modified and hence probability of attack is less on comparing with the original Blowfish algorithm.

Since our proposed system bring modifications only to the order of execution and no changes is made to the actual functionalities ( i.e., we didn't added or removed new operations rather we changed only the order of execution of existing Xor and Adders ) so performing cryptanalysis is not necessary.

## 4 Simulation and Results:

We simulated our modified blowfish system in Java since it is better suitable for its platform independent features, user friendly GUI Features and so on than any other programming languages.

Fig 6:Blowfish Encryption Fig7:Blowfish Decryption

Time Vs

Algorithm

Start Time

(ms)

End Time

(ms)

Elapsed Time (ms)

Original

Blowfish Algorithm

1289281669804

1289281670225

499

Modified blowfish algorithm

1289282873275

1289282873706

431

Table 1 :Comparison of Execution Time

Thus it is experimentally proved that the execution time of modified blowfish algorithm is 13.5% lesser than the original algorithm.

## 5 Future Enhancements:

The execution time of blowfish algorithm can be further reduced and hence the performance is improved more by adopting the concepts of parallelism which results in the execution of f-Function in parallel environment. Our current future works are concentrated on reducing the execution time f the algorithms if the operations of f-function is executed in a parallel.

## 6 Conclusion :

In this paper we have presented a novel method enhancing security and performance of Blowfish algorithm by using the concept of Multithreading. We have proven that this approach is both an effective Cryptographic method with respect to time as well as a theoretically unbreakable one since the function is modified and hence hard to guess it .Our experimental results proves and justifies that with the commercially available computers the time taken for encryption and decryption process is negligible and we conclude that it has a good performance without compromising the security.