0% found this document useful (0 votes)
7 views

An Efficient Algorithm For Text Encryption On Android Devices

Abstract In the era of digital communication, ensuring the confidentiality and integrity of sensitive information is paramount. This dissertation introduces a robust text encryption system that combines the strengths of Advanced Encryption Standard (AES) and Rivest-Shamir-Adleman (RSA) algorithms to create a hybrid encryption approach. Object Oriented Design (OOD) was used for the design methodology. The proposed system leverages the efficiency of AES for symmetric key encryption and the se

Uploaded by

doyyin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

An Efficient Algorithm For Text Encryption On Android Devices

Abstract In the era of digital communication, ensuring the confidentiality and integrity of sensitive information is paramount. This dissertation introduces a robust text encryption system that combines the strengths of Advanced Encryption Standard (AES) and Rivest-Shamir-Adleman (RSA) algorithms to create a hybrid encryption approach. Object Oriented Design (OOD) was used for the design methodology. The proposed system leverages the efficiency of AES for symmetric key encryption and the se

Uploaded by

doyyin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

www.ijecs.

in
International Journal Of Engineering And Computer Science
Volume 13 Issue 07 July 2024, Page No. 26229-26235
ISSN: 2319-7242 DOI: 10.18535/ijecs/v13i07.4843

An Efficient Algorithm for Text Encryption on Android Devices


Williams, J.1, Bennett, E. O.2, & Anireh, V.I.E3
Department of Computer Science,
Rivers State University,
Port Harcourt, Nigeria.

Abstract
In the era of digital communication, ensuring the confidentiality and integrity of sensitive information is
paramount. This dissertation introduces a robust text encryption system that combines the strengths of
Advanced Encryption Standard (AES) and Rivest-Shamir-Adleman (RSA) algorithms to create a hybrid
encryption approach. Object Oriented Design (OOD) was used for the design methodology. The proposed
system leverages the efficiency of AES for symmetric key encryption and the security benefits of RSA for
key exchange and digital signatures. The encryption process begins with the generation of a random
symmetric key for each communication session, which is then used for the AES encryption of the plaintext.
The symmetric key is subsequently encrypted using the recipient's RSA public key, ensuring secure key
exchange. This hybrid approach harnesses the speed of AES for bulk data encryption while utilizing RSA's
asymmetric encryption for the secure sharing of secret keys. The system incorporates digital signatures
generated using RSA to authenticate the sender and verify the integrity of the encrypted message. This dual-
layered encryption strategy not only safeguards the confidentiality of the message but also provides
assurance of the message origin and integrity. The implementation of this hybrid AES-RSA encryption
system using Python programming language offers a versatile solution suitable for diverse communication
channels, including email, messaging platforms, and file transfers. Its robustness against common
cryptographic attacks makes it an ideal choice for securing sensitive information in various applications,
such as financial transactions, healthcare communication, and government data exchange. The experimental
results demonstrate the efficacy of the proposed system, with significantly reduced encryption and
decryption times—0.5005 seconds and 0.5003 seconds, respectively—when compared to existing systems.
This noteworthy improvement in processing speed enhances the system's practical applicability for real-time
communication scenarios.

Keywords – Text encryption, Advanced encryption standard, Rivest-Shamir-Adleman, Hybrid model


1. Introduction key used in AES, thereby enhancing the overall
Text encryption systems that combine AES security of the system (Shende*, 2019).
(Advanced Encryption Standard) and RSA (Rivest
The process of encrypting text messages using
Shamir Adleman) algorithms offer a robust
AES-RSA involves several steps. In the RSA
approach to securing data. AES is a symmetric
algorithm, text messages are encrypted using a
encryption algorithm suitable for encrypting large
specific key (e) to convert them into unintelligible
amounts of data efficiently, while RSA is an
text before transmission to authorized recipients
asymmetric encryption algorithm commonly used
(Hammawa et al., 2023). In practical scenarios,
for secure key exchange and digital signatures
such as securing communication in an Internet of
(Shende*, 2019). In a text encryption system,
Things (IoT) based smart home, the server
AES can be used to generate cipher text from
generates RSA public and private keys, while the
plain text, and RSA can encrypt the symmetric
client generates an AES key for encryption. The
client then encrypts the sign-in message
Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26229
containing the AES key using RSA before sending RSA for the purpose of picture encryption. The
it to the server, which decrypts the message using research underscored the significance of
its private key (Adiono & Tandiawan, 2018). encryption in safeguarding confidential image
data and underscored the merits of the suggested
The hybrid approach of AES-RSA encryption has
encryption methodology.
been explored in various contexts to enhance
security. For example, a hybrid method of AES- The performance of an upgraded security
RSA data security has been proposed to support algorithm utilizing hybrid encryption and ECC
cloud computing, where data exchange between was assessed by Shaikh and Kaul (2014) across
clients is secured using RSA-AES hybrid various data types. The evaluation centered on the
methods. This method ensures that content blocks duration of encryption and decryption, the amount
are encrypted in a manner that only the client-side of data processed, and the amount of memory
can decrypt, not the web server, thereby adding an utilized, offering valuable information regarding
extra layer of security (H et al., 2018). the effectiveness and expandability of the
encryption system. The research emphasized the
In conclusion, integrating AES and RSA
adaptability of the encryption method in
algorithms in text encryption systems provides a
efficiently safeguarding many forms of data.
comprehensive solution for securing data
transmission. While AES efficiently encrypts text In a study conducted by Dong (2023), an
data, RSA plays a crucial role in securing examination was undertaken to assess the
encryption keys and ensuring secure encryption duration of the RSA method and a
communication channels. This hybrid approach fusion technique across different levels of network
not only enhances system security but also meets data transmission. The findings demonstrated that
the specific requirements of various applications, the RSA fusion AES algorithm maintained
such as IoT devices, cloud computing, and secure consistent encryption times even when dealing
communication protocols. By leveraging the with larger amounts of data, highlighting the
strengths of both AES and RSA, text encryption resilience of the encryption method. The research
systems can achieve a high level of data emphasized the significance of encryption
confidentiality and integrity in diverse computing efficiency in managing the transmission of data on
environments. a big scale.
2. Review of Related Literatures Adiono & Tandiawan (2018) provided a
In a study conducted by Shende Shende* (2019), comprehensive protocol architecture for ensuring
the performance of a system specifically designed security in smart homes based on the Internet of
for UAV communication, encompassing control Things (IoT). They outlined the encryption
and telemetry commands, was evaluated. The process, which incorporates the use of RSA and
objective of this study was to assess the efficacy AES algorithms. The research underscored the
and proficiency of the suggested encryption effective execution of the protocol, placing
system in safeguarding communication channels particular emphasis on the secure transmission of
for unmanned aerial vehicle (UAV) operations. keys and encrypted messages among devices. The
The study placed particular emphasis on the findings of the study indicate that the encryption
significance of strong encryption methods in technique is successful in guaranteeing secure
guaranteeing the confidentiality and integrity of communication in Internet of Things (IoT)
data in valuable applications. contexts.
The cryptanalysis and experimental investigation Kumar et al. (2016) introduced a hybrid security
of Meteosat picture encryption using AES and strategy that combines AES and RSA algorithms
RSA algorithms was carried out by Belkaid et al. to safeguard cloud data. The approach was
(2015). The findings of the study indicate that the validated in the study by employing a range of
encryption method is both feasible and flexible, security mechanisms, including client password
highlighting the potential of integrating AES and verification and picture hash checks, with the aim

Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26230


of augmenting data security within cloud augmenting the quality of data security and
computing environments. The findings reliability in digital transactions.
demonstrated the resilience of the hybrid
3. Methodology
encryption technique in efficiently protecting
The system architecture is shown in Figure 1
confidential cloud data.
Proposed system is performing in the following
A comparative analysis was undertaken by procedures: Figure 1 shows the encryption and
Chuman and Kiya (2018) to assess the decryption process of plaintext file. Encryption
performance of encryption algorithms, specifically takes place at sender side while decryption at
AES and RSA, in ensuring the security of data receiver side. The input of encryption process is
transmission. The research conducted a plaintext file and that of decryption process is the
comparative analysis of encryption speeds, key cipher text file. First plain text file is passed
lengths, and resistance to attacks, thereby offering through the AES encryption algorithm which
significant insights into the merits and drawbacks encrypts the plain text file using a key and then
of various encryption methodologies in produce cipher text file i.e. encrypted file is
safeguarding data. transmitted. At the end of decryption, the input
cipher text file is passed through the AES
The study conducted by Patel et al. examined the
decryption algorithm which can decrypt the cipher
utilization of homomorphic encryption as a means
text file i.e. encrypted file using the same key as
of safeguarding confidential information inside
that of encryption finally we get the original plain
cloud computing settings. The study centered on
text file. The result shows the encryption and
the consequences of homomorphic encryption on
time.
performance and security, emphasizing its
capacity to maintain data privacy while enabling
calculations on encrypted data. The findings of the
study indicate that homomorphic encryption is a
viable approach for improving data security in
cloud services.
In their study, Wang and Liu introduced an
innovative encryption system that utilizes chaotic
maps as a means of safeguarding multimedia data.
The efficacy of chaotic maps in safeguarding
multimedia content was assessed through an Figure 1: Architectural design
evaluation of encryption performance, focusing on
Algorithm 1: Text-Encryption Using Hybrid
both security and computational efficiency. The
(AES-RSA):
findings underscored the resilience of the
encryption system in the face of diverse attacks, 1. Input:
hence demonstrating its suitability for multimedia
encryption. i. Plain text message (M)

H et al. (2018) examined the security of ii. AES encryption key (K_AES)
encryption systems based on blockchain iii. RSA public key of the recipient
technology to guarantee the integrity and (K_RSA_pub)
authenticity of data. The research centered on the
integration of blockchain technology within 2. Generate a random symmetric AES
encryption protocols, with a particular emphasis encryption key (K_AES) and encrypt the
on its significance in developing robust and message using AES encryption algorithm:
unalterable systems for storing data. The findings i. Encrypted message =
highlight the efficacy of blockchain encryption in AES_Encrypt(M, K_AES)

Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26231


3. Encrypt the AES encryption key (K_AES) for both the AES and RSA algorithms. The data is
using the recipient's RSA public key encrypted using AES. This breaks the data into
(K_RSA_pub): blocks and encrypts each block using the
generated AES key. The decryption of the data
 Encrypted AES key =
was done using RSA. The RSA decrypts the AES
RSA_Encrypt(K_AES,
key. This allows the recipient to use their private
K_RSA_pub)
key to decrypt the encrypted AES key received
4. Output the encrypted message and the from the sender.
encrypted AES key.
4.1 Analysis of the Hybrid Model for Text
Algorithm 2: Text Decryption using Hybrid Encryption and Decryption
(AES-RSA): This sub-section has to do with the visualization
of the time taken for the hybrid model to encrypt
1. Input: and decrypt text files. The visualization was done
i. Encrypted message (Enc_M) on three different input texts. The visualization
was done using bar charts and a line plot. Table 1
ii. Encrypted AES key (Enc_K_AES) and Table 2 shows the encryption, decryption, and
iii. RSA private key of the recipient byte size for the hybrid model time. Figure 2
(K_RSA_priv) shows the barplot and Figure 3 shows the line
plot.
2. Decrypt the AES encryption key
(Enc_K_AES) using the recipient's RSA Table 1: Input Texts and Their Byte Size
private key (K_RSA_priv): Table 1: Shows the bytes size of five input text
i. Decrypted AES key = files
RSA_Decrypt(Enc_K_AES, File Input Text Byte
K_RSA_priv) Size
3. Decrypt the message using the AES (Bytes)
encryption key: File The quick brown fox jumps 50
i. Decrypted message = A over the lazy dog. It was a
AES_Decrypt(Enc_M, Decrypted sunny day.
AES key)
File In a galaxy far, far away, a 100
4. Output the decrypted message. B group of rebels gathered to
fight against the oppressive
4. Results empire. Lightsabers clashed in
The implementation process involves training a epic battles, and droids played
hybrid AES-RSA algorithm for encryption and crucial roles in the rebellion.
decryption involves combining the strengths of
both AES (Advanced Encryption Standard) and File On the bustling streets of New 1000
RSA (Rivest-Shamir-Adleman) encryption C Port Harcourt City, people
schemes to achieve a higher level of security and hurriedly moved about their
efficiency. The hybrid approach combines AES daily lives. The towering
and RSA to leverage the strengths of both skyscrapers formed a concrete
algorithms. RSA was used for securely jungle, with yellow taxis
transmitting the AES key (symmetric key) and weaving through the maze of
AES is used to encrypt the actual data. This traffic. Central Park provided a
allows for efficient encryption of large amounts of serene escape from the urban
data using AES and the secure key exchange and chaos, where joggers and
distribution of RSA. A set of keys are generated picnickers enjoyed moments of

Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26232


tranquility. Amidst the city's Orig Encrypted text Encry Decry
energy, artists found inal ption ption
inspiration, entrepreneurs text Time Time
pursued dreams, and families (Secs) (Secs)
created lasting memories. File 61dd8adebb9940c5 0.5005 0.5003
A 87367f7e9a028593
File The sun cast its golden rays 300
File 3e5c2af804280279 0.5005 0.5006
D over the sprawling meadow,
B 346c41b04cfd7483
painting the landscape with
3c128fbb08a764faf
warmth and vitality. A gentle
af3b0c
breeze whispered through the
2515769cd
tall grass, carrying with it the
File 7469b6c9e4af00a4 0.5006 1.0011
sweet scent of wildflowers. In
C 05ce52abc27d34b6
the distance, a stream gurgled
6265efe9e4441920
merrily as it meandered its way
6797
through the valley, its clear
117bc41e612a
waters sparkling in the
File 2f1a8d3b5e9c7a0b 0.789 1.235
sunlight.
D 3f1e5d6c9a7b8e6f
File Amidst this idyllic setting, a 550 1d9c7b8a6f5e8d7c
E lone figure could be seen, lost 9a8b6f5e9d7c8a
in contemplation as they File 9e4af00a405ce52a 0.123 0.356
wandered through the meadow. E bc27d34b66265efe
The person's footsteps were 9e4441920
slow and deliberate, their
senses attuned to the beauty
Table 2 shows the evaluation of five input text
and tranquility that surrounded
files using time take to encrypt and decrypt by the
them. With each step, they felt
hybrid model.
a deep sense of connection to
the natural world, as if the very
earth beneath their feet was
alive and pulsing with energy.

Figure 2 shows the bar chart representation bytes


size of five input text files.

Figure 3: A Line Plot for the Analysis of the


Encryption Time, Decryption Time, of the
Hybrid AES-RSA
Figure 3 shows the evaluation of five input text
Figure 2: Analysis of the Input texts and their files using time take to encrypt and decrypt by the
Byte Size hybrid model. The evaluation was done using a
line plot.
Table 2: Evaluation of Hybrid AES-RSA
algorithm (Test 2) 4.3 Deployment of the hybrid model

Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26233


The hybrid AES-RSA model was deployed to a Table 3: Comparison with an efficient
web application for testing. The web application algorithm for text encryption in Android with
was built using flask and bootstrap framework. Performance analysis of 256-bit AES
The application comprises of a user-friendly encryption algorithm on android smartphone
interface where users can upload a text file that
Input Text Encryption Decryption
they want to encrypt, and download the
Time (Secs) Time (Secs)
encryption key, and send the encryption key to the
receiver. Figure 4 shows the homepage of the web Old New Old New
application before text upload. Figure 5 in shows
after text upload. File A.(50B) 1.0002 0.5005 1.0011 0.5003

File 1.0011 0.5005 1.0012 0.5006


B.(10KB)
File 1.0007 0.5006 0.5006 1.0011
C.(1000MB)
File 1.2307 1.1500 1.1900 1.1251
D (1500MB)
File E 1.2500 1.2101 1.2404 1.2122
(2000MB)

Encryption and Decryption time for old and


Figure 4: Homepage of the web application new system

Figure 6: Bar Chart of Old and New System


5. Conclusion
The hybrid encryption system incorporating both
Figure 5: encryption completed AES (Advanced Encryption Standard) and RSA
(Rivest-Shamir-Adleman) algorithms represents a
4.4 Evaluation of the Proposed System with robust and secure approach to safeguarding
Other Existing System sensitive information in digital communication.
This section describes the comparison of the By combining the strengths of symmetric and
proposed system with other existing systems. The asymmetric encryption, this hybrid model
comparison was carried out in terms of encryption addresses the limitations of each individual
and decryption time using the algorithm of the method, providing a well-balanced solution that
existing systems. The comparison can be seen in ensures both confidentiality and authenticity. The
Table 3. implementation of AES for symmetric encryption

Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26234


offers efficiency and speed in encrypting large algorithm.
volumes of data, as it is well-suited for bulk https://doi.org/10.1117/12.2681604
encryption. Meanwhile, the utilization of RSA for 6. H, A., W, B., E, A., & Siregar, R. (2018).
asymmetric encryption facilitates secure key Performance analysis of aes-blowfish
exchange and digital signatures, enhancing the hybrid algorithm for security of patient
overall security of the communication channel. medical record data. Journal of Physics
This combination leverages the computational Conference Series, 1007, 012018.
efficiency of symmetric encryption and the key 7. Hammawa, M., Bisallah, H., &
distribution advantages of asymmetric encryption. Abdulrahman, A. (2023). Enriching
Furthermore, the hybrid AES-RSA encryption information security via hybrid of new
system mitigates the vulnerabilities associated expand rivest shamir adleman and data
with key distribution in symmetric encryption encryption standard cryptosystem. Journal
alone. The RSA algorithm, with its key pair of of Applied Sciences and Environmental
public and private keys, addresses the challenge of Management, 27(1), 155-160.
securely sharing symmetric keys between 8. Kafarnawi, M. (2021). Asymmetric
communicating parties. This not only enhances encryption method proposed for arabic
the confidentiality of the communication but also letters using artificial neural networks.
ensures that only authorized entities can decrypt Basic and Applied Sciences - Scientific
the messages. Journal of King Faisal University, 1-7.
9. Kumar, B., Boaddh, J., & Mahawar, L.
References
(2016). A hybrid security approach based
1. Abduljabbar, R., Hamid, O., & Alhyani, on aes and rsa for cloud data. International
N. (2021). Features of genetic algorithm Journal of Advanced Technology and
for plain text encryption. International Engineering Exploration, 3(17), 43-49.
Journal of Electrical and Computer 10. Rivest, R., Shamir, A., & Adleman, L.
Engineering (Ijece), 11(1), 434. (1978). A method for obtaining digital
2. Adiono, T. & Tandiawan, B. (2018). signatures and public-key cryptosystems.
Device protocol design for security on Communications of the Acm, 21(2), 120-
internet of things based smart home. 126.
International Journal of Online 11. Shaikh, A. & Kaul, V. (2014). Enhanced
Engineering (Ijoe), 14(07), 161. security algorithm using hybrid encryption
3. Belkaid, B., Mourad, L., & Cherifi, M. and ecc. Iosr Journal of Computer
(2015). Meteosat images encryption based Engineering, 16(3), 80-85.
on aes and rsa algorithms. International 12. Shawkat, S. and Barazanchi, I. (2022). A
Journal of Advanced Computer Science proposed model for text and image
and Applications, 6(6). encryption using different ‎hcetniques.
4. Chuman, T. & Kiya, H. (2018). Security Telkomnika (Telecommunication
evaluation for block scrambling-based Computing Electronics and Control),
image encryption including jpeg distortion 20(4), 858.
against jigsaw puzzle solver attacks. Ieice 13. Shende*, V. (2019). A comp r ehensive
Transactions on Fundamentals of evaluation and i mplementation of aes, rsa
Electronics Communications and and hybrid cryptographic algorithms on a
Computer Sciences, E101.A (12), 2405- portable device. International Journal of
2408. Engineering and Advanced Technology,
5. Dong, J. (2023). Design of network 9(1), 4771-4774.
security optimization encryption

Williams, J., IJECS Volume 13 Issue 07 July, 2024 Page 26235

You might also like