A Comparative Study Of Two Symmetric Encryption Algorithms Across Different Platforms.
Dr. S.A.M Rizvi1 ,Dr. Syed Zeeshan Hussain2 and Neeta Wadhwa3 Deptt. of Computer Science, Jamia Millia Islamia, New Delhi, India
Abstract : The world of digital communications is expanding day by day, For secure communications over the unsecure mediums, Cryptography plays a crucial role and Symmetric Encryption algorithms do the real part of encoding data before transmission.
The deep analysis of their security and speed become the necessity of safe digital communication.
In this paper, we study the two popular symmetric cryptographic algorithms BLOWFISH and CAST. We analyze their security issues and then compare their efficiency for encrypting text, image and sound with the official encryption standard AES(Advanced Encryption Standard) across different widely used Operating Systems like Windows XP, Windows Vista and Windows 7. The simulation results reveal Which algorithm performs better on Which Operating system for encrypting What kind of data.
Keywords: BLOWFISH, CAST, Symmetric Encryption.
1 Introduction
Cryptography is the art and science of encoding data so that it can travel to any place without threat of being theft in the way. This science is basically categorized in two categories : Symmetric and Asymmetric. Symmetric Cryptography is to encode and decode data with one and the same key whereas Asymmetric Cryptography works with a pair of key, one key is to encode the data and with the other we can decode. Further Symmetric Ciphers are of two kinds : Block and Stream. Block ciphers encrypts a fixed block of bits at a time and Stream ciphers encrypts bit by bit. Block ciphers are one of the fundamental building blocks for cryptographic systems[1].
The life cycle of Symmetric Cryptography mainly starts from the birth of DES(Data Encryption Standard). In 1977 ,IBM’s submission LUCIFER (Feistel), adopted as DES[2] by NBS(National
Bureau of Standards) now NIST( National Institute of Standards and Technology). Since its evolution, many cryptanalysts have attempted to break it and finally DES encrypted message was cracked in only 22 hours in 1998. Then again there was a need of a new encryption standard, NIST put out a call and 15 algorithms were selected as the first round finalists ,CAST was one of them. In second round out of 5 one was Twofish which is the descendant of Blowfish.
Finally , Rijndael won the competition and become AES(Advanced Encryption Standard) in 2001[3].
In this paper we do the comparative analysis of Blowfish and CAST with the AES on different latest platforms like Windows XP, Windows Vista and Windows7. This analysis shows which algorithm is best suited in which environment.
The rest of the paper is organized as follows: section II gives the brief review of the algorithms and discuss their security issues; section III outlines the related work ; section IV describes the implementation details and shows the simulation results; finally, the conclusions and future work is followed in section V.
2 Overview of Algorithms 2.1 Blowfish
Blowfish was designed in 1994 by Bruce Schneier, it works on 64-bit units with key lengths from 32-bits up to 448-bits [4] .Each 64-bit block is divided into two 32-bit words, it encrypts every block by performing 16 rounds of encryption. Basically the algorithm consists of two parts: a key-expansion part and a data- encryption part. Key expansion converts a key of at most 448 bits into several subkey arrays totaling 4168 bytes. The time-consuming subkey- generation process adds considerable complexity for a brute-force attack. The subkeys are too long to be
stored on a massive tape, so they would have to be generated by a brute-force cracking machine as required.
Exhaustive search of the keyspace could be the effective way of breaking it, because designer himself admit the existence of weak keys. But so far no one has succeeded in breaking full strength Blowfish encryption. It is unpatented and license- free, means Blowfish is a fast, secure and free alternative encryption method.
2.2 CAST
CAST is the first round finalist of AES competition.
It is developed by Carlisle Adams and Stafford Taveres in canada, it uses 64-bit block for 64-bit and 128-bit key size variants and 128-bit block sizes for the 256-bit key version. The complete specification of CAST algorithm is given in [5].
It uses an f-function that produces a 32-bit output from a 32-bit input, and each round consists of modifying one 32-bit quarter of the block by XORing it with the f-function of another 32-bit quarter of the block. There are 48 rounds in total, which are organized in groups of four, called quadrounds.
Encryption begins with six forwards quadrounds, and then continues with six reversed quadrounds, which are reversed exactly as would be necessary for decryption. Means, for decrypting data, it is only necessary to change the order in which the subkeys are used.
CAST cipher can be broken up to only 5-round.
However, if the degree of the round function is lower, the CAST cipher could be broken up to more number of rounds[6]. CAST encryption procedure has been under rigorous analysis among cryptanalysts for the last 10 years . Minor weaknesses have been found like non-surjective attack, HOD attack but nothing extendable beyond 5-6 rounds.
2.3 AES
AES has Non-Feistel structure, based on a sophisticated mathematical design. It’s simple structure attracts cryptographers and cryptanalysts. It encrypts 128 bit block size with 128/192/256 bit key for 10/12/14 rounds.
The complete specification and the above structure of AES encryption scheme is given in [3]. No one can
break it beyond 5-6 rounds with today’s computational power.
3 Related Work
In research of [7-8] CAST ciphers with random S- boxes are proposed. It is shown that when randomly generated S-boxes are used, the resulting cipher is resistant to both differential and linear attack .
A Crypto++ Library [9] analyze some common encryption algorithms. It showed that Blowfish and AES have the best performance compared with other encryption algorithms.
Nadeem and Kader, did performance evaluation of few symmetric encryption algorithms like AES, DES, and 3DES, RC6, Blowfish and RC2. They concluded from the simulation results that Blowfish has better performance as compared to other encryption algorithms for different file size, followed by RC6.
AES has better performance than RC2, DES, and 3DES. 3DES still has low performance compared to algorithm DES. RC2 is the slowest. However they conducted the experiments on only one platform:
Windows OS[10-11].
Krishnamurthy in [12] demonstrated the energy consumption of different common symmetric key encryptions on hand-held devices.
Salama and Elminaam have done a comparison between encryption algorithms (AES, DES, and 3DES, RC2,Blowfish, and RC6) at different settings like different sizes of data blocks, different data types, CPU time, and different key size. The algorithms were tested on two different hardware platforms. The results indicated that the Blowfish had more efficient compared to other algorithms. And AES had a better performance than 3DES and DES[13].
The study in[14] tested the encryption algorithms such as RC4, AES and XOR to find out the overall performance of real time video streaming. The results showed that AES has less time ovrhead than the overhead using RC4 and XOR algorithm. So, AES is more efficient to secure real time video transmissions.
Most of the above parallel research focus on performance analysis of different symmetric encryption algorithms on different settings for various kinds of input data with different modes. In this paper , we are analyzing Blowfish and CAST on 3 different Operating Systems for encrypting 3 kinds of data :text ,image and sound.
4 EXPERIMENTAL DESIGN
We implemented the algorithms according to their standard specifications in .Net environment
using C#, and a tool has designed, which calculates the encryption time in ms(milli seconds) of each algorithm .The no. of different types of files like text file, images and audio files have been encrypted with the designed tool and their execution time is calculated.
For our experiment, we use three laptops of 32bit configuration:
1. Intel Pentium® Dual Core with Windows XP.
2. Intel Pentium® Dual Core with Windows Vista.
3. Intel Pentium® Dual Core with Windows 7.
The tool’s front end look like as:
We encrypt 60 text files of size ranges between 500KB to 50MB, 60 images ranges between 20 KB to 200KB, 60 audio files ranges between 2- 50MB.
First we tabulated their encryption time in ms(milli seconds) and then calculated their mean execution speed in MB/sec (MegaBytes per second) .
Table 1: Encryption Speed ( in MB/sec) of BLOWFISH, CAST and AES on
different OS for text data
OS Encryption
Win XP
Win Vista
Win 7
BLOWFISH 18.3 15.1 11.1
CAST 11.8 10.7 10.5 AES 14.2 12.4 11.3
Figure 1: Execution speed for encrypting text data:
Comparison between different OS
Table 2: Encryption Speed ( in KB/sec) of BLOWFISH, CAST and AES on
different OS for image data
OS Encryption
Win XP
Win Vista
Win7
BLOWFISH 12.3 10.8 10.1 CAST 9.2 5.4 5.1
AES 6.7 4.8 4.3
Figure 2: Execution speed for encrypting image data:
Comparison between different OS
Table 3: Encryption Speed ( in KB/sec) of BLOWFISH, CAST and AES
on different OS for audio data
OS Encryption
Windo ws XP
Win Vista
Win 7
BLOWFISH 16.5 15.6 14.7 CAST 18.7 17.2 16.4 AES 17.8 16.6 15.8
Figure 3: Execution speed for encrypting audio data:
Comparison between different OS
5 Conclusion
For Text data :
All algorithms run faster on Windows XP , but Blowfish is the most efficient and CAST runs slower than AES.
For Image data :
Blowfish encrypts images most efficiently on all 3 platforms, even CAST runs faster on Windows XP than AES. But on Windows Vista and Windows7, AES and CAST perform at the similar speed .
For Sound data:
CAST performs better than BLOWFISH and AES on Windows XP for encrypting audio files, but on Windows Vista and Windows7, there is no significant difference in performance of CAST and AES, however BLOWFISH encrypts audio filles at less speed.
In future , we try to incorporate good features of BLOWFISH and CAST in a single algorithm, which can perform well on all latest platforms for all types of data.
References
[1] B.Schneier, Practical Cryptography,Wiley, 2003.
[2] W. Diffie, M. Hellman, “Exhaustive cryptanalysis of the NBS data encryption standard,” Computer, p.
74-78, June 1977.
[3]. J. Daemen and V. Rijmen, “ AES Proposal:
Rijndael” ,1999.
[4]. B. Schneier, "The blowfish encryption algorithm -one year later," Dr. Dobb 's Journal, 1995.
[5]. C.M.Adams, “The CAST-128 Encryption Algorithm," Request for Comments (RFC) 2144, NetworkWorking Group, Internet Engineering Task Force, May, 1997.
[6]. Shiho Moriai, Takeshi Shimoyama, “Higher Order Differential Attack of a CAST Cipher”, S.
Vaudenay (Ed.): Fast Software Encryption FSE'98, LNCS 1372, pp. 17-31, 1998, Springer-Verlag Berlin Heidelberg 1998.
[7]. H.M.Heys and S.E.Tavares, “On the security of the CAST encryption algorithm" ,Canadian Conference on Electrical and Computer Engineering, pp.332-335, 1994.
[8] J. Lee, H. Heys, and S.Tavers, “Resistance of a CAST-like Encryption Algorithm to Linear and Differential Cryptanalysis”, Designs, Codes, and Cryptography,vol. 12,no.3,pp.267-282,1997.
[9]. Results of Comparing Tens of Encryption Algorithms Using Different SettingsCrypto++
Benchmark, Retrieved Oct. 1, 2008.
(http://www.eskimo.com/weidailbenchmarks.html).
[10]. A. Nadeem and M. Y. Javed, “A performance comparison of data encryption algorithms,"Information and Communication Technologies, ICICT 2005, pp.84-89, 2005.
[11]. W.S.Elkilani, "H.m.Abdul-Kader, "Performance of Encryption Techniques forReal Time Video Streaming, BIMAConference, Jan 2009, PP 1846- 1850.
[12]. N. Ruangchaijatupon and P.
Krishnamurthy,“Encryption and power consumption in wireless LANs-N,"The Third IEEE Workshop on Wireless LANs, pp. 148-152,Newton, Massachusetts, Sep. 27-28,2001.
[13] D. Salama, A. Elminaam and etal, "Evaluating The Performance of Symmetric Encryption Algorithms", International Journal of Network Security, Vo1.10, No.3, PP.216-222, May2010.
[14] W.S.Elkilani, "H.m.Abdul-Kader, "Performance of Encryption Techniques forReal Time Video Streaming, BIMAConference, Jan 2009, PP 1846- 1850.