#### Abstract

New methods and apparatuses for information security have evolved as a result of the rapid expansion of optical information processing. Security is one of the major issues in digital image transmission because it can deliver very secret information to any corresponding agency such as the military, biomedical, and security agencies. Previously, various techniques are proposed to perform optical image encryption techniques using different transformation and pixel-level techniques. Each work has its advantages and disadvantages in terms of computational complexity, security level, flexibility, quality, and so on. To overcome the security issues present in the previous works, a novel optical image encryption standard is proposed in this paper. This work uses information hiding followed by image encryption using Gyrator Transform (GT) using mean gradient key-based block swapping techniques. The main advantage of this work is that the key generation is dynamic and it depends upon the pixel intensity of 8 × 8 blocks. Secret information hiding is performed in the Discrete Cosine Transform (DCT) domain to protect the data against noise attacks. To analyze the performance, various evaluation metrics are used to measure the quality of the decrypted image under various distortions such as cropping and rotation. The robustness of information hiding is analyzed using a noise attack on the received image. This work achieved 45.6 dB of Peak Signal-to-Noise Ratio (PSNR) and 0.965 of Structural Similarity Index (SSIM), which is the best when compared to the conventional image encryption standards.

#### 1. Introduction

As network information technology continues to progress at a fast pace, maintaining critical information security is becoming more crucial in the information age. When information is stolen in certain businesses, it has far-reaching ramifications for the victims. Because of advances in information security technology, data may be encrypted to the point that even if it is stolen, an eavesdropper will not be able to decrypt it and therefore prevent certain harms. It is becoming more essential in the field of information security as a result of its great degree of freedom, high resilience, parallel processing capabilities, and rapid speed [1]. Refregier and Javidi originally suggested a Double Random Phase Encoding (DRPE) based on the 4f optical correlator. Various further DRPE-based optical encryption methods for monochrome and color images have been introduced since then [2].

If the two-phase masks disagree significantly, DRPE indicates that the encrypted picture has a stationary normal distribution. Due to its noteworthy benefits, such as huge keyspace and stability in the blindness encryption operation, the DRPE method was later suggested to the Fresnel domain and fractional Fourier domain. Nonetheless, it has two obvious faults that prohibit it from being utilized for an extended period. As a result, a growing number of individuals are concentrating their efforts on developing nonlinear optical encryption methods [3].

Integral imaging is a real three-dimensional (3D) imaging technique that depends on an integrated photographic method that only allows us to capture a series of Two-Dimensional (2D) pictures from a 3D scene using a lenslet array. These 2D pictures are known as elemental images because they contain information on the direction and brightness of a 3D scene [4].

Several nonlinear processes, including vector operations, natural logarithm operations, and log-polar transforms, are used to encrypt systems to address the linearity issue. Aside from the linearity issue, most encryption algorithms that use the transformed domain produce complex-valued outputs, making the display, transmission, and storage challenges. To reconstruct the original image via holography, the phase information of the final findings should be preserved [5].

The grayscale image is split into 8 × 8 blocks in this work, and these blocks are converted using the DCT. The input text is converted into ASCII code and converted to binary numbers. Replace Least Significant Bit (LSB) from this concatenated binary number. Apply Inverse Discrete Cosine Transform (IDCT) after performing the reverse quantization method. Then, assemble 8 × 8 blocks. Finally, apply GT with an angle *θ*.

The remainder of this work is structured as follows: Section II describes the optical encryption techniques that have been published. Section III discusses the suggested optical encryption technology. Section IV explains the outcome and discussion of the suggested approach, comparative research, and analysis. Finally, Section V explores the conclusion.

#### 2. Literature Survey

Previously, a large number of works were presented to implement the optical encryption approach. These various strategies aim to minimize design complexity by improving the algorithm’s architecture. This section contains some of the previously suggested efforts for performing optical encryption implementation.

Le Hong Zhang et al. proposed that optical encryption is based on deep learning and Ghost Imaging (GI), and it is also used as a point-to-face transmission method to reduce the influence of chaotic medium and turbulence on the communication channel. The image is first preprocessed by the Joint Photographic Experts Group (JPEG) to produce a compressed image. Finally, deep learning is being utilized for reconstruction to address the issue of poor image quality following GI transmission, which can improve image resolution [6].

Lina et al. proposed optical encryption-based diffractive imaging depending on the learning-based attacks. An opponent can recover unknown plaintexts from provided ciphertexts using a machine learning assault. End-to-end learning is used in the proposed approach to derive a superior mapping connection between ciphertexts and plaintexts. The suggested learning technique is viable and effective for analyzing the susceptibility of optical encryption systems, as demonstrated by simulations and optical experimental findings [7].

Sara T. Kamal et al. proposed a novel encryption method for both grayscale and color medical pictures. The introduction of a novel splitting the image approach depends on blocks of the image. The image blocks were then jumbled with a zigzag pattern, rotation, and random permutation. The scrambled image is then diffused using a chaotic logistic map. Security and time complexity studies are used to calculate the performance of this technique for encrypting medical images [8].

Tatsuya Chuman and Warit Sirichotedumrong proposed to improve the security of encryption-then-compression (EtC) systems employing JPEG compression. It is proposed to use a block scrambling-based encryption scheme, which allows us to communicate pictures without fear of being intercepted by an entrusted channel provider. A smaller block size and a bigger number of blocks may be used using the proposed technique in contrast to the previous system. Although the original picture has three color channels, photos encrypted using the recommended approach have less color information than the original image since grayscale images are used to encrypt the image. These characteristics help to build defenses against a variety of threats [9].

Kang Yi et al. proposed GI optical encryption and public-key cryptography. The Rivest–Shamir–Adleman (RSA) algorithm of the public key is used to solve the key distribution problem. When there are fewer ciphertexts, the CS technique gives excellent quality plaintext reconstruction. The features of the RSA public-key method are combined with the GI method to provide convenience and security of use for speedy transmission of data. It is very resistant to statistical analysis and repeated attacks, as well as highly resilient. In a nutshell, optical encryption is founded on Compressive Sensing Ghost Imaging (CSGI) and public-key cryptography [10]. Dongdong et al. proposed when various frequencies of quantized DCT (Discrete Cosine Transform) coefficients are used in a JPEG picture, the resultant image will have varying capacities and embedding deformities. As a first step toward reducing overall distorted distortion for the marked image, we select coefficients from frequencies that produce fewer distortions for embedding, and then we employ an advanced block selection strategy to always modify the block that produces the least simulated distortion first until the given payloads have been completely embedded in the marked image and until the overall distorted image has been reduced to zero [11].

It is obvious from the preceding discussion that numerous works have previously been offered to increase the robustness. The primary disadvantages of prior efforts are their poor quality and lack of security. The major purpose of this effort is outlined in the following parts:(i)The main objectives of this work are as follows:(ii)To improve the robustness of optical encryption under various complicated noise attacks.(iii)To enhance the accuracy of the optical encryption method.(iv)To maintain the image quality without the loss of any data.(v)To reduce the computational complexity.

#### 3. Proposed Method

In this work, a greyscale image is taken as input and initially converted into 8 × 8 blocks. Further DCT is applied to each block to shift from spatial to frequency domain. A typical quantization table is used to perform the quantization process by its corresponding constant, which is then rounded down to the closest integer for each coefficient. Following that, the DCT quantized coefficients are scanned in a zigzag pattern according to a preset schedule. The 64 DCT coefficients are organized in each block from the lowest frequency at the top left corner to the highest frequency at the bottom right corner. The low frequencies include the image’s most significant visual features, whereas the higher frequencies contain the details. At that time, the input text is converted into ASCII code and converted to binary number. Then the binary number is concatenated with the image binary number. Replace LSB from this concatenated binary number. To convert the frequency domain data to the spatial domain, IDCT is applied after performing a reverse quantization process. All the 8 × 8 blocks are further assembled to generate a complete encrypted image. To create a scrambled image, Gyrator Transform is used with block swapping technique mean block variance vector as key. To extract secret information, the reverse process is performed with secrete *θ* key vector on the receiver side. Figure 1 shows the block diagram of the proposed method.

##### 3.1. DCT

DCT is frequently used in digital compression techniques such as JPEG. DCT is used in the image encryption process [12]. DCT may alter the distribution of pixel values over an entire picture to produce a random output pattern. Another argument for adopting DCT is that it is specified in the real number field. Thus, with this encryption, output data can be encoded using real numbers [13, 14].

The input gray image is split into 8 × 8 blocks. Every block undergo the encryption process with DCT in equation (1):where is the outcome of DCT in the position (*x*, *y*), while is the initial image pixel value in the position before being transformed to DCT.

Decompression is used to recover the compression result utilizing DCT by applying the Inverse Discrete Cosine Transform function through equation (2):where is the IDCT result in the position, while is the DCT result in the position.

##### 3.2. Quantization

Higher compression rates can be achieved with vector quantization, a block-based efficiency picture compression coding technique. If the simple picture does not closely match, the rebuilt image has visible blocking artifacts [15, 16].

The codebook in vector, and quantization can be generated by equation (3):where is the training sample set and *E* is a suitable metric distance function.

After that, the DCT results were quantified. The DCT findings were divided by chrominance and luminance matrix for quantification. The quantization results were read indirectly and converted into sequences in the form of blocks, with each block generating a sequence of 64 lengths [17].

##### 3.3. Gyrator Transform

GT is a 2D complex field function linear canonical transform that is commonly used to create rotation in the position-spatial frequency plane [18]. For the input image (x, y), the definition of GT at *α* can be explained in equation (4):where (*x*, *y*) and are input and output plane coordinates and *α* is the rotation angle. Some of GT’s characteristics are comparable to those of FRFT. GT is a function that is both periodic and additive [19, 20]. The rotation angle *α* between two generalized lenses is formed by two convergent thin cylindrical lenses [21]. The inverse GT is GT with an opposite rotation angle [22]. The image encryption process is performed based on gyrated transform with different theta values. Theta value is calculated using equation (5):

##### 3.4. Mean Difference Key-Based Block Swapping

The block swapping method ensures a two-tier secured shield [23]. Figure 2 shows the proposed block swapping method. After the GT, split the real and imaginary number of GT complex values, and then calculate the mean value of the real number. Mean value calculation is performed by using an 8 × 8 block size. To create the dynamic key for different images, the successive difference of the mean array is calculated further to perform the block swapping process. Negative and zero differences are considered as “0,” and positive differences are considered as “1.” Then, the “0” value blocks are swapped into the imaginary number blocks, and imaginary number blocks are swapped into real numbers blocks. It is explained in equations (6) and (7).

Here, N is the number of blocks. is the angle for the *m*th block.

Figure 3 shows the results obtained for the key generation process. Figure 3(a) shows the mean value obtained for each block. Here, the *x*-axis shows the block number for the corresponding image blocks. Figure 3(b) shows the successive difference of mean value concerning block number. Generated key data concerning the mean value difference can be shown in Figure 3(c).

**(a)**

**(b)**

**(c)**

#### 4. Results and Discussion

This section ran a series of simulations to show that the proposed encryption method is both legitimate and effective. This work is done by MATLAB R2020b using a computer with CPU Intel (R) Core (TM) i5-3320M CPU @ 2.60 GHz, and 2 GB of RAM.

##### 4.1. Dataset

In this work, the dataset images with size 256 × 256 gray image-standard test images are encrypted and decrypted, as presented in Figure 4. Cameraman, Lena, pout, mandrill, pepper, CT scan, X-ray, and house images are used in this work. A standard test image is a digital image file that is used by many different organizations to evaluate image processing and image compression methods on the same data set of pixels. Different laboratories are able to compare findings both visually and numerically since they are utilizing the same set of standard test images. Table 1 shows the dataset description.

**(a)**

**(b)**

**(c)**

##### 4.2. PSNR

The PSNR is the proportion of the signal’s maximum potential strength to the power of completely corrupted input [24]. PSNR is expressed as equation (8):where represents a maximum image pixel value.

##### 4.3. Correlation Coefficient (CC)

The CC is a graphical representation of a type of correlation, which is a statistical relationship between these two variables [25]. The variables may be two columns from a given set of data or two components of a quantitative probability distribution with a good distribution represented in equation (9):

Here, *K* and *k* represent the plain image and decrypted image.

##### 4.4. SSIM

SSIM is a perspective paradigm that treats image loss as a perceived shift in structural details while often integrating core visual effects, including the intensity of light masking and intensity masking concepts [26], shown in equation (10):

##### 4.5. Mean Square Error (MSE)

The MSE measures an estimator’s consistency; it is often nonnegative, with values closest to zero being greater [27]. The distinction between the original and decrypted images is represented in MSE depicted in equation (11):

##### 4.6. Root-Mean-Square Error (RMSE)

The RMSE is used to calculate the residuals’ standard deviation. Residuals are a metric about how far apart the data points are from the regression line; RMSE is expressed in equation (12):where *E* is the expected value and K are known results.

##### 4.7. Mean Absolute Error (MAE)

MAE is a statistical assessment of error among matched data representing the same phenomenon. Comparisons of predicted versus observed future time versus starting time and one measuring technique versus another are shown in equation (13):

##### 4.8. Perception-Based Image Quality Evaluator (PIQE)

Calculate the PIQE score for an image and the distorted images that go with it. Display the results along with the image that corresponds to them. Determine the PIQE score of an image that has been altered by blocking artifacts and Gaussian noise.

##### 4.9. Blind/Referenceless Image Spatial QUality Evaluator (BRISQUE)

BRISQUE compares the output image to a default model computed from original images with similar aberrations. A lower score denotes higher perceptual quality. Using the default model, compute the BRISQUE score for an original image and its deformed copies.

Table 2 shows the better comparative performances of CC, PSNR, and MSE compared with previous works. This work has enhanced CC, PSNR, and lower MSE compared to other previous methods. GI has 0.02 of CC, 46.25 of PSNR, 0.37 of MSE, 0.63 of SSIM, 0.67 of MAE, and 0.076 of RMSE. Double Phase Encryption (DPE) gives 0.19 of CC, 49.29 of PSNR, 0.42 of MSE, 0.79 of SSIM, 0.49 of MAE, and 0.145 of RMSE. Diffractive Imaging (DI) returns 0.14 of CC, 36.78 of PSNR, 0.024 of MSE, 0.46 of SSIM, 0.17 of MAE, and 0.13 of RMSE. Grayscale (GS) has 0.64 of CC, 39.4 of PSNR, 0.076 of MSE, 0.83 of SSIM, 0.35 of MAE, and 0.19 of RMSE. Computational Ghost Imaging (CGI) has 0.46 of CC, 49.53 of PSNR, 0.035 of MSE, 0.73 of SSIM, 0.16 of MAE, and 0.095 of RMSE. Finally, this work has 0.99 of CC, 28.53 of PSNR, 0.0056 of MSE, 0.99 of SSIM, 0.015 of MAE, and 0.056 of RMSE.

Figure 5 shows the comparative performance like CC, MSE, SSIM, MAE, and RMSE of the proposed method. Figure 6 shows the comparative performance of CC based on the noise density.

Figure 7 shows the performance comparison for encryption: (a) MSE, (b) PSNR, (c) SSIM, (d) RMSE, (e) CC, and (f) MAE based on the rotation angle in degree with different images such as Cameraman, Lena, mandrill, and pout. Figure 8 depicts the performance comparison of encryption: (a) MSE, (b) PSNR, (c) SSIM, (d) MAE, (e) RMSE, (f) PIQE, (g) BRISQE, and (h) CC based on distortion with Cameraman, Lena, mandrill, and pout. When compared to other images, Cameraman images have a high CC value.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

The ability to recreate a plain picture with a pleasing aesthetic appearance should be provided by a successful encryption method if an encrypted image is smeared by noise or loses some data during transmission. Figure 9 shows the performance of the decrypted picture after being blurred by Salt and Pepper noise at densities of 0.005, 0.01, 0.015, and 0.02, as well as the performance of the encrypted image after being blurred.

##### 4.10. The Histogram Analysis

Figure 10 depicts the greyscale histograms of (a) Cameraman, (b) Lena, (c) mandrill, and (d) pout and their encrypted picture based on a statistical analysis of the original image and the encrypted image. When the histograms are compared, it is observed that the original image’s pixel values are focused on a few values, but the distribution of the encrypted image’s pixel values is more uniform.

**(a)**

This work used Cameraman, Lena, mandrill, and pout standard images. Variance of input, encrypted, and decrypted images are measured to evaluate the performance. For better performance, a less value of histogram variance should be obtained. As shown in Table 3, this work obtained less histogram variance when compared to [23, 24]. Also, the input and output histogram values should match.

##### 4.11. Key Sensitivity Analysis

Image encryption technique is sensitive to the initial values of the secret key. Key sensitivity analysis of the image coding technique was done. Table 4 shows the key sensitivity analysis performance of original and encrypted images. Here, key sensitivity, CC, SD, arithmetic mean, and MSE are evaluated. Key sensitivity for various images ranges from 0.6 to 0.7. Also, the CC value for the encrypted image is evaluated for different images. Less CC between input and encrypted images shows the highest performance. Similarly, SD, mean, and MSE values are evaluated as shown in Table 3.

Table 5 shows the performance of computation time for various images. The computation time for encryption and decryption varies concerning pixel deviation and texture pattern.

##### 4.12. Chi-Square Test

Table 6 shows the Chi-square test analysis for various images and various techniques. Here, the security level of encrypted images can be evaluated by using Chi-square values. Fewer values of Chi-square values give a better security level. In this work, the proposed work provides high Chi-square values when compared with previous works [23, 26].

Table 7 shows the performance of original and encrypted images for all images. The key sensitivity of 0.6 achieves 369741 of original image, 325.23 of encrypted image, and 369700 of decrypted image for HV and 0.010 of CC, 0.96 of standard deviation, 4.15 of mean, 0.72 of MSE, 0.97 of RMSE, and 83.71 of PSNR. The key sensitivity of 0.7 gets 128567 of original image, 562.12 of encrypted image, and 128498 of decrypted image for HV, 0.017 of CC, 0.38 of standard deviation, 7.45 of mean, 0.64 of MSE, 0.75 of RMSE, and 80.46 of PSNR. The key sensitivity of 0.9 has 317896 of original image, 235.23 of encrypted image, 317896 of decrypted image for HV, 0.008 of CC, 0.91 of standard deviation, 2.17 of mean, 0.98 of MSE, 0.57 of RMSE, and 98.15 of PSNR.

#### 5. Conclusions

This study suggested an optical encryption technique in the GT domains utilizing DCT and quantization in the field of information security. It provided a novel notion of the GT encryption method coupled with image encryption. Block-level GT is applied in this work to perform the image encryption process. Secret information hiding is performed in the DCT domain. To save the data from noise attacks, the binary bits are inserted into the DC coefficients of the 8 × 8 DCT blocks. To improve the security level of encryption, dynamic angle values are used with means gradient difference-based techniques. This work improves the performance in terms of quality and security level. This work achieved an average of 45.6 dB PSNR and 0.965 of SSIM for various images.

#### Data Availability

The data that support the findings of this study are available within the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The research and publication of this paper were funded by LBSCST.