# Hiding Stealth Optical CDMA Signals in Public BPSK Channels for Optical Wireless Communication
## The Theories and Principles Background of the Proposed Stealth Communication Approach
### Spectral-Polarization Coding Using Walsh-Hadamard Codes  
In spectral amplitude coding Spectral-amplitude coding (SAC)-OCDMA systems, a specific signature address code is assigned to each user to code the amplitude of the source spectrum. Walsh-Hadamard codes are quasi-orthogonal codes used in SAC-OCDMA systems [24; 25] and are obtained by selecting the row of the Walsh-Hadamard matrix comprising elements {1,0}. Each row except the first row contains \(N/2\) zeros and \(N/2\) ones, where \(N\) is the length of the codeword. An \(N\times N\) Walsh-Hadamard matrix can be generated using the recurrence relation, which is given by  
\[H_{N}=\left[\begin{array}{cc}H_{N/2}&\frac{H_{N/2}}{H_{N/2}}\\ H_{N/2}&\overline{H_{N/2}}\end{array}\right], \tag{4}\]  
In the above Walsh-Hadamard matrix, the lower right matrix element \(\overline{H}_{N/2}\) defines a conjugate of the matrix element \(H_{N/2}\). It is clear that the autocorrelation value is \(N/2\) and the cross-correlation value between different rows is \(N/4\). Let us introduce the Walsh-Hadamard code correlation properties as follows:  
\[R_{cc}(k,l)=\sum_{i=1}^{N}c_{k}(i)c_{l}(i)=\left\{\begin{array}{c}N/2,k=l\\ N/4,k\
eq l\end{array}\right., \tag{5}\]  
and  
\[R_{c\overline{c}}(k,l)=\sum_{i=1}^{N}c_{k}(i)\overline{c}_{l}(i)=\left\{ \begin{array}{c}0\quad,k=l\\ N/4,k\
eq l\end{array}\right., \tag{6}\]  
Figure 1: Broadening of light along a single-mode fiber.  
where \(C_{k}\) is the code sequence in the \(k\)th row of the Walsh-Hadamard matrix. According to the property \(R_{CC}(k,l)=R_{C\overline{C}}(k,l)\) for \(k\
eq l\), a receiver is designed to perform correlation subtraction expressed as \(R_{CC}(k,l)-R_{C\overline{C}}(k,l)\):  
\[Z=R_{CC}(k,l)-R_{C\overline{C}}(k,l)=\left\{\begin{array}{cc}N/2\,\ k=1\\ 0\ \ \,\ k\
eq 1\end{array}\right., \tag{7}\]  
This equation shows that the influence from other users will be rejected.  
In the SPC scheme, the source spectrum is encoded by orthogonal polarizations according to the specific signature address code. We employed a Walsh-Hadamard code to allocate a vertically or horizontally linear state of polarization (SOP) to each specified wavelength. The specific code sequence for the SPC-OCDMA system comprises \(C_{k}(\text{H})\) and \(\overline{C_{k}}(\text{V})\), where H and V denote the vertical and horizontal polarization, respectively.  
As shown in Figure 2, using the wavelength cyclic-shifted characteristic property of AWG routers represented in Equation (8), we can obtain C (H) = (1, 1, 0, 0, 1, 1, 0, 0) and \(\overline{C}(\text{V})\) = (0, 0, 1, 1, 0, 0, 1, 1) to form the SPC code of encoder #3. C (H) and \(\overline{C}(\text{V})\) correspond to code patterns (\(\lambda_{\text{ 1H}}\), \(\lambda_{\text{ 2H}}\), 0, 0, \(\lambda_{\text{ 5H}}\), \(\lambda_{\text{ 6H}}\), 0, 0) and (0, 0, \(\lambda_{\text{ 3V}}\), \(\lambda_{\text{ 4V}}\), 0, 0, \(\lambda_{\text{ 7V}}\), \(\lambda_{\text{ 8V}}\)), respectively. Therefore, the wavelength-coding patterns of the SPC code are (\(\lambda_{\text{ 1H}}\), \(\lambda_{\text{ 2H}}\), \(\lambda_{\text{ 3V}}\), \(\lambda_{\text{ 4V}}\), \(\lambda_{\text{ 5H}}\), \(\lambda_{\text{ 6H}}\), \(\lambda_{\text{ 7V}}\), \(\lambda_{\text{ 8V}}\)) when a data bit 1 is transmitted and (0, 0, 0, 0, 0, 0, 0) when a data bit 0 is transmitted. The subscripts of \(\lambda_{ij}\) denote the \(i\)th wavelength encoded and the SOP:  
\[\text{(\#input port+\#output port-1) mod }N=\text{\#wavelength}, \tag{8}\]