Vehicle-mounted certificate local management system and method based on OP-TEE
By adopting OP-TEE's on-board certificate local management system in intelligent connected cars, and using CMS and TEE for authority authentication, encryption and decryption, the problems of revocation, forgery and expiration in certificate management are solved, ensuring the security of certificates and private keys. reliability and reliability, providing flexible and customizable management solutions.
Patent Information
- Application Number
- CN202410236860.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-03-01
AI Technical Summary
The existing technology has problems such as revocation, forgery, and expiration in certificate management in intelligent connected cars, and it is difficult to ensure the safe storage and management of certificates and private keys.
The OP-TEE-based on-vehicle certificate local management system is used to perform authority authentication, certificate verification and encryption and decryption through the local on-board certificate management server CMS and trusted execution environment TEE to ensure the safe import, export and deletion of certificates and private keys. Provides automatic updates and access control.
It realizes the secure storage and management of certificates and private keys, enhances the security and credibility of the vehicle system, and provides flexible and customizable solutions to meet different security and flexibility needs.
Smart Images

Figure CN118018215B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a vehicle-mounted certificate management technology, and in particular to an OP-TEE-based vehicle-mounted certificate local management system and method. Background Art
[0002] With the development of the intelligent connected vehicle industry, the requirements for security and privacy are increasing, and PKI (Public Key Infrastructure) management is an important part of building a secure and reliable intelligent connected vehicle system. By implementing PKI management, vehicles can meet compliance requirements and protect user privacy and vehicle safety.
[0003] PKI management includes: Certificate verification: By verifying the legitimacy of the certificate through PKI, the vehicle side can prevent the use of forged certificates; Certificate revocation and renewal: PKI provides a certificate revocation and renewal mechanism to ensure the validity of the certificate; Authentication: By using digital certificates, the identity of vehicles, equipment and services can be verified, and it can be ensured that only authorized entities can access and interact; Data protection: By using digital certificates for key exchange and generation of communication keys, the confidentiality and integrity of communications can be ensured to prevent data from being stolen or tampered with.
[0004] Through effective PKI management, the intelligent connected vehicle system can establish a secure and trusted communication and interaction environment to ensure identity authentication, data protection and secure transmission between vehicles and related entities. However, if cloud-based PKI management is adopted, there will be network threats and unreliability; if local hardware encryption modules (such as HSM, TPM) are used for management, problems such as certificate forgery, expiration and revocation will occur.
[0005] CN116633565A proposes a method for offline import of certificates into vehicle-mounted terminals based on a local certificate service manager, which solves the network threats and unreliability faced by online applications. CN113014381A proposes that in a specific secure network environment, the certificates / keys stored in the hardware encryption component are backed up to the server, which achieves high availability of vehicle-mounted certificates and solves the problem of key loss. However, none of them solve the common problems of revocation, forgery, expiration, etc. in certificate management. CN113872764A discloses a method for automatic certificate maintenance, which can force updates when the certificate is abnormal, but there is no clear explanation on how to safely store certificates or private keys.
[0006] TEE is an open and portable trusted execution environment based on GP specifications. It can not only realize the secure storage and encryption and decryption functions of HSM, but also has more scalability. TEE can be flexibly integrated into the existing system platform without the need for additional external devices, which can reduce hardware costs. The secure execution environment provided by TEE isolates key applications and data. Even if the host is attacked, the applications and data in TEE are still protected. TEE supports flexible security policies and application extensions, allowing applications to execute customized security policies in a secure environment and implement customized security functions according to specific needs.
[0007] In order to solve the above problems, a secure, flexible and controllable solution is needed to manage vehicle certificates or private keys. Therefore, the present invention proposes a vehicle certificate local management system and method based on OP-TEE. Summary of the invention
[0008] In order to solve the deficiencies in the prior art, the object of the present invention is to provide an OP-TEE-based vehicle-mounted certificate local management system and method to ensure the confidentiality of certificates or private key files.
[0009] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:
[0010] An OP-TEE-based vehicle certificate local management system includes a local vehicle certificate management server CMS and a trusted execution environment TEE. After the local vehicle certificate management server CMS performs authority authentication and certificate verification, it imports a legal and valid certificate or private key, and uses the private key in the trusted execution environment TEE to encrypt and decrypt data.
[0011] CMS permission authentication includes: CMS reads the permission information in TEE; client sends certificate to CMS; after receiving the certificate, CMS verifies the validity of the certificate. If the certificate is valid, it extracts the subject name in the certificate, searches the permission information file for corresponding access rights, and continues the authentication process; CMS sends a challenge message to request the client to prove ownership of its certificate; after receiving the challenge, the client signs the received challenge with its private key, puts it in a response message and sends it to CMS; CMS uses the public key in the client certificate to verify the signature information in the response message, and then replies to the client with the authentication result;
[0012] The operations of importing, exporting, and deleting certificates or private keys include: CMS reads the permission information and certificate chain in TEE; the client initiates identity authentication to CMS, disconnects the link if authentication fails, and executes the client request if authentication succeeds; the client requests the import of a certificate or private key, and after passing the permission authentication, CMS imports the legal certificate or private key, which is imported into TEE after verification; if the certificate and private key are imported at the same time, it is necessary to check whether the certificate and private key match; the client requests the export of a certificate or private key, and after passing the permission authentication and access control check, the encrypted certificate or private key is exported; the client requests the deletion of a certificate or private key, and after passing the permission authentication and access control check, the certificate or private key is deleted.
[0013] Furthermore, the local vehicle-mounted certificate management server CMS includes a certificate management module, a permission management module, a private key management module, and an encryption and decryption module.
[0014] Furthermore, the functions of the certificate management module include root certificate presetting, certificate verification, CRL cache update, certificate update, certificate import, export and deletion.
[0015] Furthermore, the functions of the permission management module include identity authentication and permission management. After identity authentication, data can be accessed according to the defined access rules.
[0016] Furthermore, the private key management module functions include private key import, export, and deletion.
[0017] Furthermore, the encryption and decryption module functions include encryption and decryption services, which use private keys to encrypt and decrypt data based on trusted applications in TEE.
[0018] A local vehicle certificate management method based on OP-TEE. After the local vehicle certificate management server CMS performs permission authentication and certificate verification, it imports a legal and valid certificate or private key, and uses the private key to encrypt and decrypt data in the trusted execution environment TEE.
[0019] CMS authority authentication includes the following steps:
[0020] (1) CMS reads the permission information in TEE;
[0021] (2) The client sends the certificate to CMS;
[0022] (3) After receiving the certificate, CMS verifies the validity of the certificate. If the certificate is valid, it extracts the subject name in the certificate, searches the permission information file for corresponding access rights, and continues the authentication process;
[0023] (4) CMS sends a challenge message, requesting the client to prove ownership of its certificate;
[0024] (5) After receiving the challenge, the client uses the private key to sign the received challenge, puts it in the response message and sends it to CMS;
[0025] (6) CMS uses the public key in the client certificate to verify the signature information in the response message, and then sends the authentication result to the client;
[0026] The steps to import, export, or delete a certificate or private key are as follows:
[0027] (1) CMS reads the permission information and certificate chain in TEE;
[0028] (2) The client initiates identity authentication to the CMS. If the authentication fails, the connection is disconnected. If the authentication succeeds, the client request is executed.
[0029] (3) The client requests the import of a certificate or private key. After passing the authority authentication, CMS imports the legal certificate or private key. After the certificate is verified to be valid, it is imported into TEE. If the certificate and private key are imported at the same time, it is necessary to check whether the certificate and private key match.
[0030] (4) The client requests the export of the certificate or private key. After passing the authority authentication and access control check, the encrypted certificate or private key is exported.
[0031] (5) The client requests the deletion of the certificate or private key. After passing the permission authentication and access control check, the certificate or private key is deleted.
[0032] Furthermore, the CMS initialization process includes loading permission information, certificate chain, and CRL from TEE in sequence, then updating CRL, and finally regularly checking the certificate validity period to achieve automatic certificate update.
[0033] The beneficial effect of the present invention is that, compared with the prior art, the present invention can ensure the security and credibility of the vehicle-mounted system based on the trusted execution environment provided by TEE. The local management of vehicle-mounted certificates based on OP-TEE can solve the problems of secure storage of certificates, secure key management, secure access control and authority management. The local management of vehicle-mounted certificates based on OP-TEE can provide a more flexible and customizable solution, so that the vehicle-mounted system can be customized and expanded according to specific needs to meet different security and flexibility requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a schematic diagram of the local vehicle certificate management system based on OP-TEE;
[0035] Figure 2 This is the CMS startup initialization flow chart;
[0036] Figure 3 It is a CMS authentication and permission management flow chart;
[0037] Figure 4 It is a flow chart of certificate management and private key management. DETAILED DESCRIPTION
[0038] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.
[0039] like Figure 1 As shown, the in-vehicle certificate local management system based on OP-TEE (Open-source Portable Trusted Execution Environment) described in the present invention includes a local in-vehicle certificate management server CMS and a trusted execution environment TEE.
[0040] The local vehicle-mounted Certificate Manager Service (CMS) encrypts and stores data in secure storage based on the secure storage capabilities provided by the trusted execution environment TEE, and strictly controls data access to prevent illegal access to data.
[0041] The local vehicle certificate management server CMS includes a certificate management module, a permission management module, a private key management module, and an encryption and decryption module. After the permission authentication and certificate verification of the permission management module, CMS imports a legal and valid certificate or private key, and uses the private key to encrypt and decrypt data in TEE.
[0042] The trusted execution environment TEE correspondingly has a certificate storage module, an authority information module, a private key storage module, and a TA encryption and decryption service module.
[0043] The local vehicle-mounted certificate management server certificate management module has the following specific functions: root certificate presetting, certificate verification, CRL cache update, certificate update, certificate import, export and deletion.
[0044] Root certificate pre-setting: Trusted root certificates can be pre-deployed in TEE to build a certificate chain.
[0045] Certificate verification: Verify the issuance time, issuer information, and validity of the certificate. Verify whether the certificate is expired or ineffective, whether the certificate is issued by a legitimate CA, and whether the certificate has been revoked.
[0046] CRL cache and update: The CA certificate contains CDP (Certificate Revocation List Distribution Point) information, which is used to describe the way and method to obtain the CRL of the certificate. After the vehicle terminal is started, CMS reads the CRL information stored in TEE. If it is connected to the Internet, CMS will download and update the CRL (Certificate Revocation List) according to the mechanism and URL address specified in CDP.
[0047] Certificate update: Configure the URL address of the CA server. 30 days before the local certificate expires, when the vehicle terminal is connected to the Internet, it will try to automatically update the local certificate through SCEP (Simple Certificate Enrollment Protocol) to ensure the validity of the certificate. After the update is completed, it will be synchronized to TEE.
[0048] Certificate import: After passing the authority authentication, you can import a legal certificate. The certificate will be imported into the TEE only after it is verified to be valid. Certificate export: After passing the authority authentication and access control check, you can export the encrypted certificate for backup. Certificate deletion: After passing the authority authentication and access control check, you can delete the certificate to prevent the continued use of the expired certificate.
[0049] The rights management module has the following specific functions: identity authentication and rights management. After identity authentication is passed, only the data allowed by the rules can be accessed according to the defined access rules.
[0050] The private key management module has the following specific functions: private key import: after passing the authority authentication, you can import the legal private key. Private key export: after passing the authority authentication and access control check, you can export the encrypted private key for backup. Private key deletion: after passing the authority authentication and access control check, you can delete the private key to prevent the continued use of the invalid private key.
[0051] The encryption and decryption module has the following specific functions: encryption and decryption services: using trusted applications (TA) in TEE to complete encryption and decryption to prevent private keys from being extracted.
[0052] The trusted execution environment TEE has a certificate storage module, a permission information module, a private key storage module, and a TA encryption and decryption service module. The certificate storage module is used to store certificate information, the permission information module is used to store permission information, the private key storage module is used to store private key information, and the TA encryption and decryption service module is used for encryption and decryption.
[0053] like Figure 2As shown, CMS starts the initialization process, loads the permission information, certificate chain, and CRL from TEE in turn, then updates the CRL, and finally checks the certificate validity period regularly to achieve automatic certificate update.
[0054] like Figure 3 As shown, the CMS authentication and permission management process includes the following steps:
[0055] (1) CMS starts and reads the permission information in TEE;
[0056] (2) The client sends the certificate to the CMS;
[0057] (3) After receiving the certificate, CMS verifies the validity of the certificate: if the certificate is invalid, the authentication process is stopped; if the certificate is valid, the subject name in the certificate is extracted and the corresponding access rights in the permission information file are checked. If so, the authentication process continues; otherwise, the authentication process ends;
[0058] (4) CMS sends a challenge message, requesting the client to prove ownership of its certificate;
[0059] (5) After receiving the challenge, the client uses the private key to sign the received challenge, puts it in the response message and sends it to CMS;
[0060] (6) CMS uses the public key in the client certificate to verify the signature information in the response message, and then sends the authentication result to the client.
[0061] like Figure 4 As shown in the figure, certificate management and private key management require identity authentication and permission verification when performing certificate or private key import, export, and deletion operations. The steps include:
[0062] (1) CMS reads the permission information and certificate chain in TEE;
[0063] (2) The client initiates identity authentication to the CMS. If the authentication fails, the connection is disconnected. If the authentication succeeds, the client request is executed.
[0064] (3) The client requests the import of a certificate or private key. After passing the authority authentication, CMS can import the legal certificate or private key, update the client authority file, and return a successful response or an error code. After the certificate is verified to be valid, it will be imported into TEE. If the certificate and private key are imported at the same time, you need to check whether the certificate and private key match.
[0065] (4) The client requests the export of the certificate or private key. After passing the permission authentication and access control check, the encrypted certificate or private key can be exported for backup.
[0066] (5) The client requests the deletion of a certificate or private key. After passing the permission authentication and access control check, the certificate or private key can be deleted to prevent the continued use of the expired certificate or private key, and the client's permission file is updated, returning a success response or an error code.
[0067] The beneficial effect of the present invention is that, compared with the prior art, the present invention can ensure the security and credibility of the vehicle-mounted system based on the trusted execution environment provided by TEE. The local management of vehicle-mounted certificates based on OP-TEE can solve the problems of secure storage of certificates, secure key management, secure access control and authority management. The local management of vehicle-mounted certificates based on OP-TEE can provide a more flexible and customizable solution, so that the vehicle-mounted system can be customized and expanded according to specific needs to meet different security and flexibility requirements.
[0068] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
Claims
1. A local vehicle certificate management system based on OP-TEE, characterized in that: It includes the local vehicle certificate management server CMS and the trusted execution environment TEE. After the local vehicle certificate management server CMS performs permission authentication and certificate verification, it imports a legal and valid certificate or private key, and uses the private key in the trusted execution environment TEE to encrypt and decrypt data; CMS permission authentication includes: CMS reads the permission information in TEE; client sends certificate to CMS; after receiving the certificate, CMS verifies the validity of the certificate. If the certificate is valid, it extracts the subject name in the certificate, searches the permission information file for corresponding access rights, and continues the authentication process; CMS sends a challenge message to request the client to prove ownership of its certificate; after receiving the challenge, the client signs the received challenge with its private key, puts it in a response message and sends it to CMS; CMS uses the public key in the client certificate to verify the signature information in the response message, and then replies to the client with the authentication result; The operations of importing, exporting, and deleting certificates or private keys include: CMS reads the permission information and certificate chain in TEE; the client initiates identity authentication to CMS, disconnects the link if authentication fails, and executes the client request if authentication succeeds; the client requests the import of a certificate or private key, and after passing the permission authentication, CMS imports the legal certificate or private key, which is imported into TEE after verification; if the certificate and private key are imported at the same time, it is necessary to check whether the certificate and private key match; the client requests the export of a certificate or private key, and after passing the permission authentication and access control check, the encrypted certificate or private key is exported; the client requests the deletion of a certificate or private key, and after passing the permission authentication and access control check, the certificate or private key is deleted.
2. The OP-TEE-based vehicle-mounted certificate local management system according to claim 1 is characterized in that: The local vehicle-mounted certificate management server CMS includes a certificate management module, a permission management module, a private key management module, and an encryption and decryption module.
3. The OP-TEE-based vehicle-mounted certificate local management system according to claim 2 is characterized in that: The functions of the certificate management module include root certificate presetting, certificate verification, CRL cache update, certificate update, certificate import, export and deletion.
4. The OP-TEE-based vehicle-mounted certificate local management system according to claim 2 is characterized in that: The functions of the permission management module include identity authentication and permission management. After identity authentication, data can be accessed according to the defined access rules.
5. The OP-TEE-based vehicle-mounted certificate local management system according to claim 2 is characterized in that: The functions of the private key management module include private key import, export, and deletion.
6. The OP-TEE-based vehicle-mounted certificate local management system according to claim 2, characterized in that: The functions of the encryption and decryption module include encryption and decryption services, which use private keys to encrypt and decrypt data based on trusted applications in TEE.
7. A local management method for vehicle-mounted certificates based on OP-TEE, characterized in that: After the local vehicle certificate management server CMS performs authority authentication, it imports a legal and valid certificate or private key, and uses the private key to encrypt and decrypt data in the trusted execution environment TEE; CMS authority authentication includes the following steps: (1) CMS reads the permission information in TEE; (2) The client sends the certificate to CMS; (3) After receiving the certificate, CMS verifies the validity of the certificate. If the certificate is valid, it extracts the subject name in the certificate, searches the permission information file for corresponding access rights, and continues the authentication process; (4) CMS sends a challenge message, requesting the client to prove ownership of its certificate; (5) After receiving the challenge, the client uses the private key to sign the received challenge, puts it in the response message and sends it to CMS; (6) CMS uses the public key in the client certificate to verify the signature information in the response message, and then sends the authentication result to the client; The steps to import, export, or delete a certificate or private key are as follows: (1) CMS reads the permission information and certificate chain in TEE; (2) The client initiates identity authentication to the CMS. If the authentication fails, the connection is disconnected. If the authentication succeeds, the client request is executed. (3) The client requests the import of a certificate or private key. After passing the authority authentication, CMS imports the legal certificate or private key. After the certificate is verified to be valid, it is imported into TEE. If you import a certificate and a private key at the same time, you need to check whether the certificate and the private key match; (4) The client requests the export of the certificate or private key. After passing the authority authentication and access control check, the encrypted certificate or private key is exported. (5) The client requests the deletion of the certificate or private key. After passing the permission authentication and access control check, the certificate or private key is deleted.
8. The OP-TEE-based vehicle-mounted certificate local management method according to claim 7, characterized in that: The CMS initialization process includes loading permission information, certificate chain, and CRL from TEE, then updating CRL, and finally regularly checking the certificate validity period to achieve automatic certificate update.
