1 Introduction

Due to the high parallelism, high speed and high storage, optical information processing technology attract more and more researchers. Klyshko proposed a scheme about ghost imaging based on the entanglement behavior of two-photon light [1]. Shapiro and Jeffrey et al. used a spatial light modulator (SLM) to achieve computational ghost imaging [2]. Clemente et al. proposed an optical information encryption method based on computational ghost imaging [3]. He first used ghost imaging in the field of optical encryption. Chi et al. proposed pseudo-inverse ghost imaging and Gong completed the experimental verification [4, 5]. Their algorithm improves the quality of reconstructed images. Ying et al. used a two-step phase-retrieval method to greatly increase the imaging ability of the ghost imaging for the general complex-valued object [6]. Zhang et al. employed permutated Hadamard basis patterns, instead of random intensity illumination patterns, for securing object image information [7]. Jiao et al. proposed the Two novel visual cryptography (VC) schemes by combining VC with single-pixel imaging (SPI) for the first time, which extends the application to more diversified scenarios [8]. These researchers have enhanced the efficiency and quality of ghost imaging [9, 10], but these studies have focused on a single image with complex information.

As an important branch of optical encryption, multi-image optical encryption technology not only improves the encryption capability but also reduces the amount of ciphertext data. Wu et al. first proposed multi-image encryption based on computational ghost imaging [11]. Lee and Cho proposed a multi-image transmission method based on orthogonal encoding and double random phase encryption, which uses two random phase and orthogonal encoding to encrypt multiple images [12]. Le and Meng proposed multi-image encryption based on Compressive Ghost Imaging and Coordinate Sampling [13]. They apply logical mapping algorithms and joint sampling to the encryption and decryption of multiple images. Sui and Zhao proposed an optical multiple-image authentication based on the transport of intensity equation, which applies intensity equation transmission technology to realize optical multi-image authentication [14]. Zhou and Yan proposed a multi-image encryption scheme based on quantum 3D Arnold transform, which saves a lot of storage space [15].

Although these multi-image optical encryption algorithms greatly enhance the compressibility of multi-image optical encryption, most of them currently share a common key for multiple pictures. Sharing a public key has great security risks. Once the public key is compromised, all the pictures will be leaked.

We have experimentally demonstrated and proposed a new encryption algorithm: Multi-image holographic encryption based on phase recovery algorithm and ghost imaging (PRA-GI). This paper combines the phase holographic recovery algorithm (Gerchberg–Saxton) with computational ghost imaging encryption technology. Compared with other phase-retrieval works in ghost imaging, this method can encrypt multiple pictures without interference between images. In this paper, each image has the primary public key and an assisted private key, which solves the potential security risks. In this paper, the feasibility of the method is verified by mathematical simulation and experiment. This algorithm extends applications of ghost imaging in the field of optical encryption and provides a reference for improving multi-image compressive encryption.

2 Principle of multi-image holographic encryption based on phase recovery algorithm and ghost imaging

2.1 Principle of computational ghost imaging encryption

Ghost imaging is a new imaging method. Unlike traditional imaging, ghost imaging is non-local imaging. Many scholars proposed different methods for improving information quality and improving reconstruction speed [16,17,18,19,20,21]. In the field of information encryption, ghost imaging encryption has made great progress.

The principle of computational ghost imaging is shown in Fig. 1. There are N normal Gaussian random distribution matrices \(\varphi_{i} \left( {x,y} \right)\) as a key and \(\varphi_{i} \left( {x,y} \right)\) is evenly distributed over [0, 2π]. Digital micromirror device (DMD) modulates the phase of parallel light. The modulated light (light intensity is \(I\left( {x,y} \right)\)) illuminates the object \(T\left( {x,y} \right)\). The light intensity value is recorded by a bucket detector as \(B_{i}\), which is measured N times to get N different values as \(\left\{ {B_{i} } \right\}_{i = 1}^{N}\). This process is shown in Eq. (1), where \(I_{i} \left( {x,y} \right)\) is calculated according to the Fresnel propagation function as shown in Eq. (2):

$$ B_{i} = \int {I_{i} (x,y)T(x,y)dxdy} , $$
(1)
$$ I_{i} (x,y) = \left| {E_{{{\text{in}}}} (x,y)\exp [j\varphi_{i} (x,y) \otimes h_{z} (x,y)} \right|, $$
(2)

where \(h_{z} \left( {x,y} \right)\) is the Fresnel diffraction function for propagating a distance z. \(\otimes\) represents the convolution operation. \(E_{{{\text{in}}}} (x,y)\) is the amplitude distribution of input light fields.

Fig. 1
figure 1

The principle of computational ghost imaging

In the encryption process: a two-dimensional image \(T\left( {x,y} \right)\) (its size is \(n \times n\)) is converted into a one-dimensional column vector \(\left( {n^{2} \times 1} \right)\). Different random matrices \(\varphi_{i} (x,y)\) are operated to obtain light intensity distribution function according to Eq. (2). The light intensity distribution function at the m time operation is \(I_{m} (x_{p} ,y_{q} ),m = 1,2, \ldots ,N;p,q = 1,2, \ldots n\). The matrix expression of light intensity distribution function is:

$$ I_{m} = \left[ {\begin{array}{*{20}c} {I_{11}^{m} } & \cdots & {I_{1n}^{m} } \\ \vdots & \ddots & \vdots \\ {I_{n1}^{m} } & \cdots & {I_{nn}^{m} } \\ \end{array} } \right], $$
(3)

\(I_{nn}^{m}\) is an element at the nth row, the nth column of a matrix at the m time.

The size of this matrix is \(n \times n\). Matrix is stretched into a one-dimensional row vector (its size is \(1 \times n^{2}\)).

$$ I_{m} = \left[ {I_{11}^{m} ,I_{12}^{m} \cdots I_{1n}^{m} ,I_{21}^{m} I_{22}^{m} \cdots I_{n,n - 1}^{m} I_{n,n}^{m} } \right], $$
(4)

After several measurements, the measurement matrix (its size is \(N \times n^{2}\)) is obtained. Information is encrypted into N values to form a one-dimensional vector \(\left\{ {B_{i} } \right\}\). The expression of the encryption process is:

$$ \left[ {\begin{array}{*{20}c} {B_{1} } \\ {B_{2} } \\ \vdots \\ {B_{N} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {I_{11}^{1} } & \cdots & {I_{1n}^{1} } & \cdots & {I_{nn}^{1} } \\ {I_{11}^{2} } & \cdots & {I_{1n}^{2} } & \cdots & {I_{1n}^{2} } \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ {I_{11}^{N} } & \cdots & {I_{1n}^{N} } & \cdots & {I_{nn}^{N} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {T_{11} } \\ \vdots \\ \end{array} } \\ {T_{1n} } \\ {\begin{array}{*{20}c} \vdots \\ {T_{nn} } \\ \end{array} } \\ \end{array} } \right], $$
(5)

where \(\left[ {\begin{array}{*{20}c} {I_{11}^{1} } & \cdots & {I_{1n}^{1} } & \cdots & {I_{nn}^{1} } \\ {I_{11}^{2} } & \cdots & {I_{1n}^{2} } & \cdots & {I_{1n}^{2} } \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ {I_{11}^{N} } & \cdots & {I_{1n}^{N} } & \cdots & {I_{nn}^{N} } \\ \end{array} } \right]\) is the measurement matrix. \(\left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {T_{11} } \\ \vdots \\ \end{array} } \\ {T_{1n} } \\ \vdots \\ {T_{nn} } \\ \end{array} } \right]\) is an image \(T(x,y)\).

In the decryption process: calculate light intensity information \(I_{i} (x,y)\) by key according to formula (2). Correlate \(I_{i} (x,y)\) with light intensity measurement (ciphertext) to reconstruct information. The reconstruction formula for computing ghost imaging is:

$$ T_{GI} (x,y) = \frac{1}{N}\sum\limits_{i = 1}^{N} {\left( {B_{i} - \left\langle {B_{i} } \right\rangle } \right)I_{i} (x,y)} , $$
(6)

\(\left\langle {B_{i} } \right\rangle\) is the average of N-time measurement.

2.2 Principle of the phase recovery algorithm

The phase recovery algorithm in this paper is the Gerchberg–Saxton (G-S) iterative algorithm [22]. It is the way to obtain the phase distribution by iteratively iterating phase between phase planes and image planes. It relies on the principle of the Huygens–Fresnel principle. It iteratively calculates the propagation process between phase planes and image planes. This paper first describes the principle of the Gerchberg–Saxton (G-S) iterative algorithm by generating holograms from two images.

Double-image G-S iterative algorithm process expression is:

$$ A_{1} = {\text{Amplitude}}({\text{Target}}1) * \exp (i * {\text{phas}}({\text{Rand}}n)) $$

While the error is not satisfied:

$$ \begin{gathered} B_{1} = A_{1} \otimes f_{{{\text{fresnel}}}}^{ - Z} \hfill \\ B_{2} = {\text{Amplitude}}({\text{Target}}2)*\exp (i*{\text{phase}}(B_{1} )) \hfill \\ C_{1} = F^{ - 1} \{ B_{2} \} \hfill \\ C_{2} = {\text{Amplitude}}({\text{Sourse}})*\exp (i*{\text{phase}}(C_{1} )) \hfill \\ B_{3} = F\{ C_{2} \} \hfill \\ A_{3} = B_{3} \otimes f_{{{\text{fresnel}}}}^{ - Z} \hfill \\ A_{1} = {\text{Amplitude}}({\text{Target}}1)*\exp (i*{\text{phase}}(A_{3} )) \hfill \\ \end{gathered} $$
(7)

END

Final Phase = Phase (\(C_{1}\))

\(f_{{{\text{fresnel}}}}^{Z}\) represents the Fresnel diffraction factor transmits forward, Z represents the distance of transmission distance. \(f_{{{\text{fresnel}}}}^{ - Z}\) represents the Fresnel diffraction factor transmits backwards, Z represents the distance of transmission distance. \(F\) represents a Fourier transform. \(F^{ - 1}\) represents the inverse Fourier transform. A represents the plane in which Target 1 is located, B represents the plane in which Target 2 is located, and C represents the plane in which the phase hologram is located.

The specific flow of double-image G-S iterative algorithm is shown in Fig. 2. In double-image G-S iterative algorithm, the intensity of Target 1 is multiplied by the random phase to obtain the wave function \(f(x,y)\). \(f(x,y)\) is propagated to the position of Target 2 by the Fresnel diffraction factor (the distance of propagation is \(z_{1}\)), and then \(f(x,y)\) is changed to the wave function \(t(x,y)\). The phase of \(t(x,y)\) is multiplied by the intensity of Target 2 to obtain the wave function \(k(x,y)\). Perform inverse Fourier transform on \(k(x,y)\) to obtain a hologram. The intensity of the incident light is multiplied by the phase of the hologram to obtain the wave function \(g^{\prime}(x,y)\). \(g^{\prime}(x,y)\) performs a Fourier transform to reproduce the wave function \(k^{\prime}(x,y)\). The reproduced wave function \(k^{\prime}(x,y)\) is propagated to the position of Target 1 by Fresnel diffraction factor (The distance of propagation is \(z_{2}\)). produce a new wave function \(f^{\prime}(x,y)\). Iterate again with new \(\left| F \right|\)( phase of \(f^{\prime}(x,y)\)). Repeat the above process to get the phase hologram.

Fig. 2
figure 2

The specific flow of double-image G-S iterative algorithm

2.3 Multi-image holographic encryption based on phase recovery algorithm and ghost imaging

This paper proposes a new encryption method—multi-image holographic encryption based on phase recovery algorithm and ghost imaging (PRA-GI). As shown in Fig. 3, there are two main steps in the encryption phase and two steps in the decryption phase.

Fig. 3
figure 3

Method flow

The specific steps of Multi-image holographic encryption based on phase recovery algorithm and ghost imaging (PRA-GI) are (take holographic iterative encryption of three images as an example):

Encryption phase (1) multiply the intensity of Target 1 by the random phase to get the wave function \(f(x,y)\). \(f(x,y)\) is propagated to the position of Target 2 by the Fresnel diffraction factor (the distance of propagation is \(z_{1}\)), and then \(f(x,y)\) is changed to the wave function \(t(x,y)\). Multiply the phase of \(t(x,y)\) by the intensity of Target 2 to obtain the wave function \(w(x,y)\). \(w(x,y)\) is propagated to the position of Target 3 by the Fresnel diffraction factor (the distance of propagation is \(z_{2}\)), and then \(w(x,y)\) is changed to the wave function \(k(x,y)\). Multiply the phase of \(k(x,y)\) by the intensity of Target 3 to obtain a wave function. Perform inverse Fourier transform to obtain a hologram. Multiply the intensity of the incident light (parallel light) by the hologram phase to obtain the wave function \(g^{\prime}(x,y)\).

\(g^{\prime}(x,y)\) performs a Fourier transform and then reproduces the wave function \(k^{\prime}(x,y)\). \(k^{\prime}(x,y)\) performs Fresnel diffraction to the position of Target 2, and reproduces the wave function \(w^{\prime}(x,y)\). \(w^{\prime}(x,y)\) is propagated to the position of Target 1 by the Fresnel diffraction factor (the distance of propagation is \(z_{3}\)). produces a new wave function \(f^{\prime}(x,y)\). Iterate again with new \(\left| F \right|\)( phase of \(f^{\prime}(x,y)\)). Repeat the above process to get the phase hologram. The whole multi-image phase hologram iterative process is shown in Fig. 4.

Fig. 4
figure 4

The multi-image phase hologram iterative process

Encryption phase (2): The phase hologram is a two-dimensional image. Two-dimensional phase hologram performs computational ghost imaging for encryption. After the second encryption, it gets one-dimensional data as ciphertexts.

Decryption phase (1): It uses an observation matrix as a public key to obtain the light intensity information. PRA-GI reconstructs the ciphertexts and light intensity information by performing ghost imaging to execute the calculation. It reconstructs a two-dimensional matrix as reconstructed phase hologram.

Decryption phase (2): Phase hologram is obtained by reconstruction. Incident parallel light is passed through phase hologram. Then this paper uses different diffraction distances as different private keys for secondary decryption. In other words, Image 1 is displayed when a beam of light passes through the phase hologram and is diffracted by a distance \(Z_{1}\). Image 2 is displayed when the diffraction distance reaches \(Z_{2}\). Image 3 is displayed when the diffraction distance reaches \(Z_{3}\). Since images are imaged at different locations with a beam of light, different images at different locations do not interfere with each other. In this paper, Normal Gaussian random distribution matrices as the primary public key and different diffraction distances \(Z_{n}\) as assisted private keys ensure the security of information.

3 Numerical simulation

This paper strengthens the security of multi-image encryption technology by combining the G-S iterative algorithm with computational ghost imaging. This section takes three images as an example to further analyze PRA-GI. This section uses MATLAB R2019 software to achieve simulation. The object is 128 × 128 grayscale images. The simulation results are shown in Fig. 5. Figure 5a–c are compressed and encrypted into Fig. 5g (phase hologram). Figure 5g (phase hologram) is encrypted by computational ghost imaging. Computational ghost imaging reconstruction is performed by a public key. After reconstruction, this paper extracts the image by different private keys. The final decrypted images are shown in Fig. 5d–f. In Fig. 5, it can be found that the reconstructed images in this paper are clearer than Polarization-multiplexing ghost imaging (reference [23]).

Fig. 5
figure 5

Numerical simulation results: ac is the original image, df is the final decrypted images, g is phase hologram. h is a reconstructed image in references [23] by polarization-multiplexing ghost imaging

3.1 Security

This section takes three images (letters Z, letters W, and letters H are shown in Fig. 6a) as an example. The objects are 64 × 64 grayscale images. Different decrypted images are obtained by correct keys, single keys, and wrong keys. This section demonstrates decrypted images of PRA-GI in case of normal, disclosure, and attack. The results are shown in Fig. 6b–d.

Fig. 6
figure 6

Different decrypted images

The histogram is a method of statistics, and the pixel histogram distribution of different images is different. In other words, when the pixel histogram distribution is different, the correlations between images are smaller. In this paper, the pixel histogram is obtained from the decrypted images by different keys. The pixel histogram is shown in Fig. 7.

Fig. 7
figure 7

Histogram of different key decryption

In Fig. 6, it can be found that (1) the images can be reconstructed if the different private keys and public keys are used correctly. (2) Aliasing and crosstalk are not generated between multiple images in the algorithm of this paper. (3) When the key is compromised, the infringer can only obtain the corresponding image and cannot obtain the remaining images. Figure 6c shows that the diffraction distances \(Z_{n}\) as private keys have a certain effect but only play an auxiliary role. Therefore, we recommend that the primary public key and assisted private keys are used together.

In Fig. 7, the abscissa represents different gray levels in the image, and the ordinate represents the number of pixels in different gray levels. It can be observed from Fig. 7 that the infringer cannot obtain other images by the leaked or wrong key. (1) By comparison, it can be found that the pixel histogram of the image obtained by the leaked key is different from the pixel histogram of the remaining images. (2) The pixel histogram of the image obtained by the wrong key is very different from the pixel histogram of the original images.

This paper will analyze the correlation between the original image and the hologram by pixel correlation. The original images take the first image-letter Z as an example. The inter-pixel correlation of the original image and the hologram are shown in Figs. 8 and 9.

Fig. 8
figure 8

The inter-pixel correlation of the original image

Fig. 9
figure 9

The inter-pixel correlation of the hologram

In Figs. 8 and 9, it can be found that (1) the inter-pixel correlation of the original image is completely different from the pixel-to-pixel correlation of the encrypted image. There is a linear relationship between the inter-pixel correlations of the original image. The inter-pixel correlation of the encrypted image is random. (2) The encryption method in this paper plays a good and secure effect, which can hide and compress important information.

3.2 Multi‑image encryption capability

Encryption capability is one of the important indicators to measure multi-image encryption technology. This paper uses CC (correlation coefficient) to measure the correlation between the reconstructed image and the original image. CC reflects the relationship between two variables. the CC value is larger, the correlation between the reconstructed image and the original image is greater. Calculation expression of CC is as follows:

$$ \left\{ {\begin{array}{*{20}l} {E\left( x \right) = \frac{1}{N}\sum\nolimits_{i = 1}^{N} {X_{i} } } \\ {D(x) = \frac{1}{N}\sum\nolimits_{i = 1}^{N} {(x_{i} - E(x))^{2} } } \\ {COV(x,y) = \frac{1}{N}\sum\nolimits_{i = 1}^{N} {(X_{i} - E(x))(y_{i} - E(y))} } \\ \end{array} } \right., $$
$$ {\text{CC}} = \frac{{{\text{cov}} (x,y)}}{{\sqrt {D(x)} \sqrt {D(y)} }}, $$
(8)

x and y represent two adjacent pixels in the image, CC is the correlation coefficient of two adjacent pixels.

According to the characteristics of Gerchberg–Saxton (G-S) iterative algorithm, if we use more iterations, the more images will be encrypted. If computational ghost imaging uses more sampling number, the clearer reconstructed images will be. The correlation coefficient curve of decrypted images is shown in Fig. 10a and b, take “Z” “W” as an example to encrypt two images by PAR-GI. Take “Z” “W” and “H” as an example to encrypt three images by PAR-GI. Take “Z” “W” “H” and “S” as an example to encrypt four images by PAR-GI. Take “Z” “W” “H” “S” and “R” as an example to encrypt five images by PAR-GI.

Fig. 10
figure 10

Correlation coefficient of images

In Fig. 10a the green and purple lines represent the reconstructed images of double-images encryptions. In Fig. 10a, the black, red, and blue lines represent the reconstructed images of triple-images encryptions. In Fig. 10a, it can be found that (1) under the same sampling and the small number of encrypted images, the quality of reconstructed images did not decline significantly with the increase of images. (2) This paper improves the quality of two and three decrypted images by increasing the number of samples in computational ghost imaging. PAR-GI can still achieve high-quality reconstruction, and with the increase in sampling, the distortion of reconstructed images is smaller and smaller, close to the original image, which indicates that this method is feasible in encrypting multi-image. In Fig. 10b, the black, red, blue, and green lines represent the reconstructed images of Four-images encryptions. In Fig. 10b, the purple, golden, cyan, brown, and orange lines represent the reconstructed images of five-images encryptions. Compared with Fig. 10a, Fig. 10b can be found that (3) when the number of images is more than three, the final reconstruction quality is closely related to the number of encrypted images. the overall reconstruction quality of the decrypted image decreases as the number of encrypted images increases. At the same time, with the increase of the number, the rising trend caused by sampling rate will not be obvious (4) when the number of images reaches 5, the last two final decrypted images will become blurred. Therefore, we recommend that the number of encrypted images be set to 3.

3.3 Information entropy

To objectively evaluate the effect of the encryption scheme, this paper analyzes the effect of PRA-GI by information entropy. Calculation expression of information entropy is as follows:

$$ H = \sum\limits_{i = 0}^{255} {P_{ij} \log P_{ij} } , $$
(9)

\(P_{ij}\) is the probability that a grayscale appears in the image, obtained by a gray histogram.

Information entropy can directly represent the amount of information included in the image. The smaller the information entropy value is, the more orderly the system is, and the higher the image quality is. Table 1 lists the information entropy values after encryption for three different images. The information entropy of the encrypted image in this paper is better than the reference [20] (the information entropy in reference [24] is 7.79,7.85,7.83).

Table 1 Supplementary information entropy of PRA-GI

3.4 Noise immunity

In the process of information transmission, it will inevitably be attacked by noise. To detect the anti-noise ability of the algorithm, we use PSNR (peak signal to noise ratio) as the quantitative index. This paper analyzes the decrypted image (take “Flowers” as an example.) under different degrees of noise attack. The added noises are salt and pepper, Gaussian, and speckle noise.

The mathematical expression of PSNR is:

$$ {\text{PSNR}} = 10 \times \log_{10} \left[ {\frac{{(2^{m} - 1)^{2} }}{{{\text{MSE}}}}} \right], $$
(10)

MSE represents the mean square error between the original images and the decrypted images. m is the maximum pixel value.

It is shown in Fig. 11 that PRA-GI has good robustness to three kinds of noise attacks and different noise attacks also have different reconstruction qualities for the decrypted images. Overall, with the increase of noise density, the PSNR of PRA-GI remains relatively stable, and the decrypted images are not disturbed by added noises.

Fig. 11
figure 11

Anti-noise ability

Table 2a show a ciphertext image after adding salt and pepper noise with a noise density of 0.03; Table 2b and c shows, respectively, decrypted images after adding Gaussian noise; Table 2d shows a ciphertext image after adding Gaussian random noise with a mean of 0 and a variance of 0.03; Table 2e and f shows, respectively, decrypted images after adding Gaussian noise; Table 2g show a ciphertext image after adding a speckle noise with a mean of 0 and a variance of 0.03; Table 2h, i shows, respectively, decrypted images after adding speckle noise.

Table 2 Noise attack

Decrypted images after Speckle noise attacks are better than images after Gaussian noise attacks and salt & pepper noise attacks. The decrypted images can still be distinguished, and the outline of images can be seen. The quality of decrypted images has not decreased significantly after noise attack, and the resolution of reconstructed images is acceptable.

In the process of encryption transmission of images, loss of information is inevitable, which affects the quality of the decrypted images. Therefore, the anti-cropping performance of the encryption method is analyzed to verify the robustness of the proposed method. The reconstructed effect is shown in Table 3.

Table 3 Cropping attack

As shown in Table 3, the direction of the cropping is different, and the reconstructed images will be different. the cropping at different directions, the resolution of the reconstructed image is not much different, indicating that the proposed method is robust to anti-cropping attacks.

4 Experimental verification

In the experimental verification section, this paper combines mathematical simulation and experimentation. The experiment is part of computational ghost imaging encryption for the holographic images. The main content of the experiment is that the holographic image modulated by a random matrix is received by the bucket detector and encrypted into a one-dimensional ciphertext. The rest of the algorithm is a mathematical simulation.

First encryption: original images are compressed and encrypted into a phase hologram by the G-S iterative algorithm.

Second encryption: this paper will perform a computational ghost imaging on phase holographic images. The experimental device of computational ghost imaging is shown in Fig. 12. Laser diode is the illumination source. The camera lens model is Nikon, AF-S DX 55-200 mm f/4-5.6 G ED (68 mm*79 mm). Bucket Detector is POINTGREY, BFLY-PGE-50H5M (29*29*30 mm). The capture card is M2i.2030-exp. This experiment uses DMD. The target object is a holographic image.

Fig. 12
figure 12

Experimental device of computational ghost imaging

The experimental steps are:

Encryption phase: (1) this paper uses MATLAB software to generate random Gaussian matrices, the random Gaussian matrices are used as the random phase template in this experiment; (2) load these random phase templates onto the DMD chip; (3) place the phase hologram in front of the lens; (4) turn on the signal trigger and start the experiment; (5) the laser diode first illuminates the phase hologram and then illuminates the DMD chip; (6) the bucket detector receives 4096 times of light from the phase hologram.

Decryption phase: this paper associates the accumulated signal collected by the bucket detector with the corresponding light intensity information. The reconstructed phase hologram is obtained by computational ghost imaging reconstruction. Different decrypted images are reconstructed by different diffraction distances.

This paper selects five images of the experiment. The results obtained are shown in Table 4. This paper uses CC and PSNR to objectively evaluate the effect as shown in Table 5.

Table 4 Experimental results
Table 5 Objective evaluation

In experimental results, Tables 4 and 5, it can be found that: (1) it takes 3–4 min for PRA-GI to encrypt 2 or 3 images. It takes 6–8 min for GI to encrypt 2 images, and it takes 9–12 min for GI to encrypt 3 images. It shows that the encryption time required by PRA-GI is much shorter than single image encryption, and the encryption efficiency is also higher than single image encryption. (2) The reconstructed images of PRA-GI can be distinguished, the outline of the images can be seen, and the resolution of reconstructed images is acceptable. (3) Compared with the results of GI, the objective indicators of PRA-GI are reduced, but the safety and efficiency of PRA-GI are much higher than GI. (4) The experimental results are the same as the numerical simulations, which proves that the method has certain feasibility.

5 Conclusion

This paper proposes a new encryption algorithm-Multi-image holographic encryption based on phase recovery algorithm and ghost imaging (PRA-GI). This paper studies its double encryption mechanism. It solves the problem of poor security and compressibility in the current multi-image double encryption algorithm. This paper combines computational ghost imaging with multi-image holographic iterative algorithms. This paper can greatly improve the compression of encrypted multi-image information, improve the security of multi-image double encryption, and achieve secure and accurate information encryption. This method can achieve multiple-image encryption. This method does not cause aliasing and crosstalk between multiple images. PRA-GI can send different ciphertexts to different authorized users, which has broad prospects.