A Performance Comparison of Data Encryption Algorithms
A Performance Comparison of Data Encryption Algorithms
Part of the Databases and Information Systems Commons, and the Theory and Algorithms Commons
Recommended Citation
Nadeem, A., & Javed, D. Y. (2005). A Performance Comparison of Data Encryption Algorithms.
International Conference on Information and Communication Technologies. Retrieved from
https://ir.iba.edu.pk/icict/2005/2005/33
This document is brought to you by iRepository. For more information, please contact [email protected].
https://ir.iba.edu.pk/icict/2005/2005/33
84
0-7803-9421-6/05/$20.00 ©2005 IEEE.
Published by iRepository, 2022
Authorized licensed use limited to: Trial User - Institute of Business Administration Karachi. Downloaded on May 10,2023 at 06:10:30 UTC from IEEE Xplore. Restrictions apply.
https://ir.iba.edu.pk/icict/2005/2005/33
Although the DES standard is public, the design 1. 128-bit block size
criteria used are classified. There has been 2. 128, 192, or 256 bit key size
considerable controversy over the design, 3. an iterative rather than a Feistel cipher
particularly in the choice of a 56-bit key [1]. (like IDEA)
4. treats data as 4 groups of 4 bytes
B. Triple DES (3DES) 5. has 9, 11, or 13 rounds, where each
round consists of:
The triple DES (3DES) algorithm was needed as * a byte substitution step (1 S-
a replacement for DES due to advances in key box used
searching. 3DES is a proposal based on the * on every byte)
existing DES, and was standardized in ANSI * a shift rows step (shuffle the
X9.17 & ISO 8732 and in PEM for key bytes
management. It was also proposed for general * between groups)
EFT standard by ANSI X9 [1]. It is backwards * a mix columns step (matrix
compatible with existing single DES (when * multiplication of groups with
K1=K2=K3). The 3DES algorithm uses either each
two or three 56-bit keys. Thus the effective key * other)
length is up to 168 bits. 3DES is defined by the * an add round key step
following function: 6. all operations can be combined into xor
C = DESK3 {DES-i and table lookups - hence
K2{DESKl(P)}
implementation can be very fast and
efficient.
where P = Plaintext D. Blowfish
C = Ciphertext
DESK= DES encryption using key K Most of the encryption algorithms today are
DES-i
K= DES decryption using key K unavailable to the public - many of them are
protected by patents (e.g. Khufu, REDOC II, and
C. Advanced Encryption Standard (AES) IDEA), or being kept secret by the governments
(e.g. Skipjack and Capstone are protected by the
In September 1997, US NIST announced a call U.S. government). Many of the other algorithms
for candidate ciphers for its new Advanced are available only in part (e.g. RC2, RC4, and
Encryption Standard (AES), because clearly a GOST). Bruce Schneier - one of the world's
replacement for DES was needed at that time [2]. leading cryptologists, and the president of
The candidate ciphers were to be submitted by Counterpane Systems, a consulting firm
June 1998, and a finalist was selected in October specializing in cryptography and computer
2000. In total 15 candidates were accepted in security - designed the Blowfish algorithm [5]
June 98 (6 were rejected as incomplete), and 5 and made it available in the public domain.
were short-listed in August 99. Finally, Rijndael Blowfish is a variable length key, 64-bit block
was selected as the AES finalist in October 2000. cipher. It was his intent from the outset of
creating this new encryption algorithm to
NIST has released all submissions and provide the world with a new encryption
unclassified analyses. The AES candidates are standard. The Blowfish algorithm was first
the latest generation of block ciphers, and have a introduce in 1993, and has not been cracked yet.
significant increase in the block size - from the It is also noteworthy to point out that this
old standard of 64-bits up to 128-bits; and keys algorithm can be optimized in hardware
from 128 to 256-bits. In part this has been driven applications, although it, like most other ciphers,
by the public demonstrations of exhaustive key is often used in software applications.
searches of DES & RC-5 (at 64-bits).
After exhaustive analysis and evaluation rounds, III. IMPLEMENTATION DETAILS
Rijndael, designed by Rijmen & Daemen in
Belgium [4], was selected as AES finalist [3]. It The Java platform (JDK 1.4) was used to
has the following attributes: implement the above algorithms. The following
85
86
Published by iRepository, 2022
Authorized licensed use limited to: Trial User - Institute of Business Administration Karachi. Downloaded on May 10,2023 at 06:10:30 UTC from IEEE Xplore. Restrictions apply.
https://ir.iba.edu.pk/icict/2005/2005/33
was to measure the encryption times of key algorithms are in the following order, as
algorithms, the initialization and key set-up regards their performance:
times were excluded from the comparison. Also, 1. Blowfish (fastest)
because decryption time is generally the same as 2. DES
encryption time for almost all the algorithms, 3. AES
therefore only the encryption times were 4. Triple DES (slowest)
measured.
In general, the performance of a block cipher
C. Performance Results for Block Ciphers varies with the block size and the key size. The
larger the block size, the faster will be the
The execution results of secret key algorithms in algorithm, because with a larger block size, a
ECB (Electronic Codebook) mode are presented large chunk of the data will be encrypted in a
first. These results are shown Table 1 and Table single execution cycle of the algorithm. With a
2, for execution of code on a Pentium-I1 266 smaller block size, the same size of input data
MHz machine, and Pentium-4, 2.4 GHz would require more execution cycles of the
machine respectively. algorithm, thus increasing the overall encryption
time other things being equal. Likewise, a larger
Table 1: Comparative execution times (in key results in a slower algorithm, because in
seconds) of secret key algorithms in ECB general, all bits of the key are involved in an
mode on a Pentium-l 266 MHz machine execution cycle of the algorithm. With a smaller
.i! DO 90ESi AS BF key, a lower number of key bits are involved,
thus reducing the time to complete one execution
20,W 24 72 39 19 cycle.
0w 48 123 74 35
. 1 5 ,
158 94
5982 74 202 126 53
69' 646
i371325 16
83 243
461
.143
235
6
136
D. Performance Results for Stream Ciphers
15.8959 19 543 324 158
i5 198 569 355.62 In this section, the results of execution of the
; 1 83- 227 655 378 176 secret key algorithms in CFB mode are
.232 276 4M6
79 219
Av.rape presented. Tables 3 and 4 give execution times of
time 134 383 228 108 these algorithms on Pentium-Il 266 MHz, and
Pentium-4, 2.4 GHz platforms respectively.
8yaiw1.35 20 491 ..
An obvious way to compare the performance of stream cipher also varies with the block size and
these algorithms is to take average of execution the key size, but the effect of a larger block size
times for each algorithm, and rank them is reversed. The larger the block size, the slower
accordingly. Using this criterion, it is apparent will be the algorithm, because with a larger block
from Tables 1 and 2 that the four symmetric size, the algorithm will have to do more work for
87
Published by iRepository, 2022
Authorized licensed use limited to: Trial User - Institute of Business Administration Karachi. Downloaded on May 10,2023 at 06:10:30 UTC from IEEE Xplore. Restrictions apply.
https://ir.iba.edu.pk/icict/2005/2005/33
the same amount of input data (a bit or a byte) in rounds needed to make a brute force key search
a single execution cycle of the algorithm. With a the most efficient form of attack. This is a
smaller block size, the same size of input data controversial suggestion that some cryptologists
would be encrypted more efficiently, thus do not accept even in principle. Therefore, it is
decreasing the overall encryption time other proposed to look at this as follows:
things being equal.
* the principle of measuring performance
Table 4: Comparative execution times of of an algorithm by timing the minimum
secret key algorithms in CFB mode on a number of secure rounds for each
Pentium-4, 2.4 GHz machine algorithm is useful, but
. tuL DES DES AS BF * there is no easy way of obtaining
impartial and widely accepted values
.
36.002
17
30 9.
58 62.
94
1
23
for the minimum number of secure
911 41 130 1C25 33 rounds for each algorithm.
59,862 52 181 174 46
9,64 9 2 200 53 However as an AES algorithm contributor, Eli
Jt5 129 401 409 1
158,959 15 472 473 122 Biham is not seen as an impartial observer and it
166.354 159 488 489 t30 would hence be preferable to have a wider
191383 185 568 567 148 community basis for setting the values to be used
232t98 229, 681 587 184
in such a process.
Averag
time 105 328 328 Be
A. Implementation and Security Issues
BytaIec 1i 55 341 341 1300
There are a significant number of algorithms that
The effect of a larger key in a stream cipher is are considered to be secure at an algorithm level.
the same as in a block cipher, i.e. it slows down In practice, however, most failures in
the encryption, because in general, all bits of the cryptographic systems derive not from
key are involved in an execution cycle of the weaknesses in the algorithms used but rather
algorithm. With a smaller key, a lower number from the exploitation of subtle flaws in the way
of key bits are involved, thus reducing the time the algorithms are implemented or through the
to complete one execution cycle. exploitation of interactions between algorithm
implementations and the environments in which
they operate. This means that it is vital to judge
V. PERFORMANCE VS. SECURITY TRADE- implementations not simply from the perspective
OFFS of the performance that they provide but also
from the perspective of implementation
The work presented here is primarily about assurance i.e. can one be confident that the
performance but it does not seem sensible to implementation does what the algorithm
consider this in complete isolation from security requires, no more and no less, and can one also
since there are inevitably trade-offs between be confident that it does not interact with the
these attributes in the real world scenario. One wider environment in ways that can be exploited
obvious example is the number of rounds to undermine the security that the algorithm
employed by each algorithm - a large number of itself is otherwise capable of providing. To
rounds make the algorithm slower but are answer these questions much more hard evidence
supposed to provide greater security [6]. needs to be derived from the implementation of
the algorithms in environments that are
Likewise, the quality of each round in achieving representative of practical use. In particular,
the mixing that the cipher is intended to provide there is very little evidence at the moment of
is also a factor that affects performance of an how the algorithms behave in low-end
algorithm. Thus, there is always a trade-off environments of the kind that may apply in much
between security and performance in similar of electronic commerce and consumer
algorithms - such as symmetric key algorithms. applications.
Eli Biham [7] has suggested that performance of
algorithms should be measured by timing the There is also a need to understand whether the
minimum number of secure rounds for each different algorithms are architecturally different
algorithm - that is the estimated number of in their ability to support implementation
88
Published by iRepository, 2022
Authorized licensed use limited to: Trial User - Institute of Business Administration Karachi. Downloaded on May 10,2023 at 06:10:30 UTC from IEEE Xplore. Restrictions apply.
https://ir.iba.edu.pk/icict/2005/2005/33
89
Published by iRepository, 2022
Authorized licensed use limited to: Trial User - Institute of Business Administration Karachi. Downloaded on May 10,2023 at 06:10:30 UTC from IEEE Xplore. Restrictions apply.