An adaptive frequency hopping RKE secure communication method, system, device and medium

By combining adaptive frequency hopping and ECC certificate authentication, the problems of RKE system vulnerability to interference and replay attacks are solved, the system's anti-interference and confidentiality are improved, and the authenticity and integrity of control commands are ensured.

CN118041395BActive Publication Date: 2025-10-21XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410363270.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-10-21
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Existing RKE systems are vulnerable to replay attacks, interference attacks, and relay attacks. Furthermore, their reliance on unidirectional radio frequency transmission makes the signal easily recorded and interfered with, making it impossible to effectively verify the signal source and affecting system security and availability.

Method used

Adaptive frequency hopping technology is used to dynamically adjust the frequency. Combined with lightweight elliptic curve cryptography (ECC) certificate authentication and symmetric encryption, a lightweight one-way authentication protocol is designed to ensure the anti-interference capability of communication and the authenticity of the signal.

Benefits of technology

It improves the anti-interference and confidentiality of the RKE system, enhances the verification of the source of control commands, reduces the possibility of signal recording and interference, and improves the security and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118041395B_ABST
    Figure CN118041395B_ABST
Patent Text Reader

Abstract

A self-adaptive frequency hopping RKE secure communication method, system, device and medium, the method of which comprises the following steps: initializing the self-adaptive frequency hopping RKE secure system; establishing a communication connection; authenticating the identity of the vehicle and the key; selecting a self-adaptive frequency hopping channel; transmitting control instructions after encryption; updating certificates; on the basis of the widely used rolling code RKE system, a self-adaptive frequency hopping scheme is proposed to transmit signals to avoid interference from signals on the same channel; an encryption scheme for radio frequency signals is proposed to solve the problem that the vehicle cannot execute remote control commands due to signal interference, and to avoid recording signals for password analysis, thereby further improving the confidentiality of communication; a lightweight one-way authentication protocol based on digital certificates is designed to authenticate the vehicle and the key, ensuring the authenticity and integrity of the control instructions, thereby enhancing the security of the entire system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of cyberspace security technology and communication technology, and relates to an adaptive frequency hopping RKE secure communication method, system, equipment and medium. Background Art

[0002] At present, the mainstream communication method between vehicles and keys mainly consists of two parts: Passive Keyless Entry (PKE) and Remote Keyless Entry (RKE).

[0003] PKE (Passive Keyless Entry) operates when a car key receives a sensing signal from an onboard module within a specified range and transmits a response signal. The system then automatically unlocks the door if the driver is a legitimate and authorized driver. The RKE system consists of a key transmitter module and an in-vehicle receiver module. When the key button is pressed, the key transmits a radio frequency signal in the ultra-high frequency band (typically 315MHz, 433MHz, or 868MHz) to the vehicle. The signal is received by the vehicle antenna, decrypted by the body control module, and then activated by an actuator. This paper primarily designs a secure communication model for the RKE system.

[0004] When RKE systems were first proposed, keys used fixed codes to send control commands. This means the control code for each command sent remained unchanged. Fixed codes are vulnerable to replay attacks, which can be successfully exploited by an adversary simply recording and replaying the code using a software-defined radio (SDR) device (such as the HackRF and USRP). To protect fixed-code RKE systems from this simple replay attack, rolling-code RKE systems were introduced. A rolling code is generated by a counter value. When the unlock button on the key fob is pressed, the counter increments and a new rolling control code is generated. Each generated control code can only be used once to unlock or close the vehicle door. Microchip's KeeLoq and NXP's Hitag-2 rolling code schemes are widely used in RKE systems. Research both domestically and internationally has shown that even rolling codes cannot completely protect against jamming attacks, cryptanalysis attacks, relay attacks, replay attacks, and combined jamming and replay attacks.

[0005] The Hitag-2-based remote keyless entry system attack vulnerability only requires capturing 4-8 radio packets. A few minutes of computing on a laptop can recover and clone the remote control key, compromising the integrity of the RKE system and the confidentiality of the key. Furthermore, an attacker can launch an interference attack by interfering with the key's RF signal with another high-power signal of the same frequency. This attack interferes with and blocks certain control commands (such as locking) and grants the attacker unauthorized access, thereby compromising the availability of the RKE system.

[0006] From the perspective of the rolling code RKE system's operating mechanism, the security threats it faces, such as interference, wireless signal recording, and replay, are caused by its inherent mechanism. First, the unidirectional nature of radio frequency prevents the vehicle from verifying whether the signal it receives is from a legitimate user. Second, the fixed frequency nature of radio frequency signals (transmitted on a fixed single frequency or two frequencies) makes it easy for adversaries to record, replay, or interfere with its wireless signals. Furthermore, low-cost software-defined radio kits (HackRF One, RTL-SDR, and USRP) can be easily programmed to interfere, capture, and replay signals, making the threshold and cost of launching interference and replay attacks very low.

[0007] For the above problems, the existing technical solutions still have many shortcomings:

[0008] Addressing threats to wireless keyless entry systems (RKEs) such as signal recording, jamming, and replay is a challenging problem. [RPParameswarath and B.Sikdar, "An Authentication Mechanism for Remote Keyless Entry Systems in Cars to Prevent Replay and RollJam Attacks," 2022 IEEE Intelligent Vehicles Symposium (IV), Aachen, Germany, 2022, pp. 1725-1730, doi:10.1109 / IV51971.2022.9827256.] propose an efficient authentication mechanism to protect RKE systems from such attacks with minimal modifications. The mechanism leverages hashing and asymmetric cryptography to securely transmit signals from the key center to the car, preventing replay. The security of the mechanism is demonstrated through informal security proofs and simulated. This scheme proposes an identity authentication scheme and uses timestamps to resist replay attacks in RKE systems. However, it relies on the original radio frequency transmission channel and does not address interference attacks. Furthermore, it uses RSA, a non-lightweight asymmetric encryption algorithm, for encryption, which incurs significant overhead. [K. Joo, W. Choi, and D. H. Lee, “Hold the door! Fingerprinting your car key to prevent keyless entry car theft,” in Proc. Netw. Distrib. Syst. Secur. Symp., 2020, pp. 1–18.] Radio frequency (RF) fingerprinting is used to detect attacks on RKE systems. This method uses the different characteristics of RF devices due to hardware defects to distinguish between genuine and malicious key fobs. However, fingerprinting relies on machine learning, and training errors can lead to false positives.[K.Greene,D.Rodgers,H.Dykhuizen,Q.Niyaz,K.Al ShamailehandV.Devabhaktuni,"A Defense Mechanism Against Replay Attack in RemoteKeyless Entry Systems Using Timestamping and XOR Logic,"in IEEE Consumer Electronics Magazine,vol.10,no.1,pp.101-108,1Jan.2021,doi:10.1109 / MCE.2020.3012425.] A security-enhanced RKE system using timestamp and XOR encoding is proposed to defend against replay and "interference + replay" attacks. Although this scheme solves the two typical attack methods of replay and "interference + replay", the system still relies on one-way radio frequency transmission and cannot solve relay attacks, interference attacks and identity authentication problems.

[0009] Frequency hopping communication technology divides the communication frequency band into multiple small frequency points and switches frequencies quickly. Frequency hopping technology can effectively resist external interference and eavesdropping, and to a certain extent improve the anti-interference and security of the system. Adaptive frequency hopping (AFH) has higher flexibility and adaptability than ordinary frequency hopping. Ordinary frequency hopping systems usually use a fixed pre-defined frequency hopping sequence, while adaptive frequency hopping systems can dynamically adjust the frequency hopping strategy according to the real-time channel conditions and interference conditions, and select the best frequency hopping frequency and sequence to maximize the reliability and anti-interference ability of communication. Michael, Jiska Classen, Carlo Alberto Boano, Matthias Hollick, and Kay "Improving the Reliability of Bluetooth Low Energy Connections." In EWSN, pp. 144-155. 2020.] An adaptive frequency hopping mechanism is introduced in Bluetooth communication. First, through experiments, we study how to use information collected from the wireless channel to evaluate the quality of the BLE connection at runtime. Then we show how to use this information to timely blacklist bad channels and select a physical (PHY) mode to maintain high link layer reliability while minimizing power consumption. These two mechanisms are implemented on two popular platforms, and experiments show that the scheme can significantly improve the reliability of BLE connections, reducing packet loss by up to 22% compared to existing solutions. [Poirot, Valentin, and Olaf Landsiedel. "eAFH: Informed Exploration for Adaptive Frequency Hopping in Bluetooth Low Energy." In 202218th International Conference on Distributed Computing in Sensor Systems (DCOSS), pp. 1-8. IEEE, 2022.] A new channel management scheme in BLE, eAFH, is introduced, which focuses on efficient channel reactivation. eAFH uses only past measurements to assess the frequencies most likely to benefit from reinclusion in the frequency hopping sequence. Therefore, eAFH is able to adapt to dynamic scenarios where interference changes over time. In the presence of dynamic WiFi interference, eAFH can achieve 98-99.5% link layer reliability.

[0010] Currently, digital key solutions using technologies such as Bluetooth, NFC, and UWB are working to address these issues. However, digital key applications are not yet widespread in the market and are still in the exploration and development stages. Digital key systems typically require regular maintenance and software updates, which impose additional costs and management burdens. As a result, digital key system equipment and installation costs are high, and the price is generally high. In addition, their operation requires portable devices such as mobile phones and smartwatches. This makes digital key systems unsuitable for all application scenarios. Summary of the Invention

[0011] In order to overcome the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide an adaptive frequency hopping RKE secure communication method, system, device and medium. On the basis of the currently widely used rolling code RKE system, an adaptive frequency hopping scheme is proposed to transmit signals to avoid interference from co-channel signals; an encryption scheme for radio frequency signals is proposed to solve the problem that the vehicle cannot execute remote control commands due to signal interference, while also avoiding the recording of signals for cryptographic analysis, thereby further improving the confidentiality of communications; a lightweight one-way authentication protocol based on digital certificates is designed to realize vehicle authentication of car keys, ensuring the authenticity and integrity of the source of control commands; the present invention improves the anti-interference ability of the RKE system, the confidentiality and integrity of information, and ensures the authenticity of the source of control commands, thereby enhancing the security of the entire system.

[0012] In order to achieve the above object, the present invention adopts the following technical solutions:

[0013] An adaptive frequency hopping RKE secure communication method, characterized in that the specific steps include:

[0014] Step 1: Initialization of the adaptive frequency hopping RKE security system, including: (1) initialization of the vehicle server; (2) deployment of the certificate verification system on the vehicle machine; (3) setting up the connection whitelist on the vehicle radio end and deploying the adaptive frequency hopping algorithm; (4) saving the key certificate, key, and vehicle key pseudo ID;

[0015] Step 2: Establish a communication connection; after the system initialization is completed in step 1, the vehicle and the key establish a communication connection;

[0016] Step 3: Adaptive frequency hopping channel selection: After the two parties establish a communication connection in step 2, the adaptive frequency hopping algorithm deployed in item (3) of step 1 is used to select an adaptive frequency hopping channel, and the two parties perform adaptive frequency hopping communication;

[0017] Step 4: The vehicle authenticates the key: After the adaptive frequency hopping channel is selected in step 3, the vehicle key is authenticated through the authentication protocol;

[0018] Step 5: Encrypted transmission of control instructions: After the authentication in step 4 is passed, the control instructions of the car key are encrypted and transmitted. After the vehicle radio frequency end successfully decrypts the transmitted instructions, the transmission instructions are executed;

[0019] Step 6: Adaptive frequency hopping RKE security system update: The two communicating parties jointly implement step 3 and perform system updates at the same time, in the following order: (1) the vehicle server updates and generates a new file; (2) the server sends the newly generated file to the vehicle computer, and the vehicle computer certificate verification system updates and generates a new file; (3) the vehicle computer sends the newly generated file to the vehicle radio frequency end, and the vehicle radio frequency end updates the whitelist; (4) the radio frequency end sends the newly generated file to the key end, and the key end updates the key storage area.

[0020] The specific method of step 1 is:

[0021] 1.1 Vehicle Server Initialization

[0022] 1.1.1ECDSA Signature

[0023] a. Determine three key parameters: elliptic curve E p (a, b), base point G and the order of the base point n;

[0024] b. Select a random number d∈[1,n) as the private key and calculate the public key Q=d·G;

[0025] c. Apply a hash algorithm to the message M (signed content) to obtain its corresponding hash value z = Hash(M);

[0026] d. Generate a random number k∈[1,n) and calculate the point P(x,y)=k·G;

[0027] e. Take r = x mod n, where x is the horizontal coordinate of point P. If r = 0, reselect the random number k;

[0028] f. Calculate s = k -1 (z+rd) mod n, d is the private key, if s=0, reselect the random number k;

[0029] g. The obtained (r, s) is the ECDSA signature of the message M;

[0030] 1.1.2ECDSA Signature Verification

[0031] The public key Q (Q = d·G), the base point G, the order n, and the hash value z are known, and d is the private key;

[0032] h. Calculate u1=s -1 z mod n;

[0033] i. Calculate u2=s -1 r mod n;

[0034] j. Calculation point P = u1G + u2Q = u1G + u2d·G = (u1 + u2d)G = s -1(z+rd)mod n·G=kG, and we get the coordinates of point P (x p ,y p );

[0035] k. If r = x p mod n, then the signature is valid;

[0036] 1.1.3 The vehicle server pseudo-random number generator (PRNG) generates the random numbers rand_init and rand_ca. The random number rand_init is called the initial symmetric key and is used for the symmetric encryption / decryption key for the initial communication between the vehicle radio terminal and the car key. The random number rand_ca is used to generate the key pseudo-ID (PIDfob). The PIDfob is obtained by XORing the read vehicle VIN code and the initial symmetric key rand_ca:

[0037]

[0038] The key pseudo ID (PIDfob) is used for: ① Binding the certificate generated by the vehicle server to the key pseudo ID (PIDfob) during the adaptive frequency hopping RKE security system initialization phase in step 1, proving that the certificate can only be used by the key pseudo ID (PIDfob); ② During the communication connection establishment phase in step 2, the vehicle key fills the broadcast data segment for broadcast transmission; the vehicle radio terminal is used to establish a whitelist and establish a connection within the whitelist; ③ During the key authentication phase in step 3, the vehicle verifies the identity of the vehicle key and whether the vehicle key corresponds to the certificate;

[0039] 1.1.4 The vehicle server uses the ECDSA signature in step 1.1.1 of step 1 to generate the vehicle key's public key (fob.pk), private key (fob.sk), and certificate (fob.crt). Message M in step 1.1.1 of step 1 (c) is the PIDfob, public key (fob.pk), and certificate-related information, i.e., the certificate signature.

[0040] 1.2 Vehicle-mounted deployment certificate verification system

[0041] The vehicle server sends the vehicle key's pseudo ID (PIDfob), certificate (fob.crt), encryption key (rand_init), and public key (fob.pk) to the vehicle certificate verification system. The certificate verification system registers and stores information related to the vehicle key certificate (fob.crt) and the initial symmetric key rand_init. The vehicle certificate verification system includes a certificate serial number file, a certificate file, a revocation system file, and a symmetric key file. The certificate serial number is used to serialize the generated new certificate to facilitate checking the certificate status. The certificate file is used to store all generated files. The revocation system file is used to store revoked certificates. The symmetric key file stores the initial symmetric key rand_init generated by the vehicle server.

[0042] 1.3 Set up a connection whitelist on the vehicle radio terminal and deploy an adaptive frequency hopping algorithm

[0043] 1.3.1 Set up a connection whitelist:

[0044] The vehicle's RF terminal saves the initial symmetric key rand_init generated in step 1.1.3, the pseudo ID (PIDfob) of the vehicle key generated in step 1.1.4, and the MAC address of the vehicle's RF key. A whitelist is set up so that a connection is established only when the pseudo ID (PIDfob) of the vehicle key is broadcast under the MAC address of the vehicle's RF key.

[0045] 1.3.2 Deployment of Adaptive Frequency Hopping Algorithm:

[0046] The adaptive frequency hopping algorithm consists of two modules: data collection module and channel map generation module;

[0047] (1) The ultimate goal of the data collection module is to collect the quality information packet delivery success rate PDR_rate of each channel; the data collection module uses the matrix Latest_PDR_array[m][n] to save the latest m data packet transmission status on each channel i;

[0048] The column "n" of latest_PDR_array[m][n] corresponds to channels 0 to (n-1), and the first to mth rows represent the first to mth packets recorded. The initial value of the matrix is ​​all 0. When the first packet is successfully transmitted on channel 1 (Channel 1), the first row and second column (Channel 1 column) of the matrix are assigned a value of "1". When the second packet fails to successfully transmit on channel 1 (Channel 1), the second row and second column (Channel 1 column) of the matrix are assigned a value of "-1". The data is recorded in sequence. When the last row is recorded, the data in the first row is overwritten to achieve the purpose of data update. After collecting data, the number of "1"s on each channel is counted, that is, the number of packets successfully transmitted on the channel n_ok. The number of "-1"s on each channel is counted, that is, the number of packets failed to transmit on the channel n_fail. Finally, the transmission success rate PDR_rate[i] of each packet on each channel i is calculated.

[0049]

[0050] (2) The channel map generation module is to blacklist the channels whose PDR_rate[i] is less than the threshold (PDR_threshold) (Blacklist(Channel i)), (2) The channel map generation module is to blacklist the channels whose PDR_rate[i] is less than the threshold (PDR_threshold) (Blacklist(Channel i)), and remove the channels in the blacklist to obtain the channel map, and the adaptive frequency hopping communication deployment is completed;

[0051] 1.4 Storage of key certificates, keys, and vehicle key pseudo ID (PIDfob)

[0052] The key end saves the initial symmetric key rand_init, the vehicle key pseudo ID (PIDfob) generated by the vehicle server in step 1.1.3, the key certificate fob.crt generated by step 1.1.4, and the key private key to the key key storage area for secure storage.

[0053] The specific method of establishing the communication connection in step 2 is:

[0054] 2.1 The key end initiates a broadcast: The key end fills the car key pseudo ID (PIDfob) saved in the general storage area in step 1.4 into the broadcast data byte and initiates the broadcast;

[0055] 2.2 Vehicle RF end scanning broadcast: The vehicle RF end starts scanning in a non-connected state, scans the whitelist MAC address set in step 1.3, parses the whitelist MAC address broadcast content, and compares the parsed result with the saved car key pseudo ID (PIDfob) to see if they are the same. If they are the same, a connection is established; otherwise, the connection is rejected.

[0056] The specific method of step 3 is:

[0057] Step 3 is completed based on the deployment of the adaptive frequency hopping system in step 1.3.2:

[0058] 3.1 Use the data collection module in step 1.3.2 to collect the packet delivery success rate PDR_rate[i] on each channel;

[0059] 3.2 Pass the packet delivery success rate PDR_rate[i] on each channel to step 1.3.2 to generate the channel map;

[0060] 3.3 Send the Channel map to the key end to complete adaptive frequency hopping.

[0061] The specific method of step 4 is:

[0062] Step 4 is to authenticate the identity of the car key after steps 2 and 3 are completed. The order of executing step 4 is as follows:

[0063] 4.1 The vehicle's radio frequency terminal generates a random number, rand1, to prevent message replay. It encrypts the random number rand1 using the AES algorithm, with the encryption key being rand_init, to obtain the encrypted authentication data packet, auth_data1.

[0064] auth_data1=Enc_AES[rand_init, rand1]

[0065] The vehicle's radio frequency end sends a certificate request cert_request and an authentication data packet auth_data1 to the key;

[0066] 4.2 The key receives the certificate request cert_request and uses the AES algorithm to decrypt the ciphertext auth_data1 with the key rand_init to obtain the random number rand1′;

[0067] rand1′=Dec_AES[rand_init, auth_data1]

[0068] The key certificate is public and does not need to be encrypted. The car key sends the key certificate fob.crt and the random number rand1′ to the vehicle radio frequency end;

[0069] 4.3 The vehicle's radio frequency terminal receives the key certificate fob.crt and random number rand1′;

[0070] (1) The vehicle RF terminal determines whether the random number rand1′ obtained from the received data packet is equal to the random number rand1 generated in step 4.1. If they are not equal, the vehicle sends a data packet authentication failure flag "verify_fail" and the failure reason "reason = error rand1";

[0071] (2) If the random number rand1′ obtained by parsing the data packet is equal to the random number rand1 generated in step 4.1, fob.crt is forwarded to the vehicle computer to execute step 4.4;

[0072] 4.4 The vehicle certificate verification system uses the ECDSA signature verification principle in step 1.1.2 to authenticate the key certificate:

[0073] (1) The vehicle certificate verification system successfully authenticates the key certificate and informs the vehicle radio frequency end of the successful authentication; the vehicle radio frequency end generates a random number rand2; the vehicle radio frequency end uses the AES algorithm to encrypt the random number rand2, and the encryption key is the initial symmetric key rand_init, to obtain the encrypted authentication data packet auth_data2, and the vehicle radio frequency end sends the authentication data packet auth_data2 and the certificate authentication success flag "verify_ok";

[0074] auth_data2=Enc_AES[rand_init, rand2]

[0075] (2) If the vehicle system authentication fails, the vehicle radio terminal informs the reason for the failure and sends "vetify_failed" and the failure reason "reason = crt error!";

[0076] 4.5 The key receives the data packet;

[0077] (1) If the key receives the authentication failure flag "verify_fail", it will enter sleep mode and wait until the next wake-up;

[0078] (2) If the key receives the authentication success flag "verify_ok", the authentication is successful.

[0079] The specific method of step 5 is:

[0080] 5.1 If the authentication in step 4.5 (2) is successful, the data packet received by the key end is the authentication data packet auth_data2 in step 4.4 (1). The key end uses the AES algorithm to decrypt the authentication data packet auth_data2 to obtain rand2′;

[0081] rand2′=Dec_AES[rand_init, auth_data2]

[0082] Use the AES algorithm to encrypt the control command control and the random number rand2′, with the encryption key being rand_init, to obtain the encrypted control command control_data. The key end then sends the encrypted control command data packet control_data to the vehicle radio frequency end.

[0083] control_data=Enc_AES[rand_init, rand2′||control]

[0084] 5.2 The vehicle's radio frequency terminal receives the encrypted control command data packet control_data and decrypts control_data using the AES algorithm to obtain the random number rand2′ and the control command. The decryption key is the initial symmetric key rand_init. Determine whether the random number rand2′ is equal to the random number rand2 generated in step 4.4 (1).

[0085] rand2′||control=Dec_AES[rand_init, control_data]

[0086] (1) If the random number rand2′ is equal to the random number rand2 generated in step 4.4 (1), the control instruction is executed, and the random number rand2 is used to update the initial symmetric key rand_init as the symmetric key for the next communication;

[0087] (2) If the random number rand2′ is not equal to the random number rand2 generated in step 4.4 (1), the control command is not executed and the connection is disconnected.

[0088] The specific method of step 6 is:

[0089] 6.1 The vehicle server generates new initial symmetric keys rand_init2 and rand_ca2 according to Step 1, Step 1.1.3 and Step 1.1.4; a new vehicle key pseudo ID (PIDfob2), a new public key (fob2.pk), a new private key (fob2.sk), and a new certificate (fob2.crt);

[0090] 6.2 The vehicle server sends the new initial symmetric key rand_init2 generated in step 6.1; the new vehicle key pseudo ID (PIDfob2), the new public key (fob2.pk), the new private key (fob2.sk), and the new certificate (fob2.crt) to the vehicle certificate authentication system;

[0091] 6.3 The vehicle system receives the data sent in step 6.2 and updates the certificate verification system;

[0092] 6.4 The vehicle system sends the new vehicle key pseudo ID (PIDfob2), new public key (fob2.pk), new initial symmetric key rand_init2, new private key (fob2.sk) and new certificate (fob2.crt) updated in step 6.3 to the vehicle radio terminal;

[0093] 6.5 The vehicle radio frequency end updates the whitelist: Use the new vehicle key pseudo ID (PIDfob2) and the vehicle key pseudo ID (PIDfob). Update the initial symmetric key: Update rand_init with the new initial symmetric key rand_init2. The vehicle radio frequency end uses the AES algorithm to encrypt the key private key fob2.sk, the new vehicle key pseudo ID (PIDfob2), and the new initial symmetric key rand_init2 to obtain the encrypted update data packet update_data:

[0094] update_data=Enc_AES[rand_init,PIDfob2||rand_init2||fob2.sk]

[0095] 6.6 The vehicle radio frequency end sends the encrypted update data packet update_data and the new certificate fob2.crt when connected to the key.

[0096] 6.7 The vehicle's radio receives update_data and the new certificate fob2.crt. The car key uses the AES algorithm to decrypt update_data, using the initial symmetric key rand_init as the decryption key, to obtain PIDfob2, rand_init2, and fob2.sk.

[0097] PIDfob2||rand_init2||fob2.sk=Dec_AES[rand_init, update_data]

[0098] 6.8 The key client uses the new key certificate fob2.crt from step 6.6, along with the decrypted new vehicle key pseudo ID (PIDfob2), initial symmetric key rand_init2, and private key fob2.sk, to update the fob.crt, PIDfob, rand_init2, and fob2.sk securely stored in the key storage area in step 1.4. This means that PIDfob2 is used to update PIDfob, rand_init2 is used to update rand_init, and fob2.sk is used to update fob.sk. This completes the certificate, key, private key, and PID update in step 5.

[0099] The system of the RKE secure communication method based on the adaptive frequency hopping includes:

[0100] The RKE security system initialization module is used to initialize the vehicle server in step 1; deploy the certificate verification system on the vehicle computer; set a connection whitelist for the vehicle radio terminal and deploy the adaptive frequency hopping algorithm; and save the key certificate, key, and vehicle key pseudo ID to facilitate the subsequent implementation of the adaptive frequency hopping solution.

[0101] The communication connection module initiates a broadcast through the key end in step 2. The vehicle radio end starts scanning in a non-connected state, scans the whitelist MAC address in step 1, parses the whitelist MAC address, and determines whether to establish a communication connection between the vehicle and the key based on whether the parsed result is consistent with the saved vehicle key pseudo ID (PIDfob);

[0102] An adaptive frequency hopping channel selection module is used in step 3 to select an adaptive frequency hopping channel using an adaptive frequency hopping algorithm based on the completion of system initialization in step 1 and the establishment of a communication connection in step 2;

[0103] An identity authentication module, used in step 4 to authenticate the vehicle key through an authentication protocol after selecting the adaptive frequency hopping channel in step 3;

[0104] The control instruction encryption transmission module is used in step 5 to encrypt and transmit the control instruction of the car key after the car key identity authentication is passed in step 4. The vehicle radio frequency end executes the transmission instruction after successfully decrypting the transmission instruction;

[0105] The security update module is used in step 6 to update the vehicle server; the server sends the newly generated file to the vehicle computer, and the vehicle computer certificate verification system is updated; the vehicle computer sends the newly generated file to the vehicle radio frequency end, and the vehicle radio frequency end updates the whitelist; the radio frequency end sends the newly generated file to the key end, and the key end updates the key storage area.

[0106] The device of the RKE secure communication method based on the adaptive frequency hopping includes:

[0107] memory for storing computer programs;

[0108] A processor is configured to implement the adaptive frequency hopping RKE secure communication method described in steps 1 to 6 when executing the computer program.

[0109] A computer-readable storage medium is used to store a computer program. When the computer program is executed by a processor, it can perform vehicle adaptive frequency hopping RKE safety communication for the adaptive frequency hopping RKE safety communication method described in steps 1 to 6.

[0110] Compared with the prior art, the present invention has the following advantages:

[0111] First, the current RKE system adopts a one-way communication mode, which may be affected by single-frequency interference, reducing the communication quality. In addition, the transmission range of the radio frequency signal is relatively wide, making it impossible to confirm and verify the transmission instructions and signal leakage, as well as record and analyze the radio frequency signal. Secondly, the RKE system adopts a fixed frequency characteristic, which makes the radio frequency signal easy to be intercepted, replayed or interfered. Attackers can use this feature to easily obtain vehicle access rights, posing a serious threat to vehicle safety. The present invention proposes an adaptive frequency hopping RKE security communication solution. By dynamically selecting the optimal frequency for communication, the adaptive frequency hopping system can minimize the impact of interference and improve the utilization of the spectrum. This flexibility and adaptability makes the adaptive frequency hopping communication perform better in complex electromagnetic environments, and also enhances the concealment of the communication, making it more difficult to be eavesdropped or detected. Taking into account its advantages in anti-interference, spectrum utilization and concealment, the adaptive frequency hopping communication solution of the present invention has more outstanding performance advantages compared to the current RKE system.

[0112] The RKE system uses a one-way communication mode, and the radio frequency signal has a wide transmission range, making it difficult to confirm and verify transmission instructions. This invention introduces ECC certificates to authenticate the key's identity. Compared to authentication mechanisms based on RSA certificates, the ECC algorithm requires a shorter key length, resulting in smaller certificates, less storage space, and less bandwidth consumption during network transmission. Furthermore, ECC is generally faster and more efficient in operations such as encryption, decryption, and signature verification, making it suitable for resource-constrained embedded devices such as car keys. ECC-based certificate authentication offers significant advantages in security, efficiency, and resource utilization, making it suitable for a variety of application scenarios. Furthermore, this invention employs a security solution that combines symmetric encryption with a random number mechanism to effectively safeguard message integrity and confidentiality. Symmetric encryption encrypts messages, preventing unauthorized access to their content and ensuring information confidentiality. The introduction of a random number mechanism further enhances security. By introducing random numbers into the encryption process, each encryption result is unique, thus preventing the possibility of replay attacks. This randomness prevents replay attacks from exploiting the same message even if it is transmitted multiple times, thus ensuring the integrity and security of message transmission. By combining symmetric encryption and random number mechanisms, comprehensive protection is provided for message transmission, ensuring the confidentiality, integrity and ability to resist replay attacks of information. The present invention also designs a key storage and update mechanism, which has some advantages over the key negotiation scheme based on ECC and RSA. First, the method of saving keys and updating keys is simpler and more direct, and does not require a complex key negotiation process, thereby reducing the complexity of the system and the difficulty of implementation. Secondly, this method does not require key negotiation before the start of communication, so it can reduce communication delays and improve communication efficiency. In addition, the method of saving keys and updating keys is more efficient in resource-constrained scenarios such as car keys, because it does not require frequent key negotiation operations, saving computing and storage resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] Figure 1 This is a flow chart of the RKE secure communication model with adaptive frequency hopping according to the present invention.

[0114] Figure 2 It is a system structure diagram of the present invention.

[0115] Figure 3 It is the data collection module of the adaptive frequency hopping algorithm of the present invention, and uses the matrix Latest_PDR_array[m][n] to save the latest m data packet transmission status on each channel i.

[0116] Figure 4 This is a one-way authentication protocol based on certificates in the present invention.

[0117] Figure 5 Packet Delivery Rate (PDR) under adaptive frequency hopping scheme and non-adaptive frequency hopping scheme.

[0118] Figure 6 ECC / RSA-based key negotiation time. DETAILED DESCRIPTION

[0119] The present invention will be described in further detail below with reference to the accompanying drawings.

[0120] Related theoretical technologies

[0121] 1.1 Elliptic Curve Cryptography Algorithm

[0122] Elliptic curve cryptography (ECC) is a public key encryption algorithm based on elliptic curve mathematics. Its mathematical foundation is the computational difficulty of elliptic discrete logarithms on the Abel additive group composed of rational points on the elliptic curve.

[0123] Weierstrass standard form for elliptic curves:

[0124] y 2 =x 3 +ax+b

[0125] When the discriminant is not 0, the elliptic curve is non-singular, that is, it is differentiable everywhere:

[0126] 4a 3 +27b 2 ≠0

[0127] 1.1.1 Abelian Groups on Elliptic Curves

[0128] A set is a set in which an operation on two elements is defined, denoted as "addition" and represented by +. For two elements a and b in the set, the "addition" operation is represented as a+b if a+b satisfies the following five properties:

[0129] 1) Closure: If a, b are If a+b is an element in , then so is a+b.

[0130] 2) Associativity: (a+b)+c=a+(b+c).

[0131] 3) There is an identity element: a+0=0+a=a.

[0132] 4) Every element has an opposite number. For every element a, there exists b such that a+b=0. b is the opposite of a and can be expressed as -a.

[0133] 5) Commutative law: (a+b=b+a).

[0134] Then we can get the Abelian group defined on the elliptic curve

[0135] 1) A point on an elliptic curve is an element of G.

[0136] 2) The identity element 0 is defined as the point at infinity.

[0137] 3) The opposite of a point P is a point that is symmetric about the x-axis.

[0138] 4) "Addition" is defined as: P, Q, and R are the three points where a straight line intersects the elliptic curve, then P + Q + R = 0, that is, P + Q = -R;

[0139] 5) When point P is added to its opposite number -P, it intersects the elliptic curve at infinity, that is, P+(-P)=0.

[0140] 1.1.2 Elliptic Curve Parameters

[0141] The parameters in the elliptic curve algorithm are as follows:

[0142] 1) Coefficients a and b in the elliptic curve;

[0143] 2) The size of the finite field is a prime number p;

[0144] 3) Subgroup reference point G;

[0145] 4) the order n of the subgroup;

[0146] 5) the cofactor h of the subgroup;

[0147] 1.1.3 Finite Fields

[0148] In the ECC algorithm, we select points that are congruent to modulo p (p is a prime number) to perform "addition". Thus, we get a discrete finite field.

[0149] 1.1.4 The base point G of a subgroup and the order n of a subgroup

[0150] The base point G of the subgroup is actually any point in the elliptic curve group, which is selected as the base point. Then, it is accumulated (which can be converted into scalar multiplication).

[0151] nG=G+G+...+G

[0152] In a finite field, this addition loop forms, meaning that at some point nG = 0, we obtain a subgroup of n points around the base point G. At this point, n is the order of the subgroup. The order of a subgroup is the number of elements in the subgroup, equivalent to nG = 0, where n is a positive integer and the smallest of these is the order of the subgroup.

[0153] 1.1.5 Cofactor h of subgroups

[0154] In actual use, the subgroup needs to be larger, that is, the value of n is larger, calculate the order N of the elliptic curve group, and then select a larger prime factor n of N as the order of the subgroup. It is called the cofactor of the subgroup. Randomly select a point P in the elliptic curve, and NP = 0, n(hP) = 0.

[0155] 1.1.6 Asymmetric Encryption, Decryption, and Signature Algorithm ECDSA (secp256k1)

[0156] ①. Generate a key pair

[0157] 1) Determine the order n and base point G of the subgroup.

[0158] 2) Select a random number d∈[1,n) as the private key and calculate the public key Q=d·G.

[0159] ②. Encryption

[0160] 1) Prepare the plaintext data M to be encrypted and the random number r.

[0161] 2) Calculate the ciphertext corresponding to M: C1 = M + r·Q, C2 = r·G.

[0162] ③. Decryption

[0163] Use the following formula to calculate the plaintext M corresponding to the ciphertext (C1, C2): C1-d·C2=M+r·Qr(d·G)=M+r·Qr·Q=M

[0164] ④.Signature

[0165] 1) Use a hash algorithm on the message m to obtain its corresponding hash value z = Hash(m).

[0166] 2) Generate a random number k∈[1,n) and calculate the point P(x,y)=k·G.

[0167] 3) Take r = x mod n, where x is the horizontal coordinate of point P. If r = 0, reselect the random number k.

[0168] 4) Calculate s = k -1(z+rd)mod n, d is the private key, if s=0, reselect the random number k.

[0169] 5) The above (r, s) is the ECDSA signature of message m.

[0170] ⑤. Verify the signature

[0171] The public key Q = d·G is known. The public key Q, base point G, order n and hash value z are known. d is the private key, which is unknown and cannot be reversed.

[0172] 1) Calculate u1 = s -1 z mod n.

[0173] 2) Calculate u2 = s -1 r mod n.

[0174] 3) Calculation point P = u1G + u2Q = u1G + u2d G = (u1 + u2d)G = s -1 (z+rd)mod n·G=kG, and we get the coordinates of point P (x p ,y p ).

[0175] 4) If r = x p mod n, the signature is valid.

[0176] 1.2 Public Key Certificate

[0177] A public key certificate, also known as a public key certificate, digital certificate, digital authentication certificate, identity certificate, electronic certificate, or security certificate, is an electronic document used in public key infrastructure to prove the identity of the public key owner. It typically contains information such as a version number, serial number, certification authority identifier, subject identifier, subject public key, certificate validity period, certificate purpose, and the issuing authority's signature. The issuing authority (CA), the issuer of a public key certificate, uses digital signature technology to verify the certificate's authenticity and integrity. The subject's public key is used for encrypted communications using the asymmetric encryption technology described in 1.1. When other entities need to communicate securely with the certificate's subject, they encrypt the information using the subject's public key. This allows only the certificate subject, who possesses the corresponding private key, to decrypt and read the message. The subject's public key is also used for key exchange. Two communicating parties can use each other's public keys to generate a shared key for subsequent symmetric encryption.

[0178] 1.3 Symmetric Encryption

[0179] Symmetric encryption (also called private key encryption) refers to a cryptographic algorithm that uses the same key for encryption and decryption. The AES cryptographic algorithm operates based on mathematical operations in finite fields and mainly involves the following steps: byte substitution, row shift, column obfuscation, and round key addition.

[0180] These steps are repeated over multiple rounds. AES has three different key lengths: 128 bits, 192 bits, and 256 bits. Each key length specifies a corresponding number of rounds: 10, 12, and 14. The decryption process is the reverse of the encryption process, but uses the same key and algorithm.

[0181] AES has five modes: block encryption mode, cipher block chaining mode, cipher feedback mode, output feedback mode, and counter mode. The present invention adopts the AES block encryption mode.

[0182] Implementation of the Invention

[0183] See also Figure 1 、 Figure 2 and Figure 3 , an adaptive frequency hopping RKE secure communication method, the specific steps are as follows:

[0184] Step 1: Initialization of the adaptive frequency hopping RKE security system, including: (1) initialization of the vehicle server; (2) deployment of the certificate verification system on the vehicle machine; (3) setting up the connection whitelist on the vehicle radio end and deploying the adaptive frequency hopping algorithm; (4) saving the key certificate, key, and vehicle key pseudo ID; the specific method is:

[0185] 1.1 Vehicle Server Initialization

[0186] 1.1.1ECDSA Signature Method

[0187] a. Determine three key parameters: elliptic curve E p (a, b), base point G and the order of the base point n;

[0188] b. Select a random number d∈[1,n) as the private key and calculate the public key Q=d·G;

[0189] c. Apply a hash algorithm to the message m (signature content) to obtain its corresponding hash value z = hash(m);

[0190] d. Generate a random number k∈[1,n) and calculate the point P(x,y)=k·G;

[0191] e. Take r = x mod n, where x is the horizontal coordinate of point P. If r = 0, reselect the random number k;

[0192] f. Calculate s = k -1(z+rd) mod n, d is the private key, if s=0, reselect the random number k;

[0193] g. The above (r, s) is the ECDSA signature of message m.

[0194] 1.1.2 ECDSA Signature Verification Method

[0195] The public key Q (Q = d·G), the base point G, the order n, and the hash value z are known, and d is the private key;

[0196] h. Calculate u1=s -1 z mod n;

[0197] i. Calculate u2=s -1 r mod n;

[0198] j. Calculation point P = u1G + u2Q = u1G + u2d·G = (u1 + u2d)G = s -1 (z+rd)mod n·G=kG, and we get the coordinates of point P (x p ,y p );

[0199] k. If r = x p mod n, then the signature is valid;

[0200] 1.1.3 The vehicle server pseudo-random number generator (PRNG) generates the random numbers rand_init and rand_ca. The random number rand_init is called the initial symmetric key and is used for the symmetric encryption / decryption key for the initial communication between the vehicle radio terminal and the car key. The random number rand_ca is used to generate the key pseudo-ID (PIDfob). The PIDfob is obtained by XORing the read vehicle VIN code and the initial symmetric key rand_ca:

[0201]

[0202] The key pseudo ID (PIDfob) is used for: ① Binding the certificate generated by the vehicle server to the key pseudo ID (PIDfob) during the adaptive frequency hopping RKE security system initialization phase in step 1, proving that the certificate can only be used by the key pseudo ID (PIDfob); ② During the communication connection establishment phase in step 2, the vehicle key fills the broadcast data segment for broadcast transmission; the vehicle radio terminal is used to establish a whitelist and establish a connection within the whitelist; ③ During the key authentication phase in step 3, the vehicle verifies the identity of the vehicle key and whether the vehicle key corresponds to the certificate;

[0203] 1.1.4 The vehicle server uses the ECDSA signature in step 1.1.1 of step 1 to generate the vehicle key's public key (fob.pk), private key (fob.sk), and certificate (fob.crt). Message M in step 1.1.1 of step 1 (c) is the PIDfob, public key (fob.pk), and certificate-related information, i.e., the certificate signature.

[0204] 1.2 Vehicle-mounted deployment certificate verification system

[0205] The vehicle server sends the vehicle key's pseudo ID (PIDfob), certificate (fob.crt), encryption key (rand_init), and public key (fob.pk) to the vehicle certificate verification system. The certificate verification system registers and stores information related to the vehicle key certificate (fob.crt) and the initial symmetric key rand_init. The vehicle certificate verification system includes a certificate serial number file, a certificate file, a revocation system file, and a symmetric key file. The certificate serial number is used to serialize the generated new certificate to facilitate checking the certificate status. The certificate file is used to store all generated files. The revocation system file is used to store revoked certificates. The symmetric key file stores the initial symmetric key rand_init generated by the vehicle server.

[0206] 1.3 Set up a connection whitelist and deploy an adaptive frequency hopping algorithm

[0207] 1.3.1 Set up a connection whitelist:

[0208] The vehicle's RF terminal stores the initial symmetric key rand_init generated in 1.1.3, the pseudo ID (PIDfob) of the vehicle key generated in 1.1.4, and the MAC address of the vehicle's RF key. A whitelist is set so that a connection is established only when the pseudo ID (PIDfob) of the vehicle key is broadcast under this MAC address.

[0209] 1.3.2 Deployment of Adaptive Frequency Hopping Algorithm:

[0210] The adaptive frequency hopping algorithm consists of two modules: data collection module and channel map generation module;

[0211] (1) The ultimate goal of the data collection module is to collect the quality information packet delivery success rate PDR_rate of each channel; the data collection module uses the matrix Latest_PDR_array[m][n] to save the latest m data packet transmission status on each channel i;

[0212]

[0213] The adaptive frequency hopping solution implemented by the present invention is implemented on BLE5.0.

[0214] In the Bluetooth adaptive frequency hopping system, the columns of latest_PDR_array[m]

[37] correspond to the 0th to 36th Bluetooth channels, and the first to mth rows represent the 1st to mth data packets recorded. The initial value of the matrix is ​​all 0. When the first data packet is successfully transmitted on channel 1 (Channel 1), the first row and second column (Channel 1 column) of the matrix are assigned a value of "1". When the second data packet fails to be successfully transmitted on channel l (Channel 1), the second row and second column (Channel 1 column) of the matrix are assigned a value of "-1", and the records are recorded in sequence. When the last row is recorded, it returns to the first row and overwrites the data in the first row to achieve the purpose of data update. After collecting data, the number of "1" on each channel is counted, that is, the number of data packets successfully transmitted on the channel n_ok. The number of "-1" on each channel is counted, that is, the number of data packets failed to be transmitted on the channel n_fail. Finally, the success rate of each data packet transmission on each channel i, PDR_rate[i], is counted.

[0215]

[0216] (2) The channel map generation module lists the channels whose PDR_rate[i] is less than the threshold (PDR_threshold) into the blacklist (Blacklist(Channel i)). The channel map is obtained by removing the channels from the blacklist, and the adaptive frequency hopping communication deployment is completed;

[0217] 1.4 Storage of key certificates, keys, and vehicle key pseudo ID (PIDfob)

[0218] The key end saves the initial symmetric key rand_init, the vehicle key pseudo ID (PIDfob) generated by the vehicle server in step 1.1.3, the key certificate fob.crt generated by step 1.1.4, and the key private key to the key key storage area for secure storage.

[0219] Step 2: Establish a communication connection. After the system initialization is completed in step 1, both parties establish a communication connection. The specific method is as follows:

[0220] 2.1 The key initiates a broadcast: The key end fills the car key pseudo ID (PIDfob) saved in the general storage area in step 1.4 into the broadcast data byte and initiates the broadcast;

[0221] 2.2 Vehicle RF end scanning broadcast: The vehicle RF end starts scanning in the non-connected state, scans the whitelist MAC address set in step 1.3, parses its broadcast content, and establishes a connection if it is the same as the saved car key pseudo ID (PIDfob), otherwise the connection is rejected.

[0222] Step 3: Adaptive frequency hopping channel selection: After the initialization in step 1 is completed and the communication connection is established between the two parties in step 2, the adaptive frequency hopping algorithm deployed in step 1 (3) is used to select the adaptive frequency hopping channel, and the two parties perform adaptive frequency hopping communication; the specific method is as follows:

[0223] Step 3 is completed based on the deployment of the adaptive frequency hopping system in Section 1.3.2 of Step 1:

[0224] 3.1 Use the data collection module in step 1.3.2 to collect the packet delivery success rate PDR_rate[i] on each channel;

[0225] 3.2 Pass the packet delivery success rate PDR_rate[i] on each channel to step 1.3.2 to generate the channel map;

[0226] 3.3 Send the Channel map to the key end to complete adaptive frequency hopping.

[0227] Step 4: The vehicle authenticates the key: After the system initialization is completed in step 1, the communication connection is established in step 2, and the adaptive frequency hopping channel is selected in step 3, authentication is performed through the authentication protocol; the specific method is as follows:

[0228] Step 4 is to authenticate the car key identity after steps 2 and 3 are completed. The execution order of step 4 is as follows:

[0229] 4.1 The vehicle's radio frequency terminal generates a random number rand1, which is used to prevent message replay. The random number rand1 is encrypted using the AES algorithm with the encryption key rand_init, resulting in the encrypted authentication data packet auth_data1.

[0230] auth_data1=Enc_AES[rand_init, rand1]

[0231] The vehicle's radio frequency end sends a certificate request cert_request and an authentication data packet auth_data1 to the key;

[0232] 4.2 The key receives the certificate request cert_request and uses the AES algorithm to decrypt the ciphertext auth_data1 with the key rand_init to obtain the random number rand1′.

[0233] rand1′=Dec_AES[rand_init, auth_data1]

[0234] The key certificate is public and does not need to be encrypted. The vehicle key end sends the key certificate fob.crt and the random number rand1′ to the vehicle radio frequency end.

[0235] 4.3 The vehicle's radio frequency terminal receives the key certificate fob.crt and random number rand1′;

[0236] (1) The vehicle RF terminal determines whether the random number rand1′ obtained from the received data packet is equal to the random number rand1 generated in step 4.1. If they are not equal, the vehicle sends a data packet authentication failure flag "verify_fail" and the failure reason "reason = error rand1";

[0237] (2) If the random number rand1′ obtained by parsing the data packet is equal to the random number rand1 generated in step 4.1, fob.crt is forwarded to the vehicle computer to execute step 4.4;

[0238] 4.4 The vehicle certificate verification system uses the ECDSA signature verification principle in step 1.1.2 to authenticate the key certificate:

[0239] (1) The vehicle certificate verification system successfully authenticates the key certificate and informs the vehicle radio frequency end of the authentication success; the vehicle radio frequency end generates a random number rand2; the vehicle radio frequency end uses the AES algorithm to encrypt the random number rand2, and the encryption key is the initial symmetric key rand_init, and obtains the encrypted authentication data packet auth_data2. The vehicle radio frequency end sends the authentication data packet auth_data2 and the certificate authentication success flag "verify_ok".

[0240] auth_data2=Enc_AES[rand_init, rand2]

[0241] (2) If the vehicle system authentication fails, the vehicle radio terminal informs the reason for the failure and sends "verify_failed" and the failure reason "reason = crt error!".

[0242] 4.5 The key receives the data packet.

[0243] (1) If the key receives the authentication failure flag "veriify_fail", it will enter sleep mode and wait until the next wake-up;

[0244] (2) If the key receives the authentication success flag "verify_ok", the authentication is successful.

[0245] Step 5: Encrypted transmission of control instructions: After the authentication in step 4 is passed, the control instructions of the car key are encrypted and transmitted. The vehicle RF end executes the transmission instructions after successfully decrypting the transmission instructions.

[0246] The specific method is:

[0247] 5.1 If the authentication in step 4.5 (2) is successful, the data packet received by the key end is the authentication data packet auth_data2 in step 4.4 (1). The key end uses the AES algorithm to decrypt the authentication data packet auth_data2 to obtain rand2′.

[0248] rand2′=Dec_AES[rand_init, auth_data2]

[0249] The control command control and the random number rand2′ are encrypted using the AES algorithm, with the encryption key being rand_init, to obtain the encrypted control command control_data. The key end then sends the encrypted control command data packet control_data to the vehicle radio frequency end.

[0250] control_data=Enc_AES[rand_init, rand2′||control]

[0251] 5.2 The vehicle's radio frequency terminal receives the encrypted control command data packet control_data and decrypts control_data using the AES algorithm to obtain the random number rand2′ and the control command. The decryption key is the initial symmetric key rand_init. A check is performed to determine whether the random number rand2′ is equal to the random number rand2 generated in step 4.4 (1).

[0252] rand2′||control=Dec_AES[rand_init, control_data]

[0253] (1) If the random number rand2′ is equal to the random number rand2 generated in step 4.4 (1), the control instruction is executed, and the random number rand2 is used to update the initial symmetric key rand_init as the symmetric key to be used for the next communication;

[0254] (2) If the random number rand2′ is not equal to the random number rand2 generated in step 4.4 (1), the control command is not executed and the connection is disconnected.

[0255] Step 6: Adaptive frequency hopping RKE security system update: Both communicating parties jointly implement step 3 and update the system at the same time; (2) the server sends the newly generated file to the vehicle computer, and the vehicle computer certificate verification system is updated; (3) the vehicle computer sends the newly generated file to the vehicle radio frequency end, and the vehicle radio frequency end updates the whitelist; (4) the radio frequency end sends the newly generated file to the key end, and the key end updates the key storage area; the specific method is:

[0256] 6.1 The vehicle server generates new initial symmetric keys rand_init2 and rand_ca2 according to Step 1, Step 1.1.3 and Step 1.1.4; a new vehicle key pseudo ID (PIDfob2), a new public key (fob2.pk), a new private key (fob2.sk), and a new certificate (fob2.crt);

[0257] 6.2 The vehicle server sends the new initial symmetric key rand_init2 generated in step 6.1; the new vehicle key pseudo ID (PIDfob2), the new public key (fob2.pk), the new private key (fob2.sk), and the new certificate (fob2.crt) to the vehicle certificate authentication system;

[0258] 6.3 The vehicle system receives the data sent in step 6.2 and updates the certificate verification system;

[0259] 6.4 The vehicle system sends the new vehicle key pseudo ID (PIDfob2), new public key (fob2.pk), new initial symmetric key rand_init2, new private key (fob2.sk) and new certificate (fob2.crt) updated in step 6.3 to the vehicle radio terminal;

[0260] 6.5 The vehicle radio frequency end updates the whitelist: Use the new vehicle key pseudo ID (PIDfob2) and the vehicle key pseudo ID (PIDfob). Update the initial symmetric key: Update rand_init with the new initial symmetric key rand_init2. The vehicle radio frequency end uses the AES algorithm to encrypt the key private key fob2.sk, the new vehicle key pseudo ID (PIDfob2), and the new initial symmetric key rand_init2 to obtain the encrypted update data packet update_data:

[0261] update_data=Enc_AES[rand_init,PIDfob2||rand_init2||fob2.sk]

[0262] 6.6 The vehicle radio frequency end sends the encrypted update data packet update_data and the new certificate fob2.crt when connected to the key.

[0263] 6.7 The vehicle radio receives update_data and the new certificate fob2.crt. The car key uses the AES algorithm to decrypt update_data. The decryption key is the initial symmetric key rand_init, and the PID fob2, rand_init2, and fob2.sk are obtained.

[0264] PIDfob2||rand_init2||fob2.sk=Dec_AES[rand_init, update_data]

[0265] 6.8 The key client uses the new key certificate fob2.crt and the decrypted new vehicle key pseudo ID (PIDfob2), initial symmetric key rand_init2, and private key fob2.sk from step 6.6 to update the fob.crt, PIDfob, rand_init2, and fob2.sk securely stored in the key storage area in step 1.4. This means that PIDfob2 is used to update PIDfob, rand_init2 is used to update rand_init, fob2.sk is used to update fob.sk, and fob2.crt is used to update fob.crt. This completes the certificate, key, private key, and PID update in step 5.

[0266] The RKE secure communication device with adaptive frequency hopping based on the above method includes:

[0267] Memory for storing computer programs, certificates, and keys;

[0268] The processor is configured to implement the adaptive frequency hopping RKE secure communication described in Step 1 to Step 6 when executing the computer program.

[0269] A computer-readable storage medium is used to store a computer program. When executed by a processor, the computer program can perform adaptive frequency hopping communication and identity authentication on the RKE secure communication method based on the adaptive frequency hopping described in Steps 1 to 6.

[0270] Experimental verification effect

[0271] Experimental environment:

[0272] Vehicle server: Processor: Intel(R) Core(TM) i7-10700CPU@2.90GHz 2.90GHz, RAM: 16.0GB, operating system: Ubuntu 22.04 virtual machine environment, software / library environment: OpenSSL 3.2.1;

[0273] Car system: Processor: Intel(R) Core(TM) i7-10700CPU@2.90GHz 2.90GHz, RAM: 16.0GB, operating system: Ubuntu 22.04 virtual machine environment, software / library environment: OpenSSL 3.2.1;

[0274] Vehicle RF: Nordic nRF52840 Bluetooth chip, ARM Cortex-M4 processor, 1024kB flash, 256kB memory, Zephyr OS operating system, SDK version ncs v2.5.0, toolchain version ncsv2.5.0, programming language C;

[0275] Key side: Nordic nrf52840 Bluetooth chip, processor: ARM Cortex-M4, 1024kB flash, 256kB memory, operating system: Zephyr OS, SDK version: ncs v2.5.0, toolchain version: ncsv2.5.0, programming language: C.

[0276] The experimental results are as follows:

[0277] Figure 5 The figure shows how the packet delivery rate (PDR) changes over time under the adaptive frequency hopping scheme and the non-adaptive frequency hopping scheme when the Bluetooth low energy physical layer PHY=2M and the interference signal strength is -19dBm. Figure 5 As can be seen, without adaptive frequency hopping, the PDR fluctuates between 81.46% and 83.88% between 0 and 40 seconds. After applying our adaptive frequency hopping solution, the PDR increases to 92.4% at 5 seconds and continues to rise, reaching a peak of 99.33% at 50 seconds. Figure 5 It shows that our adaptive frequency hopping scheme significantly improves the packet delivery rate (PDR), and reaches 99.33% when it is finally stabilized, which improves the anti-interference performance of the system.

[0278] Table 1 shows the number of key bits required for symmetric encryption, Diffie-Hellman, RSA, and ECC under different security requirements with similar key lengths. As can be seen from Table 1, under the same security strength, the key length required for symmetric encryption is the shortest. Figure 6 The time required for key negotiation is shown for key lengths with similar security performance, where the ECC key lengths are 128, 192, 256, 320, and 384 bits, and the RSA key lengths are 1024, 1536, 2048, 2560, and 3072 bits. Figure 6 It can be seen that the authentication scheme using ECC certificate authentication + symmetric encryption proposed in the present invention has obvious advantages in terms of time and key storage space.

[0279] Table 1 Comparison of key sizes (computational effort required for cryptanalysis)

[0280]

Claims

1. An adaptive frequency hopping RKE secure communication method, characterized in that the specific steps include: Step 1: Initialization of the adaptive frequency hopping RKE security system, including: (1) initialization of the vehicle server; (2) deployment of the certificate verification system on the vehicle machine; (3) setting up the connection whitelist on the vehicle radio end and deploying the adaptive frequency hopping algorithm; (4) saving the key certificate, key, and vehicle key pseudo ID; 1.1 Vehicle Server Initialization 1.1.1ECDSA Signature a. Determine three key parameters: elliptic curve E p (a, b), base point G and the order of the base point n; b. Select a random number d∈[1,n) as the private key and calculate the public key Q=d·G; c. Apply a hash algorithm to the message M (signed content) to obtain its corresponding hash value z = Hash(M); d. Generate a random number k∈[1,n) and calculate the point P(x,y)=k·G; e. Take r = x mod n, where x is the horizontal coordinate of point P. If r = 0, reselect the random number k; f. Calculate s = k -1 (z+rd) mod n, d is the private key, if s=0, reselect the random number k; g. The obtained (r, s) is the ECDSA signature of the message M; 1.1.2ECDSA Signature Verification The public key Q = d·G, the base point G, the order n, and the hash value z are known, and d is the private key; h. Calculate u1=s -1 z mod n; i. Calculate u2=s -1 r mod n; j. Calculation point P = u1G + u2Q = u1G + u2d·G = (u1 + u2d)G = s -1 (z+rd)mod n·G=kG, and we get the coordinates of point P (x p ,y p ); k. If r = x p mod n, then the signature is valid; 1.1.3 The vehicle server pseudo-random number generator (PRNG) generates the random numbers rand_init and rand_ca. The random number rand_init is called the initial symmetric key and is used for the symmetric encryption / decryption key for the initial communication between the vehicle radio terminal and the car key. The random number rand_ca is used to generate the key pseudo-ID (PIDfob). The PIDfob is obtained by XORing the read vehicle VIN code and the initial symmetric key rand_ca: The key pseudo ID (PIDfob) is used for: ① Binding the certificate generated by the vehicle server to the key pseudo ID (PIDfob) during the adaptive frequency hopping RKE security system initialization phase in step 1, proving that the certificate can only be used by the key pseudo ID (PIDfob); ② During the communication connection establishment phase in step 2, the vehicle key fills the broadcast data segment for broadcast transmission; the vehicle radio terminal is used to establish a whitelist and establish a connection within the whitelist; ③ During the key authentication phase in step 3, the vehicle verifies the identity of the vehicle key and whether the vehicle key corresponds to the certificate; 1.1.4 The vehicle server uses the ECDSA signature in step 1.1.1 of step 1 to generate the vehicle key's public key (fob.pk), private key (fob.sk), and certificate (fob.crt). Message M in step 1.1.1 of step 1 (c) is the PIDfob, public key (fob.pk), and certificate-related information, i.e., the certificate signature. 1.2 Vehicle-mounted deployment certificate verification system The vehicle server sends the vehicle key's pseudo ID (PIDfob), certificate (fob.crt), encryption key (rand_init), and public key (fob.pk) to the vehicle certificate verification system; the certificate verification system registers and stores information related to the vehicle key certificate (fob.crt) and the initial symmetric key rand_init; the vehicle certificate verification system includes a certificate serial number file, a certificate file, a revocation system file, and a symmetric key file; the certificate serial number is used to serialize the generated new certificate to facilitate checking the certificate status; the certificate file is used to store all generated files; the revocation system file is used to store revoked certificates; and the symmetric key file stores the initial symmetric key rand_init generated by the vehicle server. 1.3 Set up a connection whitelist on the vehicle radio terminal and deploy an adaptive frequency hopping algorithm 1.3.1 Set up a connection whitelist: The vehicle's RF terminal saves the initial symmetric key rand_init generated in step 1.1.3, the pseudo ID (PIDfob) of the vehicle key generated in step 1.1.4, and the MAC address of the vehicle's RF key. A whitelist is set up so that a connection is established only when the pseudo ID (PIDfob) of the vehicle key is broadcast under the MAC address of the vehicle's RF key. 1.3.2 Deployment of Adaptive Frequency Hopping Algorithm: The adaptive frequency hopping algorithm consists of two modules: data collection module and channel map generation module; (1) The ultimate goal of the data collection module is to collect the quality information packet delivery success rate PDR_rate of each channel; The data collection module uses the matrix Latest_PDR_array[m][n] to save the latest m data packet transmission status on each channel i; The column "n" of latest_PDR_array[m][n] corresponds to channels 0 to (n-1), and the first to mth rows represent the first to mth packets recorded. The matrix is ​​initialized with all 0s. When the first packet is successfully transmitted on channel 1, the first row and second column of the matrix are assigned a value of "1." When the second packet fails to be transmitted on channel 1, the second row and second column of the matrix are assigned a value of "-1," and so on. When the last row is recorded, the matrix goes back to the first row and overwrites the data in the first row to achieve the purpose of data update. After collecting the data, the number of "1"s on each channel is counted, that is, the number of packets successfully transmitted on the channel, n_ok. The number of "-1"s on each channel is counted, that is, the number of packets failed to be transmitted on the channel, n_fail. Finally, the transmission success rate PDR_rate[i] of each packet on each channel i is calculated. (2) The channel map generation module is to blacklist (Blacklist(Channeli)) the channels whose PDR_rate[i] is less than the threshold (PDR_threshold), and the used_channel is the remaining channel. The used_channel is remapped to obtain the channel map generation module, and the adaptive frequency hopping communication deployment is completed; 1.4 Storage of key certificates, keys, and vehicle key pseudo ID (PIDfob) The key end saves the initial symmetric key rand_init, the vehicle key pseudo ID (PIDfob) generated by the vehicle server in step 1.1.3, the key certificate fob.crt generated by step 1.1.4, and the key private key to the key key storage area for secure storage; Step 2: Establish a communication connection; after the system initialization is completed in step 1, the vehicle and the key establish a communication connection; Step 3: Adaptive frequency hopping channel selection: After the two parties establish a communication connection in step 2, the adaptive frequency hopping algorithm deployed in item (3) of step 1 is used to select an adaptive frequency hopping channel, and the two parties perform adaptive frequency hopping communication; Step 4: The vehicle authenticates the key: After the adaptive frequency hopping channel is selected in step 3, the vehicle key is authenticated through the authentication protocol; Step 5: Encrypted transmission of control instructions: After the authentication in step 4 is passed, the control instructions of the car key are encrypted and transmitted. After the vehicle radio frequency end successfully decrypts the transmitted instructions, the transmission instructions are executed; Step 6: Adaptive frequency hopping RKE security system update: The two communicating parties jointly implement step 3 and perform system updates at the same time, in the following order: (1) the vehicle server updates and generates a new file; (2) the server sends the newly generated file to the vehicle computer, and the vehicle computer certificate verification system updates and generates a new file; (3) the vehicle computer sends the newly generated file to the vehicle radio frequency end, and the vehicle radio frequency end updates the whitelist; (4) the radio frequency end sends the newly generated file to the key end, and the key end updates the key storage area.

2. The RKE secure communication method with adaptive frequency hopping according to claim 1, characterized in that: The specific method of establishing the communication connection in step 2 is: 2.1 The key end initiates a broadcast: The key end fills the car key pseudo ID (PIDfob) saved in the general storage area in step 1.4 into the broadcast data byte and initiates the broadcast; 2.2 Vehicle RF end scanning broadcast: The vehicle RF end starts scanning in a non-connected state, scans the whitelist MAC address set in step 1.3, parses the whitelist MAC address broadcast content, and compares the parsed result with the saved car key pseudo ID (PIDfob) to see if they are the same. If they are the same, a connection is established; otherwise, the connection is rejected.

3. The RKE secure communication method with adaptive frequency hopping according to claim 1, characterized in that: The specific method of step 3 is: Step 3 is completed based on the deployment of the adaptive frequency hopping system in step 1.3.2: 3.1 Use the data collection module in step 1.3.2 to collect the packet delivery success rate PDR_rate[i] on each channel; 3.2 Pass the packet delivery success rate PDR_rate[i] on each channel to the Channel map generation module in step 1.3.2 to generate a Channel map; 3.3 Send the Channel map to the key end to complete adaptive frequency hopping.

4. The RKE secure communication method with adaptive frequency hopping according to claim 1, characterized in that: Step 4 is to authenticate the identity of the car key after steps 2 and 3 are completed. The order of executing step 4 is as follows: 4.1 The vehicle's radio frequency terminal generates a random number, rand1, to prevent message replay. It encrypts the random number rand1 using the AES algorithm, with the encryption key being rand_init, to obtain the encrypted authentication data packet, auth_data1. auth_data1=Enc_AES[rand_init,rand1] The vehicle's radio frequency end sends a certificate request cert_request and an authentication data packet auth_data1 to the key; 4.2 The key receives the certificate request cert_request and uses the AES algorithm to decrypt the ciphertext auth_data1 with the key rand_init to obtain the random number rand1'; rand1′=Dec_AES[rand_init,auth_data1] The key certificate is public and does not need to be encrypted. The car key sends the key certificate fob.crt and random number rand1' to the vehicle radio frequency end; 4.3 The vehicle's radio frequency terminal receives the key certificate fob.crt and random number rand1'; (1) The vehicle RF terminal determines whether the random number rand1' obtained from the received data packet is equal to the random number rand1 generated in step 4.

1. If they are not equal, the vehicle sends the data packet authentication failure flag "verify_fail" and the failure reason "reason = errorrand1"; (2) If the random number rand1' obtained by parsing the data packet is equal to the random number rand1 generated in step 4.1, fob.crt is forwarded to the vehicle computer to execute step 4.4; 4.4 The vehicle certificate verification system uses the ECDSA signature verification principle in step 1.1.2 to authenticate the key certificate: (1) The vehicle certificate verification system successfully authenticates the key certificate and notifies the vehicle radio frequency end of the successful authentication; the vehicle radio frequency end generates a random number rand2; the vehicle radio frequency end uses the AES algorithm to encrypt the random number rand2, and the encryption key is the initial symmetric key rand_init, to obtain the encrypted authentication data packet auth_data2, and the vehicle radio frequency end sends the authentication data packet auth_data2 and the certificate authentication success flag "verify_ok"; auth_data2=Enc_AES[rand_init,rand2] (2) If the vehicle system authentication fails, the vehicle radio terminal informs the reason for the failure and sends "verify_failed" and the failure reason "reason = crt error!"; 4.5 The key receives the data packet; (1) If the key receives the authentication failure flag "verify_fail", it will enter sleep mode and wait until the next wake-up; (2) If the key receives the authentication success mark "verify_ok", the authentication is successful.

5. The RKE secure communication method with adaptive frequency hopping according to claim 1, characterized in that: The specific method of step 5 is: 5.1 If the authentication in step 4.5 (2) is successful, the data packet received by the key end is the authentication data packet auth_data2 in step 4.4 (1). The key end uses the AES algorithm to decrypt the authentication data packet auth_data2 to obtain rand2'; rand2′=dec_AES[rand_init,auth_data2] Use the AES algorithm to encrypt the control command control and the random number rand2′, with the encryption key being rand_init, to obtain the encrypted control command control_data. The key end then sends the encrypted control command data packet control_data to the vehicle radio frequency end. control_data=Enc_AES[rand_init,rand2′||control] 5.2 The vehicle radio terminal receives the encrypted control command data packet control_data and decrypts control_data using the AES algorithm to obtain the random number rand2' and the control command. The decryption key is the initial symmetric key rand_init. The vehicle radio terminal determines whether the random number rand2' is equal to the random number rand2 generated in step 4.4 (1). rand2′||control=Dec_AES[rand_init,control_data] (1) If the random number rand2′ is equal to the random number rand2 generated in step 4.4 (1), the control instruction is executed, and the random number rand2 is used to update the initial symmetric key rand_init as the symmetric key for the next communication; (2) If the random number rand2′ is not equal to the random number rand2 generated in step 4.4 (1), the control command is not executed and the connection is disconnected.

6. The RKE secure communication method with adaptive frequency hopping according to claim 1, characterized in that: The specific method of step 6 is: 6.1 The vehicle server generates new initial symmetric keys rand_init2 and rand_ca2 according to Step 1, Step 1.1.3 and Step 1.1.4; a new vehicle key pseudo ID (PIDfob2), a new public key (fob2.pk), a new private key (fob2.sk), and a new certificate (fob2.crt); 6.2 The vehicle server sends the new initial symmetric key rand_init2 generated in step 6.1; the new vehicle key pseudo ID (PIDfob2), the new public key (fob2.pk), the new private key (fob2.sk), and the new certificate (fob2.crt) to the vehicle certificate authentication system; 6.3 The vehicle system receives the data sent in step 6.2 and updates the certificate verification system; 6.4 The vehicle system sends the new vehicle key pseudo ID (PIDfob2), new public key (fob2.pk), new initial symmetric key rand_init2, new private key (fob2.sk) and new certificate (fob2.crt) updated in step 6.3 to the vehicle radio terminal; 6.5 The vehicle radio frequency end updates the whitelist: uses the new car key pseudo ID (PIDfob2) and the car key pseudo ID (PIDfob); updates the initial symmetric key: uses the new initial symmetric key rand_init2 to update rand_init; the vehicle radio frequency end uses the AES algorithm to encrypt the key private key fob2.sk, the new car key pseudo ID (PIDfob2) and the new initial symmetric key rand_init2 to obtain the encrypted update data packet update_data: update_data=Enc_AES[rand_init,PIDfob2||rand_init2||fob2.sk] 6.6 The vehicle RF terminal sends the encrypted update data packet update_data and the new certificate fob2.crt when connected to the key; 6.7 The vehicle's radio receives update_data and the new certificate fob2.crt. The car key uses the AES algorithm to decrypt update_data, using the initial symmetric key rand_init as the decryption key, to obtain PIDfob2, rand_init2, and fob2.sk. PIDfob2||rand_init2||fob2.sk=Dec_AES[rand_init,update_data] 6.8 The key end uses the new key certificate fob2.crt and the decrypted new vehicle key pseudo ID (PIDfob2), initial symmetric key rand_init2, and private key fob2.sk obtained in step 6.6 to update the fob.crt, PIDfob, rand_init2, and fob2.sk securely stored in the key storage area in step 1.4; that is, PIDfob2 is used to update PIDfob, rand_init2 is updated to rand_init, fob2.sk is updated to fob.sk, and fob2.crt is updated to fob.crt. Then, the certificate, key, private key, and PID update in step 5 are completed.

7. A system based on the RKE secure communication method of adaptive frequency hopping according to any one of claims 1 to 6, characterized in that: include: An RKE safety system initialization module, configured to initialize the vehicle server in sequence in step 1; Deploy a certificate verification system for vehicle computers; Set up a connection whitelist for the vehicle's radio frequency end and deploy an adaptive frequency hopping algorithm; save the key certificate, key, and vehicle key pseudo ID to facilitate the subsequent implementation of the adaptive frequency hopping solution; The communication connection module initiates a broadcast through the key end in step 2. The vehicle radio end starts scanning in a non-connected state, scans the whitelist MAC address in step 1, parses the whitelist MAC address, and determines whether to establish a communication connection between the vehicle and the key based on whether the parsed result is consistent with the saved vehicle key pseudo ID (PIDfob); An adaptive frequency hopping channel selection module is used in step 3 to adaptively select a frequency hopping channel using an adaptive frequency hopping algorithm based on the completion of system initialization in step 1 and the establishment of a communication connection in step 2; An identity authentication module, used in step 4 to authenticate the vehicle key through an authentication protocol after selecting the adaptive frequency hopping channel in step 3; The control instruction encryption transmission module is used in step 5 to encrypt and transmit the control instruction of the car key after the car key identity authentication is passed in step 4. The vehicle radio frequency end executes the transmission instruction after successfully decrypting the transmission instruction; The security update module is used in step 6 to update the vehicle server; the server sends the newly generated file to the vehicle computer, and the vehicle computer certificate verification system is updated; the vehicle computer sends the newly generated file to the vehicle radio frequency end, and the vehicle radio frequency end updates the whitelist; the radio frequency end sends the newly generated file to the key end, and the key end updates the key storage area.

8. A device based on the RKE secure communication method of adaptive frequency hopping according to any one of claims 1 to 6, characterized in that: include: memory for storing computer programs; A processor is configured to implement the adaptive frequency hopping RKE secure communication method described in steps 1 to 6 when executing the computer program.

9. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement the adaptive frequency hopping RKE safety communication method according to any one of claims 1 to 6, and perform vehicle adaptive frequency hopping RKE safety communication.

Citation Information

Patent Citations

  • Anti-theft remote keyless entry system using frequency hopping with amplitude level control

    CN105324280A

  • Remote control circuit based on automobile RKE double frequency transmitting and independent RFA

    CN108880596A