A method, apparatus, and device for encrypted management of CAN data.

By writing a custom key in the T-Box device and generating ciphertext using the AES encryption algorithm and hash verification, combined with time constraints, the problem of CAN data leakage is solved, enabling secure copying and management of data and improving data security and reliability.

CN117951717BActive Publication Date: 2026-11-17XIAMEN LENZ COMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311771816.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2026-11-17
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

Existing technologies cannot effectively prevent data leaks caused by commercial competition between different car manufacturers and the easy copying of CAN data by criminals, leading to vehicle data leaks and the use of data for unknown purposes.

Method used

By writing a custom key in the T-Box device and generating ciphertext using the AES encryption algorithm and hash verification, combined with a time-limited decryption file, the data can be used within its validity period, thus achieving secure copying and management of the data.

Benefits of technology

It improves data security and reliability, ensures data is used within its validity period, avoids data leakage, and achieves traceability of legal data acquisition and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117951717B_ABST
    Figure CN117951717B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and device for encrypted management of CAN data, comprising: establishing a connection with a T-Box device, writing a custom key according to a preset method, and writing the custom key into the T-Box device for encryption; writing plaintext according to preset rules, and generating ciphertext from the custom key and the plaintext using the AES encryption algorithm; creating a GL file based on the ciphertext and the custom key to obtain a decrypted file; loading the decrypted file into a copy USB flash drive, and connecting the copy USB flash drive to the T-Box device for decryption; after confirming successful decryption, copying the vehicle CAN data from the T-Box device to the copy USB flash drive, and sending the corresponding data copy record to a platform for management. This improves data security and reliability, ensures traceability of the processing process, and facilitates management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CAN data communication technology, and in particular to a method, apparatus, and device for encrypted management of CAN data. Background Technology

[0002] Currently, the CAN data collected by the T-Box is stored on a removable storage medium (such as a high-capacity TF card, SD card, or USB flash drive). To view the saved data, simply remove the storage medium and access it on a computer. While the T-Box is sold to different car manufacturers, the data acquisition method remains the same, although each manufacturer has different confidentiality requirements for its CAN data collection. However, the existing method has problems: it cannot prevent different car manufacturers from illegally using the same data acquisition method for commercial competition, thus leaking vehicle data to other manufacturers; it cannot prevent criminals from easily copying the CAN data, leading to vehicle data leaks and unauthorized use of the data. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, apparatus, and device for encrypted management of CAN data, in order to solve the above-mentioned problems.

[0004] To achieve the above objectives, the present invention provides an encrypted management method for CAN data, the method comprising:

[0005] After establishing a connection with the T-Box device, a custom key is written according to a preset method and then written into the T-Box device for encryption.

[0006] Plaintext is written according to preset rules, and ciphertext is generated from the custom key and the plaintext according to the AES encryption algorithm;

[0007] Based on the ciphertext and the custom key, a GL file is created to obtain the decrypted file;

[0008] The decryption file is loaded into a copy USB drive, and the decryption operation is performed by connecting the copy USB drive to the T-Box device.

[0009] After confirming successful decryption, the vehicle CAN data in the T-Box device is copied to the copy USB flash drive, and the corresponding data copy record is sent to the platform for management.

[0010] Preferably, the step of writing a custom key according to a preset method includes:

[0011] The custom key is written according to the preset method, which includes uppercase and lowercase letters, numbers, and special symbols, to obtain a 15-character custom key. The special symbols include @, #, $, %, ^, &, and *.

[0012] Preferably, the step of writing plaintext according to preset rules includes:

[0013] The plaintext is written according to the preset rules including the pre-part and the post-part, resulting in 15 characters. The pre-part includes 7 uppercase and lowercase letters, and the post-part includes 8 numbers of a preset date and time, which is set to a time between the current time and one month from the current time.

[0014] Preferably, the step of creating a GL file based on the ciphertext and the custom key to obtain a decrypted file includes:

[0015] The HMAC is obtained by calculating the ciphertext and the custom key using the SHA-256 hash function;

[0016] The encrypted text is used as the text content, and the HMAC is used as the filename to create a GL file, thus obtaining the decrypted file.

[0017] Preferably, the decryption operation performed by connecting the copied USB flash drive to the T-Box device includes:

[0018] The decrypted file is hashed using the custom key in the T-Box device, and the resulting HMAC is compared with the filename of the decrypted file.

[0019] If the HMAC obtained by the calculation is consistent with the filename of the decryption file, then the ciphertext in the decryption file is decrypted using the custom key using AES.

[0020] When AES decryption is successful, the preset date and time in the plaintext after AES decryption is obtained, and it is determined whether the current time is less than or equal to the preset date and time. If so, the decryption operation is considered successful.

[0021] Preferably, the method further includes:

[0022] A decryption command is sent to the T-Box device to clear the corresponding custom key.

[0023] To achieve the above objectives, the present invention also provides an encryption management device for CAN data, the device comprising:

[0024] The encryption unit is used to create a custom key according to a preset method after establishing a connection with the T-Box device, and then write the custom key into the T-Box device for encryption.

[0025] The generation unit is used to write plaintext according to preset rules and generate ciphertext from the custom key and the plaintext according to the AES encryption algorithm.

[0026] A creation unit is used to create a GL file based on the ciphertext and the custom key to obtain a decrypted file;

[0027] The decryption unit is used to load the decryption file into a copy USB flash drive, and then connect the copy USB flash drive to the T-Box device to perform the decryption operation.

[0028] The copy unit is used to copy the vehicle CAN data in the T-Box device to the copy USB flash drive after confirming that the decryption operation is successful, and send the corresponding data copy record to the platform for management.

[0029] Preferably, the device further includes:

[0030] The clearing unit is used to send a decryption command to the T-Box device to clear the corresponding custom key.

[0031] To achieve the above objectives, the present invention also proposes a CAN data encryption management device, including a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of a CAN data encryption management method as described in the above embodiments.

[0032] To achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of a CAN data encryption management method as described in the above embodiments.

[0033] Beneficial effects:

[0034] The above scheme, by writing custom keys according to preset methods and plaintext according to preset rules, can maximize key security. In addition, AES encryption and decryption and hash verification are added to the process of acquiring CAN data collected by T-Box devices to ensure data security and reliability. By managing data copy records through the platform, it is easy to know the encryption status of T-Box devices and the CAN data acquisition status, ensuring the traceability and ease of management of the processing process.

[0035] The above solution, when performing decryption operations on a T-Box device, determines whether the current time is less than or equal to the preset date and time in the plaintext obtained after AES decryption. This time limit for decryption is based on the validity period, ensuring that the decrypted file is only valid within the validity period, thus greatly improving security. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart illustrating a method for encrypted management of CAN data according to an embodiment of the present invention.

[0038] Figure 2 This is a schematic diagram of the overall encryption process provided in an embodiment of the present invention.

[0039] Figure 3 This is a schematic diagram of CAN data copying provided in an embodiment of the present invention.

[0040] Figure 4 This is a schematic diagram of a CAN data encryption management device provided in an embodiment of the present invention.

[0041] The realization of the invention's objective, its functional characteristics, and advantages will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] The present invention will be described in detail below with reference to the embodiments.

[0044] Reference Figure 1 The diagram shown is a flowchart illustrating an encrypted management method for CAN data according to an embodiment of the present invention.

[0045] In this embodiment, the method includes:

[0046] S11. After establishing a connection with the T-Box device, a custom key is written according to a preset method and then written into the T-Box device for encryption.

[0047] The step of writing a custom key according to a preset method includes:

[0048] The custom key is written according to the preset method, which includes uppercase and lowercase letters, numbers, and special symbols, to obtain a 15-character custom key. The special symbols include @, #, $, %, ^, &, and *.

[0049] In this embodiment, the host computer and the T-Box device can communicate via a RS-232 serial port. A custom key is entered into the host computer, which consists of 15 characters including uppercase and lowercase letters, numbers, and special symbols (including @, #, $, %, ^, &, and *). For example, the custom key could be set to ABCDEfghij1234@. This custom key must contain at least one uppercase letter, lowercase letter, number, and special symbol, and is then written into the T-Box device as a decoding key. Before writing to the T-Box device, the host computer verifies the custom key. If the key is not 1 / 2 digits long or contains other special characters, the verification fails, and the host computer will not allow it to be written to the T-Box device. When a custom key exists in the T-Box device, the factory-installed unlimited copying of CAN data function cannot be used (the T-Box device does not have encryption management mode enabled by default at the factory, but CAN data collected by the T-Box device can be copied unlimitedly using a USB flash drive). After a custom key is successfully written to a T-Box device, the device will send its factory-installed unique VIN code and a successful encryption flag (i.e., the custom key has been written) to a remote platform to inform the T-Box device that it is encrypted.

[0050] S12, write plaintext according to preset rules, and generate ciphertext from the custom key and the plaintext according to the AES encryption algorithm.

[0051] The step of writing plaintext according to preset rules includes:

[0052] The plaintext is written according to the preset rules including the pre-part and the post-part, resulting in 15 characters. The pre-part includes 7 uppercase and lowercase letters, and the post-part includes 8 numbers of a preset date and time, which is set to a time between the current time and one month from the current time.

[0053] In this embodiment, the host computer writes plaintext according to preset rules and updates the plaintext periodically. The rules are as follows: The plaintext must consist of 15 characters, including 7 uppercase and lowercase letters followed by 8 numbers, such as Abcdefg20231117. The numbers at the end represent the date and time, which should conform to a 4-digit year, 2-digit month, and 2-digit day format. Furthermore, this part cannot be less than the current time or greater than the current time plus one month. For example, if today is November 17, 2023, then the date in the plaintext cannot be before November 17, 2023 (it can be today), nor can it be after December 17, 2023. This restriction requires users to update their plaintext periodically to ensure the validity of the ciphertext. If the plaintext is less than the required number of characters, contains special characters, or does not conform to the writing specifications, the host computer will perform corresponding checks to ensure that the user writes correct and standardized plaintext, facilitating management and subsequent time verification during decryption.

[0054] Furthermore, the host computer encrypts the aforementioned custom key and plaintext using the AES encryption algorithm to generate ciphertext. The AES encryption process includes:

[0055] 1) Key Expansion: Before AES encryption begins, the given key (custom key) is expanded to generate a series of round keys. These round keys are used to mix with the plaintext in subsequent encryption processes.

[0056] 2) Initial round: Divide the plaintext (input data) into a state array, which is a two-dimensional array.

[0057] 3) Intermediate Wheel: This is the core part of AES encryption, which includes multiple steps:

[0058] oSubBytes: Replaces each byte in the state array using a non-linear replacement function;

[0059] oShiftRows: Performs a circular shift operation on the rows in the state array;

[0060] oMixColumns: Performs mixed operations on columns in the state array with a fixed matrix;

[0061] oAddRoundKey: Performs a bitwise XOR operation between the round key and the state array; intermediate rounds will repeat multiple times, each time using a new round key.

[0062] 4) Final round: In the final round, perform SubBytes, ShiftRows and AddRoundKey operations again, but do not perform MixColumns operation again.

[0063] Output: Finally, after all the above steps, the resulting state array is the final ciphertext output.

[0064] S13, Create a GL file based on the ciphertext and the custom key to obtain the decrypted file.

[0065] Furthermore, in step S13, the creation of the GL file based on the ciphertext and the custom key to obtain the decrypted file includes:

[0066] The HMAC is obtained by calculating the ciphertext and the custom key using the SHA-256 hash function;

[0067] The encrypted text is used as the text content, and the HMAC is used as the filename to create a GL file, thus obtaining the decrypted file.

[0068] Reference Figure 2 As shown. In this embodiment, after receiving the ciphertext obtained through the AES encryption algorithm, the host computer will again use the SHA-256 hash function to generate an HMAC (Hash Message Authentication Code). The hash verification process includes: using a custom key as the hash key, the ciphertext as the plain text for hash calculation, and SHA-256 as the hash function to calculate the HMAC of the ciphertext. The HMAC will ensure the integrity and uniqueness of the ciphertext. After calculating the HMAC, a decryption file with the .GL extension will be created, using the ciphertext as the text content and the HMAC as the filename. Users can download this decryption file to their local machine. When decrypting and copying CAN data, the decryption file can be placed on a USB flash drive.

[0069] S14, Load the decryption file into the copy USB drive, and connect the copy USB drive to the T-Box device to perform the decryption operation.

[0070] Furthermore, in step S14, the decryption operation performed by connecting the copy USB flash drive to the T-Box device includes:

[0071] The decrypted file is hashed using the custom key in the T-Box device, and the resulting HMAC is compared with the filename of the decrypted file.

[0072] If the HMAC obtained by the calculation is consistent with the filename of the decryption file, then the ciphertext in the decryption file is decrypted using the custom key using AES.

[0073] When AES decryption is successful, the preset date and time in the plaintext after AES decryption is obtained, and it is determined whether the current time is less than or equal to the preset date and time. If so, the decryption operation is considered successful.

[0074] Reference Figure 3 As shown. In this embodiment, the generated decrypted file is copied to a USB flash drive. This USB flash drive should contain exactly two GL files: a date GL file with the copy date and a decrypted GL file. The USB flash drive is then connected to the T-Box device, which will perform the decryption and copying process (at this time, the T-Box device already has a custom key and is in encrypted mode). The specific decryption process includes:

[0075] 1) Check the USB drive: First, read the files on the USB drive. If the USB drive does not meet the requirement of having only two GL files, the relevant decryption and copying operations will not be performed, and the T-Box device will not record this USB drive connection operation; if it meets the requirement, proceed to the next step.

[0076] 2) Hash Verification: The T-Box device opens the decrypted GL file and uses the previously written custom key to perform a SHA-256 hash operation on the ciphertext text within the decrypted GL file. If the resulting HMAC matches the filename, the hash verification is considered successful, and the ciphertext is complete; otherwise, the decryption process exits. Regardless of whether the hash verification is successful or not, the T-Box device records the time of this hash verification operation and the result of the verification.

[0077] 3) AES Decryption: Provided the hash verification passes, the T-Box device uses the written custom key to perform AES decryption on the ciphertext within the GL file. If decryption is successful and the decrypted plaintext conforms to the preset plaintext standard, the AES decryption is considered successful. If decryption fails or the decrypted plaintext does not conform to the preset plaintext standard, the decryption process exits. Regardless of whether AES decryption is successful, the T-Box device records the time of this AES decryption operation and the result.

[0078] 4) Validity Verification: The T-Box device retrieves the preset date and time from the plaintext decrypted by AES and compares it with the current time. If the current time is less than or equal to the preset date and time, the ciphertext is considered valid, and the decryption process passes. If the current time is greater than the preset date and time, the plaintext is considered expired, and the verification fails. Regardless of whether the validity verification passes or fails, the T-Box device records the time of the validity verification and the result of the verification.

[0079] S15. After confirming that the decryption operation is successful, copy the vehicle CAN data in the T-Box device to the copy USB flash drive, and send the corresponding data copy record to the platform for management.

[0080] In this embodiment, if the decryption process is successful, the T-Box device can copy the corresponding CAN data to the USB flash drive based on the date GL file in the USB flash drive. If decryption fails, data cannot be copied. When the T-Box device detects an update to the copy operation record, it will actively send all copy records currently recorded by the T-Box device to the remote platform via the 4G module to update the platform's copy operation information. The T-Box device will save one month's worth of copy records. The plaintext used in the above decryption process has an expiration date. When the host computer generates the plaintext, it limits the maximum validity period to one month. If the plaintext exceeds one month, it cannot be used and needs to be regenerated from the host computer and hashed before decryption can be performed. This ensures that the ciphertext is not fixed and cannot be cracked.

[0081] Furthermore, the method also includes:

[0082] A decryption command is sent to the T-Box device to clear the corresponding custom key.

[0083] In this embodiment, automakers can remotely view which T-Box devices are encrypted and their corresponding copy operation records via a remote platform. In case of emergencies, after contacting management and confirming the information, a decryption command can be sent to the designated T-Box device. Upon receiving the decryption command, the T-Box device will clear the custom key. After successful clearing, the T-Box device will respond with a successful decryption message to the remote platform. Without the encrypted custom key, the T-Box device will resume its unrestricted data copying mode. Automakers can customize keys and plaintext according to their actual needs, maximizing key security. The decryption file used in the decryption process has an expiration period (e.g., a maximum of one month), ensuring the decryption file is variable and enhancing its security. Automakers can access the backend management using the provided account to view the encryption status and copy records of their devices. Furthermore, the platform account is restricted from viewing other automakers' devices, avoiding the risk of data leakage. Automakers can ensure the data privacy and security of T-Box device consumers, making CAN data acquisition legal, specific, and explicit, and improving their ability to handle information security incidents. Access to the remote platform allows car manufacturers to monitor device encryption and copying status at all times.

[0084] Reference Figure 4 The diagram shown is a structural schematic of a CAN data encryption management device provided in an embodiment of the present invention.

[0085] In this embodiment, the device 40 includes:

[0086] The encryption unit 41 is used to write a custom key according to a preset method after establishing a connection with the T-Box device, and then write the custom key into the T-Box device for encryption.

[0087] The generation unit 42 is used to write plaintext according to preset rules and generate ciphertext from the custom key and the plaintext according to the AES encryption algorithm;

[0088] Creation unit 43 is used to create a GL file based on the ciphertext and the custom key to obtain a decrypted file;

[0089] Decryption unit 44 is used to load the decryption file into a copy USB flash drive, and then connect the copy USB flash drive to the T-Box device to perform the decryption operation;

[0090] The copy unit 45 is used to copy the vehicle CAN data in the T-Box device to the copy USB flash drive after confirming that the decryption operation is successful, and send the corresponding data copy record to the platform for management.

[0091] Furthermore, the device 40 also includes:

[0092] The clearing unit is used to send a decryption command to the T-Box device to clear the corresponding custom key.

[0093] Each unit module of the device 40 can execute the corresponding steps in the above method embodiment, so the details of each unit module will not be elaborated here. Please refer to the description of the corresponding steps above for details.

[0094] This invention also provides a CAN data encryption management device, which includes the CAN data encryption management apparatus as described above, wherein the CAN data encryption management apparatus can employ... Figure 4 The structure of the embodiment, correspondingly, can be executed Figure 1 The technical solutions of the method embodiments shown are similar in implementation principle and technical effect. For details, please refer to the relevant records in the above embodiments, which will not be repeated here.

[0095] The device includes: a mobile phone, digital camera, or tablet computer, or other device with a camera function; or a device with an image processing function; or a device with an image display function. The device may include components such as a memory, processor, input unit, display unit, and power supply.

[0096] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for at least one function (such as image playback function), etc.; the data storage area can store data created according to the use of the device. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide access to the memory for the processor and input units.

[0097] The input unit can be used to receive input numerical, character, or image information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in addition to a camera, the input unit of this embodiment may also include a touch-sensitive surface (e.g., a touch screen) and other input devices.

[0098] The display unit can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit may include a display panel, optionally configured as an LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other similar display panel. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to the processor to determine the type of touch event. Subsequently, the processor provides corresponding visual output on the display panel based on the type of touch event.

[0099] This invention also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement... Figure 1 The method for encrypted management of CAN data is shown. The computer-readable storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0100] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the device embodiments, equipment embodiments, and storage medium embodiments, since they are basically similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions in the method embodiments.

[0101] Furthermore, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0102] The foregoing description illustrates and describes preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept by means of the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for encrypted management of CAN data, characterized in that, The method includes: After establishing a connection with the T-Box device, a custom key is written according to a preset method and then written into the T-Box device for encryption. Plaintext is written according to preset rules, and ciphertext is generated from the custom key and the plaintext according to the AES encryption algorithm; Based on the ciphertext and the custom key, a GL file is created to obtain the decrypted file; The decryption file is loaded into a copy USB drive, and the decryption operation is performed by connecting the copy USB drive to the T-Box device. After confirming successful decryption, the vehicle CAN data in the T-Box device is copied to the copy USB flash drive, and the corresponding data copy record is sent to the platform for management.

2. The CAN data encryption management method according to claim 1, characterized in that, The step of writing a custom key according to a preset method includes: The custom key is written according to the preset method, which includes uppercase and lowercase letters, numbers, and special symbols, to obtain a 15-character custom key. The special symbols include @, #, $, %, ^, &, and *.

3. The CAN data encryption management method according to claim 1, characterized in that, The step of writing plaintext according to preset rules includes: The plaintext is written according to the preset rules including the pre-part and the post-part, resulting in 15 characters. The pre-part includes 7 uppercase and lowercase letters, and the post-part includes 8 numbers of a preset date and time, which is set to a time between the current time and one month from the current time.

4. The CAN data encryption management method according to claim 1, characterized in that, The step of creating a GL file based on the ciphertext and the custom key to obtain a decrypted file includes: The HMAC is obtained by calculating the ciphertext and the custom key using the SHA-256 hash function; The encrypted text is used as the text content, and the HMAC is used as the filename to create a GL file, thus obtaining the decrypted file.

5. The CAN data encryption management method according to claim 1, characterized in that, The decryption operation performed by connecting the copied USB flash drive to the T-Box device includes: The decrypted file is hashed using the custom key in the T-Box device, and the resulting HMAC is compared with the filename of the decrypted file. If the HMAC obtained by the calculation is consistent with the filename of the decryption file, then the ciphertext in the decryption file is decrypted using the custom key using AES. When AES decryption is successful, the preset date and time in the plaintext after AES decryption is obtained, and it is determined whether the current time is less than or equal to the preset date and time. If so, the decryption operation is considered successful.

6. The CAN data encryption management method according to claim 1, characterized in that, The method further includes: A decryption command is sent to the T-Box device to clear the corresponding custom key.

7. A CAN data encryption management device, characterized in that, The device includes: The encryption unit is used to create a custom key according to a preset method after establishing a connection with the T-Box device, and then write the custom key into the T-Box device for encryption. The generation unit is used to write plaintext according to preset rules and generate ciphertext from the custom key and the plaintext according to the AES encryption algorithm. A creation unit is used to create a GL file based on the ciphertext and the custom key to obtain a decrypted file; The decryption unit is used to load the decryption file into a copy USB flash drive, and then connect the copy USB flash drive to the T-Box device to perform the decryption operation. The copy unit is used to copy the vehicle CAN data in the T-Box device to the copy USB flash drive after confirming that the decryption operation is successful, and send the corresponding data copy record to the platform for management.

8. The CAN data encryption management device according to claim 7, characterized in that, The device further includes: The clearing unit is used to send a decryption command to the T-Box device to clear the corresponding custom key.

9. A CAN data encryption management device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory, the computer program being executed by the processor to implement the steps of a CAN data encryption management method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is executed by a processor to implement the steps of a CAN data encryption management method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Communication security protection method and system for vehicle-mounted T-Box

    CN113132365A

  • Data transmission encryption and decryption method and device, computer equipment and storage medium

    CN113259132A