Sunteți pe pagina 1din 17

Multimed Tools Appl (2018) 77:10217–10233

https://doi.org/10.1007/s11042-017-5406-2

A digital image encryption algorithm based on bit-planes


and an improved logistic map

Jingyi Liu 1 & Dingding Yang 1 & Hongbo Zhou 2 &


Shiqiang Chen 1,3

Received: 1 April 2017 / Revised: 30 August 2017 / Accepted: 8 November 2017 /


Published online: 25 November 2017
# Springer Science+Business Media, LLC, part of Springer Nature 2017

Abstract This paper presents a digital image encryption algorithm based on bit-planes and an
improved logistic map. First, a chaotic sequence, which is generated by the improved logistic
map, scrambles the pixels of the original image. Second, the scrambled image is split into a
high 4-bit matrix and a low 4-bit matrix. The low 4-bit matrix is then introduced into the
improved logistic model to generate a chaotic sequence that is highly correlated with the image
as the key, and the key is used for position scrambling and the XOR operation of the high 4-bit
matrix. Finally, the two matrices are combined into an 8-bit image matrix to obtain the
ciphertext image. The algorithm has a significant one-time pad characteristic. MATLAB
simulation experiments are conducted to analyze the security of image encryption in terms
of the histogram, plaintext sensitivity, information entropy, and adjacent pixels correlation
index. Experimental results show that the number of pixel changes ratio (NPCR) is greater
than 90% and the information entropy of the ciphertext image reaches 7.99, demonstrating that
the algorithm offers good encryption.

Keywords Digital image encryption . Logistic map . bit-plane . One-time pad

* Shiqiang Chen
chensq8808@126.com
Jingyi Liu
369417266@qq.com
Dingding Yang
2435507212@qq.com
Hongbo Zhou
79807140@qq.com

1
School of Science, Hubei University for Nationalities, Enshi, Hubei 445000, China
2
School of Mathematics and Information Science, Guiyang University, Guiyang, Guizhou 550005,
China
3
College of Computer Science, Sichuan University, Chengdu, Sichuan 610065, China
10218 Multimed Tools Appl (2018) 77:10217–10233

1 Introduction

Images are the most commonly exchanged form of information, with vivid and intuitive
features. With the rapid development of multimedia technology and the popularity of the
Internet, digital images have been widely used in many fields such as military affairs, medicine,
industrial engineering and public safety. In [30], medical image classification performance is
improved by using a multi-scale non-negative sparse coding based medical image classification
algorithm. In [20], the three new time-domain features were proposed to improve the perfor-
mance of EMG-PR based strategy in arm movement classification. In [9, 22], digital image
processing technology is used in road construction projects. In [21, 31], digital image tech-
niques are used for target tracking in video surveillance. In [12, 19], electroencephalogram or
face identification are used for personal identification. To protect the security of digital image
information, the reliable digital image encryption technology is necessary. Current image
encryption technology generally involves pixel scrambling, pixel value substitution, and
comprehensive use of the two methods. In recent years, image encryption algorithms based
on the bit-plane have been studied because they offer unique advantages. Digital image
encryption algorithms based on bit-planes and chaotic systems may involve a chaotic sequence
being directly used for bit-plane scrambling and replacement in [2, 4, 7, 10, 14, 15, 17, 18,
23–26, 28, 29] or some eigenvalues of the image being used to generate chaotic sequences.
Such algorithms enhance the correlation between the encrypted image and the key sequence in
[5, 6, 24]. In [13], X-dimensional reference table framework is defined, which extend the
dimensional space of the reference table, thus better hiding information.
In [1, 4, 14, 23, 24], the plaintext image is decomposed into eight binary images, which are then
combined into a large binary image. A chaotic sequence is used to scramble the position of the large
binary image, before the binary image is reassembled to obtain the encrypted image. In [7, 10, 18],
the plaintext image is decomposed into a bit-plane image, and then the sequences, which are
generated by different chaotic systems, are used to scramble each bit-plane. Finally, the scrambled
bit-planes are combined into an 8-bit ciphertext images. In [26], based on the idea of blocks, the bit-
plane is divided into four parts, and the value of each part is spread by a fixed method to the whole
bit-plane. At the same time, a chaotic sequence is introduced and used to control the diffusion sorting
method. In [17, 25], a complex chaotic sequence is used to scramble the position of the plaintext
image and obtain the ciphertext image. In [3, 15, 28], the amount of image information contained in
each bit-plane is analyzed and used to assign different encryption methods to the different bit-planes,
so as to optimize the encryption algorithm. A common feature of these algorithms is that the chaotic
sequences, used for position scrambling and pixel value replacement, are independent of the plain-
text image and are only associated with the given initial key. When the initial key is invariant, the
chaotic sequences used for image encryption remain unchanged, presenting an opportunity for
chosen-plaintext or chosen-ciphertext attacks. In [8], a stream encryption scheme using D-bit
segment sequences has been proposed, and the difference between the chaotic pseudorandom
number generator (CPRNG) and the traditional avalanche standard is analyzed.
In [3, 5, 6], some of the plaintext image information is introduced into the key sequence
generation process. This enhances the correlation between the key sequence and the plaintext
image, and has the characteristics of one-image-one-password. In [3], the position of the chaotic
sequence is determined according to the sum of all pixel values. In [5], the control parameters and
the number of iterations of the chaotic system are calculated using the sum of all pixel values in
the plaintext image. In [6], the user-set key is combined with the secure hash algorithm 1 (SHA-1)
digest of the plaintext image to drive the chaotic map to generate the key sequence. These
Multimed Tools Appl (2018) 77:10217–10233 10219

algorithms combine plaintext image information with the key generation process, but the
information selected for the plaintext image is a fixed value, which is insufficiently secure.
Some of the current image encryption algorithms are only related to certain attributions of
the original image, while others are even irrelevant to the properties of the original image and
only associated with the initial key. In order to solve these problems and improve the security of
the image encryption algorithm, in this paper, an image encryption algorithm is proposed that
dynamically combines the information of the original image with the encryption process. First,
using the improved logistic map to scramble the pixel position of the image to be encrypted, the
scrambled image is decomposed into two 4-bit matrices, a high4-bit matrix and a low 4-bit
matrix. Second, using the low 4-bit matrix as the control parameter of the improved logistic
map, a chaotic sequence is obtained through an iterative process, and which is used to scramble
the high4-bit matrix. Third, we compute the modulo-16 value of 10–12 digits after the decimal
point in this chaotic sequence to obtain a 0–15 integer random sequence. This sequence is used
to perform an XOR operation with the high 4-bit matrix. Finally, the two encrypted matrices are
combined into an 8-bit image matrix to obtain the encrypted image. The algorithm uses the low
4-bit matrix of the scrambled image as the control parameter of the chaotic map, which
improves the situation whereby the key is only associated with some of the eigenvalues of
the plaintext image [3, 5, 6], so that the algorithm has a significant one-time pad characteristic.
Through MATLAB simulation experiments, the security of the proposed method is analyzed by
using the histogram, plaintext sensitivity, information entropy, and adjacent pixel correlation.
The experimental results show that the algorithm offers good encryption effect.

2 Related knowledge

2.1 Image bit-plane

In computer memory systems, information is stored as binary data, represented by 0 and 1. The
gray value of a digital image pixel is represented by a 0 and 1 binary sequence in the computer,
so that the binary gray scale of the same position of each pixel of a digital image can form an
image, which has same size to the original. These binary images are called the image bit-planes.
The bit-planes are an important attribute of digital images, and are used by applications such as
digital watermarking and digital image compression coding. Consider the example of an 8-bit
gray digital image P. A single pixel value of P is stored in the computer as described in Table 1.
Thus, the image can be decomposed into eight bit-planes. As the weights of each bit-plane
are different, the amount of image information contained in each bit-plane is also different. The
percentage of information contained in the images of each bit-plane can be calculated by:

2i−1
IðiÞ ¼ ; i ¼ 1; 2; 3; 4; 5; 6; 7; 8 ð1Þ
255

Table 1 Image Bit-Plane Position and Weight

Symbol b(8) b(7) b(6) b(5) b(4) b(3) b(2) b(1)

Position 8th 7th 6th 5th 4th 3rd 2nd 1st


Weight 27 26 25 24 23 22 21 20
10220 Multimed Tools Appl (2018) 77:10217–10233

Table 2 Percentage of Image Information Contained in Each Bit-Plane

Position 8th 7th 6th 5th 4th 3rd 2nd 1st

Symbol b(8) b(7) b(6) b(5) b(4) b(3) b(2) b(1)


Percentage 50.196% 25.098% 12.549% 6.275% 3.137% 1.568% 0.784% 0.393%

The results are presented in Table 2. Note that the amount of image information contained
in the bit-planes gradually increases from low to high (i.e., from 1st to 8th).The lower four bit-
planes (from 1st to 4th) contain only 5.882% of the total image information, whereas the
higher four bit-planes (from 5th to 8th) contain the remaining 94.118%.
Figure 1 shows a bit-plane decomposition of the Lena image. It can be observed that, from
the 8th to 5th bit-plane, the image clarity becomes progressively worse, but some image
information can still be displayed. This indicates that these bit-planes contain a certain amount
of plaintext image information. As the bit-plane weight continues to decrease from the 4th to
the 1st bit-plane, the outline of the plaintext image is lost. This is because the plaintext image
information in these four bit-planes constitutes less than 6% of the overall image. Therefore,
different encryption algorithms can be designed according to the amount of image information
contained in the bit-plane.

Plaintext of Lena 8th bit-plane 7th bit-plane

6th bit-plane 5th bit-plane 4th bit-plane

3rd bit-plane 2nd bit-plane 1st bit-plane


Fig. 1 Decomposition of Lena image based on bit-planes
Multimed Tools Appl (2018) 77:10217–10233 10221

2.2 Logistic map

Logistic maps are a kind of chaotic system. They have a very simple mathematical form that
gives rise to complex dynamic behavior, and have been widely used in various research fields.
The standard equation for a logistic map is:
xnþ1 ¼ μxn ð1−xn Þ ð2Þ
where 0 < μ < 4, x ∈ (0, 1), n = 0, 1, 2, ⋯. When 3.57 < μ ≤ 4, the map becomes chaotic. To
broaden the logistic mapping parameter range and improve its dynamic characteristics, the
logistic map equation has been modified and extended, such as the improved logistic map in
[14] can be written as:
8
< xnþ1 ¼ ðLðμ; xn Þ  Gðk ÞÞ−floorðLðμ; xn Þ  Gðk ÞÞ
Lðμ; xn Þ ¼ μxn ð1−xn Þ ð3Þ
:
Gðk Þ ¼ 2k ; k∈Ζ þ ; k ≥8

This improved equation exhibits chaotic behavior when 0 < μ ≤ 4, and the chaotic sequence
is more evenly distributed in [0, 14]. However, the iteration of Eq. (3) is still dependent on the
initial values of μ and x0. To further enhance the randomness of the chaotic sequences, the
logistic map is designed as a segmented function, and the lower four bit-planes of the image to
be encrypted are introduced as a control parameter. This improved logistic map is given by:
8
>
> xnþ1 ¼ ðLðμ; xn Þ  Gðk ÞÞ−floorðLðμ; xn Þ  Gðk ÞÞ
>
> Lðμ; xn Þ ¼ μxn ð1−xn Þ
<
Gðk Þ¼ 2k ð4Þ
>
>
>
> j; i < ¼ m þ
:k ¼ ; j∈Ζ ; j ≥8
j þ dðiÞ; m < i <¼ m þ lp

where i is the number of iterations, m denotes the number of terms of the chaotic sequence that
are discarded to eliminate the transient effect, d(i) is the element value of the low 4-bit matrix
of the image to be encrypted, and lp is the total number of pixels in the encrypted image.
Figure 2 shows the Lyapunov exponents of the standard logistic map, the improved logistic
map in [14], and the proposed logistic map.
The random matrix is used as the control parameter of the proposed logistic map, so
that the resulted sequence distribution is more uniform. To evaluate the data distribution of
the proposed logistic map, a histogram of chaotic map is constructed. The entire range of

Standard logistic map Improved logistic map Proposed logistic map


[1]
Fig. 2 Lyapunov exponents of three logistic maps
10222 Multimed Tools Appl (2018) 77:10217–10233

[0, 14] is divided into 100 equal intervals, and then the number of output values of a
chaotic map in each interval was counted. The histograms of the standard logistic map, the
improved logistic map in [14], and the proposed logistic map are shown in Fig. 3, it can be
seen from Fig. 3 that, the histogram of proposed logistic map achieves been performance
than the others.

3 Algorithm description

3.1 Encryption algorithm description

A) Global Pixel Position Scrambling

To break the high correlation between adjacent pixels in the image, the pixel position of the
image to be encrypted is scrambled. The pixel position scrambling process is as follows:

Step1: Input the 8-bit gray-scale image P to be encrypted. For an image size of M × N, let
lp = M × N.
Step2: P is converted into a one-dimensional vector P1 of length lp in order of column
priority.
Step3: Input the key μ1, x1, and use the iterative formula of Eq. (3) m + lp times. To
eliminate adverse transient effects, discard the first m values of the chaotic sequence
to obtain the key sequence K1 = {k1, k2, k3, ⋯, klp}. Order the elements of K1 from
0
n 0 0 0 0
o
lowest to highest to obtain a new sequence K1 ¼ k 1 ; k 2 ; k 3 ; ⋯; k lp and a position
sequence T1 = {t1, t2, t3, ⋯, tlp}. T1 has the same size as K1, to record the address
0
codes, that is to say, T1 denotes the new index of K1 in the new sequenceK1 .
Step4: Using the position sequence T1, scramble the position of the one-dimensional vector
P1 to obtain the imageP2. The scrambling method is as follows:

P2i ¼ P1ti ; i ¼ 1; 2; 3; ⋯; lp ð5Þ

Where P2i is the ith element of P2, P1ti is the ti element of P1.

B) Position Scrambling and Pixel Value Substitution Based on Bit-planes

Standard logistic map Improved logistic map Proposed logistic map


[1]
Fig. 3 Histogram of three logistic maps
Multimed Tools Appl (2018) 77:10217–10233 10223

The four highest bit-planes of an image contain 94% of the total image information. Thus, it
is important to design a stronger encryption algorithm for these four bit-planes. The image P2,
which is obtained by scrambling the global position, is decomposed into a high 4-bit matrix H
and a low 4-bit matrix L of size M × N. Using L as the control parameter of Eq. (4), a chaotic
sequence is generated iteratively and used for position scrambling and the XOR operation on
the high 4-bit matrix H. The encrypted matrices H and L are then combined into an 8-bit
matrix to obtain an encrypted image. The details of these steps are as follows:

Step1: The image P2 is decomposed into two 4-bit M × N matrices H (high 4-bit matrix) and
L (low 4-bit matrix).
Step2: Input the key μ2, x2, and use the iterative formula in Eq. (4) and the matrix Ln + lp
times. Discard the first n values of the chaotic sequence to eliminate adverse transient
effects, and obtain the key sequence K2. Ordering the elements of K2 from lowest to
0
n 0 0 0 0
o
highest, a new sequence K2 ¼ k 1 ; k 2 ; k 3 ; ⋯; k lp and a position sequence
T2 = {t1, t2, t3, ⋯, tlp} are obtained. T2is the key for scrambling the pixel position
of the matrix H.
Step3: Using T2 scramble the position of the matrix H according to Eq.(5) to obtain the
image H1.
Step4: Extract 10–12 digits after the decimal point of the key sequence K2 to get an integer
sequence K3. Calculate K3 mod 16 to obtain a 0–15 integer random sequence K4. K4
performs an XOR operation with H1 to give the encrypted image H2 of the higher
four bit-planes.
Step5: Combine H2 and L into an 8-bit matrix to obtain the encrypted image E.

3.2 Decryption algorithm description

The decryption algorithm is the inverse of the encryption algorithm. The 8-bit gray image to be
decrypted is decomposed into two 4-bit matrices. The initial key is input, and the key
sequence, which is generated by the low 4-bit matrix and Eq.(4), is applicable to the XOR
operation and the position scrambling recovery of the high 4-bit matrix. The reconstructed
high 4-bit matrix is combined with the low 4-bit matrix to synthesize an 8-bit image matrix,
and the key sequence generated by Eq. (3) is used to reverse the pixel location global
scrambling of the 8-bit image matrix to obtain the decryption image. The detailed decryption
steps are as follows:

Step1: Input the gray-scale image E to be decrypted. For an image size of M × N, let lp =
M × N.
Step2: E is decomposed into a high 4-bit matrix H and a low 4-bit matrix L. H and L are 4-
bit matrices of size M × N.
Step3: Input the key μ2, x2. The matrix L is introduced into the iterative process of Eq. (4)
n + lp times. The first n values of the chaotic sequence are discarded to give the key
sequence K1 = {k1, k2, k3, ⋯, klp}. The elements of K1 are ordered from lowest to
0
n 0 0 0 0
o
highest, giving a new sequence K1 ¼ k 1 ; k 2 ; k 3 ; ⋯; k lp and a position sequence
T1 = {t1, t2, t3, ⋯, tlp}. T1 is the key to restore the pixel position of the matrix H.
10224 Multimed Tools Appl (2018) 77:10217–10233

Step4: Extract 10–12 digits after the decimal point of the key sequence K1 to obtain an
integer sequence K2. Calculate K2 mod 16 to obtain a 0–15 integer random sequence
K3. K3 then performs an XOR operation with H to obtain image H1.
Step5: Reverse the pixel location scrambling of image H1using the position sequence T1
and Eq. (5) to obtain image H2.
Step6: Synthesize H2 and L into an 8-bit image matrix E1.
Step7: Enter the key μ1, x1 and apply the iterative formula in Eq. (3) m + lp times. Discard
the first m values of the chaotic sequence to get the key sequence K4 = {k1, k2, k3, ⋯,
0
klp}. Order the elements of K4 from lowest to highest to obtain a new sequence K4
and a position sequence T2 = {t1, t2, t3, ⋯, tlp}. T2 is the key to restore the pixel
position of the image E1.
Step8: Reverse the pixel location global scrambling of image E1 using position sequence T2
and Eq. (5) to obtain the decryption image P.

4 Experimental results and analysis

4.1 Experimental platform

To verify the performance of the proposed method, a PC with an Intel® Core™i3-


4150 M CPU @ 3.50GHz, 4GB memory, and 32-bit Windows 7 OS was used. The
encryption and decryption algorithms described in Section 2 were implemented using
MATLAB R2010a.

4.2 Experimental results

To evaluate the performance of the algorithm, the simulation experiments were conducted
using 3256 × 256 classical images (image a: Lena, image b: baboon, image c: pepper), and
2512 × 768 images in Kodak image database (image d: kodim04, image e: kodim18) (http://r0
k.us/graphics/kodak/). The experimental results in Fig. 4 show the encrypted images without
texture. These images are disorganized, and are visually indistinguishable from the plaintext
image. The images, which are decrypted by the correct key, exhibit no visual difference from
the plaintext images. With the MATLAB program, each pixel value of the ciphertext and
plaintext images was compared, and there were no differences. The experimental results
demonstrate that the proposed algorithm can correctly realize image encryption and
decryption.

4.3 Analysis of key space

The key space is all of the digital space that can be used as a key for encryption/decryption. To
ensure that there is sufficient capacity to resist the brute-force attack, the key space should be
sufficiently large. In the proposed method, the encryption algorithm key consists of the control
parameters μ, μ2 and the initial values x1, x2 of two independent logistic maps. Assuming that
the computer storage accuracy is 10−15, the key space for each key is 1015, and the overall key
space of the algorithm is about 1015 × 1015 × 1015 × 1015 = 1060. Such a large key space is
sufficient to resist exhaustive and other violent attacks.
Multimed Tools Appl (2018) 77:10217–10233 10225

Plaintext of image a Ciphertext of image a decrypted image of image a

Plaintext of image b Ciphertext of image b decrypted image of image b

Plaintext of image c Ciphertext of image c decrypted image of image c


Fig. 4 Experimental results of encryption/decryption

4.4 Analysis of key sensitivity

The key sensitivity includes the encryption sensitivity and decryption sensitivity. To evaluate
the key sensitivity of this algorithm in the encryption process, each of the four keys was
subjected to a slight degree of disturbance (of the order 10‐15). The proportion of the gray
values that changed pixels between the modified ciphertext image and the ciphertext image
obtained by the original password (μ1 = 3.701, x1 = 0.6, μ2 = 3.802, x2 = 0.75) was then calcu-
lated. The test results in Table 3 indicate that, in the encryption process, even slight changes in

Table 3 Sensitivity Test for Encryption Key

Encryption
μ1 ¼ 3:701000000000001 μ1 ¼ 3:701 μ1 ¼ 3:701 x1 ¼ 0:6 μ1 ¼ 3:701 x1 ¼ 0:6
key x1 ¼ 0:6 μ2 ¼ 3:802 x1 ¼ 0:600000000000001 μ2 ¼ 3:802000000000001 μ2 ¼ 3:802
x2 ¼ 0:75 μ2 ¼ 3:802 x2 ¼ 0:75 x2 ¼ 0:75 x2 ¼ 0:750000000000001

image a 99.62% 99.61% 93.64% 93.76%


image b 99.54% 99.60% 93.78% 93.78%
image c 99.62% 99.59% 93.86% 93.58%
image d 99.61% 99.61% 93.65% 93.79%
image e 99.60% 99.61% 93.75% 93.73%
10226 Multimed Tools Appl (2018) 77:10217–10233

the key cause 93% of the ciphertext image pixel values to change, indicating that the
encryption process has good key sensitivity.
In the decryption process, taking image a as an example, the test results for each decryption
password change are shown in Fig. 5. In the decryption process, even if the key has a small
change, it cannot correctly decrypt the encrypted image, indicating that the decryption process
also has good key sensitivity.

4.5 Sensitivity analysis of plaintext

The more sensitive the ciphertext image is to the plaintext image, the better the performance of
the algorithm against differential attacks. Attackers usually make some small change to the
plaintext (such as a slight change in the gray value of a pixel), then compare the resulting
difference from the ciphertext image of the original plaintext. The number of pixel changes
ratio (NPCR) and unified average change intensity (UACI) can be used to evaluate the image
encryption for the effects of differential attacks. NPCR is the proportion of the number of
changed pixels in the ciphertext image after the original image has been changed. A greater
rate of change indicates that the algorithm is more sensitive to changes in the plaintext image,
indicating a stronger ability to resist the chosen-plaintext attack. UACI measures the average
intensity of differences in the pixel gray value between the plaintext image and ciphertext
image. The larger the average intensity of differences between the plaintext image and
ciphertext image, the better the security of the encryption algorithm and the stronger the
resistance to differential attacks. NPCR and UACI are calculated as follows:

Plaintext of image a 1 =3.701000000000001 1 =3.701  2 =3.802


x1 =0.6  2 =3.802 x1 =0.600000000000001
x2 =0.75 Decrypted Image x2 =0.75 Decrypted Image

1 =3.701 x1 =0.6 1 =3.701 x1 =0.6  2 =3.802  1 =3.701 x1 =0.6


 2 =3.802000000000001 x2 =0.750000000000001  2 =3.802 x2 =0.75
x2 =0.75 Decrypted Image Decrypted Image Decrypted Image
Fig. 5 Sensitivity test for decryption key
Multimed Tools Appl (2018) 77:10217–10233 10227

Table 4 NPCR and UACI Test Results

Image Index (1,1) (256,256) (20,1) (20,256) (100,100)

Image a NPCR 93.79% 90.48% 93.76% 93.42% 92.59%


UACI 16.78% 16.09% 16.86% 16.55% 16.49%
Image b NPCR 93.66% 88.65% 93.67% 92.97% 91.42%
UACI 16.59% 15.16% 16.73% 16.37% 15.94%
Image c NPCR 93.69% 91.31% 93.84% 93.55% 92.77%
UACI 16.70% 16.12% 16.70% 16.60% 16.40%
Image d NPCR 93.64% 90.02% 93.62% 90.79% 92.66%
UACI 16.64% 14.54% 16.61% 14.89% 16.03%
Image e NPCR 93.57% 88.32% 93.69% 89.52% 92.23%
UACI 16.52% 12.75% 16.62% 13.65% 15.53%

M ;N
∑ Dði; jÞ
i; j
NPCR ¼  100%
M  N
1; C 1 ði; jÞ≠C 2 ði; jÞ
Dði; jÞ ¼ ð6Þ
0; C 1 ði; jÞ ¼ C 2 ði; jÞ
M ;N
∑ jC 1 ði; jÞ−C 2 ði; jÞj
i; j
UACI ¼  100%
M  N  255
Where M and N indicate the image size. C1 and C2 are two ciphertext images whose
corresponding plaintext images have different gray values in only one pixel.
In this paper, five experiments were performed for each experimental image. Each time a
pixel was randomly selected in the experimental image, the gray value of the pixel was
increased by 1, and then the modulo-16 value was computed.The test results presented in
Table 4 indicate that most NPCRs are above 90% and UACI reached 15%, which

plaintext histogram of plaintext histogram of plaintext histogram of


image a image b image c

ciphertext histogram of ciphertext histogram of ciphertext histogram of


image a image b image c
Fig. 6 Histogram comparison before and after encryption
10228 Multimed Tools Appl (2018) 77:10217–10233

Table 5 Comparison of informa-


tion entropy between plaintext and image The information The information
ciphertext entropy of plaintext entropy of ciphertext

image a 7.4832 7.9959


image b 7.1761 7.9975
image c 7.6013 7.9967
image d 7.1192 7.9972
image e 6.9755 7.9987

demonstrates that the algorithm has good plaintext sensitivity and offers good resistance to
differential attacks.

4.6 Histogram contrast

The histogram of the digital image reflects the distribution of gray values in the image pixels.
Figure 6 compares the histograms of the plaintext image and ciphertext image. The histograms
of the plaintext image are not evenly distributed and intuitively reflect the distribution of the
gray value of the image, whereas the encrypted image histogram exhibits a relatively uniform
distribution. Thus, the distribution of the pixel values of the plaintext image is effectively
masked, increasing the difficulty of using statistical analysis to break the ciphertext image.

4.7 Analysis of the information entropy

Information entropy is an important index for measuring stochasticity, which reflects the
distribution of the gray values of an image. The more uniform the distribution of gray values,
the greater the information entropy of the image. The information entropy of a gray image can
be calculated as:
L
HðCÞ ¼ ‐ ∑ pðxi Þlog2 pðxi Þ ð7Þ
i¼1

Where C is the information entropy of the gray image and p(xi) is the probability that the
image pixel value appears. The theoretical information entropy value of an image with a gray
level of 256 is 8; the closer the image information entropy to this theoretical value, the more
random the pixel gray value distribution of the image. The information entropy of the
encrypted images was calculated according to Eq. (7). The results in Table 5 show that the
information entropy of the ciphertext is greater than 7.99, i.e., the difference from the
theoretical maximum of the information entropy is less than 0.01. The experimental results
show that the gray value distribution of the encrypted image is very uniform, and so the
algorithm has a good encryption effect.

Table 6 Information entropy comparisons

Image Entropy of Entropy of the cipher image


plain image
The proposed Ref. [7] Ref. [27] Ref. [11] Ref. [16] Joseph ring
scheme Table 1 Table 4 Table 8 Table 7 algorithm
Lena(gray)

Lena 7.4832 7.9959 7.989 4 7.990 7.8571 7.993459 7.9958


Multimed Tools Appl (2018) 77:10217–10233 10229

Table 7 Comparison of Correlation Coefficients between Plaintext and Ciphertext

image horizontal direction vertical direction diagonal direction

plaintext ciphertext plaintext ciphertext plaintext ciphertext

Image a 0.9478 0.0012 0.9107 0.0232 0.8767 −0.0259


image b 0.6328 0.0197 0.7210 0.0133 0.6255 −0.0032
image c 0.9541 −0.0073 0.9492 −0.0052 0.9172 −0.0013
image d 0.9790 −0.0124 0.9802 0.0162 0.9663 0.0056
image e 0.9018 −0.0095 0.9347 0.0165 0.8738 0.0061

Taking the lena image as an example, the entropy of the proposed algorithm is compared
with the entropy in [7, 11, 16, 27] and the Joseph ring algorithm. The results are presented in
Table 6. It can be seen from Table 6 that, the algorithm proposed in this paper achieves better
performance than the Joseph ring algorithm and the ones in [7, 11, 16, 27].

4.8 Correlation analysis of two adjacent pixels

One characteristic of digital images is that adjacent pixels are strongly correlated. To calculate
the correlation of adjacent pixels before and after encryption, 3000 sets of adjacent pixels were
randomly selected in the horizontal, vertical, and diagonal directions of the plaintext and
ciphertext images. The horizontal, vertical, and diagonal correlation coefficients were calcu-
lated using Eq. (8). The results in Table 7 and Fig. 7 show that the correlation coefficients of
the plaintext image are all greater than 0.5, and the distribution of the image is concentrated in
the vicinity of the diagonal, which indicates that the adjacent pixels of the plaintext image have
a strong correlation. After encryption, this strong correlation between the image pixels has
been broken, and the correlation coefficient tends to 0. The distribution of the image is random,

plaintext horizontal plaintext vertical plaintext diagonal


direction of image a direction of image a direction of image a

ciphertext horizontal ciphertext vertical ciphertext diagonal


direction of image a direction of image a direction of image a
Fig. 7 Correlation in three directions before and after encryption of image a
10230 Multimed Tools Appl (2018) 77:10217–10233

indicating that the gray value distribution of the plaintext image pixels has been disrupted and
a good encryption effect has been achieved.

1 K
E ðxÞ ¼ ∑ xi
K i¼1
1 K
DðxÞ ¼ ∑ ðxi −E ðxÞÞ2
K i¼1
1 K ð8Þ
Covðx; yÞ ¼ ∑ ðxi −EðxÞÞðyi −E ðyÞÞ
K i¼1
Covðx; yÞ
rxy ¼ pffiffiffiffiffiffiffiffiffiffi* pffiffiffiffiffiffiffiffiffiffi
DðxÞ DðyÞ

5 Conclusion

The amount of information contained in each bit-plane of an image is different, with the higher
four bits containing more than 94% of the amount of the information, and the lower four bits
containing less than 6%. In this paper, different encryption algorithms are poposed for the high
4-bit and the low 4-bit planes, depending on the amount of image information contained in the
different planes of the digital image. The scrambled low 4-bit matrix is used for the control
parameter of the improved logistic map, and the information of the low 4-bit of the image is
tightly bound with the high 4-bit encryption key, which effectively improves the security of the
algorithm. Experimental results are provided to demonstrate the proposed algorithm can
outperform the existing ones.

Acknowledgements This work was supported by the Project of the National Science & Technology Pillar
Program of China during the Twelfth Five-year Plan Period (2015BAK27B03) and the Science & Technology
Cooperation Project of Guizhou (LH-2015-7294).

References

1. Cao JQ, Xiao HR, Lan ZL, Zhang H (2010) Chaos encryption algorithm based on bit-plane of digital image.
Computer technology and. Development 20(8):133–136
2. Chai XL, (2017) An image encryption algorithm based on bit level Brownian motion and new chaotic
systems. Multimedia Tools & Applications 76:1159–1175
3. Chai XL, Gan ZH (2016) New bit-level self-adaption color image encryption algorithm based on
Hyperchaotic system. Comput Sci 43(4):134–139
4. Chen S, Yang YJ, Yin X (2015) Digital image encryption algorithm based on improved Knight's tour and bit
operation. J Chin Comput Syst 36(7):1607–1612
5. Deng XH, Liao CL, Zhu CX, Chen ZG (2014) Image encryption algorithms based on chaos through dual
scrambling of pixel position and bit. J Commun, 35(3):216–223
6. Guo Y, Shao LP, Lu Y (2015) Bit-level image encryption algorithm based on Josephus and Henon chaotic
map. Appl Res Comput 32(4):1131–1137
7. Hao M (2015) Image encryption algorithm based on multiple ChaoticSystems and bit operations. Res
Explor Lab 34(3):35–39
8. Hao L, Min L (2014) Statistical tests and chaotic synchronization based pseudorandom number generator
for string bit sequences with application to image encryption. Eur Phys J Spec Top 223(8):1679–1697
Multimed Tools Appl (2018) 77:10217–10233 10231

9. Huang FZ, Zhao Y, Liang NX (2017) A method for real-time monitoring and evaluating asphalt mixture
paving uniformity based on digital image processing technology. J Highway Transp Res Dev 34(4):8–15
10. Khanzadi H, Eshghi M, Borujeni SE (2014) Image encryption using random bit sequence based on chaotic
maps. Arab J Sci Eng 39(2):1039–1047
11. Li B, Liao XF, Jiang Y (2017) A novel image encryption scheme based on logistic map and dynatomic
modular curve. Multimed Tools Appl (1):1–28. https://doi.org/10.1007/s11042-017-4786-7
12. Liang W, Tang MD, Jing L, Sangaiah AK, Huang Y (2017) SIRSE: a secure identity recognition scheme
based on electroencephalogram data with multi-factor feature. Comput Electr Eng. https://doi.org/10.1016/j.
compeleceng. 2017.05.001
13. Liao X, Guo SJ, Yin JJ, Wang H, Li X, Sangaiah AK (2017) New cubic reference table based image
steganography. Multimed Tools Appl, (4):1–18. https://doi.org/10.1007/s11042-017-4946-9
14. Liu R (2015) New algorithm for color image encryption using improved 1D logistic. Open Cybern
Systemics J 9(1):210–216
15. Liu LP, Zhang XF (2013) Image encryption algorithm based on chaos and bit operations. J Comput Appl
33(4):1070–1073
16. Liu Y, Tong XJ, Ma J (2016) Image encryption algorithm based on hyper-chaotic system and dynamic S-
box. Multimed Tools Appl 75(13):7739–7759
17. Lu P, Dong H, Ma X (2011) Image scrambling optimization algorithm based on mixed chaos system and bit
decomposition. Comput Eng Appl 47(21):191–194
18. Pan TG, Li D (2013) A bit transformation image encryption algorithm based on chaotic map. Electric Mach
Control 17(10):97–100
19. Hu PF, Ning HS, Qiu T, Xu Y, Luo X, Sangaiah AK (2017) A unified face identification and resolution
scheme using cloud computing in internet of things. Futur Gener Comput Syst, doi:https://doi.org/10.1016/j.
future.2017.03.030
20. Samuel OW, Zhou H, Li XX, Wang H, Zhang HS, Sangaiah AK, Li GL (2017) Pattern recognition of
electromyography signals based on novel time domain features for amputees' limb motion classification.
Comput Electr Eng, 1–10. https://doi.org/10.1016/j.compeleceng.2017.04.003
21. Samuel OW, Asogbon GM, Sangaiah AK, Li GL (2017) Multi-technique object tracking approach- a
reinforcement paradigm. Comput Electr Eng. https://doi.org/10.1016/j.compeleceng.2017.02.002
22. Shi LW, Wang DY (2017) Evalution indexes of asphalt mixture main skeleton based on digital image
processing. China J Highway Transport 30(5):52–58
23. Tuo C, Qin Z, Li Q (2013) Color image encryption algorithm based on 2D logistic map and bit rear range.
Comput Sci 40(8):300–302
24. XH W (2013) Research on the bit-level image encryption algorithm based on chaos. Microelectronics
Comput 12:69–72
25. Xie GB, Wang T (2016) A chaotic image encryption algorithm based on pixel scrambling and bit
substitution. Microelectronics Comput 33(3):80–85
26. Xu C, Zhang XF (2014) Improved image encryption algorithm based on bit-plane. Comput Eng Des 35(2):
451–456
27. Ye GD, Huang XL (2016) A novel block chaotic encryption scheme for remote sensing image. Multimed
Tools Appl 75(18):1–14
28. Yuan L, Kang BS (2009) Image scrambling algorithm based on logistic chaotic sequence and bit exchange.
J Comput Appl 29(10):2681–2683
29. Zhang YQ, Wang XY (2014) Analysis and improvement of a chaos-based symmetric image encryption
scheme using a bit-level permutation. Nonlinear Dyn 77(3):687–698
30. Zhang R, Shen J, Wei F, Li X, Sangaiah AK (2017) Medical image classification based on multi-scale non-
negative sparse coding. Artif Intell Med. https://doi.org/10.1016/j.artmed.2017.05.006
31. Zhang GS, Chen DS, Qiu HT, LingHu D, Wang HY (2017) Design of High Speed Image Tracking System
Based on FPGA. Microelectronics Comput 34(4):13–16
10232 Multimed Tools Appl (2018) 77:10217–10233

Jingyi Liu is a postgraduate in the School of Science, Hubei University for Nationalities. His research interests
mainly focus on chaotic cryptography and digital image processing.

Dingding Yang is a postgraduate in the School of Science, Hubei University for Nationalities. He received the
B.S. degree in mathematics and applied mathematics from Lvliang University, Shanxi, China, in 2015. He is
currently pursuing the M.S. degree in operational research and cybernetics from the School of Science, Hubei
University for Nationalities, China. His research interests mainly focus on digital image processing and VC ++
programming.
Multimed Tools Appl (2018) 77:10217–10233 10233

Hongbo Zhou is a lecturer in School of Mathematics and Information Science, Guiyang University. She
graduated from department of mathematics, Hunan Hengyang Normal College, China, in 1998, and received
the Master degree in science from Guizhou University, China, in 2006. Her reserch interests mainly focus on
internet of things and network security technology.

Shiqiang Chen is a professor in the School of Science, Hubei University for Nationalities. He received the B.S.
degree in Mathematics from Hubei University for Nationalities, China, in 1997, and the M.S. degree in Computer
Software and Theory from Institute of Computer Software, Guizhou University, China, in 2005. His research
interests mainly focus on software technology, network communication, image engineering and internet of
things.

S-ar putea să vă placă și