A vehicle ECU digital certificate application method and system

By introducing certificate application triggering instructions and an encrypted message generation mechanism into the vehicle ECU, the problems of the vehicle ECU digital certificate application process being cumbersome and low security are solved, and a more efficient and reliable certificate application process is achieved.

CN116094730BActive Publication Date: 2024-09-17CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310072622.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-18
Publication Date
2024-09-17
Estimated Expiration
2043-01-18

AI Technical Summary

Technical Problem

The existing vehicle ECU digital certificate application process is cumbersome and there is a risk of certificate leakage or tampering, and the security is not high.

Method used

The trigger device sends a certificate application triggering instruction to query whether a valid digital certificate exists in the local security module. If it does not exist, an encrypted certificate application message is generated and sent to the front-end server. The front-end server decrypts and generates a valid digital certificate to the PKI server. And determine the success of the certificate application through the signature verification results.

Benefits of technology

It simplifies the vehicle ECU digital certificate application process, improves the efficiency and security of certificate application, reduces the risk of certificate leakage or tampering, and enhances the reliability of digital certificate application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116094730B
    Figure CN116094730B
Patent Text Reader

Abstract

The present invention discloses a vehicle ECU digital certificate application method, including: based on the certificate application trigger instruction sent by the trigger device, query whether there is a valid digital certificate of the ECU terminal in the local security module; if there is no valid digital certificate in the security module, generate certificate application information based on the certificate application trigger instruction and the built-in information of the ECU terminal, call the security module to generate an encrypted certificate application message; send the encrypted certificate application message to the front-end server, so that the front-end server triggers the PKI server to generate a valid digital certificate; after receiving the valid digital certificate sent by the front-end server, call the security module to verify the valid digital certificate to obtain the verification result, and determine whether the valid digital certificate of the ECU terminal is successfully applied based on the verification result. The above technical scheme reduces the risk of leakage or tampering of the vehicle ECU digital certificate application, ensures the reliability and security of the digital certificate application, and improves the efficiency of the digital certificate application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and in particular to a vehicle ECU digital certificate application method and system. Background Art

[0002] With the development of the times, intelligence and Internet of Vehicles have become an inevitable trend. In recent years, Internet of Vehicles security incidents have occurred frequently, and security threats have gradually escalated. Various targeted network attacks have been launched, from breaking through various sensor signals at the perception layer to exploiting vulnerabilities in the vehicle network and vehicle equipment at the intermediate communication layer and computing layer to achieve remote control of vehicles. Recently, the theft of user data and privacy information has also increased. With the advancement of technology, the security issues of Internet of Vehicles have attracted more and more attention.

[0003] Applying the existing digital certificate technology to the Internet of Vehicles has greatly improved the security of the Internet of Vehicles system. At present, the traditional way of obtaining certificates is mostly for automobile manufacturers to use dedicated certificate application equipment, such as staff logging into the PKI system through a PC to apply for the digital certificate of the corresponding ECU, and then using a dedicated copying device to install the digital certificate into the corresponding ECU. However, this way of obtaining certificates is relatively cumbersome, and during the certificate copying process, there is a risk of certificate leakage or tampering, and the security factor is not high. Summary of the invention

[0004] The present invention provides a vehicle ECU digital certificate application method and system, so as to reduce the risk of certificate leakage or tampering during the certificate copying process and improve the security and reliability of the vehicle ECU digital certificate application.

[0005] According to a first aspect of the present invention, a vehicle ECU digital certificate application method is provided, which is applied to an ECU terminal, and the method comprises:

[0006] Based on the certificate application trigger instruction sent by the trigger device, query whether there is a valid digital certificate of the ECU terminal in the local security module; the certificate application trigger instruction carries the private key signature of the trigger device;

[0007] If the valid digital certificate does not exist in the security module, generating certificate application information based on the certificate application trigger instruction and the built-in information of the ECU terminal, and calling the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction;

[0008] Sending the encrypted certificate application message to the front-end server, so that the front-end server triggers the PKI server to generate a valid digital certificate based on the decrypted certificate application message; the valid digital certificate carries the private key signature of the PKI server;

[0009] After receiving the valid digital certificate sent by the front-end server, the security module is called to verify the valid digital certificate to obtain a verification result, and based on the verification result, it is determined whether the application for the valid digital certificate of the ECU terminal is successful.

[0010] According to a second aspect of the present invention, a vehicle ECU digital certificate application method is provided, which is applied to a front-end server, and the method comprises:

[0011] Receive the encrypted certificate application message sent by the ECU terminal;

[0012] The encrypted certificate application message is decrypted using a shared key to obtain certificate application information and a certificate application trigger instruction; the shared key is obtained by identity authentication and negotiation between the security module of the ECU terminal and the front-end server, and the certificate application trigger instruction carries a private key signature of a triggering device;

[0013] Verify the signature of the certificate application trigger instruction; if the signature verification is successful, request the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction;

[0014] The valid digital certificate returned by the PKI server is sent to the ECU terminal.

[0015] According to a third aspect of the present invention, there is provided a vehicle ECU digital certificate application system, comprising: a trigger device, an ECU terminal, a front-end server and a PKI server;

[0016] The trigger device is used to send a certificate application trigger instruction to the ECU terminal device

[0017] The ECU terminal device is used to query whether there is a valid digital certificate of the ECU terminal in the local security module based on the certificate application trigger instruction sent by the trigger device; the certificate application trigger instruction carries the private key signature of the trigger device; if the valid digital certificate does not exist in the security module, generate certificate application information based on the certificate application trigger instruction and the built-in information of the ECU terminal, call the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; send the encrypted certificate application message to the front-end server;

[0018] The front-end server is used to receive the encrypted certificate application message sent by the ECU terminal; use the shared key to decrypt the encrypted certificate application message to obtain the certificate application information and the certificate application trigger instruction; verify the signature of the certificate application trigger instruction, and if the signature verification is successful, request the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction; and send the valid digital certificate returned by the PKI server to the ECU terminal;

[0019] The ECU terminal is also used to call the security module to verify the valid digital certificate to obtain a verification result after receiving the valid digital certificate sent by the front-end server, and determine whether the application for the valid digital certificate of the ECU terminal is successful based on the verification result.

[0020] An embodiment of the present invention provides a vehicle ECU digital certificate application method and system, which queries whether there is a valid digital certificate of the ECU terminal in the local security module based on a certificate application trigger instruction sent by a trigger device; the certificate application trigger instruction carries the private key signature of the trigger device; if the valid digital certificate does not exist in the security module, certificate application information is generated based on the certificate application trigger instruction and the built-in information of the ECU terminal, and the security module is called to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; the encrypted certificate application message is sent to a front-end server, so that the front-end server triggers a PKI server to generate a valid digital certificate based on the decrypted certificate application message; the valid digital certificate carries the private key signature of the PKI server; after receiving the valid digital certificate sent by the front-end server, the security module is called to verify the valid digital certificate to obtain a verification result, and based on the verification result, it is determined whether the application for the valid digital certificate of the ECU terminal is successful. Compared with digital certificate filling, the above technical solution simplifies the process of vehicle ECU digital certificate application and improves the efficiency of certificate application; by generating encrypted certificate application messages, the security and reliability of the digital certificate application link are effectively guaranteed; the digital certificate is verified and the verification result is determined to verify the legitimacy of the triggering device identity, avoid illegal triggering of certificate application, and improve the security of certificate application. This solution reduces the risk of vehicle ECU digital certificate application being leaked or tampered with, ensures the reliability and security of digital certificate application, and improves the efficiency of digital certificate application.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 This is a flow chart of a vehicle ECU digital certificate application method provided in accordance with Embodiment 1 of the present invention;

[0024] Figure 2 is a flow chart of a vehicle ECU digital certificate application method provided according to Embodiment 2 of the present invention;

[0025] Figure 3 This is a schematic diagram of the structure of a vehicle ECU digital certificate application system provided according to Embodiment 3 of the present invention;

[0026] Figure 4 It is a signaling interaction diagram for applying for a vehicle ECU digital certificate. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1This is a flow chart of a vehicle ECU digital certificate application method provided in the first embodiment of the present invention. This embodiment is applicable to the case where a vehicle ECU digital certificate application is performed at an ECU terminal. This method can be executed by an ECU terminal in a vehicle ECU digital certificate application system. Figure 1 As shown, the method includes:

[0031] S101 : Based on the certificate application trigger instruction sent by the trigger device, query whether there is a valid digital certificate of the ECU terminal in the local security module.

[0032] Among them, the trigger device can be understood as a device used to trigger the ECU terminal to apply for a self-certificate. The trigger device has its own digital certificate and private key built in, and the private key is locally stored in ciphertext form. The trigger device is also equipped with a cryptographic algorithm module, which is used to provide cryptographic services, such as signature services. Preferably, the trigger device can be an offline electrical inspection device of a car manufacturer, or a diagnostic instrument of an after-sales 4S store.

[0033] The certificate application trigger instruction can be understood as an instruction for triggering the action of applying for a digital certificate. It is a certificate application trigger instruction obtained after the trigger device signs with its own private key. The local security module can be understood as a hardware device used to protect and manage the ECU (Electronic Control Unit) terminal, such as a security chip. The ECU terminal can be understood as the terminal device of the automotive electronic control unit.

[0034] A valid digital certificate can be understood as a digital certificate that exists and is valid in the ECU terminal and is used to identify the identity information of the ECU terminal. Among them, the validity of a digital certificate can be understood as a digital certificate that is within the validity period, or it can refer to a digital certificate whose content matches the ECU terminal, or a digital certificate that is intact and intact. Correspondingly, the absence of a valid digital certificate in the local security module of the ECU terminal can be understood as the absence of a digital certificate in the ECU terminal, or the presence of an invalid digital certificate. Among them, an invalid digital certificate can be understood as an invalid digital certificate that cannot successfully identify the identity information of the ECU terminal. For example, it can be a digital certificate that exceeds the update period threshold, that is, a digital certificate that exceeds the validity period of the digital certificate and urgently needs to be updated; it can also be a digital certificate whose information stored in the local security module is invalid due to changes in the information of the ECU terminal; it can also be a digital certificate whose information cannot be read due to damage to the digital certificate itself and cannot be repaired.

[0035] Among them, a digital certificate can be understood as a digital certification that marks the identity information of the communicating parties in Internet communication, and can be used to identify the identity of the other party. Therefore, a digital certificate is also called a digital identification. A digital certificate can ensure the integrity and security of information and data of network users in computer network communication in the form of encryption or decryption.

[0036] Specifically, during the vehicle offline electrical inspection or after-sales diagnosis and replacement of parts, the ECU terminal receives and responds to the certificate application trigger instruction sent by the trigger device, calls the SDK (Software Development Kit) interface to perform a digital certificate query in the local security module to determine whether the digital certificate of the ECU terminal exists in the local security module of the ECU terminal. If a digital certificate exists, determine whether the digital certificate is valid.

[0037] S102: If there is no valid digital certificate in the security module, generate certificate application information based on the certificate application trigger instruction and the ECU terminal built-in information, and call the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction.

[0038] Among them, the ECU terminal built-in information can be understood as the information related to the ECU terminal itself stored in the ECU terminal, such as the ECU terminal identification number, ECU terminal attribute information, ECU terminal work code, and vehicle identification number. The certificate application information can be understood as the relevant information used to apply for a digital certificate. The certificate application message can be understood as the encrypted information combining the certificate application information and the certificate application trigger instruction.

[0039] Specifically, if it is found that the ECU terminal digital certificate does not exist or an invalid digital certificate exists in the local security module, the digital certificate application operation is performed. Based on the certificate application trigger instruction sent by the trigger device, the ECU terminal generates certificate application information corresponding to the ECU terminal and the trigger device in combination with the built-in information of the ECU terminal, which is used to represent the information required to apply for the vehicle ECU digital certificate. The ECU terminal calls the security module through the SDK interface to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction, wherein the encryption method used to generate the encrypted certificate application message may include encryption using a shared key, encryption using an encryption algorithm, or encryption using an encryption interface, etc., and this embodiment does not limit this.

[0040] S103: Send the encrypted certificate application message to the front-end server, so that the front-end server triggers the PKI server to generate a valid digital certificate based on the decrypted certificate application message.

[0041] Among them, the valid digital certificate carries the private key signature of the PKI (Public Key Infrastructure) server. The front-end server can be understood as a server device used to schedule and manage the interactive instructions and data between the relevant modules and each information terminal. The ECU terminal and the front-end server can be directly connected through the network. The PKI server can be understood as a universal server device that uses public key theory and technology to provide security services. It is a collection of hardware, software, personnel, policies and procedures, which is used to realize the generation, management, storage, distribution and revocation of keys and certificates based on the public key cryptography system.

[0042] Specifically, the ECU terminal sends the encrypted certificate application message to the front-end server through a network connection, and receives the valid digital certificate returned by the front-end server based on the sent certificate application message. The valid digital certificate is a valid digital certificate generated by the PKI server after the front-end server receives and decrypts the certificate application message and triggers it based on the decryption result.

[0043] S104. After receiving the valid digital certificate sent by the front-end server, call the security module to verify the valid digital certificate to obtain a verification result, and determine whether the application for the valid digital certificate of the ECU terminal is successful based on the verification result.

[0044] The signature verification result may be understood as a success or failure result obtained after verifying a valid digital certificate.

[0045] Specifically, after the ECU terminal receives the valid digital certificate sent by the front-end server, it stores the valid digital certificate, calls the security module to verify the signature, and obtains the verification result of the valid digital certificate. If the verification result is successful, it can be determined that the valid digital certificate of the ECU terminal has been successfully applied for; if the verification result is failed, it can be determined that the valid digital certificate of the ECU terminal has not been successfully applied for, that is, the application for the valid digital certificate of the ECU terminal has failed.

[0046] In this embodiment, by querying whether there is a valid digital certificate of the ECU terminal in the local security module based on the certificate application trigger instruction sent by the trigger device; if there is no valid digital certificate in the security module, then generate certificate application information based on the certificate application trigger instruction and the built-in information of the ECU terminal, call the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; send the encrypted certificate application message to the front-end server, so that the front-end server triggers the PKI server to generate a valid digital certificate based on the decrypted certificate application message; after receiving the valid digital certificate sent by the front-end server, call the security module to verify the valid digital certificate to obtain the verification result, and determine whether the valid digital certificate of the ECU terminal is successfully applied based on the verification result. Compared with digital certificate filling, the above technical solution simplifies the process of vehicle ECU digital certificate application and improves the efficiency of certificate application; by generating an encrypted certificate application message, the security and reliability of the digital certificate application link are effectively guaranteed; the digital certificate is verified and the verification result is determined to verify the legitimacy of the trigger device identity, avoid illegal triggering of certificate application, and improve the security of certificate application. This solution reduces the risk of vehicle ECU digital certificate application being leaked or tampered with, ensures the reliability and security of digital certificate application, and improves the efficiency of digital certificate application.

[0047] Optionally, there is no valid digital certificate in the security module, including: the digital certificate of the ECU terminal does not exist in the security module; or the digital certificate of the ECU terminal in the security module has expired.

[0048] In this embodiment, the digital certificate may or may not exist in the security module of the ECU terminal. If it exists, the digital certificate may include a valid digital certificate or an invalid digital certificate. Among them, an invalid digital certificate may be understood as a digital certificate that exceeds the renewal period threshold, that is, a digital certificate that exceeds the validity period of the digital certificate and urgently needs to be renewed.

[0049] For example, if the digital certificate cannot be found in the local security module of the ECU terminal, it can be determined that the digital certificate does not exist in the local security module of the ECU terminal; if the ECU terminal digital certificate is found in the local security module, it is determined whether the digital certificate exceeds the update period threshold. If the update period threshold is not exceeded, it can be determined that the digital certificate is valid, the application for the digital certificate is terminated, and the digital certificate is encrypted and saved through the local security module. If the digital certificate exceeds the update period threshold, or cannot correspond to the built-in information of the ECU terminal, it can be determined that the digital certificate is invalid, and the operation of applying for a new digital certificate is executed.

[0050] Optionally, in S102, certificate application information is generated based on the certificate application trigger instruction and the built-in information of the ECU terminal, including:

[0051] S1021. Acquire ECU terminal built-in information, where the ECU terminal built-in information includes: an ECU terminal identification number and a vehicle identification number.

[0052] The ECU terminal identification number can be understood as the identity document (ID) corresponding to the ECU terminal. The vehicle identification number can be understood as the vehicle identification number (VIN) corresponding to the vehicle.

[0053] Specifically, each ECU terminal has its corresponding unique identification number, and the ECU terminal identification number built into the ECU terminal and the vehicle identification number corresponding to the vehicle are obtained.

[0054] S1022: Determine the identity information of the triggering device and the requested certificate identifier based on the certificate application triggering instruction.

[0055] The identity information of the triggering device can be understood as the identity ID or attribute information of the triggering device, etc. The requested certificate identifier can be understood as a valid digital certificate identifier in the local security module determined based on the certificate application trigger instruction, such as a product serial number (SN).

[0056] Specifically, based on the certificate application trigger instruction sent by the trigger device, the identity information of the trigger device and the certificate request identifier corresponding to the certificate application trigger instruction are determined.

[0057] S1023. Generate certificate application information according to the ECU terminal identification number, the vehicle identification number, the identity information of the triggering device and the certificate identification.

[0058] Specifically, according to the ECU terminal identification number and vehicle identification number built into the ECU terminal, and the identity information and certificate identification of the triggering device determined based on the certificate application triggering instruction, the certificate application information corresponding to the ECU terminal and the triggering device is generated.

[0059] Optionally, in S102, calling the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction includes:

[0060] S1024. Call the local security module through the SDK interface.

[0061] In this embodiment, the ECU terminal is provided with a local security module, and the ECU terminal calls the security module through the SDK interface, and enables the security module to provide cryptographic services for the ECU terminal.

[0062] S1025. Encapsulate the certificate application information and the certificate application trigger instruction based on the network protocol through the security module to obtain a certificate application message, and encrypt the certificate application message with a shared key to generate an encrypted certificate application message.

[0063] The shared key is obtained through identity authentication and negotiation between the security module and the front-end server. Before applying for the ECU digital certificate, the ECU terminal communicates with the front-end server through the network, and the ECU terminal performs transport layer security protocol (TLS) identity authentication with the certificate front-end server in advance through the security module, and negotiates to obtain the shared key.

[0064] Specifically, in the ECU terminal, the local security module uses a shared key to encrypt the certificate application information and the signed certificate application trigger instruction, generates an encrypted certificate application message, encapsulates the encrypted certificate application message through a network protocol, such as Hyper Text Transfer Protocol (HTTP), and submits the encapsulated certificate application message to the certificate front-end server;

[0065] Optionally, in S104, calling the security module to verify the signature of the valid digital certificate includes:

[0066] S1041. Call the local security module through the SDK interface.

[0067] In this embodiment, the ECU terminal is provided with a local security module, and the ECU terminal calls the security module through the SDK interface, and enables the security module to provide cryptographic services for the ECU terminal.

[0068] S1042. Verify the private key signature of the PKI server carried in the valid digital certificate based on the public key of the built-in PKI server through the security module.

[0069] In this embodiment, the ECU terminal calls the security module through the SDK interface to verify the valid digital certificate based on the basic architecture of the digital certificate. Among them, the basic architecture of the digital certificate is the public key PKI, that is, a pair of keys are used to implement encryption and decryption. The key includes a private key and a public key. The private key is mainly used for signing and decryption, which is defined by the user and only known by the user; the public key is used for signature verification and encryption and can be shared by multiple users.

[0070] Specifically, the PKI server generates a new valid digital certificate. Therefore, the valid digital certificate will carry the signature information of the PKI server, such as a private key signature. If the private key of the PKI server is used to sign the content of the digital certificate, the signature information of the PKI server can be obtained, and it is determined that the valid digital certificate carries the signature information of the PKI server. The security module uses the built-in public key of the PKI server to verify the signature information of the private key of the PKI server carried in the digital certificate.

[0071] S1043. The valid digital certificate that has been successfully verified is stored in the security module, and the identifier of the valid digital certificate is fed back to the ECU terminal.

[0072] In this embodiment, the ECU terminal calls the local security module through the SDK interface to store the valid digital certificate that has successfully verified the signature. The security module feeds back the verification execution result to the ECU terminal through the SDK interface, where the execution result includes execution information and the identification of the valid digital certificate.

[0073] Optionally, after determining whether the application for a valid digital certificate of the ECU terminal is successful based on the signature verification result, it also includes: if it is determined based on the signature verification result that the application for a valid digital certificate of the ECU terminal is successful, the ECU terminal identification number, vehicle identification number and the identification of the valid digital certificate are uploaded to the cloud platform for storage and management by the cloud platform.

[0074] Among them, the cloud platform can be understood as a service device for remote cloud computing.

[0075] Specifically, if the signature verification result is successful, it is determined that the valid digital certificate of the ECU terminal has been successfully applied for, and the ECU terminal identification number, vehicle identification number and the identification of the valid digital certificate are uploaded to the cloud platform, and the cloud platform binds and stores the information content corresponding to the valid digital certificate to facilitate the management of the valid digital certificate.

[0076] If the signature verification result is a failure, repeat step S102 and step S103. If the signature verification result is still a failure after repeating three times, query the ECU certificate application log, determine the error log, and troubleshoot the problem according to the cause of the error.

[0077] Embodiment 2

[0078] Figure 2 This is a flow chart of a vehicle ECU digital certificate application method provided in the second embodiment of the present invention. This embodiment is applicable to the case where a vehicle ECU digital certificate application is performed in a front-end server. The method can be executed by a front-end server in a vehicle ECU digital certificate application system, and the system can be implemented in the form of hardware and / or software. Figure 2 As shown, the method includes:

[0079] S201. Receive an encrypted certificate application message sent by an ECU terminal.

[0080] In this embodiment, the front-end server receives the certificate application message sent by the ECU terminal, wherein the certificate application message is encrypted by a shared key.

[0081] S202: Decrypt the encrypted certificate application message using a shared key to obtain certificate application information and a certificate application trigger instruction.

[0082] The shared key is obtained through identity authentication and negotiation between the security module of the ECU terminal and the front-end server, and the certificate application trigger instruction carries the private key signature of the trigger device. Before applying for the vehicle ECU digital certificate, the ECU terminal communicates with the front-end server through the network, and the ECU terminal pre-authenticates with the front-end server through the local security module and negotiates to obtain the shared key.

[0083] Specifically, the front-end server decrypts the encrypted certificate application message through the shared key obtained through pre-authentication and negotiation with the ECU terminal, and obtains the certificate application information including the ECU terminal identification number, vehicle identification number, identity information of the triggering device and the certificate identification, as well as the trigger request instruction corresponding to the private key signature of the triggering device.

[0084] S203, verify the signature of the certificate application trigger instruction; if the signature verification is successful, request the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction.

[0085] In this embodiment, the certificate application trigger instruction is verified based on the private key signature of the trigger device. If the verification is successful, a request for generating a valid digital certificate for the ECU terminal is sent to the PKI server based on the certificate application trigger instruction, so that the PKI server generates a valid digital certificate for the ECU terminal. If the verification fails, the application for the vehicle ECU digital certificate is terminated.

[0086] S204. Send the valid digital certificate returned by the PKI server to the ECU terminal.

[0087] In this embodiment, the front-end server receives the valid digital certificate of the ECU terminal generated by the PKI server based on the certificate application trigger instruction, and sends the valid digital certificate to the corresponding ECU terminal.

[0088] In this embodiment, the encrypted certificate application message sent by the ECU terminal is received; the encrypted certificate application message is decrypted using a shared key to obtain the certificate application information and the certificate application trigger instruction; the certificate application trigger instruction is verified; if the verification is successful, a request is made to the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction; the valid digital certificate returned by the PKI server is sent to the ECU terminal. Using the above technical solution, the certificate front-end server receives the encrypted certificate application message, performs protocol parsing and verification, and decrypts the certificate application message using a shared key, thereby ensuring the security of the certificate application message parsing and preventing the certificate application message from being decrypted by other malicious devices; the certificate application trigger instruction is verified, thereby avoiding the risk of the certificate application trigger instruction being tampered with, and improving the security and reliability of the digital certificate application. The above technical solution effectively improves the security and reliability of the vehicle ECU digital certificate application process in the front-end server.

[0089] Optionally, in S203, verifying the signature of the certificate application trigger instruction includes:

[0090] S2031. Acquire the public key of the triggering device based on the identity information of the triggering device included in the certificate application triggering instruction.

[0091] In this embodiment, the certificate application trigger instruction includes the identity information of the trigger device and the certificate request identifier corresponding to the certificate application trigger instruction. The front-end server obtains the public key of the trigger device digital certificate based on the identity information of the trigger device.

[0092] S2032: Use the public key to verify the private key signature of the trigger device carried by the certificate application trigger instruction.

[0093] In this embodiment, the public key of the trigger device digital certificate is used to verify the private key signature of the trigger device carried by the certificate application trigger instruction to determine whether the public key of the trigger device digital certificate and the private key signature carried by the certificate application trigger instruction can decrypt each other.

[0094] Optionally, in S203, requesting the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction includes:

[0095] S2033: Generate a certificate query request based on the requested certificate identifier included in the certificate application trigger instruction.

[0096] In this embodiment, if the signature verification result is successful, a certificate query request for the digital certificate is generated in the front-end server based on the certificate request identifier corresponding to the certificate application trigger instruction contained in the certificate application trigger instruction.

[0097] S2034. Based on the certificate query request, query whether there is a valid digital certificate corresponding to the certificate identifier requested by the ECU terminal in the PKI server.

[0098] In this embodiment, the front-end server queries the PKI server whether the digital certificate exists according to the certificate query request including the certificate request identifier. Specifically, the certificate front-end server sends a certificate query request to the PKI server, and the PKI server queries based on the certificate query request and feeds back the query result to the front-end server.

[0099] S2035. If the digital certificate corresponding to the requested certificate identifier does not exist in the PKI server, the PKI server is triggered to generate a valid digital certificate for the ECU terminal.

[0100] In this embodiment, after querying whether there is a valid digital certificate corresponding to the certificate identifier requested by the ECU terminal in the PKI server, if the digital certificate corresponding to the requested certificate identifier does not exist in the PKI server, the PKI server is triggered to generate a valid digital certificate for the ECU terminal.

[0101] S2036. If the digital certificate corresponding to the requested certificate identifier exists in the PKI server but the digital certificate is invalid, the PKI server is triggered to update the invalid digital certificate in the PKI server to obtain a valid digital certificate for the ECU terminal.

[0102] In this embodiment, after querying whether there is a valid digital certificate corresponding to the certificate identifier requested by the ECU terminal in the PKI server, if the digital certificate corresponding to the requested certificate identifier exists in the PKI server, but the digital certificate has exceeded the renewal period threshold or the corresponding ECU terminal built-in information has changed, resulting in the digital certificate being invalid, the update of the invalid digital certificate in the PKI server is triggered to obtain the valid digital certificate of the ECU terminal.

[0103] It is understandable that, whether updating the digital certificate or generating a valid digital certificate for the ECU terminal, a new digital certificate is generated by the PKI server.

[0104] Embodiment 3

[0105] Figure 3 This is a schematic diagram of the structure of a vehicle ECU digital certificate application system provided in Embodiment 3 of the present invention. Figure 3 As shown, the system includes: a trigger device 31, an ECU terminal 32, a front-end server 33 and a PKI server 34.

[0106] The trigger device 31 is used to send a certificate application trigger instruction to the ECU terminal 32 device.

[0107] The ECU terminal 32 is used to query whether there is a valid digital certificate of the ECU terminal 32 in the local security module based on the certificate application trigger instruction sent by the trigger device 31; the certificate application trigger instruction carries the private key signature of the trigger device 31; if there is no valid digital certificate in the security module, the certificate application information is generated based on the certificate application trigger instruction and the built-in information of the ECU terminal, and the security module is called to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; and the encrypted certificate application message is sent to the front-end server 33;

[0108] The front-end server 33 is used to receive the encrypted certificate application message sent by the ECU terminal 32; decrypt the encrypted certificate application message using a shared key to obtain the certificate application information and the certificate application trigger instruction; verify the signature of the certificate application trigger instruction, and if the signature verification is successful, request the PKI server 34 to generate a valid digital certificate for the ECU terminal 32 based on the certificate application trigger instruction; and send the valid digital certificate returned by the PKI server 34 to the ECU terminal 32;

[0109] The ECU terminal 32 is also used to call the security module to verify the valid digital certificate to obtain a verification result after receiving the valid digital certificate sent by the front-end server 33, and determine whether the application for the valid digital certificate of the ECU terminal 32 is successful based on the verification result.

[0110] In this embodiment, the trigger device 31 generates a certificate application trigger instruction during the vehicle offline electrical inspection or after-sales diagnosis and replacement process, signs it with its own private key, obtains the signed certificate application trigger instruction, and sends the certificate application trigger instruction signed by the private key to the ECU terminal 32, triggering the vehicle ECU digital certificate application.

[0111] Exemplarily, the triggering equipment may include a dedicated workstation equipment and a diagnostic instrument for the production line. A workstation is set up in the electrical inspection link, and after the vehicle offline electrical inspection link is completed, the dedicated workstation equipment of the production line triggers the certificate application; or when replacing parts after sales, the diagnostic instrument triggers the certificate application.

[0112] In this embodiment, the ECU terminal 32 receives the certificate application trigger instruction sent by the trigger device 31, connects to the local security module through the SDK interface, and queries the local security module based on the certificate application trigger instruction whether there is a valid digital certificate of the ECU terminal 32. The certificate application trigger instruction carries the private key signature of the trigger device 31.

[0113] If there is no valid digital certificate in the local security module of the ECU terminal 32, the identity information and certificate identifier of the triggering device are determined based on the certificate application trigger instruction to generate the certificate application information, and the certificate application information is generated in combination with the ECU terminal identification number and vehicle identification number built into the ECU terminal. The security module is called through the SDK interface to use a shared key to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; the encrypted certificate application message is encapsulated through the network protocol and sent to the front-end server 33.

[0114] In this embodiment, the front-end server 33 receives the encrypted certificate application message sent by the ECU terminal 32, and uses the shared key to decrypt the encrypted certificate application message to obtain the certificate application information and the certificate application trigger instruction. The front-end server 33 determines the identity information of the triggering device through the decrypted certificate application information, and queries the identity information of the triggering device to obtain the public key of the triggering device digital certificate, and verifies the certificate application trigger instruction with the private key signature through the public key of the triggering device digital certificate. If the signature verification is successful, a request information is sent to the PKI server 34 based on the certificate application trigger instruction, that is, the PKI server 34 is requested to query whether the digital certificate exists through the requested certificate identification. The PKI server 34 queries based on the certificate query request and feeds back the query result.

[0115] If the digital certificate corresponding to the requested certificate identifier does not exist in the PKI server 34, the PKI server 34 is triggered to generate a valid digital certificate for the ECU terminal 32; if the digital certificate corresponding to the requested certificate identifier exists in the PKI server 34 but the digital certificate is invalid, the PKI server is triggered to update the invalid digital certificate to obtain a valid digital certificate for the ECU terminal 32. After the PKI server 34 completes the generation or update of the valid digital certificate, it returns the new valid digital certificate to the front-end server 33; the front-end server 33 receives the new valid digital certificate returned by the PKI server 34, and sends the new valid digital certificate to the ECU terminal 32.

[0116] After receiving the valid digital certificate sent by the front-end server 33, the ECU terminal 32 calls the security module through the SDK interface, so that the security module uses the public key of the built-in PKI server 34 to verify the private key signature information of the PKI server 34 carried in the new valid digital certificate, obtains the verification result, and stores the valid digital certificate. The security module returns the verification result to the ECU terminal 32 through the SDK interface, and the ECU terminal 32 determines whether the application for the valid digital certificate of the ECU terminal 32 is successful based on the verification result.

[0117] Optionally, the vehicle ECU digital certificate application system also includes:

[0118] The cloud platform is used to store and manage the ECU terminal identification number, vehicle identification number and valid digital certificate identification sent by the ECU terminal 32.

[0119] In this embodiment, the ECU terminal 32 determines whether to successfully apply for a valid digital certificate of the ECU terminal 32 based on the signature verification result. If it is determined based on the signature verification result that the valid digital certificate of the ECU terminal is successfully applied for, the ECU terminal 32 uploads the ECU terminal identification number, the vehicle identification number, and the identification of the valid digital certificate to the cloud platform, and the cloud platform binds and stores the ECU terminal identification number, the vehicle identification number, and the identification of the valid digital certificate sent by the ECU terminal 32, so as to manage the valid digital certificate of the ECU terminal 32.

[0120] For example, Figure 4 This is a signaling interaction diagram for applying for a vehicle ECU digital certificate. Figure 4 As shown in the figure, the vehicle ECU digital certificate application process includes:

[0121] S1. The vehicle is offline and the electrical inspection is completed, triggering the ECU certificate application.

[0122] In this embodiment, before applying for an ECU certificate, the ECU terminal communicates with the certificate front-end server over the network, and the ECU terminal performs TLS identity authentication in advance with the certificate front-end server through a security chip, and negotiates to obtain a shared key.

[0123] Specifically, during the offline electrical inspection of the vehicle or the after-sales diagnostic replacement, the ECU terminal applies for an ECU digital certificate under the trigger of the trigger device. For example, a workstation is set up in the electrical inspection link. After the offline electrical inspection of the vehicle is completed, the ECU terminal receives the certificate application trigger instruction sent by the trigger device, triggering the ECU terminal to apply for a certificate; or during after-sales replacement, the ECU terminal receives the certificate application trigger instruction sent by the diagnostic instrument, triggering the ECU terminal to apply for a certificate. Among them, the certificate application trigger instruction carries the signature obtained by the trigger device using its own private key.

[0124] S2. The ECU terminal calls the SDK to query whether there is a valid digital certificate locally.

[0125] In this embodiment, the ECU terminal receives the signed certificate application trigger instruction, calls the SDK interface to perform a certificate query in the local security module, and determines whether the local security module has the digital certificate corresponding to the ECU terminal. If the ECU terminal digital certificate does not exist, the application for the digital certificate continues; if it is found that the ECU terminal digital certificate already exists locally, it is determined whether the digital certificate exceeds the renewal period threshold. If it does not exceed the renewal period threshold, it is determined that the digital certificate is a valid digital certificate and the application for the digital certificate is terminated; if it exceeds the renewal period threshold, the application for the digital certificate continues.

[0126] S3.ECU terminal executes certificate application.

[0127] In this embodiment, if there is no valid digital certificate, the ECU terminal generates certificate application information based on the ECU terminal identification number, vehicle identification number, identity information of the triggering device and certificate identification (such as SN number), and calls the security module through the SDK interface. The security module uses a shared key to encrypt the certificate application information and the signed certificate application trigger instruction to generate an encrypted certificate application message, and finally encapsulates the encrypted certificate application message through the network protocol and submits it to the front-end server.

[0128] S4. The front-end server parses and verifies the certificate application message.

[0129] In this embodiment, the front-end server receives the encrypted certificate application message, performs protocol parsing and verification, and after successful verification, connects to the PKI server to trigger the PKI server to apply for a certificate.

[0130] Specifically, the front-end server uses a shared key to decrypt the encrypted certificate application message to obtain the certificate application information and the signed certificate application trigger instruction, namely the ECU terminal identification number, the vehicle identification number, the identity information of the triggering device, the requested certificate identification, and the certificate application trigger instruction signed by the private key.

[0131] S5. The front-end server queries the PKI server to see whether the certificate exists according to the requested certificate identifier.

[0132] In this embodiment, the front-end server performs a query based on the identity information of the triggering device, obtains the public key of the triggering device's digital certificate, and uses the public key to verify the certificate application trigger instruction signed by the private key. If the verification fails, the application is terminated. If the verification is successful, the front-end server requests the PKI server to query whether the digital certificate exists based on the requested certificate identifier. The front-end server sends a certificate query request to the PKI server, and the PKI server queries based on the certificate query request. If the digital certificate does not exist in the PKI server, the front-end server triggers the PKI server to generate a valid digital certificate for the ECU terminal; if the digital certificate corresponding to the requested certificate identifier exists in the PKI server, but the digital certificate is invalid, the front-end server triggers the PKI server to update the invalid digital certificate to obtain a valid digital certificate for the ECU terminal. The PKI server completes the certificate production and returns the new valid digital certificate result to the front-end server.

[0133] S6. The front-end server receives the digital certificate generation or update result.

[0134] In this embodiment, the front-end server receives and records the certificate generation or update result returned by the PKI server, that is, receives and records the new valid digital certificate sent by the PKI server, and feeds back the new valid digital certificate to the ECU terminal.

[0135] S7. The ECU terminal obtains the signature verification result.

[0136] In this embodiment, the ECU terminal calls the security module through the SDK interface to complete the verification of the new digital certificate and execute the certificate storage.

[0137] Specifically, when a PKI server generates a new digital certificate, it will carry the signature information of the PKI server. For example, if the PKI server's private key is used to sign the digital certificate content to obtain the signature information, the new valid digital certificate will carry the signature information. The ECU terminal uses the PKI server's public key through the local security module to verify the valid digital certificate carrying the PKI server's private key signature information, and obtains the verification result of whether the verification is successful.

[0138] S8. The ECU terminal determines whether the application for the digital certificate is successful.

[0139] In this embodiment, the security module returns the verification result to the ECU terminal through the SDK interface, and the ECU terminal receives and stores the verification result returned by the security module. According to the verification result, it is determined whether the valid digital certificate of the ECU terminal is successfully applied for. If the verification is successful, it can be determined that the valid digital certificate of the ECU terminal is successfully applied for, and the ECU terminal uploads the ECU terminal identification number, vehicle identification number and valid digital certificate identification to the cloud platform for storage and management; if the verification fails, it can be determined that the valid digital certificate of the ECU terminal is not successfully applied for, and the application process of the vehicle ECU digital certificate is repeated. If the verification result is still a failure after three repetitions, the application process of the ECU digital certificate is stopped, and the operator checks the error log and troubleshoots the problem according to the cause of the error.

[0140] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0141] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A vehicle ECU digital certificate application method, characterized in that: Applied to an ECU terminal, the method comprises: Based on the certificate application trigger instruction sent by the trigger device, query whether there is a valid digital certificate of the ECU terminal in the local security module; the certificate application trigger instruction carries the private key signature of the trigger device; If the valid digital certificate does not exist in the security module, generating certificate application information based on the certificate application trigger instruction and the built-in information of the ECU terminal, and calling the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; Sending the encrypted certificate application message to the front-end server, so that the front-end server triggers the PKI server to generate a valid digital certificate based on the decrypted certificate application message; the valid digital certificate carries the private key signature of the PKI server; After receiving the valid digital certificate sent by the front-end server, the security module is called to verify the valid digital certificate to obtain a verification result, and based on the verification result, it is determined whether the application for the valid digital certificate of the ECU terminal is successful.

2. The method according to claim 1, characterized in that The valid digital certificate does not exist in the security module, including: The digital certificate of the ECU terminal does not exist in the security module; Alternatively, the digital certificate of the ECU terminal in which the security module exists has expired.

3. The method according to claim 1, characterized in that The generating of certificate application information based on the certificate application trigger instruction and the ECU terminal built-in information includes: Acquire the built-in information of the ECU terminal, wherein the built-in information of the ECU terminal includes: the ECU terminal identification number and the vehicle identification number; Determining the identity information of the triggering device and the requested certificate identifier based on the certificate application triggering instruction; Generate certificate application information according to the ECU terminal identification number, the vehicle identification number, the identity information of the triggering device and the certificate identification.

4. The method according to claim 1 or 3, characterized in that: The calling of the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction includes: Call the local security module through the SDK interface; The security module encapsulates the certificate application information and the certificate application trigger instruction based on the network protocol to obtain a certificate application message, and uses a shared key to encrypt the certificate application message to generate an encrypted certificate application message; wherein the shared key is obtained based on identity authentication and negotiation between the security module and the front-end server.

5. The method according to claim 1, characterized in that Calling the security module to verify the signature of the valid digital certificate includes: Call the local security module through the SDK interface; Verifying the private key signature of the PKI server carried in the valid digital certificate based on the public key of the built-in PKI server by the security module; The valid digital certificate that has been successfully verified is stored through the security module, and the identifier of the valid digital certificate is fed back to the ECU terminal.

6. The method according to claim 3, characterized in that After determining whether the valid digital certificate of the ECU terminal is successfully applied for based on the signature verification result, the method further includes: If it is determined based on the signature verification result that the application for the valid digital certificate of the ECU terminal is successful, the ECU terminal identification number, the vehicle identification number and the identification of the valid digital certificate are uploaded to the cloud platform for storage and management by the cloud platform.

7. A vehicle ECU digital certificate application method, characterized in that: Applied to a front-end server, the method includes: Receive the encrypted certificate application message sent by the ECU terminal; The encrypted certificate application message is decrypted using a shared key to obtain certificate application information and a certificate application trigger instruction; the shared key is obtained by identity authentication and negotiation between the security module of the ECU terminal and the front-end server, and the certificate application trigger instruction carries a private key signature of a triggering device; Verify the signature of the certificate application trigger instruction; if the signature verification is successful, request the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction; Sending the valid digital certificate returned by the PKI server to the ECU terminal; The encrypted certificate application message is generated by the ECU terminal in the following manner: The ECU terminal queries whether there is a valid digital certificate of the ECU terminal in the local security module based on the certificate application trigger instruction sent by the trigger device; the certificate application trigger instruction carries the private key signature of the trigger device; if the valid digital certificate does not exist in the security module, certificate application information is generated based on the certificate application trigger instruction and the built-in information of the ECU terminal, and the security module is called to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction.

8. The method according to claim 7, characterized in that The verifying the signature of the certificate application trigger instruction includes: Acquire the public key of the triggering device based on the identity information of the triggering device included in the certificate application triggering instruction; The public key is used to verify the private key signature of the trigger device carried by the certificate application trigger instruction.

9. The method according to claim 7, characterized in that: The requesting a PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction includes: Generate a certificate query request based on the requested certificate identifier contained in the certificate application trigger instruction; Based on the certificate query request, query whether there is a valid digital certificate corresponding to the certificate identifier requested by the ECU terminal in the PKI server; If the digital certificate corresponding to the requested certificate identifier does not exist in the PKI server, triggering the PKI server to generate a valid digital certificate for the ECU terminal; If the PKI server has a digital certificate corresponding to the requested certificate identifier but the digital certificate is invalid, the PKI server is triggered to update the invalid digital certificate in the PKI server to obtain a valid digital certificate for the ECU terminal.

10. A vehicle ECU digital certificate application system, characterized in that: include: Trigger device, ECU terminal, front-end server and PKI server; The trigger device is used to send a certificate application trigger instruction to the ECU terminal; The ECU terminal is used to query whether there is a valid digital certificate of the ECU terminal in the local security module based on the certificate application trigger instruction sent by the trigger device; the certificate application trigger instruction carries the private key signature of the trigger device; If the valid digital certificate does not exist in the security module, generate certificate application information based on the certificate application trigger instruction and the built-in information of the ECU terminal, call the security module to generate an encrypted certificate application message based on the certificate application information and the certificate application trigger instruction; send the encrypted certificate application message to the front-end server; The front-end server is used to receive the encrypted certificate application message sent by the ECU terminal; Decrypting the encrypted certificate application message using a shared key to obtain certificate application information and a certificate application trigger instruction; Verify the signature of the certificate application trigger instruction. If the signature verification is successful, request the PKI server to generate a valid digital certificate for the ECU terminal based on the certificate application trigger instruction; send the valid digital certificate returned by the PKI server to the ECU terminal; The ECU terminal is also used to call the security module to verify the valid digital certificate to obtain a verification result after receiving the valid digital certificate sent by the front-end server, and determine whether the application for the valid digital certificate of the ECU terminal is successful based on the verification result.

11. The system according to claim 10, characterized in that The system further comprises: The cloud platform is used to store and manage the ECU terminal identification number, vehicle identification number and valid digital certificate identification sent by the ECU terminal.