1 Introduction

With the rapid development of computers, image encryption technology has become an important topic in the field of information security. The advantages of multi-parameter parallel processing of optical information systems are applicable to encryption technology [1,2,3,4,5,6,7]. The double random phase encoding (DRPE) method was proposed in 1995 [8]. Since then, such as fractional Fourier transform [9,10,11,12], Fresnel transform [13,14,15] and Gyrator transform [16,17,18] are proposed, which are optical image encryption methods based on DRPE. The encryption method described above mainly focuses on two-dimensional (2-D) images. However, the encryption of simple 2-D images is insufficient to meet the security needs of society, as a result, the encryption of three-dimensional (3-D) information has received more and more attention. As we all know, 3-D information has more capacity and richer content than 2-D information, because it can accurately represent such depth, position, and spatial relationship of the 3-D scene [19, 20]. The 3-D information encryption has significant advantages over 2-D information encryption in terms of information storage, transmission, and display [21]. Therefore, with the development of 3-D display technology, 3-D information encryption technology has become an important research topic in the field of information security.

At present, researchers have proposed many methods for encrypting 3-D information such as diffraction imaging [22, 23], digital holography [24,25,26,27], integral imaging [28, 29] and computer- generated hologram (CGH) [30]. In contrast, CGH encryption has the advantage of easy storage, transmission, and reconstruction of 3-D information. Therefore, the CGH-based 3-D information encryption has attracted many research efforts. In the CGH-based 3-D information encryption, it is generally assumed that the 3-D information is composed of many 2-D layers [31, 32]. Then, we superimpose the complex amplitude distribution of each layer on the holographic plane to obtain the total complex amplitude distribution, and the superposition of the 2-D information encryption is equal to encrypting the 3-D information [30]. Therefore, based on the above theory, we can apply the 2-D information encryption system to encrypt the 3-D information. In recent years, P. W. M. has proposed a new single random phase holographic encryption method based on bidirectional error diffusion (BERD) [33]. In this method, the structure of the encryption system is simple and easy to implement optical reconstruction results. Consequently, one may perform 3-D information encryption based on this encryption system. However, it is not easy to encrypt the 3-D information. First, since the amount of 3-D information is huge and the structure is complex, the process and encryption of 3-D CGH become complicated. Second, since this 2-D encryption system adopts the method of BERD [34], the quality of the reconstruction results needs to be improved, and the generation of the phase-only hologram (POH) takes a long time [35]. Although researchers have proposed many encryption schemes for 3-D objects [21, 30], there is still a lot of work worth researching. For example, literature [30] proposed a 3-D object hierarchical encryption scheme based on chaotic sequences and CGH, in which users with different permissions obtain different amounts of decrypted 3-D information. However, as the number of layered encryption of 3-D objects increases, the speed and quality of decrypted images will also be affected. Recently, the double-phase method was proposed, which can encode the complex amplitude into POH at a high speed [36, 37]. However, the double-phase encoding method separates the two pixels and generates noise, which affects the image quality [38]. Therefore, how to encrypt and decrypt 3-D information with low noise and fast speed is the main goal of our research.

In this paper, we propose a low-noise and fast 3-D information encryption scheme using the double-phase method. The 3-D information is encoded into POH by the angular-spectrum diffraction and the double-phase method. Then, the CRPM is generated by the hybrid logical map and the iterative chaotic map with infinite collapses (ICMIC) map to modulate the POH and obtain the ciphertext. Therefore, the low-noise and fast 3-D information reconstructed results are finally obtained. The main advantages of this scheme are as follows. First, the POH is generated by the double-phase method, which greatly improves the encryption speed of the 3-D information. Second, the background noise of the image is successfully reduced by the cross-shaped filter, which improves the quality of 3-D information reconstruction. Third, the security of the encryption system is improved, because diffraction distance, wavelength, and CRPM can be acted as secret keys. Fourth, the scheme can be achieved optically by a simple optical system. Numerical simulation and optical results show the effectiveness and feasibility of the proposed encryption scheme.

2 Angular-spectrum diffraction and double-phase method

First, the 3-D information can be viewed as a combination of multiple layers of 2-D images, which are denoted as I(x1, y1), I(x2, y2), and I(x3, y3), respectively. To better illustrate our scheme, we only use one of the layers of an image I(x1, y1) as an example to prove the principle. Next, image I(x1, y1) is converted to a complex amplitude distribution h(x1, y1) using angular-spectrum diffraction (ASD). The expression of the above process is given below.

$$H\left( {u,v} \right) = exp\left( {ikZ_{1} \sqrt {1 - \lambda^{2} u^{2} - \lambda^{2} v^{2} } } \right),$$
(1)
$$h\left( {x_{1} ,y_{1} } \right) = FFT^{ - 1} \left\{ {FFT\left\{ {I\left( {x_{1} ,y_{1} } \right)} \right\} \cdot H\left( {u,v} \right)} \right\},$$
(2)

where u and v are the parameters representing the spatial frequencies in the transfer function H(u, v), Z1 is the diffraction distance, FFT{⋅} is the fast Fourier transforms (FFT), and FFT−1{⋅} is the inverse fast Fourier transform.

Second, we encode the calculation result of the ASD into POH using the double-phase method (DPM). Assume that the expression of a 2-D image is shown in Eq. (3), whose amplitude and phase are A(x1, y1) and φ(x1, y1), respectively. The complex amplitude U(x1, y1) can be expressed as the sum of two pure phase functions θ1(x1, y1) and θ2(x1, y1) whose amplitude is constant. The expressions can be written as:

$$U\left( {x_{1} ,y_{1} } \right) = A\left( {x_{1} ,y_{1} } \right) \cdot \exp \left( {j\varphi \left( {x_{1} ,y_{1} } \right)} \right),$$
(3)
$$\theta_{1} \left( {x_{1} ,y_{1} } \right) = \varphi \left( {x_{1} ,y_{1} } \right) + cos^{ - 1} \left[ {A\left( {x_{1} ,y_{1} } \right)/A_{max} } \right],$$
(4)
$$\theta_{2} \left( {x_{1} ,y_{1} } \right) = \varphi \left( {x_{1} ,y_{1} } \right) - cos^{ - 1} \left[ {A\left( {x_{1} ,y_{1} } \right)/A_{max} } \right],$$
(5)

where Amax = 2 is assumed to be the maximum value of A(x1, y1), then U(x1, y1) can be written as:

$$U\left( {x_{1} ,y_{1} } \right) = exp\left( {j\theta_{1} \left( {x_{1} ,y_{1} } \right)} \right) + exp\left( {j\theta_{2} \left( {x_{1} ,y_{1} } \right)} \right).$$
(6)

Finally, we can obtain the superposition of two pure phase elements using the complementary 2-D binary gratings M1(x1, y1) and M2(x1, y1), and their expressions are given as:

$$M_{1} \left( {i \cdot \Delta x_{1} ,j \cdot \Delta y_{1} } \right) = \left\{ \begin{gathered} 1,\;\left( {i \cdot j\;are\;even} \right) \hfill \\ 0,\;\left( {i \cdot j\;are\;odd} \right)\; \hfill \\ \end{gathered} \right.,$$
(7)
$$M_{2} \left( {i \cdot \Delta x_{1} ,j \cdot \Delta y_{1} } \right) = \left\{ \begin{gathered} 1,\;\left( {i \cdot j\;are\;odd} \right) \hfill \\ 0,\;\left( {i \cdot j\;are\;even} \right) \hfill \\ \end{gathered} \right.,$$
(8)

where i and j represent the index of pixels, ∆x1 and ∆y1 represent the pixel intervals of the pattern, respectively. Since M1(x1, y1) and M2(x1, y1) are complementary, therefore, the encoded POH hp(x1, y1) can be expressed as Eq. (9), and it is illuminated in Fig. 1.

$$h_{p} \left( {x_{1} ,y_{1} } \right) = \theta_{1} \left( {x_{1} ,y_{1} } \right) \cdot M_{1} \left( {x_{1} ,y_{1} } \right) + \theta_{2} \left( {x_{1} ,y_{1} } \right) \cdot M_{2} \left( {x_{1} ,y_{1} } \right).$$
(9)
Fig. 1
figure 1

Illumination of double-phase encoding method to generate the hologram

3 Process of encryption and decryption

3.1 Process of encryption

First, the original 3-D information is sliced into three layers of images. Second, the three diffraction images of h(x1, y1), h(x2, y2), and h(x3, y3) are obtained by the ASD at different diffraction distances Zi (i = 1, 2, 3). Third, three diffraction images are superimposed and encoded as the POH hp(x1, y1) by the DPM. Finally, we modulate the POH by combining two chaotic random phase masks CRPM1(x, y) and CRPM2(x, y) generated by the logistic map and ICMIC map. The final ciphertext he(x, y) can be expressed as:

$$CRPM(x,y)\; = \;CRPM_{1} (x,y) \cdot CRPM_{2} (x,y),$$
(10)
$$h_{e} (x,y)\; = \;h_{p} (x,y) \cdot CRPM(x,y).$$
(11)

We use the encrypted hologram he(x, y) as the ciphertext, the CRPM (x, y), and diffraction distances Zi (i = 1, 2, 3) as the encryption keys. The specific encryption flowchart is shown in Fig. 2.

Fig. 2
figure 2

The process of encryption and decryption

3.2 Process of decryption

Decryption can be achieved numerically or optically, as shown in Fig. 2. First, the decryption key CRPM* (x, y) is the conjugate item of the CRPM (x, y) which is loaded into the ciphertext he(x, y) and then we get the hp(x, y). Second, the hp(x, y) can reconstruct the information of different layers AZ(x, y) of the 3-D information through the ASD at different diffraction distances Zi (i = 1, 2, 3). The expressions of the algorithm are expressed as:

$$h_{p} (x,y)\; = \;h_{e} (x,y) \cdot \;CRPM^{*} (x,y),$$
(12)
$$A_{Z} (x,y)\; = \;FFT^{ - 1} \{ FFT\{ h_{p} (x,y)\} \cdot H(u,v)\} .$$
(13)

In optical reconstruction, the hp(x, y) is loaded on the SLM, then passes through the 4-f filter system. Finally, we moved the camera to get the reconstructed image.

3.3 Filter optimization

To reduce the background noise interference during the reconstruction process and improve the quality of the reconstructed images, we designed two rectangular filters A and B, a circular filter, and a cross-shaped filter according to the spectral distribution of POH, as shown in Fig. 3.

Fig. 3
figure 3

Spectrogram of a phase-only hologram; a the rectangular filter of size 800 \(\times\) 800 pixels; b the rectangular filter of size 400 \(\times\) 400 pixels; c the circular filter of size 400 pixels; d the cross-shaped filter of size 400 \(\times\) 400 pixels

In the process of decryption, the POH is obtained by the decryption and which is subjected to Fourier transform and normalization to obtain the spectrogram. Therefore, the low-frequency information of the image is primarily concentrated in the central region, but the background noise is also distributed around it in the red circled area. The background noise will reduce the quality of the reconstructed images. However, in most of the references, the role of the filter is to filter out the diffraction orders except 0 and 1 [36, 37], and the background noise problem is not considered. Therefore, we selected the cross-shaped filter based on the distribution of low-frequency information in the spectrogram, which can preserve low-frequency information and filter background noise as much as possible.

4 Numerical simulation and optical reconstruction

4.1 Simulation results and comparison

The computer simulation was implemented with Python 3.7 programming, which verified that the scheme is feasible. The proposed cross-shaped filter is applied to 2-D and 3-D cryptosystem to improve the quality of decrypted images. Figures 4a–c are the original images with a size of 1024 × 1024. Figures 4d–f are the reconstructed images obtained by our proposed scheme using a 400 × 400 pixels cross-shaped filter. And Figs. 4g–i are the reconstructed images obtained using an 800 × 800 pixels rectangular filter. The diffraction distances is Z1 = 0.15 m, Z2 = 0.20 m, and Z3 = 0.25 m, respectively. And the wavelength λ is 671.0 nm.

Fig. 4
figure 4

ac Original images, reconstruction results of df using a 400 × 400 pixels cross-shaped filter, reconstruction results of gi using an 800 × 800 pixels rectangular filter

It can be seen from the local contrast that DPM causes background noise in the reconstructed image, and our proposed scheme can effectively suppress the background noise in the reconstructed image.

Next, we have selected complex 3-D information as the encryption object to show the difference in results and effects between the proposed 3-D encryption system and the 2-D encryption system. The 3-D information model dragon is shown in Fig. 5 with a size of 1024 × 1024, where Fig. 5a represents the intensity map of the model dragon and Fig. 5b represents the depth map of the model dragon.

Fig. 5
figure 5

Model dragon. a intensity map, b depth map

To verify that the proposed scheme applies to the 3-D information encryption, we use the proposed scheme to encrypt 3-D information and compare the quality of the decrypted image. Figures 6a–c are the reconstructed images obtained by our proposed scheme using a 400 × 400 pixels cross-shaped filter. And Figs. 6d–f are the reconstructed images obtained by using an 800 × 800 pixels rectangular filter.

Fig. 6
figure 6

Reconstruction results of ac using a 400 × 400 pixels cross-shaped filter, reconstruction results of df using an 800 × 800 pixels rectangular filter

It can be seen from the local contrast that DPM causes background noise in the reconstructed image, and the proposed scheme can effectively suppress the background noise in the reconstructed image. In summary, the proposed scheme has a certain flexibility, which is suitable for 2-D information and 3-D information cryptosystem.

To qualitatively evaluate the simulation results, we used the structural similarity (SSIM) value to evaluate the image similarity, which is expressed as follows:

$$SSIM(x,y)\; = \;\frac{{(2\mu_{x} \mu_{y} + \;C_{1} )(2\sigma_{xy} + \;C_{2} )}}{{(\mu_{x}^{2} + \mu_{y}^{2} + C_{1} )(\sigma_{x}^{2} + \sigma_{y}^{2} + C_{2} )}},$$
(14)
$$\begin{gathered} C_{1} = (k_{1} L)^{2} , \hfill \\ C_{2} = (k_{2} L)^{2} . \hfill \\ \end{gathered}$$
(15)

In Eq. (14), μx and μy, σx2 and σy2, and σxy correspond to the mean value, variance, and covariance of x and y regions, respectively. Where x and y represent the same regions in two images. In Eq. (15), k1 and k2 are two constants, and L represents the pixel value range of the image.

The reconstructed result obtained by our proposed scheme is used as the reconstructed image, and the result of complex amplitude reconstruction is used as the original image. We use four filters for comparison: the cross-shaped filter size is 400 × 400 pixels, the rectangular filter A is 800 × 800 pixels, the rectangular filter B is 400 × 400 pixels, and the circular filter is 400 pixels. The exact values of SSIM are shown in Table 1.

Table 1 SSIM value of simulation results

It can be seen from Table 1 that the simulation results of the cross-shaped filter are better than those of the rectangular filter A, rectangular filter B, and circular filter, when the diffraction distance Zi (i = 1, 2, 3) is the same. Therefore, the comparison results show that the background noise of cross-shaped filter simulation results is significantly reduced.

4.2 Optical results

The optical reconstruction of the system mainly requires a red laser, beam expander, collimating lens, SLM, camera, beam splitter, and lens. The specific parameters of the optical system are as follows: the input wavelength is 671.0 nm, and the SLM resolution and sampling interval are 1080 × 1920 and 8 μm, respectively. The decryption optical system is shown in Fig. 7.

Fig. 7
figure 7

Decryption optical system

First, the POH is loaded on the SLM, then the modulated light passes through a 4-f system with a cross-shaped filter. Finally, after the output plane of the 4-f system, we moved the camera to get the reconstructed image. The optical results are shown in Figs. 8a–c.

Fig. 8
figure 8

ac Optical results

From the optical results in Figs. 8a–c, it can be seen that when the focal plane is 0.15 m, the front of the dragon is clearer than other parts. When the focus distance becomes 0.20 m, the clear content moves backward. The optical results are consistent well with the simulation results. Therefore, the effectiveness of the proposed scheme for 3-D object reconstruction is verified.

4.3 Running time analysis

To evaluate the performance of the BERD and the double-phase method by comparing the running time of obtaining POH. The running time of the generation of the POH using the BERD and the double-phase method is shown in Figs. 9a–b.

Fig. 9
figure 9

Corresponding graphs of comparison between the BERD method and the double-phase method: a the running time ratio; b the running time

Figure 9a shows that with the number of layers of 3-D information increases, the double-phase method takes less time to generate a POH than the BERD method. Figure 9b shows that with the resolution of the layered images increases, the double-phase method takes less time to generate a POH than the BERD method. Therefore, the double-phase method can fast generate POH.

4.4 Key sensitivity and space analysis

The mean square error (MSE), which is commonly used to measure the key sensitivity of encryption schemes, is defined as follows:

$$MSE = \frac{1}{M \times N}\sum\nolimits_{i = 1}^{M} {\sum\nolimits_{l = 1}^{N} {{|}f(i,l) - F(i,l){|}^{2} } } ,$$
(16)

where f(i, l) and F(i, l), respectively, represent the pixel values of point (i, l), and M × N represents the size of the image. Figures 10a–b shows the MSE line charts for a, x0, μ, and y0, respectively, where δ represents the deviated key. When the δ values deviate slightly from the correct key values, the MSE graph fluctuates significantly. Therefore, encryption schemes have the advantage of key sensitivity.

Fig. 10
figure 10

MSE line charts: a a, x0; b μ, y0

In this scheme, the four initial values of chaos are the main components of the secret key space. The ICMIC map and logical map are defined in Eq. (17) and Eq. (18), respectively. as

$$x_{n + 1} = \;\sin (a/x_{n} ),$$
(17)
$$y_{n + 1} \; = \;\mu y_{n} (1 + y_{n} ).$$
(18)

In this scheme, there are four key initial values x0 = 0.8392, a = 12.5098, y0 = 0.3141, and μ = 3.8956. The main key space of the proposed scheme is approximately (1015)4 = 1060. Besides, the parameters of the optical encryption system such as the incident light wavelength λ and angular-spectrum diffraction distance Zi (i = 1, 2, 3) can also be used as part of the secret keys. The above data analysis shows that our encryption scheme has enough key space to guarantee the security of encrypted information.

4.5 Robustness analysis

We verified the robustness of the proposed scheme against Gaussian noise attacks, as shown in Eq. (19). Noise image E' is obtained by adding Gaussian noise G with a mean of zero and a standard deviation of 1 to the encrypted image E. Figures 11a–f are decrypted images with added noise with intensity k of 0.6 and 0.8. Therefore, the proposed scheme can resist the attack of noise.

$$E^{\prime}\; = \;E(1 + kG).$$
(19)
Fig. 11
figure 11

Decrypted image with Gaussian noise ac k = 0.6, df k = 0.8

5 Conclusion

In this paper, a low-noise and fast 3-D information encryption scheme is proposed. The advantages of the scheme are mainly as follows. First, the POH is generated by the double-phase method, which greatly improves the encryption speed of the 3-D information. Second, the background noise of the decrypted image is successfully reduced by the cross-shaped filter, which is designed for the first time based on the POH spectrum distribution. Third, the security of the encryption system is improved because diffraction distance, wavelength, and CRPM can be acted as secret keys. Fourth, the scheme can be achieved optically by a simple optical system. Numerical simulation and optical results show the effectiveness and feasibility of the proposed encryption scheme.