Next Article in Journal
An Inertial Modified S-Algorithm for Convex Minimization Problems with Directed Graphs and Its Applications in Classification Problems
Previous Article in Journal
Stieltjes Property of Quasi-Stable Matrix Polynomials
 
 
Due to planned maintenance work on our platforms, there might be short service disruptions on Saturday, December 3rd, between 15:00 and 16:00 (CET).
Order Article Reprints
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A 3D Cuboid Image Encryption Algorithm Based on Controlled Alternate Quantum Walk of Message Coding

by 1, 1,* and 2
1
Key Laboratory of Advanced Design and Intelligent Computing, Ministry of Education, School of Software Engineering, Dalian University, Dalian 116622, China
2
School of Engineering, Computer and Mathematical Sciences, Auckland University of Technology, Auckland 1010, New Zealand
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(23), 4441; https://doi.org/10.3390/math10234441
Received: 17 October 2022 / Revised: 19 November 2022 / Accepted: 22 November 2022 / Published: 24 November 2022

Abstract

:
In order to solve various security risks faced by image privacy protection, we propose a 3D cuboid image encryption scheme based on message-encoded controlled alternate quantum walks. Firstly, we calculated the initial parameters of the quantum system and performed a one-dimensional quantum walk to generate a probability distribution sequence. Secondly, we encoded the sequence into a quaternary message using multiple sets of encoded messages to control the alternate quantum walk model, generating a 3D probability amplitude matrix and 3D probability distribution matrix to obtain the 3D quantum hash sequence through the 3D probability distribution matrix. Then, the image was divided into blocks and integrated into a cuboid. The image cuboid was scrambled between layers using the probability value sequence, and the 3D probability distribution matrix was used to complete the scrambling of the cross-section between layers. Finally, we converted each pixel value of the scrambled cuboid into a binary cube and controlled it to perform the rotation operation through the 3D probability magnitude matrix, then used the 3D quantum hash sequence to XOR the obtained cuboid image and tilted it to obtain the final encrypted image. The simulation results show that the image encryption scheme can resist various typical attacks and has good security performance.

1. Introduction

With the development and rise of 5G, more and more devices are connected to a mobile network, and the data traffic on mobile networks has increased dramatically. In daily life, people process and transmit digital information on mobile networks through various devices every day, among which, digital image information accounts for a large proportion. Preventing digital images from being stolen and tampered with by attackers and ensuring information security is a research topic that cannot be ignored.
People can intuitively obtain a lot of information through images. To prevent image information from being attacked and tampered with, digital watermarking and image encryption technologies can be used to secure data [1,2,3,4]. It is necessary to encrypt images according to their characteristics that are different from text: reduce the amount of data contained in images, break the strong correlation between adjacent pixels, and reduce information redundancy [5,6]. Based on this idea, combined with chaos, DNA coding, and other theories, many researchers have proposed a variety of image encryption algorithms [7,8,9,10,11,12,13,14,15,16]. Mansouri et al. [17] proposed a one-dimensional chaotic mapping amplifier (1-DCMA) and used its generated chaotic sequence to design an asymmetric image encryption scheme which uses a key to add rows and implements a new index representation (IR) concept using a shift sequence to manipulate the position and value of pixels synchronously. Cao et al. [3] proposed a 2D infinite collapse map and compared it with the existing 2D chaotic maps.Two-dimensional ICM has better ergodicity, hyper chaos, unpredictability, and a wider chaotic region. The image is encrypted by 2D-ICM, which makes the system more secure. Wang et al. [18] used the chaotic sequences generated by the Chen hyperchaotic system for interblock index scrambling and intrablock Fisher–Yates scrambling, and then diffused by different DNA encoding rules and different operating rules corresponding to the chaotic sequences, thereby improving the algorithm security. Encryption methods based on chaotic mapping have better performance. However, one-dimensional chaos-based ones only have a very limited range of parameters. Although hyperchaotic ones have a wider range of chaotic regions, most suffer from high-computational cost. In addition, researchers have proposed new methods for image encryption models based on fractal theory [19,20,21], optical theory [22,23], neural network models [4,24,25,26,27], compressed sensing [28,29], optimization algorithms [30,31,32], and quantum theory [33,34].
Quantum walks are divided into two models: continuous and discrete. Discrete quantum walks are nonlinear mappings between quantum operators and the probability of their occurrence positions and are extremely sensitive to the initial state. A discrete quantum walk ensures the security performance of the system through the infinite possibility of the initial state. It has similar characteristics to the chaotic dynamics in determining the walk state in the system, so it is used by researchers in image encryption models [35,36,37]. Yang et al. [38] used the nonlinear chaotic dynamic performance of a quantum walk (QW) to construct a key generator with good performance, and based on this, they proposed an image encryption algorithm that combines quantum computing with image encryption, which has better security. In addition, Yang et al. [39] designed a quantum hash function based on one-dimensional controlled alternating quantum walks and applied it to image encryption. Abd EL-Latif et al. [40] designed an image encryption mechanism based on the controlled alternating quantum walk model. The replacement and scrambling stages are based on independently calculated quantum walks, which well protect the patient privacy in the medical system. However, the initial parameters of the quantum wander described above are fixed, and the quantum wander key is fixed for different images, which has low security and poor key sensitivity. When performing a controlled alternating quantum wander, its controlled coin operator is relatively single, and the redundancy of binary messages is high. At the same time, it only encrypts the original image in the two-dimensional plane using the probability matrix, which has a limited effect on image dislocation and diffusion.
Based on the above research questions, in this paper, we propose a new 3D cuboid image encryption algorithm based on message-encoded controlled alternating quantum walks. In order to solve the problem of fixed initial parameters of quantum wandering, we designed a key set with good security that can calculate the initial parameters of the quantum system and perform a one-dimensional quantum walk to generate a probability distribution sequence. In order to avoid excessive message redundancy, we encoded this sequence into a quaternary message and used multiple sets of encoded messages to control the alternate quantum walk model. Meanwhile, we divided the plane image into blocks and converted it into a three-dimensional cuboid image for processing. Combined with the quantum mechanical properties of the quantum walk model, our scheme has good security performance and can effectively prevent digital image information from being stolen and tampered with by attackers.
The rest of this paper is organized as follows: Section 2 presents one-dimensional discrete quantum walks and controlled alternating quantum walks on circles. Section 3 presents 3D cuboid image encryption based on the message-encoded controlled alternating quantum walks model. The fourth section introduces the security performance analysis and testing of this model. The last section is the conclusion.

2. Preliminary Works

The quantum walk model is a quantization of the classical random walk model by using a quantized description of the position of the particle to construct the entanglement between the particle position and the quantized Markov state variable [35]. There are two models of quantum walks: discrete QWs and continuous QWs. Discrete quantum walks determine the motion state of the system and have similar properties to chaotic dynamics, which can be used in the process of image encryption algorithms. The discrete QWs model consists of two parts: the coin and the walker. The coin and the walker are in a Hilbert space H t = H s H o . By applying a conditional shift operator to the coin operator, the moving state of the walker is changed. On an odd circle with T nodes, the probabilities at all points are essentially nonzero when t     T 1 .

2.1. One-Dimensional Discrete Quantum Walks (1DQWs) on Circles

A one-dimensional discrete quantum walk on a circle [38] whose initial state of the coin operator O is | o = α | 0 + β | 1 , where α and β are the amplitudes of the initial coin operator which satisfy the normalization equation | α | 2 + | β | 2 = 1 . During the evolution of the quantum system, the quantum walk is realized by applying the shift operator to the coin operator, which is represented by the global unitary operator M ^ , such as in Equation (1):
M ^ = N ^ ( I ^ O ^ )
where N ^ represents the shift operator, and its expression is Equation (2):
N ^ = x ( | ( x + 1 ) m o d   T , 0 x , 0 | + | ( x 1 ) m o d   T , 1 x , 1 | )
I ^ represents the identity matrix. O ^ represents the coin operator, and its expression is Equation (3):
O ^ = ( cos θ sin θ sin θ cos θ )
where θ [ 0 , π 2 ] .
After t steps, the final state of the entire quantum system is Equation (4):
| ψ t = ( M ^ ) t | ψ 0
After t steps, the probability of finding a walker at position x is Equation (5):
P ( x , t ) = c { 0 , 1 } | x , c | ( M ^ ) t | ψ 0 | 2
The general situation of the probability distribution of one-dimensional discrete quantum walks on a circle (number of nodes 75; θ 0 = π 3 ; step count k = 165 ; the initial coin operator is c = 1 2 [ 1 1 ] ) is shown in Figure 1.

2.2. Controlled Alternate Quantum Walks (CAQWs) on Circles

A controlled alternate quantum walk process on a circle has a string of messages controlling the transform operator at each step [41]. When the t -th bit of the message is zero or one, the evolution operator M ^ 0 or M ^ 1 is applied to the coin operator, which is expressed as Equations (6) and (7):
M ^ 0 = N ^ y ( I ^ O ^ 0 ) N ^ x ( I ^ O ^ 0 )
M ^ 1 = N ^ y ( I ^ O ^ 1 ) N ^ x ( I ^ O ^ 1 )
where N ^ x , N ^ y represent the shift operators acting in the x and y directions, respectively, which are expressed as Equations (8) and (9):
N ^ x = x , y T ( | ( x + 1 ) m o d   T , y , 0 x , y , 0 | + | ( x 1 ) m o d   T , y , 1 x , y , 1 | )
N ^ y = x , y T ( | x , ( y + 1 ) m o d   T , 0 x , y , 0 | + | x , ( y 1 ) m o d   T , 1 x , y , 1 | )
I ^ represents the identity matrix. O ^ 0 , O ^ 1 represent two alternating coin operators, whose construction is in the following Equations (10) and (11):
O ^ 0 = ( cos θ 0 sin θ 0 sin θ 0 cos θ 0 )
O ^ 1 = ( cos θ 1 sin θ 1 sin θ 1 cos θ 1 )
After t steps, the final state of the entire quantum system is Equation (12):
| ψ t = ( M ^ ) t | ψ 0
After t steps, the magnitude of the probability of finding a walker at position ( x , y ) is Equation (13). The probability is Equation (14):
F ( x , y , t ) = c { 0 , 1 } x , y , c | ( M ^ ) t | ψ 0
P ( x , y , t ) = c { 0 , 1 } | x , y , c | ( M ^ ) t | ψ 0 | 2
The probability distribution of quantum walks controlled by binary message string M on a circle (number of nodes: 19;   θ 0 = π 3 ;   θ 1 = π 5 ; the initial coin operator is c = 1 2 [ 1 1 ] ; m e s s a g e = [ 01000000111101010101010010100000011110101010101001 ] ), as is shown in Figure 2.

3. Proposed Method

In the following subsections, we describe our proposed encryption algorithm in detail.

3.1. Generate Initial Key

Our key consists of four parts: initial parameters d 1 ~ d 8 , s u m P of plaintext image pixel values, image block size B s i z e , supplementary parameters M 1 , N 1 , and the number of blocks B n u m .

3.1.1. Initial Parameters d 1 ~ d 8

We took a plaintext image as the input of SHA-512 and obtained a 128-bit hexadecimal sequence which was divided into 64 groups of sequences k 1 k 64 . Each group was an 8-bit byte sequence. According to the 64 groups of sequences, we calculated and generated initial parameters d 1 ~ d 8 and use them as keys, such as in Equation (15), the specific steps are as follows:
Step one: Convert k 1 k 32 to binary sequence.
Step two: Convert k 33 k 64 into a decimal sequence and take the entire sequence modulo 8 to obtain the cyclic shift bits of the sequence k 1 k 32 .
Step three: According to k 33 k 64 , we need to rotate k 1 k 32 , convert it into a decimal sequence, and calculate the initial parameters d 1 ~ d 8 .
{ d 1 = k 1 m o d ( k 33 , 8 ) + k 2 m o d ( k 34 , 8 ) + k 3 m o d ( k 35 , 8 ) + k 4 m o d ( k 36 , 8 ) 4 256 + 1 d 2 = k 5 m o d ( k 37 , 8 ) + k 6 m o d ( k 38 , 8 ) + k 7 m o d ( k 39 , 8 ) + k 8 m o d ( k 40 , 8 ) 4 256 + 1 d 3 = k 9 m o d ( k 41 , 8 ) + k 10 m o d ( k 42 , 8 ) + k 11 m o d ( k 43 , 8 ) + k 12 m o d ( k 44 , 8 ) 4 256 + 1 d 4 = k 13 m o d ( k 45 , 8 ) k 14 m o d ( k 46 , 8 ) k 15 m o d ( k 47 , 8 ) k 16 m o d ( k 48 , 8 ) 256 + 1 d 5 = k 17 m o d ( k 49 , 8 ) k 18 m o d ( k 50 , 8 ) k 19 m o d ( k 51 , 8 ) k 20 m o d ( k 52 , 8 ) 256 + 1 d 6 = k 21 m o d ( k 53 , 8 ) + k 22 m o d ( k 54 , 8 ) k 23 m o d ( k 55 , 8 ) k 24 m o d ( k 56 , 8 ) 2 256 + 1 d 7 = k 25 m o d ( k 57 , 8 ) k 26 m o d ( k 58 , 8 ) k 27 m o d ( k 59 , 8 ) + k 28 m o d ( k 60 , 8 ) 2 256 + 1 d 8 = k 29 m o d ( k 61 , 8 ) k 30 m o d ( k 62 , 8 ) + k 31 m o d ( k 63 , 8 ) k 32 m o d ( k 64 , 8 ) 2 256 + 1
where represents a cyclic left shift to the binary sequence, represents a cyclic right shift to a binary sequence, and represents the exclusive-or operator.

3.1.2. Sum of Plaintext Image Pixel Values s u m P

Accumulate and sum all pixel values of the plaintext image to obtain the key s u m P , whose expression is Equation (16):
s u m P = x = 1 m y = 1 n P ( x , y )
where P ( x , y ) represents the pixel value at the ( x , y ) position.

3.1.3. Image block size B s i z e

First, select the short side of the image, and assume M is the short side. Then, divide M by an odd number within 11 ~ 30, and select the odd number corresponding to the number with the largest fractional part from the result as the block size B s i z e .

3.1.4. Supplementary Parameters M 1 , N 1 and Number of Blocks B n u m

According to the block size B s i z e , the rows and columns of the image are filled with numbers that are divisible by B s i z e , and the number of rows M 1 and the number of columns N 1 of the supplementary element 0 are used as the key. The calculation formula is Equation (17):
M 1 = m o d ( M , B s i z e ) ; N 1 = m o d ( N , B s i z e )
where m o d represents the modulo, M and N are the number of rows and columns of the original image, and B s i z e is the block size.
After adding elements to the original image, its row and column are M 2   a n d   N 2 , and the number of blocks is calculated by the following Equation (18):
B n u m = M 2 B s i z e N 2 B s i z e

3.2. Generating 3D Probability Magnitude Matrix, 3D Probability Distribution Matrix, and 3D Quantum Hash Sequence by Using Quantum Walks

We used a one-dimensional quantum walk to generate a one-dimensional probability distribution sequence, then encoded the probability distribution sequence to generate a quaternary message and performed controlled alternating quantum walks by encoding the message. Finally, it generated the probability amplitude matrix and probability distribution matrix of multiple CAQWs by combining a 3D probability amplitude matrix and 3D probability distribution matrix and then generated a 3D quantum hash sequence according to the probability distribution matrix. We applied the generated one-dimensional probability distribution sequence, 3D probability amplitude matrix, 3D probability distribution matrix, and 3D quantum hash sequence to the three-dimensional cuboid image encryption algorithm.

3.2.1. Generation of Initial Parameters for 1DQWs

(1)
Number of nodes on the circle
According to the key s u m P generated in Section 3.1.2, the ten-digit number S P of the sum of pixel values is calculated by Equation (19). Then calculate the length l m e s s of the message through the parameter d 1 in Section 3.1.1, as shown in Equation (20). If s u m P = 0 , then the length of the message l m e s s 1 is Equation (21). Finally, the number of nodes T C of the circle is given by Equation (22).
S P = f l o o r ( l o g 10 s u m P )
l m e s s = m o d ( f l o o r ( s u m P d 1 10 15 S P ) , 2 5 ) + 1 + B s i z e
l m e s s 1 = 13 + B s i z e
T C = l m e s s 1 B n u m
where f l o o r means rounding down, l o g 10 is a logarithmic function with base 10, and m o d means a modulo operation.
(2)
Coin parameter θ
The coin parameter θ is calculated by the parameter d 2 of Section 3.1.1, as shown in Equation (23).
θ = m o d ( d 2 10 15 ( π 7 + 2 ) , π 2 )
where m o d represents the modulo operation.
(3)
The initial state of the coin
The initial state of the coin is α | 0 + β | 1 . We used the parameters d 3 and d 4 in Section 3.1.1 to generate the initial state of the coin α , β , α , β is expressed as the following Equation (14). Because the coin operator needs to satisfy | α | 2 + | β | 2 = 1 , we constructed the quadratic equation of one variable of Equation (25) to calculate the initial state of the generated coins.
α = d 3 + ( d 3 2 ) i ; β = ( d 4 2 ) + x i
f = 1 ( d 3 2 + ( d 3 2 ) 2 ) 2 ( ( d 4 2 ) 2 + x 2 ) 2 = 0
where α , β are the amplitude and phase of the initial state (complex number), i represents the complex unit, f represents the quadratic equation to be solved, and x represents the unknown parameter.

3.2.2. Generation of Initial Parameters of CAQWs

(1)
The number of nodes on the circle of CAQWs is equal to the block size B s i z e .
(2)
Coin parameters θ 0 , θ 1
The coin parameters θ 0 , θ 1 are calculated by the parameters d 7 and d 8 in Section 3.1.1, as shown in Equations (26) and (27)
θ 0 = m o d ( d 7 10 15 + ( π 5 + 2 ) , π 2 )
θ 1 = m o d ( d 8 10 15 + ( π 5 + 0.1 ) , π 2 )
(3)
Initial state of the coin
Similar to the initial state of the coin of 1DQWs, the expressions of α 1 , β 1 are Equation (28). Because the coin operator needs to satisfy | α 1 | 2 + | β 1 | 2 = 1 , we constructed the quadratic equation of one variable of Equation (29) to calculate the initial state of the generated coins.
α 1 = ( d 5 2 ) + ( d 5 3 ) i ; β 1 = ( d 6 2 ) + x 1 i
f 1 = 1 ( ( d 5 2 ) 2 + ( d 5 3 ) 2 ) 2 ( ( d 6 2 ) 2 + x 1 2 ) 2 = 0
where α 1 , β 1 are the amplitude and phase of the initial state (complex number), i represents the complex unit. f 1 represents the quadratic equation to be solved, and x 1 represents the unknown parameter.

3.2.3. Generating Probability Distribution Sequences Using 1DQWs

According to the initial parameters, we performed a 1D discrete quantum walk [38]. After t steps, the probability of finding a walker at position x is Equation (30), and we denoted this sequence of probability distributions as Q u m 1 D .
P ( x , t ) = c { 0 , 1 } | x , c | ( M ^ ) t | ψ 0 | 2
where P ( x , t ) represents the probability of finding a walker at x after t steps.

3.2.4. Message Encoding

We mapped the probability distribution sequence Q u m 1 D generated by 1DQWs to values 0–255, as shown in Equation (31), and quaternary encoded it and the encoded m e s s a g e as the message.
m e s s a g e = m o d ( m o d ( f l o o r ( Q u m 1 D 10 200 ) , 256 ) , 4 )
where m o d represents the modulo operation, and f l o o r represents the rounding down.

3.2.5. Controlled Alternate Quantum Walks for Message Encoding

In the proposed image encryption algorithm, we improved the two-dimensional controlled alternating walk model and encoded the sequence generated by 1DQWs into a quaternary sequence as a control message. We also applied the quaternary message encoding to the evolution process of the quantum system [40] by using Equation (32) to represent the global unitary operators M ^ 0 , M ^ 1 , M ^ 2 , M ^ 3 .
{ M ^ 0 = N ^ y ( I ^ O ^ 0 ) N ^ x ( I ^ O ^ 0 ) M ^ 1 = N ^ y ( I ^ O ^ 0 ) N ^ x ( I ^ O ^ 1 ) M ^ 2 = N ^ y ( I ^ O ^ 1 ) N ^ x ( I ^ O ^ 0 ) M ^ 3 = N ^ y ( I ^ O ^ 1 ) N ^ x ( I ^ O ^ 1 )
Assuming that the message string generated by 1DQWs is “320102”, the state of the entire system can be expressed as Equation (33):
| ψ 6 = M ^ 2 M ^ 0 M ^ 1 M ^ 0 M ^ 2 M ^ 3 | ψ 0
After t steps, the final state of the entire quantum system is Equation (34):
| ψ t = ( M ^ ) t | ψ 0
After t steps, the probability amplitude of finding a walker at position ( x , y ) is Equation (35), and the probability is Equation (36):
F ( x , y , t ) = c { 0 , 1 } x , y , c | ( M ^ ) t | ψ 0
P ( x , y , t ) = c { 0 , 1 } | x , y , c | ( M ^ ) t | ψ 0 | 2

3.2.6. Three-Dimensional Probability Amplitude Matrix and Three-Dimensional Probability Distribution Matrix

According to the number of blocks B n u m in Section 3.1.4, we divided the message encoding m e s s a g e into B n u m groups and used Section 3.2.2 to calculate the generated initial parameters of the system. According to the corresponding message encoding, we performed B n u m times of message encoding-controlled alternate quantum walks on the circle and finally generated a 3D probability amplitude matrix f r e of size 2 ( B s i z e B s i z e ) B n u m , whose expression is Equation (37). At the same time, a 3D probability distribution matrix Q u m 2 D of size B s i z e B s i z e B n u m was generated, and its expression is Equation (38).
f r e ( 2 , B s i z e B s i z e , i ) = φ ( F ( x , y , t ) , m e s s a g e ( i ) ) i = 1 , , B n u m
where φ ( F ( x , y , t ) , m e s s a g e ( i ) ) represents the probability amplitude matrix which generated under the control of the i t h group of m e s s a g e encoding messages.
Q u m 2 D ( B s i z e , B s i z e , i ) = ω ( P ( x , y , t ) , m e s s a g e ( i ) ) i = 1 , , B n u m
where ω ( P ( x , y , t ) , m e s s a g e ( i ) ) represents the probability matrix which generated under the control of the i t h group of m e s s a g e encoding messages.

3.2.7. Three-Dimensional Quantum Hash Sequence

Quantum hash sequences have chaotic-dynamics-like properties and can be used to generate pseudorandom numbers. We converted the 3D probability distribution matrix Q u m 2 D , which was generated in Section 3.2.6, into a binary string using Equations (39) and (40) and finally obtained the 3D quantum hash sequence B t e s t . In the diffusion stage, we used the 3D quantum hash sequence B t e s t to complete the diffusion operation.
B = m o d ( f l o o r ( Q u m 2 D 10 15 ) , 256 )
B t e s t = d e c 2 b i n ( B )
where d e c 2 b i n means converting a decimal number to binary.

3.3. Image Encryption Process

Combining the discrete quantum walk model, we propose a three-dimensional cuboid image encryption algorithm with two rounds of scrambling and two rounds of diffusion operations. First, we used 1DQWs to generate a probability value sequence Q u m 1 D , then encoded Q u m 1 D into a quaternary message m e s s a g e . Then, we used the encoded message to control the alternate quantum walk model to generate a 3D probability amplitude matrix and 3D probability distribution matrix. Finally, we used the 3D probability distribution matrix obtain the 3D quantum hash series. The operation is shown in Algorithm 1. We used the probability value sequence Q u m 1 D and 3D probability distribution matrix to complete the image scrambling and used the 3D probability magnitude matrix and 3D quantum hash series to diffuse the image to obtain the final encrypted image. The operation is shown in Algorithm 2. The following are the specific steps of our proposed encryption scheme, and its flow chart is shown in Figure 3.
Algorithm 1. Sequence generation.
Input: Original image(PlainImg)
Output :   d 1 ~ d 8 ,   Q u m 1 D ,   m e s s a g e ,   f r e ,   Q u m 2 D ,   B t e s t
1 k 1 k 64 SHA-512(PlainImg)
2 d 1 ~ d 8 Generate initial key parameters based on k 1 k 64
3 Calculation of 1DQWs and 2DCAQWs
4 Q u m 1 D 1 D Q W s ( T C , t , θ , α , β ) // 1DQWs on a circle with node number T C
5 m e s s a g e e n c o d i n g ( Q u m 1 D ) // Quadratic encoding
6 f r e ( 2 , B s i z e B s i z e , i ) φ ( F ( x , y , t ) , m e s s a g e ( i ) ) i = 1 , , B n u m ;
7 Q u m 2 D ( B s i z e , B s i z e , i ) ω ( P ( x , y , t ) , m e s s a g e ( i ) ) i = 1 , , B n u m // Alternating quantum walks with B n u m sub-message encoding control on a circle
8 B t e s t d e c 2 b i n ( Q u m 2 D ) // Complete diffusion operation using 3D quantum hash sequence Btest
Algorithm 2. Encryption algorithms.
Input: Original image(PlainImg), Q u m 1 D , m e s s a g e , f r e , Q u m 2 D , B t e s t
Output: Encrypted images( E n )
1 Image block ( B s i z e B s i z e   B n u m ) chunking the image
2 P l a i n 3 D Integrating image blocks as rectangles
3 p r m 1 D t s u m ( r e s h a p e ( Q u m 1 D , l m e s s , B n u m ) ) ; //Group summation
4 [ ~ , p r m 1 D i n d e x ] s o r t ( p r m 1 D t ) // Sort
5 P r m P 3 D Displacement between layers according to its index sequence p r m 1 D i n d e x for the image rectangle P l a i n 3 D
6 P r m 2 Sorting and dislocation inside each depth layer using Q u m 2 D
7 for j 1 to B_num
8   BinP 3 = dec 2 bin ( P r m 2 );
9  for i 1 to x ∗ y do
10     BinP 3 _ t     reshape ( BinP 3 )
11    If A > B
12     Bin_P3 rot 90 ( BinP 3 _ t Upper)// Upper layer rotated 90 degrees counterclockwise
13    else
14     Bin_P3 rot 90 ( BinP 3 _ t Lower) //Lower layer rotated clockwise by 90 degrees
15    end
16    P3bin(i,:) = reshape(Bin_P3);
17   end
18   P3bin1 = bin2dec(P3bin);
19   P3bin2 = reshape(P3bin1, x, y);
20 end
21 C t e s t = b i t x o r ( B t e s t , P 3 b i n 2 ) // Global xor
22 E n Tiling the image block C t e s t

3.3.1. Generation of Image Cuboid

Step one: Image segmentation
According to the supplementary parameters M 1 and N 1 generated in Section 3.1.4, the plaintext image blocks were supplemented with zero elements in row M 1 and column N 1 , and then according to the image block size B s i z e generated in Section 3.1.3 and the number of blocks B n u m generated in Section 3.1.4, we divided the filled image into image blocks whose size is B s i z e B s i z e , B n u m number.
Step two: Combine into a 3D image cuboid
The B n u m image blocks generated by Step One were converted into a three-dimensional image cuboid p l a i n 3 D with the size of B s i z e B s i z e   B n u m , line by line, from left to right, and from top to bottom, as shown in Figure 4.

3.3.2. Two Rounds of Scrambling

Step one: Interlayer scrambling based on one-dimensional quantum walk.
According to Equation (41), we divided the probability distribution sequence Q u m 1 D generated in Section 3.2.3 into B n u m groups and then summed the sequences of each group to obtain the sequence p r m 1 D t . The operation process is shown in Figure 5.
Then, Equation (42) was used to sort p r m 1 D t from small to large, and the image cuboid P l a i n 3 D was scrambled between layers according to its index sequence p r m 1 D i n d e x to obtain the scrambled image block P r m P 3 D between layers, as shown in Figure 6.
p r m 1 D t = s u m ( r e s h a p e ( Q u m 1 D , l m e s s , B n u m ) )
where r e s h a p e is an array reconstruction function, l m e s s represents the message length, B n u m represents the number of blocks, and s u m represents the sum of the array by columns.
[ ~ , p r m 1 D i n d e x ] = s o r t ( p r m 1 D t )
where s o r t is the sorting function and p r m 1 D i n d e x is the sequence of index sorting.
Step Two: Layer-by-layer scrambling based on 3D probability distribution matrix
The three-dimensional probability distribution matrix Q u m 2 D generated in Section 3.2.6 sorted the image block from smallest to largest in order from top to bottom in each depth layer and used the index sort matrix generated at each layer. The image block P r m P 3 D was scrambled layer by layer to obtain a new image block P r m 2 , as shown in Figure 7.

3.3.3. Two Rounds of Diffusion

Step one: Binary cube rotation based on probability magnitude matrix
As shown in Figure 8, each 0–255 pixel value of the image block P r m 2 obtained by scrambling in Section 3.3.2 was operated from left to right, layer by layer. Then, we operated it from back to front and top to bottom and encoded as a binary cube. According to the 3D probability amplitude matrix obtained in Section 3.2.6, the binary cube was rotated. We divided the probability amplitude into A direction and B direction. If A > B, the upper layer of the binary cube was rotated 90 degrees counterclockwise; otherwise, the lower layer of the binary cube was rotated 90 degrees clockwise. Finally, the binary cube corresponding to each pixel value was converted into a binary sequence, and we obtained the 3D image block P 3 b i n after the binary cube rotation operation.
Step two: Diffusion based on 3D quantum hash sequence
By using the 3D quantum hash series B t e s t obtained in Section 3.2.7, we performed a global bitwise XOR operation with the 3D image block P 3 b i n according to Equation (43). We converted it into a decimal sequence and obtained the image block C t e s t . Then, we tiled the image block C t e s t to obtain the final encrypted image E n .
C t e s t = b i t x o r ( B t e s t , P 3 b i n )
where b i t x o r means bitwise exclusive or.

3.4. Image Decryption Process

The image decryption process is the reverse operation of the encryption process, and the steps are as follows:
Step one: According to the key B s i z e in Section 3.1.3 and the key B n u m in Section 3.1.4, we divided the encrypted image E n into blocks and then combined them into cubes D e 3 D .
Step two: We converted each pixel value of the cube D e 3 D into a binary sequence and performed a global bitwise XOR operation with the 3D quantum hash series B t e s t which was obtained in Section 3.2.7 to acquire the image block D e 1 .
Step three: Each pixel value of image block D e 1 was encoded into a binary cub, and a reverse rotation operation was performed on the binary cube according to the three-dimensional probability amplitude matrix obtained in Section 3.2.6. This operation is a reverse of Section 3.3.3, resulting in an image block D e 2 .
Step four: The 3D probability distribution matrix Q u m 2 D generated in Section 3.2.6 was sorted by index for each layer, in the order from the top to the bottom. The image block D e 2 was inversely indexed and scrambled layer by layer according to the index order to obtain D e 3 .
Step five: According to the index p r m 1 D i n d e x generated in Section 3.3.2, D e 3 was scrambled with interlayer inverse index to obtain D e 4 .
Step six: By tiling the image block D e 4 obtained in the previous step and removing the supplementary zero elements by row and column according to the keys M 1 and N 1 obtained in Section 3.1.4, we obtained the final decrypted image D e .

4. Simulation Results and Security Analysis

In order to test the security performance of the proposed image encryption scheme, we used MATLAB R2020b software to conduct simulation experiments on a computer with Windows 10 system, 16 GB memory, and i5-10500 CPU. The images we used in testing included 256 ∗ 256 square images (Lena, Baboon, Peppers, White, Black), 512 ∗ 512 square images (Barbara, Cameraman, Livingroom), irregular Lena image, and images from standard 25 grayscale images of the USC-SIPI image database.

4.1. Encryption and Decryption Results

In this paper, 256 ∗ 256, 512 ∗ 512 square images and irregular Lena image were used for testing. The test results of 256 ∗ 256 images (Lena, Baboon, Peppers, White, Black) are shown in Figure 9. The encryption and decryption results of 512 ∗ 512 images (Barbara, Cameraman, Livingroom) and irregular Lena images are shown in Figure 10. The encrypted images shown in the figure cannot show any meaningful information, and the original images with rich information can be obtained by decrypting with the correct key.

4.2. Histogram Analysis

The pixel histogram shows the distribution of different pixel values in the image. We tested and analyzed the histogram of encrypted images. The histogram analysis results of 256 ∗ 256 size images are shown in Figure 11, and the histogram analysis results of 512 ∗ 512 size images and irregular Lena image are shown in Figure 12. It can be seen that the distribution frequency of pixel values in the encrypted images is relatively uniform, and the trend of the histogram is stable, which has a good ability to resist statistical attacks.

4.3. χ 2 Test

We use the χ 2 test to describe the distribution of the pixel histogram [42], whose formula is Equation (44):
χ 2 = i = 1 255 ( v i v 0 ) 2 v 0
where χ 2 represents the value of the chi-square test, i represents the pixel value, v i represents the frequency of the pixel value i in the image, and v 0 represents the expected frequency of the pixel value i , v 0 = ( M N ) / 256 . The smaller the value of the χ 2 test, the more uniform the pixel distribution. When the confidence is α = 0.05 , the condition for passing the test is that χ 2 is less than 293.24783 .
Table 1 (Lena, Baboon, Peppers, White, Black) and Table 2 (Barbara, Cameraman, Livingroom, Irregular Lena) show the test results of plaintext images and the results in comparison with others’ methods. The images were encrypted with different sizes, and all results passed the test conditions, which shows that our algorithm has a good ability to resist statistical attacks.

4.4. Correlation Coefficient Analysis

There is a strong correlation between the adjacent pixels of the original image, and the lower the correlation of the ciphertext image, the stronger the resistance of the algorithm to statistical attacks. The calculation formula of pixel correlation is such as Equations (45)–(47):
r x y = E ( ( x E ( x ) ) ( y E ( y ) ) ) D ( x ) D ( y )
E ( x ) = 1 N i = 1 N x i
D ( x ) = i = 1 n ( x i E ( x ) ) 2 N
where r x y is the pixel correlation coefficient, and E ( x ) and D ( x ) are the expectation and variance.
We selected 2000 pairs of pixels on the horizontal, vertical, and diagonal lines of the image for 30 tests and took the average value. Figure 13 shows the correlation distribution of the horizontal, vertical, and diagonal lines of the images in the USC-SIPI image database, and their values all hovered around zero. For example, the correlations in the horizontal, vertical, and diagonal directions are shown in Figure 14, Figure 15 and Figure 16. Table 3 shows the results of ours and the comparison with others’ methods, bold indicates the average of pixel correlation coefficients in different directions of the image, and the pixel correlation coefficient is much lower than that of the plaintext image, which fully shows that our method has strong resistance to statistical analysis.

4.5. Information Entropy Analysis

Information entropy can be used to measure the randomness of information [43]. Its calculation formula is Equation (48):
H ( m ) = i = 0 255 P ( x i ) × l o g P ( x i )
where H ( m ) represents the information entropy, m represents the information source, x i represents the gray value of the pixel value i , and P ( x i ) represents the probability of the gray value.
The closer the information entropy is to eight, the stronger the randomness of the image and the higher the security performance of its encryption algorithm. We selected multiple sets of images from the USC-SIPI image database for testing, and Table 4 is a comparison of our results with other methods, bold indicates indicators of better performance. The results show that the entropy of the images encrypted by our method is closer to eight.

4.6. Antidifferential Attack (NPCR and UACI Standard Evaluation)

Differential attack is to change specific elements of the plaintext image, corresponding to the degree of influence of different ciphertexts, to obtain as much of the key as possible. The ability of an encryption algorithm to resist differential attacks can be measured by two important parameters: number of pixel change rate (NPCR) and uniform average change intensity (UACI) [44], which are calculated as Equation (49)–(51):
C ( i , j ) = { 0 , i f T 1 ( i , j ) = T 2 ( i , j ) 1 , i f T 1 ( i , j ) T 2 ( i , j )
N P C R = i = 1 m j = 1 n C ( i , j ) m × n × 100 %
U A C I = i = 1 m j = 1 n | T 1 ( i , j ) T 2 ( i , j ) | 255 × m × n × 100 %
where m and n are the height and width of the image, and T 1 and T 2 represent the encrypted ciphertext images of two different original images.
In the paper [44], we can see the theoretical values of the three levels of NPCR and UACI for images of different sizes. We chose the confidence level to be 0.05 and tested the images in the USC-SIPI image database. The results are shown in Table 5, which shows that our results are in line with the theoretical expectations, underlined data indicates that the test did not pass, so our algorithm can resist differential attacks.

4.7. Anticlipping and Noise Attacks

When the image information is transmitted on the channel, the image information may be subjected to cropping attacks, noise attacks, and other attack methods by the attacker so that the transmitted image information is damaged, and the useful information cannot be obtained after decryption with the correct key. Therefore, we conducted cropping attack and noise attack tests on the images respectively to check the robustness of our algorithm. We used the peak signal-to-noise ratio (PSNR) between the ciphertext image and the plaintext image as a standard [45], and its calculation formula is as Equations (52) and (53):
M S E = i = 1 m j = 1 n ( T 1 ( i , j ) T 2 ( i , j ) ) 2 m × n
P S N R = 20 l o g 10 ( 255 s q r t ( M S E ) )
where m × n is the image size, and T 1 ( i , j ) and T 2 ( i , j ) represent the original image and the encrypted image.
We cropped the image by 1/16, 1/8, 1/4, and 1/2, and set the pixel value of these parts to zero. Table 6 shows the peak signal-to-noise ratio (PSNR) of different degrees of cropping attack; Figure 17 shows the decrypted image after the ciphertext is subjected to different degrees of cropping attack. We can see that the general information of the decrypted image can still be identified after being subjected to different degrees of cropping attack; therefore, our algorithm is resistant to clipping attacks.
Then, we applied noise of 0.01, 0.05, and 0.15 intensity to the ciphertext image and decrypted it with the correct key. The PSNR of the decrypted image is shown in Table 7, and the decrypted image is shown in Figure 18, which means that our algorithm is also resistant to noise attacks.

4.8. Key Space Analysis

When the key space is large enough, the algorithm can resist brute force attack. The key in this paper has four parts: initial parameters d 1 ~ d 8 , s u m P of plaintext image pixel values, image block size B s i z e , supplementary parameters M 1 , N 1 , and the number of blocks Bnum. The calculation accuracy is 10 15 . Taking a 256 ∗ 256 image as an example, the main key space is Equation (54):
keyspace = 1015 ∗ 8 + 108 + 10 + 20 + 102 > 2100
Its key space is much larger than 2 100 , so it can resist brute force attacks [46].

4.9. Key Sensitivity Analysis

An encryption algorithm is sufficiently secure when it is sensitive to subtle changes in the key, so we tested this on the peppers images. Since our main initial keys d 1 ~ d 8 are generated by the SHA-512 function, we randomly selected the correct key k e y , then increased the last digit sequence value generated by SHA-512 by 1, and then calculated and generated a new initial key k e y 1 , which was only slightly different from the correct key. Figure 19 shows the results of decryption with the changed key, indicating that our method has better key sensitivity.
k e y   h a s h   v a l u e = (275afc80927870608dfa79743a56d02e3ff7d009aa78655e9affbcb25e74e1ce102df926ffe0670ca599cc5ef2d57299429bfba3d45b66143fb075b69e590896);
k e y = (0.385365853658537, 0.412682926829268, 0.578536585365854, 0.237354085603113, 0.038910505836576, 0.578947368421053, 0.578947368421053, 0.290448343079922);
k e y 1   h a s h   v a l u e = (275afc80927870608dfa79743a56d02e3ff7d009aa78655e9affbcb25e74e1ce102df926ffe0670ca599cc5ef2d57299429bfba3d45b66143fb075b69e590897);
k e y 1 = (0.385365853658537, 0.412682926829268, 0.578536585365854, 0.237354085603113, 0.038910505836576, 0.578947368421053, 0.426900584795322, 0.391812865497076);

4.10. Computational Complexity

Our computational complexity is divided into three parts: generation of initial values, disorder, and diffusion. In the process of generating initial values, we computed them within a constant value O ( m n ) , where m and n denote images and rows and columns, respectively. In the process of dislocation, we dislocated between B n u m layers and B i s z e layers, and its computational complexity is a constant value O ( b ) , where b denotes the corresponding maturity. In the process of diffusion, we performed cubic diffusion, whose computational complexity O ( x y z ) , x , y , z are the sizes of the three dimensions of the probability amplitude matrix. With the change of image size and resolution, its computational complexity is O ( m n ) + O ( x y z ) , which is roughly the same for different images. Therefore, it can be better implemented in practical applications.

5. Conclusions

In this paper, we propose a 3D cuboid image encryption scheme based on message-encoded controlled alternate quantum walks. We used SHA-512 to obtain the key set and used the key set to generate the system parameters of a one-dimensional discrete quantum walk and controlled alternate quantum walk on a circle. Then, we used the one-dimensional discrete quantum walk model and controlled alternating quantum walk model encrypted image to design a three-dimensional cuboid image encryption algorithm. In the scrambling stage, the image was scrambled between layers and layer-by-layer cross-sections; in the diffusion stage, the pixel binary cube was rotated first and combined with the 3D quantum hash, then XORed with the 3D quantum hash sequence and tiled to obtain the encrypted image. Simulation results and image data tests show that the scheme can resist various typical attacks and has good security performance. In the future, we plan to introduce advanced, new technologies and methods [47,48,49,50,51,52], such as deep learning models, neural networks, some concepts of image fusion and recognition, etc. into image encryption and further propose new algorithms with better encryption effects.

Author Contributions

Data curation, P.L.; Formal analysis, P.L.; Investigation, P.L.; Methodology, S.Z.; Project administration, S.Z.; Software, W.Q.Y.; Supervision, W.Q.Y.; Validation, P.L.; Writing—original draft, P.L.; Writing—review and editing, S.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the National Key Technology R&D Program of China (No. 2018YFC0910500), the National Natural Science Foundation of China (Nos. 62272079, 61751203, 61972266, 61802040), Liaoning Revitalization Talents Program (No. XLYC2008017), the Innovation and Entrepreneurship Team of Dalian University (No. XQN202008), Natural Science Foundation of Liaoning Province (Nos. 2021-MS-344, 2021-KF-11-03, 2022-KF-12-14).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wan, W.; Wang, J.; Li, J.; Sun, J.; Zhang, H.; Liu, J. Hybrid JND model-guided watermarking method for screen content images. Multimed. Tools Appl. 2020, 79, 4907–4930. [Google Scholar] [CrossRef]
  2. Aminuddin, A.; Ernawan, F. AuSR2: Image watermarking technique for authentication and self-recovery with image texture preservation. Comput. Electr. Eng. 2022, 102, 108207. [Google Scholar] [CrossRef]
  3. Cao, W.; Mao, Y.; Zhou, Y. Designing a 2D infinite collapse map for image encryption. Signal Process. 2020, 171, 107457. [Google Scholar] [CrossRef]
  4. Man, Z.; Li, J.; Di, X.; Sheng, Y.; Liu, Z. Double image encryption algorithm based on neural network and chaos. Chaos Solitons Fractals 2021, 152, 111318. [Google Scholar] [CrossRef]
  5. Singh, K.N.; Singh, A.K. Towards integrating image encryption with compression: A survey. ACM Trans. Multimed. Comput. Commun. Appl. 2022, 18, 1–21. [Google Scholar] [CrossRef]
  6. Yan, X.; Liu, F.; Yan, W.Q.; Yang, G.; Lu, Y. Weighted visual cryptographic scheme with improved image quality. Multimed. Tools Appl. 2020, 79, 21345–21360. [Google Scholar] [CrossRef]
  7. Wang, T.; Wang, M.-H. Hyperchaotic image encryption algorithm based on bit-level permutation and DNA encoding. Opt. Laser Technol. 2020, 132, 106355. [Google Scholar] [CrossRef]
  8. Khalil, N.; Sarhan, A.; Alshewimy, M.A. An efficient color/grayscale image encryption scheme based on hybrid chaotic maps. Opt. Laser Technol. 2021, 143, 107326. [Google Scholar] [CrossRef]
  9. Zhou, S. A real-time one-time pad DNA-chaos image encryption algorithm based on multiple keys. Opt. Laser Technol. 2021, 143, 107359. [Google Scholar] [CrossRef]
  10. Zhang, Y. The fast image encryption algorithm based on lifting scheme and chaos. Inf. Sci. 2020, 520, 177–194. [Google Scholar] [CrossRef]
  11. Wang, X.; Guan, N.; Yang, J. Image encryption algorithm with random scrambling based on one-dimensional logistic self-embedding chaotic map. Chaos Solitons Fractals 2021, 150, 111117. [Google Scholar] [CrossRef]
  12. Alawida, M.; Teh, J.S.; Samsudin, A. An image encryption scheme based on hybridizing digital chaos and finite state machine. Signal Process. 2019, 164, 249–266. [Google Scholar] [CrossRef]
  13. Himeur, Y.; Boukabou, A. A robust and secure key-frames based video watermarking system using chaotic encryption. Multimed. Tools Appl. 2018, 77, 8603–8627. [Google Scholar] [CrossRef]
  14. Yu, J.; Xie, W.; Zhong, Z.; Wang, H. Image encryption algorithm based on hyperchaotic system and a new DNA sequence operation. Chaos Solitons Fractals 2022, 162, 112456. [Google Scholar] [CrossRef]
  15. Jasra, B.; Moon, A.H. Color image encryption and authentication using dynamic DNA encoding and hyper chatic system. Expert Syst. Appl. 2022, 206, 117861. [Google Scholar] [CrossRef]
  16. Qiu, H.; Xu, X.; Jiang, Z.; Sun, K.; Xiao, C. A color image encryption algorithm based on hyperchaotic map and Rubik’s Cube scrambling. Nonlinear Dyn. 2022, 1–19. [Google Scholar] [CrossRef]
  17. Mansouri, A.; Wang, X. A novel one-dimensional chaotic map generator and its application in a new index representation-based image encryption scheme. Inf. Sci. 2021, 563, 91–110. [Google Scholar] [CrossRef]
  18. Wang, X.; Zhao, M. An image encryption algorithm based on hyperchaotic system and DNA coding. Opt. Laser Technol. 2021, 143, 107316. [Google Scholar] [CrossRef]
  19. Xian, Y.; Wang, X. Fractal sorting matrix and its application on chaotic image encryption. Inf. Sci. 2021, 547, 1154–1169. [Google Scholar] [CrossRef]
  20. Jithin, K.; Sankar, S. Colour image encryption algorithm combining Arnold map, DNA sequence operation, and a Mandelbrot set. J. Inf. Secur. Appl. 2020, 50, 102428. [Google Scholar] [CrossRef]
  21. Gao, W.; Sun, J.; Qiao, W.; Zhang, X. Digital image encryption scheme based on generalized Mandelbrot-Julia set. Optik 2019, 185, 917–929. [Google Scholar] [CrossRef]
  22. Gao, Y.; Jiao, S.; Fang, J.; Lei, T.; Xie, Z.; Yuan, X. Multiple-image encryption and hiding with an optical diffractive neural network. Opt. Commun. 2020, 463, 125476. [Google Scholar] [CrossRef]
  23. Chen, H.; Liu, Z.; Tanougast, C.; Liu, F. A novel chaos based optical cryptosystem for multiple images using DNA-blend and gyrator transform. Opt. Lasers Eng. 2021, 138, 106448. [Google Scholar] [CrossRef]
  24. Wang, F.; Ni, R.; Wang, J.; Zhu, Z.; Hu, Y. Invertible encryption network for optical image cryptosystem. Opt. Lasers Eng. 2022, 149, 106784. [Google Scholar] [CrossRef]
  25. Zhang, Y.; Chen, A.; Tang, Y.; Dang, J.; Wang, G. Plaintext-related image encryption algorithm based on perceptron-like network. Inf. Sci. 2020, 526, 180–202. [Google Scholar] [CrossRef]
  26. Ding, Y.; Wu, G.; Chen, D.; Zhang, N.; Gong, L.; Cao, M.; Qin, Z. DeepEDN: A deep-learning-based image encryption and decryption network for internet of medical things. IEEE Internet Things J. 2020, 8, 1504–1518. [Google Scholar] [CrossRef]
  27. Yu, F.; Zhang, Z.; Shen, H.; Huang, Y.; Cai, S.; Du, S. FPGA implementation and image encryption application of a new PRNG based on a memristive Hopfield neural network with a special activation gradient. Chin. Phys. B 2022, 31, 020505. [Google Scholar] [CrossRef]
  28. Shi, Y.; Hu, Y.; Wang, B. Image encryption scheme based on multiscale block compressed sensing and Markov model. Entropy 2021, 23, 1297. [Google Scholar] [CrossRef]
  29. Sun, C.; Wang, E.; Zhao, B. Image encryption scheme with compressed sensing based on a new six-dimensional non-degenerate discrete hyperchaotic system and plaintext-related scrambling. Entropy 2021, 23, 291. [Google Scholar] [CrossRef]
  30. Wang, X.; Li, Y. Chaotic image encryption algorithm based on hybrid multi-objective particle swarm optimization and DNA sequence. Opt. Lasers Eng. 2021, 137, 106393. [Google Scholar] [CrossRef]
  31. Abbasi, A.A.; Mazinani, M.; Hosseini, R. Chaotic evolutionary-based image encryption using RNA codons and amino acid truth table. Opt. Laser Technol. 2020, 132, 106465. [Google Scholar] [CrossRef]
  32. Liang, Z.; Qin, Q.; Zhou, C. An image encryption algorithm based on Fibonacci Q-matrix and genetic algorithm. Neural Comput. Appl. 2022, 34, 19313–19341. [Google Scholar] [CrossRef]
  33. Liu, X.; Xiao, D.; Huang, W.; Liu, C. Quantum block image encryption based on arnold transform and sine chaotification model. IEEE Access 2019, 7, 57188–57199. [Google Scholar] [CrossRef]
  34. Wang, J.; Chen, J.; Wang, F.; Ni, R. Optical image encryption scheme based on quantum s-box and meaningful ciphertext generation algorithm. Opt. Commun. 2022, 525, 128834. [Google Scholar] [CrossRef]
  35. Ma, Y.; Li, N.; Zhang, W.; Wang, S.; Ma, H. Image encryption scheme based on alternate quantum walks and discrete cosine transform. Opt. Express 2021, 29, 28338–28351. [Google Scholar] [CrossRef] [PubMed]
  36. Khan, M.; Hussain, I.; Jamal, S.S.; Amin, M. A privacy scheme for digital images based on quantum particles. Int. J. Theor. Phys. 2019, 58, 4293–4310. [Google Scholar] [CrossRef]
  37. Yan, T.; Li, D. A Novel Quantum Color Image Encryption Scheme Based on Controlled Alternate Quantum Walks. In Proceedings of the International Conference on Security, Privacy and Anonymity in Computation, Communication and Storage, New York, NY, USA, 9–13 August 2021; Springer: Cham, Switzerland, 2021; pp. 519–530. [Google Scholar]
  38. Yang, Y.-G.; Pan, Q.-X.; Sun, S.-J.; Xu, P. Novel image encryption based on quantum walks. Sci. Rep. 2015, 5, 7784. [Google Scholar] [CrossRef] [PubMed]
  39. Yang, Y.-G.; Xu, P.; Yang, R.; Zhou, Y.-H.; Shi, W.-M. Quantum Hash function and its application to privacy amplification in quantum key distribution, pseudo-random number generation and image encryption. Sci. Rep. 2016, 6, 19788. [Google Scholar] [CrossRef] [PubMed]
  40. Abd EL-Latif, A.A.; Abd-El-Atty, B.; Abou-Nassar, E.M.; Venegas-Andraca, S.E. Controlled alternate quantum walks based privacy preserving healthcare images in internet of things. Opt. Laser Technol. 2020, 124, 105942. [Google Scholar] [CrossRef]
  41. Abd EL-Latif, A.A.; Abd-El-Atty, B.; Venegas-Andraca, S.E. Controlled alternate quantum walk-based pseudo-random number generator and its application to quantum color image encryption. Phys. A Stat. Mech. Appl. 2020, 547, 123869. [Google Scholar] [CrossRef]
  42. Boriga, R.E.; Dăscălescu, A.C.; Diaconu, A.V. A new fast image encryption scheme based on 2D chaotic maps. IAENG Int. J. Comput. Sci. 2014, 41, 249–258. [Google Scholar]
  43. Shannon, C.E. A mathematical theory of communication. Bell Syst. Tech. J. 1948, 27, 379–423. [Google Scholar] [CrossRef]
  44. Wu, Y.; Noonan, J.P.; Agaian, S. NPCR and UACI randomness tests for image encryption. Cyber J. Multidiscip. J. Sci. Technol. J. Sel. Areas Telecommun. 2011, 1, 31–38. [Google Scholar]
  45. Hore, A.; Ziou, D. Image Quality Metrics: PSNR vs. SSIM. In Proceedings of the 2010 20th International Conference on Pattern Recognition, Istanbul, Turkey, 23–26 August 2010; pp. 2366–2369. [Google Scholar]
  46. Alvarez, G.; Li, S. Some basic cryptographic requirements for chaos-based cryptosystems. Int. J. Bifurc. Chaos 2006, 16, 2129–2151. [Google Scholar] [CrossRef]
  47. Li, Y. Research and Application of Deep Learning in Image Recognition. In Proceedings of the 2022 IEEE 2nd International Conference on Power, Electronics and Computer Applications (ICPECA), Shenyang, China, 21–23 January 2022; pp. 994–999. [Google Scholar]
  48. Falcetta, A.; Roveri, M. Privacy-preserving deep learning with homomorphic encryption: An introduction. IEEE Comput. Intell. Mag. 2022, 17, 14–25. [Google Scholar] [CrossRef]
  49. Chen, J.; Qiu, X.; Ding, C.; Wu, Y. SAR image classification based on spiking neural network through spike-time dependent plasticity and gradient descent. ISPRS J. Photogramm. Remote Sens. 2022, 188, 109–124. [Google Scholar] [CrossRef]
  50. Yan, S.; Gu, Z.; Park, J.H.; Xie, X. Synchronization of delayed fuzzy neural networks with probabilistic communication delay and its application to image encryption. IEEE Trans. Fuzzy Syst. 2022. [Google Scholar] [CrossRef]
  51. Li, J.; Liu, J.; Zhou, S.; Zhang, Q.; Kasabov, N.K. Learning a coordinated network for detail-refinement multi-exposure image fusion. IEEE Trans. Circuits Syst. Video Technol. 2022. [Google Scholar] [CrossRef]
  52. Feng, L.; Chen, X. Image recognition and encryption algorithm based on artificial neural network and multidimensional chaotic sequence. Comput. Intell. Neurosci. 2022, 2022, 9576184. [Google Scholar] [CrossRef]
Figure 1. 1D discrete quantum walk probability distribution on a circle.
Figure 1. 1D discrete quantum walk probability distribution on a circle.
Mathematics 10 04441 g001
Figure 2. Controlled alternate quantum walk probability distribution on a circle.
Figure 2. Controlled alternate quantum walk probability distribution on a circle.
Mathematics 10 04441 g002
Figure 3. A 3D Cuboid Image Encryption Framework Based on Message-Encoded Controlled Alternate Quantum Walks.
Figure 3. A 3D Cuboid Image Encryption Framework Based on Message-Encoded Controlled Alternate Quantum Walks.
Mathematics 10 04441 g003
Figure 4. Generation of image cuboid.
Figure 4. Generation of image cuboid.
Mathematics 10 04441 g004
Figure 5. Generation of index sequence p r m 1 D t .
Figure 5. Generation of index sequence p r m 1 D t .
Mathematics 10 04441 g005
Figure 6. Interlayer scrambling of image cuboids.
Figure 6. Interlayer scrambling of image cuboids.
Mathematics 10 04441 g006
Figure 7. Top-down layer-by-layer scrambling based on 3D probability distribution matrix.
Figure 7. Top-down layer-by-layer scrambling based on 3D probability distribution matrix.
Mathematics 10 04441 g007
Figure 8. Binary cube rotation based on probability magnitude matrix.
Figure 8. Binary cube rotation based on probability magnitude matrix.
Mathematics 10 04441 g008
Figure 9. Simulation results (256 ∗ 256): (ae) original images; (fj) encrypted images; (ko) decrypted images.
Figure 9. Simulation results (256 ∗ 256): (ae) original images; (fj) encrypted images; (ko) decrypted images.
Mathematics 10 04441 g009
Figure 10. Simulation results (512 ∗ 512 and irregular): (ad) original images; (eh) encrypted images; (il) decrypted images.
Figure 10. Simulation results (512 ∗ 512 and irregular): (ad) original images; (eh) encrypted images; (il) decrypted images.
Mathematics 10 04441 g010aMathematics 10 04441 g010b
Figure 11. Histogram Analysis (256 ∗ 256): (ac) original images; (df) encrypted image.
Figure 11. Histogram Analysis (256 ∗ 256): (ac) original images; (df) encrypted image.
Mathematics 10 04441 g011
Figure 12. Histogram Analysis (512 ∗ 512 and irregular): (ad) original images; (eh) encrypted image.
Figure 12. Histogram Analysis (512 ∗ 512 and irregular): (ad) original images; (eh) encrypted image.
Mathematics 10 04441 g012
Figure 13. Correlation of different ciphertext images.
Figure 13. Correlation of different ciphertext images.
Mathematics 10 04441 g013
Figure 14. Adjacent pixel correlation of image 5.1.09: (ac) original image; (df) encrypted image.
Figure 14. Adjacent pixel correlation of image 5.1.09: (ac) original image; (df) encrypted image.
Mathematics 10 04441 g014aMathematics 10 04441 g014b
Figure 15. Adjacent pixel correlation of image 5.2.08: (ac) original image; (df) encrypted image.
Figure 15. Adjacent pixel correlation of image 5.2.08: (ac) original image; (df) encrypted image.
Mathematics 10 04441 g015
Figure 16. Adjacent pixel correlation of image 5.3.01: (ac) original image; (df) encrypted image.
Figure 16. Adjacent pixel correlation of image 5.3.01: (ac) original image; (df) encrypted image.
Mathematics 10 04441 g016aMathematics 10 04441 g016b
Figure 17. Decrypted images for varying degrees of cropping attacks: (a) 1/16 crop; (b) 1/8 crop; (c) 1/4 crop; (d) 1/2 crop; (eh) decrypted images of (ad).
Figure 17. Decrypted images for varying degrees of cropping attacks: (a) 1/16 crop; (b) 1/8 crop; (c) 1/4 crop; (d) 1/2 crop; (eh) decrypted images of (ad).
Mathematics 10 04441 g017
Figure 18. Noise attack test results: (ac) noisy cipher image of different noise level; (df) decrypted noisy image.
Figure 18. Noise attack test results: (ac) noisy cipher image of different noise level; (df) decrypted noisy image.
Mathematics 10 04441 g018
Figure 19. Decryption result of correct key k e y and changed key k e y 1 .
Figure 19. Decryption result of correct key k e y and changed key k e y 1 .
Mathematics 10 04441 g019
Table 1. χ 2 test (256 ∗ 256).
Table 1. χ 2 test (256 ∗ 256).
ImageLenaBaboonPeppersWhiteBlackAvg.Ref. [9]Ref. [33]
Plaintext39,868.72744,739.30526,311.57816,711,68016,711,680---
Ciphertext219.269216.589225.765259.881241.390232.579244.159254.078
Table 2. χ 2 test (512 ∗ 512 and irregular).
Table 2. χ 2 test (512 ∗ 512 and irregular).
ImageBarbaraCameramanLivingroomIrregular LenaAvg.Ref. [18]
Plaintext14,4101.119418,530.147276,815.88374,075.357--
Ciphertext238.454250.778245.376250.828246.359260.400
Table 3. Pixel correlation in different directions.
Table 3. Pixel correlation in different directions.
ImagePlain ImageCipher ImageRef. [11]
HVDHVDHVD
5.1.090.90260.94060.90980.00050.0027−0.00230.0031−0.00160.0014
5.1.100.90160.86880.8311−0.00011.0819 × 10−60.00070.0044−0.0006−0.0052
5.1.110.95740.94800.8966−0.0046−0.0038−0.00030.0005−0.0019−0.0049
5.1.120.95760.97410.94080.00690.00390.00480.0068−0.0002−0.0055
5.1.130.88040.84970.7419−0.0024−0.0027−0.00195.76 × 10−60.0017−0.0072
5.1.140.95220.90180.85890.0015−0.00570.0038−0.00560.00010.0044
5.2.080.92890.87840.8472−0.0014−0.00570.00110.00280.0006−0.0027
5.2.090.90590.87010.8122−0.0013−0.0035−0.00170.0006−0.01230.0001
5.2.100.94090.92740.89480.00190.0002−0.0026−0.0024−0.00050.0031
5.3.010.97560.98110.9669−0.0004−0.00060.00170.00154.43 × 10−5−0.0017
5.3.020.91540.90530.86080.0004−0.00200.0015−0.0024−0.00110.0008
7.1.010.96350.91940.9080−0.0015−0.00330.0021−0.00210.00110.0067
7.1.020.94680.94780.9032−0.00080.0009−0.00070.00840.00170.0021
7.1.030.94100.93060.8998−0.00160.00050.00330.00458.67 × 10−5−0.0056
7.1.040.97620.96460.95460.0007−0.00060.0003−0.00310.00730.0002
7.1.050.94490.91930.89830.00050.0024−0.0008−0.0040−0.0004−0.0002
7.1.060.93780.90040.87910.00250.0023−0.00010.0002−0.0014−0.0057
7.1.070.88720.87350.8296−0.00030.00047.5782 × 10−50.0020−0.0009−0.0160
7.1.080.95630.93350.9245−0.00070.00100.00140.0083−0.00080.0057
7.1.090.96670.92770.9160−0.0010−0.00080.00040.0007−0.00050.0063
7.1.100.96590.94970.93410.0001−0.00080.00070.0058−0.00010.0050
7.2.010.96700.94680.9463−0.00110.0002−0.0018−0.0008−0.0031−0.0044
boat.5120.93710.97220.9220−0.0006−0.0013−0.00050.0024−6.53 × 10−7−0.0036
gray21.5120.99650.99980.9963−0.00100.00080.00040.00110.0007−0.0056
ruler.5120.43320.5068−0.0207−0.00150.0022−0.00020.00070.01203.59 × 10−5
Mean0.92150.90950.8581−0.00140.00190.00140.00130.00200.0042
Table 4. Information entropy of encrypted images.
Table 4. Information entropy of encrypted images.
ImagesSizePlain ImageCipher Image
Ref. [6]Ref. [12]Ours
5.1.09256 ∗ 2566.70937.99737.99717.9970
5.1.10256 ∗ 2567.31187.99737.99747.9977
5.1.11256 ∗ 2566.45237.99707.99697.9974
5.1.12256 ∗ 2566.70577.99757.99727.9974
5.1.13256 ∗ 2561.54837.99727.99697.9974
5.1.14256 ∗ 2567.34247.99707.99747.9977
5.2.08512 ∗ 5127.52377.99927.99937.9994
5.2.09512 ∗ 5126.99407.99947.99937.9993
5.2.10512 ∗ 5125.70567.99937.99937.9993
5.3.011024 ∗ 10247.52377.99987.99987.9998
5.3.021024 ∗ 10246.83037.99987.99987.9997
7.1.01512 ∗ 5126.02747.99937.99917.9993
7.1.02512 ∗ 5124.00457.99937.99927.9994
7.1.03512 ∗ 5125.49577.99937.99937.9994
7.1.04512 ∗ 5126.10747.99927.99937.9993
7.1.05512 ∗ 5126.56327.99937.99927.9993
7.1.06512 ∗ 5126.69537.99927.99937.9993
7.1.07512 ∗ 5125.99167.99937.99937.9992
7.1.08512 ∗ 5125.05347.99947.99937.9992
7.1.09512 ∗ 5126.18987.99937.99927.9994
7.1.10512 ∗ 5125.90887.99937.99937.9993
7.2.011024 ∗ 10245.64157.99987.99987.9998
boat.512512 ∗ 5127.19147.99937.99947.9994
gray21.512512 ∗ 5124.39237.99927.99947.9993
ruler.512512 ∗ 5120.50007.99937.99927.9993
Mean of 256 ∗ 256256 ∗ 256-7.99727.99727.9974
Mean of 512 ∗ 512512 ∗ 512-7.99937.99937.9993
Mean of 1024 ∗ 10241024 ∗ 1024-7.99987.99987.9998
Table 5. NPCR and UACI for different images (%).
Table 5. NPCR and UACI for different images (%).
ImageNPCR UACI
α = 0.05 Ref. [6]Ref. [7]Ref. [8]ProposedRef. [6]Ref. [7]Ref. [8]Proposed
256 ∗ 256Theoretical NPCR99.5693 Theoretical UACI33.2824~33.6447
5.1.0999.610999.60399.512499.578733.447533.55233.521433.3580
5.1.1099.597299.63699.612199.656533.484633.45333.421533.5306
5.1.1199.586599.94299.594399.586033.448233.58633.401433.5725
5.1.1299.632399.79299.581199.599233.445333.45333.415833.5240
5.1.1399.621699.79299.596399.580233.453133.52033.423633.4265
5.1.1499.607899.62199.594599.583133.429333.44033.395133.5393
512 ∗ 512Theoretical NPCR99.5893 Theoretical UACI33.3730~33.5541
5.2.0899.610599.96099.587899.613633.503533.69233.397833.5362
5.2.0999.603399.87699.581299.602233.467433.54833.418233.3835
5.2.1099.610199.65499.610099.614733.425333.45433.426333.4199
7.1.0199.613699.95799.602899.631033.488533.64833.447433.5258
7.1.0299.604099.91899.607899.615133.450833.46533.432633.4589
7.1.0399.610199.84999.581199.612433.435233.27333.483633.4771
7.1.0499.617899.99199.594699.593033.502433.20233.478233.4340
7.1.0599.597999.94299.593799.613633.473933.83033.471633.4699
7.1.0699.626999.67099.591299.604133.476433.62733.436533.4511
7.1.0799.619399.98399.601499.599533.431033.60933.431333.4637
7.1.0899.597999.81899.601399.617033.499733.37533.446033.4841
7.1.0999.611399.87499.614899.610933.463033.53033.385633.4925
7.1.1099.616699.69799.609799.607933.470133.43833.394133.4423
boat.51299.622799.71599.610199.621233.444833.37433.397333.4156
gray21.51299.606799.64399.603499.594633.511333.50733.408933.4367
ruler.51299.612499.63799.594599.605633.462033.41533.463533.4649
1024 ∗ 1024Theoretical NPCR99.5994 Theoretical UACI33.4183~33.5088
5.3.0199.606799.95099.603299.629433.501333.50833.439233.5005
5.3.0299.601599.98299.610899.612833.425533.51433.454733.4263
7.2.0199.600599.98099.603699.608833.443833.48733.430133.4511
Mean99.609899.819299.595799.607633.463433.533.432933.4674
Std0.01030.26650.02000.01730.02680.04590.03280.0518
Pass/All25/2525/2522/2525/2525/2517/2525/2525/25
Table 6. PSNR of different degrees of clipping attack.
Table 6. PSNR of different degrees of clipping attack.
Area1/161/81/41/2
PSNR21.31419218.38085615.34234312.250188
Table 7. PSNR for noise attack.
Table 7. PSNR for noise attack.
Noise Level0.01 Level0.05 Level0.1 Level
PSNR28.97142822.40810519.258843
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Liu, P.; Zhou, S.; Yan, W.Q. A 3D Cuboid Image Encryption Algorithm Based on Controlled Alternate Quantum Walk of Message Coding. Mathematics 2022, 10, 4441. https://doi.org/10.3390/math10234441

AMA Style

Liu P, Zhou S, Yan WQ. A 3D Cuboid Image Encryption Algorithm Based on Controlled Alternate Quantum Walk of Message Coding. Mathematics. 2022; 10(23):4441. https://doi.org/10.3390/math10234441

Chicago/Turabian Style

Liu, Pai, Shihua Zhou, and Wei Qi Yan. 2022. "A 3D Cuboid Image Encryption Algorithm Based on Controlled Alternate Quantum Walk of Message Coding" Mathematics 10, no. 23: 4441. https://doi.org/10.3390/math10234441

Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop