## 4 RIS-Assisted Secret Key Extraction Method
### Channel Modeling  
The scenario depicted in Figure 3 involves the concurrent processes of communication establishment between [PERSON] and [PERSON], and [PERSON]'s deliberate disruption of network integrity through the inundation of the network with excessive communication requests. In this scenario, the RSU can manage the RIS and optimize its configuration to reinforce the signal in the direction of the intended recipient \"[PERSON]\", while simultaneously mitigating the strength of the signals received from the adversary \"[PERSON]\". Hence, the signals received by [PERSON] from both [PERSON] and [PERSON] can be theoretically formulated as follows:  
\[\begin{split} y_{A}|[PERSON]&=(h_{BA}+h_{BIA})x+N_{A} \\ &=\Bigg{(}h_{BA}+\sum_{i=1}^{N}h^{i}_{BIA}\beta_{i}\Psi_{i} \Bigg{)}x+N_{A}\\ y_{A}|[PERSON]&=(h_{EA}+h_{EIA})x+N_{A}\\ &=\Bigg{(}h_{EA}+\sum_{i=1}^{N}h^{i}_{EIA}\beta_{i}\Psi_{i} \Bigg{)}x+N_{A},\end{split} \tag{13}\]  
where \(N_{A}\) is the complex additive Gaussian noise \(\mathcal{CN}\big{(}0,\sigma_{n}^{2}\big{)}\), \(\{h_{BA},h_{EA}\}\) are the channel responses in the complex form of the direct link from \((\text{[PERSON]}\rightarrow\text{[PERSON]})\) and \((\text{[PERSON]}\rightarrow\text{Alice})\), respectively, and \(\{h_{BIA},h_{EIA}\}\) are the superposition of the \(N\) channel multipath components of the RIS's elements of the indirect link from \((\text{[PERSON]}\rightarrow\text{RIS}\rightarrow\text{[PERSON]})\) and \((\text{[PERSON]}\rightarrow\text{RIS}\rightarrow\text{[PERSON]})\), respectively. Additionally, the configuration of the RIS is represented by the variable \(H=\left[\beta_{1}\Psi_{1},\beta_{2}\Psi_{2},\ldots,\beta_{N}\Psi_{N}\right]^{T}\), where \(\{\beta_{i},\Psi_{i}\}\) defines the state of each RIS element. An example of a 1-bit RIS can be described as follows: the phase shift applied by each unit cell, denoted by \(\Psi_{i}\), is equal to \(\Pi\), and the reflection coefficient, represented by \(\beta_{i}\), is a binary variable that can take on values of either \(0\) or \(1\).  
The use of the RIS helps increase the secret key capacity \(I\), which refers to the maximum amount of information that can be securely extracted from the physical layer of a communication system and used as a secret key. By properly designing and controlling the phase shifts applied by the RIS, the RIS can counter the effects of fading and interference in the channel, which can also result in higher secret key capacities. Therefore, the RIS can be seen as a valuable tool for improving the secret key capacity \(I\) in the presence of an eavesdropper and ensuring secure communication. The work in [16] provides a theoretical formulation for the secret key capacity denoted by:  
\[I=\text{log}_{2}\left(1+\frac{\left(\sigma_{h_{BA}}^{2}+\sum_{i=1}^{N}\beta_{i }^{2}\sigma_{h_{BIA}}^{2}\right)^{2}/\sigma_{n}^{4}}{1+2\bigg{(}\sigma_{h_{BA}} ^{2}+\sum_{i=1}^{N}\beta_{i}^{2}\sigma_{h_{BIA}}^{2}\bigg{)}/\sigma_{n}^{2}} \right). \tag{14}\]  
The RIS can adjust signal directionality, consequently reducing the signal strength from [PERSON]'s direction and enhancing the signal coming from [PERSON]. This can be achieved by adjusting the phase shifts applied by each unit cell of the RIS so that the reflection coefficients of the unit cells constructively interfere in certain directions and destructively interfere in others. Therefore, the goal is to optimize the RIS configuration \(H\) to maximize the secret key capacity \(I\) in (14) while concurrently reducing any interference from [PERSON].