## 3 Main Scheme
### Algorithm I. XOR-Based Visual Multi-Secret Scheme  
We apply a XOR operation rather than OR when encrypting input images in our Algorithm I since [PERSON] et al. 's [9] served as inspiration. We were able to successfully enhance [PERSON] et al. 's scheme's restoring effect as a consequence. Here, we modify the two original functions--\(f_{RG}\) and \(f_{ORG}\)--to create \(f_{XRG}\) and \(f_{XORG}\). Actually, \(f_{XRG}\) can be selected from any one of the three random grid algorithms in [2] (as we described in Section 2.1), which inputs a pixel of the secret image, then outputs two cipher-pixels for two shares. \(f_{XORG}\) is the function based on \(f_{XRG}\), which inputs a cipher-pixel of shares and a pixel of the secret image, then outputs the other cipher-pixel. Although these three random grid algorithms (KK1, KK2, and KK3 in Section 2.1) in [2] are computed in the OR-operation, it is not difficult to see that they also apply to the XOR-operation. Therefore, there are also three possible design methods for the function \(f_{XRG}\) and \(f_{XORG}\). We use the one with the best contrast in the recovered image, listed below. Figure 1: The model of the encryption process of the proposed scheme. Figure 2: The model of the decryption process of the proposed scheme. Algorithm 1, shown below (for Algorithm 1), has the goal of simultaneously encrypting multiple secret images into two shares. The purpose is to shift one of the shares by \(i\) unit and superimpose it back into another share to restore \(i\)th secret image. Before starting Algorithm 1, we need to number the \(N\) secret images \(S_{0}\), \(S_{1}\), \(S_{2}\),..., \(S_{N-2}\), \(S_{N-1}\). Then, we assign two consecutive secret images as pairs \((S_{0}\), \(S_{1})\), \((S_{1}\), \(S_{2})\),..., \((S_{N-2}\), \(S_{N-1})\), \((S_{N-1}\), \(S_{0})\). In a secret image of size \(w\times h\), the secret image is split into \(p\) parts, which means that each shift is in units of \((w/p)\) pixels. In addition, the value of \(p\) must be mutually prime with \(N\)-\(1\); otherwise, when generating the share, the value of the same position will be repeatedly generated in the loop, causing the stacked share to be unsuccessful in recovering the secret image. We randomly chose any two consecutive secret images \((S_{A}\), \(S_{A}\) + 1) to encrypt each pixel. Since when \(A\) = \(N\)-\(1\), the last secret image, the next must be the first secret image, 0. The formula for the variables will be different in this case than in the other cases, so Step 5 must be separately presented. The schematic diagram of Algorithm 1 is shown in Figure 3.  
In Step 1 of Algorithm 1, we first select a random secret image \(S_{A}\) from \(N\) secret images, and Step 2 select a fresh pixel \(G_{1}(i,j)\). Step 3 generates two pixels by the Function \(f_{\text{XRG}}\). The first pixel \(G_{1}(i,j)\) is at the same position as \(S_{A}(i,j)\). The second pixel \(G_{2}(i+A\times(w/p),j)\) is shifted by \(A\times(w/p)\) pixels for \(S_{A}(i,j)\). The next encryption process will be divided into two parts, depending on whether the selected secret image \(S_{A}\) is the last secret image or not. If \(S_{A}\) is the last secret image \((S_{A}=S_{N-1})\), the secret \(S_{A+1}\) encrypted with \(S_{A}\) will be out of range, so we set it to be \(S_{0}\). In this case, the calculation will be different from the normal case. If the selected secret image \(S_{A}\) is not the last one (\(S_{A}=\{S_{0}\), \(S_{1}\), \(S_{2}\),..., \(S_{N-2}\}\)), go to Step 4. The pixel \(G_{2}((i+A^{\prime}\times w/p)\bmod w,j)\) is generated by the Function \(f_{\text{XORG}}\) based on another secret image \(S_{A+1}\) of the same group with the share \(G_{1}(i,j)\). Then, the pixel  
Figure 3: The schematic diagram of Algorithm 1 when \(A\) = 0. \(A^{\prime}\times w/p\)) mod \(w,j)\) is used with the known secret image pixel \(S_{A}((i+(k+1)\times w/p)\) mod \(w,j)\) to generate pixel \(G_{1}((i+(k+1)\times w/p)\) mod \(w,j)\), and the process is repeated \(p\) times.