Content uploaded by Bhaskar Mondal
Author content
All content in this area was uploaded by Bhaskar Mondal on Apr 05, 2023
Content may be subject to copyright.
Noname manuscript No.
(will be inserted by the editor)
An Encryption Scheme based on Grain Stream Cipher and Chaos for
Privacy Protection of Image Data on IoT Network
Punam Kumari ·Bhaskar Mondal*
Received: date / Accepted: date
Abstract IoT-enabled devices can collect information and act based on instructions over the Internet;
they can sometimes communicate device to device. The IoT devices are mainly sensors that collect data
and transmit over the internet to some base station or servers using a wireless medium like Bluetooth,
Wi-Fi, etc. The transmitted data goes through multiple hierarchies of devices which makes it vulnerable to
different attacks and data leaks which may cost the user badly. To resist these threats, a proper encryption
scheme is required. A lightweight encryption (LWE) scheme is proposed in this paper for secure IoT devices
using a piecewise linear chaotic map (PWLCM) and a Grain keystream generator (GKSG). It takes a plain
image (PI) as input and scrambles the pixels-by-bit plain manipulation followed by XOR operation among
the scrambled pixel values using pseudorandom number sequence (PRNS) generated by the PWLCM and
GKSG. The test results show that the proposed method is secure and optimistic.
Keywords encryption ·Chaotic map ·Grain stream cipher ·IoT security ·PRNG
1 Introduction
There is no standard for IoT security that exists now. Most IoT-enabled device users are unaware of the
security vulnerability and risks of the devices when they are connected to the Internet. This may cause much-
unexpected losses and misshaping’s for the users. Like very common, the home security system vulnerability
may disclose personal secrecy, and in the case of health care appliances, a vulnerability may cost the life
of a patient directions[30]. Therefore, it is the need of the hour to develop a strong, lightweight, robust
encryption algorithm for IoT security. In the past few decades, various image encryption schemes (IES) have
been presented, which are unsuitable for low-resource devices like IoT. The IES is generally dividable into
two phases permutation and diffusion. In the permutation phase, the pixel is scrambled from its original
location, and in the diffusion phase, the pixel value is modified through some reversible process. The chaotic
map is often used to design such encryption schemes due to crypto-friendly properties of sensitivity to the
initial condition, random behavior, and ergodicity which help to achieve greater permutation and diffusion
effects. On the other hand, the Grain keystream generator is designed based on a Nonlinear feedback shift
Punam Kumari
Department of Computer Science and Engineering
National Institute of Technology Patna
India 800005 E-mail: punamk.phd20.cs@nitp.ac.in
Cite this article
Kumari, P., Mondal, B. An Encryption Scheme Based on Grain Stream Cipher and
Chaos for Privacy Protection of Image Data on IoT Network. Wireless Pers Commun
(2023). https://doi.org/10.1007/s11277-023-10382-8
2 Punam Kumari, Bhaskar Mondal*
register (NLFSR), which is lightweight and capable of generating the first random bit sequence. Combining
the chaos and GBKG can produce better randomness and cryptographically secure PRNS.
Talhaoui et al. 2020 [32] used the B¨ulban map as their chaotic map to generate PRNSs for confusion
and diffusion process of encryption. B¨ulban map uses sqrt function and modulus operation to generate
chaotic numbers. For confusion, each row/column data are shifted by a random number of rows/columns
circularly. This is followed by the diffusion process in which each row/column data are added with XOR of
previous row/column data and a random number and then performing modulus 256 operation on it. Cycles
of confusion followed by the diffusion process are repeated several times on each row/column. Encrypted
images were tested for several security measures.
This paper describes a lightweight IES with a piece-wise linear chaotic map (PWLCM) and GKSG
. GKSG needs comparatively low resources to run and is capable of generating highly random number
sequences. LFSR has been studied well in the past and proved its weakness due to its linear nature. But
GKSG is less studied, and a few encryption schemes are available in the literature. GKSG is capable of
producing cryptographically secure random number sequences and is hard to analyze due to its nonlinear
nature.
The scheme decomposes the bit plains and creates four pairs of bit-plains first, then scrambles directions
for each 4 bit plain pair separately using PRNS generated by the GKSG and the PWLCM, and finally,
XOR each pixel with another PRNS generated by GKSG.
The remaining of this work is divided into the following categories. Section 2 described the research-
related work about different encryption techniques. The preliminaries describe the PRNS generation using
GKSG and PWLCM in Section 3. Section 4 discusses the proposed scheme. In Section 5, different images
have been given with a security analysis test. This Section 6 has covered the discussion part. Finally, this
paper concluded in Section 7.
2 Related work
Deb et al. [3] have used a linear feedback shift register (LFSR) along with a special nonlinear filter function
to generate the PRNS. The scheme first selects the image square on which they perform column-to-row
operations followed by circular shift operations. Then, further scrambled the image using Arnold’s transfor-
mation. Finally, generate the cipher image by XOR-ing the scrambled picture with the keystream. Qiu et
al. [25] have used agnostic selective encryption using embedded block coding with an optimized truncation
system. The byte stream data have been taken as input to the bit-plane [19] encode, which is not the
original format. This is an agnostic formatted data as a 2D sequence of bytes. The fragmentation applies
to the 2D sequence and generates a sequence of data fragments. Then, the bit-plane coding applies to the
input byte stream and converts it into context information (CX) and an encoded bit-stream. The scheme
decides a selection ratio that tells us what percent of the bits to be encrypted first. Then, a PRNG is used
to create a key stream. In the next step, the bit-stream is generated by the bit plane encoder with the
bit-wise operation, and CX is used to generate a prediction table for output probability estimation Qe.
Finally, it selects Qeand protection bit-stream D′as an input of the MQ encoder. The Output of the MQ
encoder was given as input to the selective encryption function (SEc()), which produces all protected data
fragments as output files.
Suman et al. [29] have proposed an IES using a new chaotic map called composite logistic sine map
(CLSM) and secure hash algorithm-256 (SHA-256). Required PRNSs are generated using the CLSM. This
algorithm permutes the pixels of the PI based on the PRNS and diffuses pixel value using generated value
by SHA-256.
In [13], the authors have used permutation [18] based image encryption. The cyclic group is used to
generate the sequence in a permutation phase. In the confusion phase, row and column permutation is
Encryption Scheme based on Grain Stream Cipher and Chaos 3
performed to permute the rows and columns of an image, and accordingly neighborhood of the pixels is
changed, followed by diffusion by bit-level transformation.
Shah et al. 2020 [26] attempted to reduce the size of the chaotic vector by using a modular logistic
map. Rows and columns of the image are circularly shifted together using PRNSs to generate permutation.
After performing confusion, they diffuse each of the pixels by applying XOR-like operations with part of
the 192-bit key. They attempted to increase the encryption speed by keeping the operations of the chaotic
map light weighted and calling this chaotic function for the generation of only PRNS to scramble the
pixels. The algorithm reported by Li et al. 2018 [15] achieved the effect of bit scrambling as well as bit
substitution by performing generalized Arnold transform, random circular bit-shift, and bit XOR with
random values obtained from the aperiodic logistic chaotic map. They aimed not only at good encryption
but also a recovery of the distorted image due to adversary attack or noise. Their chaotic function uses
division operation and sqrt function to generate each bit of the random sequence.
Kamrani et al. [12] use two logistic maps, 128-bit key is divided into two keys k1and k2of 64-bit
each. Then some function involving several multiplications and one division is applied to convert k1and
k2to X0and Y0. Image of size M×Nis first transformed to their moments coefficient form using discrete
orthogonal moment functions that involve nested summations over 1 to Mwithin 1 to Nof the product of
two complex functions of each pixel. Using the cPRNS of size 256 ×256 from two separate logistic maps
and transformed keys X0for the first map and Y0for the second map, confusion and diffusions operations
were then performed in sequence over the transformed image in their moment coefficient form. Confusion
operations are iterated Ntimes, and then diffusion operation is performed once. This process of N-round
confusion followed by one diffusion operation is repeated Mtimes. They keep the option to set Mand N
to 1 or any other values to control the number of iterations. Diffusion is XOR with a random sequence.
Gupta et al. [9] utilized the aggregate of the pixels from the preprocessed image in addition to the NSGA-
III algorithm, which was used to improve the parameters, to update the 4D map’s parameters. Wrongly
selected hyper-parameters can lead to the underperformance of chaotic systems. The input image vector
I is preprocessed by applying XOR operations with vector V, obtained by the Kronecker product of size
32 ×32. it is not mentioned how they use this product to obtain vector V. I XOR V gives a new image
vector U. Parameters of the 4D map are further fine-tuned using a sum of all the pixels of U.
Most of the chaos-based IES are designed based on permutation [9][21] and diffusion (PAD) structure.
A survey on some recent IES is presented in Table 1. The existing chaos-based IES are involved with
huge PRNS generation, complex, chaotic systems, and PAD structures, which increases the computational
overhead. Hence, most of those schemes are not suitable for resource-imitated devices. Our proposed scheme
is lightweight as it requires a lesser number of PRNSs. Furthermore, those PRNSs are generated using a
lightweight process like GBSG and PWLCM. At the same time, the proposed scheme is able to achieve the
benchmark security test values.
3 Preliminaries
3.1 PRNS Generation using Grain Key Stream Generator (GKSG)
The GKSG is used to generate the pseudorandom sequences in the proposed IES. A linear feedback shift
register (LFSR), a nonlinear feedback shift register (NFSR), and a filter function are the three major
components of the GKSG. The content of the LFSR is given by expression si, si+1, si+2, ...., si+79 and the
content of NLFSR is given by ai, ai+1, ...., ai+79. The feedback polynomial of the LFSR is f(b), which has a
polynomial degree of 80. It is a linear function. The feedback polynomial of NLFSR [17] is h(b) and degree
of 80, which is nonlinear.
Every new bit is generated by a function gwhen some bits are taken from LFSR and given as input to
a function g(b) and some bits are taken from NLFSR and given as input to a function g(b). The feedback
4 Punam Kumari, Bhaskar Mondal*
Table 1: An analysis of methods for image encryption based on permutations and substitutions
Reference Image
Type
Chaotic maps Permutation/Confusion
Method
Diffusion/Substitution
Method
Evaluation matrix
Zheng et al.
(2022) [40]
Gray
Image
2D-Logistic-Sine-
Coupling Map
(2D-LSCM)
1D pixel swapping XOR, S-box H, CC, NPCR, UACI,
HA, KSA
Wang et al.
(2022) [36]
Gray
Image
2D- Sine-Logistic-
Tent-Coupled Map
(2D-SLTCM)
2-way zigzag transfor-
mation
XOR Kolmogorov en-
tropy(KE), H, CC,
CSQ, NPCR, UACI
Toktas et
al. (2021)
[34]
Gray
Image
2D Fully Chaotic
Map
1D pixel swapping 0–1 test, H, CC, KSA,
UACI, NPCR
Yahi et al.
2022 [38]
RGB 1D-Cubic and Ex-
ponential Function
1D pixel swapping chaotic ribbon vec-
tor, XOR
PIS, H, CC, NPCR,
UACI, HA, KSA
Song et al.
2022 [28]
Gray
Image
Logistic Chaotic
map (LCM)
1D pixel swapping Key extraction,
XOR, modular
FDPV, H, CC, NPCR,
UACI, KSA
Wang et al.
(2022) [37]
Gray
Image
Sine map, LCM Row-col circular shift XOR, modular HA, CC, H, NPCR,
UACI, VSA, KSA
Mondal et
al. 2021
[22]
Gray
Image
Chaotic Standard
Map
Row-col swapping XOR, Comple-
ment, Circular
shift operation
HA, CC, PSNR, H,
NPCR, UACI, AE,
MSE, KSA
Talhaoui
et al. 2020
[32]
Gray
Image
B¨ulban Chaotic
Map (BCM)
Row-col circular shift Substitution, mod-
ular, XOR
HA, H, NPCR, UACI,
KSA
Basha et al.
2022 [1]
RGB Logistic-Sine-Tent-
Chebyshev
Sapping, conversion
(BTD)
cyclic shift opera-
tion, XOR
KSA, UACI, NPCR,
CC,HA
Ding et al.
2022 [4]
RGB Hyper Chaotic Sys-
tem
circular shift in DNA
coding mode
XOR, DNA arith-
metic
HA, H, CC, NPC,
UACI
Ghorbani
et al. 2022
[7]
RGB Ribonucleic acid,
Chaotic Henon
map (CHM)
Row-col circular shift XOR, modular UACI, NPCR, H, CC
Gao et al.
2022 [5]
RGB Memcapacitor-
LCM
cross-image scrambling Single channel ex-
traction
KSA, HA, H, CST,
NPCR, UACI, NIST
test
Nan et al.
2022 [24]
RGB 2D-Logistic Cou-
pling Cubic Map
Row-col swapping S-box, XOR HA, H, PSNR, CC,
UACI, NPCR
Musanna
et al. 2022
[23]
Square
Image
Fractional-Order
Chaotic System
and Cellular Neu-
ral Network.
Arnold map, cube gen-
eration
- KSA, CC, H, UACI,
NPCR,
Jain et al.
2021 [10]
Square
Image
2D-LSCM Arnold’s Cat Map Chaotic Matrix NPCR, UACI, HA
Shah et al.
2020 [26]
RGB Modular logistic
map
Row-col circular shift bit-XOR HA, CC, H, UACI,
NPCR, MSE, PSNR
Suman et
al. 2021
[31]
RGB Chaotic Duffing
Map
Row-col pixel position
swapping
XOR HA, CC, NPCR,
UACI, PSNR, MSE
Kamrani
et al. 2020
[12]
Gray
Image
LCM 1D Pixel position
swapping
XOR NPCR, UACI, CC, H,
Deb et al.
2021 [3]
RGB Linear feedback
shift register
Arnold’s transforma-
tion
XOR CC, HA, NPCR,
UACI, KSA
Talhaoui
et al. 2020
[32]
Gray
Image
BCM Row-col circular shift XOR HA, H, NPCR, UACI,
CC
Li et al.
2019 [15]
Gray
Image
Aperiodic Chaotic
Map
Arnold’s transform XOR HA, CC, H, PSNR,
MSE
Kandar et
al. 2019
[13]
Gray
Image
Cyclic group Row-col circular shift Bit-level permu-
tation, Bit-level
transformation
CC, H, HA, NPCR,
UACI
Mondal et
al. 2022
[22]
Gray
Image
Chaotic Standard
Map
Row-col swapping XOR, Comple-
ment, Circular
shift operation
HA, CC, PSNR, H,
NPCR, UACI, AE,
MSE, KSA
Tiwari et
al. 2022
[33]
Gray
Image
3D Lorenz chaotic
map
Row-col circular shift XOR, Shift opera-
tion
HA. Deviation, CC, H,
MSE, PSNR, NPCR,
UACI, KSA
Encryption Scheme based on Grain Stream Cipher and Chaos 5
function of a GKSG with 3 registers can be given as g=btΛbt−1⊕bt⊕bt−2where btis bit value at tth
register.
The GKSG is used as shown in Fig. 1 in which an LFSR controls the feedback of the GKSG.
Fig. 1: Grain key stream generator
3.2 Piecewise linear chaotic map (PWLCM)
The PWLCM is the combination of several linear segments, it is presented in Eq. 1.
xk+1 =f(xk, l) =
xk/l if 0 ≤xk≤l
(xk−l)/(0.5−l) if l≤xk≤0.5
f(1 −xk, l) if 0.5≤xk≤1
(1)
where xk∈(0,1), k∈ {0,1,2, . . . }, and x0is the initial condition. The map has a uniform invariant
distribution as well as good ergodicity, confusion, and determinacy, it may generate excellent random
sequences suitable for data encryption. Lyapunov Exponent (LE) and Bifurcation diagrams are the way to
depict the chaotic characteristics of a chaotic map [20]. The LE and Bifurcation diagrams of the map are
plotted in Fig.2 and Fig.3 respectively. From the plot, it is clearly visible the complex chaotic nature and
a vast area of the map.
4 Proposed encryption scheme
In the proposed IES the plain image is decomposed into binary components which are used to generate four
components each with two bitplanes. Then each of the four components is separately permuted using PRNS
6 Punam Kumari, Bhaskar Mondal*
Fig. 2: The Bifurcation plot of PWLCM map
generated by the GKSG and the PWLCM. Finally, each two-bit element of all the components is XORed
with pseudo-random number bit (PRNB) pairs generated by the GBKG and PWLCM. The proposed IES
has presented a flowchart in Fig. 4. It can be considered that a sender wants to send an encrypted gray-level
image to some receiver who will receive the cipher image. The receiver needs to decrypt the cipher image
to read it. The encryption algorithm is described in Fig. 4, and the decryption process is described in Fig.
5.
Algorithm 1 Encryption Process
1: Input: plain image Iwith size r, c, Key K= (x0, m0, s) where sis initial vector for the NLSFR and x0, m0are initial
parameter for the PWLCM.
2: Output: cipher image C
3: Decompose the bit plains bp0, bp1, bp2, bp3, bp4, bp5, bp6, bp7←I
4: Create 4 bit plain pairs P0←bp0p7,P1←bp1bp6,bP2←bp2bp5,P3←p4p3
5: Generates four PRNSs r1, r2, r3, r4and xeach of size r, c using the PWLCM and NLFSR using the key K
6: Scramble bit plain pairs P0, P1, P2, P3using PRNSs r1, r2, r3, r4respectively.
7: The scrambled image I′=P′
0P′
1P′
2P′
3
8: C=I′⊕x
9: close
Encryption Scheme based on Grain Stream Cipher and Chaos 7
Fig. 3: The Lyapunov Exponent plot of PWLCM map
5 Experimental Results
The security evaluation is done using histogram analysis, correlation coefficients, PSNR, entropy, MSE,
NPCR, and UACI, and results are presented in this section for test images Airplane, Baboon, Barbara,
Boat, Butterfly, BWsquare, Cameraman, Goldhill, House, Lake, Lena, Moon, MRI, Nike, Penguin, Peppers,
Xray.
5.1 Histogram Analysis
Histograms are representations of the frequency of pixel values in a digital image. We can visualize the
encryption quality using histogram analysis. Because of the identical color zones, the frequency distribution
in plain images is generally random or skewed. The encrypted image must contain a consistent distribution
of pixel values to withstand statistical attacks. The histograms of the plain image and the related cipher
image for the Pepper image are shown in Fig. 6, while those of the X-Ray image are shown in Fig. 7. In
all cases, the histogram of the cipher images (CI) is significantly different from the histogram of the plain
images (PI), and the histogram of the cipher images is also uniform. In every instance, the histograms of
the cipher images (CI) and the plain pictures (PI) differ significantly from one another, and the histogram
of the cipher images is also uniform.
8 Punam Kumari, Bhaskar Mondal*
Fig. 4: The overall operation of the proposed encryption method
5.2 Correlation Coefficient (CC)
The CC calculates the relationship between two adjacent pixels in an image. The correlation between
neighboring pixels in a cipher image should be lower, making it impossible to guess a pixel’s neighbors’
values. CC is one of the most important tools for statistical attacks. Due to high redundancy in the plain
image, the CC is very high, near 1. A good encryption algorithm must reduce that CC near zero in
the cipher image. For CC calculation in horizontal, vertical, and diagonal directions, 12000 random pixel
values are picked up from the image in respective directions. The pxiand pyiare two-pixel pairs then the
correlation coefficient can be obtained by the equation 5.
E(px) = 1
M
M
X
i=1
pxi(2)
D(px) = 1
M
M
X
i=1
(pxi−E(px))2(3)
Cov(px, py) = 1
M
M
X
i=1
(pxi−E(x))2(pyi−E(y))2(4)
Encryption Scheme based on Grain Stream Cipher and Chaos 9
Fig. 5: The decryption procedure of the proposed method
qpx,py =Cov(px, py)
pD(px)pD(py)(5)
Where pxiand pyiare the gray level value of two adjacent pixels, M is the number of pairs (pxi, pyi),
and E(px) is the mean of pxi, and E(py) is the mean of pyi.CC of plain image and cipher images are
shown in all three directions for the Pepper image in Fig. 6. The calculated CC values are shown in Table
2, where it can be noticed that the CC of the cipher images are highly reduced near to 0, which means the
proposed technique can provide good security.
5.3 Entropy analysis
The entropy anlaysis calculates a source of information’s bit-level randomness. If we consider a gray-level
image as an information source then the randomness of its intensity will be 8 bit. The changes of entropy
in cipher images should be near 8 to produce maximum randomness in the cipher [31]. The calculated
entropy values are shown in Table. 3. It can be observed that in all the cases, the results are acceptable and
sensible. The computed entropy values are compared with those of other method in Table 4. To determine
the information entropy of the sequence ”A,” use equation 6.
H(A) =
K−1
X
i=0
P(ai) log 1
P(ai)(6)
10 Punam Kumari, Bhaskar Mondal*
(a) PI of Peppers (b) Histogram of PI for Peppers
(c) CI of Peppers (d) Histogram of CI for Peppers
Fig. 6: Comparison of histogram analysis of PI and CI for Peppers image
where K= 2R, and Ris the number of bits needed to represent all possible values. aiare possible pixel
values of a grey scale image, P(ai) is probability of corresponding pixel value aiand PK−1
i=1 P(ai) = 1. If
the cipher image is truly random then entropy will be close to 8.
Encryption Scheme based on Grain Stream Cipher and Chaos 11
(a) PI of X-ray (b) Histogram of PI for X-ray
(c) CI of X-ray (d) Histogram of CI for X-ray
Fig. 7: Comparison of histogram analysis of PI and CI for X-ray image
5.4 Mean Square Error (MSE)
The MSE is used to determine the quality degradation of an image in cryptography. The changes in the
visibility of an image due to the encryption process are considered as degradation [8]. The MSE is calculated
by squaring the intensity value differences between the plain image (P I) and the cipher image (C I ). The
MSE is presented by Eq. 7. The calculated MSE values are shown in Table. 3. We have compared the
calculated MSE value with other Li et al. [16], and Zahmou et al.[39] schemes in Table. 6. Here, we found
12 Punam Kumari, Bhaskar Mondal*
(a) CC representation in HD for PI (b) CC representation in HD for CI
(c) CC representation in VD for PI (d) CC representation in VD for CI
(e) CC representation in DD for PI (f) CC representation in DD for CI
Fig. 8: Plot of CC in HD, VD, DD for PI and respective CI of Lena image
Encryption Scheme based on Grain Stream Cipher and Chaos 13
that our scheme is better for some images as compared to other schemes.
MSE =1
row ×col X
(row,col)
[P I(r ow, col)−CI (row , col)]2(7)
5.5 Peak signal-to-noise ratio (PSNR)
One of the most significant measures of the quality of an CI is the PSNR. The acceptable range for a
cipher’s PSNR value, according to [11] performance and [2] image, is 34 or above. PSNR is given by Eq. 8
P SN R = 10 ×log10 ×M×N×2552
PM−1
i=0 PN−1
j=0 (P I(i, j )−CI(i, j))2(8)
Where Mis the width, Nis the height, pixel value of the plaintext image is P I(i, j ), and the pixel
value of the ciphertext image is CI(i, j). The calculated PSNR values are compared with Li et al. [16] and
Wang et al. [35] schemes in Table. 5 and found there that the proposed PSNR value is higher than others.
5.6 NPCR and UACI
The Number of Pixel Change Rate (NPCR) determines the percentage of changes between two cipher
images CI and C I ′pixel values produced from a P I and a tampered P I with few bits changes like 1 to
few bits. NPCR should be near 100% for a strong encryption algorithm. It is calculated by equation 9. The
calculated value of NPCR is presented in Table. 3 and compared with Toktas et al. [34], Zheng et al. [40],
Kandar et al. [13], Wang et al. [36], Sneha et al. [27], Ghazvini et al. [6], Song et al. [28], Kari et al.[14]
schemes in Table. 7 then found that our scheme gives NPCR values nearly equal to 100
M(row, col) = 0 if CI (r ow, col) = CI′(row , col)
1 if CI(row, col)=CI ′(r ow, col)
where M(row, col) is a matrix with elements 0 and 1. The NPCR is expressed by Eq. 9
N P CR =X
i,j
M(row, col)
N×100% (9)
where N=row ×col.
Unified Average Changing Intensity (UACI) is used to demonstrate the sensitivity of the encryption
algorithm to a tiny change like a few bits. It is calculated by the Eq. 10
UACI =X
row,col
|CI (r ow, col)−CI′(row, col)|
F·N×100% (10)
The test results give UACI values around 30 or more than 30 which are presented in Table 3 and compared
with Toktas et al. [34], Zheng et al. [40], Kandar et al. [13], Wang et al. [36], Sneha et al. [27], Ghazvini et
al. [6], Song et al. [28], Kari et al.[14] schemes in Table. 8. The test results show that our proposed scheme
strongly resists differential attacks.
14 Punam Kumari, Bhaskar Mondal*
Table 2: Calculated correlation value of PI and CI in HD, VD, and DD
image HD VD DD
PI CI PI CI PI CI
Baboon 0.71318 0.0059381 0.60351 0.0012231 0.60616 0.00032234
Airplane 0.96714 0.0010481 0.96663 0.0011191 0.94451 0.00071717
Boat 0.9205 0.0023751 0.95891 0.0020821 0.89381 0.00017137
Barbara 0.81154 0.0040422 0.89107 0.00068547 0.83061 0.00075944
BWsquare 0.98971 0.0032541 0.98961 0.0012091 0.97931 0.0012115
Butterfly 0.96561 0.002171 0.96591 0.0045831 0.94322 0.002562
Goldhill 0.93311 0.001441 0.9334 0.0021542 0.89561 0.0023422
Cameraman 0.93351 0.0021723 0.95912 0.006751 0.90871 0.0042311
Lake 0.94111 0.0042854 0.94321 0.0054261 0.90411 0.009991
House 0.98999 0.0015061 0.98899 0.0025561 0.98290 0.0030241
Moon 0.9811 0.00039762 0.9826 0.0044910 0.97114 0.0024910
Lena 0.89961 0.0019221 0.94161 0.00032711 0.87621 0.0047151
Nike 0.98322 0.0020051 0.98331 0.00074812 0.95961 0.00059610
MRI 0.98911 0.0022811 0.99181 0.0028351 0.98101 0.0010865
Penguin 0.97471 0.00013931 0.97962 0.0018521 0.9610 0.00094720
X-Ray 0.99241 0.0037913 0.9911 0.0025414 0.98602 0.0017104
Peppers 0.94820 0.0012151 0.9581 0.0027510 0.92292 0.0097510
Average 0.93728 0.002352031 0.94136 0.002638431 0.91452 0.002742913
Table 3: The Entropy value (PI and CI), PSNR, MSE, UACI, and NPCR value of different images
image Entropy PSNR MSE UACI NPCR
PI CI
Airplane 6.7631 7.9992 46.179 103.71 32.604 99.607
Baboon 7.4034 7.9971 38.627 72.888 27.906 99.62
Barbara 7.4698 7.9971 38.985 79.152 28.819 99.606
Boat 7.229 7.9989 43.254 76.752 28.496 99.65
Butterfly 7.6562 7.996 39.322 110.74 33.659 99.627
BWsquare 0.86071 7.9974 43.381 217.81 50.061 99.617
Cameraman 7.0097 7.9972 39.774 94.938 31.27 99.602
Goldhill 7.4916 7.9973 39.13 81.848 29.28 99.6
House 6.4934 7.9993 46.461 92.51 30.923 99.62
Lake 7.5203 7.9967 38.761 97.334 31.654 99.609
Lena 7.6461 7.9974 39.598 91.164 30.695 99.652
Moon 5.6837 7.9955 39.695 135.94 37.557 99.606
MRI 6.0451 7.9992 46.178 126.81 36.167 99.624
Nike 1.0027 7.9992 49.147 215.41 49.73 99.593
Penguin 7.6515 7.9991 47.109 134.72 37.37 99.598
Peppers 7.595 7.9973 39.717 93.694 31.077 99.617
X-Ray 7.2053 7.9978 39.951 98.872 31.862 99.649
Average 6.395 7.997 42.0746 113.193 34.066 99.617
5.7 Analysis of Key Space
Our presented scheme uses PWLCM, which contains a 256-bit initial vector sand two initial conditions:
real numbers x0and m0.Hence the key K= (x0, m0, s). Considering the precision of x0and m0are 10−10
provides a key space of 1040. 1040 which is equivalent to 2133 , and the GKSG has a key space of 2256.
Hence, the final key space is 2133+256 = 2389 in Table. 9. Which is large enough compared to the current
standard of 256 bit in Table. 9 Ghazvini et al. [6], Toktas et al. [34] and Zheng et al. [40] able to counter
any statistical attacks or Exhaustive key search.
Encryption Scheme based on Grain Stream Cipher and Chaos 15
Table 4: Comparison of calculated entropy of CI with other schemes
Image Proposed scheme [34] [40] [13] [36] [27] [28] [6] [14]
Lena 7.9974 7.9995 - 7.9993 7.9973 7.9980 7.9992 7.9990 7.9998
Baboon 7.9971 7.9995 7.9974 7.9992 7.9994 7.9990 - 7.9986 7.9999
Pepper 7.9973 7.9995 7.9970 7.9993 7.9973 7.9977 - 7.9992 7.9992
Barbara 7.9971 7.9995 - 7.9993 7.9993 - - 7.9993 -
Boat 7.9989 - 7.9973 - 7.9971 - 7.9991 - -
Cameraman 7.9972 7.999 7.9974 7.9992 7.9998 - - - -
Lake 7.9967 - - 7.992 - - - - -
House 7.9992 - - 7.9992 - - - - -
Goldhill 7.9973 - - 7.9992 - 7.9972 - - -
Table 5: Comparison of calculated PSNR of CI with other schemes
Image Proposed scheme [6] [16]
Lena 39.598 28.46 38.1364
Baboon 38.627 28.56 36.545
Pepper 39.717 28.40 37.27
Airplane 38.985 25.59 -
Table 6: Comparison of calculated MSE of CI with other schemes
Image Proposed scheme [16] [39]
Lena 91.164 93.31 76.94
Baboon 72.888 91.28 -
Pepper 93.694 94.53 83.97
Barbara 79.152 80.68 92.75
Table 7: Comparison of calculated NPCR of CI with other schemes
Image Proposed scheme [34] [40] [13] [36] [27] [28] [6] [14]
Lena 99.652 99.609 - 99.61 99.59 99.75 99.60 99.694 99.72
Baboon 99.62 99.607 99.65 99.62 99.62 99.74 - 99.695 99.62
Pepper 99.617 99.608 99.63 99.63 99.60 99.74 - 99.698 99.64
Barbara 99.60 99.608 - 99.61 99.61 - - 99.6841 -
Boat 99.65 - 99.58 - 99.60 - 99.65 - 99.62
Cameraman 99.60 99.608 99.60 99.69 - - - -
Lake 99.61 - - 99.69 - - - -
House 99.62 - - 99.69 - - - -
Goldhill 99.60 - - 99.68 - - - -
6 Discussion
We have introduced PWLCM and GKSG-based image encryption methods. In the proposed IES, the
plain image is divided into binary components, which are then used to generate 4 numbers of 2 bitplane
components. Then each of the 4 components is separately permuted using PRNS generated by the GKSG
and the PWLCM. Finally, each two-bit element of all the components is XORed with pseudo-random
number bit (PRNB) pairs generated by the GBKG and PWLCM.
The keystream generated by GKSG has given better periodicity and randomness compared to many
chaotic maps. If the keystream has better randomness and periodicity, then the periodicity of the ciphertext
is better. The Grain keystream has its own vulnerability, but when it is used with PWLCM for encrypting
16 Punam Kumari, Bhaskar Mondal*
Table 8: Comparison of calculated UACI of CI with other schemes
Image Proposed scheme [34] [40] [13] [36] [27] [28] [6] [14]
Lena 30.695 33.46 - 33.41 33.45 33.45 33.44 33.35 33.48
Baboon 27.906 33.45 33.41 33.42 33.46 33.49 - 33.17 33.43
Pepper 31.07 33.46 33.58 33.44 33.49 33.47 - 33.35 33.51
Barbara 28.82 33.45 - 33.37 - - - -
Cameraman 31.27 33.46 33.42 33.42 - - - 29.431 -
Boat 28.49 - 33.44 - 33.47 - 33.52 - 33.50
Lake 31.65 - - 33.35 -
House 30.92 - - 33.36 - - - -
Goldhill 29.28 - - 33.49 - - - - -
Penguin 37.37 - - - - - - -
Nike 49.73 - - - - -
Table 9: Key space analysis comparison with other schemes
Image encryption scheme Keys space
Toktas et al.[34] 2298
Zheng et al. [40] 2200
Wang et al. [36] 2480
Sneha et al. [27] 2353
Prposed scheme 2389
images in the proposed method, the combination of PWLCM and GBKG effectively generates good and
promising results which meet most of the security measures.
The proposed IES has a very large keyspace of 2389, which is much higher than the current standard of
2256 keyspace. Here the scheme becomes resistant to exhaustive key search attacks. Further, the proposed
scheme is tested using security measure tests like histogram analysis in subsection 5.1, MSE, PSNR, UACI,
NPCR, and correlation coefficient analysis.
A large amount of digital data is sent over IoT networks due to the fast development of technology
in data communication. The transfer of digital images over IoT networks has opened opportunities for
collecting/sharing large amounts of data. We have developed an encryption scheme based on GKSG for
image data on the IoT network,then improved the digital image security for IoT network transfer.
This research gives a direction to the use of lightweight PRNG based on NLFSR (GBKG) in combination
with chaotic maps for designing lightweight IESs. This kind of design can be proved that the encryption
algorithms are lightweight, strong, and effective. The lightweight encryption schemes are suitable for the
low resources devices like IoT devices.
7 Conclusion
In the proposed scheme, the IES is designed using PRNSs generated by the PWLCM and GKSG. The
results and security analysis depicts that the lightweight encryption scheme is secure, strong, and robust.
It has a huge key space of 2389, which is very large and can be very potent against exhaustive attacks. The
scheme is evaluated using standard tests like histogram analysis, CC, PSNR, entropy, MSE, NPCR, and
UACI. In all the tests, the results depict that the scheme is capable of providing potential security. It is
very simple to modify the method to encrypt text, audio, and colour images. The scheme is lightweight and
can be easily implemented on hardware, it can be applied to IoT devices and fog computing.
Encryption Scheme based on Grain Stream Cipher and Chaos 17
Declarations
The authors hereby declare that there was no full or partial financial support from any organization.
The author do not have any Conflicts of interest to disclosures.
Data sharing not applicable to this article as no datasets were generated or analysed during the current
study. There is no code to make available.
References
1. S. M. Basha, P. Mathivanan, and A. B. Ganesh. Bit level color image encryption using logistic-sine-
tent-chebyshev (lstc) map. Optik, page 168956, 2022.
2. K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian. Image denoising by sparse 3-d transform-domain
collaborative filtering. IEEE Transactions on image processing, 16(8):2080–2095, 2007.
3. S. Deb and B. Bhuyan. Chaos-based medical image encryption scheme using special nonlinear filtering
function based lfsr. Multimed. Tools. Appl., 80(13):19803–19826, 2021.
4. D. Ding, H. Xiao, Z. Yang, H. Luo, Y. Hu, X. Zhang, and Y. Liu. Coexisting multi-stability of hopfield
neural network based on coupled fractional-order locally active memristor and its application in image
encryption. Nonlinear Dyn., pages 1–26, 2022.
5. X. Gao, J. Mou, L. Xiong, Y. Sha, H. Yan, and Y. Cao. A fast and efficient multiple images encryption
based on single-channel encryption and chaotic system. Nonlinear Dyn., pages 1–24, 2022.
6. M. Ghazvini, M. Mirzadi, and N. Parvar. A modified method for image encryption based on chaotic
map and genetic algorithm. Multimed. Tools. Appl., 79(37):26927–26950, 2020.
7. A. Ghorbania, M. Saberikamarposhti, and M. Yadollahi. Using ribonucleic acid (rna) and h´enon map
in new image encryption scheme. Optik, page 168961, 2022.
8. K. Gu, S. Wang, G. Zhai, S. Ma, X. Yang, and W. Zhang. Content-weighted mean-squared error for
quality assessment of compressed images. Signal, Image and Video Processing, 10(5):803–810, 2016.
9. R. Hedayati and S. Mostafavi. A lightweight image encryption algorithm for secure communications in
multimedia internet of things. Wireless Personal Communications, 123(2):1121–1143, 2022.
10. K. Jain, A. Aji, and P. Krishnan. Medical image encryption scheme using multiple chaotic maps.
Pattern Recognition Letters, 152:356–364, 2021.
11. V. M. Kamble, P. Parlewar, A. G. Keskar, and K. M. Bhurchandi. Performance evaluation of wavelet,
ridgelet, curvelet and contourlet transforms based techniques for digital image denoising. Artif. Intell.
Rev., 45(4):509–533, 2016.
12. A. Kamrani, K. Zenkouar, and S. Najah. A new set of image encryption algorithms based on discrete
orthogonal moments and chaos theory. Multimed. Tools. Appl., 79(27):20263–20279, 2020.
13. S. Kandar, D. Chaudhuri, A. Bhattacharjee, and B. C. Dhara. Image encryption using sequence
generated by cyclic group. J. Inf. Secur. Appl., 44:117–129, 2019.
14. A. P. Kari, A. H. Navin, A. M. Bidgoli, and M. Mirnia. A new image encryption scheme based on
hybrid chaotic maps. Multimed. Tools. Appl., 80(2):2753–2772, 2021.
15. F. Li, H. Wu, G. Zhou, and W. Wei. Robust real-time image encryption with aperiodic chaotic map
and random-cycling bit shift. J Real Time Image Process, 16(3):775–790, 2019.
16. Y. Li, C. Wang, and H. Chen. A hyper-chaos-based image encryption algorithm using pixel-level
permutation and bit-level permutation. Opt Lasers Eng OPT LASER ENG, 90:238–246, 2017.
17. J. Massey and R.-W. Liu. Equivalence of nonlinear shift-registers. IEEE Trans. Inf. Theory, 10(4):378–
379, 1964.
18. B. Mondal. Cryptographic image scrambling techniques. In Cryptographic and Information Security,
pages 37–65. CRC Press, 2018.
18 Punam Kumari, Bhaskar Mondal*
19. B. Mondal, P. Kumar, and S. Singh. A chaotic permutation and diffusion based image encryption
algorithm for secure communications. Multimed. Tools. Appl., 77(23):31177–31198, 2018.
20. B. Mondal, T. Mandal, D. A. Khan, and T. Choudhury. A secure image encryption scheme using chaos
and wavelet transformations. Recent Pat. Eng., 12(1), 2018.
21. B. Mondal, T. Mandal, P. Kumar, and N. Biswas. A secure partial encryption scheme based on bit
plane manipulation. In 2017 7th International Symposium on Embedded Computing and System Design
(ISED), pages 1–5. IEEE, 2017.
22. B. Mondal and J. P. Singh. A lightweight image encryption scheme based on chaos and diffusion circuit.
Multimed. Tools. Appl., pages 1–25, 2022.
23. F. Musanna, D. Dangwal, and S. Kumar. Novel image encryption algorithm using fractional chaos and
cellular neural network. J Ambient Intell Humaniz Comput, pages 1–22, 2021.
24. S.-x. Nan, X.-f. Feng, Y.-f. Wu, and H. Zhang. Remote sensing image compression and encryption
based on block compressive sensing and 2d-lcccm. Nonlinear Dyn., pages 1–25, 2022.
25. H. Qiu, M. Qiu, M. Liu, and Z. Ming. Lightweight selective encryption for social data protection based
on ebcot coding. IEEE Trans. Comput. Soc. Syst., 7(1):205–214, 2019.
26. A. A. Shah, S. A. Parah, M. Rashid, and M. Elhoseny. Efficient image encryption scheme based on
generalized logistic map for real time image processing. J Real Time Image Process, 17(6):2139–2151,
2020.
27. P. Sneha, S. Sankar, and A. S. Kumar. A chaotic colour image encryption scheme combining walsh–
hadamard transform and arnold–tent maps. J Ambient Intell Humaniz Comput, 11(3):1289–1308, 2020.
28. W. Song, C. Fu, M. Tie, C.-W. Sham, J. Liu, and H.-f. Ma. A fast parallel batch image encryption
algorithm using intrinsic properties of chaos. Signal Process. Image Commun., page 116628, 2022.
29. R. R. Suman, B. Mondal, and T. Mandal. A secure encryption scheme using a composite logistic sine
map (clsm) and sha-256. Multimed. Tools. Appl., pages 1–22, 2022.
30. R. R. Suman, B. Mondal, and T. Mandal. Security trend and trust in india’s e-governance framework.
nt. J. Electron. Gov. Res. (IJEGR), 18(1):1–16, 2022.
31. R. R. Suman, B. Mondal, S. K. Singh, and T. Mandal. A secure color image encryption scheme based
on chaos. In Machine Vision and Augmented Intelligence—Theory and Applications, pages 365–375.
Springer, 2021.
32. M. Talhaoui, X. Wang, and M. Midoun. Fast image encryption algorithm with high security level using
the b¨ulban chaotic map. j real-time image proc, 2020.
33. D. Tiwari, B. Mondal, S. K. Singh, and D. Koundal. Lightweight encryption for privacy protection of
data transmission in cyber physical systems. Clust. Comput., pages 1–15, 2022.
34. A. Toktas and U. Erkan. 2d fully chaotic map for image encryption constructed through a quadruple-
objective optimization via artificial bee colony algorithm. Neural. Comput. Appl., pages 1–25, 2021.
35. W. Wang, M. Si, Y. Pang, P. Ran, H. Wang, X. Jiang, Y. Liu, J. Wu, W. Wu, N. Chilamkurti, et al.
An encryption algorithm based on combined chaos in body area networks. Comput. Electr. Eng.,
65:282–291, 2018.
36. X. Wang and X. Du. Pixel-level and bit-level image encryption method based on logistic-chebyshev
dynamic coupled map lattices. Chaos, Solitons & Fractals, 155:111629, 2022.
37. X. Wang, N. Guan, and P. Liu. A selective image encryption algorithm based on a chaotic model using
modular sine arithmetic. Optik, page 168955, 2022.
38. A. Yahi, T. Bekkouche, M. E. H. Daachi, and N. Diffellah. A color image encryption scheme based on
1d cubic map. Optik, 249:168290, 2022.
39. R. Zahmoul, R. Ejbali, and M. Zaied. Image encryption based on new beta chaotic maps. Opt Lasers
Eng OPT LASER ENG, 96:39–49, 2017.
40. J. Zheng and Q. Zeng. An image encryption algorithm using a dynamic s-box and chaotic maps. Appl.
Intell., pages 1–15, 2022.
A preview of this full-text is provided by Springer Nature.
Content available from Wireless Personal Communications
This content is subject to copyright. Terms and conditions apply.