An encryption method for automobile remote control key based on AES algorithm

By using the AES algorithm to perform multiple encryptions on the serial number and manufacturer code of the car remote key, a third 128-bit encrypted message is generated, which solves the problem of insufficient encryption security in existing technologies and achieves higher security and flexibility.

CN116744292BActive Publication Date: 2026-05-15JIANGSU JINZHI NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU JINZHI NEW ENERGY VEHICLE CO LTD
Filing Date
2023-07-19
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing car remote key encryption security is insufficient and vulnerable to attack and decryption, especially due to the limited serial numbers of the hopping code encoder and the public nature of the algorithm, which reduces security.

Method used

The serial number and manufacturer code are encrypted multiple times using the AES algorithm to generate a 128-bit third encrypted information. The key is flexibly generated by combining the ciphertext stream and the key stream to prevent statistical analysis attacks.

Benefits of technology

It improves the encryption security of car remote keys, prevents attacks and decryption, ensures the uniqueness and flexibility of encrypted information, and meets the needs of long-term use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116744292B_ABST
    Figure CN116744292B_ABST
Patent Text Reader

Abstract

The application discloses an automobile remote control key encryption method based on an AES algorithm, and relates to the technical field of intelligent automobiles, and comprises the following steps: obtaining manufacturer information, wherein the manufacturer information is a manufacturer authentication certificate and a manufacturer code set by a manufacturer; generating a serial number, wherein the serial number is divided into multiple plaintext blocks, and a first encrypted information is preliminarily encrypted by combining the multiple plaintext blocks with the manufacturer information; the first encrypted information is 108 bits; the first encrypted information is subjected to a bit complement encryption to generate second encrypted information, the serial number is combined with the manufacturer code to form the first encrypted information, the first encrypted information is complemented to 128 bits, the same manufacturer can encrypt different ciphertexts, and the third encrypted information is generated by combining a ciphertext stream and a key stream, so that the generation and combination of the third encrypted information can also not be according to fixed bits, the combination mode is more flexible, and statistical analysis attacks are effectively prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent vehicle technology, and in particular to an encryption method for car remote control keys based on the AES algorithm. Background Technology

[0002] Most car remote keys on the market currently use KEELOQ encryption hopping code technology. The remote controls used to implement this technology typically employ dedicated hopping code encoders such as HCS300 and HCS301. These encoders have been used for many years, and their working principle and key generation algorithm are publicly available. The encoded words sent by these dedicated encoders consist of two parts: plaintext and hopping code. The serial number in the plaintext part is a crucial component in key generation. Most importantly, the encoder's serial number is only 28 bits. With the increasing number of vehicles each year, the remaining space for the encoder's serial number is very limited, leading to a decrease in security and making it easily vulnerable to attack and decryption. Summary of the Invention

[0003] This application provides a car remote key encryption method based on the AES algorithm, including obtaining manufacturer information, wherein the manufacturer information is the manufacturer's certification certificate and the manufacturer's set manufacturer code;

[0004] A serial number is generated, which is divided into multiple plaintext blocks. The multiple plaintext blocks are combined with the manufacturer information to initially encrypt the first encrypted information.

[0005] The first encrypted information is 108 bits;

[0006] The first encrypted information is padded and encrypted to generate the second encrypted information;

[0007] The second encrypted information is 128 bits;

[0008] The second encrypted information is divided into multiple blocks using the AES algorithm to generate the third encrypted information. Based on the block size and length of the second encrypted information, the ciphertext stream of the second encrypted information block is predicted. Based on the key stream of the second encrypted information block, the ciphertext and key of the third encrypted information are predicted.

[0009] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0010] This invention combines a serial number with a manufacturer's code to form the first encrypted information. The first encrypted information is then padded to 128 bits, allowing the same manufacturer to encrypt different ciphertexts. The third encrypted information is generated by combining the ciphertext stream and the key stream, so the generation and combination of the third encrypted information can also be flexible and varied, effectively preventing statistical analysis attacks. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of the encryption process of the present invention;

[0012] Figure 2 This is a schematic diagram illustrating how the present invention is used. Detailed Implementation

[0013] To facilitate understanding of the present invention, a more complete description of this application will be given below with reference to the accompanying drawings, which illustrate preferred embodiments of the invention. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to enable a more thorough and complete understanding of the disclosure of the present invention.

[0014] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0015] The following disclosure provides many different implementations or examples for carrying out different structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or reference letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.

[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0017] The following is an embodiment of the present invention. Please refer to [link / reference]. Figure 1 A schematic diagram of the encryption process of this invention;

[0018] In a first aspect, to address the problem of reduced security in traditional car remote key encryption, this invention proposes a car remote key encryption method based on the AES algorithm, comprising:

[0019] Obtain manufacturer information, which includes the manufacturer's certification certificate and the manufacturer's assigned code;

[0020] A serial number is generated, which is divided into multiple plaintext blocks. The multiple plaintext blocks are combined with manufacturer information to initially encrypt the first encrypted information.

[0021] The first encrypted information is 108 bits; the manufacturer information can restrict the generation of the first encrypted information, thereby making the serial numbers generated by different manufacturers unique and difficult to identify.

[0022] The first encrypted information is padded with additional encryption to generate the second encrypted information, and the first encrypted information and the second encrypted information are digitally signed respectively.

[0023] The second encrypted information is 128 bits;

[0024] The aforementioned padding encryption refers to supplementing the first encrypted information to 128 bits. This involves first dividing the first encrypted information into several small segments, then assigning an incrementing operator to each segment. This operator is XORed with the original first encrypted information to output the second encrypted information. The first encrypted information is then encrypted repeatedly until the second encrypted information reaches a set fixed length.

[0025] The second encrypted information is encrypted using the AES algorithm to generate the third encrypted information, and the key and ciphertext are output.

[0026] It should be noted that the CFB mode in the AES algorithm can convert ciphertext into stream ciphertext. In this encryption mode, since the data encrypted by the block cipher in the encryption and decryption processes is the ciphertext of the previous block, the cipher generates a key stream, and then performs a logical XOR operation between the key stream and the plaintext stream to obtain the ciphertext stream. At this time, the length of the plaintext is not the size of the data block. Therefore, this invention combines the serial number with the manufacturer's code to form the first encrypted information, and then pads the first encrypted information to 128 bits, so that the same manufacturer can encrypt different ciphertexts. The third encrypted information is generated by combining the ciphertext stream and the key stream, so that the generation and combination of the third encrypted information can also be non-fixed in terms of the number of bits, making the combination method more flexible and versatile, and effectively preventing statistical analysis attacks.

[0027] In another embodiment of the present invention, when the sequence number length is less than 128 bits, the sequence number can be divided into blocks and encrypted in a round-robin fashion. The intermediate value of each block is analyzed to generate a key corresponding to each block. Finally, the entire data block is integrated to obtain the output key. The key of each block is a key calculated based on the intermediate value in a round-robin fashion.

[0028] It should be noted that during each round of encryption operations, the size of each block changes according to the number of changes and the manufacturer's code. The size and length of the blocks are not limited, which makes each encryption change highly random. At the same time, a fixed identification code is assigned, and the uniqueness of the identification code is maintained each time.

[0029] Simultaneously, during the process of generating the third encrypted information, the first block of the second encrypted information is obtained, the first block of the second encrypted information is initialized, and the initial block is obtained, where the initial block refers to the data block of the initialization vector.

[0030] Based on the block size and length of the second encrypted information, predict the ciphertext stream of the second encrypted information block;

[0031] Specifically, the ciphertext stream of the second encrypted information is obtained by performing an XOR operation on each block of the second encrypted information in the initial block, and the plaintext of each block is XORed with the ciphertext of the previous block.

[0032] On the other hand, when the block length of the second encrypted information exceeds 8 bits, the highest 8 bits of the plaintext are XORed with the ciphertext of the previous segment to obtain the ciphertext. At the same time, the remaining plaintext of the current segment is XORed with the ciphertext generated by the highest 8 bits of the plaintext.

[0033] In another embodiment of the present invention, the ciphertext and key of the third encrypted information are predicted based on the key stream of the second encrypted information block; the initial value of the key of the second encrypted information block is obtained by analysis based on the key of the second encrypted information block, wherein the initial value refers to the value of the key when it is first encrypted in each block; energy analysis is performed on the initial value to obtain multiple subkeys, wherein each subkey is based on the change of the initial value of the key in the second encrypted information; and the key of the third encrypted information is calculated based on the multiple subkeys.

[0034] In another embodiment of the present invention, encryption is completed by combining multiple subkeys with the ciphertext stream of the second encryption information to generate the ciphertext and key of the third encryption information.

[0035] In another embodiment of the present invention, a general-purpose controller chip (MCU) is used as the hopping code encoder chip. The hopping code encoding function is implemented through flexible software programming. The flexible key generation function and the timing of the transmission of the encoded words can be specified by the manufacturer, and the serial number can be increased to 108 bits, approximately 3 x 10^6 bits. 32 Serial number.

[0036] Understandably, during the key generation process, the 108-bit serial number is converted into a 128-bit serial number using a manufacturer-customized function, and then the 128-bit serial number is used to generate the key and ciphertext through an encryption algorithm.

[0037] It should be noted that in the AES algorithm, the length is 128 bits, 192 bits, and 256 bits;

[0038] In another embodiment of the present invention, the normal working mode of key generation is to combine the 4-bit key value, the 108-bit serial number, and the 16-bit counter value into a 128-bit plaintext code, and use the key to generate a 128-bit ciphertext code using the AES encryption algorithm.

[0039] The ciphertext and key are further decrypted, and the first and second encrypted information are digitally signed and authenticated in order to unlock the car;

[0040] When sending encrypted data, the data header is sent at a 2ms interval and the encrypted data is sent at a 7ms interval.

[0041] In another embodiment of the present invention, the present invention is provided with a learning mode, which can learn and encode the 108-bit sequence number according to a specific mode, and synchronize with the base station information after the learning is completed;

[0042] Provide clock information, manufacturer data, and configure the device with a serial number and manufacturer code. After configuration, the MCU outputs the serial number, manufacturer code, and key for external programmers to verify whether the configuration was successful.

[0043] The device reads the serial number and manufacturer code stored internally in the MCU. It then encrypts and generates an encoded word using the AES algorithm, sends the encoded word, and waits for transmission to complete.

[0044] The encoded words are converted into specified radio frequency signals (such as 315M or 433M) by the radio frequency transmitting unit to achieve wireless transmission;

[0045] This invention addresses the problem of excessive reliance on dedicated code-skipping editor chips in existing technologies. Because the code-skipping chip generation algorithm is publicly available and uses a 28-bit serial number, it is vulnerable to attacks. This invention generates a 128-bit serial number by supplementing the existing code-skipping chip, ensuring that the serial number meets the requirements for long-term use. At the same time, the unique multi-encryption method enhances security performance, thus ensuring the safe use of remote control keys in daily life.

[0046] like Figure 2 As shown, the embodiments of the present invention are as follows:

[0047] A device based on this invention is provided. After powering on, the device detects a configuration signal. When configuration parameters are required, the device enters configuration mode, reads the serial number, manufacturer code, and key according to the communication protocol, and then stores the serial number, manufacturer code, and key in the memory. After storage, the serial number, manufacturer code, and key are output to determine whether the configuration parameters were configured successfully.

[0048] Once the device is powered on and configured, buttons S0 and S1 are pressed simultaneously to read the serial number and manufacturer code from the memory and enter the learning mode.

[0049] When the device is powered on, if only one button is pressed, it enters normal working mode, reads the button value, reads the serial number and key in the memory, generates encrypted ciphertext and key through AES encryption, sends the ciphertext and key and waits for the transmission to complete;

[0050] The device contains a controller MCU, which integrates an AES hardware encryption / decryption module. It is primarily used to implement the algorithm and logic control for storing configuration parameters in specific embodiments.

[0051] The H2 programming socket is used for parameter configuration. The external parameter configurator supplies power to the device through the VCC (power supply) on the H2. Pin 3 of the H2 provides the clock, and pin 4 of the H2 provides the data. The device is configured with a serial number and manufacturer code. After configuration, the MCU outputs the serial number, manufacturer code, and key for the external programmer to verify whether the configuration is successful.

[0052] Other pins in the device can be used in the existing ways, so they will not be elaborated on in this article.

[0053] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for encrypting car remote control keys based on the AES algorithm, characterized in that, include: Obtain manufacturer information, which includes the manufacturer's certification certificate and the manufacturer's assigned code; A serial number is generated, which is divided into multiple plaintext blocks. The multiple plaintext blocks are combined with the manufacturer information to initially encrypt the first encrypted information. The first encrypted information is 108 bits; The first encrypted information is padded and encrypted to generate the second encrypted information; The second encrypted information is 128 bits; The second encrypted information is divided into multiple blocks using the AES algorithm to generate the third encrypted information. Based on the block size and length of the second encrypted information, the ciphertext stream of each block is predicted. Based on the key stream of each block, the ciphertext and key of the third encrypted information are predicted. The key of the second encrypted information block is analyzed to obtain the initial value of the key of the second encrypted information block. The initial value refers to the value of the key when it is first encrypted in each block. Energy analysis is performed on the initial value to obtain multiple subkeys, wherein each subkey is obtained based on the change of the initial value of the key in the second encrypted information. The key for the third encrypted information is derived from multiple subkeys; Obtain the first block of the second encrypted information, initialize the first block of the second encrypted information, and obtain the initial block; By performing an XOR operation on each block of the second encrypted information using the initial block, the ciphertext stream of the second encrypted information block is obtained; The encryption process is completed by combining multiple subkeys with the ciphertext stream of the second encrypted information block to generate the ciphertext and key of the third encrypted information.

2. The car remote key encryption method based on AES algorithm as described in claim 1, characterized in that, The aforementioned padding encryption refers to supplementing the first encrypted information to 128 bits. First, the first encrypted information is divided into several small segments. Then, each small segment has an auto-incrementing operator. This operator is XORed with the original first encrypted information to output the second encrypted information. The first encrypted information is encrypted cyclically until the second encrypted information reaches the set fixed length.

3. The method for encrypting a car remote control key based on the AES algorithm as described in claim 1, characterized in that, When the sequence number is less than 128 bits long, the sequence number is divided into blocks and encrypted in rotation. The intermediate value of each block is analyzed to generate a key corresponding to each block. Finally, the intermediate values ​​of the entire data block are integrated to obtain the output key. The key of each block is a key calculated based on the intermediate value in rotation.

4. The car remote key encryption method based on AES algorithm as described in claim 3, characterized in that, The size of each serial number block varies depending on the number of changes and the manufacturer's code. The size and length of the block are unlimited, and a fixed identification code is assigned to it, ensuring the uniqueness of the identification code each time.

5. The method for encrypting a car remote control key based on the AES algorithm as described in claim 1, characterized in that, The initial block refers to the data block of the initialization vector.

6. The method for encrypting a car remote control key based on the AES algorithm as described in claim 1, characterized in that, When the length of the second encrypted information block exceeds 8 bits, the highest 8 bits of the plaintext of the second encrypted information block are XORed with the ciphertext of the previous block to obtain the ciphertext. At the same time, the remaining plaintext of the current block is XORed with the ciphertext generated by the highest 8 bits of the plaintext.

7. The method for encrypting a car remote control key based on the AES algorithm as described in claim 1, characterized in that, The method is executed by a car remote key encryption device based on the AES algorithm. After the device is powered on, it detects the configuration signal. When the device needs to configure parameters, it enters the configuration mode, reads the serial number, manufacturer code and key according to the communication protocol, and then stores the serial number, manufacturer code and key in the memory. After the device is powered on and configured, buttons S0 and S1 are pressed simultaneously to read the serial number and manufacturer code from the memory and enter the learning mode. After the device is powered on, if only one button is pressed, it enters normal working mode, reads the button value, reads the serial number and key in the memory, generates encrypted ciphertext and key through AES encryption, sends the ciphertext and key and waits for the transmission to complete; The device is equipped with a controller MCU, which integrates an AES hardware encryption / decryption module. The H2 programming socket is used for parameter configuration. The external parameter configurator supplies power to the device through the VCC power supply on the H2 program. Pin 3 of the H2 provides the clock, and pin 4 of the H2 provides the data. The serial number and manufacturer code are configured for the device. After configuration, the MCU outputs the serial number, manufacturer code and key for the external programmer to verify whether the configuration is successful.

8. The method for encrypting a car remote control key based on the AES algorithm as described in claim 1, characterized in that, The key includes a normal working mode and a learning mode. The normal working mode is to combine a 4-bit key value, a 108-bit serial number, and a 16-bit counter value into a 128-bit plaintext code, and then use the key to generate 128-bit ciphertext through the AES encryption algorithm. The learning mode involves learning and encoding a 108-bit sequence number according to a specific pattern, and then synchronizing the information with the base station after the learning is completed.

9. The method for encrypting a car remote control key based on the AES algorithm as described in claim 1, characterized in that, When the ciphertext of the third encrypted information is sent, the data header is sent at an interval of 2ms, and the ciphertext is sent at an interval of 7ms.