Large-scale MIMO key generation method based on joint optimization and metric learning
By employing a joint optimization and metric learning method based on RIS and BS, the channel reciprocity characteristics of Massive MIMO systems are extracted, solving the problem of high initial inconsistency rate in key generation in complex wireless communication environments and achieving efficient and secure physical layer key generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-14
AI Technical Summary
In complex wireless communication environments, existing physical layer key generation schemes suffer from high initial key inconsistency rates and high computational complexity. In particular, in Massive MIMO systems, extracting highly consistent channel reciprocity features remains a major research challenge.
A method based on joint optimization and metric learning is adopted. The channel reciprocity features in the Massive MIMO system are extracted by the joint alternating optimization algorithm RBAO of RIS and BS and the MCoVT-SiamNet model. Combined with the full-process physical layer key generation scheme in TDD mode, including channel sounding estimation, CSI reciprocity feature extraction, quantization, information negotiation and privacy amplification, a highly consistent physical layer key is generated.
It improves the initial consistency and security of key generation, reduces the key inconsistency rate, meets the requirements of cryptographic randomness testing, and is suitable for real-world complex wireless network environments.
Smart Images

Figure CN121864296A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of physical layer security, and more particularly to physical layer keys and large-scale MIMO systems, specifically a large-scale MIMO key generation method based on joint optimization and metric learning. Background Technology
[0002] In today's intelligent era of the Internet of Things, wireless communication networks are undergoing an evolution from 5G to 6G, gradually developing towards heterogeneity and ultra-dense deployment. According to the "2024 China IoT Industry Innovation White Paper," the number of connected IoT devices in China will exceed 8 billion by 2025, with most of these terminal devices requiring the transmission of sensitive data via wireless networks. With the exponential growth in the scale of connected devices, wireless communication systems will face unprecedented security challenges. To achieve secure and efficient data transmission, a sound and reliable security mechanism is urgently needed. Due to the openness and broadcast nature of wireless channels, effectively ensuring the information security of wireless systems has long been a key research issue.
[0003] Traditional secure communication solutions primarily rely on classical encryption algorithms, increasing computational complexity to enhance the difficulty of cracking them, such as symmetric and asymmetric encryption systems. While classical encryption algorithms have been used to secure communication systems for decades, their limitations are becoming increasingly apparent in the face of the exponentially growing scale of devices and breakthroughs in quantum computing. On one hand, the exponential growth in device scale makes centralized key distribution and management of traditional encryption algorithms extremely difficult, leading to security risks such as key distribution leaks, complex certificate management, and single points of failure. In large-scale distributed wireless network environments, if a centralized key management facility is attacked or experiences a single point of failure, the entire communication network will lose its security and reliability. On the other hand, breakthroughs in quantum computing also pose a substantial threat to traditional encryption algorithms. Shor's quantum algorithm has been proven to break RSA and ECC algorithms in polynomial time, posing a serious security challenge to existing public key infrastructures. With the continuous development of quantum computing, traditional encryption algorithms based on computational complexity will become unreliable given its computational advantages.
[0004] To address the aforementioned problems and challenges, physical layer security mechanisms, as an emerging information-theoretic security approach, offer a new research paradigm for ensuring communication security. Current physical layer key research largely relies on ideal wireless communication environment assumptions, failing to consider the impact of non-ideal factors such as signal congestion, interference, and fading in complex real-world scenarios. In real-world wireless network environments, signals are susceptible to interference from buildings, terrain, and various moving obstacles. In such complex environments, some research introduces additional relay nodes or random parameters to enhance key scheme performance, but this leads to higher power consumption and computational complexity, limiting its application scenarios. Furthermore, with the continuous increase in communication frequencies in 5G and future 6G systems, signal attenuation will become more significant, making them more vulnerable to congestion or interference from various obstacles. In addition, Massive MIMO, a key technology in 5G and 6G, has received relatively little research attention regarding physical layer key generation. Therefore, designing efficient and secure physical layer key generation schemes for the complex wireless network environments of today's 5G and future 6G remains an urgent open problem to be solved.
[0005] In recent years, intelligent metasurfaces (RIS) have been introduced into physical layer security research as an auxiliary technology. RIS consists of a large number of passive reflective elements. By adjusting the reflection coefficients of each element, RIS can effectively control the propagation direction, phase, and amplitude of signals, thereby improving signal transmission in complex environments. Some research has already utilized RIS to assist in the physical layer key generation process. However, current research mainly focuses on the individual optimization of the RIS phase shift matrix, with insufficient overall system optimization, and the optimization effect needs further improvement. In current research on wireless system key schemes using Time Division Duplexing (TDD), how to extract highly consistent and effective channel reciprocity features remains a major research problem. Deep learning has seen some research and application in the field of physical layer security in recent years. It does not require a large amount of prior knowledge of wireless channels, but rather extracts effective features from channel information in a data-driven manner, thereby optimizing physical layer research tasks. Combining deep learning's feature extraction methods provides a new optimization approach and direction for physical layer key research. Summary of the Invention
[0006] The purpose of this invention is to propose a large-scale MIMO key generation method based on joint optimization and metric learning, thereby enhancing the reciprocity of channel features extracted by both communicating parties and further reducing the initial key inconsistency rate of existing TDD key schemes.
[0007] The objective of this invention is achieved as follows:
[0008] For TDD Massive MIMO systems in complex real-world environments, this scheme first addresses the issue of low achievable rates caused by signal congestion by introducing a Relational Analysis (RIS) mechanism to regulate the wireless channel environment and proposing an efficient joint optimization algorithm, RBAO, combining RIS and Baseline Optimization (BS). Subsequently, this scheme proposes MCoVT-SiamNet, a multi-scale CNN and ViT hybrid network model based on a metric learning Siamese network architecture, to fully extract the local and global reciprocity features of high-dimensional CSI in Massive MIMO systems. Furthermore, this scheme combines the proposed joint optimization algorithm RBAO with MCoVT-SiamNet to design a full-process physical layer key generation scheme under TDD mode.
[0009] The specific method is as follows:
[0010] A large-scale MIMO key generation method based on joint optimization and metric learning includes the following steps:
[0011] Step 1: Joint optimization of RIS phase shift matrix and BS beamforming. The designed RBAO is an iterative optimization algorithm. The core idea is to fix one variable in each iteration while optimizing another variable to gradually approach the optimal solution. By alternating optimization, the complex non-convex optimization problem can be decomposed into two relatively independent sub-problems for solving. Furthermore, for the BS beamforming optimization sub-problem, this scheme uses the MRT maximum ratio transmission algorithm for optimization. For the RIS phase shift matrix optimization sub-problem, this scheme designs a RISPGD adaptive learning rate projection gradient descent algorithm. In each iteration, the objective optimization function is kept constant, meaning the overall achievable rate of the system gradually increases and eventually converges to the optimal value of the algorithm.
[0012] Step 2: Obtain the channel reciprocity features of the communicating parties using the MCoVT-SiamNet channel feature extraction model. MCoVT-SiamNet is a hybrid network model combining multi-scale CNN and Vision Transformer based on a metric learning Siamese network architecture. MCoVT-SiamNet consists of two sub-networks sharing weights, with each sub-network having the same structure. During training, MCoVT-SiamNet accepts paired CSI inputs and minimizes the differences in extracted reciprocity features using a contrastive loss function based on metric learning. Each sub-network of MCoVT-Net mainly consists of three parts: a lightweight multi-scale CNN module for extracting local features, a ViT module for extracting global features, and a final convolution and concatenation operation to output the final feature vector. During the training phase, MCoVT-SiamNet receives paired CSI data inputs. After model training is complete, a single-path feedforward network MCoVT-Net is deployed offline on both Alice and Bob's ends. During inference, Alice and Bob independently run single-path networks to extract reciprocity features from their respective measured CSI, obtaining a reciprocity feature vector z of length L. A With z B Then, further quantification, information negotiation, and privacy amplification processes are carried out to ultimately generate the physical layer keys for Alice and Bob;
[0013] Step 3: Complete the physical layer key generation for both communicating parties through the designed TDD mode full-process physical layer key generation scheme. The key generation scheme includes joint optimization and channel sounding estimation, CSI reciprocity feature extraction, quantization, information negotiation and privacy amplification.
[0014] Step 3.1, Joint Optimization and Channel Probe Estimation: Through joint optimization of RIS and BS, and CSI probe estimation, reliable CSI data can be provided for Alice and Bob in complex environments, thus providing a reliable data foundation for the subsequent key generation process. In TDD time-division duplex mode, Alice and Bob alternately transmit common pilot signals during the coherence time and perform CSI probe estimation using the least squares method. The RIS and BS joint optimization scheme was introduced in Step 1. Through the proposed joint alternating optimization algorithm framework RBAO, the overall achievable rate of the system can be optimized in a RIS-assisted Massive MIMO system, creating a reliable and stable communication environment. After the joint optimization and CSI probe estimation process, Alice and Bob can obtain their respective CSI estimation results for the uplink and downlink channels, further proceeding to the subsequent CSI reciprocity feature extraction process.
[0015] Step 3.2, CSI Reciprocity Feature Extraction: In this process, the deep embedded reciprocity features in high-dimensional CSI are extracted using the MCoVT-SiamNet network model proposed in Step 2. This process eliminates the loss of CSI reciprocity between Alice and Bob in TDD mode due to factors such as system interference noise, synchronization errors, and hardware deviations in real-world non-ideal environments. In this process, the CSI data estimated in the previous step is first subjected to amplitude and phase separation, numerical normalization, and dimension alignment. The training phase of the MCoVT-SiamNet network model can be performed online. After the model is trained online, a single-path forward network MCoVT-Net is deployed offline on both Alice and Bob's ends for inference operations. In the channel detection estimation in the previous process, Alice and Bob obtained their respective channel CSI estimates. Further, through the separate MCoVT-Net network, Alice and Bob can obtain a reciprocity feature vector of length with a high correlation coefficient. After obtaining the reciprocity feature vector, the key generation scheme proceeds to the next step of the quantization process.
[0016] Step 3.3, Quantization: In this process, the reciprocal feature vectors are transformed into the initial key bit string using a quantization algorithm, that is, the extracted feature vectors are converted into discrete 0 and 1 bit strings. The quantization algorithm should ensure high consistency between the initial key bit strings obtained after the transformation of Alice and Bob's reciprocal feature vectors. This study uses a quantization algorithm based on the Inverse Cumulative Distribution Function (ICDF).
[14] Specifically, the ICDF quantization algorithm is expressed in the following form:
[0017]
[0018] Where z[i] represents the i-th element in the reciprocal eigenvector z, F -1 (·) denotes the inverse cumulative distribution function ICDF of the eigenvector z, and ε denotes the quantization factor;
[0019] Step 3.4, Information Negotiation: The main function of information negotiation is to correct inconsistencies in the initial key bit strings of Alice and Bob, reducing the key inconsistency rate (KDR) of the initial key strings to 0, thus obtaining identical key bit streams. As seen in the previous quantization process, despite the isolation protection band within the quantization interval, inconsistencies in the feature vectors of Alice and Bob inevitably remain after quantization. Therefore, it is necessary to correct these inconsistencies using an error correction algorithm, while ensuring that only a very small amount of key information is leaked on the public channel. Commonly used error correction algorithms in key information negotiation include the Cascade block-based interactive error correction protocol and algorithms based on error-correcting code schemes, such as BCH codes, Polar codes, and Turbo codes. This study uses the Cascade error correction protocol algorithm for information negotiation of the initial key between Alice and Bob. The main idea of the Cascade error correction protocol is to divide the initial key into blocks and exchange the hash values of the blocks in each round of interaction. If the hash values are inconsistent, binary recursion is used to further divide the blocks to quickly locate and correct errors until all inconsistencies are finally eliminated.
[0020] Step 3.5, Privacy Amplification: The main function of privacy amplification is to further strengthen the consensus key sequence obtained through information negotiation using cryptographic security functions, and generate the final physical layer key for Alice and Bob. During the aforementioned information negotiation step, the eavesdropper Eve may obtain some error correction information. Privacy amplification transforms the consensus sequence into a 1024-bit final key using a secure hash function. Due to the avalanche effect and collision resistance of cryptographic hashes, the final generated physical layer key can be considered an unpredictable uniform random sequence, thus eliminating the risk of information leakage during key negotiation. Commonly used secure hash functions in physical layer key generation include SHAKE-128 / 256, SHA-256 / 512, or iterative construction based on HMAC. This study uses the SHAKE-256 secure hash function for privacy amplification. SHAKE-256 can output hash results of arbitrary lengths according to actual needs. Here, the output length of SHAKE-256 is set to 1024, meaning the final generated physical layer key is 1024 bits long.
[0021] The positive effects of this invention are:
[0022] This invention addresses RIS-assisted TDD Massive MIMO systems, designing a full-process physical layer key generation scheme based on joint optimization and metric learning. First, an efficient RIS / BS joint alternating optimization algorithm, RBAO, is proposed to optimize the system's achievable signal rate, providing a reliable channel environment for key generation. Further, the MCoVT-SiamNet model, based on a metric learning Siamese network architecture, is proposed to fully extract the deep reciprocity features of high-dimensional CSI in Massive MIMO systems. The MCoVT-SiamNet model outperforms the normalized mean square error and Pearson correlation coefficient, indicating better consistency in the extracted channel features. Then, combining the RBAO joint optimization algorithm and the MCoVT-SiamNet model, this invention designs a full-process physical layer key generation scheme under TDD mode. The designed scheme exhibits superior initial key consistency performance and passes the NIST randomness test, demonstrating that the generated keys meet cryptographic randomness security requirements. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the joint optimization of RIS and BS.
[0024] Figure 2 This is a schematic diagram of the RBAO joint alternation optimization algorithm.
[0025] Figure 3 This is a schematic diagram of the RISPGD adaptive learning rate gradient descent algorithm.
[0026] Figure 4 It is the structure of the MCoVT-SiamNet channel reciprocity feature extraction model.
[0027] Figure 5 This is a schematic diagram of the multi-scale convolution module structure.
[0028] Figure 6 It is a full-process physical layer key generation scheme in TDD mode. Detailed Implementation
[0029] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0030] Step 1: Joint optimization of RIS phase shift matrix and BS beamforming. Figure 1 This diagram illustrates the joint optimization of a smart metasurface (RIS) and a base station (BS). The algorithm's optimization objective is the system's achievable signal rate. The achievable rate can be expressed as the signal transmission rate per unit bandwidth, measured in bps / Hz. The achievable rate can be represented as follows:
[0031]
[0032] Where, σ 2 H represents the overall noise power of the system. B,k This represents the effective CSI (Continuous Search Indicator) of Alice to Bob's k-th downlink subcarrier, i.e., H. B,k =H BA,k +H BR,k ΦH RA,k , where w represents the beamforming vector at the Alice base station. Figure 1 As shown, the direct channel between Alice (base station BS) and Bob is blocked. Introducing a Reflection Channel (RIS) to construct an additional reflection channel can significantly improve system performance. By precisely controlling the phase shift of each reflection unit, the RIS can achieve coherent superposition of reflected signals, thereby improving channel quality. Furthermore, in Massive MIMO, the BS is equipped with a large number of antennas. By weighting and phase adjusting the signals from each antenna, energy can be concentrated in a specific direction, i.e., active beamforming at the BS. Effective BS beamforming can significantly enhance the signal quality received by Bob and suppress interference. The designed RBAO is an iterative optimization algorithm. The core idea is to fix one variable in each iteration while optimizing another variable to gradually approach the optimal solution. The overall algorithm flow is as follows: Figure 2 As shown, by using an alternating optimization approach, the complex non-convex optimization problem can be decomposed into two relatively independent sub-problems for solution. Furthermore, for the BS beamforming optimization sub-problem, this scheme employs the MRT maximum ratio transmission algorithm for optimization; for the RIS phase shift matrix optimization sub-problem, this scheme designs a RISPGD adaptive learning rate projection gradient descent algorithm. Figure 3 The algorithm flow of RISPGD is demonstrated. Figure 3 The RISPGD step shown incorporates a phase gradient pruning mechanism to prevent gradient runaway during iteration and improve the stability of the optimization process. After calculating the gradient, its L2 norm ||g|| is further calculated. (t) ‖。 If ‖g (t) ||>g clip Then the gradient will be based on g clip Scaling is applied, otherwise the gradient remains unchanged, which can be expressed as follows:
[0033]
[0034] In practice, due to the limited accuracy of the RIS resolution, the phase of each reflective element in Φ cannot arbitrarily take a value within the interval [0, 2π). Therefore, phase discretization is necessary to satisfy the constraint of the discontinuous RIS resolution. We assume that the RIS reflective element has a finite number of phase adjustment levels L within the interval [0, 2π). RAt this point, after performing phase updates in the RISPGD algorithm, it is necessary to update each phase θ in the phase vector θ. i Discretization is performed, i.e., θ i =f discrete (θ i ,L R This is used to map continuous phases to the nearest discrete phase value that satisfies the RIS resolution. Specifically, the discrete function is defined as:
[0035]
[0036] In summary, in each iteration of the RBAO joint optimization algorithm, the objective function is kept constant, meaning the overall reachability of the system gradually increases and eventually converges to the optimal value of the algorithm.
[0037] Step 2: Obtain the channel reciprocity features of the communicating parties using the MCoVT-SiamNet channel feature extraction model. MCoVT-SiamNet is a hybrid network model combining multi-scale CNN and Vision Transformer based on a metric learning Siamese network architecture. The overall model structure of MCoVT-SiamNet is as follows: Figure 4 As shown. By Figure 4 As can be seen, MCoVT-SiamNet consists of two sub-networks sharing weights, with each sub-network having the same structure. During training, MCoVT-SiamNet accepts paired CSI inputs and minimizes the differences in extracted reciprocity features using a contrastive loss function learned through metric learning. Each sub-network of MCoVT-Net mainly consists of three parts: a lightweight multi-scale CNN module for extracting local features, a ViT module for extracting global features, and a final convolution and concatenation operation to output the final feature vector.
[0038] The CNN module includes an amplitude-phase fusion block and a lightweight multi-scale convolution block. In the amplitude-phase fusion block, amplitude and phase are fused using two 1×1 convolutions. The first 1×1 Conv-16 expands the feature size from 2D to 16D, and the second 1×1 Conv-1 compresses it back to 1D, thus completing the fusion of amplitude and phase dimensions. After amplitude-phase fusion, N convolutions are connected... a Each lightweight multi-scale convolutional block has the following structure: Figure 5As shown, its main function is to extract local spatial features from CSI and fuse multi-scale structural information. Specifically, each lightweight multi-scale convolutional block first contains three parallel depthwise separable convolutional structures (DSConv) with kernel sizes of 3×3, 5×5, and 7×7, respectively. DSConv performs convolution on each channel separately, and then uses pointwise convolution to fuse information between channels. Each DSConv outputs 16 channels while maintaining the shape of other dimensions. LeakyReLU is used as the activation function after convolution. By using DSConv, the number of convolutional kernels can be significantly reduced, as well as the number of parameters and computational cost. After the three DSConv branches are run in parallel, they are concatenated in the channel dimension to obtain 48 channels. Further channel dimensionality reduction is performed, reducing the concatenated 48-dimensional channels to 8 dimensions using 1×1 convolution, while using CBAM channel and spatial attention mechanisms to optimize and improve feature representation. After CBAM, residual connections are set to improve gradient flow, and BatchNorm regularization is used to stabilize training.
[0039] Following the CNN module is the ViT module, whose main function is to perform global modeling of the features extracted by the CNN module. Through the global self-attention mechanism in the Transformer, the robustness of the final output feature vector to noise and environmental changes can be improved.
[0040] After passing through the CNN and ViT modules, 32 token feature vectors of length 512 are obtained for each sample in a batch. Finally, a 1×1 convolution and concatenation operation is performed on the token channel number dimension to obtain a reciprocity feature vector of length L. In subsequent experiments, to obtain a 1024-bit physical layer key, L is set to 2048 here.
[0041] During the training phase of the MCoVT-SiamNet network model, contrastive loss is used as the loss function. Contrastive loss minimizes the feature distance within the same CSI pairs (positive pairs) in the deep feature space and widens the feature distance between different CSI pairs (negative pairs) to obtain more robust and discriminative reciprocal feature vectors. Specifically, the calculation method for contrastive loss is as follows:
[0042]
[0043] Where N represents the number of samples in a batch, and L represents the length of the reciprocity feature vector output by the network. ij Indicates CSI pair (CSI i CSI jIs it a positive sample pair? Specifically, a positive sample pair represents the CSI measured by Alice and Bob during the coherent time, while a negative sample pair represents the CSI measured by the communicating parties during incoherent time or in different measurement processes. When the CSI pair is positive, Y ij Take 1 if it's a negative pair, and 0 otherwise. (D) ij Let CSI represent the Euclidean distance between reciprocal eigenvector pairs output by the MCoVT-SiamNet network, and let the eigenvectors be (z...). i ,z j ), then D ij =||z i -z j After calculating the loss, the ADAM optimizer is further employed.
[33] Perform gradient backpropagation and parameter updates, while monitoring the consistency metric NMSE (Normalized Mean Squared Error) on the validation set.
[0044] Overall, during the training phase, MCoVT-SiamNet receives paired CSI data inputs. After model training is complete, a single-path feedforward network MCoVT-Net is deployed offline on both Alice and Bob's ends. During inference, Alice and Bob independently run the single-path network to extract reciprocity features from their respective measured CSIs, obtaining a reciprocity feature vector z of length L. A With z B The process then proceeds with quantification, information negotiation, and privacy amplification to ultimately generate the physical layer keys for Alice and Bob.
[0045] Step 3: Generate physical layer keys for both communicating parties using the designed TDD mode full-process physical layer key generation scheme, such as... Figure 6 As shown, the key generation scheme includes steps such as joint optimization and channel sounding estimation, CSI reciprocity feature extraction, quantization, information negotiation and privacy amplification;
[0046] Step 3.1, Joint Optimization and Channel Probe Estimation: Through joint optimization of RIS and BS, and CSI probe estimation, reliable CSI data can be provided for Alice and Bob in complex environments, thus providing a reliable data foundation for the subsequent key generation process. In TDD time-division duplex mode, Alice and Bob alternately transmit common pilot signals during the coherence time and perform CSI probe estimation using the least squares method. The RIS and BS joint optimization scheme was introduced in Step 1. Through the proposed joint alternating optimization algorithm framework RBAO, the overall achievable rate of the system can be optimized in a RIS-assisted Massive MIMO system, creating a reliable and stable communication environment. After the joint optimization and CSI probe estimation process, Alice and Bob can obtain their respective CSI estimation results for the uplink and downlink channels, further proceeding to the subsequent CSI reciprocity feature extraction process.
[0047] Step 3.2, CSI Reciprocity Feature Extraction: In this process, the deep embedded reciprocity features in high-dimensional CSI are extracted using the MCoVT-SiamNet network model proposed in Step 2. This process eliminates the loss of CSI reciprocity between Alice and Bob in TDD mode due to factors such as system interference noise, synchronization errors, and hardware deviations in real-world non-ideal environments. In this process, the CSI data estimated in the previous step is first subjected to amplitude and phase separation, numerical normalization, and dimension alignment. The training phase of the MCoVT-SiamNet network model can be performed online. After the model is trained online, a single-path forward network MCoVT-Net is deployed offline on both Alice and Bob's ends for inference operations. In the channel detection estimation in the previous process, Alice and Bob obtained their respective channel CSI estimates. Further, through the separate MCoVT-Net network, Alice and Bob can obtain a reciprocity feature vector of length with a high correlation coefficient. After obtaining the reciprocity feature vector, the key generation scheme proceeds to the next step of the quantization process.
[0048] Step 3.3, Quantization: In this process, the reciprocal feature vectors are transformed into the initial key bit string using a quantization algorithm, that is, the extracted feature vectors are converted into discrete 0 and 1 bit strings. The quantization algorithm should ensure high consistency between the initial key bit strings obtained after the transformation of Alice and Bob's reciprocal feature vectors. This study uses a quantization algorithm based on the Inverse Cumulative Distribution Function (ICDF).
[14] Specifically, the ICDF quantization algorithm is expressed in the following form:
[0049]
[0050] Where z[i] represents the i-th element in the reciprocal eigenvector z, F -1 (·) denotes the inverse cumulative distribution function (ICDF) of the eigenvector z, and ε denotes the quantization factor. For F -1 The inverse cumulative distribution function (CDF) calculates the minimum z in the eigenvector based on the input probability p, such that the CDF value of z is greater than or equal to the input probability p. When p = 0.5, F... -1 The value returned by (·) means that the probability of a value less than or equal to this value in the feature vector is 0.5, and it is easy to see that the probability of a value greater than or equal to this value is also 0.5. The ε quantization factor is used to set the isolation band between quantization intervals. During quantization, there are inevitably edge points near the segment boundaries in the feature vector. These edge points are prone to causing inconsistent quantization bits at Alice and Bob's ends after quantization. Therefore, by adjusting the quantization factor ε to set the length of the isolation band, the inconsistency of quantization bits caused by edge points can be effectively reduced. After quantization, the edge points in the feature vector that fall into the isolation band will generate a label with a value of "-1" at this position, indicating that the quantization bits at this position are "unreliable". Bits at subsequent unreliable positions will no longer participate in key generation. By reasonably setting the quantization factor ε, the key inconsistency rate (KDR) of the initial bit string can be effectively reduced while ensuring the length of the generated initial key bit string, thereby reducing the number of error correction information exchanges in the subsequent information negotiation process and improving error correction efficiency. After the quantization step, Alice and Bob will obtain the initial key bit string, and the next step is to enter the subsequent information negotiation process;
[0051] Step 3.4, Information Negotiation: The main function of information negotiation is to correct inconsistencies in the initial key bit strings of Alice and Bob, reducing the key inconsistency rate (KDR) of the initial key strings to 0, thus obtaining identical key bit streams. As seen in the previous quantization process, despite the isolation protection band within the quantization interval, inconsistencies in the eigenvectors of Alice and Bob inevitably remain after quantization. Therefore, a certain error correction algorithm is needed to correct these inconsistencies, while ensuring that only a very small amount of key information is leaked on the public channel. Commonly used error correction algorithms in key information negotiation include the Cascade block-based interactive error correction protocol and algorithms based on error-correcting code schemes, such as BCH codes, Polar codes, and Turbo codes. This study uses the Cascade error correction protocol algorithm for information negotiation of the initial key between Alice and Bob. The main idea of the Cascade error correction protocol is to divide the initial key into blocks and exchange the hash values of the blocks in each round of interaction. If the hash values are inconsistent, binary recursion is used to further divide the blocks to quickly locate and correct errors until all inconsistencies are finally eliminated. In the Cascade algorithm protocol, Alice and Bob exchange error correction information via a public channel. This public information could potentially be intercepted by Eve, a passive eavesdropper. However, because the error correction information mainly consists of one-way irreversible hash values of blocks, and Eve cannot know the position and order of the sub-blocks, Eve cannot obtain valid key information from it. Furthermore, through subsequent privacy amplification processes, the passive leakage of information in this step can be reduced to a negligible level.
[0052] Step 3.5, Privacy Amplification: The main function of privacy amplification is to further strengthen the consensus key sequence obtained through information negotiation using cryptographic security functions, and generate the final physical layer key for Alice and Bob. During the aforementioned information negotiation step, the eavesdropper Eve may obtain some error correction information. Privacy amplification transforms the consensus sequence into a 1024-bit final key using a secure hash function. Due to the avalanche effect and collision resistance of cryptographic hashes, the final generated physical layer key can be considered an unpredictable uniform random sequence, thus eliminating the risk of information leakage during key negotiation. Commonly used secure hash functions in physical layer key generation include SHAKE-128 / 256, SHA-256 / 512, or iterative construction based on HMAC. This study uses the SHAKE-256 secure hash function for privacy amplification. SHAKE-256 can output hash results of arbitrary lengths according to actual needs. Here, the output length of SHAKE-256 is set to 1024, meaning the final generated physical layer key is 1024 bits long. Specifically, privacy amplification can be expressed as follows:
[0053] Key = SHAKE - 256(k||salt)| 0~1023bit
[0054] Where k is the consistent bit string obtained by Alice and Bob after information negotiation. salt is a one-time random number negotiated by Alice and Bob to prevent eavesdropper Eve from conducting offline searches or constructing rainbow table attacks. Finally, the first 1024 bits of the SHAKE-256 hash output are the physical layer key Key generated by Alice and Bob.
Claims
1. A large-scale MIMO key generation method based on joint optimization and metric learning, characterized in that, The method includes: Step 1: Joint optimization of RIS phase shift matrix and BS beamforming. The designed RBAO is an iterative optimization algorithm. The core idea is to fix one variable in each iteration and optimize another variable at the same time to gradually approach the optimal solution of the algorithm. Step 2: Obtain the channel reciprocity features of the two communicating parties through the MCoVT-SiamNet channel feature extraction model. MCoVT-SiamNet consists of two sub-networks with shared weights. Each sub-network of MCoVT-SiamNet has the same structure. During training, MCoVT-SiamNet accepts paired CSI inputs and minimizes the difference in extracted reciprocity features through the contrastive loss function of metric learning. Each sub-network of MCoVT-SiamNet mainly consists of three parts: a lightweight multi-scale CNN module for extracting local features, a ViT module for extracting global features, and the final convolution and concatenation operations for outputting the final feature vector. Step 3: Complete the physical layer key generation for both communicating parties using the designed TDD mode full-process physical layer key generation scheme. The key generation scheme includes steps such as joint optimization and channel detection estimation, CSI reciprocity feature extraction, quantization, information negotiation and privacy amplification.
2. The method according to claim 1, characterized in that, In step 1, the designed RBAO is an iterative optimization algorithm. The core idea is to fix one variable in each iteration while optimizing another variable to gradually approach the optimal solution of the algorithm. By alternating optimization, the complex non-convex optimization problem can be decomposed into two relatively independent sub-problems for solving. Furthermore, for the BS beamforming optimization sub-problem, this scheme uses the MRT maximum ratio transmission algorithm for optimization. For the RIS phase shift matrix optimization sub-problem, this scheme designs a RISPGD adaptive learning rate projection gradient descent algorithm. In each iteration, the objective optimization function is kept constant, that is, the overall achievable rate of the system will gradually increase and eventually converge to the optimal value of the algorithm.
3. The method according to claim 1, characterized in that, In step 2, the channel reciprocity features of the communicating parties are obtained through the MCoVT-SiamNet channel feature extraction model. MCoVT-SiamNet is a multi-scale CNN and Vision based on a metric learning Siamese network architecture. The Transformer hybrid network model, MCoVT-SiamNet, consists of two sub-networks sharing weights. Each sub-network of MCoVT-SiamNet has the same structure. During training, MCoVT-SiamNet accepts paired CSI inputs and minimizes the differences in extracted reciprocity features through a contrastive loss function based on metric learning. Each sub-network of MCoVT-SiamNet mainly consists of three parts: a lightweight multi-scale CNN module for extracting local features, a ViT module for extracting global features, and a final convolution and concatenation operation to output the final feature vector. During the training phase, MCoVT-SiamNet receives paired CSI data inputs. After the model is trained, a single-path feedforward network MCoVT-SiamNet is deployed offline on Alice and Bob respectively. During inference, Alice and Bob independently run the single-path network to extract reciprocity features from their respective measured CSIs, obtaining reciprocity feature vectors of length and . Further quantization, information negotiation, and privacy amplification processes are then performed to finally generate the physical layer keys for Alice and Bob.
4. The method according to claim 1, characterized in that, In step 3, joint optimization and channel sounding estimation are first performed. Through joint optimization of RIS and BS, and CSI sounding estimation steps, reliable CSI data can be provided for Alice and Bob in complex environments, thus providing a reliable data foundation for the subsequent key generation process. In TDD time-division duplex mode, Alice and Bob alternately transmit common pilot signals during the coherence time and perform their respective CSI sounding estimations using the least squares method. The RIS and BS joint optimization scheme was introduced in step 1. Through the proposed joint alternating optimization algorithm framework RBAO, RIS-assisted Massive... In MIMO systems, optimizing the overall achievable rate and creating a reliable and stable communication environment, after joint optimization and CSI detection estimation, Alice and Bob can obtain their respective CSI estimation results for the uplink and downlink channels. This leads to the subsequent CSI reciprocity feature extraction process. In this process, the MCoVT-SiamNet network model proposed in step 2 is used to extract deep embedded reciprocity features from high-dimensional CSI. This process eliminates the loss of CSI reciprocity between Alice and Bob in TDD mode caused by system interference noise, synchronization errors, hardware deviations, and other factors in real-world non-ideal environments. Next is quantization. In this process, the reciprocity feature vector is transformed into an initial key bit string using a quantization algorithm, i.e., the extracted feature vector is converted into a discrete 0 / 1 bit string. The quantization algorithm should ensure high consistency between the initial key bit strings obtained after the transformation of Alice and Bob's reciprocity feature vectors. This study uses a quantization algorithm based on the Inverse Cumulative Distribution Function (ICDF). [14] Specifically, the ICDF quantization algorithm is expressed in the following form: Where z[i] represents the i-th element in the reciprocal eigenvector z, F -1 (·) represents the inverse cumulative distribution function (ICDF) of the eigenvector z, and ε represents the quantization factor. Further, information negotiation is performed. In the information negotiation process, the main function is to correct inconsistencies in the initial key bit strings of Alice and Bob, that is, to reduce the key inconsistency rate (KDR) of the initial key string to 0, so as to obtain completely identical key bit streams. As can be seen from the previous quantization process, although there is an isolation protection band in the quantization interval, inconsistencies in the eigenvectors of Alice and Bob are still inevitable after quantization. At this time, it is necessary to correct the inconsistencies in the bits through a certain error correction algorithm, and it is necessary to ensure that only a very small amount of key information is leaked on the public channel. Commonly used error correction algorithms in key information negotiation include the Cascade block-based interactive error correction protocol, and algorithms based on error correction code schemes, such as BCH codes, Polar codes, and Turbo codes. This study uses the Cascade error correction protocol algorithm to negotiate the initial key information between Alice and Bob. The main idea of the Cascade error correction protocol is to divide the initial key into blocks and exchange the hash values of the blocks in each round of interaction. If the hash values are inconsistent, a binary recursive approach is used. The process involves a step-by-step block approach to quickly locate and correct errors until all inconsistent bits are eliminated. Finally, privacy amplification is performed. In this process, the main function is to further strengthen the consensus key sequence obtained through information negotiation using cryptographically secure functions, generating the final physical layer key for Alice and Bob. During the aforementioned information negotiation steps, the eavesdropper Eve may have obtained some error correction information. Privacy amplification transforms the consensus sequence into a 1024-bit final key using a secure hash function. Due to the avalanche effect and collision resistance of cryptographic hashes, the final physical layer key can be considered an unpredictable uniform random sequence, thus eliminating the risk of information leakage during key negotiation. Commonly used secure hash functions in physical layer key generation include SHAKE-128 / 256, SHA-256 / 512, or iterative construction based on HMAC. This study uses the SHAKE-256 secure hash function for privacy amplification. SHAKE-256 can output hash results of arbitrary lengths according to actual needs; here, the output length of SHAKE-256 is set to 1024, meaning the final physical layer key is 1024 bits long.