Robust wireless key generation method based on timeout selective discard and automatic calibration

By dividing communication nodes into five states, utilizing timeout retransmission and selective discard RSSI mechanisms, and combining error correction codes and automatic hash value calibration, wireless key generation and autonomous updating between IoT devices are realized. This solves the challenges of key management and robustness for IoT devices and improves the robustness and synchronization of the system.

CN116582254BActive Publication Date: 2025-10-21BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310470416.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-27
Publication Date
2025-10-21
Estimated Expiration
2043-04-27

AI Technical Summary

Technical Problem

IoT devices face challenges in wireless key generation, including limited computing resources, difficulties in key management, and vulnerability to attacks. Existing wireless key generation methods lack scalability and robustness.

Method used

A robust wireless key generation method based on timeout selective discard and automatic calibration is adopted. By dividing the communication node into five states, the method utilizes the timeout retransmission and selective discard RSSI mechanism, combined with the error correction code and hash value automatic calibration mechanism, to achieve key generation and autonomous update.

Benefits of technology

Without affecting existing communication, wireless key generation and autonomous updating were achieved, improving the system's robustness and synchronization, and solving the problems of communication interruption caused by packet loss and inconsistent key generation after node restart.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116582254B_ABST
    Figure CN116582254B_ABST
Patent Text Reader

Abstract

The application discloses a robust wireless key generation method based on timeout selective discard and automatic calibration, and belongs to the field of wireless network security. In the application, a key is generated by measuring channel characteristics of received data frames during node communication. The node has five states, i.e. a state of sending and receiving data frames, a state of sending data frames attached with a key error correction code and a hash value, and a state of sending and receiving data frames attached with a key hash value. The node is switched among the five states, and only a small amount of overhead is added to realize wireless key generation and autonomous update. An automatic calibration reset mechanism is used to enable both communication parties to still synchronously collect channel characteristic data after unexpected restart of the node. A timeout retransmission scheme and a timeout selective discard channel characteristic data mechanism are used to solve the problem of unpaired channel characteristic data of both communication parties after packet loss. The application can realize key generation and autonomous update between two communication nodes, and can significantly improve the robustness of a wireless key generation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of wireless network security and relates to a robust wireless key generation method based on timeout selective abandonment and automatic calibration. Background Art

[0002] IoT devices typically use symmetric encryption algorithms for secure communication. Therefore, achieving autonomous key updates between IoT devices in an efficient and energy-efficient manner is promising. Traditional pre-shared key schemes are simple to implement but lack scalability and are vulnerable to attacks. IoT devices have limited computing and storage resources, and key distribution using public key encryption algorithms requires extensive and complex computations, making them unsuitable for IoT. Furthermore, the large number and widespread distribution of IoT devices make key management particularly challenging. Therefore, wireless key generation, in which both communicating parties generate symmetric keys over the wireless channel, is a key generation solution well-suited for IoT. Wireless key generation fully utilizes the characteristics of the wireless channel, eliminating the need for additional key management and distribution, ensuring communication security while reducing system complexity and cost.

[0003] Wireless key generation is based on the time-varying, reciprocal, and spatial decorrelation properties of wireless channels. The time-varying nature of wireless channels provides a source of randomness for wireless key generation. Wireless channels are subject to fading and multipath effects, and wireless signals are affected by various interferences and noise during transmission. Wireless channels are unpredictable, making it possible to generate highly random keys. Wireless key generation is made possible by the reciprocal nature of time-division duplex communication channels. Within the coherence time, the channels are highly correlated, resulting in similar channel parameters measured by both communicating parties, such as the received signal strength indicator (RSSI). The security of wireless key generation lies in spatial decorrelation. This means that an attacker located more than half a wavelength away from any legitimate user experiences uncorrelated channel effects and is unable to detect changes in the legitimate user's channel.

[0004] Wireless key generation methods based on channel reciprocity typically include four steps: channel detection, key quantization, information reconciliation, and privacy enhancement. During the channel detection phase, communicating IoT devices collect channel characteristic data, such as received signal strength. During the key quantization phase, pre-processed data is quantized into a binary key. Information reconciliation is the process by which the communicating parties correct any inconsistent keys generated. Privacy enhancement typically uses a hash function to compress the key to increase key security. Summary of the Invention

[0005] The main purpose of the present invention is to provide a robust wireless key generation method based on timeout selective abandonment and automatic calibration. The method can be applied to communication nodes to realize key generation and autonomous update between nodes. The timeout selective abandonment mechanism and automatic calibration mechanism can significantly improve the robustness of the wireless key generation system.

[0006] The purpose of the present invention is achieved through the following technical solutions:

[0007] The present invention discloses a robust wireless key generation method based on timeout selective discard and automatic calibration. The method is implemented based on two peer communication nodes, each of which includes a wireless key generation module. The peer communication nodes are divided into five communication states: a TX state for transmitting data frames, an RX state for receiving data frames, a TX_ECC_HASH state for transmitting data frames with key error correction codes and hash values, a TX_HASH state for transmitting data frames with key hash values, and an RX_HASH state for receiving data frames with key hash values.

[0008] The robust wireless key generation method based on timeout selective abandonment and automatic calibration includes the following steps:

[0009] S1. Two peer communication nodes switch between the TX and RX states to continuously perform encrypted communication. A peer communication node in the TX state constructs and transmits a data frame containing its node ID, communication sequence number, and normal communication content. After successfully transmitting a data frame, it enters the RX state. Upon successfully receiving a data frame, a peer communication node in the RX state authenticates the communication node based on the node ID and communication sequence number in the payload, accepts valid data frames, discards invalid data frames, and records the RSSI measured when receiving valid frames before entering the TX state.

[0010] S2. One of the two peer communication nodes adopts a timeout retransmission scheme, that is, when the time the communication node is in the data frame receiving state is greater than the timeout threshold, it enters the data frame sending state and retransmits the previous data frame; the other node adopts a timeout selective discard scheme, and decides whether to discard the last collected RSSI based on the different time intervals for collecting adjacent RSSIs caused by different packet loss situations of the two communicating parties. If the time interval between two received data frames is greater than the timeout discard threshold, the last collected RSSI is discarded. The discard threshold is greater than the time interval between two received data frames under normal circumstances (packet round-trip delay + transmission delay), and less than the threshold set for timeout retransmission plus the communication node's transmission delay plus the packet round-trip delay. If the time interval between two received data frames is greater than the timeout non-discard threshold, there is no need to discard the RSSI. The timeout non-discard threshold is greater than the timeout retransmission threshold plus the communication node's transmission delay plus the packet round-trip delay.

[0011] S3. When a peer communication node in the RX state collects a specified number of RSSIs, it determines whether the data frame payload contains the key's error correction code (ECC) and hash value (HASH). If not, it enters the TX_ECC_HASH state. At this time, the peer communication node first collects a specified number of RSSI data, preprocesses the data, quantizes it into a key, and generates an error correction code and hash value for the key. It then attaches the generated error correction code and hash value to a data frame for normal communication and sends it to the other peer communication node. After successfully sending the data frame with the error correction code and hash value, it enters the RX_HASH state and proceeds to step S4. If yes, it enters the TX_HASH state. The peer communication node receives the data frame with the key's error correction code and hash value, collects the RSSI measured when receiving the data frame, and extracts the error correction code and hash value from the data frame. At this time, the node also collects a specified number of RSSI data, preprocesses the collected data, quantizes it into a key, and uses the extracted error correction code to correct errors in the key generated by the node. Generate a hash value of the corrected key and compare it with the extracted hash value. If they are consistent, the key generation is successful and the generated key is protected by a hash function. If they are inconsistent, the key generation fails and the next round of key generation is performed. The hash value of the corrected key is attached to the data frame of normal communication and sent to the other node, and then enters the RX state.

[0012] S4. After successfully receiving a data frame, the peer communication node in the RX_HASH state verifies the communication node based on the node ID and communication sequence number in the payload, receives a valid data frame, and records the RSSI measured when receiving the frame. The peer communication node then determines whether the payload of the verified valid data frame contains a key hash value. If not, it automatically calibrates, discards the previously collected channel characteristic data, and enters the TX state. If it does, it extracts the key hash value and compares it with the hash value of the generated key. If they match, key generation is successful, and the generated key is encrypted using a hash function. If they do not match, key generation fails. After extracting the key hash value and comparing it, it enters the TX state.

[0013] S5. Under normal circumstances, a single wireless key generation is implemented according to steps S1 to S4. The peer communication node repeats steps S1 to S4 to switch between the five states to implement wireless key generation and autonomous key update. If the wireless key generation process between the peer communication nodes is not synchronized, the communication parties use an automatic calibration method to successively discard previously collected channel characteristic data to achieve synchronous collection of channel characteristic data, synchronize the wireless key generation process, and return to step S1 to perform wireless key generation. The asynchronous wireless key generation process is divided into the following two situations: Situation 1: The expected data frame is not received in the RX_HASH state of receiving a data frame with a key hash value; Situation 2: The specified number of RSSIs is not collected when a data frame with a key error correction code and hash value is received in the data frame receiving state.

[0014] Furthermore, in step S3, discrete cosine transform is used to pre-process the collected RSSI; a quantizer based on average and standard deviation is used in indoor scenarios; a quantizer based on difference is used in outdoor scenarios; and an error correction code is generated using BCH.

[0015] Furthermore, in step S3 and step S4, the verified key is compressed using the SHA256 hash function to achieve enhanced confidentiality.

[0016] Preferably, the peer communication node encodes the transmitted message using Base64 to reduce communication overhead. The transmitted message includes an error correction code and a hash value of the key.

[0017] Beneficial effects:

[0018] 1. The present invention discloses a robust wireless key generation method based on timeout selective discarding and automatic calibration. This method is implemented based on two peer communication nodes, dividing the peer communication nodes into five communication states: the TX state for transmitting data frames, the RX state for receiving data frames, the TX_ECC_HASH state for transmitting data frames with key error correction codes and hash values, the TX_HASH state for transmitting data frames with key hash values, and the RX_HASH state for receiving data frames with key hash values. The wireless key generation modules of the two peer communication nodes authenticate the communication nodes based on the node ID and communication sequence number in the data frame payload, collect channel characteristic data measured when receiving communication data frames between legitimate nodes, and generate keys using the RSSI of the received data frames measured during communication. The peer communication nodes transition between the five states without affecting existing communications, achieving wireless key generation and autonomous update between the communication nodes with only a small amount of overhead.

[0019] 2. The robust wireless key generation method based on timeout selective abandonment and automatic calibration disclosed in the present invention divides the asynchrony of the wireless key generation process into the following two situations: Situation 1: The expected data frame is not received in the RX_HASH state of receiving a data frame with a key hash value; Situation 2: The specified number of RSSIs is not collected when a data frame with a key error correction code and hash value is received in the data frame receiving state. To address the above two abnormal situations of asynchrony in the key generation process, the automatic calibration method is used to enable both communicating parties to successively abandon previously collected channel characteristic data to achieve synchronous collection of channel characteristic data, thereby achieving synchronization of the wireless key generation process. That is, the automatic calibration reset mechanism is used to enable both communicating parties to continue to synchronously collect RSSI data after an unexpected node restart.

[0020] 3. The present invention discloses a robust wireless key generation method based on timeout selective discard and automatic calibration. The first sender in a peer communication node adopts a timeout retransmission scheme. Specifically, when the communication node is in the data frame receiving state for a period greater than a timeout threshold, it enters the data frame sending state and retransmits the previous data frame. The other sender adopts a timeout selective RSSI discard scheme. Specifically, the time interval between adjacent RSSI collections determines whether to discard the last collected RSSI. If the time interval between two received data frames is greater than the timeout discard threshold, the last collected RSSI is discarded. The discard threshold is greater than the normal time interval between two received data frames (packet round-trip delay + transmission delay) and less than the threshold set for timeout retransmission plus the communication node's transmission delay plus the packet round-trip delay. If the time interval between two received data frames is greater than the timeout non-discard threshold, RSSI does not need to be discarded. The timeout non-discard threshold is greater than the timeout retransmission threshold plus the communication node's transmission delay plus the packet round-trip delay. In other words, the present invention utilizes the timeout retransmission and timeout selective RSSI discard mechanisms to resolve the RSSI mismatch problem between communicating parties after packet loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flowchart of a robust wireless key generation method based on timeout selective abandonment and automatic calibration provided in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a finite state machine of a peer communication node provided in an embodiment of the present application;

[0023] Figure 3 A timing diagram of wireless key generation between two peer communication nodes provided in an embodiment of the present application;

[0024] Figure 4 A timing diagram of a peer communication node using timeout retransmission and timeout selective discarding to achieve pairing of channel measurement values ​​between communicating parties, provided in an embodiment of the present application;

[0025] Figure 5 A timing diagram of an embodiment of the present application providing a method for automatically calibrating two peer communication nodes to achieve synchronization of channel measurements between the communicating parties;

[0026] Figure 6 This figure shows the experimental results of the robust wireless key generation method based on timeout selective abandonment and automatic calibration provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The present invention will be described in detail below with reference to the accompanying drawings and embodiments, and the technical problems solved by the technical solution of the present invention and the beneficial effects thereof will be discussed. It should be noted that the described embodiments are intended to facilitate understanding of the present invention and do not have any limiting effect on the present invention.

[0028] Example 1

[0029] like Figure 1 As shown, this embodiment discloses a robust wireless key generation method based on timeout selective abandonment and automatic calibration, and the specific implementation steps are as follows:

[0030] Step 101: Encrypted communication is performed between peer communication nodes, and the communication nodes are authenticated and identified based on the ID and sequence number of the communication data frame payload.

[0031] In this embodiment, the peer communication node checks the node ID and communication sequence number in the data frame to determine whether the ID and sequence number are consistent with expectations, and only receives legal data frames that have passed authentication and meet expectations to resist replay attacks.

[0032] Step 102: The peer communication nodes collect RSSIs measured when receiving authenticated data frames; one node uses timeout retransmission and the other node uses timeout selective discarding to achieve pairing of channel measurements.

[0033] In this embodiment, the peer communication nodes use RSSI as channel characteristic data for wireless key generation.

[0034] Step 103: When the peer communication node collects a specified number of RSSIs, it generates, corrects errors, and verifies a key.

[0035] In this embodiment, peer-to-peer communication nodes preprocess the collected data using a discrete cosine transform (DCT) to reduce the impact of channel noise on wireless key generation. This DCT results in a higher correlation between the channel characteristic data collected by both communicating parties, improving the consensus rate and success rate of key generation between the two communicating parties.

[0036] In this embodiment, the peer communication nodes use the pre-processed channel characteristic data for quantization and select different quantizers according to specific application scenarios. Commonly used quantizers include quantization based on average value and standard deviation and quantization based on difference.

[0037] In this embodiment, peer-to-peer communication nodes use quantization based on mean and standard deviation in indoor environments. In indoor environments, IoT devices experience minimal variations in received power, making a quantizer based on mean and standard deviation more suitable. A quantizer based on mean and standard deviation typically calculates upper and lower thresholds, set based on the mean and standard deviation of the preprocessed channel characteristic data. Channel characteristic data above the upper threshold is quantized as a bit of 1, while data below the lower threshold is quantized as a bit of 0. Channel characteristic data between the upper and lower thresholds is discarded. This method has the advantage of using data with higher discriminability. However, the data collected by both communicating parties may contain errors. If one party discards a piece of data while the other party uses it, subsequent data will mismatch, potentially leading to further errors. Discarding data also wastes resources, reducing key generation efficiency and system efficiency. Therefore, the present invention does not discard channel characteristic data, but instead determines the quantization level based on the information entropy of the channel characteristic data. If the quantization level is less than two, each channel characteristic data point is quantized as one bit. If the quantization level is greater than two, multi-bit mean quantization based on Gray code is used. Taking a quantizer that quantizes a channel characteristic data into two bits as an example, the quantizer sets three thresholds, divides the preprocessed data into four partitions, and uses Gray code to reduce quantization errors between the communicating parties. The Gray codes corresponding to the channel characteristic data in the four partitions are 00, 01, 11, and 10 respectively. Adjacent Gray codes differ by only one bit, which can minimize the quantization error of multi-bit quantization.

[0038] In this embodiment, peer communication nodes use a differential-based quantizer in an outdoor environment. In an outdoor environment, the received power of IoT devices varies greatly, making the use of a differential-based quantizer more suitable. A differential-based quantizer typically uses the size of adjacent data for quantization. If the adjacent data is on an upward trend, that is, the N+1th measurement data is greater than the Nth measurement data, the Nth measurement data is quantized as bit 1; if the adjacent data is on a downward trend, that is, the N+1th measurement data is less than the Nth measurement data, the Nth measurement data is quantized as bit 0; if the adjacent data are equal, the Nth measurement data is discarded. Discarding data will lead to a waste of resources, so the solution adopted by the present invention is that when the adjacent data are equal, the quantization result of the Nth measurement data is the same as the quantization result of the N-1th measurement data. If the first measurement data is equal to the second measurement data, the first measurement data is quantized as bit 1.

[0039] In this embodiment, the peer communication nodes use BCH codes to reconcile information, use the SHA256 function to generate a key hash value, and verify whether the keys are consistent based on the hash value.

[0040] Step 104: If the wireless key generation process between the peer communication nodes is not synchronized, automatic calibration is performed to complete synchronization; and confidentiality enhancement is performed on the verified key.

[0041] In this embodiment, peer-to-peer communication nodes use the SHA256 function for confidentiality enhancement, using the first 128 bits of the SHA256 hash value as the final key. Due to information leakage during the message reconciliation phase, wireless key generation requires generating a key longer than the target key length to resist attacks. Assuming an adversary can steal the error-correcting code for the key generated during the message reconciliation phase, the adversary can construct a binary sequence whose Hamming distance from the final key generated by both communicating parties is less than the error correction capability to recover the final key. Assuming the Hamming distance between the adversary-generated key and the key negotiated by the peer communication nodes is t+10, where t is the set BCH code error correction range, the adversary would need approximately 10^13 traversals to recover the key. As long as the adversary cannot crack the key within a limited timeframe, the communication system is secure. The final step of wireless key generation uses a hash function to compress the longer generated key to the target length. The confidentiality enhancement process discards some of the key, increasing the difficulty for an attacker to recover the key. Each additional key bit generated incurs a certain amount of overhead, but the attacker's brute force traversal range increases significantly.

[0042] like Figure 2 As shown, this embodiment discloses a finite state machine of a peer communication node, and the specific state implementation and conversion are as follows:

[0043] In this embodiment, each peer communication node has five communication states, namely TX state, RX state, TX_ECC_HASH state, TX_HASH state and RX_HASH state. The peer communication node switches between these five states to achieve wireless key generation and autonomous key update.

[0044] In this embodiment, a peer communication node in the TX state constructs and sends a data frame, where the data frame includes a node ID, a communication sequence number, and normal communication content. After successfully sending the data frame, the peer communication node enters the RX state.

[0045] In this embodiment, after successfully receiving a data frame, the peer communication node in the RX state verifies the communication node according to the node ID and communication sequence number of the payload, receives a legal data frame, records the RSSI measured when receiving the frame, and then enters the TX state.

[0046] In this embodiment, when a peer communication node in the RX state collects a specified number of RSSIs, it determines whether the data frame payload contains the error correction code (ECC) and hash value (HASH) of the key. If not, it enters the TX_ECC_HASH state; if so, it enters the TX_HASH state.

[0047] In this embodiment, a peer communication node in the TX_ECC_HASH state preprocesses the collected RSSI data and quantizes it into a key. It then generates an error correction code and hash value for the key and appends them to the next data frame for transmission. After successfully transmitting the data frame with the error correction code and hash value, it enters the RX_HASH state.

[0048] In this embodiment, the peer communication nodes use Base64 to encode the error correction code and hash value of the key to reduce communication overhead.

[0049] In this embodiment, after successfully receiving a data frame, a peer communication node in the RX_HASH state verifies the communication node based on the node ID and communication sequence number in the payload, receives a valid data frame, and records the RSSI measured when the frame is received. It then determines whether the payload of the verified valid data frame contains a key hash value. If not, an automatic calibration is performed. If so, the key hash value is extracted and compared with the hash value used to generate the key, and then the node enters the TX state.

[0050] In this embodiment, a peer communication node in the TX_HASH state preprocesses the collected RSSI and quantizes it into a key. It then extracts the error correction code correction key from the data frame. It generates a hash value of the correction key and compares it with the hash value in the data frame for verification. It then appends the hash value of the correction key to the next data frame and enters the RX state.

[0051] like Figure 3 As shown in FIG, this embodiment discloses a timing diagram of a peer communication node performing wireless key generation.

[0052] In a specific embodiment, the peer communication node Alice whose initial state is TX and the peer communication node Bob whose initial state is RX perform encrypted communication and generate a key. The communication node Alice sets a sending delay of 1000 milliseconds, and the communication node Bob has no sending delay. After receiving the data frame, it immediately constructs a data frame and sends it.

[0053] In one embodiment, communication nodes Alice and Bob begin key generation every 145 RSSIs. The peer nodes discard the first preprocessed data, generate a 144-bit key using a mean-based quantizer, and use the SHA256 hash function to enhance the security of the 144-bit key. The first 128 bits of the hash value are used as the final key.

[0054] In one specific embodiment, communication node Bob first collects 145 RSSIs. The 145th data frame received does not contain the key's error correction code and hash value. Node Bob then enters the TX_ECC_HASH state. Node Bob then performs DCT processing and quantization on the 145 collected data to generate the key KEY_Bob. It then generates the error correction code ECC_Bob for KEY_Bob. It then uses the SHA256 hash function to generate the key's hash value HASH_Bob. Node Bob then appends the error correction code ECC_Bob and the key's hash value HASH_Bob to the 145th data frame and sends it. Node Bob then enters the RX_HASH state.

[0055] In a specific embodiment, communication node Alice receives the 145th data frame, which contains a key error correction code and hash value. It records and saves the RSSI measured when receiving this data frame, and then collects 145 RSSIs. Node Alice performs DCT processing and quantization on the 145 collected data to generate the key KEY_Alice and the error correction code ECC_Alice for KEY_Alice. Node Alice extracts the error correction code ECC_Bob and the key hash value HASH_Bob from the 145th data frame and uses ECC_Bob to correct errors. If the Hamming distance between the keys generated by the communicating parties is less than the error correction capability of BCH, KEY_Bob can be successfully corrected and restored. Node Alice uses the SHA256 hash function to generate the corrected key hash value HASH_Alice and verifies whether it is consistent with the hash value HASH_Bob. If so, key generation is successful, and encrypted communication is performed using the newly generated key after security enhancement. If not, key generation fails, and encrypted communication continues using the original key. Node Alice attaches the hash value HASH_Alice to the 146th data frame and sends it, then enters the RX state to continue the next round of wireless key generation.

[0056] In a specific embodiment, the communication node Bob in the RX_HASH state extracts the key hash value HASH_Alice in the 146th data frame. The communication node Bob compares the hash value HASH_Bob with the hash value HASH_Alice in the data frame to see if they are consistent. If they are consistent, the key generation is successful, and the newly generated key is used for encrypted communication after the key is enhanced for confidentiality. If they are inconsistent, the key generation fails and the key is discarded. At the same time, the next round of wireless key generation continues and enters the TX state. It should be noted that this data frame is the first data frame received by the communication node Bob in the next round of key generation. The RSSI measured when receiving this data frame is recorded and saved for the next round of key generation.

[0057] In a specific embodiment, communication nodes Alice and Bob continuously perform the above process to achieve wireless key generation and autonomous key update.

[0058] like Figure 4 As shown, this embodiment discloses a timing diagram of a peer communication node using timeout retransmission and timeout selective discarding to achieve pairing of channel measurement values ​​between communicating parties.

[0059] Wireless key generation requires that the channel measurements collected by both communicating parties are paired, ensuring that each pair of channel measurements is measured within the coherence time. Failure of a communication node to receive a data frame can lead to communication interruption. If both communicating parties use timeout retransmission, the channel measurements collected by both parties may become unpaired, increasing the error rate of key generation.

[0060] In a specific embodiment, the first sender (such as Alice) in the peer communication node uses a timeout retransmission scheme, that is, when the time the communication node is in the RX state is greater than the timeout threshold, the previous data frame is retransmitted to ensure that the specific data frame with the key error correction code and the key hash value can be received by the other party. The other party (such as Bob) uses a timeout selective RSSI abandonment scheme, that is, whether to abandon the last collected RSSI is determined based on the time interval for collecting adjacent RSSIs (the time interval in the RX state). Timeout retransmission solves the problem of communication interruption caused by packet loss, and timeout selective abandonment solves the problem of mismatched channel measurement values ​​of both parties. Such a design can solve the problem of mismatched measurements of the communicating parties after packet loss, and realize channel feature data matching for the entire process of wireless key generation.

[0061] In a specific embodiment, communication node Bob sets a timer when receiving a data frame. If the time interval between two received data frames is greater than the timeout discard threshold, the last collected RSSI is discarded. The discard threshold is greater than the time interval between two received data frames under normal circumstances (packet round-trip delay + transmission delay), and less than the threshold set for timeout retransmission plus the transmission delay of communication node Alice plus the packet round-trip delay. In this case, communication node Alice did not receive the data frame sent by communication node Bob, and communication node Alice retransmitted the data frame after timeout. In this case, communication node Bob received the data frame from communication node Alice and recorded the RSSI measured by receiving this frame; however, communication node Alice did not receive the data frame sent by communication node Bob and could not collect the RSSI paired with it. Therefore, communication node Bob needs to discard the last collected RSSI to ensure the consistency of the channel measurements collected by the communicating parties. Communication node Alice did not receive the data frame sent by communication node Bob, so communication node Bob needs to retransmit the last data frame that communication node Alice did not receive.

[0062] In one specific embodiment, if the time interval between two data frame receipts by communication node Bob exceeds the timeout non-discard threshold, there is no need to discard the RSSI or retransmit the data frame. The timeout non-discard threshold is greater than the timeout retransmission threshold plus the transmission delay of communication node Alice plus the round-trip packet delay. In this case, communication node Bob does not receive the data frame sent by communication node Alice, and neither party records the RSSI. This does not affect the consistency of the channel measurements collected by both parties.

[0063] like Figure 5 As shown, this embodiment discloses a timing diagram of automatic calibration of peer communication nodes.

[0064] In one specific embodiment, if a communication node restarts due to a special condition during communication, the restarted node will lose the previously collected channel characteristic data and generated key. This will cause the amount of channel characteristic data collected by the peer communication nodes to be inconsistent, making it impossible to generate wireless keys normally. In this case, automatic calibration is required to enable both communicating nodes to resume synchronously collecting channel characteristic data.

[0065] In one embodiment, if communicating nodes use encrypted communication, a node restart will lose the previously generated key. In this case, the restarting node will use the initial key to communicate. Therefore, if the newly generated key cannot decrypt the data frame during communication, the initial key will be used to decrypt the data frame.

[0066] In one specific embodiment, when communication node Alice receives a data frame with a key error correction code and hash value and has not yet collected the specified number of RSSIs, it automatically performs calibration, resetting the channel characteristic data (discarding the previously collected RSSIs), enters the next round of key generation, and uses the RSSI calculated when receiving this data frame as the first RSSI used in the next round of key generation. It then enters the TX state, sends the next normal data frame, and begins the next round of key generation. Peer communication node Bob handles this situation in the same way as peer communication node Alice.

[0067] In one specific embodiment, after communication node Bob sends a data frame with a key error correction code and a hash value, if the next received data frame does not include the key hash value, communication node Bob performs automatic calibration, resetting the channel characteristic data (discarding the previously collected RSSI), entering the TX state, and starting the next round of key generation. The RSSI measured when receiving this data frame is used as the first RSSI for the next round of key generation. Peer communication node Alice handles this situation in the same way as peer communication node Bob.

[0068] In a specific embodiment, the transmission delay of the communicating parties is set as follows: the party that sends the data frame first is defined as the first sender, and the first sender is required to set a certain amount of transmission delay; the other party does not experience any delay. This simulates the communication process in a real scenario and makes the channel measurement values ​​collected by the two parties more reciprocal.

[0069] In one specific embodiment, communication node Alice sets a transmit delay of 1000 milliseconds, while communication node Bob does not set a transmit delay. Communication node Alice sends a data frame first. Since communication node Bob does not set a transmit delay, it immediately transmits a data frame after receiving the data frame from communication node Alice. This completes a channel probe on both sides, each collecting an RSSI value. The data frames are received with minimal delay, ensuring channel reciprocity.

[0070] In one specific embodiment, if communication node Alice receives a data frame with a key error correction code and hash value but does not collect sufficient RSSI, communication node Alice uses this data frame as the first data frame received in the next round of key generation. In this case, communication node Bob becomes the first to send the data frame and needs to modify the transmission delay between the two communicating nodes. Communication node Bob sets a transmission delay of 1000 milliseconds, while communication node Alice sets no transmission delay. Peer communication node Bob handles this situation in the same way as peer communication node Alice.

[0071] like Figure 6As shown in FIG, a diagram of experimental results of a robust wireless key generation method based on timeout selective abandonment and automatic calibration disclosed in this embodiment;

[0072] In one embodiment, two peer communication nodes perform wireless key generation in a corridor with people walking around. The distance between the two peer communication nodes is approximately 30 meters. The serial port printout information of the peer communication nodes is obtained through a computer program to display the entire process of wireless key generation. Figure 6 The RSSI line graph shows the data collected by two peer-to-peer communication nodes. In this experiment, the two peer-to-peer communication nodes successfully communicated 4128 times. Even with packet loss on both sides of the communication, 32 128-bit binary keys were successfully generated. The average number of errors was 23.125, and the key inconsistency rate was approximately 0.18.

[0073] As can be seen from the above-mentioned embodiment of the robust wireless key generation method based on timeout selective discard and automatic calibration, this application uses the RSSI of received data frames measured during node communication to generate keys, without affecting the original communication, and only adding a small amount of overhead to achieve wireless key generation; using an automatic calibration reset mechanism to enable both communicating parties to continue to synchronously collect RSSI data after an unexpected node restart; and using timeout retransmission and timeout selective discard of RSSI mechanisms to solve the problem of RSSI mismatch between the communicating parties after packet loss. The present invention can realize key generation and autonomous update between two communicating nodes, and can significantly improve the robustness of the wireless key generation system.

[0074] The above specific description further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A robust wireless key generation method based on timeout selective discarding and automatic calibration, characterized by: The method is implemented based on two peer communication nodes, each of which includes a wireless key generation module; the peer communication nodes are divided into five communication states, namely, a TX state for sending data frames, an RX state for receiving data frames, a TX_ECC_HASH state for sending data frames with key error correction codes and hash values, a TX_HASH state for sending data frames with key hash values, and an RX_HASH state for receiving data frames with key hash values; The robust wireless key generation method based on timeout selective abandonment and automatic calibration includes the following steps: S1. Two peer communication nodes switch between the TX state and the RX state to continuously perform encrypted communication. The peer communication node in the TX state constructs and sends a data frame. The data frame contains the node ID, communication sequence number and normal communication content. After successfully sending the data frame, it enters the RX state. After successfully receiving a data frame, the peer communication node in the RX state authenticates and identifies the communication node based on the node ID and communication sequence number in the payload, receives legal data frames, discards illegal data frames, records the RSSI measured when receiving legal frames, and then enters the TX state; S2. One of the two peer communication nodes adopts a timeout retransmission scheme, that is, when the time the communication node is in the data frame receiving state is greater than the timeout threshold, it enters the data frame sending state and retransmits the previous data frame; the other node adopts a timeout selective discard scheme, and decides whether to discard the previous collected RSSI according to the different time intervals for collecting adjacent RSSIs caused by different packet loss situations of the communicating parties; if the time interval between two received data frames is greater than the timeout discard threshold, the previous collected RSSI is discarded; the discard threshold is greater than the time interval between two received data frames under normal circumstances, and less than the threshold set for timeout retransmission plus the sending delay of the communication node plus the round-trip delay of the packet; if the time interval between two received data frames is greater than the timeout non-discard threshold, there is no need to discard the RSSI; the timeout non-discard threshold is greater than the timeout retransmission threshold plus the sending delay of the communication node plus the round-trip delay of the packet; S3. When the peer communication node in the RX state collects a specified number of RSSIs, it determines whether the data frame payload contains the error correction code ECC and hash value HASH of the key. If not, it enters the TX_ECC_HASH state. At this time, the peer communication node first collects a specified number of RSSI data, preprocesses the data and quantizes it into a key, and generates an error correction code and hash value for the key. Then, the error correction code and hash value generated by the key are attached to the data frame of normal communication and sent to another node of the peer communication node. After successfully sending the data frame with the error correction code and hash value, it enters the RX_HASH state, and then proceeds to step S4. If yes, it enters the TX_HASH state, the peer communication node receives the data frame with the key error correction code and hash value, collects the RSSI measured when receiving this data frame, and extracts the error correction code and hash value in the data frame; At this point, the node also collects a specified amount of RSSI data, pre-processes the collected data, and quantizes it into a key. The extracted error correction code is used to correct the key generated by the node; Generate a hash value of the corrected key and compare it with the extracted hash value. If they are consistent, the key generation is successful and the generated key is protected by a hash function. If they are inconsistent, the key generation fails and the next round of key generation is performed. The hash value of the corrected key is attached to the data frame of normal communication and sent to the other node, and then enters the RX state. S4. After successfully receiving the data frame, the peer communication node that has entered the RX_HASH state verifies the communication node according to the node ID and communication sequence number of the payload, receives the legal data frame, and records the RSSI measured when receiving the frame; determines whether the payload of the verified legal data frame contains the key hash value. If not, automatic calibration is performed, the previously collected channel characteristic data is discarded, and the TX state is entered; if the key hash value is contained, the key hash value is extracted and compared with the hash value of the generated key. If they are consistent, the key generation is successful, and the generated key is enhanced with a hash function. If they are inconsistent, the key generation fails; the key hash value is extracted and compared, and the TX state is entered; S5. Under normal circumstances, a single wireless key generation is implemented according to steps S1 to S4, and the peer communication node repeats steps S1 to S4 to switch between the five states to implement wireless key generation and autonomous key update; if the wireless key generation process between the peer communication nodes is not synchronized, the communication parties successively discard the previously collected channel characteristic data using the automatic calibration method to achieve synchronous collection of channel characteristic data, thereby synchronizing the wireless key generation process, and return to step S1 to perform wireless key generation until robust wireless key generation based on timeout selective discarding and automatic calibration is completed; further, in step S3, the collected RSSI is preprocessed using discrete cosine transform; a quantizer based on average and standard deviation is used in indoor scenarios; and a quantizer based on difference is used in outdoor scenarios; Use BCH to generate error correction codes.

2. The robust wireless key generation method based on timeout selective discard and automatic calibration according to claim 1, wherein: The wireless key generation process is asynchronous and can be divided into the following two situations: Case 1: The expected data frame is not received in the RX_HASH state when receiving the data frame with the key hash value; Case 2: When a data frame with a key error correction code and a hash value is received in the data frame receiving state, the specified number of RSSIs is not collected.

3. The robust wireless key generation method based on timeout selective discard and automatic calibration according to claim 1 or 2, characterized in that: In steps S3 and S4, the verified key is compressed using the SHA256 hash function to achieve enhanced confidentiality.

4. The robust wireless key generation method based on timeout selective discard and automatic calibration according to claim 3, wherein: The peer communication nodes use Base64 to encode the transmitted messages to reduce communication overhead; the transmitted messages include an error correction code and a hash value of the key.

Citation Information

Patent Citations

  • NDN link layer and network layer fusion transmission method in wireless scene

    CN110690945A

  • Physical layer security key extraction method based on fuzzy extractor negotiation

    CN113746624A