Fast Selective Encryption Algorithms Based On Moments and Chaos Theory
Fast Selective Encryption Algorithms Based On Moments and Chaos Theory
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
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
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.
[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.