## 2 Theoretical Analysis  
### Image Encryption Based on Binarized Computational Ghost Imaging (BCGI)  
To secure watermark information, the watermark image is encrypted before embedding. In this paper, we adopt the image encryption method based on binarized computational ghost imaging (BCGI). Compared with other traditional optical encryption methods, BCGI encrypts the image into an intensity vector instead of a complex-valued matrix, which reduces the storage space of the ciphertext and also brings convenience to the subsequent processing and transmission of the ciphertext, while the binarization of the ciphertext makes it easier to hide. The schematic diagram of computational ghost imaging is shown in Figure 1. Random scatter patterns are generated by computational devices such as spatial light modulators, digital micromirror devices, or projectors [27; 28], and different scatter patterns are converted into different light spots to interact with the target object under the irradiation of a stable laser light source. This beam, which carries information about the object, is called the signal beam, and it is detected by single-pixel camera. The other beam, which contains only the computer-generated scatter pattern information and does not contain object information, is called the reference beam. We correspond the signal beam and the reference beam one by one and calculate them using the correlation algorithm, which can reconstruct the pattern of the target object. The process can be expressed as follow,  
\[C_{r}=\iint I_{r}(x,y)m(x,y)dxdy \tag{1}\]  
where \(\{C_{r}\}\) is the data detected by a single pixel camera, \(m(x,y)\) is the distribution function of the target object and \(I_{r}(x,y)\) is the intensity of light projected onto an object after the beam has been modulated by a random scatter pattern. In the image encryption scheme based on binarized computational ghost imaging, we use the watermarked image as the target object, the random scatter pattern \(\{\delta_{i}(x,y)\}\)\(i=1,2,\ldots,N\) generated by the spatial light modulator as the encryption key, where \(N\) is the maximum number of random scatters generated and the light intensity data detected by single-pixel camera as the ciphertext. In the decryption process, after the ciphertext watermark is extracted and associated with speckle one by one, the watermark pattern can be solved completely. The encryption process is shown in Figure 2. Since the secret key used for encryption and decryption is the same, the ghost imaging encryption in this paper is a symmetric encryption. The computational ghost imaging-based image encryption system has a fast parallel data processing capability unique to optical systems [29], which encrypts the image into an intensity vector rather than a complex-valued matrix, reducing the storage space for the ciphertext. To facilitate concealment, the ciphertext \(\{C_{r}\}\) is binarized as follows,  
\[D_{r}=\left\{ \begin{array}{ll}1&C_{r}>V\\ 0&C_{r}\leq V\end{array} \right\} \tag{2}\]  
where \(V=[max(C)+min(C)]/2\) is the critical value, \(max(C)\) is the maximum of \(\{C_{r}\}\) and \(min(C)\) is the minimum of \(\{C_{r}\}\). In the decryption process, we associate the binarized ciphertext \(\{D_{r}\}\) with the light intensity \(I_{r}(x,y)\) projected onto the object after the beam has  
Figure 1: The schematic diagram of computational ghost imaging. been modulated with a random scattering pattern. The core operation of the association algorithm is formulated as follows,  
\[T(x,y)=\frac{1}{N}\sum_{i=1}^{N}{(D_{r}-\langle D\rangle)(I_{r}(x,y)-\langle I(x, y)\rangle)}=\langle DI(x,y)\rangle-\langle D\rangle\langle I(x,y)\rangle \tag{3}\]  
where \(T(x,y)\) represents the decrypted image and \(\langle D\rangle\) is the average value of \(D\). The detail of encryption and decryption process [30; 31; 32; 33; 34; 35] is as follows:  
**Step 1:** The laser beam is transmitted via a spatial light modulator (SLM).