Comparative Study of RSA Asymmetric Algorithm and AES Algorithm for Data Security

ways

There are many ways to ensure data security, one of the classic way but still effective is to use encryption.Encryption itself has two techniques or algorithms: symmetric-key (also called secret-key) and asymmetric-key encryption (also called public key).In this paper, we proposed an analysis of two algorithm of encryption: RSA and AES algorithm in term of securing digital data.The method used in this research are: RSA and AES analysis, then retrieving the result.The two algorithm is deeply and thoroughly analyzed to discover the effectiveness to secure the data.The Technological Readiness Level (TKT) is at level 6, which means demonstration of a model or prototype or the analysis result of a system or subsystem or a study in a relevant environment.The result concluded that the application of the AES encryption algorithm is more optimal than RSA encryption in digital data security.Because the encryption and decryption process of using the AES algorithm is faster, although the difference in testing time of the two encryption algorithms is not too significant.The entropy value of 4.96 in AES encryption is greater than that of RSA proving that the even distribution of characters in the chiper text code does not accumulate on certain characters so that it will be difficult to attack using frequency analysis.

INTRODUCTION
Data security is an emerging issue that has been addressed nowadays in many field.Data has important role so to maintain its security is a top tier requirement.In this digitalized era where data could be accessed everywhere and anytime, providing secure data to the users also includes providing security during data transfer and the data storage (Akhil et al., 2018).People acquire security by making their data very confidential (Amalarethinam & Leena, 2017).One of many ways to secure data is using encryption.Encryption is the process of encrypting data so that it cannot be read by doing various substitutions and transformations in plaintext (original message) and converting them into cipher-text (random messages) (Simarmata et al., 2018).By applying encryption into the data or information, the security of it can be increased from potential attacks by third party or unauthorized access.Encryption also can be one of the way to maintain the confidentiality, availability, and integrity of the data itself.
Encryption algorithms are grouped into two general categories: Symmetric-key (also called secret-key) and asymmetric-key encryption (also called public key).The symmetric cryptography used the same key for encryption and decryption data, while the asymmetric cryptographic relies on two different keys for encryption and decryption (Muhammad Abdullah & Muhamad Abdullah, 2017).In this research, researcher is conducting a comparative analysis on two algorithms: Advanced Encryption Standards (AES) and RSA algorithm.
RSA is the most widely used key cryptography algorithm and was proposed by Rivest, Shamir and Adleman in 1977.In the RSA encryption algorithm, both public and private keys can be used to encrypt data and can guarantee that the private key can't be derived from the public key (Xu et al., 2020).AES algorithm is symmetrical block cipher that can encrypt and decrypt data, and is an iterative block cipher that has been chosen by the NIST (National Institute of Standards and Technology) as the international standard and replacement for DES (Lytvyn et al., 2019).The two algorithm is deeply and thoroughly analyzed to discover the effectiveness to secure the data.
The related previous research is the paper by Ye Yuan (Yuan et al., 2018) who conducted a high performance encryption system based on AES is proposed, in which AES can work at all three modes including AES-128, AES-192, and AES-256.In addition, AES implementation is piped into 4 stages for each round operation with decryption module reusing some circuits of encryption module, which leads to a performance improvement in term of area and throughput.
The research by Ünal Çavusoglu (Çavuşoğlu et al., 2017) who conducted a hybrid implementation of RSA algorithm using a novel chaos based RNG.This paper aims an encryption algorithm that combines the strong of asymmetric encryption algorithm and the rich dynamic behaviors of chaotic systems is developed.In this study, firstly a new chaotic system design with high dynamic features is performed and then circuit realization and analyses are made.A chaos based RNG (random number generator) is designed with the help of the new developed chaotic system, NIST and FIPS tests are run.Chaos based hybrid RSA (CRSA) encryption algorithm design in which RNG and RSA algorithms are used together is performed.
The comparative study also has been conducted by Santhosh Kumar B J (Santhosh Kumar et al., 2018) who analyzed the comparative study of RSA and AES algorithm for medical images.By considering different attacks on medical images by intruders, this paper suggests a few techniques which gives integrity to the image.The objectives of this paper is to compare two techniques (RSA, AES) which is used for encryption.By comparing these two methods the system will provide a more efficient in authentication and confidentiality.
An optical image compression and encryption scheme based on compressive sensing and RSA public-key cryptographic al-gorithm is proposed to enhance the security of image encryption system, where the optical compressive imaging system is utilized to sample the original image.This research is conduced by Lihua Gong (Gong et al., 2019).The results show the effectiveness and reliability of the proposed optical image compression and encryption scheme with considerable compression and security performance.The image encryption method also been conducted by Alireza Arab (Arab et al., 2019) with AES algorithm to encrypt image data.
The modification of RSA algorithm by Deepika Gupta (Mathur et al., 2017) is conducted to enhanced the level of security.The paper modified traditional RSA algorithm by including exponential powers, n prime numbers, multiple public keys, and K-NN algorithm.Modified approach also gives feature of verification at both side's sender and receiver.The last related researches are performed by Muhammad Fadlan (Muhammad Fadlan et al., 2021) and Septia Ulfa (Sunaringtyas & Prayoga, 2021) with the implementation of data security by using super encryption and penetration testing execution standard.
The goal of this research is mainly to determine which algorithm has significant impact on securing data by using encyption method.Both algorithm is widely used and are well known for their reliable encryption to protect data.The Technological Readiness Level (TKT) is at level 6, which means the demonstration of a model/prototype or the analysis result of a system/subsystem or a study is in a relevant environment.The two algorithm has been tested and implemented into the selected system in a certain organization in order to understand the effectiveness of both algorithms to secure data.

RESEARCH METHOD
RSA is a public key cryptographic technique to protect data from attacks.RSA can be used for encryption, key exchange (private and public key), digital signature.RSA is designed by Ron Rivest, Adi Shamir, and Leonards in 1978.RSA algorithm is very commonly used in data encryption and digital signature applications (Çavuşoğlu et al., 2017).In RSA any person can encrypt the data but for decryption it can be only done by the authenticated receiver.This encryption relies on cryptographic algorithm.In this paper, the data is being analyzed using RSA formula; Encryption: C = ME mod (N1) Decryption: M = CD mod (N2).
RSA algorithm is ilustrated in this Figure 1

RESULTS AND DISCUSSION
Analysis and literature study have been conducted to give an overall understanding on the two algorithms from previous researchers.The first literature is guided by Deepika Gupta who proposed modified RSA to enhanced data security and super encryption.This research gives positive insight that RSA is considered effective to be implemented in data security.The second literature of comparative study on RSA and AES also held by Santhosh Kumar B J who concluded that both algorithms provide a more efficient in authentication and confidentiality of data security.The last literature is conducted by Ünal Çavusoglu who conducted a hybrid implementation of RSA algorithm using a novel chaos based RNG.Chaos based hybrid RSA (CRSA) encryption algorithm design in which RNG and RSA algorithms are used together is performed.
The research is focused on the comparation of assymetrical RSA and AES algorithm for digital data security.We conducted the test on digital signature in a web-based application.The design of application is built prior to the test for development research.The features include are certificate data input, signature process and verification of autenthicity.

Digital signature process
The initial process starts by inputting the plaintext first, the plaintext is first taken the message digest using the SHA-3 function.Then the message digest is processed by RSA and generates a ciphertext.Furthermore, the chiper text from the RSA are reprocessed by AES, produced the chiper text again and stored.
The encryption process by combining two cipher algorithms to produce text chiper results that are difficult to crack, first by entering the plaintext and then processing with the RSA algorithm to produce a text cipher, then the text chiper is processed again by AES and produces a text chiper and directly saved to the available database.
The data that needs to be entered are the data listed on the certificate, namely the certificate number, the name of the participant who will receive the certificate, the name of the activity or course, the name of the certificate ratifying official and the date the certificate was issued.An example of the two-stage encryption process can be seen in Table 1 below

System architecture
This application has 2 main processes, namely: 1) input the certificate data in which the process of creating a digital signature code and QR-Code is carried out; and 2) the verification process by reading the QR-Code, inputting data on the certificate and matching the data according to the original digital signature code hidden behind the QR-Code.This web-based digital signature application has a login procedure for users who will use it.The user here is an officer appointed by the digital certificate issuer to manage certificate data, create electronic certificates to send the certificate via email to each participant of the activity.
For the series of digital signature turning processes, the user selects the certificate data, then processes the creation of a digital signature code.After the code is obtained, enter the process of generating a QR-Code, then select print an electronic certificate.In detail, it can be seen in Figure 3 below.Encryption quality testing is seen in terms of the speed of the encryption and decryption process, as well as the entropy value of the chiper text.The cryptographic system for digital signatures that only uses RSA compared to AES cryptography can be seen in Figure 3 (a) above, experiments were carried out on 100 plain texts with different file size obtained an average RSA encryption processing time of 0.92 milliseconds while AES encryption was found to be 0.96 milliseconds.With a difference of 0.04 milliseconds it will not be so pronounced, so the quality of this AES encryption can be declared more optimal.Likewise, with the decryption process time based on Figure 3 (b), the average result obtained from the RSA algorithm is 0.67 millisecon and the average result of the decryption time of AES encryption is 0.83 milliseconds, with a difference of 0.16 milliseconds.So that the decryption quality of this AES algorithm can be declared more optimal.Meanwhile, the results of the entropy assessment, from Figure 3 (c) above, can be determined that the entropy value of the chiper teks encryption resulting from the AES encryption of 4.96 is superior to the chiper text entropy resulting from RSA 4.77.The ideal entropy value is close to the number 8 thus the encryption system is designed to be secure from attacks (Irfan, 2016).Visually from the tests carried out, the avalanche effect improvement of RSA encryption was generated with an average value of 16.31% while the avalanche effect of AES encryption obtained results with an average value of 40.61%.From the data from the test results, it can be concluded that the avalanche effect value of the AES encryption test is better than the RSA, based on the value of the avalanche effect close to 50%.

CONCLUSION
Based on the results of the research conducted, it can be concluded that the application of the AES encryption algorithm is more optimal than RSA encryption in digital data security.Because the encryption and decryption process of using the AES algorithm is faster, although the difference in testing time of the two encryption algorithms is not too significant.The entropy value of 4.96 in AES encryption is greater than that of RSA proving that the even distribution of characters in the chiper text code does not accumulate on certain characters so that it will be difficult to attack using frequency analysis.The avalanche effect value of 40.61% proves that the change in the chiper text code is already very random. below.

Figure 1 .
Figure 1.encryption process of RSA algorithm

Figure 2 .
Figure 2. Substitution technique of AES algorithm

Figure 1
Figure 1 Research flow Analysis and literature study is done to analyze the previous related researches.RSA algorithm and AES algorithm is done separatedly and to compare the effectiveness of the two method to secure digital data.

Figure 3 .
Figure 3.The process of creating a digital signature.

Figure 4 .
Figure 4.A comparison graph of encryption quality between the implementation of RSA cryptography and AES cryptography (the red line is the RSA algorithm, and the blue line is the AES algorithm)

Figure 5 .
Figure 5.Comparison graph of quality of RSA encryption and AES encryption Figure 4 shows the results of the avalanche effect testing on the AES encryption process and AES encryption.The plain text used to test the avalanche effect in determining the number of revolutions to be used in the encryption process, the number of character bits change from the initial plaintext to the new plaintext results in 1 bit of change only.Avalanche effect testing is performed to find out how much influence plain text changes have on chuoer text typically used in chiper block cryptographic systems such as AES.Visually from the tests carried out, the avalanche effect improvement of RSA encryption was generated with an average value of 16.31% while the avalanche effect of AES encryption obtained results with an average value of 40.61%.From the data from the test results, it can be concluded that the avalanche effect value of the AES encryption test is better than the RSA, based on the value of the avalanche effect close to 50%.

Table 1 .
: Encryption result and QR code