Image Processing
Image Processing
net/publication/360251627
CITATION READS
1 469
2 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Seerwan Waleed Jirjees on 29 April 2022.
Control and Systems Engineering Department, University of Technology, Baghdad 10066, Iraq
https://doi.org/10.18280/mmep.090233 ABSTRACT
Received: 1 November 2021 Nowadays, when data is exchanged over the internet, the security of data is critical in
Accepted: 18 February 2022 every element of life. Unauthorized network access is possible due to information
transmission. As image usage increased in most communications, image privacy
Keywords: became an issue. Image encryption is one of the methods used to protect images online.
encryption image, image to text, image security, In this paper, we proposed a new approach called IMGTXT that converts the image to
histogram, entropy, decryption image, text by coding the pixel values depending on locations then encrypts them by any trust
cryptography, brute force encryption text algorithm, so that this method provides resistance to a variety of attacks
such as histogram attacks and brute force attack. The state of the art of this research is
the image is represented as a text and there is no relationship between the cipher-image
and the plain image. Although this results in a large data volume. The proposed
technique builds and testes on various images with different sizes, the recorded results
demonstrate the technique’s efficacy and robustness to resist the brute force attack and
statistical cryptanalysis of original and encrypted images.
539
stays image. Hamad and Farhan [12] also used Shuffling converts the image to text. The second one encrypts text using
scheme for encryption, they used two phases in the first one a suitable encryption algorithm shown in Figure 2.
used S-Box and in the second depended on shifting and The proposed system is started with reading an input image
rotation to create a secret key for chaotic map, The method I which [R, C] size, as known, the color image consists from
used in the proposed is the traditional method, which converts three patterns (P) for primary colors Red, Green and Blue, so
a plain image to another, but in an encrypted way. there are three layers for this image each [R, C] size, then
One such exclusive technique for data security and safety is numerates each pattern with different value, after that, the
image encryption. Gladwin and Gowthami [13] studied a new software program reads all pixels in each pattern individually,
approach of ciphertext and coefficients of an image, embedded each pixel has contrast value (X) from 0 to 255, in other words,
into the base image based on LSB watermarking, this study the system reads RXCX×3, then refers to each pixel with four
demonstrated strong cipher text embedded in the image, but as parameters [Pattern code, Pixel value, Row, Column] as
the previous study, the final form is the image with ciphered denoted in Eq. (1) and Figure 3, these final parameters will
text. Farah et al. [14] also used chaotic and Jaya optimization convert to file text then will encrypt by any type of encryption
algorithms based Lyapunov exponents and entropy measure, method.
to get nonlinear output, Masood et al. [15] also used chaotic
and Julia set. Another encryption algorithm. It’s proposed in
Ref. [16] that the undersized 4-bit matrix suggested addicted
to an enhanced logistic category and for location scrambling
plus the XOR arrangement of the extreme 4-bit matrix and the
basic used then two matrices are joined into image matrix
which is of 8-bit. This algorithm is used a static method to
encrypt the image as the previous algorithms unlike our
algorithm, it is possible to change the encryption. Hua et al.
[17] used chaotic encryption for image, they presented a new
2D chaotic map based on standard logistics and tent, they
called 2D-LTMM, authors showed this method can effectually
fight security attacks, Abd Aljabar et al. [18] suggested
Encryption VoIP based on Generated Biometric Key for RC4
Algorithm to encrypt the voice data before transmitting it over
the network, by creating encryption key using face biometric
recognition, the waveform of transmitted voice different from
the original one.
In light of these previous techniques, we propose a new
image encryption method that makes it more difficult for
attackers to discover the true index of image data by
converting it to ciphertext. The proposed algorithm is dynamic.
It is possible to change the way the image values are encoded
and converted into text. Also, the type of algorithm used to
encode the text can be changed according to the system
designer, this makes it resistant to many attacks, including
brute force, and this makes it difficult to penetrate.
3. IMGTXT PROPOSED APPROACH Figure 1. IMGTXT proposed for encryption and decryption
process
The suggested work introduces a novel cryptographic
system capable of resolving difficulties with traditional The last phase for the proposed system is the cryptographic
cryptographic methods in histogram and entropy that used algorithm that was used to encrypt encoding data in the
disrupting pixel positions or changing pixel values. Previous step. The encryption algorithm used is of a
IMGTXT proposed converts RGB pixels for image symmetric type with a single key to encrypt and decrypt the
encryption to encrypt text that illustrated in Figure 1. This data. as it is possible to use any method. Any method can be
technique involves, firstly create a matrix of each Numerical used with any different size of the key that depends on the
pixel value (0-255) from the input color image and then designer of the system, but it must be taken into account that
represent a value by indexing its (row and Colum) to get the the strength of the encryption and the size of the key give a
coding value, finally after encoding all together, it will be good ciphertext, an AES cipher with a key size of 128 bits was
encrypted to create ciphertext. This work has three phases. used and it presented very satisfactory results.
• Encoding pixels for the encryption process.
• Decoding pixels for the decryption process. Encoding character= P & X & R& C (1)
• Conventional cryptographic method for a text that used a
key for both encryption and decryption. 1 if image selection is Red
where, P = 2 if image selection is Green (2)
3.1 Encryption algorithm 3 if image selection is Blue
For image encryption, two techniques are used. The first one
540
Figure 2. The proposed encryption algorithm
The first stage of the decryption process begins with The implementation is done on python environment by
converting the ciphertext into plain text, which represents the using HP 15-dw2000, with Intel(R) Core (TM) i7-1065G7
pixel contrast encoding of the image, and it is done with the CPU @ 1.50 GHz and 16.0 GB RAM. The encryption method
same algorithm used for the encryption and with the same key. used in the results is the AES algorithm, with a key size of 128
Second, the plain text will represent the image data, where bits [19].
it will be decoded and converted into three matrixes that Measurement of the time required to encrypt an image is
represent the RGB colors that make up the image. Figure 4 another important factor in evaluating the efficiency of
shows the method used to decode the data, where the process algorithms. the time taken is the sum of the coding image
of reading each four numbers will be done independently, process and the process of encryption algorithm of text. Table
through which the type of matrix used will be determined by 1 shows the time taken for coding pixels plus the time for the
Through Pattern Number, then put the value of the pixel value ciphertext for three different sizes of images by using the AES
in the specified place depending on the values of the row and encryption algorithm with 128 bits key size.
column.
541
4.1 Histogram analysis Figure 3 the results show that the ciphertext is very different
from the original image.
The histogram of an image shows how the pixels in the The image histogram shows that the distribution of pixels in
image are distributed at different levels of colors.in traditional the original image at different levels of colors does not affect
image encryption, The histogram of the encrypted image must the ciphertext and thus does not provide evidence of the use of
be fairly regular and differ significantly from the histograms any statistical attack on the proposed image encoder because
of the original image that means that the numbers (0 - 255) are the data that will be encrypted is the locations of pixel values
their number almost equal, and thus provides no evidence for so that the results of our final pattern file are text and not image
the use of any statistical attack [20-23]. and the attacker will not be able to analyses the histogram of
The histogram of cipher image in our proposed method has text., this is one of the strong points of our research. as shown
no effect because the image will transform into ciphertext, in in Figure 5.
Image size
255*255 512*512 1024*1024
Process
Coding time Total time Coding time Total time Coding time Total time
(sec) (sec) (sec) (sec) (sec) (sec)
Encryption 0.521 0.582 0.983 1.112 3.263 3.403
Decryption 0.093 0.124 0.511 0.594 1.0882 1.116
542
Table 2. Comparison analysis
Result Analysis Image to Image Encryption Approach Image to Text Encryption Approach (Proposed System)
The values of pixels have approximately
Histogram Analysis Not effected
equal values
Entropy Must near to 8 Not effected
Password Space less than probability More than probability
Static size (depending on the type of Dynamic size (depending on which type of encryption
Key Size
encryption algorithm) algorithm can be used for encryption text)
Increase in size by the number of pixels that used for
Output Cipher Size Same of plain image
encoded
4.2 Brute force analysis Encryption Method that used an image to text technique that
is capable of resolving the issues associated with established
A good encryption system counters brute force attacks with conventional cryptographic methods, with ideal processing
a design that has a key area large enough to make brute force time for encryption and decryption as demonstrated in results
attacks infeasible [24, 25]. In our encryption algorithm, pixel (Table 1). Although the proposed encryption technique is not
value encoding is used as a chaotic scheme for composing the superior to the popular encryption algorithms in terms of size.
text before the encoding process begins. The content of the For this technique there is no need to displace the pixel and
image information will be changed to values based on their change the bit values, pixel values are coded and rearranged
locations. The encoding size of the encoded text will be Then they are encrypted to obtain the cipher image but in text
relatively large compared to the image size, and this makes it method. Multiple ways to encode pixel values for the image
difficult for the hacker to parse the large size of the ciphertext. into text, as well as multiple choice of algorithm to encode the
The strengths of our proposal to resist brute force attacks text, makes it impossible for attackers to crack the IMGTXT
are the following points. algorithm and detect the plain image from the ciphertext.
A) Several methods can be used to encode image pixels and
below we explain three different scenarios for encoding pixel
values. REFERENCES
Serial numbers: coding the values (0-255), By creating a
default table for each value and then searching for it in all [1] Denning, D.E.R., Robling, E. (1982). Cryptography and
images by selecting the line and column and encoding it, and Data Security. Vol. 112. Reading: Addison-Wesley.
then moving to the other value as described in algorithm 1. [2] Pawar, H.R., Harkut, D.G. (2018). Classical and
• Row by row: coding all values row by row in RGB images quantum cryptography for image encryption &
Independently. decryption. In 2018 International Conference on
• Column by column: coding all values column by column Research in Intelligent and Computing in Engineering
in RGB images Independently. (RICE), San Salvador, El Salvador, pp. 1-4.
http://doi.org/10.1109/RICE.2018.8509035
B) Use any symmetric text encryption algorithm with any [3] Rao, K.S., Sridhar, M. (2021). A novel image encryption
key size to encrypt coding text. using parity based visual cryptography. Ingénierie des
It is worth noting the concept of this type of attack is Systèmes d'Information, 26(1): 135-142.
password space, Each pixel is encoded with 4 numbers, the https://doi.org/10.18280/isi.260115
image in size r*c will be r*c*4 after converting it to text. The [4] Kumar, T., Chauhan, S. (2018). Image cryptography with
total number of key lengths (L) is 2L and Each pixel is encoded matrix array symmetric key using chaos based approach.
with 4 numbers, the image in size r*c will be r*c*4 after International Journal of Computer Network and
converting it to text. Therefore, the password space of the Information Security, 10(3): 60-66.
proposed scheme denoted by (Ps) can e calculated in the https://doi.org/10.5815/ijcnis.2018.03.07
following expression. [5] Elhoseny, M., Shankar, K., Lakshmanaprabu, S.K.,
Maseleno, A., Arunkumar, N. (2020). Hybrid
Ps=𝟐𝑳 × (
𝒓×𝒄×𝟒
) (3) optimization with cryptography encryption for medical
𝑳 image security in the Internet of Things. Neural
Computing and Applications, 32(15): 10979-10993.
4.3 Entropy https://doi.org/10.1007/s00521-018-3801-x
[6] Herbadji, D., Derouiche, N., Belmeguenai, A., Herbadji,
The entropy of a cipher picture is used to determine the level A., Boumerdassi, S. (2019). A tweakable image
of uncertainty present in it [26]. The result of the encryption encryption algorithm using an improved logistic chaotic
will be text, so the entropy of the image has no effect. map. Traitement du Signal, 36(5): 407-417.
In Table 2, it shows a comparison of the proposed algorithm, https://doi.org/10.18280/ts.360505
which uses the image-to-text conversion method, with other [7] Li, M., Lu, D., Xiang, Y., Zhang, Y., Ren, H. (2019).
encryption methods, which use the image-to-image Cryptanalysis and improvement in a chaotic image
conversion method. cipher using two-round permutation and diffusion.
Nonlinear Dynamics, 96(1): 31-47.
https://doi.org/10.1007/s11071-019-04771-7
5. CONCLUSION [8] Akhshani, A., Akhavan, A., Lim, S.C., Hassan, Z. (2012).
An image encryption scheme based on quantum logistic
This paper proposes a novel implementation of the Image map. Communications in Nonlinear Science and
543
Numerical Simulation, 17(12): 4653-4661. http://doi.org/10.1016/j.ins.2020.09.032
https://doi.org/10.1016/j.cnsns.2012.05.033 [18] Abd Aljabar, R.W., Hassan, N.F. (2021). Encryption
[9] Singh, L.D., Singh, K.M. (2015). Image encryption using VoIP based on generated biometric key for RC4
elliptic curve cryptography. Procedia Computer Science, algorithm. Engineering and Technology Journal, 39(1B):
54: 472-481. 209-221. http://doi.org/ 10.30684/etj.v39i1b.1755
https://doi.org/doi:10.1016/j.procs.2015.06.054. [19] Mewada, S., Sharma, P., Gautam, S.S. (2016).
[10] Chai, X., Gan, Z., Lu, Y., Chen, Y., Han, D. (2017). A Exploration of efficient symmetric AES algorithm. In
novel image encryption algorithm based on the chaotic 2016 Symposium on Colossal Data Analysis and
system and DNA computing. International Journal of Networking (CDAN), Indore, India, pp. 1-5.
Modern Physics C, 28(05): 1750069. https://doi.org/10.1109/CDAN.2016.7570921
https://doi.org/10.1142/S0129183117500693 [20] Rao, G.S., Srikrishna, A. (2021). Image pixel contrast
[11] Zhang, X., Wang, L., Niu, Y., Cui, G., Geng, S. (2019). enhancement using enhanced multi histogram
Image encryption algorithm based on the h-fractal and equalization method. Ingénierie des Systèmes
dynamic self-invertible matrix. Computational d’Information, 26(1): 95-101.
Intelligence and Neuroscience, 2019: 9524080. https://doi.org/10.18280/isi.260110
https://doi.org/10.1155/2019/9524080 [21] Chen, Y.Y., Hua, K.L., Tsai, Y.C., Wu, J.H. (2021).
[12] Hamad, A.S., Farhan, A.K. (2020). Image encryption Photographic reproduction and enhancement using HVS-
algorithm based on substitution principle and shuffling based modified histogram equalization. Sensors, 21(12):
scheme. Engineering and Technology Journal, 38(3): 98- 4136. https://doi.org/10.3390/s21124136
103. https://doi.org/10.30684/etj.v38i3b.433 [22] Alkhalid, F.F., Hasan, A.M., Alhamady, A.A. (2021).
[13] Gladwin, S.J., Gowthami, P.L. (2020). Combined Improving radiographic image contrast using multi
cryptography and steganography for enhanced security in layers of histogram equalization technique. IAES
suboptimal images. In 2020 International Conference on International Journal of Artificial Intelligence, 10(1):
Artificial Intelligence and Signal Processing (AISP), 151-156. https://doi.org/10.11591/ijai.v10.i1.pp151-156
Amaravati, India, pp. 1-5. [23] Mahdi, S.A. (2021). An improved method for combine
https://doi.org/10.1109/AISP48273.2020.9073306 (LSB and MSB) based on color image RGB. Engineering
[14] Farah, M. A., Farah, A., Farah, T. (2020). An image and Technology Journal, 39(1B): 231-242.
encryption scheme based on a new hybrid chaotic map http://dx.doi.org/10.30684/etj.v39i1B.1574
and optimized substitution box. Nonlinear Dynamics, [24] Tirado, E., Turpin, B., Beltz, C., Roshon, P., Judge, R.,
99(4): 3041-3064. https://doi.org/10.1007/s11071-019- Gagneja, K. (2018). A new distributed brute-force
05413-8 password cracking technique. In International
[15] Masood, F., Ahmad, J., Shah, S.A., Jamal, S.S., Hussain, Conference on Future Network Systems and Security,
I. (2020). A novel hybrid secure image encryption based Paris, France, pp. 117-127. https://doi.org/10.1007/978-
on Julia set of fractals and 3D Lorenz chaotic map. 3-319-94421-0_9
Entropy, 22(3): 274. https://doi.org/10.3390/e22030274 [25] Agarwal, A.K., Rani, L., Tiwari, R.G., Sharma, T.,
[16] Jabirulah, M., Srinivas, A., Kavitha, P. (2020). A digital Sarangi, P.K. (2021). Honey encryption: Fortification
image encryption algorithm based on bit-planes and an beyond the brute-force impediment. In Advances in
improved logistic map. In Recent Trends and Advances Mechanical Engineering, pp. 673-681.
in Artificial Intelligence and Internet of Things, pp. 109- https://doi.org/10.1007/978-981-16-0942-8_64
118. https://doi.org/10.1007/978-3-030-32644-9_12 [26] Ye, G., Pan, C., Huang, X., Zhao, Z., He, J. (2018). A
[17] Hua, Z., Zhu, Z., Yi, S., Zhang, Z., Huang, H. (2021). chaotic image encryption algorithm based on information
Cross-plane colour image encryption using a two- entropy. International Journal of Bifurcation and Chaos,
dimensional logistic tent modular map. Information 28(1): 1850010.
Sciences, 546: 1063-1083. https://doi.org/10.1142/S0218127418500104
544