Abstract

The wireless key generation using wireless channel reciprocity has attracted considerable attention in the past two decades. However, there are many challenges for the key generation in quasistatic wireless environments. The key generation rate (KGR) in a quasistatic environment is low, and the randomness of the key is insufficient, which is difficult to meet the secure communication requirements. To tackle these issues, a random permutation and perturbation-based wireless key generation (RPP-WKG) scheme is proposed to improve the KGR and randomness in quasistatic environments. Unlike existing key generation schemes, the RPP-WKG scheme allows the two legitimate users to generate the same secret key based on their random permuted channel measurements. Besides, the perturbed key sequence will be obtained by combining the initial key generated after quantization and the permutation order sequence through the XOR operation. Simulation results show that the proposed RPP-WKG scheme can generate secret keys with a high generation rate, sufficient randomness, a low mismatch rate, and a low correlation coefficient in quasistatic environments.

1. Introduction

With the rapid development of wireless communication techniques and the wide use of the Internet of Things (IoT) devices, establishing an encrypted and secure communication link between two IoT devices has become an urgent need [15]. The traditional encryption methods widely used at present are symmetric or asymmetric cryptographic algorithms. Symmetric cryptographic algorithms usually rely on preshared secret keys, which are not suitable for distributed IoT devices [6]. Asymmetric cryptography requires complex mathematical algorithms. However, due to the limited computing power of IoT devices and the difficulty in establishing a public key infrastructure between devices, these asymmetric cryptographic algorithms are not suitable for secure communication between lightweight IoT devices. In recent years, wireless key generation schemes based on physical layer channel characteristics have received extensive attention due to their low computational complexity and high security. Traditional cryptographic mechanisms can be supplemented and enhanced by taking advantage of the inherent physical properties of wireless channels [7]. Wireless key generation based on physical layer channel reciprocity is a promising solution for secure communication between IoT devices [810].

Generally, a wireless key generation scheme contains four steps: channel sampling, quantization, information reconciliation, and privacy amplification [11]. Among the four steps, quantization converts channel measurements into binary bit sequences, which is the core function of the wireless key generation scheme. Various channel characteristics can be used for quantization, such as received signal strength (RSS), channel state information (CSI), time delay amplitude, phase, and angle-of-arrive (AoA) [1215].

However, unsynchronized channel sampling in time-division duplex systems and environmental noise will impair channel reciprocity in the real system. The nonreciprocity in the channel measurements can be further amplified by ambient noise, adversely causing the inconsistent quantization result between two users. To mitigate the nonreciprocity of a wireless channel, many researchers have proposed solutions. For example, Li et al. [16] designed a mean-value quantization scheme for RSS to improve the key generation rate (KGR). Zhao et al. [17] proposed performing group quantization and adaptive quantization on the collected RSS measurements. Margelis et al. [18] used discrete cosine transform (DCT) on channel observations to reduce the mismatches caused by quantization. Liu et al. [19] designed a bipartite graph matching-based wireless key generation method to avoid quantization.

In some IoT application scenarios, such as environmental monitoring and smart home, the IoT devices are fixed and the surrounding wireless environment changes very slowly [20, 21]. In these scenarios, wireless channels between the communication users are quasistatic. The KGR based on the characteristics of this quasistatic wireless channel is very low, which is difficult to meet the secure communication requirements. The reason for low KGR is due to the long channel coherence time in the quasistatic channel, and the secret keys are generated within the coherence time, so the similarity of the secret keys is high. At the same time, ambient noise will also cause key inconsistency. Therefore, an efficient and robust solution is required to achieve a low key mismatch rate (KMR) in a quasistatic environment. Various schemes have been proposed to overcome the challenges of wireless key generation in quasistatic environments. [22, 23] proposed key generation protocols with the aid of a reconfigurable intelligent surface (RIS) to boost KGR in quasistatic environments. [24] used singular value decomposition techniques to reconstitute the wireless channels to improve the randomness of the wireless channels. In [25], the two legitimate users independently generated local randomness to be used together with the uniqueness of the wireless channel coefficients in order to enable high-rate secret key generation.

To mitigate the effect of channel nonreciprocity, we use principal component analysis- (PCA-) based processing on the sampled channel measurements. Li et al. [26] proposed two realization algorithms of PCA for preprocessing: PCA algorithm with interaction and PCA algorithm without interaction. The corresponding eigenvalues and eigenvectors of the two legitimate users, Alice and Bob, are different due to the deviation. Alice can send her eigenvectors to Bob via a public channel and both of them use it for signal reconstruction, which is named as the PCA algorithm with interaction. Alice and Bob can also calculate their own eigenvectors and eigenvalues and use their eigenvectors for signal reconstruction without any interaction, which is called the PCA algorithm without interaction. Although the PCA algorithm with interaction can obtain a relatively higher key agreement than the PCA algorithm without interaction, information leakage will be caused by the transmission on an insecure public channel. When the eavesdropper, Eve, obtains enough information such as eigenvalue and eigenvector, he/she can find the secret key by a brute-force search. Li et al. [26] assume Eve can only obtain eigenvectors instead of the covariance matrix, resulting in a low information leakage ratio. In this paper, since broadcasting eigenvectors on a public channel still has security risks, we recommend the two legitimate users perform a processing algorithm based on PCA without interaction on their original channel measurements after channel sampling.

In a quasistatic channel, the secret keys extracted from channel measurements not only have a relatively low KGR but also have poor randomness. The use of PCA processing on the CSI matrices of legitimate users can only obtain good feature amplification and deredundancy effects, but the KGR cannot be improved by PCA processing. In order to solve the problems of the low KGR and the poor randomness of the secret keys, we focus on the preprocessing algorithm of channel measurements and propose a random permutation and perturbation-based wireless key generation (RPP-WKG) scheme, which provides high randomness and low correlation for secret keys. Based on the RPP-WKG scheme, we develop a secret key generation method that is aimed at extracting secret keys from channel measurements at a low KMR and high speed. CSI is chosen as the channel measurement in this paper because the existing work has shown that CSI could provide more channel characteristics than RSS does. The main contributions of this paper are summarized as follows: (1)A new and practical RPP-WKG scheme is proposed. Based on the scheme, we can mitigate the impact of the quasistatic channel and generate secret keys with high randomness and low correlation(2)We propose an efficient and secure permutation method, which can help legitimate users perform the same random permutation on their respective CSI to acquire new random sources with high randomness and great fluctuations. In addition, the length of the permutation order can be adjusted by the number of CSI segments. The random sources can be used as the new channel measurements to generate secret keys(3)A minimum weight-based matching method is proposed to reduce KMR in the RPP-WKG scheme. Legitimate users can obtain an agreement on the permutation order of CSI without revealing it. The permutation order will be obtained by finding the correspondence between the users’ CSI, and it can be used as a source of the secret keys(4)We propose a random perturbation generation method based on the permutation order agreed by the two legitimate users. The correlation between the secret keys is reduced by performing an XOR operation on the random perturbation sequence and the initial key, and the randomness and KGR are further improved

1.1. Notation and Outline

Unless otherwise specified, we use the following notations throughout the manuscript: Upper bold-face letters denote matrices and lower bold-face letters denote vectors. Light-face letters denote scalars. Numeral subscripts of matrices and vectors, if needed, represent their sizes. denotes the identity matrix. Matrix superscript denotes conjugate-transpose. The denotes ensemble expectation. The is the straightening operation by row.

The remainder of this paper is organized as follows: In Section 2, the system model and the related formulations are presented. The basic key generation steps are also introduced in this section. In Section 3, we describe the proposed RPP-WKG scheme in detail. The performance results are evaluated extensively in Section 4. In Section 5, we summarize the paper.

2. System Model

2.1. Channel Estimation

Figure 1 illustrates the system model of a wireless key generation system in the smart home: In an orthogonal frequency division multiplexing (OFDM) communication system, Alice and Bob establish secret keys in the time division duplex (TDD). They take advantage of the reciprocity and time variability of wireless channels to generate consistent security keys at both ends and update them continuously. Eve has a potential security threat to the communication between Alice and Bob.

During the channel sampling process, Alice and Bob alternately transmit pilots to each other. Alice sends a channel probing signal at time slot 1, and Bob receives the signal and stores it locally. Bob sends a channel probing signal at time slot 2, and Alice receives the signal and stores it. Meanwhile, Eve eavesdrops on the signals from Alice and Bob in two-time slots and tries to decrypt the message.

In this paper, we use the CSI as the channel measurements. We assume that the difference in measured values caused by delay and hardware fingerprints has been removed by methods such as interpolation transformation and hardware calibration. The matrices and of size are defined as the channel measurement matrices of Alice and Bob after channel sampling, where is the number of subcarriers and is the number of samples. The relationship between and can be expressed as , where represents the observation deviation caused by the measurement noise and the noise remaining in the calibration process. is independent of and considered to follow a complex Gaussian distribution.

2.2. Problem Formulation

According to the principle of channel reciprocity, the channel response of Alice and Bob should be highly correlated in practice. Since the ambient noises are usually considered to follow complex Gaussian distribution, the received channel measurements and should also be highly correlated. Based on the above theories, traditional wireless key generation methods allow Alice and Bob to extract the same secret keys by quantizing each channel measurement in and , respectively. However, and could be easily affected by random ambient noise and nonsimultaneous channel probing, resulting in inconsistent quantization results and mismatched secret keys between two users.

Besides, the wireless environments between two legitimate devices change slowly in the smart home application scenario, which will result in the two adjacent channel samples in a coherence time being very similar. Figure 2 shows the CSI sampled under the quasistatic environments, which is in an OFDM model with 56 subcarriers. The SNR in the scenario is 40 dB, and the sampling interval is 0.5 ms. The -axis and -axis of Figure 2 represent the real and imaginary parts of the CSI parameter. It can be seen that the CSI measured from two adjacent samples are very similar. This will result in the two generated keys being very similar or even identical. Overall, the above challenges demonstrate the need for a new key generation scheme to achieve efficient key generation in a quasistatic environment.

2.3. Basic Steps of Wireless Key Generation

Generally, the generation of secret keys based on channel measurements between two legitimate users includes four steps.

2.3.1. Channel Sampling

To initiate the key generation, Alice and Bob sample the channel through multiple rounds of probe packet exchanges [27, 28], each controlled within a coherence time to ensure channel reciprocity. After each user receives the probe packets, the channel measurements are extracted from the probe packets to construct reciprocal channel matrices and for Alice and Bob, respectively. The channel sampling process is completed after a sufficient number of probe packets are collected.

2.3.2. Quantization

After channel sampling, Alice and Bob need to adopt the same quantization scheme on channel measurements to obtain the initial keys. The quantization process is an analog-to-digital conversion process, which converts the CSI estimated by the legitimate communication parties into a sequence of key bits [29].

2.3.3. Information Reconciliation

Due to the interference, estimation error, and other facts, the initial keys quantized by Alice and Bob may have inconsistent bits. The main purpose of information reconciliation is to correct the inconsistent bits in the secret keys of the two legitimate users without divulging the key information as much as possible [30, 31]. After information reconciliation, inconsistent bits are eliminated and both Alice and Bob will obtain the consistent initial keys.

2.3.4. Privacy Amplification

Eve can eavesdrop on the information about the secret keys during the communication between Alice and Bob. Privacy amplification needs to be performed to eliminate the information eavesdropped on by Eve [3234]. After privacy amplification, Alice and Bob will obtain the final secret keys to encrypt their messages.

3. The Proposed RPP-WKG Scheme

3.1. RPP-Based Key Generation

The basic idea of the RPP-based wireless key generation algorithm is to permute channel measurements randomly and match the sorted channel measurement values between pairs of reciprocal users. Then the two reciprocal users perform the wireless key generation scheme according to the channel measurements after permutation and the agreed permutation order. As shown in Figure 3, Alice and Bob collect their respective channel measurement matrices and of size in the channel sampling stage. Alice and Bob then perform PCA processing without interaction on their respective channel measurement matrices; the channel measurement matrices after PCA processing are and of size and consist of groups of samples. For the accuracy of statistical information, the number of sample groups and dimensions should satisfy .

After PCA processing, Alice applies random permutation to her channel measurement matrix . The channel measurement matrix after permutation is . The permutation order is determined by Alice according to the size of the matrix . After the straightening transformation of , Alice then sends the permutated channel measurements to Bob via a public channel without revealing the permutation order. Once receiving the permutated channel measurements, Bob can infer the permutation order by finding the correspondence between and his own channel measurement matrix through channel reciprocity. Bob then performs the same permutation on and gets the new channel measurement matrix .

Meanwhile, Alice and Bob use their respective reconstructed signal matrices after random permutation and to perform the quantization operation. The permutation order participates in key generation as a source of randomness perturbation. Last, Alice and Bob perform the information reconciliation and privacy amplification on the origin secret keys to further eliminate occasional errors and generate secret keys with high randomness. The details of these components are elaborated as follows.

Some notions and their descriptions used in the following sections are listed in Table 1.

3.2. Sampling and Preprocessing Model

In the channel sampling phase, Alice and Bob each send pilots to each other and estimate CSI. A vector of length for the -th channel estimate can be written as where , and denote Alice and Bob, respectively, follows complex Gaussian distribution, and is independent and identically distributed zero-mean complex Gaussian noise with variance . After channel samplings, Alice and Bob can construct the channel measurement matrix as where and are assumed to be independent and identically distributed, . The subscript is omitted for simplicity, and we define the channel signal-to-noise ratio (SNR) as

After channel sampling, Alice and Bob will get their respective channel measurement matrices and for further preprocessing. The signal preprocessing process is divided into two steps: PCA processing without interaction, random segmentation, and permutation.

3.2.1. PCA Processing without Interaction

Figure 4 shows the process of PCA. In PCA processing without interaction, Alice and Bob calculate the transformation matrices according to the following steps: (1)Alice and Bob perform eigenvalue decomposition of their covariance matrices and , respectively, where are eigenvalue matrices and are eigenvector matrices. and are given by (2)Alice and Bob sort their eigenvalue matrices and eigenvector matrices in descending order of eigenvalues, respectively. The eigenvalue matrices after sorting are , and the eigenvector matrices after sorting are .(3)Alice and Bob select the first eigenvectors of their eigenvector matrices to construct the transformation matrices and , where is the number of eigenvectors agreed upon by Alice and Bob in advance

Alice and Bob transform their channel measurement matrices and by using the transformation matrices; the matrices after signal reconstruction are , , which are given by where and are the reconstructed signal matrices.

3.2.2. Random Segmentation and Permutation

To further increase the complexity and randomness of the collected channel measurements, we perform a random permutation on the channel measurement matrices and . Figure 5 shows the effect of permutation on the CSI measurements. For ease of calculation and matching, Alice and Bob straighten and by row to make them two , dimensional vectors and where is the straightening operation by row.

Alice and Bob segment their vectors and into episodes of the same length, and , where and are the episode with length . Given the segmented channel measurement sequence , Alice comes up with a permutation order and applies permutation to to create a new channel measurement sequence , where is the original index of the episode in . Alice then sends to Bob without revealing the permutation order via the public channel, which potential attackers listen to. Each in can always find the reciprocal in even permutated due to channel reciprocity. Bob can infer the permutation order of by finding the perfect match between the episodes in and with the minimum discrepancy and use as part of the secret key. Bob performs the same permutation on and obtains the new sequence after inferring the . Since the original channel measurement sequence was not made public, the permutation order is a secret between Alice and Bob and is unknown to the potential attackers. Determining the permutation order is also equal to achieving a key agreement between Alice and Bob.

Then, Alice and Bob restore the vectors and to matrices and according to the initial segment length, where and can be seen as being randomly permutated. As the example shown in Figure 6, the channel measurement matrix after random permutation will have lower regularity and more complexity.

3.3. Matching Algorithm

In order to reduce the time cost of inferring the permutation order, we use the minimum weight bipartite graph matching to find the perfect match. Episodes in and are considered as vertices of a weighted undirect graph , and vertices are connected by edges. The edges only exist between the vertices of and in (i.e., no edge connects the vertices within or ). The weight of the edges can be denoted as , where and represents taking the absolute value. A perfect match in consists of a set of vertex-disjoint edges with every vertex of . A perfect match can be always found in to satisfy the reciprocal mapping between the channel measurement matrices of Alice and Bob due to the channel reciprocity. The sum of weights of the match between Alice and Bob can be denoted as , where . The minimum weight matching problem is to find the match with the smallest sum of weights. The minimum weight matching can be transformed into the maximum weight matching problem after converting the weight to , where . We use the Kuhn-Munkres algorithm to solve the maximum weight matching problem. To minimize the summation of its associated weights, the following linear programming with integer constraints relaxation is formulated: where are the feasible label with the value equal to the weight of the perfect match output by the algorithm as follows: where denotes all the edges in . Any feasible prime label in a perfect match has a weight as large as the value of any feasible dual-labeling. If , the edge is tight. A match is optimal if it only uses tight edges when given any dual feasible label.

To find the perfect match, a random feasible dual label is used to find a maximum-cardinality matching that uses tight edges. The process is over if the match is perfect. If not, the dual label is updated and the process continues until an optimal match is found. After the graph matching, Bob infers the permutation order , where .

3.4. Wireless Key Generation Based on Random Perturbation

The wireless key generation process based on permutation and matching is divided into the following three steps: obtaining the initial secret key, generating and splicing the random perturbation sequence, and performing the XOR operation.

In this paper, after the preprocessing, different components of channel measurements have different SNRs, which can be expressed as

represents the SNRs of different components. As the index of components increases, the SNR decreases. To make full use of the high SNR of dominant components, we employ flexible quantization levels in the quantization algorithm to quantify the initial keys.

The first step is to obtain the initial keys. Alice and Bob get their respective initial keys and after the quantization process on their channel measurement matrices and . The length of the initial keys is .

The second step is to generate the random perturbation sequence through the negotiated permutation order . First, convert into a binary bit sequence , and the length of the converted bit sequence is , where is the length of each binary bit sequence converted by in . then needs to be spliced into . Repeatedly splicing the stochastic perturbation sequence until it is equal to the key length , that is, where is a positive integer and .

The last step is to XOR the random perturbation sequence and the initial secret keys. Alice and Bob perform XOR operation between their initial key and the perturbation sequence to get the perturbed key and , which are given by

Compared with the key sequence before random perturbation, the number of secret keys does not increase. However, the method based on random perturbation reduces the correlation between the two adjacent sets of secret keys, so it can effectively increase the KGR.

Then Alice and Bob perform information reconciliation on their perturbed keys and . The main purpose of information reconciliation is to correct the inconsistent bits in the key bit sequences without divulging the key information as much as possible. After information reconciliation, Alice and Bob will agree on an error-free secret key.

4. Performance Evaluation

To evaluate the performance of our proposed scheme, we conduct numerical simulations. We build the simulation model based on a Matlab implementation of the TGn multipath fading channel. The detailed parameters are summarized in Table 2. Alice and Bob are randomly distributed, and the distance between them is greater than or equal to five meters. We focus on the non-line-of-sight (NLOS) scenario. An OFDM model with 56 subcarriers is utilized. We sample 400 independent channel vectors to perform the key generation process.

In this section, we evaluate the performance of the RPP-WKG scheme and compare it with the wireless key generation without processing (named as “Initial”), and with the wireless key generation scheme based on PCA and without random permutation and perturbation (named as “PCA-WKG”). We evaluate the key performance from 4 aspects: the KGR, the KMR, the correlation between the secret keys, and the randomness of the keys.

4.1. Key Generation Rate

The KGR reflects the speed of the wireless key generation. The actual wireless key generation system has high requirements on the KGR. If the KGR is too low, the time cost required for wireless key generation will be too high, which is not suitable for practical applications. In this section, we test the KGR of the RPP-WKG scheme in the case of different SNRs. The test results are shown in Figure 7. As the SNR increases, the KGR gradually increases. The KGR can reach 480 bits/packet when the SNR is 45 dB. We also compare the KGR performance of the RPP-WKG scheme with the PCA scheme without random permutation and perturbation. The comparison results show that the KGR can be further improved by the random permutation and perturbation scheme.

In addition, we compare the performance of our proposed RPP-WKG scheme with the scheme based on RSS permutation. Based on the comparison results shown in Figure 8, our RPP-WKG scheme will achieve a higher KGR by using CSI as the channel measurements than the traditional RSS permutation-based scheme.

4.2. Key Mismatch Rate

The KMR reflects the inconsistency rate of the secret keys quantified, respectively, by Alice and Bob. Due to the influence of ambient noise and other factors, there will be certain errors in the bit sequences quantized by Alice and Bob according to their respective CSI. Figure 9 shows the KMR performance of the initially generated secret keys and the secret keys after the RPP-WKG scheme. As the SNR increases, the KMR gradually decreases. According to the comparison results, the RPP-WKG scheme achieves a lower KMR. Figure 10 shows the KMR performance of secret keys generated by the RPP-WKG scheme under the impact of different episode numbers. As the number of permutation episodes increases, the KMR of the secret keys will increase significantly.

4.3. Correlation between the Secret Keys

The correlation between the secret keys represents the degree of linear correlation between adjacent sets of keys. We use the Pearson correlation coefficient [3537] to calculate the correlation between keys. The Pearson correlation coefficient is defined as where and are the two sets of secret key sequences.

The correlation coefficient between two sets of secret keys is a value between -1 and 1. The stronger the correlation between the two sets of secret keys, the closer the absolute value of the correlation coefficient is to 1. If the correlation coefficient is equal to 0, it indicates that there is no linear correlation between the two sets of secret keys.

In this section, we first calculate the correlation coefficient between the secret keys of the three schemes. We display the calculation results in the form of heat maps. The horizontal and vertical coordinates represent the index number of the keys, and the colour of each dot represents the correlation between the secret keys. The yellower the colour, the higher the correlation between the secret keys. The bluer the colour, the lower the correlation between the secret keys. We test the correlation between the initial secret keys, the secret keys after PCA processing, and the secret keys after random permutation and perturbation. According to the test results, the correlation between initial secret keys is the highest in Figure 11, and the correlation between secret keys after random permutation and perturbation is the lowest. Figure 12 shows that the secret keys quantized by the CSI after PCA processing can obtain a lower correlation than the initial secret keys. Figure 13 shows the advantage of the random permutation and perturbation scheme in the process of key generation. The test results reflect the RPP-WKG scheme has an obvious effect on reducing the correlation between secret keys.

We also calculate how the correlation coefficient changes as the number of episodes increases. As shown in Figure 14, once the CSI is randomly permuted and perturbed, the correlation coefficient between secret keys will drop significantly. As the number of permutation episodes increases, the correlation coefficient between secret keys will slowly decrease. When the number of permutation episodes is greater than 10, a good correlation reduction effect can be obtained. Considering that as the number of permutation episodes increases, the time cost to find the correct permutation order using the matching algorithm will also increase, and the number of permutation episodes should not be set too large.

4.4. Randomness of Secret Keys

The randomness of the key is an important standard to measure the performance of the secret keys. The definition of key randomness is the uniformity of the distribution of 0 and 1 in the generated secret keys. The higher the randomness of the key, the more difficult it is for the eavesdropper to guess the key. To ensure that the secret keys generated are substantially random, the standard randomness test suite from NIST is employed to verify the effectiveness of the secret keys extracted after the wireless key generation scheme based on permutation and perturbation [38, 39]. The output result of each test is an indicator called the value. A tested secret key sequence passes a test when the value is greater than the threshold, usually chosen as 0.01. We run 10 NIST tests on the secret keys generated on the RPP-WKG scheme, as listed in Table 3. All the results pass the tests, indicating the randomness of the generated secret keys is sufficient for practical key generation. In addition, in this section, we also compare the randomness of the initial secret keys, the secret keys quantified after PCA processing, the secret keys generated by RSS, and the secret keys generated by the RPP-WKG scheme. Table 4 shows the comparison results: the secret key generation scheme based on random permutation and perturbation has obvious advantages in the tests.

5. Conclusions

In this paper, we propose an efficient wireless key generation scheme based on random permutation and perturbation, which achieves high randomness and a high KGR between the legitimate users, Alice and Bob, in a quasistatic environment. In the proposed RPP-WKG scheme, we can mitigate the impact of the quasistatic channel and achieve secret keys with high randomness and low correlation. The efficient and secure permutation method allows legitimate users to perform the same random permutation on their respective CSI to acquire new random sources with random and great fluctuations. The minimum weight-based matching method helps legitimate users to obtain an agreement on the permutation order of CSI without revealing it. The random perturbation generation method based on the permutation order improves the randomness and reduces the correlation of secret keys. Simulation results show that the proposed RPP-WKG scheme can efficiently improve the randomness and KGR of the generated secret keys in a quasistatic environment.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

Acknowledgments

This work is supported by the National Key R&D Program of China (2020YFE0200600).