Key generation method and device and related equipment

By using random scrambling sequence vectors to process the channel matrix to generate keys between electronic devices, the problem of poor communication security performance is solved, communication security is significantly improved, and the risk of key theft is reduced.

CN118740377APending Publication Date: 2024-10-01CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410995071.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The current communication security performance between different electronic devices is poor and vulnerable to the threat of third parties stealing keys.

Method used

By obtaining and measuring the channel matrix, scrambling it with a random scrambling sequence vector, the target matrix is ​​generated, and the key is generated based on the pre-obtained initial key and sent to the peer device to ensure the security of the key.

Benefits of technology

It enhances the security performance of communication between electronic devices, reduces the risk of keys being stolen by third parties, and improves communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740377A_ABST
    Figure CN118740377A_ABST
Patent Text Reader

Abstract

The invention provides a secret key generation method and device and related equipment, the secret key generation method is applied to first electronic equipment, the method comprises the following steps: obtaining a first channel matrix, the first channel matrix is used for representing a first target channel measurement value measured by the first electronic equipment, and the first target channel measurement value is used for representing a second target channel measurement value; the first target channel measurement value is a channel measurement value of a communication channel between the first electronic equipment and second electronic equipment; scrambling the first channel matrix through a random scrambling sequence vector to obtain a first target matrix; a first key is generated according to the random scrambling sequence vector and a first initial key obtained in advance, the first target matrix is sent to the second electronic device, and the first initial key corresponds to the first target matrix. In this way, the security performance of communication between different electronic devices is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of Internet of Things technology, and in particular to a key generation method, device and related equipment. Background Art

[0002] With the continuous development of communication technology, the application scope of communication technology in people's lives is becoming more and more extensive. At present, when different electronic devices communicate with each other, it is usually necessary to encrypt the communication information with a key. However, when the key is mastered by a third party, it is easy for the communication information between different electronic devices to be stolen by the third party. It can be seen that the security performance of the current communication between different electronic devices is poor. Summary of the invention

[0003] The embodiments of the present invention provide a key generation method, device and related equipment to solve the problem of poor security performance in current communication between different electronic devices.

[0004] To solve the above problems, the present invention is achieved as follows:

[0005] In a first aspect, an embodiment of the present invention provides a key generation method, which is applied to a first electronic device, and the method includes:

[0006] Acquire a first channel matrix, where the first channel matrix is ​​used to represent a first target channel measurement value obtained by measurement by the first electronic device, where the first target channel measurement value is a channel measurement value of a communication channel between the first electronic device and a second electronic device;

[0007] Scrambling the first channel matrix by randomly scrambling a sequence vector to obtain a first target matrix;

[0008] A first key is generated according to the random scrambled order vector and a pre-acquired first initial key, and the first target matrix is ​​sent to the second electronic device, where the first initial key corresponds to the first target matrix.

[0009] In a second aspect, an embodiment of the present invention provides a key generation method, which is applied to a second electronic device, and the method includes:

[0010] Receiving a first target matrix sent by a first electronic device;

[0011] A randomly scrambled sequence vector is calculated according to a second channel matrix and the first target matrix, wherein the second channel matrix is ​​used to represent a second target channel measurement value measured by the second electronic device, and the second target channel measurement value is a channel measurement value of a communication channel between the first electronic device and the second electronic device;

[0012] A second key is generated according to the random scrambled sequence vector and a pre-acquired second initial key.

[0013] In a third aspect, an embodiment of the present invention further provides a key generation device, which is applied to a first electronic device, and the key generation device includes:

[0014] A first acquisition module, configured to acquire a first channel matrix, where the first channel matrix is ​​used to represent a first target channel measurement value obtained by measurement by the first electronic device, where the first target channel measurement value is a channel measurement value of a communication channel between the first electronic device and a second electronic device;

[0015] A first scrambling module, configured to scramble the first channel matrix by randomly scrambling a sequence vector to obtain a first target matrix;

[0016] The first generating module is used to generate a first key according to the random scrambled order vector and a pre-acquired first initial key, and send the first target matrix to the second electronic device, wherein the first initial key corresponds to the first target matrix.

[0017] In a fourth aspect, an embodiment of the present invention further provides a key generation device, which is applied to a second electronic device, and the key generation device includes:

[0018] A first receiving module, configured to receive a first target matrix sent by a first electronic device;

[0019] a calculation module, configured to calculate a random scrambled order vector according to a second channel matrix and the first target matrix, wherein the second channel matrix is ​​used to represent a second target channel measurement value measured by the second electronic device, and the second target channel measurement value is a channel measurement value of a communication channel between the first electronic device and the second electronic device;

[0020] The second generating module is used to generate a second key according to the random scrambled sequence vector and a pre-acquired second initial key.

[0021] In a fifth aspect, an embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps of the method described in the first aspect, or to read the program in the memory to implement the steps of the method described in the second aspect.

[0022] In a sixth aspect, an embodiment of the present invention further provides a readable storage medium for storing a program, wherein when the program is executed by a processor, the program implements the steps in the method described in the first aspect, or implements the steps in the method described in the second aspect.

[0023] In a seventh aspect, an embodiment of the present invention further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the method described in the first aspect or the second aspect above.

[0024] In the embodiment of the present invention, since the first target matrix is ​​obtained by scrambling the first channel matrix through a random scrambling order vector, and the first key is generated based on the random scrambling order vector and a pre-acquired first initial key, and since the random scrambling order vector has unpredictable performance, the security performance of the finally generated first key is enhanced, and the occurrence of the first key being stolen by a third party is reduced, thereby enhancing the security performance of communication between different electronic devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0026] Figure 1 is a schematic diagram of the structure of a network system to which an embodiment of the present invention can be applied;

[0027] Figure 2 It is one of the flow charts of the key generation method provided by the embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of an application scenario provided by an embodiment of the present invention;

[0029] Figure 4 This is the second flowchart of the key generation method provided by the embodiment of the present invention;

[0030] Figure 5 This is the third flowchart of the key generation method provided by the embodiment of the present invention;

[0031] Figure 6 This is one of the application scenario schematic diagrams of randomly scrambling the order vector PO provided in an embodiment of the present invention;

[0032] Figure 7 This is the second schematic diagram of an application scenario of randomly scrambling the order vector PO provided by an embodiment of the present invention;

[0033] Figure 8 It is one of the structural schematic diagrams of the key generation device provided by the embodiment of the present invention;

[0034] Fig. 9 This is a second structural diagram of the key generation device provided by an embodiment of the present invention;

[0035] Fig.10 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] The terms "first", "second" etc. in the embodiments of the present invention are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of the connected objects, such as A and / or B and / or C, which represents 7 situations including single A, single B, single C, and A and B all exist, B and C all exist, A and C all exist, and A, B and C all exist.

[0038] See also Figure 1 , Figure 1 is a structural diagram of a network system to which an embodiment of the present invention can be applied, such as Figure 1 As shown, the first electronic device 11 and the second electronic device 12 are included.

[0039] Among them, the first electronic device 11 and the second electronic device 12 can communicate with each other. In actual applications, the first electronic device 11 and the second electronic device 12 can be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a personal digital assistant (Personal Digital Assistant, PDA), a mobile Internet device (Mobile Internet Device, MID), a wearable device (Wearable Device) or a vehicle-mounted device, etc.

[0040] The following is a description of the key generation method provided by an embodiment of the present invention. Figure 2 , Figure 2 It is a flowchart of a key generation method provided by an embodiment of the present invention. Figure 2The key generation method shown can be executed by the first electronic device.

[0041] like Figure 2 As shown, the key generation method may include the following steps:

[0042] Step 201: Acquire a first channel matrix, where the first channel matrix is ​​used to represent a first target channel measurement value obtained by measuring the first electronic device, where the first target channel measurement value is a channel measurement value of a communication channel between the first electronic device and a second electronic device.

[0043] The first electronic device may be referred to as Alice, the second electronic device may be referred to as Bob, and wireless communication may be performed between the first electronic device and the second electronic device, and thus the first electronic device and the second electronic device may be referred to as wireless communication parties.

[0044] Among them, the measurement method of the first channel matrix is ​​not limited here. Optionally, the first electronic device and the second electronic device can send multiple rounds of detection packets to each other, so that the first electronic device can receive multiple detection packets sent by the second electronic device, and then can extract the channel measurement value from each detection packet, and then combine the multiple channel measurement values ​​to obtain the first channel matrix.

[0045] Similarly, the second electronic device may also receive multiple detection packets sent by the first electronic device, and then extract a channel measurement value from each detection packet, and then combine the multiple channel measurement values ​​to obtain the second channel matrix described below.

[0046] It should be noted that the number of communication channels between the first electronic device and the second electronic device is not limited here. Optionally, the first channel matrix is ​​used to represent multiple communication channels near the first electronic device, and the multiple communication channels can all be used to wirelessly communicate with the second electronic device. Similarly, the second channel matrix is ​​used to represent multiple communication channels near the second electronic device, and the multiple communication channels can all be used to wirelessly communicate with the first electronic device.

[0047] It should be noted that the first channel matrix can be H A Indicates that the second channel matrix can be H B Indicated. And both the first channel matrix and the second channel matrix can be two-dimensional channel matrices, and the above two-dimensional channel matrix can also be called a two-dimensional channel characteristic matrix.

[0048] It should be noted that the embodiment of the present invention can be applied to the application scenario of the Internet of Things, that is, as an optional implementation, the first electronic device and the second electronic device are both Internet of Things devices. In this way, the two Internet of Things devices can be encrypted by the first key provided by the embodiment of the present invention, thereby enhancing the security performance of information transmission between the two Internet of Things devices.

[0049] For details, see Figure 3 The first electronic device and the second electronic device can form an orthogonal frequency division multiplexing (OFDM) communication system, and the process of generating the first key can be referred to as generating a wireless physical layer key (i.e., the first key) in a time division duplex mode, that is, the first electronic device and the second electronic device can respectively generate a consistent security key sequence and continuously update it by utilizing the reciprocity and time variability of the wireless channel. The third-party eavesdropper Eve poses a potential security threat to the wireless communication between Alice (i.e., the first electronic device) and Bob (i.e., the second electronic device).

[0050] Optionally, when the first electronic device measures and obtains the first channel matrix, and the second electronic device measures and obtains the second channel matrix, that is, during the channel sampling process, Alice and Bob take turns to send a channel pilot sequence to each other. Alice sends a channel detection signal in time slot 1, and Bob stores it locally after receiving the signal. Bob sends a channel detection signal in time slot 2, and Alice stores it locally after receiving the signal. At the same time, Eve eavesdrops on the channel information from Alice and Bob in two time slots and attempts to decrypt the message.

[0051] By adopting the implementation mode of the present invention, since the random scrambled order vector has unpredictable performance, the security performance of the finally generated first key is enhanced, the occurrence of the first key being stolen by a third party is reduced, and the security performance of communication between different electronic devices is enhanced.

[0052] It should be noted that the first target channel measurement value may be channel state information (CSI). Optionally, in this embodiment, the measurement value difference in the first target channel measurement value caused by delay and hardware fingerprint may be removed by interpolation transformation and hardware calibration, thereby improving the accuracy of the first target channel measurement value.

[0053] In addition, H A (i.e. the first channel matrix) and H B(i.e., the second channel matrix) represents the CSI matrix of size N×K obtained after channel sampling of Alice and Bob, where N is the number of subcarriers and K is the number of samples. A and H B The relationship between can be expressed as: B =H A +W, where W represents the observed bias caused by measurement noise and residual noise from the calibration process. W is independent of H A , and is considered to obey a complex Gaussian distribution.

[0054] It should be noted that the above two IoT devices can also be referred to as edge-side IoT devices. In this way, the information between the above two IoT devices is encrypted by the first key, so that a secure encrypted communication link can be established between the above two IoT devices.

[0055] Step 202: Scramble the first channel matrix by randomly scrambling a sequence vector to obtain a first target matrix.

[0056] The first channel matrix can be randomly scrambled by using a random scrambling sequence vector to obtain a first target matrix, and the random scrambling sequence vector can be represented by P0. The first target matrix can be represented by express.

[0057] It should be noted that the random scrambled order vector may be a randomly generated vector. Thus, due to the unpredictability of the random scrambled order vector, the security performance of the first key finally generated is higher and the possibility of being cracked by a third party is lower.

[0058] Step 203: Generate a first key according to the random scrambled order vector and a pre-acquired first initial key, and send the first target matrix to the second electronic device, where the first initial key corresponds to the first target matrix.

[0059] When the first electronic device sends the first target matrix to the second electronic device, it can be through a common channel between the first electronic device and the second electronic device, and the common channel can be understood as one of multiple channels between the first electronic device and the second electronic device.

[0060] In the embodiment of the present invention, through steps 201 to 203, since the first target matrix is ​​obtained by scrambling the first channel matrix through the random scrambling order vector, and the first key is generated according to the random scrambling order vector and the pre-acquired first initial key, since the random scrambling order vector has unpredictable performance, the security performance of the finally generated first key is enhanced, the occurrence of the first key being stolen by a third party is reduced, and the security performance of communication between different electronic devices is enhanced.

[0061] The specific method of generating the first key according to the random scrambling sequence vector and the pre-acquired first initial key is not limited here. Optionally, the first initial key can be randomly scrambled by the random scrambling sequence vector to generate the first key, and the first initial key can be a pre-generated key.

[0062] Alternatively, the sum of the random scrambled order vector and the vector corresponding to the first initial key may be calculated, and a key obtained by inverting the sum of the calculated random scrambled order vector and the vector corresponding to the first initial key may be determined as the first key.

[0063] As an optional implementation manner, generating the first key according to the random scrambled order vector and a pre-acquired first initial key includes:

[0064] Performing quantization processing on the first target matrix to obtain the first initial key;

[0065] An XOR operation is performed on the random scrambled order vector and the first initial key to generate the first key.

[0066] Among them, quantization processing can refer to: the process of approximating the continuous value (or a large number of possible discrete values) of the signal to a finite number (or fewer) of discrete values. Quantization is mainly used in the conversion from continuous signals to digital signals. The continuous signal becomes a discrete signal after sampling, and the discrete signal becomes a digital signal after quantization. In this way, by quantizing the first target matrix, the first initial key is obtained, so that the adaptability of the first initial key to the random scrambled order vector can be improved, and then the accuracy of the generated first key can be improved.

[0067] Among them, the XOR operation can be understood as: when the values ​​at the corresponding positions of the random scrambled order vector and the first initial key are the same, the output value is 0; when the values ​​at the corresponding positions of the random scrambled order vector and the first initial key are different, the output value is 1.

[0068] For example: if the value at the first position of the random scrambled sequence vector is 1 and the value at the first position of the first initial key is 1, then the value at the first position of the first key is 0; if the value at the first position of the random scrambled sequence vector is 1 and the value at the first position of the first initial key is 0, then the value at the first position of the first key is 1. The values ​​at other positions can refer to the above description, so as to obtain the final first key.

[0069] In an implementation manner of the present invention, the first target matrix is ​​quantized to obtain the first initial key, thereby improving the compatibility of the first initial key with the random scrambled order vector, and further improving the accuracy of the generated first key; at the same time, the random scrambled order vector and the first initial key are XORed to generate the first key, thereby further improving the security of the first key.

[0070] As an optional implementation manner, scrambling the first channel matrix by randomly scrambling the order vector to obtain a first target matrix includes:

[0071] Performing signal reconstruction on the first channel matrix;

[0072] The first channel matrix after signal reconstruction is scrambled by using the random scrambling order vector to obtain the first target matrix.

[0073] It should be noted that the first channel matrix after signal reconstruction can be Y A Indicates that the first target matrix can be taken as Similarly, the second channel matrix after signal reconstruction can be expressed as Y B Indicates that the first target matrix can be taken as express.

[0074] The signal reconstruction of the first channel matrix can be understood as: performing principal component analysis on the first channel matrix, and processing and transforming the result obtained by the principal component analysis, so as to obtain the first channel matrix after signal reconstruction.

[0075] It should be noted that principal component analysis (PCA) is a dimensionality reduction technique commonly used in data analysis and machine learning. It can convert multiple variables or features into a few principal components, which are linear combinations of the original variables and are uncorrelated with each other.

[0076] The main advantage of PCA is that it can retain important information in the data set while reducing the number of variables that need to be processed. The principle of this method is to transform variables that may be correlated into a set of linearly uncorrelated variables through orthogonal transformation. This process can effectively reduce the dimensionality of the data while retaining the key features of the data set.

[0077] In an embodiment of the present invention, the first channel matrix is ​​signal reconstructed, so that the dimension of the first channel matrix can be reduced, thereby reducing the amount of calculation for scrambling the first channel matrix after signal reconstruction by randomly scrambling the order vector to obtain the first target matrix, thereby improving the efficiency of generating the first target matrix.

[0078] As an optional implementation manner, after randomly perturbing the pre-acquired first initial key according to the random scrambled order vector to generate the first key, and sending the first target matrix to the second electronic device, the method further includes:

[0079] receiving a second key sent by the second electronic device, where the second key is a key generated by the second electronic device according to the first target matrix and the second initial key;

[0080] The first key is modified according to the second key to generate a first target key, and the first key is sent to the second electronic device so that the second electronic device modifies the second key according to the first key to generate a second target key, and the second target key matches the first target key.

[0081] Among them, the first electronic device modifies the first key according to the second key to generate a first target key, and sends the first key to the second electronic device so that the second electronic device modifies the second key according to the first key to generate a second target key. This process can be referred to as the process of information coordination between the first electronic device and the second electronic device to generate mutually matching first target keys and second target keys.

[0082] Among them, the first electronic device modifies the first key according to the second key, which can be understood as: retaining the first part of information that is the same as the first key and the second key, and performing target processing on the second part of information in the first key that is different from the second key.

[0083] The specific method of target processing is not limited here. Optionally, the second part of information in the second key that is different from the first key can be used to replace the corresponding second part of information in the first key; optionally, the mean of the second part of information in the first key that is different from the second key can be calculated, and the calculated mean can be used to replace the corresponding second part of information in the first key.

[0084] In the implementation manner of the present invention, since the second target key matches the first target key, when the target information is transmitted between the first electronic device and the second electronic device, the first target key and the second target key can be used to encrypt and decrypt the above target information respectively, thereby improving the security and convenience of transmitting the target information between the first electronic device and the second electronic device.

[0085] As an optional implementation manner, the modifying the first key according to the second key to generate the first target key includes:

[0086] modifying the first key according to the second key;

[0087] The modified first key is subjected to privacy amplification processing through a hash function to generate the first target key.

[0088] Among them, privacy amplification processing can be understood as amplifying the key information in the modified first key. The above key information may refer to the information at the key position in the first key or the information with higher importance in the first key, which is not limited here.

[0089] In an implementation manner of the present invention, a privacy amplification process is performed on the modified first key through a hash function to generate a first target key. In this way, the key information in the modified first key is amplified, thereby improving the diversity and flexibility of the generated first target key. At the same time, the key information in the modified first key is amplified, and the weight value of the key information in the modified first key is increased.

[0090] See also Figure 4 The embodiment of the present invention further provides a key generation method, which is applied to a second electronic device, and the method comprises the following steps:

[0091] Step 401: receiving a first target matrix sent by a first electronic device;

[0092] Step 402: Calculate a random scrambled order vector according to a second channel matrix and the first target matrix, wherein the second channel matrix is ​​used to represent a second target channel measurement value measured by the second electronic device, and the second target channel measurement value is a channel measurement value of a communication channel between the first electronic device and the second electronic device;

[0093] Step 403: Generate a second key according to the random scrambled sequence vector and a pre-acquired second initial key.

[0094] Among them, the difference between the embodiment of the present invention and the above-mentioned embodiment lies in the different execution subjects. The execution subject of the above-mentioned embodiment is the first electronic device, while the execution subject of the embodiment of the present invention is the second electronic device, and the embodiment of the present invention can be regarded as the corresponding embodiment of the above-mentioned embodiment on the second electronic device side. Therefore, the various technical features of the embodiment of the present invention can refer to the corresponding description of the corresponding technical features in the above-mentioned embodiment, and have the same beneficial technical effects, which will not be repeated here.

[0095] As an optional implementation manner, the calculating the random scrambled order vector according to the second channel matrix and the first target matrix includes:

[0096] Calculating a target correspondence relationship vector between the second channel matrix and the first target matrix by a bipartite graph matching algorithm;

[0097] The target correspondence vector is determined as the randomly scrambled order vector.

[0098] In the implementation manner of the present invention, the target correspondence relationship vector between the second channel matrix and the first target matrix is ​​calculated by a bipartite graph matching algorithm, so that the random scrambling order vector can be accurately and quickly determined.

[0099] Combined with the above statements, it can be seen that the core idea of ​​the embodiment of the present invention is that two legitimate communication users (i.e., the first electronic device and the second electronic device) perform the same order of random scrambling after principal component analysis processing on their respective channel measurement values. The consistency negotiation of the random scrambling order is achieved by the two legitimate communication users using the channel reciprocity and using the minimum weight-based bipartite graph matching algorithm to find the corresponding relationship between the channel measurement values ​​of both parties. Then, the two legitimate communication users perform quantization and random perturbation of the wireless physical layer key sequence based on the randomly scrambled channel measurement values ​​and the negotiated random scrambling order.

[0100] In order to more fully illustrate this embodiment, a specific embodiment is used as an example below. Figure 5 As shown:

[0101] Step 1: Channel sampling: Alice (i.e., the first electronic device) and Bob (i.e., the second electronic device) sample the channel through multiple rounds of sounding packet exchange, and each round of sounding is controlled within a channel coherence time τ to ensure channel reciprocity. Alice and Bob each send a channel pilot sequence to the other party and collect CSI (i.e., the first target channel measurement value or the second target channel measurement value). Among them, the CSI sequence with a length of N for the kth channel estimation is written as

[0102]

[0103] Where u = {a, b}, and a and b represent Alice and Bob respectively. k It obeys complex Gaussian distribution. is an independent and uniformly distributed zero-mean complex Gaussian noise, whose variance is written as in Used to represent variance, I N Used to represent sample data:

[0104]

[0105] After K channel samplings, Alice and Bob construct the CSI matrix H locally respectively. u (ie, the first channel matrix or the second channel matrix):

[0106]

[0107] Step 2: Principal component analysis preprocessing; Alice and Bob respectively calculate their CSI matrices H A (i.e., the first channel matrix) and H B The covariance matrix R (i.e., the second channel matrix) A and R B Perform eigenvalue decomposition, where Λ A and Λ B is the eigenvalue matrix, U A and U B is the eigenvector matrix. R A and R B can be written as:

[0108]

[0109] Due to the influence of environmental noise, the CSI collected by Alice and Bob are not exactly the same, but the eigenvectors obtained by decomposing their CSI matrices are similar. i}, the eigenvector matrices of Alice and Bob can be written as unitary matrices of dimension N×N:

[0110]

[0111] Alice and Bob sort their eigenvalue matrices and eigenvector matrices in descending order of eigenvalues. The sorted eigenvalue matrices are and The corresponding sorted eigenvector matrix is and in and The values ​​on the diagonal are the sorted eigenvalues, which can be written as:

[0112]

[0113] Alice and Bob choose their sorted eigenvector matrices and The first P eigenvectors in are used to construct the transformation matrix T with dimension N×P A and T B , where P is the number of selected feature vectors agreed upon by Alice and Bob in advance. A and T B It can be written as:

[0114]

[0115] Alice and Bob use the transformation matrix T A and T B Its CSI matrix H A and H B Perform signal reconstruction, and the CSI matrix after signal reconstruction is Y A (i.e., the first channel matrix after signal reconstruction) and Y B (i.e., the second channel matrix after signal reconstruction), the dimension is P×K, and the signal reconstruction process is given by the following formula:

[0116]

[0117] Step 3: Randomly shuffle the channel characteristics; Alice and Bob first straighten Y by column A and Y B , making them two 1×S, (S=P×K) dimensional vectors v A and v B :

[0118]

[0119] Where vec{·} is a column-wise straightening operation on a vector. Alice and Bob transform the vector v A and v B Split into M sequences of the same length P A and P B :

[0120]

[0121] in and is the mth sequence with a length of L = S / M. A , Alice determines a random scramble order PO:

[0122] PO=[k1,k2,…,k M ]#(11).

[0123] Alice then makes a decision on P based on PO. A Randomly scramble to create a new CSI sequence set (i.e. the first target matrix):

[0124]

[0125] where k m , k m ∈[1,M] is In P A The original sort order in .

[0126] Alice then sends the sequence set to Bob via a public channel where a potential attacker can monitor But the random perturbation order PO is not disclosed. For example: PO can refer to Figure 6 shown.

[0127] Step 4: Calculate the scrambling order; because of the mutual heterogeneity of channels, even if P A After random scrambling, the sequence set P B Each sequence in Always find The corresponding sequence in Bob can find P based on the minimum difference between the sequences A and P B The correspondence between the sequences in forms a perfect match, thus inferring The random scrambling order PO (i.e., random scrambling order vector) is obtained. After the two communicating parties have completed the negotiation on the random scrambling order, PO will be used as part of the key to participate in the subsequent key generation.

[0128] Alice and Bob's respective CSI sequence sets and P B Each sequence in is considered as a vertex of a weighted undirected graph G, and the vertices are connected by edges. Edges exist only in G and P B There are no edges connecting the vertices or P B The edge can then be written as E A,B (k m ,k), the edge weight can be expressed as:

[0129]

[0130] where km , k∈[1,M] and ‖·‖ represents the vector modulus operation. The smaller the difference between the two sequences, the smaller the weight of the edge. For example: see Figure 7 As shown. A perfect match in G consists of a set of vertex-disjoint edges to each vertex in G. Due to channel reciprocity, a perfect match can always be found in G to satisfy the reciprocal mapping between the sequences in Alice and Bob's respective sequence sets. The sum of the weights of all matches between Alice and Bob's sequence sets can be expressed as:

[0131]

[0132] where k m ,k∈[1,M]. The minimum weight bipartite graph matching problem is to find the matching with the minimum weight and achieve the maximum similarity between the pairwise matching sequences.

[0133] After calculating the random permutation order PO, Bob B (i.e., the second channel matrix) performs the same random scrambling and obtains a new CSI sequence set (i.e., the second target matrix). Since the original CSI sequence set P A The random scrambling order PO is not disclosed, so it is a secret between Alice and Bob and cannot be known by potential attackers. Therefore, determining the random scrambling order PO is equivalent to reaching a part of the key agreement between Alice and Bob.

[0134] Step 5: Key quantization: Alice and Bob quantize the randomly scrambled CSI sequence set and Restore to CSI matrix and at this time and It can be regarded as a new CSI matrix obtained after random scrambling.

[0135] The first step is to obtain the initial key. Alice and Bob randomly scramble their CSI matrices and Quantization is performed to obtain their respective initial key sequences IK A and IK B . The length of the initial key sequence is L1.

[0136] The second step is to use the agreed random scrambling order PO = [k1, k2, ..., k M ] Generate a random perturbation sequence. First, convert PO into a binary bit sequence RS. The length of the converted bit sequence RS is L2 = c × M, where c is the k in PO. m , (k m∈[1,M]) is converted into a binary bit sequence. Then RS is concatenated into a longer sequence RS′, and the random perturbation sequence is concatenated repeatedly until the length of RS′ is equal to the key length L1, that is:

[0137] L1=k×L2+k′#(15).

[0138] Where k is a positive integer and 0 <L2<L1。

[0139] The last step is to perform an XOR operation on the random perturbation sequence RS′ and the initial key (i.e., the first initial key or the second initial key). Alice and Bob each perform an XOR operation on their initial key IK A (i.e., the first initial key), IK B (i.e. the second initial key) and the disturbance sequence RS′ (i.e. the random scrambling sequence) are XORed to obtain the disturbed key PK A (i.e., the first key) and PK B (i.e., the second key), is given by:

[0140]

[0141]

[0142] Step 6: Alice and Bob exchange their randomly perturbed key sequence PK A and PK B Perform information coordination. After information coordination, Alice and Bob will eventually get a completely consistent set of key sequences SK A (i.e., the first target key) and SK B (i.e. the second target key):

[0143] SK A =SK B #(18).

[0144] Alice and Bob then use a hash function to achieve privacy amplification. The initial key sequence is converted into a fixed-length bit sequence through a hash function (i.e., the processing step corresponding to the privacy amplification process). After privacy amplification, Alice and Bob will obtain the final key (i.e., the first target key or the second target key) to encrypt their messages.

[0145] See also Figure 8 , Figure 8 is a structural diagram of a key generation device provided by an embodiment of the present invention, which is applied to a first electronic device, such as Figure 8 As shown, the key generation device 800 includes:

[0146] A first acquisition module 801 is used to acquire a first channel matrix, where the first channel matrix is ​​used to represent a first target channel measurement value obtained by measurement by the first electronic device, where the first target channel measurement value is a channel measurement value of a communication channel between the first electronic device and a second electronic device;

[0147] A first scrambling module 802, configured to scramble the first channel matrix by randomly scrambling a sequence vector to obtain a first target matrix;

[0148] The first generating module 803 is used to generate a first key according to the random scrambled order vector and a pre-acquired first initial key, and send the first target matrix to the second electronic device, where the first initial key corresponds to the first target matrix.

[0149] As an optional implementation, both the first electronic device and the second electronic device are Internet of Things devices.

[0150] As an optional implementation, the first generating module 803 includes:

[0151] A quantization processing submodule, used for performing quantization processing on the first target matrix to obtain the first initial key;

[0152] The XOR operation submodule is used to perform an XOR operation on the random scrambled order vector and the first initial key to generate the first key.

[0153] As an optional implementation, the first scrambling module 802 includes:

[0154] A signal reconstruction submodule, used for performing signal reconstruction on the first channel matrix;

[0155] The scrambling submodule is used to scramble the first channel matrix after signal reconstruction by using the random scrambling order vector to obtain the first target matrix.

[0156] As an optional implementation manner, the key generation device 800 further includes:

[0157] A second receiving module, configured to receive a second key sent by the second electronic device, where the second key is a key generated by the second electronic device according to the first target matrix and the second initial key;

[0158] The third generating module is used to modify the first key according to the second key to generate a first target key, and send the first key to the second electronic device so that the second electronic device modifies the second key according to the first key to generate a second target key, and the second target key matches the first target key.

[0159] As an optional implementation, the third generation module includes:

[0160] a correction submodule, used to correct the first key according to the second key;

[0161] The amplification processing submodule is used to perform privacy amplification processing on the modified first key through a hash function to generate the first target key.

[0162] The key generation device 800 can implement the embodiment of the present invention Figure 2 The various processes of the method embodiment and the same beneficial effects are achieved, and will not be described again here to avoid repetition.

[0163] See also Fig. 9 , Fig. 9 is a structural diagram of a key generation device provided by an embodiment of the present invention, which is applied to a second electronic device, such as Fig. 9 As shown, the key generation device 900 includes:

[0164] A first receiving module 901 is used to receive a first target matrix sent by a first electronic device;

[0165] A calculation module 902 is used to calculate a random scrambled order vector according to a second channel matrix and the first target matrix, wherein the second channel matrix is ​​used to represent a second target channel measurement value measured by the second electronic device, and the second target channel measurement value is a channel measurement value of a communication channel between the first electronic device and the second electronic device;

[0166] The second generating module 903 is used to generate a second key according to the random scrambled sequence vector and a pre-acquired second initial key.

[0167] As an optional implementation, the calculation module 902 includes:

[0168] A calculation submodule, configured to calculate a target correspondence relationship vector between the second channel matrix and the first target matrix by using a bipartite graph matching algorithm;

[0169] A determination submodule is used to determine the target correspondence relationship vector as the randomly scrambled order vector.

[0170] The key generation device 900 can implement the embodiment of the present invention Figure 4 The various processes of the method embodiment and the same beneficial effects are achieved, and will not be described again here to avoid repetition.

[0171] The embodiment of the present invention also provides an electronic device. Fig.10The electronic device may include a processor 1001, a memory 1002, and a program 10021 stored in the memory 1002 and executable on the processor 1001. When the electronic device is a first electronic device, the program 10021 may be executed by the processor 1001 to achieve Figure 2 Any steps in the corresponding method embodiments and achieving the same beneficial effects are not repeated here; when the electronic device is the second electronic device, the program 10021 can be implemented when the processor 1001 executes Figure 4 Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.

[0172] A person skilled in the art can understand that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware related to program instructions, and the program can be stored in a readable medium. The embodiment of the present invention also provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 2 or Figure 3 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.

[0173] The storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0174] The embodiment of the present invention also provides a computer program product, including computer instructions, which can achieve the above-mentioned Figure 2 or Figure 4 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.

[0175] The above is a preferred implementation of the embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A key generation method, characterized in that: Applied to a first electronic device, the method includes: Acquire a first channel matrix, where the first channel matrix is ​​used to represent a first target channel measurement value obtained by measurement by the first electronic device, where the first target channel measurement value is a channel measurement value of a communication channel between the first electronic device and a second electronic device; Scrambling the first channel matrix by randomly scrambling a sequence vector to obtain a first target matrix; A first key is generated according to the random scrambled order vector and a pre-acquired first initial key, and the first target matrix is ​​sent to the second electronic device, where the first initial key corresponds to the first target matrix.

2. The method according to claim 1, characterized in that The first electronic device and the second electronic device are both Internet of Things devices.

3. The method according to claim 1, characterized in that: The step of generating a first key according to the random scrambled order vector and a pre-acquired first initial key comprises: Performing quantization processing on the first target matrix to obtain the first initial key; An XOR operation is performed on the random scrambled order vector and the first initial key to generate the first key.

4. The method according to claim 1, characterized in that: The step of scrambling the first channel matrix by randomly scrambling the sequence vector to obtain a first target matrix includes: Performing signal reconstruction on the first channel matrix; The first channel matrix after signal reconstruction is scrambled by using the random scrambling order vector to obtain the first target matrix.

5. The method according to any one of claims 1 to 4, characterized in that After generating the first key according to the random scrambled order vector and the pre-acquired first initial key, and sending the first target matrix to the second electronic device, the method further includes: receiving a second key sent by the second electronic device, where the second key is a key generated by the second electronic device according to the first target matrix and the second initial key; The first key is modified according to the second key to generate a first target key, and the first key is sent to the second electronic device so that the second electronic device modifies the second key according to the first key to generate a second target key, and the second target key matches the first target key.

6. The method according to claim 5, characterized in that The step of modifying the first key according to the second key to generate a first target key includes: modifying the first key according to the second key; The modified first key is subjected to privacy amplification processing through a hash function to generate the first target key.

7. A key generation method, characterized in that: Applied to a second electronic device, the method includes: Receiving a first target matrix sent by a first electronic device; A randomly scrambled sequence vector is calculated according to a second channel matrix and the first target matrix, wherein the second channel matrix is ​​used to represent a second target channel measurement value measured by the second electronic device, and the second target channel measurement value is a channel measurement value of a communication channel between the first electronic device and the second electronic device; A second key is generated according to the random scrambled sequence vector and a pre-acquired second initial key.

8. The method according to claim 7, characterized in that The step of calculating the random scrambled order vector according to the second channel matrix and the first target matrix includes: Calculating a target correspondence relationship vector between the second channel matrix and the first target matrix by a bipartite graph matching algorithm; The target correspondence vector is determined as the randomly scrambled order vector.

9. A key generation device, characterized in that: Applied to a first electronic device, the key generation device comprises: A first acquisition module, configured to acquire a first channel matrix, where the first channel matrix is ​​used to represent a first target channel measurement value obtained by measurement by the first electronic device, where the first target channel measurement value is a channel measurement value of a communication channel between the first electronic device and a second electronic device; A first scrambling module, configured to scramble the first channel matrix by randomly scrambling a sequence vector to obtain a first target matrix; The first generating module is used to generate a first key according to the random scrambled order vector and a pre-acquired first initial key, and send the first target matrix to the second electronic device, wherein the first initial key corresponds to the first target matrix.

10. A key generation device, characterized in that: Applied to a second electronic device, the key generating device comprises: A first receiving module, configured to receive a first target matrix sent by a first electronic device; a calculation module, configured to calculate a random scrambled order vector according to a second channel matrix and the first target matrix, wherein the second channel matrix is ​​used to represent a second target channel measurement value measured by the second electronic device, and the second target channel measurement value is a channel measurement value of a communication channel between the first electronic device and the second electronic device; The second generating module is used to generate a second key according to the random scrambled sequence vector and a pre-acquired second initial key.

11. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps of the key generation method as described in any one of claims 1 to 6; or to implement the steps of the key generation method as described in any one of claims 7 to 8.

12. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the program implements the steps in the key generation method according to any one of claims 1 to 6; or, implements the steps in the key generation method according to any one of claims 7 to 8.

13. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps in the key generation method as described in any one of claims 1 to 6, or, when executed by a processor, implement the steps in the key generation method as described in any one of claims 7 to 8.

Citation Information

Cited By

  • Object detection method and system, electronic equipment and computer readable storage medium

    CN118965274A

  • Key processing method and device, related equipment, storage medium and computer program product

    CN119652661A