## 2 System Model and Problem Statement
### Secure Transmission Based on Adaptive Coding
#### 3.3.1 Adaptive Coding Based on the Equivalent Channel  
We define the channel between adaptive coding and decoding as the coding channel, as indicated in Figure 3. To facilitate analysis, an equivalent channel is set up to calculate the BER of the coding channel in step 1 of Algorithm 1. We will introduce the model in detail in the following. As shown in Figure 5, the coding channel is composed of the encryption channel, transmission channel, and decryption channel, where \(K_{A}\) and \(K_{B}\) represent keys for performing encryption and decryption, respectively. The keys \(K_{A}\) and \(K_{B}\) are not exactly identical. Note that a pair of symmetrical virtual encryption and decryption modules are added at both ends of the coding channel in order to build the equivalent channel. The virtual XOR encryption and decryption use symmetric keys \(K_{B}\). We assume that the input and output alphabets of virtual encryption and decryption modules are \(S_{A}\) and \(S_{B}\), respectively, and that source bits are binary encoded. Therefore, the coding channel is a binary discrete memoryless channel (DMC) with a probability space of \([X_{A},p(x_{B}|x_{A}),X_{B}]\), where \(p(x_{B}|x_{A})\) denotes the transfer probability of the coding channel. Here, \(x_{A}\) and \(x_{B}\) are symbols taken from \(X_{A}\) and \(X_{B}\), respectively, where \(x_{A},x_{B}\in\{0,1\}\). The transmission channel formed by the modulator, wireless channel, and demodulator is also a DMC, which can be expressed as \([E_{A},p(e_{B}|e_{A}),E_{B}]\), where \(p(e_{B}|e_{A})\) denotes the transfer probability of the transmission channel, while \(e_{A}\in E_{A}\) denote ciphertexts which are encrypted by keys \(K_{A}\) and \(e_{B}\in E_{B}\) denote ciphertexts recovered by the demodulator. The equivalent channel consists of an encryption channel \([S_{A},p(e_{A}|s_{A}),E_{A}]\) and a transmission channel \([E_{A},p(e_{B}|e_{A}),E_{B}]\) cascade. Note that there is no new noise or interference added at the virtual XOR encryption and decryption modules. Thus, the transfer probability of the coding channel does not change after adding the virtual modules, which can be shown as \(p(s_{B}|s_{A})=p(x_{B}|x_{A})\)  
Figure 5: Equivalent channel model. where \(s_{A}\in S_{A}\), \(s_{B}\in S_{B}\). In addition, according to the principles of the binary field, we have \(S_{B}=E_{B}\). This means that \(p(s_{B}|s_{A})=p(e_{B}|s_{A})\). Therefore, we can obtain  
\[p(s_{B}|s_{A})=p(e_{B}|s_{A})=p(x_{B}|x_{A}). \tag{3}\]  
In other words, we can derive the BER of the coding channel from the equivalent channel, which can be computed as  
\[ \begin{split} P_{et}=p(e_{B}|s_{A})&\stackrel{{ (a)}}{{=}}\sum_{e_{A}\in E_{A}}p(e_{B}|e_{A}s_{A})p(e_{A}|s_{A})\\ &\stackrel{{(b)}}{{\leq}}\sum_{e_{A}\in E_{A}}p(e_{ B}|e_{A})p(e_{A}|s_{A})\\ &=P_{e}+P_{AB}^{\text{key}}-2P_{e}P_{AB}^{\text{key}}\end{split}  \tag{4}\]  
where \((a)\) is given by the total probability formula and \((b)\) represents \(p(e_{B}|e_{A}s_{A})\leq p(e_{B}|e_{A})\), since the encryption channel and the transmission channel are correlated such that \(p(e_{B}|e_{A}s_{A})\)\(=p(e_{B}|e_{A})\) holds when \(E_{B}\) only depends on \(E_{A}\) and is independent of \(S_{A}\). In addition, \(P_{AB}^{\text{key}}\) and \(P_{e}\) represent the key disagreement rate (KDR) and the transmission bit error rate (TBER), respectively. Therefore, the upper bound of the BER of the coding channel is \(P_{et}^{UB}=P_{e}+P_{AB}^{\text{key}}-2P_{e}P_{AB}^{\text{key}}\). Next, to calculate the BER of the coding channel, we solve the KDR and the TBER according to the SNR. Taking the real part of the channel estimates as an example, the 1-bit quantized KDR of \(\hat{h}_{BA}\) and \(\hat{h}_{AB}\) can be derived as  
\[