## 4 An Anti-Eavesdropper Scheme for the Multiple-Channel Communications of Cognitive Radio Users  
In this section, we present an anti-eavesdropper scheme based on multiple games for a cognitive radio network. The flowchart of the proposed scheme is shown in Figure 3. The first game determines pre-selected channel \(a_{m}^{pre}\) for the SU by solving the problem in Equation (18). The SU will perform spectrum sensing on the pre-selected channel \(a_{m}^{pre}\) to collect information about the status of the PU on the channel. According to the sensing results, the belief of the system about the pre-selected channel will be estimated as follows.  
If the sensing result is state \(A\) for the PU signal (i.e., the channel is free), then \(P_{0}^{a_{m}^{pre}}\) is given as:  
\[P_{0}^{a_{m}^{pre}}=\frac{P_{0}^{a_{m}^{pre}}\left(1-p_{f}\left(a_{m}^{pre} \right)\right)}{P_{0}^{a_{m}^{pre}}\left(1-p_{f}\left(a_{m}^{pre}\right)\right) +\left(1-P_{0}^{a_{m}^{pre}}\right)\left(1-p_{d}\left(a_{m}^{pre}\right)\right)}. \tag{19}\]  
If the sensing result is state \(P\) for the PU signal (i.e., the channel is busy), then \(P_{0}^{a_{m}^{pre}}\) is given as:  
\[P_{0}^{a_{m}^{pre}}=\frac{P_{0}^{a_{m}^{pre}}p_{f}\left(a_{m}^{pre}\right)}{P_{ 0}^{a_{m}^{pre}}p_{f}\left(a_{m}^{pre}\right)+\left(1-P_{0}^{a_{m}^{pre}}\right) p_{d}\left(a_{m}^{pre}\right)}. \tag{20}\]  
The estimated belief of the system in Equation (19) or Equation (20) will be used to determine the updated state of the system, \(\mathcal{S}^{u}\), which is defined as in Equation (10). According to the updated state \(\mathcal{S}^{u}\), the payoffs for the players in the system will be updated by using Equations (12) and (14). The updated payoffs will be used as input for the second game where the problem in Equation (18) (with the updated payoffs) will be solved to determine optimal action \(a_{m}^{*}\) for the SU.  
Optimal action \(a_{m}^{*}\) is the output of the multiple-game algorithm that provides the user \(m\) with the best channel in order to defend against an attack from an eavesdropper and to maximize its secrecy rate.  
The SU will access the selected channel \(a_{m}^{*}\) to achieve its reward. According to the observation on the status of the channel \(a_{m}^{*}\), the state of the system will be updated for utilization in the next time slot.  
In addition, the parameters of state \(\mathcal{S}\), the belief of the system, \(P_{0}^{k}\), and the access strategy of SU \(i\), \(\mathcal{P}_{i}^{k}\), will be updated. If communication over channel \(a_{m}^{*}\) is successful, this means the channel is free, and belief \(P_{0}^{a_{m}^{*}}\) will be updated as follows:  
\[P_{0}^{a_{m}^{*}}=P_{AA}^{a_{m}^{*}}. \tag{21}\]  
Otherwise, if communications fails, this means the channel is busy (i.e., the channel was accessed by the PU), and the belief will be updated as:  
\[P_{0}^{a_{m}^{*}}=P_{PA}^{a_{m}^{*}}. \tag{22}\]  
On the other hand, the strategies of the players who assessed the channel \(a_{m}^{*}\) are changed. Then, the strategy will be updated as:  
\[\mathcal{P}_{m}^{a_{m}^{*}}=\frac{D-1}{D}\mathcal{P}_{m}^{a_{m}^{*}}+\frac{1} {D} \tag{23}\]  
Figure 3: Flowchart of the proposed scheme.  
\[\mathcal{P}_{m}^{-a_{m}^{*}}=\frac{D-1}{D}\mathcal{P}_{m}^{-a_{m}^{*}} \tag{24}\]  
where \(\mathcal{P}_{m}^{a_{m}^{*}}\) and \(\mathcal{P}_{m}^{-a_{m}^{*}}\) are the strategies of the SU in channel \(a_{m}^{*}\) and of the SUs in channels other than channel \(a_{m}^{*}\), respectively, and \(D\) is the window time used to adapt the dynamics of the SUs in the network.  
The updated \(P_{0}^{a_{m}^{*}}\), \(P_{m}^{a_{m}^{*}}\) and \(\mathcal{P}_{m}^{-a_{m}^{*}}\) will be used to update state \(\mathcal{S}\) of the game in Equation (10) for use in the next time slot.  
Finally, the proposed anti-eavesdropper scheme is summarized in Algorithm 2.  
**Algorithm 2** An anti-eavesdropper scheme based on multiple games for SUs.