A Proposed Model For Text and Image Encryption Using Different Techniques
A Proposed Model For Text and Image Encryption Using Different Techniques
Corresponding Author:
Shihab A. Shawkat
Department of Quality Assurance and Academic Performance, University of Samarra
Samarra, Iraq
Email: [email protected]
1. INTRODUCTION
The data security is one of the most important challenges facing the human since different eras
because of their relationship and close to a lot of important things in the life of rights, such as the security of
nations, preserving the lives of people from terrorist attacks, as a significant impact on trading, economic [1].
Therefore, there’re interested researchers in this area and especially after the increase in piracy and spy on
information, where many of the academic research conducted in this area operations. The difficulty of
finding a complete definition or full definition of artificial intelligence but not defined in the following that it
is the study of ideas in a way that enables the computer to deal in a smart [2], [3]. Data encryption is a way of
protecting the data that’s based on artificial intelligence. The encryption is necessary in the internet
applications of the image as it is the use of encryption to protect the images or data in transit across networks
such as (network internet and mobile phones and wireless communication systems and Bluetooth devices) [4].
Because of its ability to compressed steam, the discrete cosine transform (DCT) technique is considered one
of the most common techniques used in a wide variety of image detection and advanced forecasting
applications. In some variables, it condenses most of the data transmission [5]. The sparse representation
(SR) being a powerful and very important tool for acquiring and compressing high-dimensional signals, and
this success for the sparse representation originally due to the fact the important categories of brands such as
images and sound [6]. Rivest Shamir Adleman (RSA) encryption algorithm is the way of the use of certain
keys where the information is encrypted in a manner that is understandable when viewed by unauthorized
people to look at it when they penetrate the system [7]. This paper introduces a new technique that uses the
combination of sparse and DCT to enhance recognition rate. It also proves that XOR operation can be used
on colored image encrypt and decryption and show the use of RSA 3 key (RSA3k) algorithm on text
encryption and decryption based on square root operation. Section 2 outlines prior work for
encryption/decryption algorithms, section 3 presents the proposed method, section 4 the output and
evaluation, section 5 the experimental findings, and section 6 the conclusion and potential research.
2. PREVIOUS WORKS
Most previous works of the have hidden a particular text or image based on chaotic systems to
generate random chains determine the map of the spread of secret data was used. Facial detection using
separate covariance translate pouch (DCT) detects global and regional forms on the anterior margin of a face
images, according to Rezende [8]. Is cropped facial image obtained from the user that is extracted facial image
in front of me only, it is divided based on pixel images. Sookhak et al. [9] provided an approach in conjunction
with RSA algorithms and digital signature. They merged a unique ability to control technology-based access
with authentication to mutual basis data security and efficiency in cloud computing. Nag et al. [10] adopted a
hybrid cryptography method that encrypts the image processor that use the reverse process after rearranging
the pixel values to use the invariant transformation. They use an invariant switch up with four 8-bit keys that
reallocate the pixel to various locations. The factors external then is divided into 2 pixels by 2-pixel frames,
with each region being encoded with four 8-bit keys using reverse process. The technique requires a 64-bit
total key size. The association between adjacent pixels was drastically decreased after the affine transform,
according to their findings. Thabit et al. [11] proposed methodology included various clouds that will be
available for use by the user. But before using cloud computing service user to register, during user
registration you will need to choose the encryption algorithm and then the user enters the security key to be
used to encrypt the data for this user only. After the end user registration process will get to know different
keys that can be used to encrypt/decrypt the data that the user will be stored via cloud. Kumari et al. [12]
provided a symmetric key image encryption technique based on the first step to change locations every pixel
in the image using a bit sub-key 4 and 8 then the coding pixel values by XOR and identification keys 8-bit
where XOR process that change the values of each pixel has been tested on various gray scale images
256×256 showed the results well. Seyedzade et al. [13] suggested a new encryption technique centered on the
SHA-512 hash function. The algorithm is split into two categories: the first performs a data pre-processing
process to move half of the picture. The hash value is used in the first to create a randomization block.
The masks then are XORed with the picture’s other portion, which will be coded. Waschke [14] provide
mythology for address the development of design for data encryption as well as we unzip encrypted in a
network environment using the RSA algorithm with a given type size. The algorithm allows the sender of a
message to employ staple keys to encrypt the message and the recipient is sent a special key that was created
using a data base reserved. Key special incorrect still will decode the encrypted message, but in a different
way from the original message. Otaibi and Gutub [15] proposed safe image data using a combination of
several encryption techniques and permutations, they purposed of their work present security in the pictures,
which is the main purposed of the system data increase. The images file encryption and decryption data
encryption done in such a way that makes it convenient for users. Barazanchi et al. [16] looks at the
fundamentals of cryptography and reflects on the evolution of RSA and increasing the sophistication of the
secret system to create a more secure in programs. We will focus on the Hash function in this venture by
introducing certain flexibility to the 3keys (3k) This implementation would improve the application’s safety
and sophistication while keeping the encryption and authentication times the same. The study also outlines
how cryptography can be used to improve cryptography. Furthermore, the RSA method generates dual
protection.
A proposed model for text and image encryption using different techniques (Shihab A. Shawkat)
860 ISSN: 1693-6930
1 1
2
2 2 2 𝜋⋅𝑢 𝜋⋅𝑣
𝐹(𝑢, 𝑣) = ( ) ( ) ∑𝑁−1𝑀−1
𝑖=0
𝑀
Λ𝑗=0 Λ(𝑖). Λ(𝑗) ⋅ cos [ (2𝑖 + 1)] cos [ (2𝑗 + 1)] ⋅ 𝑓(𝑖, 𝑗}} (1)
𝑁 𝑀 2⋅𝑁 2⋅𝑀
The DCT function in row 𝑘1 and column 𝑘2 of the cotter is 𝐹 (𝑢, 𝑣). 𝐹 (𝑖, 𝑗) is the device’s strength
in row 𝐼 and column 𝑗; in most pictures, the control output is concentrated at lower energies, which appear
inside the DCT’s upper left corner. Because the lower right caught up different speeds, analysis is done
because they are mostly small - small enough to still be ignored with no apparent noise. The following
equation for a signal’s local features (SR) in an overcomplete vocabulary. The question of local features is to
find a 𝑀1 vector vector x such that 𝑦 = 𝐴𝑥 and ||𝑥||0 is minimized [19], i.e. given a 𝑁 𝑀 matrix 𝐴
comprising the items of an over full vocabulary in its rows, with 𝑀 > 𝑁 and typically 𝑀 >> 𝑁, and a signal
𝑦 RN.
𝑥 = 𝑚𝑖𝑛 ∥ 𝑥′ ∥ 0 𝑠. 𝑡. 𝑦 = 𝐴𝑥 ∥ (2)
Where ||𝑥||0 is the ℓ0 norm and is equivalent to the number of non-zero components in the vector 𝑥.
Figure 1. Detailed representation of the proposed scheme of image (encryption and decryption)
In this proposed begin the upload a video, after starting the video, the application uses only sparse
representation algorithm to make authentication and recognition and return the time taken in the database
searching and loading. The same process is made but using our proposed combination of DCT and sparse
algorithms. Then is supposed to where the photo that would be encrypted by using XOR operation. The XOR
operation are used to encrypt and decrypt color images, also peak signal-to-noise ratio (PSNR) are used to
show the difference between two images, and the mean squared error (MSE) to extract the rate error and bit
error rate (BER).
TELKOMNIKA Telecommun Comput El Control, Vol. 20, No. 4, August 2022: 858-866
TELKOMNIKA Telecommun Comput El Control 861
Figure 2. Detailed representation of the proposed scheme of text (encryption and decryption)
After authentication, the user would have two systems a system that makes encryption and
decryption for the authenticated image of person and a system that makes encryption and decryption for text.
If the user chooses to use the text encryption system. After the encryption process using RSA3k is complete a
time of encryption and uploading is computed, and the cipher text is shown to the user using Matlab. Then after
that, the asked to enter the private password and when the decryption process using RSA3k is finished a new
window is shown to the user using Matlab.
A proposed model for text and image encryption using different techniques (Shihab A. Shawkat)
862 ISSN: 1693-6930
4.1. PSNR
PSNR refers to the accuracy of the secret text in compared to the traditional image. It measures the
encrypted picture’s perceptual quality. To put it another way, it measures and analyses how close two figures
are. The greater the PSNR of an encrypted picture, the higher the efficiency of the encrypted picture or the
greater the robustness of the cipher text. The PSNR is determined by using the calculation:
𝐼2
𝑃𝑆𝑁𝑅 = 10 𝑙𝑜𝑔10 [ ] (3)
𝑀𝑆𝐸
Where 𝐼 is the largest achievable value of a pixel in the image (for example, the peak amount for a gray
image is 255) and MSE seems to be the sum of squares.
4.2. MSE
The degree of average value between both the main image and the encrypted image is calculated
using the MSE function. The discrepancy between both the predicted data of the initial and encrypted images
is rounded, and the mean is then measured. When there are a lot of bugs, the RMSE is used. This is due to the
fact that it gives these mistakes a bunch of fat. The MSE is calculated as:
m
1
MSE= [ ∑𝑛 ∑ (Xij Yij )2 (4)
R×C]2 𝑖=0 j=1
𝑋𝑖𝑗 is the strength of 𝑋𝑖𝑗 the pixel in the cover picture, and 𝑌𝑖𝑗 seems to be the strength of 𝑌𝑖𝑗 the pixel in the
steganographic, where 𝑅 and 𝐶 are the number of rows or columns in the cover picture, 𝑋𝑖𝑗 is the strength of
𝑋𝑖𝑗 the pixel in the cover photo, and 𝑌𝑖𝑗 is the frequency of 𝑌𝑖𝑗 the segment in the steganography, respectively.
4.3. BER
The quantity obtained in error divided by the number of bits transmitted is known as the data rate
(BER). The BER can be calculated by measuring the likelihood of a bit being provided wrongly leading
towards sound. The BER is a straightforward term with a straightforward description and calculation.
𝑅𝑒𝑐𝑜𝑔𝑛𝑖𝑡𝑖𝑜𝑛 𝑅𝑎𝑡𝑒 = (𝑛𝑜. 𝑜𝑓 𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑙𝑦 𝑖𝑑𝑒𝑛𝑡𝑖𝑓𝑖𝑒𝑑 𝑖𝑚𝑎𝑔𝑒𝑠/𝑡𝑜𝑡𝑎𝑙 𝑛𝑜. 𝑜𝑓 𝑖𝑚𝑎𝑔𝑒𝑠) × 100 (6)
5. EXPERIMENTAL RESULTS
The comparison between a combination of a sparse representation algorithm and DCT and sparse
representation algorithm alone using database. A make a comparison between recognition rate and database
loading and searching time between two different algorithms. The result will show that combination provide
better recognition rate, the user database description consists of: (total number of images: 100, number of
images per person: 4, total number of persons: 25).
TELKOMNIKA Telecommun Comput El Control, Vol. 20, No. 4, August 2022: 858-866
TELKOMNIKA Telecommun Comput El Control 863
recognition rate. The following Table 1 illustrates the difference between combination of DCT and SR, and
SR alone in database loading time. Which will be in the form of database loads from (block 8×8) to (block
128×128) and that have been worked on successively and the results will show the difference between these
loads.
The difference between the combination of DCT and SR, SR alone in database searching time are
shown in following Table 2. Which will be in the form of database loads from (block 8×8) to (block
128×128) and that have been worked on successively and the results will show the difference between these
loads. It shows that DCT and SR, SR combination decrease database searching time.
A proposed model for text and image encryption using different techniques (Shihab A. Shawkat)
864 ISSN: 1693-6930
2 Image 2
PSNR 65.5861
MSE 0.0180
BER 0
Time 0.084077
encrypt
Time 0.021103
decrypt
3 Image 3
PSNR 67.0376
MSE 0.0012
BER 0
Time 0.026895
encrypt
Time 0.089263
decrypt
4 Image 4
PSNR 68.4774
MSE 0.0092
BER 0
Time 0.096635
encrypt
Time 0.028295
decrypt
5 Image 5
PSNR 75.2070
MSE 0.0020
BER 0
Time 0.091629
encrypt
Time 0.024666
decrypt
TELKOMNIKA Telecommun Comput El Control, Vol. 20, No. 4, August 2022: 858-866
TELKOMNIKA Telecommun Comput El Control 865
REFERENCES
[1] S. Sicari, A. Rizzardi, L. A. Grieco, and A. C. -Porisini, “Security, privacy and trust in Internet of Things: The road ahead,”
Computer Networks, vol. 76, pp. 146–164, 2015, doi: 10.1016/j.comnet.2014.11.008.
[2] S. Abt and H. Baier, “Are We Missing Labels? A Study of the Availability of Ground-Truth in Network Security Research,” 2014
Third International Workshop on Building Analysis Datasets and Gathering Experience Returns for Security (BADGERS), 2014,
pp. 40-55, doi: 10.1109/BADGERS.2014.11.
[3] S. S. C. Silva, R. M. P. Silva, R. C. G. Pinto, and R. M. Salles, “Botnets: A survey,” Computer Networks, vol. 57, no. 2,
pp. 378–403, 2013, doi: 10.1016/j.comnet.2012.07.021.
[4] Ü. Çavuşoğlu, A. Akgül, S. Kaçar, İ. Pehli̇ van, and A. Zengin, “A novel chaos‐based encryption algorithm over TCP data packet
for secure communication,” Security and Communication Networks, vol. 9, pp. 1285–1296, 2016, doi: 10.1002/sec.1414.
[5] R. Sudhakar, R. Karthiga, and S. Jayaraman, “Image compression using coding of wavelet coefficients–a survey,” ICGST-GVIP
Journal, vol. 5, no. 6, pp. 25–38, 2005. [Online]. Available: https://static.aminer.org/pdf/PDF/000/320/249/
adaptive_subband_image_coding_considering_spatial_relationship_on_hierarchical_pyramid.pdf
[6] F. Li, L. Xin, Y. Liu, J. Fu, Y. Liu, and Y. Guo, “High efficient optical remote sensing images acquisition for nano-satellite
framework,” Sensors, Systems, and Next-Generation Satellites XXI, 2017, doi: 10.1117/12.2278171.
[7] S. A. Shawkat, “Enhancing Steganography Techniques in Digital Images,” Thesis, Faculty of Computers and Information,
Mansoura University Egypt, 2016, doi: 10.13140/RG.2.2.16678.57925.
[8] M. V. Rezende, “Evaluation of Face Recognition Technologies for Access Authentication in Automotive Passive Entry Systems
with Near Infrared Camera,” Projetos e Dissertações em Sistemas de Informação e Gestão do Conhecimento, vol. 4, 2015.
[Online]. Available: https://www.semanticscholar.org/paper/Evaluation-of-Face-Recognition-Technologies-for-in-
Rezende/b051ffe615b55278eb9449cd6db543ce5fa3c288.
[9] M. Sookhak, F. R. Yu, M. K. Khan, Y. Xiang, and R. Buyya, “Attribute-based data access control in mobile cloud computing:
Taxonomy and open issues,” Future Generation Computer System, vol. 72, pp. 273–287, 2017, doi: 10.1016/j.future.2016.08.018.
[10] A. Nag et al., “Image encryption using affine transform and XOR operation,” 2011 International Conference on Signal
Processing, Communication, Computing and Networking Technologies, 2011, pp. 309-312, doi: 10.1109/ICSCCN.2011.6024565.
[11] F. Thabit, S. Alhomdy, A. H. A. Al-Ahdal, and S. Jagtap, “A new lightweight cryptographic algorithm for enhancing data security
in cloud computing,” Global Transitions Proceedings, 2021, vol. 2, no. 1, pp. 91–99. doi: 10.1016/j.gltp.2021.01.013.
[12] M. Kumari, S. Gupta, and P. Sardana, “A survey of image encryption algorithms,” 3D Research, vol. 8, no. 4, p. 37, 2017,
doi: 10.1007/s13319-017-0148-5.
[13] S. M. Seyedzade, S. Mirzakuchaki, and R. E. Atani, “A novel image encryption algorithm based on hash function,” 2010 6th
Iranian Conference on Machine Vision and Image Processing, 2010, pp. 1–6, doi: 10.1109/IranianMVIP.2010.5941167.
[14] M. Waschke, Personal cybersecurity: how to avoid and recover from cybercrime, Apress, 2017, doi: 10.1007/978-1-4842-2430-4.
[15] N. A. Al-Otaibi and A. A. Gutub, “2-leyer security system for hiding sensitive text data on personal computers,” Lecture Notes on
Information Theory, vol. 2, no. 2, pp. 151–157, 2014, doi: 10.12720/lnit.2.2.151-157.
[16] I. Al Barazanchi, S. A. Shawkat, M. H. Hameed, and K. S. L. Al-Badri, “Modified RSA-based algorithm: A double secure
approach,” TELKOMNIKA Telecommunication, Computing, Electronics and Control, vol. 17, no. 6, pp. 2818–2825, 2019,
doi: 10.12928/telkomnika.v17i6.13201.
[17] J. Shermina, “Illumination invariant face recognition using Discrete Cosine Transform and Principal Component Analysis,” 2011
International Conference on Emerging Trends in Electrical and Computer Technology, 2011, pp. 826-830,
doi: 10.1109/ICETECT.2011.5760233.
[18] W. Liu, Z. Wang, X. Liu, N. Zeng, Y. Liu, and F. E. Alsaadi, “A survey of deep neural network architectures and their
applications,” Neurocomputing, vol. 234, pp. 11–26, 2017, doi: 10.1016/j.neucom.2016.12.038.
[19] S. S. Hameed, H. R. Abdulshaheed, Z. L. Ali, and H. M. Gheni, “Implement DNN technology by using wireless sensor network
system based on IOT applications,” Periodicals of Engineering and Natural Sciences (PEN), vol. 10, no. 2, pp. 128-137, 2022,
doi: 10.21533/pen.v10i2.2831.
[20] D. Singh, I. Nath, and P. K. Singh, “Security and Privacy Challenges in Big Data,” Research Anthology on Privatizing and
Securing Data. IGI Global, 2021. doi: 10.4018/978-1-5225-9742-1.ch004.
[21] Y. Yu et al., “Cloud data integrity checking with an identity-based auditing mechanism from RSA,” Future Generation Computer
System, vol. 62, pp. 85–91, 2016, doi: 10.1016/j.future.2016.02.003.
[22] S. A. Shawkat and R. N. Ismail, “Biometric Technologies in Recognition Systems: A Survey,” Tikrit Journal of Pure Science,
vol. 24, no. 6, 2019, doi: 10.25130/j.v24i6.899.
[23] C. Thirumalai and H. Kar, “Memory efficient multi key (MEMK) generation scheme for secure transportation of sensitive data
over cloud and IoT devices,” 2017 Innovations in Power and Advanced Computing Technologies (i-PACT), 2017, pp. 1-6,
doi: 10.1109/IPACT.2017.8244948.
[24] V. R. Pancholi and B. P. Patel, “Enhancement of cloud computing security with secure data storage using AES,” International
Journal for Innovative Research in Science and Technology, vol. 2, no. 9, pp. 18–21, 2016. [Online]. Available:
https://www.semanticscholar.org/paper/Enhancement-of-Cloud-Computing-Security-with-Secure-Pancholi-Patel/
71fad1cfde27b7df42e9b4579f9a623830893029
[25] M. Dalal and M. Juneja, “A secure and robust video steganography scheme for covert communication in H. 264/AVC,”
Multimedia Tools and Applications, vol. 80, no. 9, pp. 14383–14407, 2021, doi: 10.1007/s11042-020-10364-z.
[26] S. A. Shawkat, K. S. L. Al-badri, and A. I. Turki, “The new hand geometry system and automatic identification,” Periodicals of
Engineering and National Scince, vol. 7, no. 3, pp. 996–1008, 2019, doi: 10.21533/pen.v7i3.632.
A proposed model for text and image encryption using different techniques (Shihab A. Shawkat)
866 ISSN: 1693-6930
[27] W. Wang and L. Xu, “A modified sparse representation method for facial expression recognition,” Computational Intelligence
and Neuroscience, vol. 2016, 2016, doi: 10.1155/2016/5687602.
[28] S. Dabbaghchian, M. P. Ghaemmaghami, and A. Aghagolzadeh, “Feature extraction using discrete cosine transform and
discrimination power analysis with a face recognition technology,” Pattern Recognition, vol. 43, no. 4, pp. 1431–1440, 2010,
doi: 10.1016/j.patcog.2009.11.001.
[29] A. R. Chadha, P. P. Vaidya, and M. M. Roja, “Face recognition using discrete cosine transform for global and local features,” in
2011 International Conference On Recent Advancements In Electrical, Electronics And Control Engineering, 2011, pp. 502–505.
doi: 10.1109/Iconraeece.2011.6129742.
BIOGRAPHIES OF AUTHORS
TELKOMNIKA Telecommun Comput El Control, Vol. 20, No. 4, August 2022: 858-866