## 5 Hardware Implementation Analysis
### Implementation Results and Analysis of the Key-Extraction Process  
We compare secret key extraction performance under two scenarios: when the RIS is activated with the optimal configuration (\(H_{opt}\)) and when the RIS is turned off. The performance evaluation is based on the SBGR metric from (7) and the BMR metric from (8), at various SNR values and \(r=\{1,2,3\}\). As presented in Figure 7a-c, the results indicate that the SBGR improves when the RIS is activated. For instance, at an SNR of 0 dB, the SBGR increases from approximately 1.62 bits/sample when the RIS is off to approximately 1.75 bits/sample when the RIS is activated (see Figure 7b). Conversely, the BMR decreases when the RIS is activated as compared to when it is kept off. For instance, at an SNR of 0 dB, the BMR drops from approximately 0.38 bits/sample when the RIS is off to approximately 0.25 bits/sample when the RIS is activated (see Figure 7e). These results demonstrate the efficacy of the RIS in enhancing secret key-extraction performance. The quantization order, \(r\), can be optimized based on the estimated average SNR at the side of Bob, \(\overline{\text{SNR}}_{H_{opt}}^{Bob}\), corresponding to the optimal configuration \(H_{opt}\), where \(\overline{\text{SNR}}_{H_{opt}}^{Bob}\in\overline{\text{SNR}}^{Bob}\) in step (6) from Algorithm 1. The optimization range for an acceptable BMR \(\leq\) 0.1 bits/sample is presented in Table 2 for scenarios where the RIS is both ON and OFF. It can be inferred that the RIS is more effective in improving the system performance in scenarios with lower SNR values than in higher SNR scenarios. This suggests that the impact of the RIS on the SNR may be limited when the SNR is already high, and other factors, such as fading and shadowing, may have a more dominant impact on the system performance. For the terminals to agree on \(r=2\), the estimated average SNR should be within the range of 5 dB \(\leq\overline{\text{SNR}}_{H_{opt}}^{Bob}<\) 12 dB when the RIS is OFF, and 3 dB \(\leq\overline{\text{SNR}}_{H_{opt}}^{Bob}<\) 12 dB when the RIS is ON. When the estimated average SNR is below the specified range, both terminals can agree on \(r=1\) if \(\overline{\text{SNR}}_{H_{opt}}^{Bob}<\) 5 dB when the RIS is OFF, and \(\overline{\text{SNR}}_{H_{opt}}^{Bob}<\) 3 dB when the RIS is ON. \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Quantization Order**} & \multicolumn{2}{c}{**RIS Status (ON/OFF)**} \\ \cline{2-3}  & **RIS-OFF** & **RIS-ON** \\ \hline \(r=3\) & SNR \(\geq\) 12 dB & SNR \(\geq\) 12 dB \\ \hline \(r=2\) & 5 dB \(\leq\) SNR \(<\) 12 dB & 3 dB \(\leq\) SNR \(<\) 12 dB \\ \hline \(r=1\) & SNR \(\leq\) 5 dB & SNR \(\leq\) 3 dB \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The optimized SNRs for \(r=\{1,2,3\}\), with/without the RIS, and the BMR \(\leq\) 0.1 bits/sample. Figure 6: The power/subcarrier for \(N=256\) at the side of [PERSON] and [PERSON], with/without the RIS. Furthermore, the extracted bit streams are rigorously evaluated for statistical defects through the application of the well-established randomness test suite developed by the National Institute of Standards and Technology (NIST) [28]. The results of each test are presented in the form of a p-value for extracted keys with a length of 256 bits, as depicted in Table 3. These values are then compared to the predetermined significance level (0.01) to assess the degree of randomness of the extracted bit streams. It can be observed that the extracted keys exhibit satisfactory randomness properties, as their chaotic characteristics are predominantly determined by the random large integer parameters \(n_{i}\) and \(m_{i}\) of chaotic mapping operation in (1), selected by the individual users.