Verification method and device, vehicle-mounted equipment, vehicle and storage medium

By detecting the system operation mode in the vehicle and obtaining and verifying the keys in the corresponding mode, the problem of lack of universality and compatibility of existing vehicle safety verification methods is solved, and more efficient and convenient vehicle verification is achieved.

CN119544237APending Publication Date: 2025-02-28BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311110357.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing vehicle safety verification methods lack versatility and compatibility, which leads to the need to redevelop safety verification logic when hardware changes, which consumes time and manpower, affecting the convenience and effectiveness of verification.

Method used

A verification method and device are proposed that can detect the system operation mode of the vehicle equipment in response to the enable mode selection mechanism, and obtain the key and/or key files corresponding to the key information for verification based on the corresponding mode, which is suitable for software Soft mode and trusted execution environment TEE mode.

Benefits of technology

Through this method, the vehicle verification method has achieved universality, avoiding the secondary development needs during hardware changes, and improving the verification convenience and effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544237A_ABST
    Figure CN119544237A_ABST
Patent Text Reader

Abstract

The invention provides a verification method and device, vehicle-mounted equipment, a vehicle and a storage medium, and the verification method comprises the steps: responding to a starting mode selection mechanism, obtaining secret key information for verification, and detecting a system operation mode of the vehicle-mounted equipment, the system operation mode being a software Soft mode or a trusted execution environment TEE mode; based on an acquisition mode corresponding to the system operation mode, acquiring a first key and / or a key file corresponding to the key information; and verifying the first key and / or the key file. Through the vehicle verification method and device, the vehicle verification method and device can be suitable for a software Soft mode and a trusted execution environment TEE mode, so that the vehicle verification mode has universality, the vehicle verification mode is effectively expanded, and the vehicle verification convenience and verification effect are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a verification method, device, vehicle-mounted equipment, vehicle and storage medium. Background Art

[0002] The vehicle can establish a communication connection with the cloud to support personalized vehicle-cloud connection applications, such as remote monitoring and overall dispatch of the vehicle by the cloud. During the communication connection process, the vehicle will be verified, such as signature verification or signature verification.

[0003] In the related art, the security verification method between the vehicle and the cloud is relatively simple. One security verification method is: based on the security verification logic developed by the Trusted Execution Environment (TEE), the security verification between the vehicle and the cloud is performed, and after the security verification is passed, the communication connection between the vehicle and the cloud is supported. In this way, it is necessary to deploy a hardware environment that can adapt to the security verification logic for the vehicle-mounted device. If the hardware environment of the vehicle-mounted device needs to be changed later, it is necessary to redevelop a new security verification logic that can adapt to the changed hardware environment to support the security verification between the vehicle and the cloud. Another security verification method is: directly develop software that implements the security verification function under the Rich Execution Environment (REE), and deploy the software that implements the security verification function in the vehicle-mounted device, so that the security verification logic can be implemented in the software Soft mode. At present, the vehicle can only support the configuration of one of the aforementioned security verification methods, and cannot be compatible with the aforementioned two security verification methods at the same time. Therefore, the vehicle safety verification in the related art lacks versatility and is not compatible. Once the hardware changes, many security logics need to be redeveloped, which consumes time and manpower, affecting the convenience and verification effect of vehicle verification. Summary of the invention

[0004] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0005] To this end, the present disclosure proposes a verification method, device, vehicle-mounted equipment, vehicle, non-transitory computer-readable storage medium storing computer instructions, and computer program product, which can effectively expand the vehicle verification method and effectively improve the convenience and verification effect of vehicle verification.

[0006] The verification method proposed in the embodiment of the first aspect of the present disclosure includes: in response to enabling a mode selection mechanism and obtaining key information used for verification, detecting a system operation mode of the vehicle-mounted device, wherein the system operation mode is a software Soft mode or a trusted execution environment TEE mode; based on an acquisition method corresponding to the system operation mode, obtaining a first key and / or a key file corresponding to the key information; and verifying the first key and / or the key file.

[0007] The verification device proposed in the second aspect of the embodiment of the present disclosure includes: a detection module, which is used to respond to the activation mode selection mechanism and obtain key information used for verification, and detect the system operation mode of the vehicle-mounted equipment, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode; an acquisition module, which is used to obtain a first key and / or key file corresponding to the key information based on an acquisition method corresponding to the system operation mode; and a verification module, which is used to verify the first key and / or key file.

[0008] The vehicle-mounted device proposed in the third aspect embodiment of the present disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the verification method proposed in the first aspect embodiment of the present disclosure is implemented.

[0009] The vehicle proposed in the fourth embodiment of the present disclosure includes: the vehicle-mounted equipment proposed in the third embodiment of the present disclosure.

[0010] The fifth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the verification method proposed in the first aspect embodiment of the present disclosure is implemented.

[0011] The sixth aspect embodiment of the present disclosure proposes a computer program product. When the instructions in the computer program product are executed by a processor, the verification method proposed in the first aspect embodiment of the present disclosure is executed.

[0012] The verification method, device, vehicle-mounted equipment, vehicle, non-transitory computer-readable storage medium storing computer instructions, and computer program product provided by the present invention can respond to the activation mode selection mechanism and obtain key information used for verification, detect the system operation mode of the vehicle-mounted equipment, wherein the system operation mode is software Soft mode or trusted execution environment TEE mode, and based on the acquisition method corresponding to the system operation mode, obtain the first key and / or key file corresponding to the key information, and verify the first key and / or key file, which can be applicable to software Soft mode and trusted execution environment TEE mode, so that the vehicle verification method has universality, thereby effectively expanding the vehicle verification method and effectively improving the convenience and verification effect of vehicle verification.

[0013] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0015] Figure 1 is a flowchart of a verification method proposed in an embodiment of the present disclosure;

[0016] Figure 2 is a flowchart of a verification method proposed in another embodiment of the present disclosure;

[0017] Figure 3 It is a schematic diagram of the verification process based on the TEE mode in the embodiment of the present disclosure;

[0018] Figure 4 is a schematic diagram of a verification process based on the Soft mode in an embodiment of the present disclosure;

[0019] Figure 5 is a flowchart of a verification method proposed in another embodiment of the present disclosure;

[0020] Figure 6 is a schematic diagram of a method for obtaining a first key in an embodiment of the present disclosure;

[0021] Figure 7 is a schematic diagram of a storage method of a first key and a key file in an embodiment of the present disclosure;

[0022] Figure 8 is a schematic diagram of the structure of a verification device proposed in an embodiment of the present disclosure;

[0023] Fig. 9 A block diagram of an exemplary vehicle-mounted device suitable for implementing the embodiments of the present disclosure is shown;

[0024] Fig.10 It is a schematic diagram of the structure of a vehicle proposed in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and are not to be construed as limitations of the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications, and equivalents that fall within the spirit and connotation of the appended claims.

[0026] Figure 1 It is a flowchart of a verification method proposed in an embodiment of the present disclosure.

[0027] It should be noted that the executor of the verification method of this embodiment is a verification device, which can be implemented by software and / or hardware, and can be configured in a vehicle-mounted device, without limitation.

[0028] The execution subject of the present disclosure may be, for example, a vehicle-mounted device, which is not limited thereto.

[0029] The verification method in the disclosed embodiment can ensure the security and reliability of the network connection between the vehicle and the cloud. For example, before a user performs an Over-the-Air Technology (OTA) upgrade on the vehicle, a key verification will be performed, and the upgrade can only be performed after the verification is passed. For another example, when resetting the hardware, an authorization authentication will be performed, and the authorization authentication process will involve encryption and decryption operations, key exchange and signature verification, key storage, etc., and there are no restrictions on this.

[0030] like Figure 1 As shown, the verification method includes:

[0031] S101: In response to enabling a mode selection mechanism and obtaining key information for verification, detecting a system operation mode of the vehicle-mounted device, wherein the system operation mode is a software Soft mode or a trusted execution environment TEE mode.

[0032] Among them, the mode selection mechanism refers to a mechanism that can select the corresponding mode to verify the vehicle. In some embodiments, the mode can be a system operation mode, and the system operation mode is a software Soft mode or a Trusted Execution Environment (TEE) mode, and there is no restriction on this.

[0033] In some embodiments, the software Soft mode refers to a mode in which the vehicle-mounted device relies solely on software for verification. In the software Soft mode, the verification process does not need to rely on the hardware installed in the vehicle-mounted device, and there is no restriction on this.

[0034] In some embodiments, the trusted execution environment TEE mode, the trusted execution environment TEE is an independent execution environment that runs side by side with the rich execution environment REE, has its own execution space, and has a higher security level. The operating mode based on the trusted execution environment TEE can be called the trusted execution environment TEE mode, and there is no limitation on this.

[0035] That is to say, in the disclosed embodiment, software that implements the security verification function can be pre-deployed in the vehicle-mounted device so that the vehicle-mounted device can support verification based on the software Soft mode, and a hardware environment that can be compatible with the security verification logic based on the trusted execution environment TEE mode is also deployed in the vehicle-mounted device to support verification based on the trusted execution environment TEE mode. In the disclosed embodiment, a selection function can also be configured in the vehicle-mounted device, based on which it can support the selection of whether to verify based on the software Soft mode or based on the trusted execution environment TEE mode for the vehicle-mounted device, and there is no restriction on this.

[0036] In some embodiments, two verification mechanisms may be configured in the vehicle-mounted device. For example, one verification mechanism may be a verification mechanism based on the software Soft mode, and the other verification mechanism may be a verification mechanism based on the Trusted Execution Environment TEE mode. There is no limitation on this.

[0037] That is to say, in the embodiment of the present disclosure, two verification mechanisms are set for the compatibility of the vehicle-mounted device. During the connection verification process, the vehicle-mounted device can adaptively choose to use an appropriate verification mechanism for verification, and there is no restriction on this.

[0038] In some embodiments, if two sets of verification mechanisms are configured in the vehicle-mounted device, a mode selection mechanism can be configured for the vehicle-mounted device. If it is determined that the vehicle-mounted device can support running two sets of system operating modes, the mode selection mechanism can be enabled. Then, during the verification process, the appropriate verification mechanism is directly selected according to the current system operating mode of the vehicle-mounted device, and there is no restriction on this.

[0039] In some embodiments, the user can choose to enable or not enable the mode selection mechanism in the vehicle-mounted device. If the mode selection mechanism is enabled, it means that during the connection verification process, the vehicle-mounted device can adaptively choose to use a suitable verification mechanism for verification. For example, when the key information used for verification is obtained, the system operation mode of the vehicle-mounted device can be triggered to detect, that is, to detect the current system operation mode of the vehicle-mounted device, whether it is the software Soft mode or the trusted execution environment TEE mode, and then verify based on the verification method adapted to the system operation mode, without limitation. In other embodiments, if the mode selection mechanism is not enabled, verification can be performed based on a specified verification mechanism. The specified verification mechanism can be, for example, the verification mechanism used last time, or the verification mechanism specified by the user, or the verification mechanism defaulted by the factory program of the vehicle-mounted device, without limitation.

[0040] The key information refers to information used to identify a key, such as identification information of a key. The key information may specifically include a key type and a key identification, and there is no limitation on this.

[0041] In some embodiments, the key type may be, for example, an Advanced Encryption Standard (AES) key (specifically, AES128, AES256), a public and private key based on Ed25519 (Ed25519 is a high-speed and high-security signature method), or a public and private key based on curve25519 (curve25519 is an encryption algorithm), without any restriction.

[0042] In some embodiments, the key information used for verification may be input by the user, or may be sent from the cloud, without limitation.

[0043] S102: Based on an acquisition method corresponding to the system operation mode, acquire a first key and / or a key file corresponding to the key information.

[0044] In some embodiments, different acquisition methods may be configured for different system operation modes, where the acquisition method specifically refers to a method for acquiring a key and / or a key file.

[0045] In some embodiments, the acquisition method may specifically be an acquisition method corresponding to the software Soft mode, or may specifically be an acquisition method corresponding to the Trusted Execution Environment TEE mode. Different acquisition methods are configured for different modes, thereby improving the flexibility of acquiring keys and / or key files.

[0046] In some embodiments, a key, in cryptography, refers to a secret information used to perform cryptographic applications such as encryption, decryption, and integrity verification. The key is intended to be used by software that implements encryption algorithms. In symmetric cryptography (or secret key cryptography), the same key is used for encryption and decryption, so the key needs to be kept secret. In public key cryptography (or asymmetric cryptography), different keys are used for encryption and decryption: usually one is public, called the public key; the other is kept secret, called the private key.

[0047] In some embodiments, the key is, for example, a public key or a private key.

[0048] In some embodiments, a key file refers to a file obtained by performing some processing on a key, for example, a file obtained by encrypting a key, a file obtained by decrypting a key, or a file containing a key and / or key information.

[0049] In some embodiments, a key and / or key file corresponding to the key information obtained using an acquisition method corresponding to the system operation mode can be called a first key and / or key file. The first key and / or key file is used for verification, such as signature verification or signing, and there is no restriction on this.

[0050] In some embodiments, if the mode selection mechanism is enabled, when the key information used for verification is obtained, the system operation mode of the vehicle-mounted device can be triggered to detect, and then, according to the system operation mode, the first key and / or key file corresponding to the key information is obtained, without any restriction.

[0051] In some embodiments, the first key and / or key file may include a first key corresponding to the key information, a first key file corresponding to the key information, a first key corresponding to the key information, and one or more of the first key file.

[0052] In some embodiments, a first key corresponding to the key information can be obtained. For example, there may be multiple candidate keys, each candidate key has a corresponding candidate information. The candidate information may be, for example, information used to identify the candidate key. Candidate information identical to the key information can be determined from multiple candidate information, and the candidate key identified by the same candidate information can be used as the first key corresponding to the key information. That is to say, the first key corresponding to the key information may refer to the key information used to identify the first key. For example, the key information is the key type, key identifier, etc. of the first key, and there is no limitation on this.

[0053] In some embodiments, a first key file corresponding to the key information can be obtained. For example, a first key corresponding to the key information can be first obtained, and a file related to the first key can be obtained as the first key file. The first key file is, for example, a file obtained by encrypting and / or decrypting the first key, or a file containing the first key and / or key information.

[0054] In some embodiments, multiple candidate keys can also be pre-configured, each candidate key has a corresponding candidate information, and a corresponding candidate key file is configured for each candidate key. Accordingly, the candidate information is used to identify the corresponding candidate key file. In the process of obtaining the first key file corresponding to the key information, the candidate information that is the same as the key information can be determined, and the candidate key file identified by the same candidate information can be used as the first key file.

[0055] In some embodiments, the first key and / or key file corresponding to the key information, wherein possible situations are: a first key corresponding one-to-one to the key information (for example, the key information is used to uniquely identify the first key); a first key file corresponding one-to-one to the key information (for example, the key information is used to uniquely identify the first key file); a first key and a first key file corresponding one-to-one to the key information (for example, the key information is used to uniquely identify the first key and the first key file), that is, the key information is equivalent to an identifier of the first key, and the two are in a one-to-one relationship, and the first key file is a file related to the first key, and the two are also in a one-to-one relationship, and the first key and / or key file corresponding to the key information can be understood as the key information uniquely identifying the first key, or uniquely identifying the first key file, or uniquely identifying the first key and the first key file.

[0056] That is to say, since the verification methods under different system operation modes may be different, the methods of obtaining the first key and / or key file under different system operation modes are also different. In the embodiments of the present disclosure, it supports obtaining the first key and / or key file based on the acquisition method under the verification logic corresponding to the system operation model, and there is no restriction on this.

[0057] In other embodiments of the present disclosure, in response to the mode selection mechanism not being enabled and key information for verification being obtained, a second key and / or key file corresponding to the key information can be directly obtained, and the second key and / or key file can be verified.

[0058] In other embodiments of the present disclosure, if it is determined that the mode selection mechanism is not enabled and the key information used for verification is obtained, the second key and / or key file corresponding to the key information can be directly obtained, and the second key and / or key file can be verified, supporting personalized verification scenarios and further enhancing the flexibility of vehicle verification.

[0059] That is to say, if it is determined that the mode selection mechanism is not enabled, the detection of the current system operation mode of the vehicle-mounted device may not be triggered, and verification may be performed directly based on the default verification method. The default verification method may be the verification method set by the factory program, or it may be the verification method supported by the vehicle-mounted device, and there is no restriction on this.

[0060] Among them, when the mode selection mechanism is not enabled, the key and / or key file corresponding to the key information obtained based on the default verification method can be called the second key and / or key file, and there is no limitation on this.

[0061] In some embodiments, the second key and / or key file may be a second key and / or key file corresponding to the key information obtained based on a default verification method.

[0062] In some embodiments, the second key and / or key file may include a second key corresponding to the key information, a second key file corresponding to the key information, a second key corresponding to the key information, and one or more of the second key file.

[0063] In some embodiments, if the mode selection mechanism is not enabled, after obtaining the second key and / or key file corresponding to the key information based on the default verification method, verification can be performed directly based on the second key and / or key file without any restriction.

[0064] S103: Verify the first key and / or key file.

[0065] After obtaining the first key and / or key file based on the verification logic corresponding to the system operation model, the first key and / or key file may be directly verified.

[0066] In some embodiments, the first key and / or the key file may be subjected to a signature verification process or a signature process, without limitation.

[0067] In some embodiments, the signature verification or signing of the first key and / or key file may specifically include the following possible situations: the signature verification or signing of the first key; or the signature verification or signing of the first key file; or the signature verification or signing of the first key and the first key file may also be performed without limitation.

[0068] In some embodiments, the first key is subjected to signature verification, for example, to verify whether the source of the first key is legal. For example, the source device identifier of the first key can be detected to determine whether the source device identifier is legal, such as whether it is pre-authorized. If the source device identifier is legal, it is determined that the signature verification of the first key has passed. If the source device identifier is illegal, it is determined that the signature verification of the first key has failed. There is no restriction on this.

[0069] In some embodiments, the signing process is performed on the first key, for example, a signature is generated for the first key, and the signature is used to label the first key, and there is no limitation to this.

[0070] In some embodiments, the first key may be verified using a signature verification method in the related art, or the first key may be signed using a signature processing method in the related art, which will not be described in detail herein.

[0071] In some embodiments, the first key file is subjected to a signature verification process, for example, to verify whether the source of the first key file is legal. For example, the source device identifier of the first key file can be detected to determine whether the source device identifier is legal, such as whether it is pre-authorized. If the source device identifier is legal, it is determined that the signature verification process for the first key file has passed. If the source device identifier is illegal, it is determined that the signature verification process for the first key file has failed. There is no restriction on this.

[0072] In some embodiments, the signing process for the first key file may be, for example, generating a signature for the first key file and using the signature to tag the first key file, and there is no limitation to this.

[0073] In some embodiments, the first key file may be verified using a signature verification method in related technologies, or the first key file may be signed using a signature processing method in related technologies, which will not be described in detail herein.

[0074] In some embodiments, verifying the signature of the first key and the first key file refers to verifying the signature of both the first key and the first key file, and signing the first key and the first key file refers to signing the first key and the first key file.

[0075] In this embodiment, in response to enabling the mode selection mechanism and obtaining key information for verification, the system operation mode of the vehicle-mounted device can be detected, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode, and based on the acquisition method corresponding to the system operation mode, the first key and / or key file corresponding to the key information is obtained, and the first key and / or key file is verified, which can be applicable to the software Soft mode and the trusted execution environment TEE mode, so that the vehicle verification method is universal, thereby effectively expanding the vehicle verification method, and effectively improving the convenience and verification effect of vehicle verification.

[0076] Figure 2 It is a flowchart of a verification method proposed in another embodiment of the present disclosure.

[0077] like Figure 2 As shown, the verification method includes:

[0078] S201: In response to enabling a mode selection mechanism and obtaining key information for verification, detecting a system operation mode of the vehicle-mounted device, wherein the system operation mode is a software Soft mode or a trusted execution environment TEE mode.

[0079] For the description of S201, please refer to the above embodiment, which will not be repeated here.

[0080] S202: In response to the system operation mode being the Soft mode, reading a first key and / or a key file corresponding to the key information from the double data rate synchronous dynamic random access memory DDR.

[0081] That is to say, for different verification methods, the storage location of the first key and / or key file corresponding to the key information may be different. Therefore, the storage location of the first key and / or key file can be determined based on the current system operation mode of the vehicle-mounted device, and the first key and / or key file corresponding to the key information can be obtained from the determined storage location. There is no restriction on this.

[0082] In some embodiments, in the verification logic based on the Soft mode, the first key and / or the key file may be pre-stored in a double-data-rate synchronous dynamic random access memory (DDR SDRAM), and DDR SDRAM may be referred to as DDR for short, without limitation.

[0083] In some embodiments, if the detection system operation mode is the Soft mode, the first key and / or key file corresponding to the key information is read from the double data rate synchronous dynamic random access memory DDR, and there is no limitation on this.

[0084] S203: In response to the system operation mode being the TEE mode and determining that the first key and / or key file has been imported into the TEE, directly read the first key and / or key file from the TEE.

[0085] In some embodiments, in the verification logic based on the TEE mode, the first key and / or the key file may be pre-imported into the trusted execution environment TEE.

[0086] In some embodiments, if the detection system operating mode is TEE mode, it can first be confirmed whether the first key and / or key file has been imported into the trusted execution environment TEE, and then the subsequent steps are triggered.

[0087] S204: In response to the system operation mode being the TEE mode and determining that the first key and / or the key file has not been imported into the TEE, read the structure of the first key and / or the key file from the secure storage area.

[0088] S205: Import the structure of the first key and / or the key file into the TEE to import the first key and / or the key file into the TEE.

[0089] S206: Obtain the imported first key and / or key file.

[0090] In some embodiments of the present disclosure, in response to the system operation mode being TEE mode and determining that the first key and / or key file has been imported into TEE, the first key and / or key file is read directly from TEE; when the system operation mode is TEE mode and it is determined that the first key and / or key file has not been imported into TEE, the structure of the first key and / or key file is read from the secure storage area, and the structure of the first key and / or key file is imported into TEE, so as to import the first key and / or key file into TEE and obtain the imported first key and / or key file, thereby effectively ensuring the consistency and efficiency of verification.

[0091] S207: Verify the first key and / or key file.

[0092] After obtaining the first key and / or key file based on the verification logic corresponding to the system operation model, verification can be performed directly based on the first key and / or key file, for example, signature verification or signing can be performed based on the first key and / or key file, without any restriction.

[0093] The following are examples: Figure 3 As shown, Figure 3 It is a schematic diagram of the verification process based on the TEE mode in the embodiment of the present disclosure. When the key information for verification is obtained (for example, it can be obtained based on the TeeSecuriry::EccGetPubKey() function or based on the TeeSecuriry::EddsaSign() function, and there is no restriction on this), then, first check whether the first key exists, for example, the status of the first key can be obtained based on GetKeyStatus(). If the status is empty, it means that the first key does not exist, and an "error" prompt is returned. If the status is not empty, it means that the first key exists, then it can be determined whether the first key and / or key file has been imported into the TEE. If the first key has been imported into the TEE, If the first key and / or key file is not imported into TEE, the structure of the first key and / or key file is read from the secure storage area, and then the structure of the first key and / or key file is imported to realize importing the first key and / or key file into TEE, for example, it can be imported based on hb_st_key_import() function, and the imported first key and / or key file is read, and verification is performed according to the first key and / or key file.

[0094] For example, the maximum signature length (get max sign size) of the first key and / or key file can be determined based on the hbkm_pkey_query() function, and then a signature verification or signing operation can be performed. For example, signing can be performed based on the hbkm_pkey_sign() function to return the signed data, or signature verification can be performed based on the hbkm_pkey_verify() function. There is no restriction on this.

[0095] The following are examples: Figure 4 As shown, Figure 4 It is a schematic diagram of the verification process based on the Soft mode in the embodiment of the present disclosure. Unlike the verification process based on the TEE mode, the verification process based on the Soft mode does not use the key import link. Each time the lise_server service (lise_server service is a program for generating and obtaining read key files) is started, the key file under the data partition can be read, and then the key file is stored in the DDR. In the verification process based on the TEE mode, the first key and / or key file corresponding to the key information can be directly read from the DDR.

[0096] For example, if it is a signature operation, the signature operation process can be triggered based on the SoftSecurity::EddsaSign() function, and the key information can be obtained based on the GetKeyInfo() function, and then the private key corresponding to the key information (the private key is an optional example of the first key) can be obtained, such as the EVP_PKEY_new_raw_private_key() function can be used to obtain it from the DDR, and the digest can be processed in combination with the private key and the EVP_DigestSignInit() function to implement the signature. If it is a signature verification operation, the public key (the public key is an optional example of the first key) can be obtained, such as the SoftSecurity::EccGetPubKey() function, the EVP_PKEY_new_raw_public_key() function, and the EVP_MD_CTX_new() function can be used to obtain the public key, and then the signature verification digest can be initialized based on the public key, such as the EVP_DigestVerifyInit() function can be used to initialize the signature verification digest, and then the EVP_DigestVerify() function can be used to verify the signature, and there is no restriction on this.

[0097] In this embodiment, in response to enabling the mode selection mechanism and obtaining key information for verification, the system operation mode of the vehicle-mounted device can be detected, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode, and based on the acquisition method corresponding to the system operation mode, the first key and / or key file corresponding to the key information is obtained, and the first key and / or key file is verified, which can be applicable to the software Soft mode and the trusted execution environment TEE mode, so that the vehicle verification method is universal, thereby effectively expanding the vehicle verification method, and effectively improving the convenience and verification effect of vehicle verification. In response to the system operation mode being TEE mode and determining that the first key and / or key file has been imported into TEE, the first key and / or key file is directly read from TEE; when the system operation mode is TEE mode and it is determined that the first key and / or key file has not been imported into TEE, the structure of the first key and / or key file is read from the secure storage area, and the structure of the first key and / or key file is imported into TEE, so as to import the first key and / or key file into TEE, and obtain the imported first key and / or key file, thereby effectively improving the success rate of obtaining the first key and / or key file, and ensuring the consistency and efficiency of verification.

[0098] In some embodiments, the first key and / or key file obtained based on the key information may be the first key; or may be the first key file; or may also be the first key and the first key file, so as to effectively adapt to different verification scenarios.

[0099] In some embodiments of the present disclosure, the first key and / or key file obtained based on the key information may include the first key and the first key file, which can effectively improve the integrity of the verification function of the vehicle-mounted device.

[0100] Figure 5 It is a flowchart of a verification method proposed in another embodiment of the present disclosure.

[0101] like Figure 5 As shown, the verification method includes:

[0102] S501: Determine a first key corresponding to the key information.

[0103] In the embodiment of the present disclosure, before obtaining the first key and / or key file used for verification based on the key information, the first key can also be encrypted, decrypted, detected, generated, and stored in advance to support timely reading of the first key and / or key file corresponding to the key information during the verification process.

[0104] In some embodiments, the key information may be, for example, a key type or a key identifier, without limitation.

[0105] In some embodiments, in the process of determining the first key corresponding to the key information, the first key can be determined based on the key type, key identifier, etc. The first key is, for example, detached key AES128 and AES256, and there is no limitation on this.

[0106] In some embodiments, if the verification method is used for encryption or decryption operations, it is also possible to first detect whether there is a first key corresponding to the key information, and then determine the first key corresponding to the key information based on the detection results to support the encryption or decryption operation, without any restriction.

[0107] like Figure 6 As shown, Figure 6 Schematic diagram of the method of obtaining the first key in the embodiment of the present disclosure. If it is determined to perform encryption or decryption operation, then in the Soft mode of the system operation mode, the key can be obtained from the DDR based on the Security::AesEcb() function ( Figure 6 The key in may be an optional example of the first key of the present invention), and then an encryption process is performed, such as encryption based on the EVP_EncryptInit_ex() function and the EVP_EncryptFinal_ex() function, and the encrypted data is returned, or a decryption process is performed, such as decryption based on the EVP_DecryptInit_ex() function and the EVP_DecryptFinal_ex() function, and the decrypted data is returned.

[0108] Also, see Figure 6, when the system operation mode is TEE mode, it is possible to detect whether the key has been imported into the TEE environment based on the TeeSecurity::AesEcb() function. If the key has not been imported into the TEE environment, the key in the secure storage area is read based on the Read_file_data() function to obtain a securely stored structure (which can be expressed as Key_meta_data), and then the structure is imported into the TEE environment to import the key into the TEE environment. For example, it can be imported based on the hb_st_key_import() function, initialized and set the key (which can be set based on the kcapi_cipher_init() function and the kcapi_cipher_setkey() function). If it is determined that the key has been imported into the TEE environment, the key is directly initialized and set, and then the encryption process is executed, such as encryption based on the kcapi_cipher_encrypt() function and the kcapi_cipher_destroy() function, and the encrypted data is returned, or the decryption process is executed, such as decryption based on the kcapi_cipher_decrypt() function and the kcapi_cipher_destroy() function, and the decrypted data is returned.

[0109] S502: In response to determining that there is a first key file corresponding to the first key, the key information, the first key, and the first key file are stored in association in the DDR and / or TEE.

[0110] In some embodiments, whether there is a first key file corresponding to the first key can be automatically detected based on the lise_server service, and there is no limitation on this.

[0111] After determining the first key corresponding to the key information, it can be detected whether there is a first key file corresponding to the first key, and then the key information, the first key and the first key file are associated and stored in DDR and / or TEE to support the timely reading of the first key and / or key file corresponding to the key information during the verification process.

[0112] S503: In response to determining that there is no first key file corresponding to the first key, generate a first key file, and store the key information, the first key, and the first key file in association with each other in the DDR and / or TEE.

[0113] That is, if it is detected that there is no first key file corresponding to the first key, a first key file corresponding to the first key can be generated, and the key information, the first key and the first key file can be associated and stored in DDR and / or TEE.

[0114] In some embodiments, generating a first key file corresponding to a first key may include any of the following: randomly generating a first key file corresponding to the first key; reading a pre-set first key file corresponding to the first key, thereby effectively adapting the personalized key type and improving the compatibility of the verification logic under different system operation modes.

[0115] In some embodiments, for some key types, a first key file corresponding to the first key may be randomly generated. These key types may be, for example, AES types.

[0116] In other embodiments, for other key types, a preset first key file corresponding to the first key may be read. The other key types may be, for example, Ed25519 and curve25519 types, and there is no limitation to this.

[0117] In some embodiments, for keys generated randomly, a first key file corresponding to the first key can be randomly generated; and for keys generated by production line injection, a pre-set (injected by the production line) first key file corresponding to the first key can be read, and there is no restriction on this.

[0118] For example, Figure 7 As shown, Figure 7 : is a schematic diagram of the storage method of the first key and the key file in the embodiment of the present disclosure. When the vehicle-mounted device is initially started, the initialization in the corresponding system operation mode can be performed. For example, in Soft mode, it can be initialized based on the Security::Init() function. In TEE mode, it can be initialized based on the TeeSecurity::Init() function, and the key is initialized based on the hb_st_key_init() function. Then, the status of all keys is obtained (GetKeyStatus() function), and whether an AES key (AES key) exists is detected. In Soft mode, whether a key file (AES key file, which is an optional example of the first key file) exists is detected. If an AESkey file exists, subsequent related steps are executed. If an AES key does not exist, file, a key file is generated. In TEE mode, the process steps for detecting or generating a key file are consistent with those in Soft mode. Then, the key information, the first key, and the first key file can be associated and stored in DDR and / or TEE. For example, in Soft mode, the key information, the first key, and the first key file can be associated and stored in DDR based on the Dolnsert() function. In TEE mode, the key information, the first key, and the first key file can be imported into TEE based on the TeeDolnsert() function. There is no restriction on this.

[0119] S504: In response to enabling the mode selection mechanism and obtaining key information for verification, detecting the system operation mode of the vehicle-mounted device, wherein the system operation mode is a software Soft mode or a trusted execution environment TEE mode.

[0120] S505: Based on an acquisition method corresponding to the system operation mode, acquire a first key and / or a key file corresponding to the key information.

[0121] S506: Verify the first key and / or key file.

[0122] For the description of S504 - S506 , please refer to the above embodiment for details, which will not be repeated here.

[0123] In this embodiment, after determining the first key corresponding to the key information, it is possible to detect whether there is a first key file corresponding to the first key, and then the key information, the first key and the first key file are associated and stored in DDR and / or TEE to support timely reading of the first key and / or key file corresponding to the key information during the verification process. In response to the activation mode selection mechanism, the key information used for verification is obtained, and the system operation mode of the vehicle-mounted device is detected, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode, and based on the acquisition method corresponding to the system operation mode, the first key and / or key file corresponding to the key information is obtained, and the first key and / or key file is verified, which can be applicable to the software Soft mode and the trusted execution environment TEE mode, so that the vehicle verification method has universality, thereby effectively expanding the vehicle verification method, and effectively improving the convenience and verification effect of vehicle verification.

[0124] Therefore, the verification method provided by the embodiment of the present disclosure can be compatible with both REE environment and TEE environment when verifying the vehicle. When the hardware platform of the vehicle-mounted device changes, no secondary development is required. Only a small amount of configuration is required to provide a complete security verification logic, and the key and / or key file can be effectively migrated to the new environment. It is effectively compatible with the verification capabilities in Soft mode and TEE mode, ensuring the security of the network connection between the vehicle and the cloud, effectively avoiding secondary development, and effectively reducing the time and labor costs consumed by migration and deployment.

[0125] Figure 8 It is a schematic diagram of the structure of a verification device proposed in an embodiment of the present disclosure.

[0126] like Figure 8 As shown, it can be applied to vehicle-mounted equipment. The verification device 80 includes:

[0127] The detection module 801 is used to respond to the activation mode selection mechanism and obtain the key information used for verification, and detect the system operation mode of the vehicle-mounted device, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode.

[0128] The acquisition module 802 is used to acquire the first key and / or key file corresponding to the key information based on an acquisition method corresponding to the system operation mode.

[0129] The verification module 803 is used to verify the first key and / or the key file.

[0130] It should be noted that the above explanation of the verification method is also applicable to the verification device of this embodiment and will not be repeated here.

[0131] In this embodiment, in response to enabling the mode selection mechanism and obtaining key information for verification, the system operation mode of the vehicle-mounted device can be detected, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode, and based on the acquisition method corresponding to the system operation mode, the first key and / or key file corresponding to the key information is obtained, and the first key and / or key file is verified, which can be applicable to the software Soft mode and the trusted execution environment TEE mode, so that the vehicle verification method is universal, thereby effectively expanding the vehicle verification method, and effectively improving the convenience and verification effect of vehicle verification.

[0132] Fig. 9 A block diagram of an exemplary vehicle-mounted device suitable for implementing the embodiments of the present disclosure is shown. Fig. 9 The vehicle-mounted device 12 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0133] like Fig. 9 As shown, the vehicle-mounted device 12 is in the form of a general-purpose computing device. The components of the vehicle-mounted device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 16).

[0134] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0135] The vehicle-mounted device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the vehicle-mounted device 12, including volatile and non-volatile media, removable and non-removable media.

[0136] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. The vehicle-mounted device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. For example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 Not shown, often called a "hard drive").

[0137] although Fig. 9 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only memory (hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0138] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0139] The vehicle device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a human body to interact with the vehicle device 12, and / or any device that enables the vehicle device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the vehicle device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the vehicle device 12 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the vehicle device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0140] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing the verification method mentioned in the above embodiment.

[0141] In order to implement the above embodiments, the present disclosure further proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the verification method proposed in the above embodiments of the present disclosure is implemented.

[0142] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When the instructions in the computer program product are executed by a processor, the verification method proposed in the above embodiments of the present disclosure is executed.

[0143] Fig.10 It is a schematic diagram of the structure of a vehicle proposed in one embodiment of the present disclosure.

[0144] like Fig.10 As shown, the vehicle 100 comprises:

[0145] The vehicle-mounted device 12 in the above embodiment.

[0146] In this embodiment, in response to enabling the mode selection mechanism and obtaining key information for verification, the system operation mode of the vehicle-mounted device can be detected, wherein the system operation mode is the software Soft mode or the trusted execution environment TEE mode, and based on the acquisition method corresponding to the system operation mode, the first key and / or key file corresponding to the key information is obtained, and the first key and / or key file is verified, which can be applicable to the software Soft mode and the trusted execution environment TEE mode, so that the vehicle verification method is universal, thereby effectively expanding the vehicle verification method, and effectively improving the convenience and verification effect of vehicle verification.

[0147] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.

[0148] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0149] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0150] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0151] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0152] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0153] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0154] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A verification method, characterized in that: The method comprises: In response to enabling the mode selection mechanism and obtaining key information for verification, detecting a system operation mode of the vehicle-mounted device, wherein the system operation mode is a software Soft mode or a trusted execution environment TEE mode; Acquire a first key and / or a key file corresponding to the key information based on an acquisition method corresponding to the system operation mode; and Verify the first key and / or key file.

2. The method according to claim 1, characterized in that The method further comprises: In response to not enabling the mode selection mechanism and obtaining key information for verification, directly obtaining a second key and / or a key file corresponding to the key information; The second key and / or key file is verified.

3. The method according to any one of claims 1, characterized in that The acquiring, based on the acquiring method corresponding to the system operation mode, the first key and / or the key file corresponding to the key information, comprises: In response to the system operation mode being the Soft mode, a first key and / or a key file corresponding to the key information is read from a double data rate synchronous dynamic random access memory DDR.

4. The method according to any one of claims 1, characterized in that The acquiring, based on the acquiring method corresponding to the system operation mode, the first key and / or the key file corresponding to the key information, comprises: In response to the system operation mode being the TEE mode and determining that the first key and / or key file has been imported into the TEE, the first key and / or key file is directly read from the TEE.

5. The method according to claim 1, characterized in that The acquiring, based on the acquiring method corresponding to the system operation mode, the first key and / or the key file corresponding to the key information, comprises: In response to the system operation mode being the TEE mode and determining that the first key and / or key file has not been imported into the TEE, reading a structure of the first key and / or key file from a secure storage area; Importing the structure of the first key and / or key file into the TEE to import the first key and / or key file into the TEE; and Obtain the imported first key and / or key file.

6. The method according to claim 1, characterized in that The first key and / or key file includes: a first key and a first key file; before detecting the system operation mode of the vehicle-mounted device, the method further includes: Determining a first key corresponding to the key information; In response to determining that there is a first key file corresponding to the first key, storing the key information, the first key, and the first key file in association with each other in the DDR and / or TEE; In response to determining that there is no first key file corresponding to the first key, the first key file is generated, and the key information, the first key and the first key file are associated and stored in the DDR and / or TEE.

7. A verification device, characterized in that: The method comprises: A detection module, configured to detect a system operation mode of the vehicle-mounted device in response to enabling a mode selection mechanism and obtaining key information for verification, wherein the system operation mode is a software Soft mode or a trusted execution environment TEE mode; An acquisition module, configured to acquire a first key and / or a key file corresponding to the key information based on an acquisition method corresponding to the system operation mode; A verification module is used to verify the first key and / or key file.

8. A vehicle-mounted device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A vehicle, characterized in that: include: The vehicle-mounted device as claimed in claim 8.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.