You are on page 1of 5

2018 3rd International Conference on Information Technology, Information Systems and Electrical Engineering

(ICITISEE), Yogyakarta, Indonesia

Comparision Of AES 128, 192 And 256 Bit


Algorithm For Encryption And Description File
1st Ria Andriani 2nd Stevi Ema Wijayanti 3rd Ferry Wahyu Wibowo
Magister Teknik Informatika Magister Teknik Informatika Magister Teknik Informatika
Universitas AMIKOM Yogyakarta Universitas AMIKOM Yogyakarta Universitas AMIKOM Yogyakarta
Yogyakarta, Indonesia Yogyakarta, Indonesia Yogyakarta, Indonesia
ria.an@students.amikom.ac.id stevi.ema@amikom.ac.id ferry.w@amikom.ac.id

Abstract—Technology and communication has become a various forms of algorithms in cryptography, one of which is
very helpful need of human in completing many jobs quickly, AES (Advanced Encryption Standard) which is a very good
accurately and efficiently. However, besides giving positive symmetric key algorithm, is also a block chiper algorithm
impact of technology development also give negative impact, that uses substitution, permutation and number of rounds on
one of them is data tapping. So the security aspect in the each block that will be encrypted.
exchange of information is considered very important. Data
security is a crucial thing and a major concern for various This study discusses the comparison of AES algorithm of
communication systems. In the world of information there are 128 bit, 192 and 256 bit which aims to know the performance
many important and confidential data that should not be of AES algorithm whether at the time of decryption is still
known by the public. There are many ways that can be used to same with file before in encryption either in terms of
provide security to data that is being communicated one of performance, execution time and result of file.
them with cryptography which is the right method of data
security to maintain the confidentiality and authenticity of data Similar research was conducted by Padate & Pattel in
and can improve the security aspect of an information. 2014 entitled "Encryption And Decryption Of Text Using
cryptography there are many algorithms that can be used one AES Alghoritm" As for the results of this study is the
of them is AES (Advanced Encyption Standard). This study proposed algorithm offers high quality encryption even AES-
will compare the AES algorithm from AES-128 bit, AES-192 128 offers a number of keys large enough in the process of
bit and AES-256 bit which aims to find out how much time is encryption data [1]. The next study was conducted by
needed and how much cpu usage is needed to encrypt and Abdullah in 2017 entitled "Advanced Encryption Standard
decrypt a file. The results of the research show that in terms of (AES) Algorithm to Encrypt and Decrypt Data" This study
processing time AES 128 bit has a relatively faster processing compared with DES algorithm, 3DES, Blowfish in
time compared to AES 192 bit and AES 256 bit. While on the encryption and data decryption result of this research
CPU usage used for the process of encryption and decryption concludes even AES algorithm has the ability to provide
of files, AES 192 bit requires the lowest CPU usage compared more data security than the DES, 3DES and Blowfish
with the other two AES algorithms. algorithms [2]. The next research be conducted by Silva &
Heryanto in 2013 with the title "Application Encryption and
Keywords—cryptography, encryption, decryption,
advanced encryption standard
File Decryption Using AES Algorithm Rijndael On Android
Operating System" the result of this research the process of
encryption and decryption using the original method takes
I. INTRODUCTION much more time than the JCE. The AES Alghoritma applied
Technology and communication has become a very originally, is less suitable for files larger than 300 kb because
helpful need of human in completing many jobs quickly, the time spent is over one minute so it is less suitable to be
accurately and efficiently. Almost most government, applied on mobile devices operating on android [3]. The next
education, health, corporate and other organizations must research was conducted by Ilyas & Widodo in 2014 under
have confidential data or information. Recent years, the the title "File Cryptography Using AES Dual Password
security and integrity of data has been of major concern and Method" result of this research produce an encrypted file that
crucial to various communications systems, in this scenario can not be opened by any application. This app is applied to
almost all data is transmitted over a network, such as a LAN all file types such as images, video, audio, text, apps,
or internet so that it can not be known or used by compressed files and more. From the experimental results the
unauthorized parties. In addition to providing a positive file size has an influence on the process of encryption and
impact, technological developments also have a negative decryption [4]. Further research was conducted by
impact, one of which is data tapping. So the security aspect Rahmawati & Raharjo in 2016 under the title "Data Security
in the exchange of information is considered very important. Application Using Streakography Algorithm Discrete Cosine
There are many ways that can be used to provide security to Transform and AES 128 bit cryptography" the result of this
data that is being communicated with cryptography. research method of cryptography and AES 128 bit
Cryptography is a technique or method used to improve the cryptography technique is very helpful in maintaining the
security aspects of a data or an information. Cryptography is confidentiality of the message so as not easy to read by
also a study of art that serves to keep a file so that the file is unauthenticated ones. The process of embedded files on the
safe. Cryptography using a good algorithm will take a long average application has a completion time of 432.3 seconds
time to crack an encoded file. Given the importance of data and managed to get a good steganographic quality with a
security, the world of information technology requires a relatively small average MSE value of 1.38dB and a mean
stronger and more secure cryptographic algorithm. There are value of PSNR of 47.66dB. The average file extraction

120 978-1-5386-7082-8/18/$31.00 ©2018 IEEE


2018 3rd International Conference on Information Technology, Information Systems and Electrical Engineering
(ICITISEE), Yogyakarta, Indonesia
process has a completion time of 139.6 seconds and 100% C. Add Round Key
success [5]. The next research was carried out by In this process the subkey is combined with the state.
Bhaudhayana & Widiartha in 2015 entitled "Implementation This merging process uses XOR operations for each byte of
of AES 256 Cryptography Algorithm and LSB the subkey with the corresponding byte of the state. For each
Steganography Method In Bitmap Image" The result of this stage, the subkey is generated from the primary key using the
research shows that AES 256 algorithm and LSB key schedule process. Each subkey is the same size as the
Steganography method is good to be implemented in state in question. The Add Round Key process is shown in
securing the image file of very secrecy . The larger the image Figure 1.
file size, the greater the execution time of both encryption
and decryption processes.

II. RESEARCH METHOD

A. Advanced Encryption Standard (AES)


AES is included in a type of symmetry cryptographic
algorithm and a block cipher. Thus, this algorithm uses the
same key when encryption and decryption and its input and
output are blocks with a certain number of bits. Rijndael
supports a variety of block sizes and keys that will be used.
However AES has a fixed block and key size of 128, 192,
256 bits. The selection of data block and key sizes will
determine the number of processes that must be passed for
the encryption and decryption process. Table 1 is the ratio of
the number of processes that must be passed for each input.

TABLE 1. NUMBER OF PROCESS BASED ON BLOCK AND KEY BITS Fig 1. Add Round Key Process

Key Lenght Size Of Block Number


D. Sub Bytes
(NK) Data (Nb) Process (Nr)
The SubBytes process is an operation that will perform
4 4 10 non-linear substitutions by substituting each byte state with
6 4 12 bytes in a table called the SBox table. An S-Box table
8 4 14 consists of 16x16 rows and columns with each 1 byte sized.
The S-Box table is shown in Figure 2 while the SubBytes
The input and key data blocks are operated in the form of process is shown in Figure 3 below.
arrays. Each member of the array before generating a
ciphertext output is called a state. Each state will undergo a
process that outline consists of four stages namely,
AddRoundKey, SubBytes, ShiftRows, and MixColumns.
Unless the MixColumns stage, the other three stages will be
repeated on each process while the MixColumns stage will
not be performed at the last stage. The decryption process is
the reverse of the encryption. Because there are several
stages in the encryption process, it takes sub key-sub key that
will be used at each stage.

B. Key Schedule
The key schedule process is required to get subkey-
subkey of the primary key to be sufficient for encryption and
decryption. This process consists of several operations,
namely: Fig 2. S-Box

• Rotate operation, which is 8 bit rotation operation on


32 bits of key.
• SubBytes operation, in this operation the 8 bits of the
subkey are substituted with the value of the S-Box.
• Operation Rcon, this operation can be translated as a
power operation 2 specific values of the user. This
operation uses the values in the Galois field.
• XOR operation with w [i-Nk] is the word that is on
the previous Nk.

Fig 3. Sub Bytes

121
2018 3rd International Conference on Information Technology, Information Systems and Electrical Engineering
(ICITISEE), Yogyakarta, Indonesia
E. Shift Rows
The Shift Rows process will operate on each row of the
state table. This process will work by rotating the bytes in the
last 3 rows (rows 1, 2, and 3) with varying number of turns.
Row 1 will be played once, row 2 will be played twice, and
row 3 will be played 3 times. Whereas row 0 will not be
played. The ShiftRows process is shown in Figure 4.

Fig 5. Mix Coloumn Process

III. RESULT AND DISCUSSION


Trial results are performed on nine files of different types
and sizes. The files will be encrypted using AES 128 bit, 192
bit and 256 bit algorithms. To decrypt the files are used the
same password with the password at the time the file is
encrypted. In this test is done to find out how much time of
Fig 4. Shift Rows processing files and how many cpu usage required by each
algorithm in encrypt and decrypt a file. The following is a list
F. Mix Coloumns of tested file details.
The Mix Columns process will operate on each column of
the state table. This operation combines 4 bytes of each state TABLE 2. LIST OF FILES TESTED
table column and uses a linear transformation Operation Mix File Name Ekstension Size
Columns treats each column as a 4-tribal polynomial in the
Sample .zip 546 KB
Galois field and then multiplied by c (x) modulo (x4 + 1),
where c (x) = 3x3 + x2 + x + 2. The reverse of this SampleDocument .docx 5.295 KB
polynomial is c (x) = 11x3 + 13x2 + 9x + 14. The SampleExcel .xls 4.313 KB
MixColumns operation can also be viewed as a matrix SampleImage .jpg 3.133 KB
multiplication. The Mix Columns step can be represented by
SampleMusic .mp3 4.608 KB
multiplying the 4 numbers in the Galois field by the
following matrix. SampleNote .txt 16 KB
SamplePDF .pdf 19.436 KB
SamplePresentationFile .pptx 9.436 KB
SampleVideo .mp4 17.704 KB

In the first test encrypted files that have been prepared by


using 128 bit AES algorithm, 192 bit and 256 bit to
determine the time required for the encryption process of
each file. The results can be seen in table 3.
Or if described as follows:
TABLE 3. ENCRYPTED FILE TEST TIME RESULTS (IN SECOND)
r0=2α0+α3+α2+3α1 (1)
File Name 128 bit 192 bit 256 bit
Sample 1.915 1.848 2.235
r1=2α1+α0+α3+3α2 (2) SampleDocument 2.066 2.032 1.623
SampleExcel 1.572 1.855 2.313
SampleImage 1.972 1.650 1.650
r2=2α2+α1+α0+3α3 (3) SampleMusic 1.786 1.636 2.225
SampleNote 1.745 1.399 1.227
SamplePDF 2.209 1.496 2.023
α3=2α3+α2+α1+3α0 (4) SamplePresentation 3.187 2.822 1.335
File
The above addition operation is performed by XOR SampleVideo 3.700 2.235 1.490
operation, while for multiplication operation is done with
Galois field. The Mix Coloumn process can be seen in Figure
5 below. Based on table 3, the encryption time required for both
AES 128, 192 and 256 varies based on the file size tested, the

122
2018 3rd International Conference on Information Technology, Information Systems and Electrical Engineering
(ICITISEE), Yogyakarta, Indonesia
smallest encryption time on AES 128 is in the SampleExcel In the fourth test is performed to determine the required
file with the encryption time being 1,572 seconds later at cage usage at the time of decryption of each file. The result
AES 192 when the smallest encryption is in SampleMusic of the test can be seen in table 6.
file with an encryption time of 1,636 seconds after that at
AES 256 bit the smallest encryption time is in TABLE 6. CPU TEST RESULT USAGE DECRYPTION FILE (IN
SamplePresentasion File with the encryption time being PERCENTAGES)
1,335 seconds.
Nama File 128 bit 192 bit 256 bit
In the second test the decrypted file is encrypted to Sample 1.09 1.03 1.30
determine the time required to process the decryption of each SampleDocument 5.59 5.85 4.35
file. Decryption using the same password at the time of file SampleExcel 4.42 5.14 3.69
SampleImage 2.55 4.04 3.16
encryption, if the password is not the same then the
SampleMusic 3.76 5.07 2.92
decryption process can not be done. The second test result SampleNote 0.48 0.30 0.47
can be seen in table 4. SamplePDF 14.24 12.48 11.71
SamplePresentation File 6.88 8.08 8.01
SampleVideo 11.50 10.55 11.45
TABLE 4. DECRYPTION FILE TEST TIME RESULT (IN SECOND)
Nama File 128 bit 192 bit 256 bit
Sample 1.665 1.499 1.399
CPU Usage test results in the file decryption process
show that at AES 128 bits the lowest percentage of CPU
SampleDocument 1.499 1.478 1.508
Usage used during the decryption process is in the
SampleExcel 1.824 1.811 1.570 SampleNote file that is equal to 0.48%, then at AES 192 bits
SampleImage 2.630 1.503 1.330 the lowest percentage during the decryption process is in the
SampleMusic 1.535 1.629 1.674 SampleNote file that is equal to 0.30% then at AES 256 bits
SampleNote 2.543 1.397 1.371 the lowest percentage during the decryption process is in the
SamplePDF 1.855 1.892 1.780 SampleNote file which is 0.47%. While on AES 128 bits the
highest percentage of CPU Usage used during the decryption
SamplePresentation File 1.684 1.644 2.813
process is in SamplePDF file that is equal to 14.24%, then at
SampleVideo 1.985 1.884 1.582
AES 192 bits the highest percentage when decryption
process is in SamplePDF file that is 12.48% then at AES 256
The decryption time test results in table 4 show that at the highest percentage bit at the time of the decryption
AES 128 bits the smallest decryption time in process found in the SamplePDF file that is equal to 11.71%.
SampleDocument with the decryption time is 1,499 seconds,
then at AES 129 bits the smallest decryption time is in the IV. CONCLUSION
SampleNote file with the decryption time 1,397 seconds after Cryptographic applications using AES algorithm can
that at AES 256 the smallest decryption time is in the Sample generate encryption of files that can not be opened if the
file with a decryption time of 1,399 seconds. password entered is not the same as the password entered
In the third test encrypted the file using the three during the encryption process is done and this application can
algorithms to determine how many cpu usage needed to also be applied to all types of files such as image files, video,
process the encryption of each file. The results of this test can text, applications and others etc. The AES algorithm has a
be seen in table 5 below. fixed block size of 128 bits and a key size along 128 bits, 192
bits and 256 bits. The distinguishing feature of each AES is
the number of rounds used. AES 128 bits use 10 rounds, AES
TABLE 5. CPU TEST RESULTS USAGE ENCRYPTION FILE (IN
PERCENTAGES)
192 uses 12 rounds, while AES 256 bits use 14 rounds. AES
comparison results show that:
File Name 128 bit 192 bit 256 bit
Sample 1.01 0.84 0.86 • Based on the test results, when viewed at the time
SampleDocument 4.04 6.28 3.99
required to process the encryption and decryption of
the file, 128 bit AES has a relatively faster processing
SampleExcel 3.72 3.91 3.41
time compared to AES 192 or 256 bit, although in
SampleImage 2.39 2.96 3.30
certain types of files require a longer time. This is
SampleMusic 3.01 4.30 4.12 demonstrated when file encryption takes the form of
SampleNote 0.46 0.38 0.53 word documents, images, text, pdf files, presentation
SamplePDF 11.09 9.93 15.21 and video files, 128 bit AES has the fastest processing
SamplePresentation File 5.94 6.89 6.06 time. While at the time of file decryption, AES 128
SampleVideo 10.71 7.83 10.06 bit has the fastest processing time on archive shaped
files WinZip, excel files, images, text, and video.
CPU Usage test results in the file encryption process • CPU Usage used to process encryption and
show that at AES 128 bits the lowest percentage of CPU decryption of files based on testing using AES 128
Usage is used when encryption is in the Sample file that is bit, 192 bit and 256 bit algorithms has been concluded
equal to 1.01%, then at AES 192 the lowest percentage bits that AES 192 has percentage CPU Usage tend to be
used in the encryption process are in the SampleNote file that lower than AES 128 bit or 256 bit, although in certain
is equal to 0.38%, after that at AES 256 bits it can be seen file have higher percentage. AES 192 bit has the
that the lowest percentage in the encryption process is in the lowest CPU Usage when encrypted and decrypted
SampleNote file which is 0.53%. files are word documents, excel, music / mp3,
presentation files / ppt and images.

123
2018 3rd International Conference on Information Technology, Information Systems and Electrical Engineering
(ICITISEE), Yogyakarta, Indonesia
REFERENCES dan Sistem Intelijen (KOMMIT 2014) Universitas Gunadarma Vol. 8
Oktober 2014 ISSN : 2302-3740 Hal. 263 - 270.
[1] R. Padate, and A. Pattel, “Encryption and Decryption Of Text Using
[5] R. Rahmawati and D. Rahardjo, “Aplikasi Pengamanan Data
Aes Alghoritm,” International Journal Of Emerging Technology And
Advanced Engineering, 2014. Menggunakan Algoritma Steganografi Discrete Cosine Transform dan
Kriptografi AES 128 BIT pada SMK PGRI 15 Jakarta,” Jurnal Teknik
[2] A. M. Abdullah, “Advanced Encryption Standard (AES) Algorithm to Informatika dan Sistem Informasi Vol. 2 No. 1 April 2016 e-ISSN :
Encrypt and Decrypt Data,” Reasearch Gate Departement Of Applied 2443-2229 Hal. 67 – 74.
Mathematics & Computer Scince, Cyprus UK. 2017.
[6] G. W. Bhaudhayana and I. M. Widiartha, “Implementasi Algoritma
[3] L. D. Silva and D. B. P. Heriyanto, “Aplikasi Enkripsi dan dekripsi Kriptografi Aes 256 Dan Metode Steganografi Lsb Pada Gambar
file dengan Menggunakan AES Algoritma Rijndael Pada Sistem Bitmap,” Jurnal Ilmiah Ilmu Komputer Universitas Udayana Vol. 8
Operasi Android ,” Jurnal TELEMATIKA Universitas Pembangunan No. 2 September 2015. ISSN 1979-5661 halaman 15-25.
Nasional “Veteran” Yogyakarta Vol. 10, No. 1, JULI 2013 : 33 – 42
ISSN 1829-667.
[4] I. A. Ilyas and S. Widodo, “Kriptografi File Menggunakan Metode
AES Dual Password,” Prosiding Seminar Ilmiah Nasional Komputer

124

You might also like