Key Generation Method, Apparatus, Electronic Device, and Storage Medium

By obtaining wireless channel characteristic parameters and using sliding window technology to generate a key matrix, the problem of insufficient key security and randomness at high key rates is solved, and efficient and secure key generation in wireless communication is achieved.

CN114448611BActive Publication Date: 2025-07-29ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011204835.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-02
Publication Date
2025-07-29
Estimated Expiration
2040-11-02

AI Technical Summary

Technical Problem

The existing wireless communication key generation method is difficult to take into account both the security and randomness of keys at high key rates. Especially in dynamic wireless networks, traditional methods have problems of high complexity and high cost of key distribution.

Method used

By obtaining the channel characteristic parameters of the wireless channel, generating a key, and using sliding window technology to intercept the key matrix, and substituting it according to the key correlation, ensuring that the number and randomness of the keys in the key pool meet the requirements.

Benefits of technology

At high key rate, the randomness and security of the key are ensured, the computing cost is reduced, the complexity of key distribution is avoided, and the efficiency of channel encryption is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114448611B_ABST
    Figure CN114448611B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to the field of communication technologies, and disclose a key generation method, apparatus, electronic device, and storage medium. The key generation method in the present invention includes: obtaining channel characteristic parameters of a wireless channel; generating a key according to the channel characteristic parameters; after continuously generating multiple keys, intercepting a first key matrix with a sliding window of a preset length to obtain a second key matrix; determining the correlation of each key in the second key matrix, and if the correlation between the keys in the second key matrix is greater than a preset threshold, performing key permutation on the keys in the second key matrix; adding the keys in the second key matrix to a key pool until the number of keys in the key pool reaches a preset number. By the above technical means, under the requirement of a high key rate, the randomness of the key can still be ensured, so that the key can meet the security requirements of the channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technologies, and in particular, to a method, apparatus, electronic device, and storage medium for generating keys. Background Art

[0002] At present, wireless communication has been widely used in both military and civilian fields. However, the open characteristic unique to wireless communication leads to low security of wireless information transmission. The traditional solution is to encrypt data through public and private key pairs at the network layer. However, in a dynamic wireless network, the symmetric encryption method needs to solve the problem of key distribution in wireless communication. On the one hand, key distribution introduces additional complexity and cost, and it is impossible to quickly update the key or use one-time pad encryption. Therefore, currently, a physical layer key generation method based on the wireless channel is generally used to encrypt the wireless channel. For example, in an adaptive channel detection scheme based on a proportional-integral-derivative (PID) controller, the received signal strength (RSS) is used as the channel feature. First, a mathematical model of the key generation rate is established, and it is confirmed that there is a proportional relationship between the channel detection rate and the key rate. The biggest feature of choosing this method is to utilize the reciprocity of the uplink and downlink channel characteristics within the coherence time, and directly obtain the key from the channel parameters. Its operation cost is generally lower than that of the traditional network layer encryption method, and there is no problem of key distribution.

[0003] However, when the user requires a high key rate, the current key generation method will adaptively increase the detection rate, which reduces the randomness between measurement values and has a certain impact on the security of the key. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to propose a method, apparatus, electronic device, and storage medium for generating keys, which intercept the keys generated multiple times in a sliding window manner, and perform permutation on the keys with high correlation, so as to improve the security of the key when generating keys at a high rate.

[0005] To achieve the above object, the embodiments of the present application provide a method for generating keys, including: obtaining channel characteristic parameters of a wireless channel; generating a key according to the channel characteristic parameters; after continuously generating multiple keys, intercepting a first key matrix with a sliding window of a preset length to obtain a second key matrix; determining the correlation of each key in the second key matrix, and if the correlation between the keys in the second key matrix is greater than a preset threshold, performing key permutation on the keys in the second key matrix; adding the keys in the second key matrix to a key pool until the number of keys in the key pool reaches a preset number.

[0006] To achieve the above object, an embodiment of the present application further provides a key generation device, including: a parameter acquisition module, configured to acquire channel characteristic parameters of a wireless channel; a key generation module, configured to generate a key according to the channel characteristic parameters; a sliding intercept module, configured to, after continuously generating a plurality of keys, intercept a first key matrix formed by the plurality of keys with a sliding window of a preset length to obtain a second key matrix; a key permutation module, configured to determine the correlation of each key in the second key matrix; if the correlation between the keys in the second key matrix is greater than a preset threshold, perform key permutation on the keys in the second key matrix; a key selection module, configured to add the keys in the second key matrix to a key pool until the number of keys in the key pool reaches a preset number.

[0007] To achieve the above object, an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the key generation method as described above.

[0008] To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium, storing a computer program, and when the computer program is executed by a processor, the key generation method as described above is implemented.

[0009] The key generation method proposed by the present application intercepts the bit stream generated by the single-channel characteristic parameter in a sliding window manner. When the correlation of the keys in the window is relatively high, the last key is permuted, and this operation is repeated until the keys in the window meet the randomness requirement, and the keys that meet the randomness requirement are added to the key pool, which can ensure that the randomness of the keys can meet the channel security requirements under the high key rate requirement. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 is a flowchart of the key generation method according to the first embodiment of the present invention;

[0011] Figure 2 is a statistical chart of the channel estimation error in each channel estimation method according to the first embodiment of the present invention;

[0012] Figure 3 is a flowchart of the key generation method according to the second embodiment of the present invention;

[0013] Figure 4 is a flowchart of the key generation method according to the third embodiment of the present invention;

[0014] Figure 5 is a statistical chart of the inconsistency rate under different quantization strategies according to the third embodiment of the present invention;

[0015] Figure 6 It is a schematic structural diagram of a key generation device according to the fourth embodiment of the present invention;

[0016] Figure 7 It is a schematic structural diagram of an electronic device according to the fifth embodiment of the present invention. Detailed implementation manners

[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will elaborate on each embodiment of the present application in conjunction with the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are presented for the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can still be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation to the specific implementation manners of the present application. The various embodiments can be combined and cross-referenced with each other on the premise of not conflicting with each other.

[0018] The first embodiment of the present invention relates to a key generation method, including: obtaining channel characteristic parameters of a wireless channel; generating a key according to the channel characteristic parameters; after continuously generating multiple keys, intercepting a first key matrix with a sliding window of a preset length to obtain a second key matrix; determining the correlation of each key in the second key matrix, and if the correlation between the keys in the second key matrix is greater than a preset threshold, performing key permutation on the keys in the second key matrix; adding the keys in the second key matrix to a key pool until the number of keys in the key pool reaches a preset number.

[0019] The following further elaborates on this embodiment in conjunction with the accompanying drawings. The key generation method in this embodiment is as Figure 1 shown and includes:

[0020] Step 101, obtaining channel characteristic parameters of a wireless channel.

[0021] Specifically, the channel characteristic parameters of a wireless channel belong to the physical characteristics of the channel. Due to the reciprocity of the uplink and downlink channels within the coherence time, the channel characteristic parameters collected by both communication parties are basically the same. Since the collected channel characteristic parameters are highly consistent, it can be ensured that the keys generated at the upper and lower ends generally have little difference. Finally, the two communication parties perform information reconciliation to correct the initial keys, and ultimately obtain exactly the same keys. Obtaining keys directly from channel parameters generally has a lower computational cost than traditional network layer encryption methods and there is no problem of key distribution.

[0022] In one example, the channel characteristic parameters need to be obtained through a channel model. First, the wireless channel is probed to obtain the probing parameters of the channel, and then based on a preset channel model, the channel characteristic parameters are calculated according to the probing parameters. The key generation method in this embodiment is applied in the millimeter-wave communication scenario. Millimeter waves usually use the narrowband clustered ray model for modeling. Among them, the clustered ray model is a channel model commonly used in millimeter-wave hybrid precoding and channel estimation. Its main parameters include the angle of arrival, the angle of departure, and the path gain. Assume that the millimeter-wave channel consists of different clusters, and each cluster contains only a finite number of physical propagation paths, which conforms to the characteristic of limited propagation paths of millimeter waves. Specifically, assume that the base station is equipped with N t antennas, and the user is equipped with N r antennas. The channel matrix H contains N cl clusters, and each cluster has N ray propagation paths. The channel is represented by the following formula:

[0023]

[0024] where α il is the path complex gain of the l-th ray in the i-th cluster, that is, the path gain parameter represented by a complex number. θ il θ il , φ il are the angle of arrival (AoA) and the angle of departure (AoD) of the corresponding path respectively. a(θ il ) and a t (φ il ) represent the array response vectors of the base station and the legitimate user respectively. Since millimeter waves have only a finite number of spatial propagation paths, its main parameters include the angle of arrival, the angle of departure, and the path gain. According to the characteristics of the millimeter-wave channel, compressive sensing technology is used for channel estimation. By comparing the reference signals at the receiving end and the transmitting end, the characteristic parameters of the channel are calculated. In this embodiment, the obtained channel characteristic parameter is the path gain parameter.

[0025] Furthermore, in this embodiment, the orthogonal matching pursuit algorithm in compressive sensing is used to estimate the channel. The angular domain [0, π] is divided into 180 grids as the candidate set of the angle of arrival and the angle of departure, that is, the angle of arrival and the angle of departure are distinguished in units of 1°, and the sensing matrix is further designed. When designing the sensing matrix, try to make the overall correlation between the column vectors of the sensing matrix relatively low. The angles with the highest correlation with the channel detection values are selected from the candidate set as the combination pairs of the angle of arrival and the angle of departure, so as to estimate the path gain parameter value α l corresponding to this combination pair.

[0026] In addition, the clustered ray model adopted in this embodiment can also be replaced by other millimeter-wave channel models, and the channel characteristic parameters referred to for quantization are not limited to the path gain parameters mentioned above.

[0027] In a specific implementation, simulation and performance analysis are carried out for millimeter-wave channel estimation. The OMP method is used to estimate the channel, and the least squares (LS) estimation, Oracle estimation, and OMP estimation are compared. Assume the number of antennas N t = N r = 32, the number of RF chains The channel contains 5 clusters, and there is only 1 propagation path in each cluster, that is, L = 5, and the path gain follows The mean of the angle of arrival / departure in each cluster follows a uniform distribution on [0, 2π], and the standard deviation σ AS = 15. Both the base station and the user use 24 training beams for pilot training, The power of the pilot symbol is 1. The simulation performs 500 channel realizations to obtain the average channel estimation error. Among them, the estimation errors of different estimation methods are as Figure 2 shown, and the normalized mean square error NMSE between the estimated channel and the original channel is defined as:

[0028]

[0029] It can be seen that at different signal-to-noise ratios SNR, as the signal-to-noise ratio increases, the estimation errors of the three schemes become smaller and smaller. Among them, the Oracle estimation has the best performance because it assumes that the angle of arrival / departure is known and only needs to estimate the path gain. In the actual estimation algorithm, the OMP estimation is better than the LS estimation algorithm because fewer training beams are used and the number of measurement values The LS estimation can only achieve partial training, and generally, the LS estimation requires to achieve full training. In the OMP estimation, when the signal-to-noise ratio is greater than 0 dB, the error is lower than -10 dB, so the scheme can reliably achieve channel estimation, and the estimated path gain, which is a channel parameter, will be used as the quantization parameter for key generation.

[0030] Step 102, generate a key according to the channel characteristic parameters.

[0031] Specifically, the process of generating a key based on channel characteristic parameters is called quantization, and its main process includes: determining a quantization threshold according to a preset quantization strategy; mapping the channel characteristic parameters to bit values according to the quantization threshold. It can be understood that a key is a binary string composed of bit values. Quantization strategies can generally be divided into two categories, the quantization strategy based on the mean μ and standard deviation σ in the normal distribution, and the quantization strategy based on the cumulative distribution function CDF. Further, determine the quantization threshold according to the preset quantization strategy, and then map the channel characteristic parameters obtained in step 101 to the preset values according to the quantization threshold. The preset values generally use bit values.

[0032] Among them, the quantization strategy based on the mean μ and standard deviation σ in the normal distribution is simple to implement, and the quantization threshold is

[0033] η+ = μ + α × σ

[0034] η- = μ - α × σ

[0035] When α ≠ 0, the measured values between η+ and η- will be discarded. Samples higher than η+ are mapped to 1, and samples lower than η- are mapped to 0. However, discarding some measured values will affect the key generation rate.

[0036] The quantization strategy based on the cumulative distribution function CDF is more flexible and can design multi-bit quantization.

[0037] In an example, assume that the current millimeter-wave channel has been detected to have ten spatial propagation paths. Then, determine the channel characteristic parameters of each path on the ten spatial propagation paths respectively, and then according to the quantization strategy, map the ten channel characteristic parameters to ten binary strings composed of bit values respectively, so as to generate a key composed of ten binary strings.

[0038] Step 103, after continuously generating multiple keys, intercept the first key matrix formed by multiple keys with a sliding window of a preset length to obtain a second key matrix.

[0039] Specifically, through multiple channel estimations, due to the change of the channel gain parameter in time, multiple different keys can be obtained according to multiple groups of different channel characteristic parameters (each channel estimation can generate a key). After arranging multiple keys according to time and combining them together, a first key matrix is formed. The preset length of the sliding window refers to the number of columns intercepted from the first matrix. Intercept the first matrix with a sliding window of a preset length, that is, each time intercept a matrix with a fixed number of columns from the first matrix in sequence as the second key matrix. After each interception, move one bit backward and intercept again.

[0040] Step 104: Determine the correlation of each key in the second key matrix; when the correlation between the keys in the second key matrix is greater than a preset threshold, perform key permutation on the keys in the second key matrix.

[0041] Specifically, the second key matrix obtained by interception contains multiple keys, and the number of keys obtained by a single interception is related to the length of the sliding window. After the second key matrix is obtained by interception, determine the correlation between each key. When the correlation meets the preset threshold, directly add the keys in the second key matrix to the key pool for channel encryption; when the correlation does not meet the preset threshold, perform key permutation on the keys. The way of key permutation is specifically to change the values of some bits in the key, so that the newly generated key after permutation has higher randomness and can meet the security requirements of the channel. In addition, since the base stations and users at both ends of the channel have agreed on the quantization and key permutation rules, they can operate synchronously to obtain keys with a high coincidence rate.

[0042] Step 105: Add the keys in the second key matrix to the key pool until the number of keys in the key pool reaches a preset number.

[0043] Specifically, after performing key permutation on the keys in the second key matrix, make the correlation between the keys in the second key matrix less than the preset threshold, and then add the keys in the second key matrix to the key pool for channel encryption. The number of keys in the key pool is set with an upper limit of the preset number. When the number of keys already existing in the key pool reaches the upper limit, no more keys will be added to the key pool until the keys in the key pool are used and removed from the key pool.

[0044] Compared with the related technologies in this field, the key generation method in this embodiment intercepts the bit stream through a sliding window, and obtains multiple groups of keys from the bit stream quantized by the channel characteristic parameters obtained by a single channel detection, so as to increase the number of keys at a fixed channel detection rate, and can ensure that the key generation rate meets the user requirements while ensuring the randomness of the keys.

[0045] It should be noted that the above examples in this embodiment are all for illustrative purposes for easy understanding and do not limit the technical solutions of the present invention.

[0046] The second embodiment of the present invention relates to a key generation method. The second embodiment is substantially the same as the first embodiment, and the main difference is that: in the second embodiment, key permutation is performed on the keys in the second key matrix, including: performing a permutation operation on the last key in the second key matrix bit by bit, and re-determining the correlation between the keys in the second key matrix after each permutation operation; if the correlation between the keys in the second key matrix is not greater than a preset threshold, then perform the operation of adding the keys in the second key matrix to the key pool; where the key added to the key pool is the last key.

[0047] The following further elaborates on this embodiment in conjunction with the accompanying drawings. The key generation method in this embodiment is as Figure 3 shown and includes:

[0048] Step 301, obtain the channel characteristic parameters of the wireless channel.

[0049] Step 302, generate a key according to the channel characteristic parameters.

[0050] Step 303, after continuously generating multiple keys, intercept the first key matrix formed by multiple keys with a sliding window of a preset length.

[0051] Steps 301 to 303 are the same as steps 101 to 103 in the first embodiment of the present invention. The relevant implementation details have been specifically described in the first embodiment and will not be elaborated here.

[0052] Step 304, determine whether the correlation between the keys in the second key matrix is greater than a preset threshold; if the correlation between the keys in the second key is greater than the preset threshold, then perform step 305, perform a permutation operation on the last key in the second key matrix, and then perform step 304 again; if the correlation between the keys in the second key is not greater than the preset threshold, then perform step 306, add the last key in the second key matrix to the key pool.

[0053] Specifically, the intercepted second key matrix contains multiple keys, and the number of keys obtained by a single interception is related to the length of the sliding window. After intercepting the second key matrix, the correlation between each key is determined. When the correlation meets the preset threshold, the keys in the second key matrix are directly added to the key pool for channel encryption. When the correlation does not meet the preset threshold, key permutation is performed on the keys. Among them, key permutation means permuting the codewords of the keys bit by bit. When the correlation is still greater than the preset threshold after all bits of the key are permuted, the key is removed from the first key matrix, and then the next key outside the sliding window is added to the sliding window to calculate the correlation again. The way of key permutation is specifically to take the values of some bits in the key, so that the newly generated key after permutation has high randomness and can meet the security requirements of the channel. In addition, since the base stations and users at both ends of the channel have agreed on the quantization and key permutation rules, they can operate synchronously to obtain keys with a high coincidence rate.

[0054] In one example, the average Hamming distance is used to measure the correlation between a group of keys. Suppose the size of the designed sliding window W is 5, and initially it contains 5 groups of key sequences [k1, k2, k3, k4, k5], where k i is a column vector, that is, a key generated after one channel estimation. Calculate the average Hamming distance of the 5 groups of keys in the sliding window where W(m) represents the m-th column of the window, and D(W) = ∑ 1≤m<n≤5 dist(W(m), W(n)) is the sum of the Hamming distances between each column. When the 5 keys in the window are quite different, and the average Hamming distance exceeds the preset threshold δ, meeting the randomness requirement. The last key k j in the window can be put into the key pool, and the window is shifted one bit to the right to perform the randomness verification of the next 5 groups of keys. If it indicates that the average distance of the 5 keys in the current window is small and the key randomness is insufficient. At this time, take the last column k j in the window, where k j contains N bits, and perform permutation operations on its N bit positions in turn: 0 becomes 1 (1 becomes 0). After each bit permutation, recalculate the average Hamming distance of the second key matrix in the window When the second key matrix in the window meets the randomness requirement, put its last column k j into the key pool. If the Hamming distance of the second key matrix in the window cannot reach the threshold standard after N-bit permutation, then discard the last column k j and add the next group of keys to the window for a new round of randomness verification. The sliding window continuously verifies 200 groups of key sequences and outputs keys with high randomness.

[0055] In a specific application, in the above example, the second key matrix is obtained by intercepting the first key matrix with a sliding window of a preset length, and the process of key permutation can be implemented by the following program code:

[0056]

[0057] In addition, in this embodiment, a method for testing the randomness of a sliding window is also provided, which is specifically as follows:

[0058] For the multi-bit adaptive quantization (MAQ) scheme, each channel realization can generate a set of keys (5 bits), and the sliding window contains 5 sets of keys, that is, W is a 5×5 matrix. The randomness of the keys is tested using the sliding window. If the correlation of the 5 sets of keys in the window is too high, the last set of keys is modified in terms of bits to reduce the correlation of the keys in the window. When SNR = 10, 200 sets of keys (1000 bits) are selected for sliding window testing, and when comparing different preset correlation coefficient thresholds δ, the number of remaining bits that meet the randomness requirements is as shown in the following table. The larger δ is, the higher the requirement for the randomness of the second key matrix, the number of keys that do not meet the requirements increases, that is, they are discarded, and the remaining number of bits decreases. When δ is too large, the remaining number of bits will decrease rapidly.

[0059] δ 2.5 2.6 2.7 2.8 2.9 3.0 3.1 Number of bits 885 885 755 755 585 585 20

[0060] For the key sequence after the sliding window strategy, the NIST statistical test is used to test its randomness. The NIST test suite contains 16 test methods to evaluate different random characteristics, and each method returns a P value. When P≥α, it indicates that the sequence is random. Here, let α = 0.01, and the key sequence is 885 bits when δ = 2.5. We select 4 test methods in the NIST test suite to evaluate the randomness of the keys, as shown in the following table. It can be seen that the returned P≥0.01, and the keys generated by the sliding window strategy meet the randomness requirements. For the 1000-bit key sequence without the sliding window, the P value of its sequence test is 6.3045e -9 , and the randomness does not meet the requirements.

[0061] Test item Frequency test Intra-block frequency test Sequence test Cumulative sum test P 0.0554 0.0045 0.2198 0.0947

[0062] Compared with the related technologies in this field, the key generation method in this embodiment intercepts the bit stream through a sliding window, obtains multiple sets of keys from the bit stream quantized by the channel characteristic parameters obtained in one channel detection, and determines whether the correlation between the keys in a set of keys meets the requirements, and permutes the keys that do not meet the requirements, so as to better ensure that the randomness of the keys can meet the security requirements of the channel.

[0063] The third embodiment of the present invention relates to a key generation method. The third embodiment is substantially the same as the first embodiment, and the main difference lies in that: in the third embodiment, a multi-bit adaptive quantization strategy based on the cumulative distribution function (CDF) is used to quantify the channel characteristic parameters, and the measured values of the channel characteristic parameters are mapped into bit values.

[0064] The following further elaborates on this embodiment with reference to the accompanying drawings. The key generation method in this embodiment is as Figure 4 shown and includes:

[0065] Step 401: Obtain the channel characteristic parameters of the wireless channel.

[0066] Step 401 is the same as step 101 in the first embodiment of the present invention. The relevant implementation details have been specifically described in the first embodiment and will not be elaborated here.

[0067] Step 402: Determine the quantization threshold according to the preset quantization strategy.

[0068] Step 403: Map the channel characteristic parameters into bit values according to the quantization threshold.

[0069] Specifically, the quantization strategy is implemented by a quantizer. The quantization threshold is set through the design of the quantizer. By adjusting the quantization level and the quantization threshold, the generated key can meet the requirements of randomness, a better generation rate, and an inconsistency rate.

[0070] Furthermore, the specific algorithm for adopting the multi-bit adaptive quantization strategy is as follows:

[0071] Input: The Nth path gain estimation value α(i) of the base station, i = 1, 2,..., N

[0072] 1:

[0073] 2: The CDF of α(i) i (y) = P[α(i) ≤ y]

[0074] 3:

[0075] 4: η0 = -∞, η K = ∞, k(i) = max{k s.t. α(i) > η k-1}

[0076] 5:

[0077] 6:

[0078] 7:

[0079] Output: z = [d e(k(1)) (k(1)), …, d e(k(N)) (k(N))]

[0080] Assume that the base station is the leader node and the user is the follower node. The path gain sequence estimated by the base station side is α(i), i = 1, 2, …, N. For each path gain, the number of quantization levels is m i which is the number of bits after quantization. In steps 2 and 3, calculate the cumulative distribution function F i (y) of α(i), and its inverse function is the quantization threshold η k . The k-th quantization interval is expressed as (η k-1 , η k , k = 1, …, K. Use k(i) to represent the quantization interval index where α(i) is located. Design the binary variable e(k) as the binary representation of k for the subsequent selection of codewords. List the ordered Gray code B containing codewords, and the length of each codeword is m i bits. Assign the f1(k)-th codeword in B to the codeword d1(k) of MAQ. d0(k) is obtained by circularly shifting d1(k) by 2 bits. The base station first determines the quantization interval k(i) for the estimated N α(i)'s and sends the vector e = [e(k(1)), …, e(k(N))] T to the user. When e = 1, the base station and the user select the codeword d1, and when e = 0, they select the codeword d2. Then the final obtained key z = [d e(k(1)) (k(1)), …, d e(k(N)) (k(N))].

[0081] Among them, for the case of m i = 1, the codewords of multi-bit adaptive quantization are shown in the following table:

[0082]

[0083] Step 404, after continuously generating multiple keys, intercept the first key matrix formed by multiple keys with a sliding window of a preset length.

[0084] Step 405, determine the correlation of each key in the second key matrix. When the correlation between the keys in the second key matrix is greater than the preset threshold, permute the keys in the second key matrix.

[0085] Step 406, add the keys in the second key matrix to the key pool until the number of keys in the key pool reaches the preset number.

[0086] Steps 404 to 406 are the same as steps 103 to 105 in the first embodiment of the present invention. The relevant implementation details have been specifically described in the first embodiment and will not be elaborated here.

[0087] In addition, performance analysis of different quantization strategies is provided in this embodiment, as follows:

[0088] In the channel sounding stage, since the channel contains 5 propagation paths, 5 path gains can be estimated for each channel realization. The modulus value of the path gain can be used as the quantization parameter. 2000 modulus values of path gains obtained from 400 channel soundings will be used as the input parameters of the MAQ quantization scheme. The number of bits m i = 1, and the total quantization level K = 8. Through multi-bit adaptive quantization, a key string with a length of 2000 bits can be obtained. In a TDD system, the key generation between the base station and the user is based on the reciprocity of the wireless channel, but affected by additive noise, the estimation of channel parameters by the base station and the user is not completely consistent, so key inconsistency will occur. For the bit string with a length of 2000, as Figure 5 shown, the comparison of the key inconsistency rate between the quantization method based on the cumulative distribution function (MAQ) and the quantization method based on the mean and standard deviation at different signal-to-noise ratios. It can be found that in both quantization methods, the smaller the noise, the smaller the impact on the symmetric keys generated by both communication parties, and the key inconsistency rate decreases. At the same time, the performance of MAQ quantization is better than that of the quantization method based on the mean. Moreover, in the latter quantization process, to ensure a certain key randomness, some continuously repeated bits are discarded, resulting in a reduction in its key generation rate.

[0089] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are within the protection scope of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of its algorithm and process are within the protection scope of this patent.

[0090] The fourth embodiment of the present invention relates to a key generation device, as Figure 6 shown, including:

[0091] A parameter acquisition module 601, configured to acquire channel characteristic parameters of a wireless channel.

[0092] A key generation module 602, configured to generate a key according to the channel characteristic parameters.

[0093] A sliding intercept module 603, configured to, after continuously generating multiple said keys, intercept a first key matrix formed by multiple keys with a sliding window of a preset length to obtain a second key matrix.

[0094] The key permutation module 604 is used to determine the correlation between the keys in the second key matrix; if the correlation between the keys in the second key matrix is greater than a preset threshold, key permutation is performed on the keys in the second key matrix.

[0095] In one example, the key permutation module 604 is further used to perform a permutation operation on the last key in the second key matrix bit by bit, and determine the correlation between the keys in the second key matrix again after each permutation operation; if the correlation between the keys in the second key matrix is not greater than the preset threshold, the key in the second key matrix is added to the key pool; where the key added to the key pool is the last key.

[0096] In another example, after the key permutation module 604 determines the correlation between the keys in the second key matrix again after each permutation operation, if the correlation between the keys in the second key matrix is greater than the preset threshold after all bits of the last key are permuted, the last key is discarded.

[0097] The key selection module 605 adds the keys in the second key matrix to the key pool until the number of keys in the key pool reaches a preset number.

[0098] It is worth mentioning that each module involved in this implementation is a logical module. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovative part of the present invention, units that are not closely related to solving the technical problems proposed by the present invention are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.

[0099] The fifth embodiment of the present invention relates to an electronic device, such as Figure 7As shown in the figure, it includes: at least one processor 701; and a memory 702 communicatively connected to the at least one processor 701; wherein, the memory 702 stores instructions executable by the at least one processor 701, and the instructions are executed by the at least one processor 701 to enable the at least one processor 701 to execute the key generation method in the first, second, or third embodiment. Among them, the memory 702 and the processor 701 are connected in a bus manner. The bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 701 and the memory 702 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, so they will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or multiple elements, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium. The data processed by the processor 701 is transmitted on the wireless medium through the antenna. Further, the antenna also receives data and transmits the data to the processor 701. The processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory 702 can be used to store the data used by the processor 701 when performing operations.

[0100] The sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiments are implemented. That is, those skilled in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium, including several instructions for enabling a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes. Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes can be made in form and details without departing from the spirit and scope of the present invention.

Claims

1. A key generation method, characterized in that, Including: Obtaining channel characteristic parameters of a wireless channel; Generating a key according to the channel characteristic parameters; After continuously generating a plurality of the keys, intercepting a first key matrix formed by a plurality of the keys column by column with a sliding window of a preset length to obtain a second key matrix with a fixed number of columns in the first key matrix; Calculating the average Hamming distance of each key in the second key matrix; Determining the correlation of each key in the second key matrix according to the average Hamming distance and in combination with the NIST test. If the correlation between the keys in the second key matrix is greater than a preset threshold, performing key permutation on the keys in the second key matrix; Adding the keys in the second key matrix to a key pool until the number of keys in the key pool reaches a preset number.

2. The key generation method according to claim 1, wherein The performing key permutation on the keys in the second key matrix includes: Performing a permutation operation on the last key in the second key matrix bit by bit, and determining the correlation of each key in the second key matrix again after each permutation operation; If the correlation between the keys in the second key matrix is not greater than the preset threshold, performing the adding the keys in the second key matrix to the key pool; wherein, the key added to the key pool is the last key.

3. The key generation method according to claim 2, characterized in that, After determining the correlation of each key in the second key matrix again after each permutation operation, it further includes: If the correlation between the keys in the second key matrix is greater than a preset threshold after all bits of the last key are permuted, discarding the last key.

4. The key generation method according to claim 1, characterized in that, The generating a key according to the channel characteristic parameters includes: Performing a quantization operation on the channel characteristic parameters, wherein the steps of the quantization operation include: Determining a quantization threshold according to a preset quantization strategy; Mapping the channel characteristic parameters to bit values according to the quantization threshold.

5. The key generation method according to claim 4, wherein The quantization strategy is a quantization strategy based on a probability density function.

6. The key generation method according to claim 5, wherein The preset channel model is a narrowband clustered ray model; The channel characteristic parameters are path gain parameters.

7. A key generation device, characterized in that, Including: A parameter acquisition module for acquiring channel characteristic parameters of a wireless channel; A key generation module for generating a key according to the channel characteristic parameters; A sliding interception module for, after continuously generating a plurality of the keys, intercepting a first key matrix formed by a plurality of the keys column by column with a sliding window of a preset length to obtain a second key matrix with a fixed number of columns in the first key matrix; A key permutation module for calculating the average Hamming distance of each key in the second key matrix; determining the correlation of each key in the second key matrix according to the average Hamming distance and in combination with the NIST test; If the correlation between the keys in the second key matrix is greater than a preset threshold, performing key permutation on the keys in the second key matrix; A key selection module for adding the keys in the second key matrix to a key pool until the number of keys in the key pool reaches a preset number.

8. An electronic device, characterized in that, Including: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the key generation method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the key generation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Wireless channel fingerprint generation method

    CN110061834A

  • Public key cryrography method

    CN1224555A

  • Key data generation device, key data generation method, and program

    JP2013247439A