Secret Key Generation Assisted by Intelligent Reflecting Surface with Discrete Phase Shift in Static Environment

— Physical layer secret key generation is a promising candidate to achieve one-time-pad encryption approach for wireless communication system. The main issue of this method is the insufficient secret key rate. Especially in a static environment, the entropy of the channel complex coefficient is limited due to the lack of channel time-variation. To solve the problem, this paper proposes a novel secret key generation scheme assisted by intelligent reflecting surface (IRS) with discrete phase. We construct a dynamic time-varying channel by switching the phase of the reflection elements rapidly and randomly, and use channel estimation samples to update the secret key. Based on the common IRS channel model, we derive the expression of secret key rate. Monte Carlo simulation and numerical results show that the scheme can update secret key even if the channel coefficient is constant, and the secret key rate is higher than schemes based on artificial random signal. In addition, we comprehensively analyze the influence of various factors, such as the number of reflection elements and the IRS switching frequency on the secret key rate.

at the receiver are coherently added, thereby improving the received signal-to-noise ratio (SNR) [12]. However, the existing IRS-assisted communication methods only increases the received power, but does not fundamentally change the fact of static channels, so they have limited contribution to SKG. Different from the traditional usage, this paper focuses on developing a novel IRS utilization method for SKG, that is, using IRS to construct a dynamic channel to overcome the problem of low secret key rate in static environment. The phase shift of the IRS elements switch rapidly and randomly, and legitimate nodes send pilots to obtain fast-changing CSI. We designed the SKG process for two different scenarios, and then derive the expressions of the exact secret key rate, and the asymptotic secret key rate when the number of IRS elements tends to infinity. Finally, we perform Monte Carlo simulation to verify the derivation. The results show that our scheme is superior to the comparison schemes in [8] and [9] based on artificial random signal, and the optimal switching time should be adjusted according to pilot power.
The rest of this paper is organized as follows. Section II introduces the system model and the IRS configuration of the proposed scheme. Section III evaluates the secret key rate. Section IV presents simulation and numerical results. Section V concludes the paper

A. Channel Model
As shown in Fig. 1, we consider a common SKG channel model in static environment, where Alice, Bob and Carlo are legal nodes. The main difference of this channel model is that there is an IRS composed of N reflection elements, and the reflective elements of the IRS can be programmed by the IRS controller Carol through a wired control link. There is also a passive eavesdropper named Eve, who eavesdrops on a wiretap channel independent of the legitimate channel. They all equipped with a single antenna, and the wireless channels are modeled as quasi-static flat block fading channels [4], which means channel coefficients are independent and identically distributed (i.i.d.) circularly symmetric complex Gaussian random variables with zero mean, and they remain constant over each period of the coherence time c T . For ease of analysis, the channel between U and V is denoted as UV  To accommodate different types of communication, we consider two SKG modes. Fig. 1(a) and Fig. 1 h ΘG , is equally divided into N reflection channels. Since the path loss is space-related and is easy to be predicted by eavesdroppers, it is ignored as many SKG studies [2] [13].
Note that different from the traditional SKG model, we deploy Carlo to change Θ by switching the phase of the IRS elements quickly and randomly, and increase the entropy of the combined channel, i.e., UV h .

B. IRS Configuration
We consider a common discrete phase shift IRS model with 1  = , and the phase shift has K values to be adjusted, which can be obtained by uniformly quantifying the interval [0, 2 )  . Then the sets of discrete reflection phase shifts at each element of IRS can be expressed as where 1, 2, , kK = . When K tends to infinity, it can be approximately considered that the value of the phase shift is continuous. According to [14], the switching frequency of the discrete phase can be performed within 1 microsecond at the fastest, which is conducive to the construction of dynamic channel with low cost.

III. SECRET KEY GENERATION SCHEMES
In this section, we design two IRS-assisted SKG schemes for the communication scenarios shown in Fig. 1. Scheme 1 is an improvement of the classic point-to-point SKG in Fig. 1(a) based on the common IRS channel model. Scheme 2 is a novel SKG scheme for the communication process dominated by the IRS controller Carlo in Fig. 1(b).

A. Scheme 1
In scheme 1, the legitimate communication parties Alice and Bob send pilot signals to estimate the channel coefficients and cooperatively generate secret keys. As the controller of the IRS, Carlo does not participate in this process, only change the phase of the IRS randomly to construct a dynamic channel. The specific step is as follows: (i) Alice and Bob send pilots to each other in the same coherent time. Meanwhile, Carlo randomly switches the IRS phase and ensures that the interval of switching is less than the interval of each round of pilot transmission, i.e., the phase of the IRS is different during each channel estimation. (ii) Alice and Bob estimate the wireless channel coefficients of the combined channel based on pilots. Then, due to (1) and the channel reciprocity, the estimation results of Alice and Bob can be expressed as , , ,

B. Scheme 2
In scheme 2, the legitimate communication parties Alice and Carlo generate secret keys cooperatively. The specific step is as follows: (i) By applying the pilots sent by Alice and the channel estimation methods proposed in [12], Carol estimates all the CSI exactly in advance. (ii) In the same coherent time, Carlo sends pilots to Alice, and randomly changes the phase of the IRS elements in the same way as scheme 1. (iii) Carlo calculates Alice's channel coefficients based on the CSI and the phase shift of IRS, while Alice estimates channel coefficients based on the pilots. Then, we have , , ,  .Then, implement quantization, information reconciliation and privacy amplification to generate the secret key.

IV. SECRET KEY RATE ANALYSIS
To evaluate the performance, we study both the exact secret key rate and the approximate values in the following. Due to the eavesdropper channels are independent from the legitimate channels (verified in section V), and according to the result of [4], the instantaneous secret key rate for scheme 1 and 2 can be respectively expressed as

A. Exact Secret Key Rate
For the convenience of analysis, we decouple the complex variable into the i.i.d. real and imaginary parts in the same way as [4] and [13].
where A , B and C are defined as (6) can be rewritten as where () f  is the probability density function (PDF), ( , ) f  is the joint PDF, and (a) holds due to the real and imaginary parts of channel gain are i.i.d. random variables. For a given i   , the probability distribution of R AB h is given by where (a) holds due to ˆR is a Markov chain. Then substituting (10) in (8) Then substituting (11) and (12) in (6) concludes the proof of Since the closed-form expression in (6) are difficult to be derived directly, we can obtain the value of (6) by numerical integration.

B. Asymptotic Secret Key Rate
We consider two extreme conditions to evaluate the asymptotic solutions of the secret key rate of the proposed scheme. where (a) and (e) hold due to (5)

2) Massive IRS Elements
For the IRS with finite number of the discrete phase shift, i.e., K , we can deploy more IRS elements to obtain larger key rate. In this subsection, we prove that the 1  In addition, from (5), (13) and (15), it can be observed that reducing s T can obtain more channel estimation samples in a short time and generate keys faster. However, transmitting pilot in such a short time amplifies the error of the channel estimation, thereby reducing the number of key bits that can be extracted for each estimation sample. Therefore, the selection of s T is crucial for the increasing of 1 s R and 2 s R . In general, it is difficult to obtain the closed form expressions of optimal s T . We will use a one-dimensional search to find the optimal value in Section V.

V. SIMULATION AND NUMERICAL RESULTS
In this section, we present numerical results and Monte Carlo simulation results to evaluate the performance of the proposed IRS assisted SKG scheme. To ensure the accuracy of the results, we perform Monte Carlo simulation method to generate 10000 random channel gains at different coherent time. For ease of analysis, we assume that =2 K .
First, we plot 1000 channel estimation samples in Fig. 2. From Fig. 2(a1) and Fig. 2(a2), one can see that when N is small, the channel coefficients approximately follow complex Gaussian Mixture Distribution, and the real part of the IRS, i.e. R AB h has N K different values. Fig. 2(b3) and Fig. 2(a3) are normal probability plots, which show that when 20 N = , the real parts of the channel coefficient approximately follow the Gaussian distribution, which shows that the approximate secret key rate is also valid for most general IRS channel models. In addition, the channel coefficients of Alice and Bob are very similar, but are quite different from Eve's, which verifies that the eavesdropping channel and the legal channel are independent.  (6), and calculate the theoretical value according to Proposition 1 and Corollary 1. Unless otherwise noted, the solid lines in the following figures represent the theoretical value, and the dashed lines represent the simulated value. Fig. 3    In Fig.4 shows the condition mutual information of scheme 1 when Eve performs the same method, where ˆE h is obtained in the same way as ˆA h and ˆB h . As comparisons, Zhang's scheme [8] and Aldaghri's scheme [9] are considered, both of which are designed for static environment. From Fig.  4, one can see that the secret key rate of our scheme is restricted by  , which shows that it has better performance when the reflected channel is the main component of the combined channel. In addition, It can be observed that the conditional mutual information of proposed scheme in Fig.4 is very close to that of Fig. 3, which indicates that Eve hardly knows ˆA h and ˆB h by passive eavesdropping. This is because the legitimate channel is independent from the eavesdropping channel, so almost no information about IRS reflection channel is leaked to Eve. However, schemes in [8] and [9] only induce the randomness of the signal artificially, without increasing the uncertainty of the channel. From the analysis in [10], the information of random signal may partially leak to Eve when channels are static. Therefore, the proposed scheme has advantages over the other two schemes in terms of secret key rate, especially in high SNR.

VI. CONCLUSION
In this paper we proposed a novel secret key generation scheme based on the intelligent reflecting surface with discrete phase shift. The phase of reflection elements switches randomly and rapidly to change the CSI of combined channel in static environment. At the same time, the legitimate communication parties estimate the time-varying channel coefficients for SKG. Furthermore, we derive the expressions of secret key rate, and analyze them versus the number of reflection element, the switching frequency of phase shift and transmission power. Simulation and numerical results show that legitimate communication parties can update the secret key in static environment. Moreover, when  is large, the secret key rate is higher than [8] and [9] due to the independence of the CSI of the legitimate node and the eavesdropper. In addition, the results show that the key rate can be increased by increasing N , or reducing s T while increasing the power.