0% found this document useful (0 votes)
14 views6 pages

Fast Selective Encryption Algorithms Based On Moments and Chaos Theory

This research article presents a novel selective encryption scheme for images based on chaos theory and moments transforms, specifically Tchebichef and Hahn moments. The proposed algorithms focus on encrypting only the most significant coefficients to enhance speed while maintaining security, and experimental results demonstrate their effectiveness compared to existing methods. The study concludes that the algorithms are secure and suitable for real-world applications, achieving a balance between encryption speed and security level.
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)
14 views6 pages

Fast Selective Encryption Algorithms Based On Moments and Chaos Theory

This research article presents a novel selective encryption scheme for images based on chaos theory and moments transforms, specifically Tchebichef and Hahn moments. The proposed algorithms focus on encrypting only the most significant coefficients to enhance speed while maintaining security, and experimental results demonstrate their effectiveness compared to existing methods. The study concludes that the algorithms are secure and suitable for real-world applications, achieving a balance between encryption speed and security level.
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/ 6

EAI Endorsed Transactions

on Internet of Things Research Article

Fast selective encryption algorithms based on


moments and chaos theory
Abdelhalim Kamrani1, *, Khalid Zenkouar1 and Said Najah1
1Laboratoryof Intelligent Systems and Application (LSIA), Faculty of Sciences and Technology, Sidi Mohamed
Ben Abdellah University, Fez, Morocco

Abstract

In this work, we propose a novel selective encryption scheme based on chaos theory and moments’ transforms,
two moments families were considered, namely Tchebichef and Hahn. The goal is to propose an ecryption
scheme that’s fast and can be deployed in real world scenarios. The proposed algorithms operate in the
transform domains of Tchebichef and Hahn moments. We encrypt only the most significant coefficients of
the moments transforms. First, we down-sample the computed moments’ matrices coefficients, then we use
two logistic maps for confusion and diffusion of the down-sampled Tchebichef’s and Hahn’s coefficients, the
resulting matrix is the encrypted image. This approach improves drastically the speed of the encryption
algorithm while keeping a “good” security level. In order to prove the capabilities of our algorithms, we run
different experiments and we test the algorithms on different criteria: MSE, correlation coefficient, differential
analysis, entropy and time performance. The obtained results prove that the encryption scheme proposed is
secure and outperform state-of-the-art algorithms.

Keywords: Image encryption, Tchebichef moments, Hahn moments, Selective encryption, Chaos encryption

Received on 27 July 2022, accepted on 20 July 2023, published on 24 July 2023

Copyright © 2023 Kamrani et al., licensed to EAI. This is an open access article distributed under the terms of the
Creative Commons Attribution license, which permits unlimited use, distribution and reproduction in any medium so
long as the original work is properly cited.

doi: 10.4108/eetiot.v9i2.2193
these algorithms can cause un-correlation between
pixels, which makes the compression process infeasible
1. Introduction [6]. The latter operate on the coefficients obtained in
the domain of transform, these algorithms are more
Information security plays a huge role in securing efficient, they can make lossless image recovery and are
and authenticating digital images. One of the main robust against operations of image processing [7]. In
techniques to secure data is through encryption [1]. The the literature, several transform domains for encryption
goal is to obscure the data in such a way that it is only were proposed, DCT [8], IWT [9] and FrDCT [10] to cite
available to authorized users. Encryption algorithms are a few. In recent years, an attempt was made to use image
continually developed and are in wide use for almost moments’ as a transform domain for encryption [11].
every online application. Traditional schemes such as The results showed a great encryption performance
IDEA, RSA and DES are particularly used for text-based for these algorithms and even outperformed the latest
encryption. As for image encryption, these algorithms algorithms.
were reported to be insufficient [2 ]. In fa ct , as a
consequence of intrinsic properties of images like high The main concern that arises when it comes to image
correlation among pixels and bulk data capacity; the encryption -or multimedia encryption in general- is the
text based encryption algorithms cannot be extended to speed vs. the security dilemma [12]. While the security
image encryption. For that regard, specific encryption is the main purpose of image encryption, the algorithm
algorithms intended to be used particularly with images should be fast enough to be deployed in real world
were developed [3–5]. applications. In fact the more we work on enhancing
Image encryption algorithms are categorized into two the security aspect of an algorithm the slower it gets
main categories, namely algorithms dealing with space [13]. Multiple works were introduced with the goal of
domain and algorithms using frequency domain. The reducing the time complexity of encryption algorithms
former operate directly on the pixels of the image while keeping an acceptable level of security [14–17].
and thus tend to be more time efficient. Meanwhile In this paper, we introduce two encryption algorithms
∗ that are fast and secure using selective encryption
Corresponding author. Email: [email protected]
EAI Endorsed Transactions on
1 Internet of Things
| Volume 9 | Issue 2 | e3
Kamrani et al.

and image moments. Two encryption algorithms were tn (x) is the discrete Tchebichef polynomials of degree n,
proposed based on Tchebichef and Hahn moments. given by:
The conducted experiments prove that the proposed
scheme is secure against all attacks and is fast enough tn (x) = (1 − N )x3 F2 (−n, −x, 1 + n; 1, 1 − N ; 1) (4)
to be deployed in day-to-day applications. This paper is
organized as follows: in the second section, the essential Where (a)n is the pochhammer symbol given by:
knowledge to understand our algorithms is proposed.
(a)k = a(a + 1)(a + 2)...(a + k − 1) (5)
The third section presents the proposed scheme in
details. In section four, we present the results of our and 3 F2 is defined as:
experiments, and finally a conclusion is presented in
section 5. ∞
X (a1 )k (a2 )k (a3 )k zk
3 F2 (a1 , a2 , a3 ; b1 , b2 ; z) = (6)
(b1 )k (b2 )k k!
2. preliminary knowledge k=0

Here we present the necessary background to com- Hahn moments. In 2005, Zhou [23] proposed a new
prehend the proposed approach. Two main concepts set of discrete orthogonal moment functions based on
are explained: chaos theory and moments transforms Hahn polynomials. The Hahn moments for an image
particularly Tchebichef and Hahn moments: f (x, y) are described as follows:
N −1 N −1
2.1. Moments theory X X µ,ν µ,ν
Hmn = f (x, y)h̃m (x, N )h̃n (y, N ) (7)
The first introduction of moments theory into image m=0 n=0
analysis was by Hu[18] in 1961. He proposed invariant
moments that found several applications [19, 20] due Where h̃ is the scaled Hahn polynomial described as:
to there capabilities of representing global features. The s
main disadvantage of these moments is that they are not µ,ν µ,ν ρ(x)
orthogonal and thus the reconstruction of the image is h̃n (x, N ) = hn (x, N ) (8)
dn2
not a trivial task.
Zernike and Legendre moments were the second next and dn2 is the square norm which has the following
category of moments that was proposed by Teague [21] expression:
in 1980. These moments are orthogonal and represent
2 Γ (2N + µ + ν − n)
information with minimal redundancy. Nevertheless, dn =
×
these moments had several disadvantages such as (2N + µ + ν − 2n − 1)Γ (N + µ + ν − n)
coordinate space transformation,large variation in the 1
dynamic range of values and numerical approximation
Γ (N + µ − n)Γ (N + ν − n )Γ ( n + 1) Γ (N − n )
of continuous integrals.
New set of orthogonal discrete moments have been
and ρ(x) is the weighting function which is given by:
proposed over the recent years, these moments use
1
discrete orthogonal polynomials as the basis set. Thus ρ(x) =
they have a superior image representation [22]. Γ (x + 1)Γ (x + µ + 1)Γ (N + ν − x)Γ (N − n − x)
µ,ν (9)
hn (x, N ) are the Hahn polynomials defined as:
Tchebichef moments. Tchebichef moments first intro- µ,ν
hn (x, N ) = (N + ν − 1)n(N − n 1k 1
duced by Mukundan et al. [22] and are defined as:
1)n × n (−1) (−n)k (−x)k (2N + µ − − ×
X +ν ) k!
k 1
N −1 N −1 x= (N = ν − 1)k (N
1 X X
0 − )k
Tpq = tp (x)tq (y)f (x, y) (1)
ρ(p, N )ρ(q, N )
x=0 y=0 (10)
Where (a)k is the pochhammer symbol.
And the inverse moment transform to construct the 2.2. Chaos encryption
original image given a set of moments Tpq :
The chaos encryption process is typically divided into
N
X −1 N
X −1 two main stages: The first s t age i s c a lled confusion,
f (x, y) = Tmn tm (x)tn (y) (2) the pixels are transposed with a random sequence
m=0 n=0 generated by a chaotic map without changing the values
Where tn (x) are the scaled Tchebichef polynomials of the pixels. This operation obscures the image but it is
expressed as not enough to make it secure. The second stage is called
t (x) diffusion; the pixels’ values are changed using a random
tn (x) = n (3) sequence. The confusion and the diffusion are repeated
β(n, N )
until a required level of security is achieved.
EAI Endorsed Transactions on
2 Internet of Things
| Volume 9 | Issue 2 | e3
Fast selective encryption algorithms based on moments and chaos theory

Figure 1. General scheme for chaos based encryption

3. The proposed algorithm 4. Diffusion: Another random sequence is generated


from Y with initial condition Y0 . Then this
In this work, a new encryption scheme is introduced
sequence is XORed with the array generated from
based on chaos and moments transforms. The proposed
step 3. The result is the encrypted image E.
scheme is based on selective encryption, which makes
it extremely fast without compromising the security
aspect. We propose two encryption algorithms based 3.2. Decryption
on the same scheme, the difference between the two Decryption is the inverse process of encryption, the goal
algorithms is the family of moments used; namely is to reconstruct the original image from the encrypted
Tchebichef and Hahn moments. In this section, we image. First we convert the encrypted image E to an
explain in details the encryption algorithms. array of size 96*96. This array is then XORed with
sequence generated by Y with initial condition Y0 . We
3.1. Encryption permute the resulted array according to the sequence
generated by X with intial condition X0 . this array is
1. Segmentation and Down Sampling: First the transformed to a 256*256 matrix by sampling, i.e. the
image is segmented into blocks of 8*8, then remaining pixels are put to zero. Then we compute the
we compute the moments’ coefficients for each inverse tchebichef and Hahn moments. Thus we end up
block. In order to speed the encryption process, with the decrypted image I’.
we down sample the matrix coefficients into a
matrix of 3*3. These coefficients encompass most
4. Experimental study
of the information and thus the image can be
represented by this down sample without much We present the results of our experiments in this
loss. section. Our proposed scheme is compared to state-of-
the-art algorithms to prove their efficiency. The results
2. Key generation: K is a key of length 128 bits, of these experiments are given below.
which is divided into 2 segments: K1 and K2 .The
logistic map used for encryption has as input a 4.1. Space key analysis
value between 1 and 0. We apply some operations
on the key segments in order to adopt them For a secure encryption scheme, the key-space must be
to the logistic map entry. Each segment Ki is larger than 2100 [24]. The proposed algorithms has 2128
presented by its binary form which can be noted possible combinations of encryption key.
as: K1 = K11 , K12 ...K164 .K2 = K21 , K22 ...K264 . The
input values for the logistic maps are calculated 4.2. Image similarity
as: X0 = (K11 20 + K12 21 + ... + K164 263 )/264 . Y0 = The proposed scheme is a “Lossy” image encryption
(K21 20 + K22 21 + ... + K264 263 )/264 Where X0 and since it only considers the most significant bits in the
Y0 are the inputs for the logistic maps X and Y. encryption process. To measure the “loss” during the
3. Confusion: We use the logisitic map X with the image reconstruction / decryption we use the Mean
input X0 to generate an array of size 96*96. The Squared Error (MSE), which is defined as:
matrix derived from step 1 is converted to an N −1 M−1
1 XX
array of size 9216 (96*96). This array is permuted MSE = [f (x, y) − g(x, y)]2 (11)
according to the map generated by X. NM
x=0 y=0

EAI Endorsed Transactions on


3 Internet of Things
| Volume 9 | Issue 2 | e3
Kamrani et al.

f (x, y) is the original image g(x, y) is the decrypted mathematically as:


image size M ∗ N PW PH
The algorithms in Refs [25–27], are lossless algo- i=1 j=1 D(i, j)
rithms which explains the value 0 of the MSE. i.e. N P CR = × 100 (17)
W ×H
the decrypted image perfectly matches the original
image. However, the proposed algorithms have some D(i, j) can be expressed as:
information lost due to the selective encryption process. 
Meanwhile the values of the MSE for the proposed 0, C1 (i, j) = C2 (i, j)


D(i, j) =  (18)
algorithms are close to 0, this means that the original 1, C1 (i, j) , C2 (i, j)

image and the decrypted image are similar and the
difference is unnoticeable to the naked eye. 1 hP P
W H |C1 (i,j)−C2 (i,j)|
i
U ACI = i=1 j=1 255
× 100 (19)
W ×H
4.3. correlation coefficient When UACI is around 33.4 and the NPCR is
approximately about 99.6, the encryption is considered
As a security measure, we should minimize the
resistant to differential attacks. We encrypt Lena,
similarity between the encrypted image and the original
Baboon and Cameraman pictures using the proposed
one. The correlation coefficient is a metric used just for
scheme and compare the results to state-of-the-art
that, it takes a value between -1 and 1. A value of 0
algorithms. From the tables 3 and 4, the NPCR
indicates no correlation between the compared image
values for the proposed algorithms are all higher
while a value of 1 is an indicator that the two images
than 99.8 and the UACI values are around to 31,
are perfectly correlated. The correlation coefficient is
which implies that the proposed algorithms are secure
defined as:
Cov(x, y) against differential attacks. Furthermor,e compared to
C.C = (12) other algorithms the proposed algorithms exhibit good
σx × σy
security performance.
p
σx = V AR(x) (13)
p 4.5. Entropy
σy = V AR(y) (14)
Entropy measures the randomness in a system. It is
N used for evaluating the security of an image encryption
1 X
V AR(x) = (xi − E(x))2 (15) scheme. A secure algorithm should increase the entropy
N by decreasing the mutual information among pixels.
i=1
For a message m The entropy H(m) can be measured by
N
1 X the formula:
Cov(x, y) = (xi − E(x))(yi − E(y)) (16)
N M−1
i=1 X 1
H(m) = p(mi )log (20)
y and x are positions of the pixels in the encrypted mi
i=0
image and plain image respectively, V AR(x) is the
variance for pixel x, Cov(x; y) is covariance, σx is the p(mi ) is probability of occurrence for the symbol mi and
standard deviation while N is the number of pixels. M denotes the number of all possible symbols. Ideally,
The results are presented in Table 2. We compute an entropy value of 8 means the source is completely
the correlation coefficient for vertical, horizontal and random, but realistically we can only reach values close
diagonal pixels. It is clear from the results that the to 8.
correlation coefficient is close to 0 for all the algorithms The results are depicted in Table 5, the entropy
including the proposed algorithms, this shows that the values for the encrypted images are all above 7.99
algorithms are secure against statistical attacks. which means all the algorithms pass the entropy test.
Moreover we see that our algorithms exhibit good
4.4. Differential analysis : NPCR & UACI results compared to other algorithms.

To demonstrate resistance to differential attacks, two


4.6. Speed Analysis
quantitative descriptors are used: NPCR and UACI,
they provide a security proof against chosen plaintext Our main contribution is developing a lightweight
attacks. The encryption scheme should show a good encryption algorithm, which is fast and secure at the
image sensitivity. same time. In order to validate the time performance
The encrypted image should show a qualitative aspect of our proposed scheme, we analyze the time
transformation if one pixel value is altered in the performance with different image sizes, i.e. 256 × 256,
original image. NPCR and UACI can be described 512 × 512 and 1024 × 1024 and compare the results

EAI Endorsed Transactions on


4 Internet of Things
| Volume 9 | Issue 2 | e3
Fast selective encryption algorithms based on moments and chaos theory

Table 1. MSE results

MSE Tchebichef Hahn Ref[25] Ref[26] Ref[27]


Lena 2.1 x 10-3 1.9 x 10-3 0 0 0
Baboon 1.6 x 10-4 2.6 x 10-3 0 0 0
Cameraman 7.3 x 10-4 2.4 x 10-4 0 0 0

Table 2. Correlation coefficient results

C.C Plain image Tchebichef Hahn Ref[25] Ref[26] Ref[27]


Horizontal 0.8263 0.039 0.0015 -0.0025 -0.088 0.0039
Vertical 0.9273 -0.0078 0.0092 0.00126 0.079 0.002
Diagonal 0.867 0.046 -0.0084 -0.006 0.096 0.076

Table 3. NPCR results

NPCR Tchebichef Hahn Ref[25] Ref[26] Ref[27]


Lena 99.8731 99.9807 99.9961 99.9961 99.9955
Baboon 99.9289 99.9304 99.9953 99.996 99.9958
Cameraman 99.8149 99.9712 99.9959 99.996 99.9956

Table 4. UACI results

UACI Tchebichef Hahn Ref[25] Ref[26] Ref[27]


Lena 31.712 31.144 33.232 33.198 33.174
Baboon 31.039 32.162 33.161 33.166 33.255
Cameraman 26.140 31.702 33.332 33.212 33.26

Table 5. Entropy results

Entropy Tchebichef Hahn Ref[25] Ref[26] Ref[27]


Lena 7.9924 7.9968 7.9964 7.9967 7.996
Baboon 7.996 7.9944 7.9959 7.9963 7.9961
Cameraman 7.9926 7.9940 7.9961 7.996 7.9952

with other algorithms. The results are shown in table 6. at a 100% to the original image, but the similarity
The proposed encryption scheme is based on selective measure shows that it’s close enough not to be noticed
encryption, which makes it extremely fast compared by naked eye. The experimental results showed that
to other algorithms. The table 6 shows clearly that our encryption scheme is secure against all known
our proposed algorithms outperform state-of-the-art attacks, furthermore the speed analysis proved that
algorithms when it comes to time performance. the proposed algorithms outperformed state-of-the-art
algorithms. Given the presented results of the proposed
5. Conclusion algorithms, we are confident about their ability to be
deployed in real world applications. Our future works
In this work, we introduce a novel selective chaotic
will be focused on implementing these algorithms for
encryption scheme based on Tchebichef and Hahn
video encryption.
moments. Our main object was to propose a fast
encryption algorithm that can be deployed in real world
applications without harming the security aspect. We References
achieved that by encrypting only the most significant
bits in the transform domain of Tchebichef and Hahn [1] Kaur, M. and Kumar, V. (2020) A comprehensive
moments. The encryption scheme is a “Lossy” one, review on image encryption techniques. Archives of
which means that the decrypted image is not similar Computational Methods in Engineering 27(1): 15–43.

EAI Endorsed Transactions on


5 Internet of Things
| Volume 9 | Issue 2 | e3
Kamrani et al.

Table 6. Speed analysis results

Speed Analysis Tchebichef Hahn Ref[25] Ref[26] Ref[27]


256 * 256 0.138 0.188 0.46 0.442 0.11794
512 * 512 0.330 0.285 0.979 0.466 0.27444
1024 * 1024 0.480 0.459 1.1361 0.975 0.78902

[2] Li, S., Chen, G., Cheung, A., Bhargava, B. and Lo, [14] Kang, S.W., Choi, U.S. and Cho, S.J. (2022) Fast
K.T. (2007) On the design of perceptual mpeg-video image encryption algorithm based on (n, m, k)-pcmlca.
encryption algorithms. IEEE Transactions on Circuits and Multimedia Tools and Applications 81(1): 1209–1235.
Systems for Video Technology 17(2): 214–223. [15] Eyebe Fouda, J. and Koepf, W. (2022) An 8-bit precision
[3] Zolfaghari, B. and Koshiba, T. (2022) Chaotic image cipher for fast image encryption. Multimedia Tools and
encryption: State-of-the-art, ecosystem, and future Applications : 1–20.
roadmap. Applied System Innovation 5(3): 57. [16] Gao, X., Mou, J., Xiong, L., Sha, Y., Yan, H. and Cao, Y.
[4] Zhao, R., Zhang, Y., Nan, Y., Wen, W., Chai, X. and (2022) A fast and efficient multiple images encryption
Lan, R. (2022) Primitively visually meaningful image based on single-channel encryption and chaotic system.
encryption: A new paradigm. Information Sciences 613: Nonlinear Dynamics 108(1): 613–636.
628–648. [17] Song, W., Fu, C., Tie, M., Sham, C.W., Liu, J. and Ma, H.f.
[5] Wang, M.m., Zhou, N.r., Li, L. and Xu, M.t. (2022) (2022) A fast parallel batch image encryption algorithm
A novel image encryption scheme based on chaotic using intrinsic properties of chaos. Signal Processing:
apertured fractional mellin transform and its filter bank. Image Communication 102: 116628.
Expert Systems with Applications 207: 118067. [18] Hu, M.K. (1962) Visual pattern recognition by moment
[6] Zheng, N., Jiang, X. and Lan, X. (2006) Advances in invariants. IRE transactions on information theory 8(2):
Machine Vision, Image Processing, and Pattern Analysis: 179–187.
International Workshop on Intelligent Computing in Pattern [19] Dudani, S.A., Breeding, K.J. and McGhee, R.B. (1977)
Analysis/Synthesis, IWICPAS 2006, Xi’an, China, August Aircraft identification by moment invariants. IEEE
26-27, 2006, Proceedings, 4153 (Springer). transactions on computers 100(1): 39–46.
[7] Guan, M., Yang, X. and Hu, W. (2019) Chaotic [20] Casasent, D. and Cheatham, R.L. (1984) Image
image encryption algorithm using frequency-domain segmentation and real-image tests for an optical
dna encoding. IET image processing 13(9): 1535–1539. moment-based feature extractor. Optics communications
[8] Xin, G., Fen-lin, L., Bin, L., Wei, W. and Juan, C. (2010) 51(4): 227–230.
An image encryption algorithm based on spatiotemporal [21] Teague, M.R. (1980) Image analysis via the general
chaos in dct domain. In 2010 2nd IEEE international theory of moments. Josa 70(8): 920–930.
conference on information management and engineering [22] Mukundan, R., Ong, S. and Lee, P.A. (2001) Image
(IEEE): 267–270. analysis by tchebichef moments. IEEE Transactions on
[9] Luo, Y., Du, M. and Liu, J. (2015) A symmetrical image Processing 10(9): 1357–1364.
image encryption scheme in wavelet and time domain. [23] Zhou, J., Shu, H., Zhu, H., Toumoulin, C. and Luo,
Communications in Nonlinear Science and Numerical L. (2005) Image analysis by discrete orthogonal hahn
Simulation 20(2): 447–460. moments. In International Conference Image Analysis and
[10] Wu, J., Guo, F., Zeng, P. and Zhou, N. (2013) Image Recognition (Springer): 524–531.
encryption based on a reality-preserving fractional [24] Alvarez, G. and Li, S. (2006) Some basic cryptographic
discrete cosine transform and a chaos-based generating requirements for chaos-based cryptosystems. Interna-
sequence. Journal of Modern Optics 60(20): 1760–1771. tional journal of bifurcation and chaos 16(08): 2129–2151.
[11] Kamrani, A., Zenkouar, K. and Najah, S. (2020) A new [25] Wang, Y., Wong, K.W., Liao, X. and Chen, G. (2011)
set of image encryption algorithms based on discrete A new chaos-based fast image encryption algorithm.
orthogonal moments and chaos theory. Multimedia Tools Applied soft computing 11(1): 514–522.
and Applications 79(27): 20263–20279. [26] Wang, X. and Gao, S. (2020) Image encryption algorithm
[12] Wang, X., Feng, L. and Zhao, H. (2019) Fast image for synchronously updating boolean networks based on
encryption algorithm based on parallel computing matrix semi-tensor product theory. Information sciences
system. Information Sciences 486: 340–358. 507: 16–36.
[13] Zhu, S., Wang, G. and Zhu, C. (2019) A secure and [27] Song, W., Zheng, Y., Fu, C. and Shan, P. (2020) A
fast image encryption scheme based on double chaotic novel batch image encryption algorithm using parallel
s-boxes. Entropy 21(8): 790. computing. Information Sciences 518: 211–224.

EAI Endorsed Transactions on


6 Internet of Things
| Volume 9 | Issue 2 | e3

You might also like