Encryption method of vehicle digital key rolling code
By introducing a three-time handshake matching mechanism in the automotive digital key rolling code system, using timestamps and key IDs for information matching, the problem of blocking theft between the key transmitter and the receiver in the prior art is solved, and the high security use of the rolling code is achieved and the cost is reduced.
Patent Information
- Application Number
- CN202510241125.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-05-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When facing attackers with technical and means, existing rolling code technology cannot effectively prevent blocking theft between the key transmitter and the receiver, resulting in a degradation of the security performance of the rolling code and the attacker's theft.
Through the three-way handshake matching between the key transmitter and the vehicle receiver, information matching is performed using the timestamp and the key ID content to ensure that the key and the vehicle's transmitter and receiver can be mutually authenticated, thereby avoiding the harm of theft.
It effectively eliminates the method of blocking theft to get scrolling codes, improves the security of the use of scrolling codes, and reduces the cost of designing new encryption programs, improves security and reduces the cost of use.
Smart Images

Figure CN120032445A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an encryption method for a rolling code of a vehicle digital key. Background Art
[0002] The rolling code, also known as the jumping code, is a commonly used security technology in remote keyless entry systems. It is widely used in keyless entry and starting of vehicles. It is also used in vehicle locking systems, garage door opening systems and other wireless remote control systems. It is already a very mature security technology.
[0003] Therefore, the main purpose of the rolling code is to prevent unauthorized access to the system. The main core technology is to enable an attacker to intercept and copy any code exchanged between the sender and the receiver. Every time we press the button, the device using the rolling code function will generate a new code. Both the sending and receiving devices will allow each code to be checked for validity. After receiving a valid code, the receiving device will only respond again with the next valid code.
[0004] However, with the development of technology today, attackers can use interference equipment to shield the receiving device of the car, making it impossible for the receiving device to receive the rolling code after it is sent. At this time, the command code sent by the transmitter is intercepted, and the code is used again without the user's knowledge, thus invading the vehicle. At this time, the security performance of the rolling code cannot be guaranteed, and the intercepted code can also be used maliciously.
[0005] This is a coordination problem between the key transmitter and the receiver. Algorithm changes alone cannot defend against attackers with technical skills and means. Therefore, an encryption method is needed to ensure the timeliness and security of the rolling code to prevent theft. If the code is redesigned, it will not only increase the cost of the equipment, but also fail to prevent attackers from stealing it. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide an encryption method for a rolling code of a vehicle digital key, change the traditional form of receiving and sending, use a special method and adjust the information content of the code, so that the key and the vehicle's transmitter and receiver can authenticate each other, thereby avoiding the harm of theft.
[0007] In order to solve the above technical problems, the technical solution of the present invention is: A method for encrypting a rolling code of a digital key for a vehicle, wherein the transmitter of the key and the receiver of the vehicle form information matching, and a three-way handshake matching is formed between the transmitter and the receiver based on the timestamp and the content of the key ID. After the matching is successful, the system entry is completed and the command is executed; if the matching fails, the system entry is refused, the transmitter enters the dormant state, and the receiver discards the previously received information; The specific operation mode of the three-way handshake matching is as follows: First, the first handshake matching is performed, and the key transmitter actively sends a handshake matching data packet, which contains the handshake instruction, step byte, key ID and timestamp; Secondly, after receiving the handshake data packet, the receiver decrypts and compares it. The comparison elements are the handshake instruction, key ID and timestamp. It not only needs to confirm the legitimacy of the key ID, but also needs to determine whether the time difference between the timestamp and its own time is reasonable. After the comparison is qualified, the receiver sends the second handshake matching data packet to the key transmitter. The data packet content includes the handshake instruction, step byte, receiver ID, verification result and timestamp. Finally, the key transmitter receives the second handshake matching data packet sent by the receiver, decrypts the data packet and compares it. The content is the same as the previous step. At the same time, it sends it for the second time according to the verification result. If the comparison result is qualified, it sends the third handshake matching data packet to the receiver. The data packet content includes handshake instructions, step bytes, key ID, verification results and timestamp; At this time, after the receiver receives the last handshake matching data packet, it compares and confirms that it has exchanged ID content with the key's transmitter, and the two are matched with each other to achieve one-to-one interactive communication; the receiver excludes keys with other ID contents to avoid interference, and at the same time completes the matching with the key's transmitter, and can receive instructions and execute them.
[0008] Furthermore, the specific operation process of the vehicle's receiver after receiving the data packet is as follows: In the first step, the receiver decrypts the received data packet and passes the CRC check after decryption. If the check passes, the decryption is completed; The second step is to match the decrypted data content to determine whether the key ID content is a matching ID and confirm that the ID is legal; The third step is to determine whether the key information is valid, that is, whether the data of the handshake command is valid. If it is valid, proceed to the next step, otherwise it will be discarded; The fourth step is to determine whether the frequencies are consistent. If they are consistent, proceed to the next step. If they are inconsistent, discard them. Step 5: Determine whether the timestamp is within the error range. If it is, proceed to the next step; otherwise, discard it. Step 6: After the above judgments are completed and all are qualified, the rolling code information is stored and one-to-one communication with the key transmitter is achieved.
[0009] Furthermore, the specific operation flow of the key transmitter after receiving the data packet is as follows: In the first step, the transmitter decrypts the received data packet and passes the CRC check after decryption. If the check passes, the decryption is completed; The second step is to match the decrypted data content to determine whether the receiver ID content is a matching ID and confirm that the ID is legal; The third step is to determine whether the key information is valid, that is, whether the data of the handshake command is valid. If it is valid, proceed to the next step, otherwise it will be discarded; The fourth step is to determine whether the frequencies are consistent. If they are consistent, proceed to the next step. If they are inconsistent, discard them. Step 5: Determine whether the timestamp is within the error range. If it is, proceed to the next step; otherwise, discard it. Step 6. After completing the above judgments and passing them, the rolling code information is stored and one-to-one communication with the receiver is achieved.
[0010] Furthermore, within a cycle after the three-way handshake matching is completed, one-to-one communication is achieved between the key transmitter and the vehicle receiver, and the receiver will exclude pairing or command data sent by other ID addresses to prevent interference.
[0011] Furthermore, the data sent by the transmitter and the receiver are encrypted using AES.
[0012] Furthermore, the key ID and the receiver ID are both unique information of the hardware devices, and after matching each other, they cannot be changed within a cycle.
[0013] Furthermore, the frequency of the transmitter is 315Mhz and the frequency of the receiver is 433Mhz.
[0014] Furthermore, the handshake instruction is made of rolling codes. By pressing the key, the rolling code is added to the key information each time the key is pressed, and the rolling code value is gradually increased as the number of key presses continues.
[0015] Furthermore, the CRC check adopts the CRC-16 check method.
[0016] Compared with the prior art, the present invention provides an encryption method for a rolling code of a vehicle digital key, which performs a three-way handshake match between the key transmitter and the vehicle receiver, thereby eliminating the method of obtaining the rolling code by shielding theft because the two need to perform multiple matches such as time matching and device ID matching, thereby improving the security of the use of the rolling code without adding new codes or designing new encryption programs, thereby improving security and reducing usage costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Attached Figure 1 A schematic diagram of three-way handshake matching of the present invention is shown.
[0018] Attached Figure 2 Shown is a key usage flow chart of the present invention.
[0019] Attached Figure 3A flow chart showing the process after the receiver of the present invention receives information.
[0020] Attached Figure 4 A flow chart showing the process after the transmitter of the present invention receives information.
[0021] Attached Figure 5 A flow chart of information transmission according to the present invention is shown. DETAILED DESCRIPTION
[0022] In one embodiment, Figure 1 and 2 As shown, an encryption method for a rolling code of a digital key for a vehicle is formed by information matching between the transmitter of the key and the receiver of the vehicle. Based on the timestamp and the content of the key ID, a three-way handshake match is formed between the transmitter and the receiver. After a successful match, the system is entered and the command is executed; if the match fails, the system is refused to be entered, the transmitter enters a dormant state, and the receiver discards the previously received information; The specific operation mode of the three-way handshake matching is as follows: First, the first handshake matching is performed, and the key transmitter actively sends a handshake matching data packet, which contains the handshake instruction, step byte, key ID and timestamp; Secondly, after receiving the handshake data packet, the receiver decrypts and compares it. The comparison elements are the handshake instruction, key ID and timestamp. It not only needs to confirm the legitimacy of the key ID, but also needs to determine whether the time difference between the timestamp and its own time is reasonable. After the comparison is qualified, the receiver sends the second handshake matching data packet to the key transmitter. The data packet content includes the handshake instruction, step byte, receiver ID, verification result and timestamp. Finally, the key transmitter receives the second handshake matching data packet sent by the receiver, decrypts the data packet and compares it. The content is the same as the previous step. At the same time, it sends it for the second time according to the verification result. If the comparison result is qualified, it sends the third handshake matching data packet to the receiver. The data packet content includes handshake instructions, step bytes, key ID, verification results and timestamp; At this time, after receiving the last handshake matching data packet, the receiver compares and confirms that it has exchanged ID content with the key transmitter, and the two have matched each other to achieve one-to-one interactive communication; the receiver excludes keys with other ID content to avoid interference, and at the same time, the receiver has matched with the key transmitter and can receive instructions and execute them. Data transmission is performed within one cycle.
[0023] Based on the matching of the first and second handshakes, the transmitter can determine whether it can send or receive information normally and obtain the ID information of the receiver; According to the second and third handshake matches, the receiver can determine whether it can send or receive information normally, and obtain the ID information of the transmitter; After that, the two are matched one-to-one, and devices with other IDs will not be able to communicate normally.
[0024] In one embodiment, Figure 3 As shown, the specific operation process of the vehicle's receiver after receiving the data packet is as follows: In the first step, the receiver decrypts the received data packet and passes the CRC check after decryption. If the check passes, the decryption is completed; The second step is to match the decrypted data content to determine whether the key ID content is a matching ID and confirm that the ID is legal; The third step is to determine whether the key information is valid, that is, whether the data of the handshake command is valid. If it is valid, proceed to the next step, otherwise it will be discarded; The fourth step is to determine whether the frequencies are consistent. If they are consistent, proceed to the next step. If they are inconsistent, discard them. Step 5: Determine whether the timestamp is within the error range. If it is, proceed to the next step; otherwise, discard it. Step 6: After the above judgments are completed and all are qualified, the rolling code information is stored and one-to-one communication with the key transmitter is achieved.
[0025] In one embodiment, Figure 4 As shown, the specific operation process of the key transmitter after receiving the data packet is as follows: In the first step, the transmitter decrypts the received data packet and passes the CRC check after decryption. If the check passes, the decryption is completed; The second step is to match the decrypted data content to determine whether the receiver ID content is a matching ID and confirm that the ID is legal; The third step is to determine whether the key information is valid, that is, whether the data of the handshake command is valid. If it is valid, proceed to the next step, otherwise it will be discarded; The fourth step is to determine whether the frequencies are consistent. If they are consistent, proceed to the next step. If they are inconsistent, discard them. Step 5: Determine whether the timestamp is within the error range. If it is, proceed to the next step; otherwise, discard it. Step 6. After completing the above judgments and passing them, the rolling code information is stored and one-to-one communication with the receiver is achieved.
[0026] In one embodiment, within one cycle after the three-way handshake matching is completed, one-to-one communication is achieved between the key transmitter and the vehicle receiver, and the receiver will exclude pairing or command data sent by other ID addresses to prevent interference; the data sent by the transmitter and the receiver are encrypted using AES; the key ID and the receiver ID are both unique information of the hardware device, and after matching each other, they cannot be changed within one cycle; the frequency of the transmitter is 315Mhz, and the frequency of the receiver is 433Mhz; the handshake instruction is made of rolling code, and by pressing the key, each time a key is pressed, a rolling code is added to the key information, and as the number of key presses continues, the rolling code assignment gradually increases; the CRC check adopts the CRC-16 check method.
[0027] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than a limiting technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. A method for encrypting a rolling code of a digital key for a vehicle, characterized in that: The key transmitter and the vehicle receiver form an information match. Based on the timestamp and key ID content, a three-way handshake match is formed between the transmitter and the receiver. After a successful match, the system is entered and the command is executed. If the match fails, the system is refused to enter, the transmitter enters the sleep state, and the receiver discards the previously received information. The specific operation mode of the three-way handshake matching is as follows: First, the first handshake matching is performed, and the key transmitter actively sends a handshake matching data packet, which contains the handshake instruction, step byte, key ID and timestamp; Secondly, after receiving the handshake data packet, the receiver decrypts and compares it. The comparison elements are the handshake instruction, key ID and timestamp. It not only needs to confirm the legitimacy of the key ID, but also needs to determine whether the time difference between the timestamp and its own time is reasonable. After the comparison is qualified, the receiver sends the second handshake matching data packet to the key transmitter. The data packet content includes the handshake instruction, step byte, receiver ID, verification result and timestamp. Finally, the key transmitter receives the second handshake matching data packet sent by the receiver, decrypts the data packet and compares it. The content is the same as the previous step. At the same time, it sends it for the second time according to the verification result. If the comparison result is qualified, it sends the third handshake matching data packet to the receiver. The data packet content includes handshake instructions, step bytes, key ID, verification results and timestamp; At this time, after the receiver receives the last handshake matching data packet, it compares and confirms that it has exchanged ID content with the key's transmitter, and the two are matched with each other to achieve one-to-one interactive communication; the receiver excludes keys with other ID contents to avoid interference, and at the same time completes the matching with the key's transmitter, and can receive instructions and execute them.
2. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: in, The specific operation process of the vehicle's receiver after receiving the data packet is as follows: In the first step, the receiver decrypts the received data packet and passes the CRC check after decryption. If the check passes, the decryption is completed; The second step is to match the decrypted data content to determine whether the key ID content is a matching ID and confirm that the ID is legal; The third step is to determine whether the key information is valid, that is, whether the data of the handshake command is valid. If it is valid, proceed to the next step, otherwise it will be discarded; The fourth step is to determine whether the frequencies are consistent. If they are consistent, proceed to the next step. If they are inconsistent, discard them. Step 5: Determine whether the timestamp is within the error range. If it is, proceed to the next step; otherwise, discard it. Step 6: After the above judgments are completed and all are qualified, the rolling code information is stored and one-to-one communication with the key transmitter is achieved.
3. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: in, The specific operation process of the key transmitter after receiving the data packet is as follows: In the first step, the transmitter decrypts the received data packet and passes the CRC check after decryption. If the check passes, the decryption is completed; The second step is to match the decrypted data content to determine whether the receiver ID content is a matching ID and confirm that the ID is legal; The third step is to determine whether the key information is valid, that is, whether the data of the handshake command is valid. If it is valid, proceed to the next step, otherwise it will be discarded; The fourth step is to determine whether the frequencies are consistent. If they are consistent, proceed to the next step. If they are inconsistent, discard them. Step 5: Determine whether the timestamp is within the error range. If it is, proceed to the next step; otherwise, discard it. Step 6. After completing the above judgments and passing them, the rolling code information is stored and one-to-one communication with the receiver is achieved.
4. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: Within one cycle after the three-way handshake matching is completed, one-to-one communication is achieved between the key transmitter and the vehicle receiver, and the receiver will exclude pairing or command data sent by other ID addresses to prevent interference.
5. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: Data sent by the transmitter and receiver are encrypted using AES.
6. Furthermore, the key ID and the receiver ID are both unique information of the hardware device. After matching each other, they cannot be changed within a cycle.
7. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: The transmitter frequency is 315Mhz and the receiver frequency is 433Mhz.
8. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: The handshake command is made of rolling codes. By pressing the key, a rolling code is added to the key information every time a key is pressed, and the rolling code value gradually increases as the number of key presses continues.
9. The method for encrypting a rolling code of a vehicle digital key according to claim 1, characterized in that: The CRC check adopts the CRC-16 check method.
Citation Information
Patent Citations
Safe vehicle control method and device, vehicle system and storage medium
CN114684070A
Dual authentication matching method, device, system and equipment for remote control key
CN115102726A
Motorcycle and pairing method of electronic key thereof
CN118097828A
Vehicle key matching method and device and computer readable storage medium
CN118762421A
Intelligent key matching method and related equipment
CN119485321A