Communication certificate secure canning method, device and equipment of vehicle-mounted terminal and medium
By working together with the production line module, body bus, key generation module, and vehicle factory encryption module, vehicle terminal communication certificates are generated and packaged, solving the problem of lack of certificate verification for vehicle terminal communication and achieving security and data protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-17
AI Technical Summary
Existing in-vehicle terminals lack certificate verification when communicating with vehicle manufacturers' servers, leading to security risks and uncontrollable factors. Some vehicle manufacturers have implemented their own certificate loading, resulting in insufficient security.
Through the collaborative work of the production line module, body bus, key generation module and vehicle factory encryption module, an asymmetric key pair is generated and a signature request is made. The vehicle terminal identifier is bound to generate a communication certificate, and the processing result is fed back through the body bus to achieve secure packaging of the communication certificate.
It enables the autonomous generation and packaging of vehicle terminal communication certificates, ensuring vehicle manufacturers' control over security, protecting core functions from leakage, and guaranteeing data security.
Smart Images

Figure CN121690715A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle networking technology, and more specifically, to a method, apparatus, equipment, and medium for securely packaging communication certificates for vehicle-mounted terminals. Background Technology
[0002] As cars become more and more functional, the applications on in-vehicle systems are also becoming increasingly diverse. Car manufacturers are also capable of building their own servers to provide unique services for in-vehicle terminals or to collect diagnostic information from the vehicle to better understand the vehicle's operating status and potential risks, making the car safer for customers. The communication security certificate of the in-vehicle terminal provides data security for communication between the two ends and is an important manifestation of information security.
[0003] Most existing applications in in-vehicle terminals do not use certificates for secure communication with the vehicle manufacturer's server, and the vehicle manufacturer's server does not use a unified verification method to enforce verification of the communication between the in-vehicle terminals. Some vehicle manufacturers provide solutions for in-vehicle terminal development teams to implement certificate loading and communication themselves, but the lack of control and security checks by the vehicle manufacturers, as well as the lack of review of software code, and the fact that they only verify functionality, introduces a large number of security risks and uncontrollable factors. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, apparatus, equipment and medium for securely packaging communication certificates for vehicle-mounted terminals, which effectively solves the problem that the lack of communication certificates between existing vehicle-mounted terminals and vehicle manufacturers leads to a large number of security risks and uncontrollable factors.
[0005] In a first aspect, embodiments of this application provide a method for securely loading communication certificates for an in-vehicle terminal, applied to a secure loading system. The secure loading system includes a production line module, a vehicle bus, a key generation module, and a vehicle manufacturer encryption module. The method includes: The production line module sends a certificate generation instruction to the vehicle terminal. The vehicle terminal's onboard host receives the certificate generation instruction through the vehicle bus and forwards the certificate generation instruction to the key generation module of the vehicle terminal. The key generation module calls the vehicle manufacturer's encryption module, which generates an asymmetric key pair locally on the vehicle terminal, and generates a certificate signing request based on the asymmetric key pair. The vehicle manufacturer's encryption module binds the certificate signing request with the vehicle terminal identifier pre-obtained by the key generation module, so as to generate a communication certificate based on the bound vehicle terminal identifier and the certificate signing request; Based on the communication certificate, the key generation module generates the processing result corresponding to the communication certificate and feeds back the processing result to the production line module through the vehicle bus, so as to complete the secure packaging of the communication certificate for the vehicle terminal based on the communication certificate.
[0006] In conjunction with the first aspect, this application provides a first possible implementation of the first aspect, wherein generating a communication certificate based on the bound vehicle terminal identifier and the certificate signing request includes: Extract key configuration parameters corresponding to various standard key configuration parameters of the standard communication certificate from the vehicle terminal identifier and the certificate signing request; The communication certificate is obtained by digitally signing the key configuration parameters corresponding to the various standard key configuration parameters.
[0007] In conjunction with the first aspect, this application provides a second possible implementation of the first aspect, wherein, after digitally signing the key configuration parameters corresponding to the multiple standard key configuration parameters to obtain the communication certificate, the process includes: Send a certificate import command to the vehicle terminal via the vehicle bus; In response to the certificate import command, the vehicle terminal receives the communication certificate through a pre-installed target hardware device.
[0008] In conjunction with the first aspect, this application provides a third possible implementation of the first aspect, wherein generating a certificate signature request based on the asymmetric key pair includes: After verifying the validity of the asymmetric key pair, the vehicle manufacturer's encryption module extracts the public key from the asymmetric key pair. The public key and pre-generated vehicle terminal identification information are assembled to obtain a structured data block to generate a certificate signing request.
[0009] In conjunction with the first aspect, this application provides a fourth possible implementation of the first aspect, wherein the step of assembling the public key and pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signing request includes: Enter the public key and the vehicle terminal identification information into the certificate signature request template preset by the vehicle manufacturer's encryption module to obtain the initial certificate signature request; The initial certificate signing request is verified from multiple dimensions to obtain the certificate signing request after the verification is successful.
[0010] In conjunction with the first aspect, this application provides a fifth possible implementation of the first aspect, wherein the vehicle-mounted terminal's on-board host receives the certificate generation instruction via the vehicle bus, including: The vehicle bus divides the certificate generation instruction into frames based on predefined framing rules to obtain framing instructions. The framing command is input to the gateway so that the gateway forwards the framing command to the vehicle host.
[0011] In conjunction with the first aspect, this application provides a sixth possible implementation of the first aspect, wherein, before the vehicle bus performs frame segmentation on the certificate generation instruction based on a predefined framing rule to obtain a framing instruction, it includes: The vehicle terminal is pre-sent extended session instructions and secure access instructions sequentially to control the vehicle terminal to enter extended session mode and secure access mode; The vehicle terminal is queried based on the certificate query command to trigger the communication certificate loading of the vehicle terminal.
[0012] Secondly, embodiments of this application provide a secure canning device for a vehicle-mounted terminal's communication certificate, applied to a secure canning system. The secure canning system includes a production line module, a vehicle bus, a key generation module, and a vehicle manufacturer encryption module. The device includes: The receiving module is used to send a certificate generation instruction from the production line module to the vehicle terminal. The vehicle host of the vehicle terminal receives the certificate generation instruction through the vehicle bus and forwards the certificate generation instruction to the key generation module of the vehicle terminal. The calling module is used by the key generation module to call the vehicle manufacturer's encryption module, generate an asymmetric key pair locally on the vehicle terminal through the vehicle manufacturer's encryption module, and generate a certificate signing request based on the asymmetric key pair; A binding module is used to bind the certificate signing request and the vehicle terminal identifier pre-obtained by the key generation module to the vehicle manufacturer's encryption module, so as to generate a communication certificate based on the bound vehicle terminal identifier and the certificate signing request; The canning module is used to generate a processing result corresponding to the communication certificate based on the communication certificate, and to feed back the processing result to the production line module through the vehicle bus, so as to complete the secure canning of the communication certificate for the vehicle terminal based on the communication certificate.
[0013] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of any one of the communication certificate security filling methods for a vehicle-mounted terminal are performed.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of any one of the methods for securely packaging a communication certificate for an in-vehicle terminal.
[0015] This application provides a method for securely loading communication certificates for vehicle-mounted terminals, applied to a secure loading system. The secure loading system includes a production line module, a vehicle bus, a key generation module, and a vehicle manufacturer encryption module. The method first sends a certificate generation command to the vehicle-mounted terminal via the production line module. The vehicle-mounted terminal's host receives the certificate generation command via the vehicle bus and forwards it to the key generation module. Next, the key generation module calls the vehicle manufacturer encryption module to generate an asymmetric key pair locally on the vehicle-mounted terminal and generates a certificate signature request based on the asymmetric key pair. Then, the vehicle manufacturer encryption module binds the certificate signature request with a pre-obtained vehicle-mounted terminal identifier from the key generation module to generate a communication certificate based on the bound vehicle-mounted terminal identifier and the certificate signature request. Finally, based on the communication certificate, the key generation module generates a processing result corresponding to the communication certificate and feeds back the processing result to the production line module via the vehicle bus, thus completing the secure loading of the communication certificate for the vehicle-mounted terminal. Based on the above methods, communication certificates can be generated and packaged independently by the car manufacturer after the vehicle terminal is taken off the production line. Through the collaboration between the terminal supplier and the car manufacturer, a closed loop is achieved where the car manufacturer controls security and the vehicle terminal is implemented. This provides a secure design scheme for certificate packaging, protecting the car manufacturer's core functions from leakage and ensuring the data security of multiple applications on the vehicle terminal. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a method for securely packaging a communication certificate for a vehicle-mounted terminal according to an embodiment of this application is shown. Figure 2 This paper illustrates another flowchart of a method for securely packaging a communication certificate for a vehicle-mounted terminal according to an embodiment of this application. Figure 3 A schematic diagram illustrating the process of obtaining a communication certificate provided in an embodiment of this application is shown; Figure 4This illustration shows a structural block diagram of a communication certificate safe filling device for a vehicle-mounted terminal according to an embodiment of this application; Figure 5 A structural block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0019] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0021] Most existing applications in in-vehicle terminals do not use certificates for secure communication with the vehicle manufacturer's server, and the vehicle manufacturer's server does not employ a unified verification method to enforce verification of communication between the in-vehicle terminals. Some vehicle manufacturers offer solutions that allow in-vehicle terminal development teams to implement certificate loading and communication themselves, which introduces numerous security risks and uncontrollable factors, affecting the data security of applications within the in-vehicle terminals.
[0022] Based on this, embodiments of this application provide a method, apparatus, device, and medium for securely filling communication certificates for vehicle-mounted terminals, which are described below through embodiments.
[0023] Example 1 To facilitate understanding of this embodiment, a method for securely packaging a communication certificate for a vehicle-mounted terminal, as disclosed in this application embodiment, will first be described in detail. For example... Figure 1 The flowchart shown is a method for securely packaging a communication certificate for an on-board terminal. Figure 2 The diagram shows another flowchart of a secure certificate loading method for a vehicle-mounted terminal. This application provides a secure certificate loading method for a vehicle-mounted terminal, applied to a secure loading system. The secure loading system includes a production line module, a vehicle bus, a key generation module, and a vehicle manufacturer encryption module. The method includes: S101. The production line module sends a certificate generation instruction to the vehicle terminal. The vehicle host of the vehicle terminal receives the certificate generation instruction through the vehicle bus and forwards the certificate generation instruction to the key generation module of the vehicle terminal. S102. The key generation module calls the vehicle manufacturer's encryption module to generate an asymmetric key pair locally on the vehicle terminal through the vehicle manufacturer's encryption module, and generates a certificate signing request based on the asymmetric key pair. S103, The vehicle manufacturer encryption module binds the certificate signing request with the vehicle terminal identifier pre-obtained by the key generation module to generate a communication certificate based on the bound vehicle terminal identifier and the certificate signing request; S104. Based on the communication certificate, the key generation module generates the processing result corresponding to the communication certificate and feeds back the processing result to the production line module through the vehicle bus, so as to complete the secure packaging of the communication certificate for the vehicle terminal based on the communication certificate.
[0024] The safe filling system provided in this application includes not only a production line module, a vehicle bus, a key generation module, and a vehicle factory encryption module, but also a data storage module for storing the communication certificate.
[0025] In step S101, each vehicle terminal manufacturer has a production line automation program. Its purpose is to use an automated program to initialize or write important information when the vehicle terminal is ready to leave the factory. This is typically a C++ program running on a dedicated device, executed by production line employees upon delivery. At the beginning of the project, project managers determine which functions need to be included in the production line automation program. This application uses a production line module to represent the production line automation program. The production line module is defined according to the UDS diagnostic communication protocol, a standard automotive industry diagnostic protocol used for vehicle diagnostics. The host computer performs diagnostics. When the vehicle terminal rolls off the production line, it uses LabVIEW on the host computer and CAN communication with the host computer. The certificate canister is selected through the interface, and a certificate generation command is sent to the vehicle terminal in advance. The vehicle host computer of the vehicle terminal receives the certificate generation command through the vehicle bus and forwards the certificate generation command to the key generation module of the vehicle terminal. The vehicle bus is an important program for communication between the vehicle body and the host computer. It includes the CAN bus and the gateway and is responsible for handling important functions such as diagnostics, upgrades and communication with the vehicle host computer. It is an important bridge for data interaction between the vehicle body and the vehicle host computer.
[0026] The key generation module is the key generation program used to integrate the vehicle manufacturer's secure encrypted communication program. The secure encrypted communication program provided by the vehicle manufacturer requires external integration to be used. This module integrates the program according to the different encoding programs provided by the vehicle manufacturer to ensure that the secure encrypted communication program can run normally and to perform corresponding processing according to business requirements.
[0027] In a specific implementation of step S101, one embodiment is as follows: the vehicle-mounted host of the vehicle terminal receives the certificate generation instruction through the vehicle bus, including: S1011, The vehicle bus divides the certificate generation instruction into frames based on a predefined framing rule to obtain a framing instruction; S1012. Input the framing instruction to the gateway so that the gateway forwards the framing instruction to the vehicle host.
[0028] In steps S1011-S1012, the vehicle bus is a program used to receive and send data messages to the bus, and an intermediate program used to communicate with the CAN bus. This program can handle the standard CAN protocol. CAN protocol is short for Controller Area Network, which is the standard protocol for ECU communication in the automotive industry. The vehicle bus segments the certificate generation command based on a predefined framing rule to obtain a framing command. The predefined framing rule is specifically: service type + total packet size index + current packet index + 31 01 20 05. The certificate generation command is then segmented according to this framing rule to obtain a framing command. There are multiple framing commands. Similarly, the application on the vehicle terminal also groups packets in this way to obtain a complete message. The framing command is input to the gateway so that the gateway forwards the framing command to the vehicle host. The vehicle host reports the framing command to the key production module. The vehicle bus also receives the processing result of the key generation program, frames it, and feeds it back to the production line module.
[0029] In a specific implementation of step S101, one embodiment is as follows: before the vehicle bus performs frame segmentation on the certificate generation instruction based on predefined framing rules to obtain the framed instruction, the following steps are included: S10111. Send extended session instructions and secure access instructions to the vehicle terminal in advance to control the vehicle terminal to enter extended session mode and secure access mode. S10112. Query the vehicle terminal based on the certificate query command to trigger the communication certificate loading of the vehicle terminal.
[0030] In steps S10111-S10112, the production line module sequentially sends extended session instructions and secure access instructions to the vehicle host on the vehicle terminal. The extended session instructions are 7C1 10 03, and the secure access instructions are 7C127 01 / 7C1 27 02, to control the vehicle terminal to enter extended session mode and secure access mode, respectively. Here, 7C1 represents the vehicle host ID, 10 03 is the vehicle standard diagnostic protocol, and 27 01 and 27 02 are UDS secure access instructions, thus creating a preparation environment for the vehicle terminal. Then, a certificate query instruction 7C1 22 20 09 is sent to the vehicle terminal. First, based on 7C110 03, the vehicle bus sends data to the vehicle host on the vehicle terminal, causing the vehicle host to enter extended session mode. Then, 7C1 27 01 and 7C1 27 02 are sent. Upon receiving this instruction from the vehicle host, secure access is granted. Then, a certificate query instruction is sent to check whether the communication certificate of the vehicle terminal has been generated or expired. If there is no valid communication certificate on the vehicle host, the communication certificate on the vehicle terminal is diagnosed, and the overall process of refilling the communication certificate of the vehicle terminal is triggered.
[0031] In step S102, after the overall process of communication certificate filling is triggered, the production line module sends a certificate generation command 7C1 31 01 20 to the key generation module. 05. Upon receiving the certificate generation instruction, the vehicle manufacturer's encryption module is invoked. This module is an external program and the core module of the entire certificate assembly process. It is an important program installed by the vehicle manufacturer on the in-vehicle terminal for functions such as certificate generation, certificate import, initialization, and certificate status query. This program cannot be rewritten or modified by external parties; it is a secure black box, completely controlled by the vehicle manufacturer. It is also the interface program provided by the vehicle manufacturer to the in-vehicle terminal supplier, typically in the form of an SO library. Within this SO library, the vehicle manufacturer generates important security encryption programs. The vehicle manufacturer's encryption module generates the P10 interface for applying for the certificate. An asymmetric key pair is generated locally on the in-vehicle terminal through the vehicle manufacturer's encryption module. This is generally generated after processing the in-vehicle terminal identifier SN using RSA and ECC algorithms. The generated asymmetric key pair includes a private key and a public key. The private key needs to be temporarily stored in a secure memory area (to avoid leakage), and the public key is used for subsequent assembly requests and to generate certificate signature requests based on the asymmetric key pair.
[0032] In a specific implementation of step S102, one embodiment is as follows: generating a certificate signature request based on the asymmetric key pair includes: S1021. After verifying the validity of the asymmetric key pair, the vehicle manufacturer's encryption module extracts the public key from the asymmetric key pair. S1022. Assemble the public key and the pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signing request.
[0033] In steps S1021-S1022, the vehicle manufacturer's encryption module verifies the legitimacy of the asymmetric key pair from two aspects: key integrity and key security. Key integrity checks confirm that both the private and public keys have been generated and are not corrupted, and that the private key format conforms to algorithm specifications (e.g., RSA private keys contain key parameters such as the public key exponent and modulus, and ECC private keys contain curve parameters and private key values). Key security checks verify whether the private key is stored in secure memory to confirm it has not been exposed in plaintext. Public key parameters conform to the vehicle manufacturer's preset standards, such as RSA key length ≥ 2048 bits and ECC curves using compliant curves like secp256r1. If the verification result is valid, the public key in the asymmetric key pair is extracted and processed according to X.509... The standard (general standard related to certificates) assembles the public key and pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signing request. The identity description of the vehicle terminal identification information communication certificate application is a self-introduction written by the vehicle terminal to the car manufacturer. It is structured information assembled at the software level to explain who the vehicle terminal is, which organization it belongs to, and what scenario it is used in. The vehicle terminal identification information is structured according to the car manufacturer's preset rules. The core fields include (but are not limited to): country / region (C), car manufacturer name (O), vehicle terminal business unit (OU), terminal model (CN), terminal SN associated field (optional, used to strengthen identity binding). The field content must be consistent with the actual attributes of the terminal.
[0034] The vehicle manufacturer's encryption module also needs to digitally sign the aforementioned data block using a locally generated private key (to prove ownership of the public key and that the data has not been tampered with). The certificate signing request, as required by the vehicle manufacturer, converts the signed request data into a JSON format P10 file, which awaits the vehicle manufacturer's review.
[0035] In a specific implementation of step S1022, one embodiment is as follows: assembling the public key and pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signing request includes; S10221. Fill in the public key and the vehicle terminal identification information into the certificate signature request template preset by the vehicle manufacturer's encryption module to obtain the initial certificate signature request; S10222. Perform multi-dimensional verification of the initial certificate signing request to obtain the certificate signing request after the verification is successful.
[0036] In steps S10221-S10222, the public key data of the asymmetric key pair (such as the modulus and exponent of the RSA public key; the curve identifier and coordinates of the ECC public key) is completely filled into the certificate signing request template pre-set by the vehicle manufacturer's encryption module. This ensures that the vehicle manufacturer (CA role) can subsequently issue certificates using the public key. The structured vehicle terminal identification information is filled in according to the field order in the certificate signing request template pre-set by the vehicle manufacturer's encryption module. The certificate signing request template can also add extended information according to the vehicle manufacturer's needs, such as the certificate purpose (only for communication between the vehicle manufacturer's server and the vehicle terminal), key usage (digital signature, data encryption), etc., to further clarify the certificate usage scenario and obtain the initial certificate signing request. The initial certificate signing request is then verified from multiple dimensions according to the completeness of the fields and the validity of the format. If the verification passes, the certificate signing request is obtained. If there are missing fields or format errors, the process is terminated and a data assembly failure is reported to the key generation module.
[0037] In step S103, the key generation module obtains the vehicle terminal identifier in advance through the header file (.h) provided by the vehicle manufacturer. The vehicle terminal identifier is a unique hardware identifier, represented by a serial number (SN). Each terminal is unique. The SN is generated according to a rule after the vehicle leaves the factory, specifically consisting of the vehicle model code, manufacturing date, batch number, and random code. Once written to the vehicle terminal, the SN cannot be modified or erased; it can only be queried and read. The SN serves as a unique ID to distinguish the corresponding key relationships. Certificate keys from different vehicles cannot be used interchangeably. It is used by the vehicle terminal to pass legality verification and apply for a communication certificate. After the vehicle manufacturer receives the P10 file (certificate signing request, JSON format) transmitted by the vehicle terminal through a dedicated device, the vehicle manufacturer's encryption module binds the certificate signing request with the vehicle terminal identifier obtained in advance by the key generation module. The terminal identifier is obtained by extracting the terminal identification information (DN) field from the certificate signing request and associating it with the terminal SN (or by synchronously obtaining the terminal SN through a dedicated device). A unique mapping relationship is established between the SN and P10 files to form a binding record of terminal identity and certificate application, avoiding mismatch or duplicate applications between SN and P10. Based on the bound vehicle terminal identifier and the certificate signing request, the vehicle manufacturer, as the Certificate Authority (CA), generates a communication certificate according to standard specifications and the vehicle manufacturer's security rules. The generated communication certificate is permanently associated with the vehicle terminal identifier (SN), including information such as SN, certificate number, certificate validity period, issuance date, and terminal model. This is used for subsequent certificate traceability and revocation management. For example, when the vehicle terminal is scrapped, the corresponding certificate can be cancelled, and the key generation module is notified that the communication certificate has been successfully issued.
[0038] In the specific implementation of step S103, one embodiment is as follows: Figure 3As shown, the step of generating a communication certificate based on the bound vehicle terminal identifier and the certificate signing request includes: S1031. Extract key configuration parameters corresponding to various standard key configuration parameters of the standard communication certificate from the vehicle terminal identifier and the certificate signing request; S1032. Digitally sign the key configuration parameters corresponding to the multiple standard key configuration parameters to obtain the communication certificate.
[0039] In steps S1031-S1032, the vehicle manufacturer's encryption module, based on the certificate signing request and internal security policy corresponding to the P10 file information, clarifies the key configuration parameters of the communication certificate. These key configuration parameters correspond to various standard key configuration parameters of the standard communication certificate pre-stored in the vehicle manufacturer's encryption module, including basic information, key association, security parameters, and certificate standards. The basic information includes country, organization name, terminal model, and serial number (SN). The key association specifically uses the public key in the certificate signing request as the public key of the certificate, ensuring that the vehicle terminal can subsequently decrypt the communication certificate using the corresponding private key. Security parameters include setting the certificate validity period (e.g., 3 years), certificate purpose (only for bidirectional communication encryption / verification between the vehicle manufacturer's server and the vehicle terminal), and key usage (digital signature, data encryption). The certificate standard follows X.509 v3. The standard (a common standard for automotive industry certificates) ensures certificate compatibility and compliance. It extracts key configuration parameters corresponding to various standard key configuration parameters of the standard communication certificate from the vehicle terminal identifier and the certificate signature request. The vehicle manufacturer's encryption module also uses the vehicle manufacturer's proprietary CA private key (held only by the vehicle manufacturer and highly confidential) to digitally sign the core configuration parameters of the certificate. Specifically, it calculates a data digest for the key configuration parameters using a pre-agreed hash algorithm (such as SHA-256), encrypts the digest using the CA private key, and generates a certificate signature (proving that the certificate was legally issued by the vehicle manufacturer). The certificate configuration parameters and the CA digital signature are integrated to form a complete communication certificate. The certificate format uses PEM or DER (a format compatible with and parseable by the vehicle terminal), thus obtaining the communication certificate.
[0040] In a specific implementation of step S1032, one embodiment is as follows: after digitally signing the key configuration parameters corresponding to the multiple standard key configuration parameters to obtain the communication certificate, the process includes: S10321. Send a certificate import command to the vehicle terminal via the vehicle bus; S10322. In response to the certificate import instruction, the vehicle terminal receives the communication certificate through the pre-installed target hardware device.
[0041] In steps S10321-S10322, the production line module sends a certificate import command to the vehicle terminal via the vehicle bus, specifically 7C1 31 01 20 06. In response to the certificate import command, the vehicle terminal receives the communication certificate through a pre-installed target hardware device. This target hardware device only receives communication certificates transmitted by the vehicle manufacturer; external devices cannot access it, ensuring the certificate's legitimacy. It verifies whether the signature of the communication certificate is legally issued by the vehicle manufacturer and whether the communication certificate matches the current terminal's serial number. After successful verification, the data storage module is triggered to store the communication certificate in a secure storage chip conforming to the FIPS140-2 / 3 standard. This data storage module securely stores the generated communication certificate, preventing tampering or damage by external programs, ensuring the security of the stored communication certificate, and allowing for repeated use, achieving the effect of unlimited use after a single batch. The generated communication certificates are stored using a secure storage chip. The secure chip is a solution agreed upon by the vehicle manufacturer and the chip manufacturer. The chip provides a series of encryption and usage procedures. The main security standard used is FIPS 140-2 / 3, which cannot be used by external applications, thus achieving the purpose of secure data storage.
[0042] In step S104, the key generation module generates a processing result after the communication certificate generation or any intermediate step fails. The processing result includes successful query - existing certificate, successful communication certificate generation, and communication certificate import failure - SN mismatch. The processing result corresponding to the communication certificate is fed back to the production line module through the vehicle bus. The specific rule is: according to the framing specification of the vehicle bus program (service type + total package size index + current package index + result data), the result is framed to ensure transmission integrity. The framed result is fed back to the vehicle bus program, and then forwarded to the production line module by the vehicle bus program. Finally, the production line personnel are informed of the operation status, completing the instruction-processing-feedback closed loop and completing the secure packaging of the communication certificate for the vehicle terminal. The key generation module is the central hub of business processing. It does not directly implement core security functions such as encryption and storage. Instead, it connects the production line module, the vehicle manufacturer's encryption module, and the data storage module through a process of parsing instructions, verifying legality, calling the vehicle manufacturer's encryption module, and providing feedback results. At the same time, it ensures the vehicle manufacturer's independent control over core security (the encryption logic and certificate issuance rights are controlled by the vehicle manufacturer), and the terminal only performs compliant operations to avoid security risks.
[0043] Example 2 This application also provides a secure canning device for communication certificates of vehicle-mounted terminals, such as... Figure 4The diagram shows a block diagram of a secure communication certificate loading device for an in-vehicle terminal. This device performs functions corresponding to the steps of executing a secure communication certificate loading method for an in-vehicle terminal on a terminal device, as described above. The device can be understood as a server component including a processor. This in-vehicle terminal secure communication certificate loading device is applied to a secure loading system, which includes a production line module, a vehicle bus, a key generation module, and a vehicle factory encryption module. The device includes: The receiving module 401 is used to send a certificate generation instruction from the production line module to the vehicle terminal. The vehicle host of the vehicle terminal receives the certificate generation instruction through the vehicle bus and forwards the certificate generation instruction to the key generation module of the vehicle terminal. The calling module 402 is used by the key generation module to call the vehicle manufacturer's encryption module, generate an asymmetric key pair locally on the vehicle terminal through the vehicle manufacturer's encryption module, and generate a certificate signing request based on the asymmetric key pair; The binding module 403 is used to bind the certificate signing request and the vehicle terminal identifier pre-obtained by the key generation module to the vehicle factory encryption module, so as to generate a communication certificate based on the bound vehicle terminal identifier and the certificate signing request; The canning module 404 is used to generate a processing result corresponding to the communication certificate based on the communication certificate, and to feed back the processing result to the production line module through the vehicle bus, so as to complete the secure canning of the communication certificate for the vehicle terminal based on the communication certificate.
[0044] In one feasible implementation, the binding module includes: The extraction module is used to extract key configuration parameters corresponding to various standard key configuration parameters of the standard communication certificate from the vehicle terminal identifier and the certificate signing request; The signature module is used to digitally sign the key configuration parameters corresponding to the various standard key configuration parameters to obtain the communication certificate.
[0045] In one feasible implementation, the binding module further includes: The sending module is used to send a certificate import command to the vehicle terminal via the vehicle bus; A response module is used to respond to the certificate import command, wherein the vehicle terminal receives the communication certificate through a pre-installed target hardware device.
[0046] In one feasible implementation, the calling module includes: The first verification module is used to extract the public key from the asymmetric key pair after the vehicle manufacturer's encryption module verifies the validity of the asymmetric key pair. An assembly module is used to assemble the public key and pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signing request.
[0047] In one feasible implementation, the calling module further includes: The input module is used to input the public key and the vehicle terminal identification information into the certificate signature request template preset by the vehicle manufacturer's encryption module to obtain the initial certificate signature request; The second verification module is used to verify the initial certificate signing request from multiple dimensions, so as to obtain the certificate signing request after the verification is passed.
[0048] In one possible implementation, the receiving module includes: The framing module is used to framing the certificate generation instruction based on predefined framing rules to obtain the framing instruction from the vehicle bus. An input module is used to input the framing instruction to the gateway, so that the gateway forwards the framing instruction to the vehicle host.
[0049] In one feasible implementation, the receiving module further includes: The delivery module is used to pre-deliver extended session instructions and secure access instructions to the vehicle terminal in sequence to control the vehicle terminal to enter extended session mode and secure access mode. The query module is used to query the vehicle terminal based on the certificate query command, so as to trigger the communication certificate loading of the vehicle terminal.
[0050] Example 3 This application also provides an electronic device, such as Figure 5 As shown, it includes: a processor 501, a memory 502, and a bus 503. The memory 502 stores machine-readable instructions that can be executed by the processor 501. When the electronic device is running, the processor 501 and the memory 502 communicate through the bus 503. When the machine-readable instructions are executed by the processor 501, the steps of any one of the communication certificate security filling methods of a vehicle terminal are performed.
[0051] Example 4 This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of any of the methods for securely packaging communication certificates for an in-vehicle terminal.
[0052] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0053] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0054] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0055] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0056] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for securely packaging communication certificates for a vehicle-mounted terminal, characterized in that, The method is applied to a secure canning system, and the secure canning system comprises a production line module, a vehicle body bus, a key generation module and a vehicle factory encryption module, and the method comprises the following steps: The production line module sends a certificate generation instruction to a vehicle terminal, a vehicle host of the vehicle terminal receives the certificate generation instruction through the vehicle body bus, and forwards the certificate generation instruction to a key generation module of the vehicle terminal; The key generation module calls the vehicle factory encryption module, generates an asymmetric key pair locally in the vehicle terminal through the vehicle factory encryption module, and generates a certificate signature request based on the asymmetric key pair; The vehicle factory encryption module binds the certificate signature request and a vehicle terminal identifier previously obtained by the key generation module, generates a communication certificate based on the bound vehicle terminal identifier and the certificate signature request; Based on the communication certificate, the key generation module generates a processing result corresponding to the communication certificate, and feeds back the processing result to the production line module through the vehicle body bus, so as to complete the secure canning of the communication certificate for the vehicle terminal based on the communication certificate.
2. The method of claim 1, wherein, The generation of the communication certificate based on the bound vehicle terminal identifier and the certificate signature request comprises the following steps: Extracting key configuration parameters corresponding to a plurality of standard key configuration parameters of the standard communication certificate from the vehicle terminal identifier and the certificate signature request; Digitally signing the key configuration parameters corresponding to the plurality of standard key configuration parameters to obtain the communication certificate.
3. The method of claim 2, wherein, After the digital signing of the key configuration parameters corresponding to the plurality of standard key configuration parameters to obtain the communication certificate, the following steps are included: Sending a certificate import instruction to the vehicle terminal through the vehicle body bus; In response to the certificate import instruction, the vehicle terminal receives the communication certificate through a target hardware device previously installed.
4. The method of claim 1, wherein, The generation of the certificate signature request based on the asymmetric key pair comprises the following steps: After the vehicle factory encryption module verifies that the asymmetric key pair is legal, the public key in the asymmetric key pair is extracted; Assembling the public key and pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signature request.
5. The method of claim 4, wherein, The assembling of the public key and pre-generated vehicle terminal identification information to obtain a structured data block to generate a certificate signature request comprises the following steps: Filling the public key and the vehicle terminal identification information into a certificate signature request template pre-stored in the vehicle factory encryption module to obtain an initial certificate signature request; Multi-dimensionally verifying the initial certificate signature request to obtain the certificate signature request after the verification is passed.
6. The method of claim 1, wherein, The reception of the certificate generation instruction by the vehicle host of the vehicle terminal through the vehicle body bus comprises the following steps: The vehicle body bus frames the certificate generation instruction based on a pre-defined framing rule to obtain a framing instruction; Inputting the framing instruction into a gateway to make the gateway forward the framing instruction to the vehicle host.
7. The method of claim 1, wherein, Before the framing of the certificate generation instruction by the vehicle body bus based on the pre-defined framing rule to obtain a framing instruction, the following steps are included: Pre-installing an extended session instruction and a secure access instruction to the vehicle terminal in sequence to control the vehicle terminal to enter an extended session mode and a secure access mode; Inquire the vehicle terminal based on the certificate inquiry instruction to trigger the communication certificate filling of the vehicle terminal.
8. A secure canning device for communication certificates of a vehicle-mounted terminal, characterized in that, The device is applied to a secure filling system, and the secure filling system comprises a production line module, a vehicle body bus, a key generation module and a vehicle factory encryption module. The receiving module is configured to send a certificate generation instruction from the production line module to the vehicle terminal, and the vehicle host of the vehicle terminal receives the certificate generation instruction through the vehicle body bus and forwards the certificate generation instruction to the key generation module of the vehicle terminal. The calling module is configured to call the vehicle factory encryption module by the key generation module, generate an asymmetric key pair locally in the vehicle terminal through the vehicle factory encryption module, and generate a certificate signature request based on the asymmetric key pair. The binding module is configured to bind the certificate signature request and the vehicle terminal identifier pre-acquired by the key generation module by the vehicle factory encryption module, and generate a communication certificate based on the bound vehicle terminal identifier and the certificate signature request. The filling module is configured to generate a processing result corresponding to the communication certificate by the key generation module based on the communication certificate, and feed back the processing result to the production line module through the vehicle body bus, so as to complete the secure filling of the communication certificate for the vehicle terminal based on the communication certificate.
9. An electronic device, comprising: The device comprises: A processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to execute the steps of the secure filling method of the communication certificate of the vehicle terminal.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the secure filling method of the communication certificate of the vehicle terminal.