1. Introduction
Because of pseudo-randomness, orbital unpredictability, and sensitivity of the initial values, chaotic maps have been widely applied in the encryption system, especially image encryption [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10]. For example, a symmetric image encryption algorithm based on mixed linear-nonlinear coupled map lattice was proposed by Zhang et al. [
11], a novel image encryption algorithm based on cycle shift and chaotic system was proposed by Wang et al. [
4], and an image encryption algorithm using the two-dimensional logistic chaotic map was proposed by Wu et al. [
1].
One-dimensional (1D) chaotic maps, such as Logistic map [
12], usually have relatively narrow chaotic range, smaller Lyapunov exponent, and excessive periodic windows, and their structure and chaotic orbit are rather simple. With the development of chaotic cracking technology, the trajectory of 1D chaotic maps may be estimated [
13]. So using 1D chaotic maps in image encryption may be insecure. There is a report that Logistic map-based image encryption algorithm proposed in [
14] was proved to be not safe [
15].
To address the disadvantages of 1D chaotic maps, researchers have developed several methods. In [
16], a two-dimensional (2D) Sine Logistic modulation map (2D-SLMM) is proposed combining a 1D Logistic map and sinusoidal map. In [
17], a new 1D chaotic map is constructed by superimposing any two chaotic maps from Logistic, sinusoidal, and tent maps. In [
18], Zhou et al. designed a new parameter switching chaotic system and applied this to image encryption.
However, the chaotic maps proposed in these papers realise better performance only by increasing the nonlinearity of the chaotic map. In this study, we add delay and nonlinear modulation into the 1D chaotic map [
19] and propose a new nonlinearly modulated Logistic map with delay model (NMLD). Since the parameter of Logistic map varies over a larger range than most other chaotic maps, such as Bernoulli map, applying it to our model may result in a larger chaotic interval, which provides greater key space when encrypting. So, we propose a chaotic map called first-order Feigenbaum-Logistic NMLD (FL-NMLD) based on our model. It has a considerably wider chaotic range, larger Lyapunov exponents, and superior ergodicity compared to existing chaotic maps.
The shuffle process can operate on the pixel-plane or bit-plane. A majority of recent image encryption algorithms operate on the pixel plane [
4,
16,
20,
21]. The pixel-plane shuffle operation of these algorithms just changes the position of the pixel. Conversely, bit-plane shuffle not only changes the position of the pixel, but also changes the position of each bit in the pixel, so it is more secure; however, it requires more execution time. In this paper, we propose a image encryption algorithm that joins pixel-plane and bit-plane shuffle (JPB). This algorithm performs different encryption operations on one or several bit planes according to the amount of information contained in each bit plane. Compared to simple pixel-plane encryption [
4] and simple bit-plane encryption [
22], this image encryption algorithm balances the security of the encryption system with time consumption.
The remainder of this paper is organised as follows. In
Section 2, the NMLD model is proposed and its chaotic characteristics are analysed using trajectory, Lyapunov exponents, and permutation entropy. In
Section 3, the JPB image encryption algorithm based on FL-NMLD is presented. In
Section 4, we analyse the security and time complexity of JPB. Finally, we summarise the results.
3. Joint Pixel-Plane and Bit-Plane Image Encryption
The shuffle process of an image encryption algorithm can operate on the pixel plane or bit plane. A pixel-plane shuffle has higher efficiency than bit-plane scrambling; however, its security is not sufficiently acceptable. Conversely, a bit-plane shuffle process is more secure; however, it requires more execution time.
The information contained in different bits may vary in one pixel. For example, a “1” at the 8th bit of a pixel represents 128 (
). In contrast, a “1” only represents 1 (
) at the first bit, which contains less information. According to Equation (
3), we calculated the ratio
of information contained in
ith bit, as shown in
Table 1.
Considering that more than 90% of the information of one pixel is concentrated in the higher four bits, we separate the higher four-bit planes to perform bit-plane shuffle. Simultaneously, we reassemble the lower four-bit planes into a pixel plane for pixel-plane shuffle. Then, through conversions, we can obtain eight shuffled bit planes. Next, after reassembling these bit planes into a pixel plane, we can obtain the shuffled image.
Then, we perform a diffusion operation to alter the value of each pixel in the shuffled image.
Based on the joint operations of bit and pixel plane, we propose an improved chaotic image encryption scheme, as displayed in
Figure 5. In
Figure 5, the symbol
indicates the size of the matrix.
Moreover, the shuffle process is related to the plaintext; hence, the encrypted image can effectively resist chosen plaintext attacks.
3.1. Secret Key Structure
Figure 6 displays the structure of the secret key. The key is 256 bits long.
,
,
, and
H are decimals generated by a 53-bit string
according to the IEEE 754 format, as indicated in Equation (
4).
The computational precision of the double-precision number is considered as
; hence,
,
,
, and
H are set as 53 bits long.
and
are integers generated by a 22-bit string. We can obtain the initial values
,
,
, and
, and chaotic parameters
and
of the chaotic map using Equation (
5).
where the value of
i is ‘1’ or ‘2’.
To ensure that FL-NMLD has acceptable chaotic performance, the calculated initial values should be in the range of [0, 1], and the chaotic parameters should be limited to [1.1, 4].
3.2. Shuffle Process
Before performing the bit-plane and pixel-plane shuffle, the higher four-bit planes and lower four-bit planes must be first separated. Further, we must perform conversions to facilitate the shuffle process. Finally, we must obtain the chaotic sequence used for the shuffle based on the input secret key.
Input The security key K = {, , , , , H} and plaintext image P with size of .
Step 1 Convert P into a binary matrix B, with size . Each column of matrix B has the same elements as the bit plane.
Step 2 Separate the first four columns of
B as
, with size
. Reshape matrix
into
to obtain matrix
. Matrix
is a combination of the higher four-bit planes. From the first five columns of
in
Figure 7, we can see how to get the
matrix. The four elements of the first column in
come from elements of the same color in
, and the following columns are similar. We can use the reshape command in MATLAB to implement this transformation.
Step 3 Separate the last four columns of B as . Convert into a decimal matrix , with size . Matrix is reassembled by the lower four-bit planes.
Figure 7 displays the process in Steps 1–3 using an example.
Step 4 Obtain the initial values
and
, and chaotic parameter
based on secret key
K, and update the initial value
using Equation (
6).
where
is calculated using Equation (
7).
Step 5 Iterate Equation (
2)
times using the initial values
and
, and discard the former
items to obtain sequence
x. Then, let
,
, and
.
3.2.1. Bit-Plane Shuffle
In this process, we perform row and column cyclic shifts on , which is the combination of the higher four-bit planes.
Step 1 Rotate the
ith row of matrix
cyclically to the right
times to obtain matrix
.
is obtained by
using Equation (
8).
where
and
is the largest integer not greater than
x.
Step 2 Cyclically shift the
ith column of matrix
from top to bottom
times to obtain matrix
.
is obtained by
using Equation (
9).
where
.
3.2.2. Pixel-Plane Shuffle
In this process, we use a chaotic sequence to sort matrix transformed from the lower four-bit planes.
Step 1 Sort the chaotic sequence in ascending order. Then, we can obtain the sorted sequence h and index sequence t.
Step 2 Sort matrix
with
t to obtain sorted matrix
. The specific method is illustrated below.
Figure 8 displays the process of pixel-plane shuffle.
After the bit-plane and pixel-plane shuffle processes, we can obtain the shuffled matrices
and
. Then, according to the inverse process of the operations displayed in
Figure 7, the two matrices are transformed to obtain the shuffled image
Q.
3.3. Diffusion Process
The diffusion process can alter the value of each pixel in the image to meet the requirement of the diffusion characteristic of the encryption algorithm. The diffusion strategy includes pixel-by-pixel diffusion [
30] and block diffusion [
31]. Pixel-by-pixel diffusion typically provides superior security compared to the others. Hence, in the proposed algorithm, we perform diffusion pixel-by-pixel.
Step 1 Obtain the initial values and , and chaotic parameter based on the secret key K.
Iterate Equation (
2) (
) times with the initial values
and
, and discard the former
items to obtain sequence
y. Use the following formula to improve the randomness of the chaotic sequence.
Then, reshape the sequence into matrix Y with size .
Step 2 Perform diffusion of the shuffled image
Q; the specific method is displayed below.
where ⊕ is the operation where two numbers are bit-XORed by their binary values, and
is the largest integer not greater than
x.
is the encrypted image after diffusion.
An example of this process is provided below.
The diffusion process starts with
and
, which are the blue numbers in
Figure 9. The specific calculation process is as follows:
and the latter operations are similar to the above.
3.4. Decryption
The decryption procedure is the reverse process of encryption.
Input The security key K = {, , , , , H} and the encrypted image .
Step 1 Obtain the chaotic matrix Y based on K.
Step 2 Perform the inverse process of diffusion; the specific method is displayed below.
This process starts with and , where ⊕ is the operation where two numbers are bit-XORed by their binary values, and is the largest integer not greater than x. is the shuffled image.
Step 3 Transform matrix
according to the method displayed in
Figure 7 to obtain
,
, and
.
Step 4 The shuffle process only changes the position of ‘1’ and ‘0’, without changing the number of them. Hence, the number of ‘1’s in the original matrix
B and the shuffled matrix
is the same. Hence, we can calculate
by
using Equation (
7).
Then, we can obtain the chaotic sequence x based on the initial values and parameter obtained by K and .
Step 5 Perform the inverse operation of the pixel-plane shuffle process on matrix . Perform the inverse operation of the bit-plane shuffle process on matrix . After these operations, we can obtain two matrices and .
Step 6 According to the inverse process of the operations displayed in
Figure 7, the two matrices
and
are transformed to obtain the decrypted image
.
5. Conclusions
To address the disadvantages of 1D chaotic maps, this paper proposed a new nonlinearly modulated chaotic model with delay. Based on this model, FL-NMLD, a new chaotic map, was proposed. Some analysis methods, such as trajectory, Lyapunov exponent, and permutation entropy are used to evaluate its chaotic performance. Simulation results demonstrated that it has a wider chaotic range, larger Lyapunov exponents, and superior ergodicity compared to existing chaotic maps.
In order to apply FL-NMLD to image encryption, JPB, a new image encryption algorithm was proposed. This algorithm separate the higher four-bit planes to perform bit-plane shuffle and reassemble the lower four-bit planes into a pixel plane for pixel-plane shuffle. Experimental results show that JPB can resist most attacks and has great security performance, and it has a lower time complexity than bit-level encryption.