Unmanned aerial vehicle and ground station key extraction method based on RSSI

Through the RSSI-based key extraction method, combined with the sliding window smoothing and Cascade protocols of CCA and LCA, the problem of key generation in the dynamic environment is solved, and key extraction with high mobility and real-time response is achieved, improving the security and reliability of drone communication.

CN120378873APending Publication Date: 2025-07-25NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510200238.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing UAV communication security mechanism is difficult to effectively generate shared encryption keys in dynamic and highly mobility environments. Traditional methods are complex in computing and have high equipment performance requirements, which cannot meet the needs of lightweight sensing devices.

Method used

The RSSI-based key extraction method is used to obtain the timestamp and RSSI value data through the interaction between the two-way broadcast message between the ground station and the drone, and combine the sliding window smoothing and horizontal crossing algorithm (LCA) of typical correlation analysis (CCA) to optimize the key extraction, and use the Cascade protocol to coordinate information and privacy amplification to generate a consistent key.

Benefits of technology

Achieve high mobility and real-time response capabilities in dynamic and complex environments, improve the accuracy and reliability of key extraction, overcome the problem of packet transmission and reception delays, and is suitable for real-time data transmission tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378873A_ABST
    Figure CN120378873A_ABST
Patent Text Reader

Abstract

The invention discloses an RSSI (Received Signal Strength Indicator)-based unmanned aerial vehicle and ground station key extraction method, which comprises the following steps of: 1, setting a ground station and an unmanned aerial vehicle to be in a wireless network card monitoring mode, and obtaining a timestamp and RSSI value data of a data packet through bidirectional broadcast message interaction; 2, aligning a system clock, calculating a time difference after removing abnormal data, and adjusting a timestamp based on the time difference; step 3, extracting RSSI matching strings of the ground station and the unmanned aerial vehicle; step 4, performing sliding window smoothing on the matched RSSI data based on the CCA, and performing double-threshold quantization on the smoothed RSSI data based on the LCA to generate an initial key; and carrying out information coordination and privacy amplification based on a Cascade protocol, and finally generating a consistency key. The method has high mobility and can adapt to a complex environment, the problem of data packet transmission and receiving delay caused by hardware and software limitation is solved to a certain degree, and the accuracy and reliability of key extraction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of system security, and particularly relates to a new framework for extracting keys between an unmanned aerial vehicle and a ground station based on (Received Signal Strength Indicator) RSSI. Background Art

[0002] The Internet of Things is an omnipresent connection that links various devices and has capabilities such as computing, communication, and sensing. It is a network that combines mobile communication and computer networks. On the one hand, the Internet of Things pervades and revolutionizes all aspects of our lives, and intelligent transportation, smart homes, industrial monitoring, environmental monitoring, etc. have gradually entered our lives. On the other hand, various security and privacy issues of the Internet of Things have continuously emerged, attracting the attention of many experts and scholars. With the progress of technology and the continuous reduction of manufacturing costs, the scope of application of unmanned aerial vehicles (UAVs) is becoming wider and wider, and they are gradually moving from the military field into industrial production and people's daily lives. The privacy and security issues of UAVs have drawn attention. While people enjoy the convenience brought by the wireless communication of UAVs, they notice that the broadcast nature of wireless communication easily makes the transmission vulnerable to passive eavesdropping or active interference, resulting in the theft of data in the Internet of Things. Especially many sensitive, private or confidential information, such as confidential photos taken by UAVs, etc. These information are highly confidential, so the security requirements for the transmission channel are very high. Also, because UAV devices themselves are low-power, low-cost, and lightweight devices, they cannot withstand conventional public key cryptography (PKC) for key distribution and symmetric encryption for data protection, because usually complex encryption algorithms are accompanied by high additional silicon usage, additional power consumption, and code space required for mathematical calculations.

[0003] Unmanned aerial vehicles (UAVs) usually involve the transmission of sensitive data, such as real-time video, control commands, and telemetry information. If intercepted or tampered with, it may cause serious consequences. Therefore, in the face of the inherent broadcast nature of the wireless communication channel, ensuring a secure communication channel is crucial for protecting this data from unauthorized access and malicious threats. The establishment of keys provides the basis for secure communication, so it becomes an important issue. Traditional security mechanisms, such as public key encryption (PKC) and symmetric encryption, usually rely on computational complexity to protect data. Recent research has turned to leveraging the physical layer characteristics of the wireless channel to enhance communication security. This approach is rooted in information theory and uses the unique, reciprocal, and time-varying characteristics of the wireless channel to generate shared encryption keys without the need for traditional key distribution mechanisms. Although promising, existing methods mainly focus on static or low-mobility environments, such as indoor settings, low-speed scenarios, and vehicle networks. However, these methods are insufficient when applied to the dynamic and highly mobile environment of UAVs. And these schemes are based on a large amount of computation and have high requirements for the performance of devices. Lightweight sensing devices cannot meet the requirements. Summary of the Invention

[0004] In view of the above problems, the present invention discloses a key extraction method for UAV and ground station based on RSSI, which aims to solve the challenges of dynamic and noisy environments by realizing a packet sending and receiving mechanism for almost simultaneous RSSI measurement, and introduces a sliding window smoothing method based on canonical correlation analysis (CCA) to reduce noise, and utilizes a horizontal crossover algorithm (LCA) to optimize key extraction.

[0005] Technical solution:

[0006] The present invention proposes a method for extracting a key from a UAV and a ground station based on RSSI, comprising the following steps: Step 1, setting the ground station and the UAV to a wireless network card monitoring mode, and obtaining the timestamp and RSSI value data of a data packet through two-way broadcast message interaction;

[0007] Step 2: Align the system clocks of the ground station and the drone, calculate the time difference gap after removing abnormal data, and adjust the timestamp based on the time difference gap;

[0008] Step 3, extract the RSSI matching string of the ground station and the drone;

[0009] Step 4: Input the RSSI matching string into the key extractor for key extraction. Specifically, perform sliding window smoothing on the matching RSSI data based on CCA to weaken the noise of the data information; perform double threshold quantization on the smoothed RSSI data based on LCA to generate an initial key; perform information coordination and privacy amplification on the initial key based on the Cascade protocol to finally generate a consistent key.

[0010] Preferably, in step 2, the sending and receiving timestamps are matched by the data packet sequence number, the average time difference of the data packets with the same sequence number is calculated, and the ground station system clock is adjusted to synchronize with the UAV.

[0011] Preferably, in step 2, the time difference offset is calculated for each matched time pair and recorded in a local array; the variance of all data is calculated, and all data squares in the array offsets that are less than the variance are accumulated to obtain the average value as the gap value.

[0012] Preferably, in step 3, the method for extracting the matching string is as follows: all the data received at one end is sent to the other end in an online form for clock matching. After matching, the time record data on one side is adjusted and compared according to the difference generated by the matching to generate the RSSI information pair for the time matching on both sides. Among the two devices, the side with less information projects and maps to the information of the other side, and a time threshold is set. If matching information can be found within the time threshold, the matching string and the signal are retained; otherwise, the next pair of most matching information is found, and the operation is repeated. Finally, the values of the channel state information RSSI at both ends of the two devices at the same time are extracted as the random source for key extraction in step 4.

[0013] Preferably, in step 4, a sliding window smoothing method based on canonical correlation analysis (CCA) is used to denoise the RSSI matching string: weight sequences a and b are set for the ground station and the unmanned aerial vehicle (UAV) respectively. After the ground station obtains a and b through CCA analysis, it sends the optimal solution b belonging to the UAV to the UAV. Then, both parties use the obtained optimal weights a and b to smooth the data on both sides to obtain the initial data that can be input to the level passing method.

[0014] Preferably, the optimal weights a and b are determined by maximizing the correlation of the smoothed data:

[0015] a = (a1, a2, ……, a k ), b = (b1, b2, b3,.......b k ), and the i-th smoothed data is:

[0016]

[0017] where k represents a window of size k, and the smoothed data sets are: X′ = (x′1, x′2, ……, x′ n-k+1 ), Y′ = (y1′, y2′, ……, y′ n-k+1 ). Use canonical correlation analysis to find the maxρ X′,Y′ optimal solution, and use matrices of size k*k to obtain the specific values of vectors a and b respectively within the CCA framework.

[0018] Preferably, in step 4, the initial key is generated based on LCA: the difference between the original data and the smoothed data is taken to obtain the residual, and the residual is input into the double-threshold quantizer Q to obtain a temporary bit string composed of '0' and '1' strings. The mapping function of Q is

[0019]

[0020] where err means not recording as a bit string, q + = μ x + ασx , q - = μ x - ασ x , μ x is the average value of the overall residual data, σ x is the standard deviation of the overall data, and α is a parameter to be determined.

[0021] Preferably, based on the negotiated error of the temporary bit string, a parameter t to be determined is set. For the ground station side, it is judged whether the length of consecutive "0" or consecutive "1" segments in the bit string is greater than or equal to t.

[0022] If the judgment is yes, the ground station sends the information of all segments to the UAV, searches for whether there is a matching consecutive segment (i.e., whether there is a consistent substring) at the corresponding positions of the consecutive bits of the UAV, and replies to the ground station; otherwise, no processing is performed.

[0023] Preferably, in step 4, the Cascade protocol is used for information reconciliation. First, the inconsistent bits of the key are corrected by comparing parity check codes, then privacy amplification is performed on the parity check code information to obtain the final key, and finally, the dependence is simulated by a Markov chain, and a random extractor is used to make the finally obtained key information meet the requirement of complete randomness.

[0024] The present invention also discloses a key extraction system, and the device is configured in a listening mode and uses the above-mentioned method for extracting keys between the UAV and the ground station based on RSSI.

[0025] Beneficial effects:

[0026] (1) The key extraction method disclosed in this application has high mobility. This method can operate in a highly dynamic environment where the signal strength of UAVs changes rapidly and moves frequently, can adapt to complex environments, and due to its ability to quickly adapt to signal strength changes, this method has strong real-time response capabilities and is outstanding for tasks that require real-time data transmission, such as real-time monitoring and emergency response.

[0027] (2) The key extraction method disclosed in the application improves the ability to solve synchronization problems, and to a certain extent overcomes the problem of packet transmission and reception delay caused by hardware and software limitations. This method overcomes the asynchronous sampling of the wireless channel caused by delay by optimizing the underlying protocol stack and introducing more efficient scheduling algorithms, enabling packets to be sent and received more timely, and improving the accuracy and reliability of key extraction. Description of the Drawings

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly introduced below.

[0029] Figure 1 Packet receiving and sending model diagram of an embodiment of the present invention;

[0030] Figure 2 Example diagram for extracting RSSI matching strings of an embodiment of the present invention;

[0031] Figure 3 Key extraction model diagram of an embodiment of the present invention;

[0032] Figure 4 Key extraction flow chart of an embodiment of the present invention. Detailed implementation manners

[0035] Embodiments of the present invention provide a method. To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0036] The problem model solved by the present invention is as Figure 3 shown. Normal data communication occurs between Alice and Bob, and Eve attempts to eavesdrop on their information.

[0037] Step 1: Set up two mobile device ground stations, Alice and the drone Bob, both equipped with wireless network cards and the wireless network cards are set to the listening mode. Data packets are transmitted and information is exchanged between the devices through a wireless channel, and the RSSI information carried by the data packets is obtained during the process of transmitting the data packets. Specifically,

[0038] Initial communication state: Alice and Bob simultaneously and mutually send broadcast message information to each other. After receiving the data packets, both devices record the channel state information of the packet headers. At the same time, the system clock of the devices is called to record the time stamp under the current device. The two devices send messages to each other without interference.

[0039] Information pair matching and acquisition: Both devices will respectively obtain a string of time and data matching data pairs, and this string of information needs to be adjusted. When Bob finishes reading the information, the read information is saved, downloaded and sent back to Alice, and the information pair matching and acquisition are completed in the offline state.

[0040] In this embodiment, the packet receiving and sending method is as Figure 1As shown in the figure, assume that there are two mobile device ground stations, Alice and the drone Bob, both equipped with wireless network cards and the wireless network cards are set to monitor mode. Data packets are transmitted and information is exchanged between the devices through a wireless channel. During the process of transmitting data packets, the RSSI information carried by the 802.11 data packets can be obtained. The purpose of the experiment is to obtain the channel state information RSSI that can be regarded as being at the same moment, and to minimize the time difference between the devices at both ends of the channel for obtaining the channel state information.

[0041] In the initial state, Alice and Bob simultaneously send broadcast message information to each other. After receiving the data packets, both devices record the channel state information in the header. At the same time, the system calls the system clock of the device to record the timestamp under the current device. The two devices send messages to each other without interference. Finally, both devices will respectively obtain a string of data pairs with time and data matching, and this string of information needs to be adjusted. When Bob finishes reading the information, the read information is saved, downloaded and sent back to Alice, and the matching and acquisition of information pairs are completed in the offline state.

[0042] It should be noted that during the process of sending packets by both parties, there is no need to consider the response signal from the other party, but the data packets are sent independently. In this step, this application only needs to obtain the time information of the key and the RSSI information value of the received signal corresponding to the time.

[0043] Step 2: Align the system clocks of the ground station and the drone, eliminate abnormal data, calculate the time difference gap, and adjust the timestamps based on the time difference gap. Specifically,

[0044] Align the system clocks of the ground station and the drone: For the data packets with calibration serial numbers, record its sending time at the sending device end and the receiving time at the receiving device end respectively. Packet loss may occur during this process, so the data packets need to carry serial number information.

[0045] Adjust the system clock: After aligning the system clocks, send all the clock information of the Bob side to Alice, match the data packet serial numbers at both ends, and take the difference of the times for the same serial number. In this embodiment, calculate the time difference offset under the same serial number respectively and record it in the local array. Calculate the variance of all the data, and accumulate the data in the array offsets whose squares of all data are less than the variance, and find the average value of these data as the gap value. This can effectively avoid the influence of abnormal data generated during the data packet transmission process on clock synchronization.

[0046] The time difference gap is set as the difference between the system times of the two devices. When matching the data pairs, the time difference needs to be added to adjust the system clocks of the two devices.

[0047] Step 3: Extract the RSSI matching strings of the ground station and the UAV. Specifically,

[0048] After the host obtains the timestamp information and channel state information pairs acquired by the Alice device and the Bob device, it matches the RSSI information between the two devices to obtain the channel state information at the same time.

[0049] Extraction method: Send all the data received at one end to the other end in an online form for matching. After the clock matching is completed, adjust and compare the time record data on one side according to the difference generated by the matching to generate the time matching information on both sides. According to the adjusted RSSI information pair, find the projection mapping of the side with less information to the information of the other side, and set a time threshold. If the most matching information can be found within the specified time threshold, store the matching string and the signal. Otherwise, find the next pair of the most matching information and continue the above operations. Finally, extract the values of the RSSI of the channel state information that can be regarded as being at the same time at both ends of the two devices. This information will be used as the random source for subsequent key extraction and input into the subsequent algorithm.

[0050] In this embodiment, as Figure 2 shown in the Alice and Bob file data, assuming that the set time threshold tem is 2. Since the number of recorded entries in the Alice file is 5 and the number of recorded entries in the Bob file is 8, use the entries with fewer numbers to match the entries with more numbers. So, use the information stored in the Alice file to match the information stored in the Bob file. For the first entry, the time is 2. According to this time, match the information in the Bob file. When looking for the first entry time, although it is within the tem range, it is necessary to continue to look at the next time, which is 2 and can better meet the requirements. Discard the previous information and record the current one, and continue to look for the next one. It is found that although it is still within the tem range, the time difference is already larger than the previous one. So, discard this one and backtrack, and retain the information with time 2. Similarly, find the matching information with times 4, 5, and 8. However, it should be noted that for the information with time 13, since tem is 2, no matching information can be found in the Bob file, so discard this information and continue to look down. Continue this process until the end of the Alice file or the end of the Bob file, and finally obtain the RSSI matching string that meets the requirements.

[0051] Step 4: Input the RSSI matching string into a key extractor for key extraction:

[0052] As Figure 4As shown in the figure, the sliding window smoothing is performed on the matched RSSI data based on CCA to weaken the noise of the data information; the double-threshold quantization is performed on the smoothed RSSI data based on LCA to generate the initial key; the information reconciliation and privacy amplification are performed on the initial key based on the Cascade protocol, and finally the consistent key is generated.

[0053] Explanation of the creativity of LCA: Since the channel changes relatively fast in the scenario of the unmanned aerial vehicle and the ground station, inevitable noise will be generated, which will affect data collection. Through experiments, it is found that in this scenario, the conventional ABSG algorithm will increase the mismatch degree of the generated keys and reduce the final key generation rate. Therefore, the LCA algorithm is adopted in this application. However, directly applying the LCA algorithm to data with high noise cannot meet the requirement of the key extraction rate. At the same time, the original LCA method can be optimized to improve the security of the key. Therefore, this application improves the algorithm from the following three aspects:

[0054] First, for data with high noise, an effective denoising method needs to be designed. This application adopts a real-time sliding window smoothing method for calculating weights based on canonical correlation analysis. Different from other smoothing methods, this method provides weights for the sliding window and has a better effect on smoothing data noise.

[0055] Second, due to environmental changes and the fact that the parameters of the LCA algorithm have a great influence on the experimental results, appropriate parameters need to be set for the algorithm to find the appropriate upper and lower bounds to improve the key generation rate.

[0056] Third, due to the influence of smoothing, there is information dependence between the key bits obtained by the LCA algorithm. The original method for reducing the dependence between keys and improving the randomness of keys is random subsampling. For the unmanned aerial vehicle scenario, we improve this random extraction method and design a randomness extractor to achieve the purpose of eliminating the dependence between keys.

[0057] Specifically,

[0058] Step 4.1, data smoothing: The most original rough data contains a lot of noise due to reasons such as equipment environment and RSSI instability. The noise of the data information is weakened through the smoothing algorithm idea based on CCA.

[0059] The smoothing algorithm idea of CCA includes:

[0060] Using a sliding smoothing window: First, set the window size value k. Here, the window size can take different appropriate values at any time according to different experimental data sets. For Alice, first set a weight sequence a = (a1, a2,......, a k), similarly, set the weight b = (b1, b2, b3,.......b k ) for Bob. The weights are for obtaining the smoothed data, so all the data here should meet the requirement a i = 1, b i = 1. After meeting the above conditions, we can obtain that the i-th smoothed data is

[0061]

[0062] Therefore, the smoothed data set can be obtained as X′ = (x′1, x′2, ……, x′ n-k+1 ), Y′ = (y′1, y′2, ……, y′ n-k+1 ). Since two unknown vectors a and b are constructed at the beginning of the problem, and the specific content in the vectors is not given, the canonical correlation analysis (CCA) framework is used to solve this problem, that is, to find

[0063] maxρ X′,Y′ (3)

[0064] The optimal solution problem.

[0065] Finally, under the CCA framework, using the k*k matrix, the specific values of vectors a and b can be obtained respectively. After obtaining the smoothing weights, use these vectors to smooth other data, and the denoised input level of the original data can be obtained through the algorithm.

[0066] Algorithm steps: First, for the two devices Alice and Bob that obtain the original RSSI values, Bob transfers the data to Alice online and performs time matching.

[0067] Then, after Alice uses CCA analysis to obtain a and b, Alice sends the optimal solution b belonging to Bob to Bob. After that, both parties use the obtained optimal weights a and b to smooth the data on both sides, and the initial data that can pass the input level method can be obtained.

[0068] It should be noted that the smoothed RSSI is very likely to be a function related to the distance between the two devices. Therefore, even though the eavesdropper does not know the specific RSSI information obtained by the Alice and Bob devices, it will still make the smoothed data insecure. Through analysis, for the sliding smoothing window size k, if the value of k is small enough, the influence of smoothing on the distance it generates is not sufficient for the eavesdropper to obtain information. Therefore, the best state of the k value adopted is that it can meet the requirements for data smoothing and make the k value as small as possible. Preferably, when k = 3, satisfactory performance can be achieved.

[0069] Step 4.2, LCA extracts the key: Convert the RSSI data into a continuous bit string and extract the key from it. It includes:

[0070] Step 4.21, subtract the slow change to obtain the residual: Before inputting the smoothed data into the LCA algorithm, remove the slow change in the data. Subtract the value obtained after smoothing with a sliding window from the measured original data, and call the obtained difference data the residual. Input the residual as the next original data into the next double-threshold quantizer.

[0071] Step 4.22, quantize the original information based on the double-threshold quantizer Q(x) and extract the key. The double-threshold quantizer uses the overall average and standard deviation of the data as the quantization thresholds during the quantization stage to quantize the original information. It includes:

[0072] Step 4.21, set the threshold values q + and q - of the double-threshold quantizer Q related to the overall mean μ x and standard deviation σ x of the data, as well as a to-be-determined parameter α. The mapping function of the double-threshold quantizer Q is

[0073]

[0074] where err means not recorded as a bit string, q + = μ x + ασ x , q - = μ x - ασ x . Thus, a temporary bit string composed of '0' and '1' strings is obtained.

[0075] Step 4.22, after the data passes through the double-threshold quantizer, a series of continuous bits are obtained. However, due to factors such as channel noise, the continuous bit strings finally obtained by devices Alice and Bob are very likely to be not completely matched. Therefore, negotiate errors during the key extraction stage to reduce the key mismatch rate.

[0076] Define the following negotiation protocol:

[0077] Step 4.21, specify a t value. In this embodiment, t = 3.

[0078] Step 4.22: For the Alice side, find the consecutive "0" or consecutive "1" segments in the bit string, and determine whether the length of the consecutive segment is greater than or equal to t. For example, for the bit string "1111e00eee0000e1111111e1", the consecutive segments obtained by Alice are "1111", "0000", and "1111111". Only obtain and send the substrings in the bit string whose length is greater than or equal to t, and send them to the other end after obtaining.

[0079] Step 4.23: Alice sends the information of all obtained segments, i.e., the segment center position, serial number, etc. to Bob, and then searches for matching and required consecutive segments at the corresponding positions in Bob's consecutive bits and replies to Alice.

[0080] Since then, both ends have extracted their own key information, also called encoded bits. However, it should be noted that despite these operations, the values of Alice and Bob may still be different. Record these differences as mismatches and leave them for subsequent steps to handle.

[0081] In this embodiment, LCA is a common and implementable method for generating a shared key from known information. The main steps include: (1) quantifying the initial signal with a double-threshold quantizer Q(x); (2) extracting the required key from the quantized signal. The principle of the double-threshold quantizer is as follows: for the original data, the quantized value is 1 if it is above the q+ line, 0 if it is below the q- line, and the values between the two lines, that is, near the mean, are discarded. The quantized result is "00e1111ee1111111e0000000e110". The key extraction method based on the double-threshold quantizer is not the most perfect. For those points near the mean, the present invention discards them and does not use them, so the key generation rate of this algorithm will be reduced.

[0082] Step 4.3: Information reconciliation: Use the cascade method to ensure the consistency of the final key. It includes: The information reconciliation adopts the Cascade protocol, and corrects the inconsistent bits of the key through parity check code comparison.

[0083] Step 4.31: Matching check: The communication parties exchange their generated parity check codes multiple times and compare these check codes to check whether their bit strings match. If a mismatch is found, determine and correct the positions of the error bits through a series of predefined interaction rules. After multiple rounds of comparison and error correction processes, Alice and Bob can obtain a completely consistent bit string key. Although this process exposes some information to the potential eavesdropper Eve, since it is only parity information, the amount of information leaked is limited.

[0084] Step 4.32, Privacy Amplification: Some information related to its own key, that is, parity check code information, is exposed to malicious entities. The method of privacy amplification is used to reduce the effective information that Eve can obtain. Usually, it is achieved by applying a hash function to compress the original key into a shorter new key, so that even if Eve has some information about the original key, she cannot infer the new key from it, confusing the malicious entity Eve and making the information that Eve can obtain on average not exceed one bit, ensuring the security of the extracted key.

[0085] Step 4.4, Key Randomness Expansion: A Markov chain is used to simulate and analyze the dependence relationship between key sequences, and then the random extractor technology is used to extract highly random key information from these sequences to improve the key randomness, making it more difficult to be predicted or attacked, and enhancing the security of the entire encryption system. Specifically,

[0086] Step 4.41, Model Establishment: To accurately simulate the dependence relationship in the key sequence, it is necessary to determine the order of the Markov chain used. The Bayesian Information Criterion (BIC) Markov model order estimator is used. BIC is a model selection criterion that balances the complexity of the model and the degree of fitting to the data. By calculating the BIC values at different orders, the order that minimizes BIC can be selected as the final order of the Markov chain. This can effectively avoid overfitting or underfitting problems, and thus more accurately reflect the actual dependence relationship in the key sequence.

[0087] Step 4.42, Encoding Bits: After determining the Markov chain model, the next step is to use this model to estimate the Shannon Entropy of the key sequence. Shannon Entropy is an important indicator to measure information uncertainty and reflects the randomness degree of the key sequence. By analyzing the Shannon Entropy estimated by the model, the redundancy and predictability existing in the current key sequence can be understood. Then, new and highly random encoding bits are extracted from the original key sequence through a random extractor. The role of the random extractor is to generate an almost completely random output sequence from an input source with a certain degree of randomness but possibly containing some structures or dependence relationships. This process can significantly improve the randomness and unpredictability of the key, thereby enhancing the security of the encryption system.

[0088] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for extracting keys between an unmanned aerial vehicle and a ground station based on RSSI, characterized in that, The following steps are involved: Step 1: Set the ground station and the drone to wireless network card monitoring mode, and obtain the timestamp and RSSI value data of the data packet through two-way broadcast message interaction; Step 2: Align the system clocks of the ground station and the drone, calculate the time difference gap after removing abnormal data, and adjust the timestamp based on the time difference gap; Step 3, extract the RSSI matching string of the ground station and the drone; Step 4: input the RSSI matching string into a key extractor for key extraction. Specifically, the matching RSSI data is smoothed by sliding window based on CCA to reduce the noise of the data information. Based on LCA, the smoothed RSSI data is double-threshold quantized to generate the initial key; Based on the Cascade protocol, the initial key is coordinated and privacy amplified to finally generate a consistent key.

2. The method for extracting keys of the drone and the ground station based on RSSI according to claim 1, wherein, In step 2, the sending and receiving timestamps are matched by the data packet sequence number, the average time difference of the data packets with the same sequence number is calculated, and the ground station system clock is adjusted to synchronize with the drone.

3. The method for extracting keys of the drone and the ground station based on RSSI according to claim 1, wherein In step 2, the time difference offset is calculated for each matched time pair and recorded in a local array; the variance of all data is calculated, and all data squares in the array offsets that are less than the variance are accumulated to obtain the average value as the gap value.

4. The method for extracting keys between a drone and a ground station based on RSSI according to claim 1, wherein In step 3, the method for extracting the matching string is as follows: all data received at one end are sent online to the other end for clock matching. After matching, the time record data on one side is adjusted and compared according to the difference generated by the matching to generate an RSSI information pair with time matching on both sides; in the two devices, the side with less information finds a projection mapping to the information on the other side, and sets a time threshold. If matching information can be found within the time threshold, the matching string and signal are retained, otherwise the next pair of the best matching information is found, and the operation is repeated. Finally, the channel state information RSSI value at the same time at both ends of the two devices is extracted as a random source for key extraction in step 4.

5. The method for extracting keys of a drone and a ground station based on RSSI according to any one of claims 1-4, characterized in that, In step 4, a sliding window smoothing method based on canonical correlation analysis (CCA) is used to reduce the noise of the RSSI matching string: weight sequences are set for the ground station and the drone respectively. a, b. After the ground station obtains a and b through CCA analysis, it sends the optimal solution b belonging to the UAV to the UAV. After that, the two parties use the obtained optimal weights a and b to smooth the data on both sides and obtain the initial data that can be input into the level pass method.

6. The method for extracting keys of the drone and the ground station based on RSSI according to claim 5, characterized in that, The optimal weights a and b are determined by maximizing the correlation of the smoothed data: a = (a1, a2, ……, a k ), b = (b1, b2, b3,.......b k ), and the i-th smoothed data is: Among them, k represents a window of size k, and the smoothed data set is X′ = (x′1, x′2, ……, x′ n-k+1 ),Y′ = (y′1, y′2, ……, y′ n-k+1 ), Use canonical correlation analysis to find maxρ X′,Y′ For the optimal solution, under the CCA framework, the specific values of vectors a and b are obtained using matrices of size k*k respectively.

7. The method for extracting keys of the drone and the ground station based on RSSI according to claim 5, characterized in that In step 4, the initial key is generated based on LCA as follows: the original data and the smoothed data are subtracted to obtain a residual, and the residual is input into the double threshold quantizer Q to obtain a temporary bit string consisting of a string of '0' and '1'. The mapping function of Q is where err means not recorded as a bit string, q + = μ x + ασ x , q - = μ x - ασ x , μ x is the average value of the overall residual data, σ x is the standard deviation of the overall data, and α is a parameter to be determined.

8. The method for extracting keys of the UAV and the ground station based on RSSI according to claim 7, characterized in that, Based on the negotiated error of the temporary bit string, a pending parameter t is set. For the ground station side, it is judged whether the length of consecutive "0" or consecutive "1" segments in the bit string is greater than or equal to t. If the judgment is yes, the ground station sends the information of all segments to the UAV, searches for whether there is a matching consecutive segment at the corresponding position of the consecutive bits of the UAV, that is, whether there is a consistent substring, and replies to the ground station; otherwise, no processing is performed.

9. The method for extracting keys of an unmanned aerial vehicle and a ground station based on RSSI according to claim 5, wherein In step 4, the Cascade protocol is used for information reconciliation. First, the inconsistent bits of the key are corrected by comparing parity check codes, then privacy amplification is performed on the parity check code information to obtain the final key. Finally, the dependence is simulated by using a Markov chain, and a random extractor is used to make the finally obtained key information meet the requirement of being completely random.

10. A key extraction system, comprising a ground station and a drone, characterized in that, The device is configured in a listening mode and executes the method according to any one of claims 1-6.