WO2022089217A9 - 密钥生成方法、装置、电子设备及存储介质 - Google Patents

密钥生成方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2022089217A9
WO2022089217A9 PCT/CN2021/123855 CN2021123855W WO2022089217A9 WO 2022089217 A9 WO2022089217 A9 WO 2022089217A9 CN 2021123855 W CN2021123855 W CN 2021123855W WO 2022089217 A9 WO2022089217 A9 WO 2022089217A9
Authority
WO
WIPO (PCT)
Prior art keywords
key
keys
matrix
correlation
key matrix
Prior art date
Application number
PCT/CN2021/123855
Other languages
English (en)
French (fr)
Other versions
WO2022089217A1 (zh
Inventor
陆海涛
杨立君
陈伯庆
郭林
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP21884946.1A priority Critical patent/EP4239945A1/en
Publication of WO2022089217A1 publication Critical patent/WO2022089217A1/zh
Publication of WO2022089217A9 publication Critical patent/WO2022089217A9/zh
Priority to US18/095,773 priority patent/US20230171096A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0875Generation of secret information including derivation or calculation of cryptographic keys or passwords based on channel impulse response [CIR]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for generating a key.
  • Wireless communication has a wide range of applications in military and civilian fields, but the unique open characteristics of wireless communication lead to low security of wireless information transmission.
  • the traditional solution is to encrypt data at the network layer with public and private keys.
  • the symmetric encryption method needs to solve the problem of key distribution in wireless communication.
  • key distribution introduces additional complexity and cost, and it is impossible to quickly update the key or one-time pad.
  • the wireless channel-based physical layer key generation method is used to encrypt the wireless channel, such as the adaptive channel detection scheme based on the Proportion Integral Differential (PID) controller, and the Received Signal Strength (referred to as PID).
  • PID Proportion Integral Differential
  • PID Received Signal Strength
  • RSS as the channel characteristic
  • the biggest feature of choosing this method is to use the reciprocity of the uplink and downlink channel characteristics within the coherence time to obtain the key directly from the channel parameters. Its computing cost is generally lower than that of traditional network layer encryption methods, and there is no problem of key distribution.
  • the key generation method will adaptively increase the detection rate, so that the randomness between the measured values is reduced, and at the same time, the security of the key is affected to a certain extent.
  • An embodiment of the present application provides a key generation method, including: acquiring channel characteristic parameters of a wireless channel; generating a key according to the channel characteristic parameters; after generating multiple keys continuously, intercepting the first key with a sliding window of preset length A key matrix is used to obtain a second key matrix; the correlation of each key in the second key matrix is determined, and if the correlation between the keys in the second key matrix is greater than a preset threshold, the second key matrix is determined.
  • the keys in the key matrix are replaced by keys; the keys in the second key matrix are added to the key pool until the number of keys in the key pool reaches a preset number.
  • the embodiment of the present application also provides a key generation device, including: a parameter acquisition module, used to acquire channel characteristic parameters of a wireless channel; a key generation module, used to generate a key according to the channel characteristic parameters; a sliding interception module, After generating multiple keys continuously, intercept the first key matrix formed by multiple keys with a sliding window of preset length to obtain the second key matrix; the key replacement module is used to determine the second key matrix. Correlation of each key in the key matrix; if the correlation between each key in the second key matrix is greater than a preset threshold, perform key replacement on the keys in the second key matrix; key selection module , adding the keys in the second key matrix to the key pool until the number of keys in the key pool reaches a preset number.
  • a parameter acquisition module used to acquire channel characteristic parameters of a wireless channel
  • a key generation module used to generate a key according to the channel characteristic parameters
  • a sliding interception module After generating multiple keys continuously, intercept the first key matrix formed by multiple keys with a sliding window of preset length to
  • An embodiment of the present application further provides an electronic device, comprising: at least one processor; and a memory connected in communication with 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.
  • the processor executes to enable at least one processor to execute the key generation method as described above.
  • the embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above-mentioned key generation method.
  • FIG. 1 is a flowchart of a method for generating a key according to a first embodiment of the present application
  • 2 is a statistical diagram of channel estimation errors in each channel estimation method according to the first embodiment of the present application.
  • FIG. 3 is a flowchart of a method for generating a key according to a second embodiment of the present application.
  • FIG. 4 is a flowchart of a method for generating a key according to a third embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a key generation device according to a fourth embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application.
  • the main purpose of the embodiments of the present application is to propose a key generation method, device, electronic device and storage medium, in which keys generated multiple times are intercepted by means of sliding windows, and keys with high correlation are replaced, thereby improving the Security of keys during high rate key generation.
  • the first embodiment of the present application relates to a key generation method, which includes: acquiring channel characteristic parameters of a wireless channel; generating a key according to the channel characteristic parameters; Intercept the first key matrix to obtain the second key matrix; 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 the preset threshold, then The keys in the second key matrix are replaced by keys; the keys in the second key matrix are added to the key pool until the number of keys in the key pool reaches a preset number.
  • Step 101 acquiring channel characteristic parameters of the wireless channel.
  • the channel characteristic parameters of the 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. Due to the high consistency of the collected channel characteristic parameters, it can be ensured that the keys generated by the upper and lower ends generally have little difference. Finally, the two communicating parties correct the initial key through information reconciliation, and finally obtain the exact same key, which is determined by the channel. The parameters can directly obtain the key, and the operation cost is generally lower than that of the traditional network layer encryption method, and there is no problem of key distribution.
  • the channel characteristic parameters need to be obtained through the channel model.
  • the wireless channel is detected to obtain the channel detection parameters, and then based on the preset channel model, the channel characteristic parameters are calculated according to the detection parameters.
  • the key generation method in this embodiment is applied in a millimeter wave communication scenario, and the millimeter wave is usually modeled by a narrow-band clustered ray model.
  • the cluster ray model (Cluster Ray) is a channel model commonly used in millimeter wave hybrid precoding and channel estimation, and its main parameters include the angle of arrival, the angle of departure and the path gain.
  • the millimeter-wave channel is composed of different clusters, and each cluster contains only limited physical propagation paths, which conforms to the limited characteristics of millimeter-wave propagation paths.
  • the base station is equipped with N t antennas
  • the user is equipped with N r antennas
  • the channel matrix H contains N cl clusters
  • there are N ray propagation paths in each cluster and the channel is represented by the following formula:
  • ⁇ il is the path complex gain of the l-th ray in the ith cluster, that is, the path gain parameter represented by a complex number
  • ⁇ il ⁇ il , ⁇ il are the angle of arrival (Angle Of Arrival, AoA for short) of the corresponding path, respectively ), angle of departure (Angle Of Departure, AoD for short), a( ⁇ il ) and at ( ⁇ il ) represent the array response vectors of the base station and the legal user, respectively.
  • mmWave has only limited spatial propagation paths, its main parameters include angle of arrival, angle of departure and path gain.
  • the compressed sensing technology is used for channel estimation, and the characteristic parameters of the channel are calculated by comparing the reference signals of the receiving end and the transmitting end.
  • the obtained channel characteristic parameters are the path gain parameters.
  • the channel estimation in this embodiment adopts the orthogonal matching pursuit algorithm in compressed sensing to estimate the channel.
  • the angle domain [0, ⁇ ] is divided into 180 grids as the candidate sets of the angle of arrival and the angle of departure, that is, the minimum unit of 1° is used to distinguish the angle of arrival and the angle of departure, and the perception matrix is further designed.
  • the perception matrix when designing the perception matrix, try to make the overall correlation between the column vectors of the perception matrix low.
  • the angle with the highest correlation with the channel sounding value is selected from the candidate set as the combined pair of the angle of arrival and the angle of departure, so as to estimate the path gain parameter value ⁇ l related to this combined pair.
  • clustered ray model used in this embodiment can also be replaced with other millimeter wave channel models, and the channel characteristic parameters referenced for quantization are not limited to the path gain parameters mentioned above.
  • the simulation and performance analysis of the millimeter wave channel estimation are carried out, and the Orthogonal Matching Pursuit (OMP) method is used to estimate the channel. and OMP estimates for comparison.
  • OMP Orthogonal Matching Pursuit
  • Both the base station and the user use 24 training beams for pilot training.
  • the power of the pilot symbol is 1.
  • the simulation is carried out for 500 channel realizations to obtain the average channel estimation error. Among them, the estimation errors of different estimation methods are shown in Figure 2, and the normalized mean squared error (Normalized Mean Squared Error, NMSE) between the estimated channel and the original channel is defined as:
  • Step 102 generate a key according to the channel characteristic parameter.
  • the process of generating the key according to the channel characteristic parameter is called quantization, and its main process includes: determining a quantization threshold according to a preset quantization strategy; and mapping the channel characteristic parameter into a bit value according to the quantization threshold.
  • a key is a binary string consisting of bit values.
  • Quantization strategies can generally be divided into two categories: quantification strategies based on the mean ⁇ and standard deviation ⁇ in the normal distribution, and quantification strategies based on the Cumulative Distribution Function (CDF for short). Further, a quantization threshold is determined according to a preset quantization strategy, and then the channel characteristic parameter obtained in step 101 is mapped to a preset value according to the quantization threshold, and the preset value generally adopts a bit value.
  • the quantization strategy based on the mean ⁇ and the standard deviation ⁇ in the normal distribution is simple to implement, and the quantization threshold is
  • the quantization strategy based on the cumulative distribution function CDF is more flexible, and multi-bit quantization can be designed.
  • the current millimeter-wave channel has ten spatial propagation paths through detection, then determine the channel characteristic parameters of each path on the ten spatial propagation paths, and then map the ten channel characteristic parameters into ten spatial propagation paths according to the quantization strategy.
  • Step 103 After multiple keys are continuously generated, a first key matrix formed by multiple keys is intercepted with a sliding window of preset length to obtain a second key matrix.
  • a first key matrix is formed by arranging and combining multiple keys according to time.
  • the preset length of the sliding window refers to intercepting the number of columns of the first matrix, and intercepting the first matrix with a sliding window of preset length, that is, intercepting a matrix with a fixed number of columns from the first matrix each time according to the order as the second key Matrix, after each interception, move one bit backward and intercept again.
  • Step 104 Determine the correlation of the keys in the second key matrix; when the correlation between the keys in the second key matrix is greater than a preset threshold, perform keying on the keys in the second key matrix. replacement.
  • the second key matrix obtained by interception includes multiple keys, and the number of keys obtained by a single interception is related to the length of the sliding window.
  • the correlation between each key is determined, and when the correlation meets the preset threshold, the key in the second key matrix is directly added to the key pool for channel encryption Use; when the correlation does not meet the preset threshold, perform key replacement on the key.
  • the method of key replacement is the value of some bits in the key, so that the new key generated after the replacement has high randomness and can meet the security requirements of the channel.
  • the base stations and users at the upper and lower ends of the channel have agreed on quantization and key replacement rules, they can operate synchronously and obtain keys with a high consistency rate.
  • Step 105 adding the keys in the second key matrix to the key pool until the number of keys in the key pool reaches a preset number.
  • the correlation between the keys in the second key matrix is less than a preset threshold, and then the keys in the second key matrix are replaced by Added to the key pool for channel encryption.
  • a preset threshold for the number of keys in the key pool. When the number of keys already in the key pool reaches the upper limit, no more keys will be added to the key pool until the is removed from the key pool after the key is used.
  • the key generation method in this embodiment intercepts the bit stream through a sliding window, and obtains multiple sets of keys in the bit stream obtained by quantizing the channel characteristic parameters obtained by one channel detection, thereby increasing the number of keys under a fixed channel detection rate, It can ensure that the key generation rate meets user requirements while ensuring the randomness of the key.
  • the second embodiment of the present application relates to a method for generating a key.
  • the second embodiment is substantially the same as the first embodiment, and the main difference is that: in the second embodiment, the encryption in the second key matrix is Perform key replacement on the key, including: performing a replacement operation on the last key in the second key matrix bit by bit, and re-determining the correlation of each key in the second key matrix after each replacement operation; The correlation between the keys in the second key matrix is not greater than the preset threshold, then the key in the second key matrix is added to the key pool; wherein, the key added to the key pool is the last one key.
  • Step 301 acquiring channel characteristic parameters of the wireless channel.
  • Step 302 generate a key according to the channel characteristic parameters.
  • Step 303 After multiple keys are continuously generated, a first key matrix formed by multiple keys is intercepted with a sliding window of preset length.
  • Steps 301 to 303 are the same as steps 101 to 103 in the first embodiment of the present application, and the relevant implementation details have been specifically described in the first embodiment, and are not repeated here.
  • Step 304 determine whether the correlation between the keys in the second key matrix is greater than the preset threshold; if the correlation between the keys in the second key is greater than the preset threshold, then perform step 305, for the first key Perform the replacement operation on the last key in the two-key matrix, and execute step 304 again; if the correlation between the keys in the second key is not greater than the preset threshold, execute step 306 to replace the second key The last key in the key matrix is added to the key pool.
  • the second key matrix obtained by interception includes multiple keys, and the number of keys obtained by a single interception is related to the length of the sliding window.
  • the correlation between each key is determined, and when the correlation meets the preset threshold, the key in the second key matrix is directly added to the key pool for channel encryption Use; when the correlation does not meet the preset threshold, perform key replacement on the key.
  • Replacing the key refers to replacing the codeword of the key bit by bit.
  • the key is removed from the first key matrix. , and then add the next key outside the sliding window to the sliding window to calculate the correlation again.
  • the method of key replacement is the value of some bits in the key, so that the new key generated after the replacement has high randomness and can meet the security requirements of the channel.
  • the base stations and users at the upper and lower ends of the channel have agreed on quantization and key replacement rules, they can operate synchronously and obtain keys with a high consistency rate.
  • the average Hamming distance is used to measure the correlation between a set of keys.
  • the design sliding window W size is 5, and initially contains 5 sets of key sequences [k 1 , k 2 , k 3 , k 4 ,k 5 ], k i is a column vector, that is, a key generated after one channel estimation.
  • W(m) represents the mth column of the window
  • D(W) ⁇ 1 ⁇ m ⁇ n ⁇ 5 dist(W(m), W(n)) is the sum of the Hamming distances between the columns.
  • the last key k j in the window can be put into the key pool, and the window is shifted to the right One bit, to verify the randomness of the following 5 sets of keys. like It indicates that the average distance of the five keys in the current window is small, and the randomness of the keys is insufficient.
  • a sliding window of preset length is used to intercept the first key matrix to obtain the second key matrix, and the process of key replacement can be implemented by the following program code:
  • this embodiment also provides a sliding window randomness test method, which is as follows:
  • each channel implementation can generate a set of keys (5 bits), and the sliding window contains 5 sets of keys, that is, W is 5 ⁇ 5 matrix.
  • a sliding window is used to check the randomness of the keys. If the correlation of the five groups of keys in the window is too high, the bits of the last group of keys are modified to reduce the correlation of the keys in the window.
  • the NIST test suite contains 16 test methods to evaluate different random characteristics, each method returns a P value, when P ⁇ ⁇ , indicating that The sequence is random.
  • 0.01
  • the key generation method in this embodiment intercepts the bit stream through a sliding window, obtains multiple sets of keys in the bit stream obtained by quantizing the channel characteristic parameters obtained by one channel detection, and determines the difference between the keys in a set of keys. Whether the correlation of the key meets the requirements, the key that does not meet is replaced, so as to better ensure that the randomness of the key can meet the security requirements of the channel.
  • the third embodiment of the present application relates to a method for generating a key.
  • the third embodiment is roughly the same as the first embodiment, with the main difference being that: in the third embodiment, a multi-bit adaptive method based on the cumulative distribution function CDF
  • the quantization strategy quantizes the channel characteristic parameters, and maps the measured values of the channel characteristic parameters into bit values.
  • Step 401 acquiring channel characteristic parameters of the wireless channel.
  • Step 401 is the same as step 101 in the first embodiment of the present application, and the relevant implementation details have been specifically described in the first embodiment, which will not be repeated here.
  • Step 402 Determine a quantization threshold according to a preset quantization strategy.
  • Step 403 Map the channel characteristic parameters into bit values according to the quantization threshold.
  • the quantization strategy is implemented by the quantizer, and the quantization threshold is set through the design of the quantizer.
  • the quantization threshold is set through the design of the quantizer.
  • CDFF of ⁇ (i) i (y) P[ ⁇ (i) ⁇ y]
  • the number of quantization levels is m i is its quantized number of bits.
  • Steps 2 and 3 calculate the cumulative distribution function F i (y) of ⁇ (i), and its inverse function is the quantized threshold ⁇ k .
  • the binary representation of which is used for the selection of subsequent codewords.
  • the list contains An ordered Gray code B of codewords, each of length m i bits.
  • the f 1 (k)-th codeword in B is assigned to the codeword d 1 (k) of MAQ.
  • d 0 (k) is obtained by cyclically shifting d 1 (k) by 2 bits.
  • Step 404 After generating multiple keys continuously, intercept a first key matrix formed by multiple keys with a sliding window of preset length.
  • Step 405 Determine the correlation of the keys in the second key matrix, and replace the keys in the second key matrix when the correlation between the keys in the second key matrix is greater than a preset threshold.
  • Step 406 adding the keys in the second key matrix to the key pool until the number of keys in the key pool reaches a preset number.
  • Steps 404 to 406 are the same as steps 103 to 105 in the first embodiment of the present application, and the relevant implementation details have been specifically described in the first embodiment, and are not repeated here.
  • this embodiment also provides performance analysis of different quantification strategies, as follows:
  • the channel detection stage because the channel contains 5 propagation paths, 5 path gains can be estimated for each channel realization, and the modulo value of the path gains can be used as a quantization parameter.
  • the modulo value of the gain of 2000 paths obtained by 400 channel detections will be used as the input parameter of the MAQ quantization scheme.
  • the key generation between the base station and the user is based on the reciprocity of the wireless channel, but due to the influence of additive noise, the base station and the user's estimation of the channel parameters are not completely consistent, so Inconsistency of keys will result.
  • the key inconsistency rates of the quantization method based on the cumulative distribution function (MAQ) and the quantization method based on the mean and standard deviation under different signal-to-noise ratios are compared. It can be found that in the two quantization methods, the smaller the noise, the smaller the impact on the symmetric key generated by both parties in communication, and the lower the key inconsistency rate.
  • the performance of MAQ quantization is better than that of the mean-based quantization method, and in the quantization process of the latter, in order to ensure a certain randomness of the key, some continuously repeated bits are discarded, resulting in a decrease in the key generation rate.
  • the fourth embodiment of the present application relates to a key generation device, as shown in FIG. 6 , including:
  • the parameter acquisition module 601 is used for acquiring channel characteristic parameters of the wireless channel.
  • the key generation module 602 is configured to generate a key according to the channel characteristic parameter.
  • the sliding interception module 603 is configured to intercept a first key matrix formed by a plurality of keys with a sliding window of a preset length after successively generating a plurality of the keys to obtain a second key matrix.
  • the key replacement module 604 is configured to determine the correlation of each key in the second key matrix; if the correlation between each key in the second key matrix is greater than a preset threshold, key for key replacement.
  • the key replacement module 604 is further configured to perform a replacement operation on the last key in the second key matrix bit by bit, and re-determine the value of each key in the second key matrix after each replacement operation. Correlation; if the correlation between the keys in the second key matrix is not greater than the preset threshold, then perform adding the keys in the second key matrix to the key pool; wherein, adding the keys in the key pool The key is the last key.
  • the key replacement module 604 is further configured to re-determine the correlation of the keys in the second key matrix after each replacement operation, if all bits of the last key are replaced, the second key If the correlation between the keys in the key matrix is greater than the preset threshold, the last key is discarded.
  • 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.
  • modules involved in this implementation are logical modules.
  • a logical unit may be a physical unit, a part of a physical unit, or multiple physical units. combination implementation.
  • this embodiment does not introduce units that are not closely related to solving the technical problem raised by the present application, but this does not mean that there are no other units in this embodiment.
  • the fifth embodiment of the present application relates to an electronic device, as shown in FIG. 7 , comprising: at least one processor 701 ; and a memory 702 communicatively connected to the at least one processor 701 ; wherein the memory 702 stores data that can be accessed by at least one processor 701 .
  • Instructions executed by one processor 701, the instructions are executed by at least one processor 701 to enable at least one processor 701 to execute the key generation method in the first, second, or third embodiment.
  • the memory 702 and the processor 701 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 701 and various circuits of the memory 702 together.
  • the bus may also connect together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein.
  • the bus interface provides the interface between the bus and the transceiver.
  • a transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium.
  • the data processed by the processor 701 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 701 .
  • Processor 701 is responsible for managing the bus and general processing, and may also provide various functions including timing, peripheral interface, voltage regulation, power management, and other control functions.
  • the memory 702 may be used to store data used by the processor 701 when performing operations.
  • the sixth embodiment of the present application relates to a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor. That is, those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM for short), Random Access Memory (RAM for short), magnetic disk or CD, etc.

Abstract

本申请实施例涉及通信技术领域,公开了一种密钥生成方法、装置、电子设备及存储介质。本申请中的密钥生成方法包括:获取无线信道的信道特征参数;根据信道特征参数生成一个密钥;在连续生成多个密钥后,以预设长度的滑动窗口截取第一密钥矩阵得到第二密钥矩阵;确定第二密钥矩阵中各密钥的相关性,若第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对第二密钥矩阵中的密钥进行密钥置换;将第二密钥矩阵中的密钥加入密钥池中,直到密钥池中的密钥数量达到预设数量。

Description

密钥生成方法、装置、电子设备及存储介质
交叉引用
本申请基于申请号为“202011204835.0”、申请日为2020年11月02日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本申请实施例涉及通信技术领域,特别涉及一种密钥生成方法、装置、电子设备及存储介质。
背景技术
无线通信在军事和民用领域都有着广泛的应用,但无线通信特有的开放特性导致无线信息传输的安全性较低。传统的解决方法是在网络层通过公私密钥对数据进行加密。但是在动态的无线网络中,对称加密方法需要解决无线通信下密钥分发的难题,密钥分发一方面引入额外的复杂度和成本,无法对密钥进行快速更新或一次一密。一般采用基于无线信道的物理层密钥生成方式来对无线信道进行加密,例如基于比例积分微分控制器(Proportion Integral Differential,简称PID)的自适应信道探测方案,信号接收强度(Received Signal Strength,简称RSS)作为信道特征,首先建立密钥生成速率的数学模型,证实信道探测速率与密钥速率之间成正比。选择这种方法的最大特点是利用相干时间内上下行信道特性的互易性,由信道参数直接获得密钥。其运算成本一般低于传统网络层加密方法,也没有密钥分发的问题。
然而,当用户要求密钥速率较高,密钥生成方式将自适应提高探测速率,使得测量值之间随机性降低,同时对密钥的安全性造成一定影响。
发明内容
本申请实施例提供了一种密钥生成方法,包括:获取无线信道的信道特征参数;根据信道特征参数生成一个密钥;在连续生成多个密钥后,以预设长度的滑动窗口截取第一密钥矩阵得到第二密钥矩阵;确定第二密钥矩阵中各密钥的相关性,若第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对第二密钥矩阵中的密钥进行密钥置换;将第二密钥矩阵中的密钥加入密钥池中,直到密钥池中的密钥数量达到预设数量。
本申请实施例还提供了一种密钥生成装置,包括:参数获取模块,用于获取无线信道的信道特征参数;密钥生成模块,用于根据信道特征参数生成一个密钥;滑动截取模块,用于在连续生成多个密钥后,以预设长度的滑动窗口截取由多个密钥形成的第一密钥矩阵,得到第二密钥矩阵;密钥置换模块,用于确定第二密钥矩阵中各密钥的相关性;若第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对第二密钥矩阵中的密钥进行密钥置换;密钥选择模块,将第二密钥矩阵中的密钥加入密钥池中直到密钥池中的密钥数量达到预设数量。
本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如上述的密钥生成方法。
本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述的密钥生成方法。
附图说明
图1是根据本申请第一实施例中密钥生成方法的流程图;
图2是根据本申请第一实施例中各信道估计方法中信道估计误差的统计图;
图3是根据本申请第二实施例中密钥生成方法的流程图;
图4是根据本申请第三实施例中密钥生成方法的流程图;
图5是根据本申请第三实施例中不同量化策略下不一致率的统计图;
图6是根据本申请第四实施例中密钥生成装置的结构示意图;
图7是根据本申请第五实施例中电子设备的结构示意图。
具体实施方式
本申请实施例的主要目的在于提出一种密钥生成方法、装置、电子设备及存储介质,通过滑动窗口的方式来截取多次生成的密钥,对相关性高的密钥进行置换,从而提高在高速率密钥生成时密钥的安全性。
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。
本申请的第一实施例涉及一种密钥生成方法,包括:获取无线信道的信道特征参数;根据信道特征参数生成一个密钥;在连续生成多个密钥后,以预设长度的滑动窗口截取第一密钥矩阵得到第二密钥矩阵;确定第二密钥矩阵中各密钥的相关性,若第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对第二密钥矩阵中的密钥进行密钥置换;将第二密钥矩阵中的密钥加入密钥池中,直到密钥池中的密钥数量达到预设数量。
下面结合附图对本实施例作进一步阐述,本实施例中的密钥生成方法如图1所示,包括:
步骤101,获取无线信道的信道特征参数。
具体地说,无线信道的信道特征参数属于信道的物理特征,由于相干时间内上下行信道的互易性,通信双方所采集的信道特征参数基本一致。由于采集到的信道特征参数一致性很高,可以保证上下两端生成的密钥一般差别很小,最后通信双方通过信息调和,对初始密钥进行校正,最终获得完全相同的密钥,由信道参数直接获得密钥,其运算成本一般低于传统网络层加密方法,也没有密钥分发的问题。
在一个例子中,信道特征参数需要通过信道模型来获得,首先对无线信道进行探测后得到信道的探测参数,然后基于预设的信道模型,根据探测参数计算出信道特征参数。本实施 例中的密钥生成方法应用在毫米波的通讯场景下,毫米波通常采用窄带分簇射线模型来进行建模。其中,分簇射线模型(Cluster Ray)是用于毫米波混合预编码以及信道估计中常用到的一种信道模型,其主要参数包括到达角、离开角与路径增益。假设毫米波信道由不同的分簇构成,而每一个分簇中仅包含有限条物理传播路径,这样就符合毫米波传播路径有限的特点。具体地,假定假设基站配备N t根天线,用户配备N r根天线,信道矩阵H包含N cl个簇,每个簇中有N ray条传播路径,将信道通过以下公式进行表示:
Figure PCTCN2021123855-appb-000001
其中,α il是第i个簇中第l条射线的路径复增益,即,由复数表示的路径增益参数,θ ilθ il,φ il分别为对应路径的到达角(Angle Of Arrival,简称AoA)、离开角(Angle Of Departure,简称AoD),a(θ il)与a til)分别表示基站与合法用户的阵列响应矢量。由于毫米波只有有限条空间传播路径,其主要参数包括到达角、离开角和路径增益。根据毫米波信道的特性,采用压缩感知技术进行信道估计,通过比较接收端与发送端的参考信号,计算出信道的特征参数,在本实施例中,获取的信道特征参数为路径增益参数。
进一步地,本实施例进行信道估计采用的是压缩感知中的正交匹配追踪算法来估计信道。将角度域[0,π]划分为180个网格,作为到达角与离开角的候选集,即以1°为最小单位来区分到达角与离开角,进一步设计感知矩阵。其中,设计感知矩阵时及尽量使感知矩阵列向量之间的总体相关性较低。从候选集中选择出与信道探测值相关性最高的角度作为到达角与离开角的组合对,从而估计出与这一组合对相关的路径增益参数值α l
此外,本实施例中所采用的分簇射线模型也可以替换为其他的毫米波信道模型,量化所参考的信道特征参数也不局限于上述提到的路径增益参数。
在具体的实现中,对毫米波信道估计进行仿真与性能分析,采用正交匹配追踪(Orthogonal Matching Pursuit,简称OMP)方法估计信道,并将最小二乘(Least Square,简称LS)估计,Oracle估计以及OMP估计进行比较。假设天线数N t=N r=32,射频链数
Figure PCTCN2021123855-appb-000002
信道中包含5个分簇,每个簇中仅有1条传播路径,即L=5,而路径增益服从
Figure PCTCN2021123855-appb-000003
每个簇中到达角/离开角的均值服从[0,2π]的均匀分布,标准差σ AS=15。基站与用户均使用24根训练波束进行导频训练,
Figure PCTCN2021123855-appb-000004
导频符号的功率为1。仿真进行500次信道实现求取平均的信道估计误差。其中,不同的估计方法的估计误差如图2所示,估计信道与原信道的归一化均方误差(Normalized Mean Squared Error,简称NMSE)定义为:
Figure PCTCN2021123855-appb-000005
可以看到,在不同的信噪比(SignalNoise Ratio,简称SNR)下,随着信噪比的增大,三种方案的估计误差越来越小。其中,Oracle估计的性能最好,因为其假设到达角/离开角已知,只需对路径增益进行估计。在现实的估计算法当中,OMP估计优于LS估计算法,因为所使用的训练波束较少,测量值个数
Figure PCTCN2021123855-appb-000006
LS估计只能实现部分训练,而一般情况下,LS估计要求
Figure PCTCN2021123855-appb-000007
实现完全训练。OMP估计中,当信噪比大于0dB时,误差低于-10dB,所以方案可较为可靠地实现信道估计,而估计所得路径增益这一信道参数将作为密钥生成的量化参数。
步骤102,根据信道特征参数生成一个密钥。
具体地说,根据信道特征参数生成密钥的过程被称为量化,其主要过程包括:根据预设的量化策略确定量化阈值;根据量化阈值将信道特征参数映射为比特值。可以理解,一个密钥是一串由比特值构成的二进制字符串。量化策略一般可以分为两类,基于正态分布中基于均值μ与标准差σ的量化策略,以及基于累计分布函数(Cumulative Distribution Function,简称CDF)的量化策略。进一步地,根据预设的量化策略确定量化阈值,然后根据量化阈值将步骤101中得到的信道特征参数映射到预设的数值上,预设数值一般采用比特值。
其中,基于正态分布中基于均值μ与标准差σ的量化策略实现简单,量化阈值为
η+=μ+α×σ
η-=μ-α×σ
当α≠0时,在η+与η-之间的测量值将被抛弃,高于η+的样本被映射为1,低于η-的样本被映射为0,但是抛弃部分测量值将影响密钥生成速率。
基于累积分布函数CDF的量化策略更加灵活,可以设计出多比特量化。
在一个例子中,假定当前的毫米波信道经过探测具有十条空间传播路径,则分别确定十条空间传播路径上,各个路径的信道特征参数,然后根据量化策略,将十个信道特征参数分别映射为十个由比特值构成的二进制字符串,从而生成一个由十个二进制字符串组成的密钥。
步骤103,在连续生成多个密钥后,以预设长度的滑动窗口截取由多个密钥形成的第一密钥矩阵,得到第二密钥矩阵。
具体地说,通过多次信道估计,由于信道增益参数在时间上的变化,可以根据多组不同的信道特征参数能够得到多个不同的密钥(每一次信道估计即可生成一个密钥),将多个密钥根据时间进行排列后组合到一起,形成第一密钥矩阵。滑动窗口的预设长度是指截取第一矩阵的列数,以预设长度的滑动窗口截取第一矩阵,即,根据顺序每次从第一矩阵中截取固定列数的矩阵作为第二密钥矩阵,每截取一次后,向后移一位再次截取。
步骤104,确定第二密钥矩阵中各密钥的相关性;当第二密钥矩阵中各密钥之间的相关性大于预设阈值,对第二密钥矩阵中的密钥进行密钥置换。
具体地说,截取得到的第二密钥矩阵中包含有多个密钥,单次截取所得到的密钥数量与滑动窗口的长度有关。在截取得到第二密钥矩阵之后,确定各个密钥之间的相关性,当相关性满足预设阈值时,则直接将第二密钥矩阵中的密钥加入到密钥池中供信道加密使用;当相关性不满足预设阈值时,则对密钥进行密钥置换。密钥置换的方式具体为对密钥中的某些比特位的取值,从而使得置换之后所生成的新密钥具有较高的随机性,能够满足信道的安全性要求。此外,由于信道上下两端的基站与用户已约定好量化与密钥置换规则,他们可以同步操作,得到一致率较高的密钥。
步骤105,将第二密钥矩阵中的密钥加入密钥池中直到密钥池中的密钥数量达到预设数量。
具体地说,对第二密钥矩阵中的密钥进行密钥置换后,使第二密钥矩阵中密钥之间的相关性小于预设阈值,然后将第二密钥矩阵中的密钥加入到密钥池中供信道加密使用。密钥池中的密钥数量设置有预设数量的上限,当密钥池中已经存在的密钥数量达到上限时,则不再继续将密钥加入到密钥池中,直到密钥池中的密钥被使用后从密钥池中移除。
本实施例中的密钥生成方法通过滑动窗口截取比特流,在一次信道探测得到的信道特征 参数所量化得到的比特流中得到多组密钥,从而提高固定信道探测速率下密钥的数量,能够保证密钥生成速率满足用户要求的同时保证密钥的随机性。
需要说明的是,本实施例中的上述各示例均为方便理解进行的举例说明,并不对本申请的技术方案构成限定。
本申请的第二实施例涉及一种密钥生成方法,第二实施例与第一实施例大致相同,主要的区别在于:在第二实施例中,对所述第二密钥矩阵中的密钥进行密钥置换,包括:逐比特对第二密钥矩阵中的最后一个密钥进行置换操作,并在每一次置换操作后再次确定第二密钥矩阵中各密钥的相关性;若第二密钥矩阵中各密钥之间的相关性不大于预设阈值,则执行将第二密钥矩阵中的密钥加入密钥池中;其中,加入密钥池中的密钥为最后一个密钥。
下面结合附图对本实施例作进一步阐述,本实施例中的密钥生成方法如图3所示,包括:
步骤301,获取无线信道的信道特征参数。
步骤302,根据信道特征参数生成一个密钥。
步骤303,在连续生成多个密钥后,以预设长度的滑动窗口截取由多个密钥形成的第一密钥矩阵。
步骤301至步骤303与本申请第一实施例中步骤101至步骤103相同,相关的实施细节已经在第一实施例中进行具体说明,在此不再赘述。
步骤304,确定第二密钥矩阵中各密钥之间的相关性是否大于预设阈值;若第二密钥中各密钥之间的相关性大于预设阈值,则执行步骤305,对第二密钥矩阵中的最后一个密钥的进行置换操作,并再次执行步骤304;若第二密钥中各密钥之间的相关性不大于预设阈值,则执行步骤306,将第二密钥矩阵中的最后一个密钥加入密钥池中。
具体地说,截取得到的第二密钥矩阵中包含有多个密钥,单次截取所得到的密钥数量与滑动窗口的长度有关。在截取得到第二密钥矩阵之后,确定各个密钥之间的相关性,当相关性满足预设阈值时,则直接将第二密钥矩阵中的密钥加入到密钥池中供信道加密使用;当相关性不满足预设阈值时,则对密钥进行密钥置换。其中,对密钥进行置换是指逐比特地置换密钥的码字,当密钥的全部比特均置换后相关性仍然大于预设阈值时,则将密钥从第一密钥矩阵中移除,然后将滑动窗口外的下一个密钥加入到滑动窗口中再次计算相关性。密钥置换的方式具体为对密钥中的某些比特位的取值,从而使得置换之后所生成的新密钥具有较高的随机性,能够满足信道的安全性要求。此外,由于信道上下两端的基站与用户已约定好量化与密钥置换规则,他们可以同步操作,得到一致率较高的密钥。
在一个例子中,采用平均汉明距离来衡量一组密钥之间的相关性,假设设计滑动窗口W大小为5,初始包含5组密钥序列[k 1,k 2,k 3,k 4,k 5],k i为列矢量,即一次信道估计后生成的一个密钥。计算滑动窗口中5组密钥的平均汉明距离
Figure PCTCN2021123855-appb-000008
其中W(m)表示窗口的第m列,D(W)=∑ 1≤m<n≤5dist(W(m),W(n))为各列之间汉明距离之和。当
Figure PCTCN2021123855-appb-000009
时,窗口中5个密钥差别较大,平均汉明距离超过预设的阈值δ,满足随机性要求,可将其窗口中最后一个密钥k j放入密钥池,并将窗口右移一位,进行下面5组密钥的随机性验证。若
Figure PCTCN2021123855-appb-000010
表明当前窗口中5个密钥的平均距离较小,密钥随机性不足,此时取窗口最后一列k j,k j中包含N位比特,依次对其N个比特位进行置换操作:0变为1(1变为0),每进行一次比特置换,均重新计算窗口第二密钥矩阵的平均汉明距离
Figure PCTCN2021123855-appb-000011
Figure PCTCN2021123855-appb-000012
窗口中第二密钥矩阵满足随机性要求,将其最后一列k j放入密钥池。若经过N位的比特置换,窗口第二密钥矩阵的汉明距离均无法达到阈值 标准,那么舍弃最后一列k j,将下一组密钥加入窗口,进行新一轮的随机性验证。滑动窗口持续验证200组密钥序列,并输出高随机性密钥。
在具体的应用中,上述例子中以预设长度的滑动窗口截取所述第一密钥矩阵得到第二密钥矩阵,以及密钥置换的过程可以通过如下的程序代码进行实现:
Figure PCTCN2021123855-appb-000013
此外,本实施例中还提供了一种滑动窗口随机性检验的方法,具体如下:
对于多比特自适应量化(Multi-Bit Adaptive Quantization,简称MAQ)方案,每一次信道实现可生成一组密钥(5个比特),而滑动窗口包含5组密钥,即W为5×5的矩阵。采用滑动窗口检验密钥随机性,若窗口中5组密钥的相关性过高,则对最后一组密钥进行比特位的修改,降低窗口中密钥的相关性。当SNR=10时,选取200组密钥(1000位比特)进行滑动窗口检验,并比较不同的预设相关系数阈值δ时,所剩余的满足随机性要求的比特数,如下表所示。δ越大,对第二密钥矩阵随机性的要求越高,不符合要求的密钥增多,即被舍弃,剩余比特数减少。当δ过大,所剩比特数将迅速减少。
δ 2.5 2.6 2.7 2.8 2.9 3.0 3.1
比特数 885 885 755 755 585 585 20
对于经过滑动窗口策略的密钥序列,利用NIST统计测试来检验其随机性,NIST测试套件包含16种测试方法以评估不同的随机特性,每种方法返回一个P值,当P≥α时,表明序 列是随机的。这里设α=0.01,密钥序列为δ=2.5时的885位比特。我们选取NIST测试套件中的4种测试方法来评估密钥的随机性,如下表所示。可以看出,返回的P≥0.01,经过滑动窗口策略所生成的密钥满足随机性要求。而对于未经过滑动窗口的1000位密钥序列,其序列检验的P=6.3045e -9,随机性不符合要求。
检验项 频率检验 块内频数检验 序列检验 累加和检验
P 0.0554 0.0045 0.2198 0.0947
本实施例中的密钥生成方法通过滑动窗口截取比特流,在一次信道探测得到的信道特征参数所量化得到的比特流中得到多组密钥,并确定一组密钥中各密钥之间的相关性是否满足要求,对不满足的密钥进行置换,从而更好地保证密钥的随机性能够满足信道的安全性要求。
本申请的第三实施实施例涉及一种密钥生成方法,第三实施例与第一实施例大致相同,主要区别在于:在第三实施例中,采用基于累积分布函数CDF的多比特自适应量化策略对信道特征参数进行量化,将信道特征参数的测量值映射成比特值。
下面结合附图对本实施例作进一步阐述,本实施例中的密钥生成方法如图4所示,包括:
步骤401,获取无线信道的信道特征参数。
步骤401与本申请第一实施例中的步骤101相同,相关的实施细节已在第一实施例中进行了具体说明,在此不再赘述。
步骤402,根据预设的量化策略确定量化阈值。
步骤403,根据量化阈值将信道特征参数映射为比特值。
具体地说,量化策略是由量化器实现的,通过量化器的设计来完成量化阈值的设定,通过量化等级和量化阈值的调整,使得生成的密钥满足随机性要求、较好的生成速率以及不一致率。
进一步地,采用多比特自适应量化策略的具体算法如下:
输入:基站第N个路径增益估计值α(i),i=1,2,…,N
1:
Figure PCTCN2021123855-appb-000014
2:α(i)的CDFF i(y)=P[α(i)≤y]
3:
Figure PCTCN2021123855-appb-000015
4:η 0=-∞,η K=∞,k(i)=max{k s.t.α(i)>η k-1}
5:
Figure PCTCN2021123855-appb-000016
6:
Figure PCTCN2021123855-appb-000017
7:
Figure PCTCN2021123855-appb-000018
输出:z=[d e(k(1))(k(1)),…,d e(k(N))(k(N))]
假设基站作为领导节点,用户作为随从几点。基站侧估计出的路径增益序列为α(i),i=1,2,…,N,对于每一条路径增益,量化电平数为
Figure PCTCN2021123855-appb-000019
m i是其量化出的比特数。步骤2、3计算出α(i)的累积分布函数F i(y),其逆函数即为量化的阈值η k。第k个量化区间表示为(η k-1k],k=1,…,K,用k(i)表示α(i)所在的量化区间索引。设计二进制变量e(k) 作为k的二进制表示,用于后续的码字的选取。列出包含
Figure PCTCN2021123855-appb-000020
个码字的有序格雷码B,每个码字长度为m i比特。将B中第f 1(k)个码字赋予MAQ的码字d 1(k)。d 0(k)是d 1(k)循环移位2位所得。基站首先对估计得到的N个α(i)确定其量化区间k(i),并发送矢量e=[e(k(1)),…,e(k(N))] T给用户。当e=1时,基站与用户选择码字d 1,e=0时,选择码字d 2。那么最终得到密钥z=[d e(k(1))(k(1)),…,d e(k(N))(k(N))]。
其中,对于m i=1的情况,多比特自适应量化的码字如下表所示:
Figure PCTCN2021123855-appb-000021
步骤404,在连续生成多个密钥后,以预设长度的滑动窗口截取由多个密钥形成的第一密钥矩阵。
步骤405,确定第二密钥矩阵中各密钥的相关性,当第二密钥矩阵中个密钥之间的相关性大于预设阈值,对第二密钥矩阵中的密钥进行置换。
步骤406,将第二密钥矩阵中的密钥加入密钥池中直到密钥池中的密钥数量达到预设数量。
步骤404至步骤406与本申请第一实施例中的步骤103至步骤105相同,相关的实施细节已在第一实施例中进行了具体说明,在此不再赘述。
此外,本实施例中还提供了不同量化策略的性能分析,具体如下:
在信道探测阶段,因为信道包含5条传播路径,所以对每一次信道实现均可估计出5条路径增益,可将路径增益的模值作为量化参数。进行400次信道探测得到2000条路径增益的模值将作为MAQ量化方案的输入参数。每个参数量化出的比特数m i=1,总的量化电平K=8,经过多比特自适应量化,可以得到长度为2000比特的密钥串。时分双工系统(Time Division Duplexing,TDD)中,基站与用户的密钥生成基于无线信道的互易性,但受到加性噪声的影响,基站与用户对于信道参数的估计并不完全一致,因此会产生密钥的不一致性。针对长度为2000的比特串,如图5所示,基于累积分布函数的量化方法(MAQ)与基于均值和标准差的量化方法在不同信噪比下的密钥不一致率对比。可以发现,两种量化方法中,噪声越小,对通信双方生成的对称密钥影响越小,密钥不一致率降低。同时,MAQ量化的性能优于基于均值的量化方法,而且后者在量化过程中,为保证一定的密钥随机性性,舍弃部分连续重复的比特,导致其密钥生成速率降低。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本申请的第四实施例涉及一种密钥生成装置,如图6所示,包括:
参数获取模块601,用于获取无线信道的信道特征参数。
密钥生成模块602,用于根据信道特征参数生成一个密钥。
滑动截取模块603,用于在连续生成多个所述密钥后,以预设长度的滑动窗口截取由多个密钥形成的第一密钥矩阵,得到第二密钥矩阵。
密钥置换模块604,用于确定第二密钥矩阵中各密钥的相关性;若第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对第二密钥矩阵中的密钥进行密钥置换。
在一个例子中,密钥置换模块604还用于逐比特对第二密钥矩阵中的最后一个密钥进行置换操作,并在每一次置换操作后再次确定第二密钥矩阵中各密钥的相关性;若第二密钥矩阵中各密钥之间的相关性不大于预设阈值,则执行将第二密钥矩阵中的密钥加入密钥池中;其中,加入密钥池中的密钥为最后一个密钥。
在另一个例子中,密钥置换模块604还用于在每一次置换操作后再次确定第二密钥矩阵中各密钥的相关性之后,若最后一个密钥的所有比特完成置换后,第二密钥矩阵中各密钥之间的相关性大于预设阈值,则舍弃最后一个密钥。
密钥选择模块605,将第二密钥矩阵中的密钥加入密钥池中直到密钥池中的密钥数量达到预设数量。
值得一提的是,本实施中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本申请的创新部分,本实施例中并没有将与解决本申请所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。
本申请的第五实施例涉及一种电子设备,如图7所示,包括:至少一个处理器701;以及,与至少一个处理器701通信连接的存储器702;其中,存储器702存储有可被至少一个处理器701执行的指令,指令被至少一个处理器701执行,以使至少一个处理器701能够执行第一、第二、或第三实施例中的密钥生成方法。其中,存储器702和处理器701采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器701和存储器702的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器701处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器701。处理器701负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器702可以被用于存储处理器701在执行操作时所使用的数据。
本申请第六实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,简称ROM)、随机存取存储器(Random Access Memory,简称 RAM)、磁碟或者光盘等各种可以存储程序代码的介质。本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。

Claims (10)

  1. 一种密钥生成方法,包括:
    获取无线信道的信道特征参数;
    根据所述信道特征参数生成一个密钥;
    在连续生成多个所述密钥后,以预设长度的滑动窗口截取所述第一密钥矩阵得到第二密钥矩阵;
    确定所述第二密钥矩阵中各密钥的相关性,若所述第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对所述第二密钥矩阵中的密钥进行密钥置换;
    将第二密钥矩阵中的密钥加入密钥池中,直到所述密钥池中的密钥数量达到预设数量。
  2. 根据权利要求1所述的密钥生成方法,其中,所述对所述第二密钥矩阵中的密钥进行密钥置换,包括:
    逐比特对所述第二密钥矩阵中的最后一个密钥进行置换操作,并在每一次置换操作后再次确定所述第二密钥矩阵中各密钥的相关性;
    若所述第二密钥矩阵中各密钥之间的相关性不大于所述预设阈值,则执行所述将第二密钥矩阵中的密钥加入密钥池中;其中,加入所述密钥池中的密钥为所述最后一个密钥。
  3. 根据权利要求2所述的密钥生成方法,其中,在所述在每一次置换操作后再次确定所述第二密钥矩阵中各密钥的相关性之后,还包括:
    若所述最后一个密钥的所有比特完成置换后,所述第二密钥矩阵中各密钥之间的相关性大于预设阈值,则舍弃所述最后一个密钥。
  4. 根据权利要求2或权利要求3所述的密钥生成方法,其中,所述确定所述第二密钥矩阵中各密钥的相关性,包括:
    计算所述第二密钥矩阵中各密钥的平均汉明距离;
    根据所述平均汉明距离确定所述第二密钥矩阵中各密钥的相关性。
  5. 根据权利要求1或权利要求2所述的密钥生成方法,其中,所述根据所述信道特征参数生成第一密钥矩阵,包括:
    对所述信道特征参数进行量化操作,其中,所述量化操作的步骤包括:
    根据预设的量化策略确定量化阈值;
    根据所述量化阈值将所述信道特征参数映射为比特值。
  6. 根据权利要求5所述的密钥生成方法,其中,所述量化策略为基于概率密度函数的量化策略。
  7. 根据权利要求6所述的密钥生成方法,其中,所述预设的信道模型为窄带分簇射线模型;
    所述信道特征参数为路径增益参数。
  8. 一种密钥生成装置,包括:
    参数获取模块,用于获取无线信道的信道特征参数;
    密钥生成模块,用于根据所述信道特征参数生成一个密钥;
    滑动截取模块,用于在连续生成多个所述密钥后,以预设长度的滑动窗口截取由多个所述密钥形成的第一密钥矩阵,得到第二密钥矩阵;
    密钥置换模块,用于确定所述第二密钥矩阵中各密钥的相关性;若所述第二密钥矩阵中各密钥之间的相关性大于预设阈值,则对所述第二密钥矩阵中的密钥进行密钥置换;
    密钥选择模块,将所述第二密钥矩阵中的密钥加入密钥池中直到所述密钥池中的密钥数量达到预设数量。
  9. 一种电子设备,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至7中任一项所述的密钥生成方法。
  10. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的密钥生成方法。
PCT/CN2021/123855 2020-11-02 2021-10-14 密钥生成方法、装置、电子设备及存储介质 WO2022089217A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21884946.1A EP4239945A1 (en) 2020-11-02 2021-10-14 Key generation method and apparatus, electronic device, and storage medium
US18/095,773 US20230171096A1 (en) 2020-11-02 2023-01-11 Key generation method, apparatus, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011204835.0 2020-11-02
CN202011204835.0A CN114448611A (zh) 2020-11-02 2020-11-02 密钥生成方法、装置、电子设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/095,773 Continuation US20230171096A1 (en) 2020-11-02 2023-01-11 Key generation method, apparatus, electronic device and storage medium

Publications (2)

Publication Number Publication Date
WO2022089217A1 WO2022089217A1 (zh) 2022-05-05
WO2022089217A9 true WO2022089217A9 (zh) 2022-06-02

Family

ID=81357116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123855 WO2022089217A1 (zh) 2020-11-02 2021-10-14 密钥生成方法、装置、电子设备及存储介质

Country Status (4)

Country Link
US (1) US20230171096A1 (zh)
EP (1) EP4239945A1 (zh)
CN (1) CN114448611A (zh)
WO (1) WO2022089217A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116886276B (zh) * 2023-05-29 2023-11-14 北京中超伟业信息安全技术股份有限公司 一种基于动态密钥的数据传输方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000511649A (ja) * 1996-06-05 2000-09-05 ジェムプリュス エス.セー.アー. 公開鍵暗号方法
CN107528687B (zh) * 2017-09-29 2019-08-13 西安电子科技大学 基于物理层信道互相关性的动态密钥量化协商方法
CN110061834A (zh) * 2019-03-01 2019-07-26 中国电子科技集团公司第三十研究所 一种无线信道指纹生成方法
CN110213767B (zh) * 2019-06-03 2021-09-07 西北工业大学 基于信道增益补偿及子载波相关性的物理层密钥提取方法

Also Published As

Publication number Publication date
EP4239945A1 (en) 2023-09-06
CN114448611A (zh) 2022-05-06
WO2022089217A1 (zh) 2022-05-05
US20230171096A1 (en) 2023-06-01

Similar Documents

Publication Publication Date Title
US20210377079A1 (en) Time-frequency block-sparse channel estimation method based on compressed sensing
Chaudhari et al. Cooperative sensing with imperfect reporting channels: Hard decisions or soft decisions?
US8090101B2 (en) Method and system for generating a secret key from joint randomness
CN111512567B (zh) 利用旋转波束管理进行无线通信的设备和方法
WO2020113945A1 (zh) 一种极化码构造方法、装置、电子设备及可读存储介质
CN106059640B (zh) 一种基于QoS的VLC保密通信系统发射端设计方法
CN111224779B (zh) 基于码本的物理层密钥生成方法、装置、存储介质及终端
US11847019B2 (en) Polar code construction method and apparatus
WO2016150246A1 (zh) 一种信号检测方法及装置
US11832128B2 (en) Fault detection and mitigation based on fault types in 5G/6G
CN114567360B (zh) 一种用于智能超表面无线通信的信道参数估计方法
US11736164B2 (en) Beam alignment with active learning
WO2022089217A9 (zh) 密钥生成方法、装置、电子设备及存储介质
US11444639B2 (en) Method and system for polar code coding
CN110611626B (zh) 信道估计方法、装置及设备
CN114285523A (zh) 面向多业务需求的大规模mtc免授权多用户检测方法及系统
JP6180333B2 (ja) 無線周波数受信機において信号を復号化する方法
WO2023236608A1 (zh) 信号检测方法及终端设备
Zhao et al. Least squares approximations to lognormal sum distributions
WO2020010915A1 (zh) 一种天线连接检测方法及装置
CN111555785B (zh) 一种信号预编码方法、装置及电子设备
US9479372B2 (en) Methods, systems, and media for determining whether a signal of interest is present
CN114980086A (zh) 模型训练、密钥生成方法、训练设备、通信方及系统
CN114329934A (zh) 一种讯源数估测方法、系统、设备及存储介质
CN113300728B (zh) 一种基于非正交多址上行链路的自适应消除干扰方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21884946

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021884946

Country of ref document: EP

Effective date: 20230602