Exploiting high-quality reconstruction image encryption strategy by optimized orthogonal compressive sensing

Compressive sensing is favored because it breaks through the constraints of Nyquist sampling law in signal reconstruction. However, the security defects of joint compression encryption and the problem of low quality of reconstructed image restoration need to be solved urgently. In view of this, this paper proposes a compressive sensing image encryption scheme based on optimized orthogonal measurement matrix. Utilizing a combination of DWT and OMP, along with chaos, the proposed scheme achieves high-security image encryption and superior quality in decryption reconstruction. Firstly, the orthogonal optimization method is used to improve the chaotic measurement matrix. Combined with Part Hadamard matrix, the measurement matrix with strong orthogonal characteristics is constructed by Kronecker product. Secondly, the original image is sparsely represented by DWT. Meanwhile, Arnold scrambling is used to disturb the correlation between its adjacent pixels. Following this, the image is compressed and measured in accordance with the principles of compressive sensing and obtain the intermediate image to be encrypted. Finally, the chaotic sequence generated based on 2D-LSCM is used to perform on odd-even interleaved diffusion and row-column permutation at bit-level to obtain the final ciphertext. The experimental results show that this scheme meets the cryptographic requirements of obfuscation, diffusion and avalanche effects, and also has a large key space, which is sufficient to resist brute-force cracking attacks. Based on the sparse and reconstruction algorithm of compressive sensing proposed in this paper, it has better image restoration quality than similar algorithms. Consequently, the compressive sensing image encryption scheme enhances both security and reconstruction quality, presenting promising applications in the evolving landscape of privacy protection for network big data.

Taking a global perspective, numerous scholars have achieved a series of significant theoretical and practical advancements in the use of chaos for image encryption [36][37][38][39] .Simultaneously, the field of compressive sensing theory has garnered favour among many cryptography experts due to its groundbreaking performance in signal sampling [40][41][42] .In 2021 43 , introduced an image encryption scheme based on four-winged hyperchaotic system, combined with compressive sensing and DNA encoding, effectively reduced the transmission cost.In 2022 44 , presented an image encryption approach that utilizes SHA-3 and an asymmetric key system.This method employs the RSA algorithm to encrypt the plaintext key and disclose the corresponding ciphertext key, avoiding the problem of additional transmission of the key in the channel.In 2023 45 , presented a secure and efficient image encryption approach that integrates parallel compression sensing with secret sharing.This method attains network system security and availability even with resource constraints.Within the ongoing exploration of compression-aware chaotic image encryption, the efficacy of chaotic sum algorithms significantly influences the security and efficiency of cryptographic systems.In contrast, most of the existing algorithms only obtain snowflake ciphertext images by scrambling at the pixel level or 2-bit, which has a coarse granularity and is susceptible to attacks from third parties.It is imperative and urgent to explore an image encryption algorithm with finer encryption granularity that utilizes chaotic mapping constructs to resist various illegal attacks.
This paper introduces a optimized orthogonal compressive sensing image encryption scheme based on 2D-LSCM.Firstly, the scheme adopts Discrete Wavelet Transform to sparsify the original image and performs Arnold scrambling on the sparse image to increase the uncorrelation between its neighbouring pixels.Secondly, based on the theory of CS, an optimized orthogonal measurement matrix is constructed by using the Kronecker product, a part Hadamard matrix and an optimized processed chaotic sequence to measure the sparse image and obtain the compressed measured matrix.Finally, odd-even interleaved diffusion and bit-level permutation is used for the measured matrix to obtain the final ciphertext image.
The main contributions of this paper are as follows: • This paper proposes a security-enhanced, high-performance integrated image encryption scheme combining compressive sensing.Compared with most of the similar spatial domain based encryption schemes, it has lower computational complexity and improves the efficiency and security of encryption.• A construction method for a compressive sensing measurement matrix is proposed.This method incorporates a plaintext correlation mechanism, ensuring that the measurement matrix possesses orthogonal characteristics.The orthogonal features of the measurement matrix contribute to improved reconstruction quality following decryption.• In the image encryption algorithm, a chaotic key stream with plaintext correlation is generated.This key stream is utilized to control odd-even interleaved diffusion and row-column permutation operations at bitlevel for encrypting the plaintext image.This approach offers a high granularity of encryption, effectively defending against chosen plaintext attack.• Focusing on the sparse representation method and reconstruction algorithm of compressive sensing, this paper analyzes the impact of various parameters on recovery quality and selects the optimized combination scheme.Experimental results validate the superiority of the proposed scheme.
The organization of the remaining sections of this paper is as follows: Section "Related theory" provides a brief introduction to chaotic systems and the compressive sensing algorithm.Section "Image encryption and decryption scheme" presents the encryption algorithm designed in this paper.Section Simulation results and performance analysis offers experimental and simulation results.The final part concludes the paper.

Related theory
The used chaotic system 2D-LSCM map 2D-LSCM is derived from two existing 1D chaotic mappings, namely the Logistic mapping and the Sine mapping 46 .The mapping diagrams are defined as follows: where θ denotes the control parameter, θ ∈ [0, 1] .The definition reveals the generation process, individual Logis- tic mapping and Sine mapping have been confirmed to have drawbacks such as simple behaviors and fragile chaotic intervals.Whereas 2D-LSCM couples both of these mappings and extends the dimension from 1D to 2D after performing a sinusoidal transformation on the coupling result.By this way, the complexity of Logistic mapping and Sinusoidal mapping can be fully mixed to obtain complex chaotic behavior.

0-1 test results of chaos
The Gottwald Melbourne 0-1 test serves as a computational instrument for determining parameters in close proximity to 0 or 1, facilitating a precise differentiation between regular and chaotic motion.In our investigation, the 0 − 1 Gottwald Melbourne test was employed to generate 10,000 outcomes, demonstrating an average value of 0.9979.This notable result underscores the exceptional performance exhibited by the chaotic system.The graphical representation of the test outcomes is presented in Fig. 1. (1)

Compressive sensing
Donoho et al. proposed a novel signal sampling technique, where compression of the data is accomplished at the same time as sampling, named compressive sensing.The rationale is that if the signal is sparse, it can be accurately reconstructed by solving an optimization problem with a much smaller number of samples than required by the Nyquist sampling theorem.
In compressive sensing, whether the signal has sparse properties is a prerequisite for judging whether the signal can be reconstructed accurately.Except for a few naturally sparse signals, most signals need to be represented sparsely on some sparse basis, described as x = s , where is the sparse basis matrix, and s is the sparse coefficient.Assuming the signal x to be processed is either naturally sparse or can be sparsely represented (with size of N × 1 ), the measurement process can be shown in Fig. 2 and expressed as: where denotes the measurement matrix, utilized to project the high-dimensional signal x into a low-dimensional space, with size of M × N(M < N) .And y denotes the measured matrix, with size of M × 1 .A denotes the sensing matrix, which is the product of the measurement matrix and the sparse basis matrix, and it can be represented as A = .In compressive sensing theory, another crucial criterion for determining whether a signal can be reconstructed is assessing whether the sensing matrix satisfies the Restricted Isometry Property (RIP).If it does, the signal can be overwhelmingly reconstructed by solving the following convex optimization problem: where min s 1 denotes the l 1 norm of vector s.Orthogonal Matching Pursuit (OMP) and Basis Pursuit (BP) are both practical algorithms for solving such problems.

Image encryption and decryption scheme
The proposed bit-level encryption scheme based on compressive sensing in this paper comprises two primary modules: compression measurement and the encryption of the digital format image.Firstly, the Discrete Wavelet Transform is used to convert the original image from the spatial domain to the frequency domain for sparse representation.After Arnold scrambling, the sparse image is compressed and measured to obtain the intermediate image to be encrypted.Finally, the chaotic sequence generated based on 2D-LSCM is used to encrypt the image with odd-even interleaved diffusion and row-column permutation at bit-level to obtain the final ciphertext image.The overall schematic of the scheme is shown in Fig. 4.

Generation of the chaotic sequence and preprocessing
The key utilized in this algorithm is derived from the original image's feature values obtained through a hash function.After preprocessing, these values are substituted into the chaotic system to generate the four necessary chaotic sequences.
Step 1: Extraction of image feature values Use the hash SHA-256 to read the image feature value, which consists of a fixed 64-bit length of the hexadecimal number, and in order every four digits in a group to decimal representation, denoted as K = {k 1 , k 2 , ......, k 16 } .Depending on the value of k 5 , different arrangement methods are chosen to surround these 16 numbers in order into a square matrix of size 4 × 4.
Step 2: Preprocessing of image feature values For the obtained 4 × 4 matrix, according to certain rules, each four-number group is processed and an initial key is generated.There are four groups, and the initial keys obtained are denoted as z 1 , z 2 , z 3 , z 4 .The specific processing methods and schematics are shown in Fig. 5.
Step 3: Key perturbation and chaotic initialization generation The initial value of the key is perturbed using Eq. ( 6) and ensures that its range falls between [0,1] as the initial parameter of the chaotic system.
where key i denotes the initial values of chaotic system, len_z i denotes the length of z i , i = {1, 2, 3, 4}.
Step 4: The preprocessing of the chaotic sequences (4) www.nature.com/scientificreports/By selecting any two combinations from key 1 , key 2 , key 3 and key 4 , there are C 2 4 = 6 different possible combi- nations.Choosing any four of these combinations and substituting them into the 2D-LSCM chaotic system for iteration, while discarding the initial 1000 values, results in four distinct pseudorandom sequences denoted as R 1 , R 2 , R 3 , R 4 respectively.The sequences R 1 and R 2 are used for odd-even interleaved diffusion.R 3 and R 4 are used to generate chaotic sort indexes for row-column permutation.The specific processing methods are as follows: where a mod b denotes the remainder of a over b, mod 1 denotes that only take valid numbers after the decimal point.

Generation of measurement matrix
In the compressive sensing based image encryption scheme, the measurement matrix is also transmitted to the receiver as one of the keys.To reduce the storage burden and transmission bandwidth required during transmission, this scheme uses Kronecker product operations to construct the measurement matrix.If two matrices of sizes q × p and u × v are both linearly independent low-dimensional orthogonal matrices, a linearly independ- ent high-dimensional orthogonal matrix of size uq × pv can be obtained through the Kronecker product.The specific construction process is as follows:   www.nature.com/scientificreports/ Step 1: Arbitrarily select a set of keys and substitute them into the 2D-LSCM for 4 × 4 × n + 1000 iterations, and discard the first 1000 values to obtain two sequences X and Y of length 4 × 4 × n , where n is the sampling interval.
Step 2: Disturb sequence X and sequence Y to obtain a new sequence Z, as follows: where i = [1, 2, 3, ..., 4 × 4 × n] , M denotes the height of the compressed image, W denotes the width of the compressed image.
Step 3: Arrange and reconstruct the obtained sequences in the following way: where orth(•) denotes orthogonalization.The pseudo-code for the orthogonalization function is given in algorithm 1.
Step 4: Perform Kronecker product operation on matrix The high-dimensional measurement matrix constructed through Kronecker product still maintains the noncorrelation and orthogonality properties of the original matrices, which has been confirmed as an equivalent condition for RIP.To ensure the quality of reconstruction, the measurement matrix, such as Gaussian matrix, will be all sent to the decrypting party as a key under the traditional scheme, compared with the measurement matrix constructed by the method in this paper, the size of the matrix that needs to be transmitted additionally is only 6.25% of the traditional one.

Encryption step
This paper uses a grayscale image as an example to illustrate the encryption process.For colour images, the encryption can be performed separately on the R, G, B channels.Assuming the input is an original image P with size H × W, the specific compression measurement and encryption process are as follows: Step 1: Sparsify the original image.
Using the Discrete Wavelet Transform, the original image is sparsely represented in the wavelet domain from the spatial domain, and obtain a sparse image of size H × W . Additionally, in order to enhance the sparse characteristics, the pixel values in the sparse image are set to 0 if they are smaller than the threshold value.
Step 2: Scramble the sparse image.
In order to enhance the compression-aware reconstruction effect, this paper adopts Arnold scrambling to reduce the correlation between neighbouring pixels of the sparse image, and obtains the scrambled sparse image P ′ DWT .Let the parameter a = b = 1 in Eq. (11), then the scrambling process can be described as follows: Step 3: Compression measurement.
Substitute the measurement matrix generated in Section "Generation of measurement matrix" and P ′ DWT into Eq.( 2) to obtain the measured matrix Y of size M × N.
( Step 5: Odd-even interleaved diffusion. (1) Construct two matrices containing only the odd pixel point locations and even pixel point locations in image C 1 , respectively 47 .
Step 6: Bit-level row and column permutation.
Generate the corresponding sort indexes index 3 and index 4 according to the chaotic sequences R 3 and R 4 .Convert each pixel point in the diffused image C 2 to an 8-bit binary number, newly named C 2_BIT and perform the row-column permutation operation on C 2_BIT as follows: where i = [1, 2, 3, ..., M × 8] and j = [1, 2, 3, ..., W × 8].
Finally, the binary image C 3_BIT is converted to decimal format to obtain the final ciphertext image C.

Decryption step
Image decryption is the inverse process of encryption.Taking the cipher image C as input, the decryption process is briefly described as follows: Step 1: Decryption of row and column permutation.The same method to get the index sequence index 3 and index 4 , then convert the cipher image C to binary format C 3_BIT .The decryption process of row-column permutation is as follows: Step 2: Decryption of odd-even interleaved diffusion.
Similar to the encryption process, sequences R 1 and R 2 are obtained using Eq. ( 7).After converting the inverse permutated image C 2_BIT to decimal format image C 2 , decryption is performed through odd-even interleaved diffusion using the following formula: Step 3: Inverse normalization.
The inverse normalization operation is performed on the matrix C 2 to obtain the matrix C 1 .The formula for this process is as follows: Using the measurement matrix generated in Section "Generation of measurement matrix", we can reconstruct the sparsely scrambled image P DWT from the matrix C 1 using the OMP algorithm.This process can be represented as follows and the pseudo-code is given in algorithm 2: Algorithm 2. OMP reconstruction.
Step 5: Decryption of Arnold scrambling and inverse DWT.
Based on the definition of Arnold scrambling in Eq. ( 5), the reverse operation process can be deduced, allowing the recovery of the sparsely scrambled image P DWT .Finally, applying the inverse Discrete Wavelet Transform operation to the sparse image results in the reconstruction of the image P of size H × W.

Experimental environment
We employed an 11th Gen Intel(R) Core(TM) i5-11400H CPU in a mainframe PC with MATLAB R2022a experimental software loaded as the experimental platform.A selection of experimental images was made from the USC-SIPI repository 48 .

Histogram analysis
The histogram can visualize the distribution of all pixels in the image, and for the given plain image Fig. 6a and the corresponding cipher image Fig. 6c, their 2D histograms are shown in Fig. 6b and d, respectively.Additionally, the 3D histogram corresponding to Fig. 7a is given in Fig. 7b-d, which show that the plaintext image presents a certain statistical regularity, whereas the statistical properties of the encrypted histogram of the image present a noise-like distribution, which well hides the grey-value information of the image, and thus improves the ability of resisting the attack of statistical analysis.

Adjacent pixel correlation analysis
For plaintext picture pixels, neighboring pixel correlation is typically a notable feature, and the ciphertext through the encryption algorithm will make the adjacent pixels not associated with any pixels.This algorithm aims to generate ciphertext, in which the correlation between adjacent pixels can be ignored.The correlation coefficient calculation formula is as follows: where x i and y i make up the first pair of adjacent pixels that are horizontal, vertical, diagonal, or anti-angle.M is the total number of pixels.In order to visualize the correlation between adjacent pixels in plaintext and ciphertext, we calculate and compare the difference between the two, as shown in Fig. 8.It appears that the plaintext pixels have a significant degree of association, but the ciphertext pixels show almost no correlation at all.This finding demonstrates how robust the method is against statistical attacks.( 24)

Differential statistical analysis
The difference between the two images can be quantified using two criteria: The Unified Average Changed Intensity (UACI) and the Number of Pixels Change Rate (NPCR) are the measures of interest.In differential attacks, attackers often make slight changes to the plaintext image, using a specific algorithm to encrypt it before and after the adjustments, aiming to reveal their relationship.The explanation of UACI and NPCR is as follows: where v 1 , v 2 respectively for plaintext image change a pixel before and after the ciphertext image.D has the fol- lowing definition: Table 1 presents the NPCR and UACI values of various picture sizes that have been encrypted using the algorithm.These outcomes demonstrate the algorithm's strong encryption capabilities. (

Entropy of information
In order to assess the distribution of gray values in images and measure the degree of unpredictability in picture data, information entropy is essential.This is its definition: where x denotes the pixel value and p(n x ) denotes the probability of the symbol.Taking the pixel value of 8 bits as an example, the theoretical value is 8.It can be seen from Table 2 that the experimental results are very close to 8, indicating that the algorithm has good information entropy characteristics.

Recovery image quality analysis
The mean square error (MSE) of the encrypted image's plaintext and ciphertext, as well as its db expression (PSNR) in signal processing, are used in this experiment.The expression is as follows: where Q represents the pixel level of the image.For digital images, the PSNR value higher than 40 dB indicates that the image quality is good.Table 3 displays the testing results and Table 4 demonstrates the comparison results of the proposed algorithm with other advanced algorithms, both of which prove the high recovery quality of the algorithm.

Conclusion
This paper proposes a compressive sensing image encryption scheme based on optimized orthogonal measurement matrix.The algorithm employs discrete wavelet transform for a sparse representation of the image, and through Arnold scrambling, effectively reduces the correlation between adjacent pixels.After compressive sensing measurement, the odd-even interleaved diffusion and bit-level row and column permutation are performed respectively.The experimental results show that the PSNR of the restored image under the conventional compression size is above 40 dB, which indicates that this scheme has higher recovery performance than other advanced compressive sensing algorithms.Additionally, the scheme incorporates a plaintext correlation mechanism, demonstrating strong robustness against various cryptanalysis methods such as chosen plaintext attacks and differential attacks.This feature enables the scheme to effectively withstand different approaches to cryptographic analysis.A comprehensive analysis indicates that the method proposed in this paper is considered effective in enhancing the accuracy and reliability of information exchange, particularly in the context of the big data era, where it holds significant implications for image encryption.Despite the progress made, there are still some limitations.During the experiments, we observed that for images with a compression ratio lower than 0.25, particularly those with low adjacent pixel correlation, manual adjustment of specific parameters was necessary to achieve satisfactory reconstruction results.Since parameter selection is closely tied to the image type, this process could significantly increase the cost of practical applications.In future work, we plan to conduct a thorough comparative analysis of the performance of algorithms in image reconstruction, such as coded compression and block compressive sensing.We will explore whether techniques like edge detection could be used to assess pixel correlation, automatically identify image types, and accordingly adapt the encryption parameters to ensure optimal image recovery.Moreover, the encryption framework will be further refined, enhancing both the algorithm's security and efficiency.

Figure 3 .
Figure 3.The geometric interpretation of Arnold Map.

Figure 4 .
Figure 4.The overall schematic of the encryption and decryption scheme.

Figure 5 .
Figure 5. Schematic diagram of image feature values extraction and preprocessing.

Figure 6 .
Figure 6.Images before and after encryption: (a) Original image; (b) Histogram of original image; (c) Encrypted image at CR=0.75;(d) Histogram of encrypted image.

Figure 7 .
Figure 7. 3D visualization of the encrypted image simulation shown: (a) plaintext image and ciphertext image; (b) red channel; (c) green channel; (d) blue channel.
www.nature.com/scientificreports/Analysis of explicit sensitivities This section will examine how sensitive the method is to plaintext changes by setting the value of a single pixel in a common picture to 1.The pixel values at (H/3, W/3), (2 × H/3, W/3), (H/3, 2 × W/3) and (2 × H/3, 2 × W/3) are added with 1 for comparing the size of the difference.The analysis results are presented in the accompanying Fig.13.As can be seen from the graph, NPCR and UACI are close to the ideal values of 99.62% and 33.41%, respectively.This shows that the proposed algorithm is sufficient to resist plaintext attacks.

Figure 10 .
Figure 10.PSNR of recovered images with different sparse representations in combination with different reconstruction algorithms.
Using the maximum value Y max and minimum values Y min of the pixels in the measurement result matrix, map the pixel values to the [0, 255] interval to obtain an intermediate image C 1 in digital image format.

Table 1 .
The value of NPCR and UACI.

Table 2 .
Plaintext and ciphertext information entropy of different images.

Table 3 .
Image recovery quality analysis of different images under CR=0.5.

Table 4 .
Comparison results on PSNR between the recovered image and plain image.

Table 5 .
Recovery quality of proposed algorithm at different CR.