Sensitive information processing method, electronic control unit, vehicle and program product

By using hardware security modules in the electronic control unit of the vehicle to encrypt and store sensitive information and derivate keys based on unique identification codes, it solves how to implement hardware-level sensitive information security control without dedicated ROM and TEE interfaces. The problem is to realize the efficient and secure decryption and encryption process of sensitive information.

CN119496612APending Publication Date: 2025-02-21BEIJING JIDU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411697845.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

How to control the security of vehicle sensitive information at the hardware level without dedicated ROM and TEE interfaces?

Method used

By encrypting and storing sensitive information in the hardware security module of the electronic control unit of the vehicle, and using the key derivation algorithm to generate the derived key based on the unique identification code, symmetric encryption and decryption operations are performed to ensure that only hardware with the legal unique identification code is available. Ability to decrypt sensitive information.

Benefits of technology

It realizes hardware-level security control of sensitive information without a dedicated ROM and TEE interface to prevent sensitive information from being illegally decrypted and leaked.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496612A_ABST
    Figure CN119496612A_ABST
Patent Text Reader

Abstract

The invention provides a sensitive information processing method, an electronic control unit, a vehicle and a program product. The sensitive information processing method comprises the steps that a hardware security module receives a sensitive information acquisition request from an application module; based on the request, obtaining a unique identification code of the electronic control unit from the operating system module; based on the unique identification code, a first derived key is generated through a key derivation algorithm, the key derivation algorithm is further used for generating a second derived key in the encryption process of the sensitive information, and the second derived key is the same as the first derived key; according to the first derived key, the hardware security module decrypts the sensitive information in the form of ciphertext through a symmetric encryption algorithm to obtain sensitive information in the form of plaintext, and the symmetric encryption algorithm is also used for encrypting the sensitive information according to the second derived key in the encryption process of the sensitive information to generate sensitive information in the form of ciphertext; and providing the sensitive information in the plaintext form to an application module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a method for processing sensitive information, an electronic control unit, a vehicle and a program product. Background Art

[0002] Hardware security modules (HSMs) are used to protect and manage keys and perform cryptographic operations. They rely on dedicated ROM (Read-Only Memory) and use TEE (Trusted Execution Environment) interfaces. The security of HSMs is managed in hardware through dedicated ROM and TEE interfaces. However, when dedicated ROM or TEE does not exist or fails, how to manage the security of sensitive vehicle information becomes a difficult problem. Summary of the invention

[0003] The present disclosure provides an encryption and decryption method, an in-vehicle electronic device, a vehicle, and a computer program product.

[0004] According to one aspect of the present disclosure, a method for processing sensitive information is provided, which is applied to a hardware security module of an electronic control unit of a vehicle, and the method for processing sensitive information can decrypt sensitive information in ciphertext form and includes: the hardware security module receives a sensitive information acquisition request from an application module of the electronic control unit; based on the request, the hardware security module acquires a unique identification code of the electronic control unit from an operating system module; based on the unique identification code, the hardware security module generates a first derived key through a key derivation algorithm, wherein the key derivation algorithm is also used to generate a second derived key during the encryption process of the sensitive information, and the second derived key is the same as the first derived key; based on the first derived key, the hardware security module decrypts the sensitive information in ciphertext form through a symmetric encryption algorithm to obtain sensitive information in plaintext form, wherein the symmetric encryption algorithm is also used to encrypt the sensitive information according to the second derived key during the encryption process of the sensitive information to generate the sensitive information in ciphertext form; the hardware security module provides the sensitive information in plaintext form to the application module.

[0005] According to the technical solution, sensitive information is encrypted and stored, and the password for encrypting the sensitive information is not stored. In this way, even in the absence of a dedicated ROM and TEE interface specifically for storing sensitive information, hardware-level security control of sensitive information can be achieved. In addition, the password for encrypting sensitive information depends on the unique identifier of the electronic control unit. In this way, even if the content stored in the electronic control unit is copied as a whole to other electronic control units, other electronic control units will not be able to crack the sensitive information because they cannot obtain the unique identification code of the electronic control unit.

[0006] According to at least one embodiment of the present disclosure, based on the first derived key, before the hardware security module decrypts the sensitive information in ciphertext form through a symmetric encryption algorithm, it also includes: the hardware security module parses a first parameter and sensitive information in ciphertext form from an encrypted file including the sensitive information in ciphertext form, wherein the first parameter is used as an input parameter of the symmetric encryption algorithm, and generates the encrypted file based on the first parameter and the sensitive information in ciphertext form during the encryption process of the sensitive information.

[0007] According to this embodiment, the security of encryption of sensitive information is increased by the first parameter, and the first parameter is stored in the encrypted file, so the encrypted file can be parsed during the decryption process to obtain and use the first parameter.

[0008] According to at least one embodiment of the present disclosure, before decrypting the sensitive information in ciphertext, the method further includes: encrypting the sensitive information in plaintext based on the unique identification code.

[0009] According to at least one embodiment of the present disclosure, based on the unique identification code, sensitive information in plain text is encrypted, including: in response to a storage request for sensitive information, the hardware security module obtains the unique identification code of the electronic control unit from the operating system module; based on the unique identification code, the hardware security module generates the second derived key through the key derivation algorithm; based on the second derived key, the hardware security module encrypts the sensitive information through the symmetric encryption algorithm to obtain the sensitive information in ciphertext form.

[0010] According to at least one embodiment of the present disclosure, based on the second derived key, before the hardware security module encrypts the sensitive information through the symmetric encryption algorithm, it also includes: generating the first parameter.

[0011] According to at least one embodiment of the present disclosure, according to the second derived key, the hardware security module encrypts the sensitive information through the symmetric encryption algorithm to obtain sensitive information in ciphertext form, including: according to the second derived key and the first parameter, encrypting the sensitive information through the symmetric encryption algorithm.

[0012] According to at least one embodiment of the present disclosure, after obtaining the sensitive information in ciphertext form, the method further includes: The encrypted file is generated according to the sensitive information in ciphertext form and the first parameter.

[0013] According to another aspect of the present disclosure, an electronic control unit is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is capable of executing the computer program so that a hardware security module of the electronic control unit executes the processing method as described in any one of the above items.

[0014] According to yet another aspect of the present disclosure, a vehicle is provided, comprising the electronic control unit as described above.

[0015] According to another aspect of the present disclosure, a computer program product is provided. The computer program product comprises a computer program. When the computer program is executed by a processor, the computer program is at least used to implement the processing method according to any one of the preceding claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0017] Figure 1 It is a schematic diagram of a schematic application scenario according to the present disclosure.

[0018] Figure 2 It is a flowchart of the decryption process of the method for processing sensitive information according to one embodiment of the present disclosure.

[0019] Figure 3 It is a flowchart of the encryption process of the sensitive information processing method according to one embodiment of the present disclosure.

[0020] Figure 4 It is an interactive schematic diagram of the encryption process of a method for processing sensitive information according to an embodiment of the present disclosure.

[0021] Figure 5 It is an interactive schematic diagram of the encryption process of a method for processing sensitive information according to another embodiment of the present disclosure.

[0022] Figure 6 It is an interactive schematic diagram of the decryption process of the sensitive information processing method according to another embodiment of the present disclosure.

[0023] Figure 7 It is an interactive schematic diagram of the decryption process of the sensitive information processing method according to another embodiment of the present disclosure.

[0024] Figure 8 It is an application schematic diagram according to an embodiment of the present disclosure.

[0025] Fig. 9It is an application schematic diagram according to an embodiment of the present disclosure.

[0026] Fig.10 is a schematic block diagram of an in-vehicle electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0028] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] In order to ensure the security of vehicle data and information, an HSM (hardware security module) is included in the vehicle's electronic control unit. HSM is used to store sensitive information such as certificates, keys, digital signatures, and to perform encryption operations. In order to ensure that this sensitive information is not stolen, the use of HSM depends on hardware and needs to be equipped with separate ROM and TEE interfaces. In the related technology, a dedicated ROM (read-only memory) is used to store this sensitive information and provide isolated operations (for example, encryption and decryption operations are performed in a secure environment), and a TEE interface is used to manage the security of the HSM, and data can be provided to the application module of the electronic control unit via the TEE interface.

[0030] However, if the dedicated ROM or TEE interface fails or the electronic control unit does not have an integrated dedicated ROM or TEE interface, the security of the HSM cannot be managed in hardware through the dedicated ROM or TEE interface.

[0031] The inventors of the present disclosure have carefully studied how to achieve hardware-level control over sensitive information through HSM without a dedicated ROM and TEE interface.

[0032] To this end, in the technical solution proposed in the present disclosure, dedicated ROM and TEE interface are not relied on, and sensitive information is encrypted and stored, the encryption key is not stored, and the encryption process is based on a unique identification code that cannot be obtained from the outside. This ensures that, except for the HSM, other hardware cannot decrypt the ciphertext of sensitive information.

[0033] In order to facilitate a clear understanding of the technical solution of the present disclosure, some terms used in the present disclosure are first described below.

[0034] Hardware Security Module: In the field of automotive electronics, it usually refers to a specific area on an independent chip or a system on chip (SOC). Hardware security modules can be used to control sensitive information such as certificates and keys.

[0035] Electronic control unit: can be a vehicle's domain controller, a vehicle's ECU, a vehicle's central computing unit, etc.

[0036] As an example, with the development of technology, various data interactions occur between vehicles and external devices. Figure 1 As shown, various scenarios such as vehicle information collection and synchronization, remote diagnosis, OTA (Over-the-Air) update and upgrade, V2X (vehicle-to-everything) communication, autonomous driving, service and maintenance all require the vehicle to transmit data to the outside. During the interaction process, the privacy of the data needs to be ensured. Take the transmission of the transmitted data after encryption with an encryption key as an example function description. The encryption key is stored in the electronic control unit of the vehicle, for example, in the corresponding domain controller. Before transmitting the data, the electronic control unit uses the encryption key to encrypt the data before transmitting it. The management and control of encryption keys and data encryption can be completed by the HSM of the electronic control unit. Obviously, the security of the encryption key is particularly important. If the encryption key is cracked, the transmitted data will also be leaked. In addition, when using certificates and digital signatures, the same reason applies, and the security of certificates and digital signatures needs to be guaranteed. As mentioned above, in the related art, the use of dedicated ROM and TEE interfaces can ensure the security of sensitive information. However, in the absence of dedicated ROM and TEE interfaces, how to ensure the security of sensitive data at the hardware level is a technical problem to be solved by this application.

[0037] Therefore, a technical solution for securely processing sensitive information is proposed in the present disclosure. The sensitive information mentioned in the present disclosure is not limited to certificates, keys, digital signatures, etc. It can be any information whose security needs to be managed.

[0038] According to an embodiment of the present disclosure, a method for processing sensitive information is provided. The method for processing sensitive information can be executed by a hardware security module of an electronic control unit of a vehicle. The electronic control unit can be, for example, a domain controller of the vehicle. The method for processing sensitive information can be used to decrypt sensitive information in ciphertext form.

[0039] In this embodiment, the sensitive information is stored after being encrypted, and the password used to encrypt the sensitive information is not stored. Therefore, if the encrypted password cannot be obtained, the encrypted sensitive information cannot be decrypted. In the related art, because there is a dedicated ROM or TEE interface, the sensitive information is directly stored on the dedicated ROM, and the sensitive information is not encrypted. Therefore, the decryption process of this embodiment is a technical solution for decrypting an encrypted file containing ciphertext of sensitive information, which does not rely on the dedicated ROM and TEE interface, and can also achieve hardware-level control of sensitive information.

[0040] Figure 2 FIG. 1 is a schematic flow chart of a method for processing sensitive information according to an embodiment of the present disclosure. Figure 2 As shown, the method for processing sensitive information may include steps S210 to S250.

[0041] In step S210, the hardware security module receives a sensitive information acquisition request from an application module of the electronic control unit. In the present disclosure, the application module may be a module that executes various application programs (APPs). It should be understood that there are multiple application modules in an electronic device such as a domain controller to implement different functions. As an example, the application module may be a FOTA (Firmware Over-The-Air) module, a UDS (Unified Diagnostic Services) module, a car cloud module (connecting to a cloud server, remote monitoring, data analysis, software updates, etc.), etc. These modules may be modules that need to be subject to information security control.

[0042] For example, when a wireless firmware upgrade is required, after the vehicle receives the wireless firmware upgrade software, the FOTA module can request the hardware security module to provide sensitive information (such as a key) to decrypt the software. At this time, the hardware security module receives a sensitive information acquisition request from the FOTA module. For example, when providing vehicle data to a cloud server, in order to ensure transmission security, the vehicle data needs to be encrypted using sensitive information (such as a key). At this time, the vehicle cloud module can send a sensitive information acquisition request to the hardware security module.

[0043] After the hardware security module receives a request to obtain sensitive information, it needs to provide the sensitive information to the corresponding module for its use.

[0044] In step S220, based on the sensitive information acquisition request from the application module, the unique identification code of the electronic control unit is obtained. The unique identification code of the electronic control unit can be the device number of the electronic control unit, for example, it can be the device number written by the manufacturer of the electronic control unit when manufacturing the electronic control unit. The device number can be a string of random numbers, or a string of numbers generated according to rules, or a code consisting of numbers and letters. The unique identifier can be used to determine the uniqueness of the electronic control unit. As other optional embodiments, other unique identification codes can also be used as the unique identification code of the electronic control unit. For example, the device number of the system-level chip can be selected as the unique identification code. It should be understood that as long as the code exists in the electronic control unit and can uniquely identify the electronic control unit, it can be used as the unique identification code of the electronic control unit. The unique identification code is set so that external devices cannot read it from the electronic control unit.

[0045] The unique identification code of the electronic control unit can be stored in a storage unit of the operating system module of the electronic control unit. In this way, the hardware security module can send an acquisition request to the operating system module, and the operating system module provides the unique identification code to the hardware security module according to the request.

[0046] In the related art, due to the existence of a dedicated ROM and TEE interface, sensitive information can be directly stored in a dedicated ROM without encrypting the sensitive information. Unlike the related art, the sensitive information disclosed in the present invention is encrypted and stored. Therefore, in the technical solution of the present invention, the encrypted file containing the ciphertext of sensitive information is decrypted based on the unique identification code to obtain the plaintext of the sensitive information for use by the application module. Therefore, in step S230, based on the obtained unique identification code, the hardware security module generates a first derived key through a key derivation algorithm. The key derivation algorithm can be a key derivation algorithm such as HKDF (HMAC-basedExtract-and-Expand Key Derivation Function), PBKDF2 (Password-Based KeyDerivation Function 2), SP 800-108 KDF (Key Derivation Function), Argon2, Scrypt, etc. The unique identification code can be input as a salt value (salt) of the key derivation algorithm. The derived key is finally iterated to ensure the uniqueness of the derived key. The number of iterations can be configured, for example, 10,000 iterations.

[0047] In step S240, according to the first derived key, the hardware security module decrypts the ciphertext sensitive data through a symmetric encryption algorithm to obtain the plaintext sensitive data. The symmetric encryption algorithm includes but is not limited to: AES-192-CBC algorithm, AES-256-CBC algorithm, AES-128-CBC algorithm, Twofish-CBC algorithm, Camellia-CBC algorithm, etc.

[0048] In step S250, the hardware security module provides the plaintext sensitive information to the application module mentioned in step S210. Afterwards, the application module may use the plaintext sensitive information to encrypt the data to be processed.

[0049] It can be understood from the above description that the decryption process needs to be based on the unique identification code of the electronic control unit, and the decryption of the sensitive information in ciphertext can only be completed in a specific electronic control unit. The specific electronic control unit is an electronic device unit that encrypts sensitive data. Therefore, even if the sensitive information in ciphertext is copied to other electronic devices, other electronic devices cannot decrypt the sensitive information in ciphertext because they cannot obtain the unique identification code of the specific electronic device.

[0050] According to a further embodiment of the present disclosure, before the hardware security module decrypts the sensitive information in ciphertext form through a symmetric encryption algorithm based on the first derived key, it also includes: the hardware security module parses a first parameter and the sensitive information in ciphertext form from an encrypted file including the sensitive information in ciphertext form, wherein the first parameter serves as an input parameter of the symmetric encryption algorithm, and generates an encrypted file based on the first parameter and the sensitive information in ciphertext form during the encryption process of the sensitive information.

[0051] Usually, sensitive information in ciphertext form is stored in an encrypted file. In the technical solution disclosed herein, the above-mentioned first parameter is also stored in the encrypted file. The content of the first parameter can be found in the following description. The first parameter can be stored in a certain byte segment of the encrypted file and can be inserted into the sensitive information in ciphertext form. The encrypted file will be described in detail in the following encryption process.

[0052] The purpose of this disclosure is to provide hardware-level sensitive information control when the dedicated ROM and TEE interfaces do not exist or fail. Even if the stored contents of the electronic control unit are copied as a whole to other electronic control units, other electronic control units cannot crack the sensitive information. Therefore, before the decryption process of the sensitive information described above, the electronic control unit also implements an encryption step. During the encryption process, the plaintext sensitive information is also encrypted based on the unique identification code of the electronic device.

[0053] Therefore, the sensitive information processing method disclosed in the present invention may also include the following contents. Figure 3 A further flow chart of the processing method is shown.

[0054] In step S310, in response to a storage request for sensitive information, the hardware security module obtains a unique identification code of the electronic control unit from the operating system module. The request for sensitive information may be issued by an external device, such as a cloud server, an external diagnostic device, etc. The hardware security module may receive sensitive information from an external device.

[0055] In step S320, the hardware security module generates a second derived key through a key derivation algorithm. In the present application, the key derivation algorithm may be HKDF (HMAC-based Extract-and-Expand Key Derivation Function), PBKDF2 (Password-Based Key Derivation Function 2), SP 800-108 KDF (Key Derivation Function), Argon2, Scrypt and other key derivation algorithms, as in the decryption process described above. It should be noted that the encryption process and the decryption process use the same key derivation algorithm. In addition, the algorithm parameters are also the same during the encryption process and the decryption process using the key derivation algorithm, such as the first parameter is the same, the number of iterations is the same, etc. In this way, a second derived key identical to the first derived key can be obtained based on the same unique identification code. Specifically, the unique identification code can be input into the key derivation algorithm as a salt value. Afterwards, the key derivation algorithm performs iterative calculations, and the number of iterations can be set. After the iterative calculations, the final derived key is generated.

[0056] In step S330, based on the second derived key generated in step S320, the hardware security module encrypts the sensitive information through a symmetric encryption algorithm to obtain the sensitive information in ciphertext form. The symmetric encryption algorithm includes but is not limited to: AES-192-CBC algorithm, AES-256-CBC algorithm, AES-128-CBC algorithm, Twofish-CBC algorithm, Camellia-CBC algorithm, etc.

[0057] In this embodiment, the plaintext sensitive data may be encrypted according to the second derived key generated in step S320, wherein the encryption algorithm is a symmetric encryption algorithm, and the decryption process also uses the encryption algorithm. In addition, if the first parameter is used as the input of the encryption algorithm during the encryption process, the first parameter is also used as the input of the encryption algorithm during the decryption process.

[0058] Further, according to a further embodiment of the present disclosure, before the hardware security module encrypts the sensitive information by a symmetric encryption algorithm according to the second derived key, it also includes: the hardware security module generates a first parameter. As an example, the first parameter can be a random number used as an initialization vector or a padding value. In the case where the initialization vector is used as the first parameter, a random number of a fixed length can be generated by a random number generator as the first parameter. In the case where a padding value is used as the first parameter, the padding value is the padding value for padding the encrypted file described below. A timestamp can also be used as the first parameter.

[0059] Therefore, when the first parameter is used, the hardware security module encrypts the sensitive information using a symmetric encryption algorithm based on the second derived key and the first parameter. It should be understood that if the first parameter is used in the encryption process, the first parameter will also be used in the decryption process.

[0060] According to a further embodiment of the present disclosure, during the encryption process, after obtaining the sensitive information in ciphertext form, an encrypted file can be generated based on the sensitive information in ciphertext form and the first parameter. As an example, the first parameter can be inserted into certain fields of the encrypted file to form an encrypted file having the sensitive information in ciphertext form and the first parameter. In addition, during the decryption process, the encrypted file will be parsed to obtain the sensitive information in ciphertext form and the first parameter. In addition, in the case where the total number of bytes of the sensitive information in ciphertext form and the first parameter is not a multiple of the size of the encryption block of the symmetric encryption algorithm, it is necessary to use a padding value to fill the data, so that the number of bytes of the filled data is ultimately a multiple of the size of the encryption block. In the present disclosure, the encrypted file can be a file in binary format.

[0061] According to the technical solution disclosed in the present invention, in the process of storing sensitive information in the hardware security module, the sensitive information is first encrypted through an encryption process to obtain an encrypted file of the sensitive information in ciphertext form, and then stored, wherein the storage does not rely on a dedicated ROM, and in the decryption process, the sensitive information is decrypted to obtain the sensitive information in plaintext form. Subsequently, other modules of the domain controller can use the sensitive information in plaintext form. In this process, the security environment formed by the TEE interface is not required.

[0062] The technical solution of the present disclosure will be exemplified below with reference to specific examples. It should be noted that the following content is only to help understand the technical solution of the present disclosure, and is not intended to limit the scope of the present disclosure.

[0063] Taking the domain controller of a vehicle as an example, the electronic control unit in this article is a domain controller. In the vehicle, multiple different domains are divided according to function or location, and different domains use different domain controllers. For example, it can be divided into a power domain, a chassis domain, a body domain, a cockpit domain, and an autonomous driving domain, or it can be divided into an intelligent driving domain, an intelligent cabin domain, a dynamic domain, and a power domain. The technical solution disclosed in this disclosure can be applied to any domain controller.

[0064] The Automotive Open System Architecture (AUTOSAR) includes a Hardware Security Module (HSM), which is responsible for the information security of the domain controller, provides a secure communication channel, and securely stores sensitive information, such as keys and certificates for various purposes. The hardware security module can be an independent chip or a partition on the main chip. Take the hardware security module as a partition of the main chip as an example, that is, the hardware security module is a necessary module of the main chip.

[0065] During the process of manufacturing the domain controller by the domain controller manufacturer, the device number will be written, wherein the device number can be used as the unique identification code of the main chip, wherein the device number can be stored in the memory of the main chip. In addition, the device numbers of other components in the domain controller can also be selected as the unique identification code of the domain controller. For example, in the case where the hardware security module is a separate chip, its device number can be selected as the unique identification code of the domain controller. In addition, those skilled in the art should understand that in addition to the device number, any suitable information can also be used as a unique identification code, as long as it can be distinguished from other domain controllers and uniqueness is guaranteed. In various embodiments of the present disclosure, the unique identification code of the domain controller needs to be able to be permanently stored in the domain controller to ensure that it cannot be erased.

[0066] Figure 4 An interactive flow chart of the encryption process in a sensitive information processing method according to a specific embodiment of the present disclosure is shown.

[0067] In step S401, the external device may send a sensitive information write (install) request to the domain controller. The sensitive information may be, for example, certificates, keys, and other information that needs to be stored in the domain controller. When the external device sends the sensitive information write request, the sensitive information may be sent together, or it may be sent after the domain controller generates a derived key. Figure 4In the embodiment, a sensitive information write request and sensitive information are sent together. The external device can be an external diagnostic instrument or a cloud server. The external diagnostic instrument is a device that writes sensitive information to the vehicle when the vehicle is offline, and can be connected to the vehicle by wire. In the case where the external device is a cloud server, the cloud server can be wirelessly connected to the vehicle, and the sensitive information write request and sensitive information can be sent to the vehicle wirelessly.

[0068] After the hardware security module (HSM) of the domain controller receives a request to write sensitive information from an external device, it can request a device number from the operating system module (Drive OS) of the domain controller in step S402. After receiving the device number request, the operating system module sends the device number to the hardware security module. In step S403, the hardware security module can obtain the device number.

[0069] In step S404, the hardware security module may generate a second derived key. In this step, the hardware security module generates a second derived key based on the device number through a key derivation algorithm. The key derivation algorithm can refer to the above description. The device number is used as an input to the key derivation algorithm, and the second derived key is generated through iterative calculation. Through this step, a unique derived key can be generated for the domain controller.

[0070] In step S405, after generating the second derived key, the hardware security module may encrypt the plaintext sensitive information from the external device by using the second derived key to generate the ciphertext sensitive information. In this step, the sensitive information is encrypted by using a symmetric encryption algorithm, and the specific algorithm may refer to the above description.

[0071] In step S406, an encrypted file may be generated based on the sensitive information in ciphertext form, and the generated encrypted file may be stored in a memory of the domain controller, for example, in a ROM in the domain controller. In step S407, the domain controller returns a write result (whether the write is successful or not) to the external device.

[0072] Figure 5 An interactive flow chart of the encryption process in a sensitive information processing method according to another specific embodiment of the present disclosure is shown. Figure 5 Steps S501 to S504 of the method of the embodiment are respectively Figure 4 For detailed description of steps S401 to S404 of the method of the embodiment, please refer to the above content.

[0073] In step S505, a first parameter is obtained, wherein the first parameter and the second derived key generated by the device number participate in the encryption operation together, further increasing the complexity and security of encryption. The execution order of step S504 and step S505 is not limited.

[0074] In step S506, the plaintext sensitive information is encrypted according to the generated second derived key and the obtained first parameter. The encryption algorithm may adopt the above-mentioned symmetric encryption algorithm. After the second derived key, the first parameter and the plaintext sensitive information are encrypted by the symmetric encryption algorithm, the ciphertext sensitive information is generated in step S506. In step S507, the encrypted file is generated and stored. When the encrypted file is generated in step S507, the above-mentioned first parameter is inserted into certain sub-stages of the encrypted file. In step S507, the stored encrypted file includes the ciphertext sensitive information and the first parameter, that is, the generated ciphertext sensitive information is stored together with the first parameter as an encrypted file. Step S508 is the same as step S407 and will not be repeated.

[0075] In the above Figure 4 and Figure 5 In an embodiment, sensitive information such as certificates and keys that need to be stored in a domain controller can be encrypted and then stored in the domain controller. Since the sensitive information is encrypted using a derived key generated based on the device number, the sensitive information can be effectively protected. Even if the encrypted file is copied from one hardware to another, the unique identification code such as the device number cannot be obtained in the other hardware, so the encrypted file cannot be decrypted in the other hardware. In order to further improve the security of sensitive information, a first parameter can also be used for encryption during the encryption process, and the first parameter is inserted into the encrypted file for use in decryption.

[0076] In the technical solution of the present disclosure, encryption and decryption are completed in a domain controller. For example, when it is necessary to encrypt sensitive information such as the certificate key of the domain controller, the domain controller needs to encrypt and store the certificate key when storing it, and when using the certificate key, the encrypted file needs to be decrypted to obtain the certificate key for use. The decryption process according to the embodiment of the present disclosure will be described below.

[0077] Figure 6 Shown with Figure 4 The interactive flow chart of the decryption process corresponding to the encryption process.

[0078] In step S601, the application (APP) module may request the hardware security module to obtain sensitive information. The application module may be each application software in the application layer of the domain controller. The application module may be a software module that is subject to information security management and control, such as a FOTA (Firmware Over-The-Air) module, a UDS (Unified Diagnostic Services) module, and a vehicle cloud module. These modules all involve interaction with external devices of the vehicle, so the transmitted data needs to be encrypted during the data transmission process. Before the data is transmitted, it is necessary to encrypt the data with sensitive information before transmitting it. In this embodiment, the sensitive information is encrypted. Figure 4 The embodiment of the invention is described by taking the case where the encrypted data is saved as an example.

[0079] In step S602, after receiving the sensitive information acquisition request, the hardware security module requests the operating system module to acquire the device number. After receiving the request, the operating system module sends the device number. In step S603, the hardware security module acquires the device number.

[0080] In step S604, the hardware security module generates a first derived key. In this step, the obtained device number can be used as the input of the key derivation algorithm to generate the first derived key through the key derivation algorithm. As mentioned above, because the encryption and decryption process uses the same key derivation algorithm and the algorithm parameters are also the same, the first derived key generated according to the device number is the same as the above-mentioned second derived key. In the corresponding steps of encryption and decryption, it is necessary to select the same key derivation algorithm and use the same algorithm parameters such as the number of iterations. The key derivation algorithm is saved in the memory of the domain controller, and the key derivation algorithm can be directly called when generating the derived key during the encryption and decryption process.

[0081] In step S605, the hardware security module may use the key pair derived in step S604 to Figure 6 The encrypted file (sensitive information in ciphertext form) of the embodiment is decrypted. In the decryption process, Figure 4 The same embodiment is the same as that of the embodiment, and the same symmetric encryption algorithm is used for decryption processing. In step S606, the decrypted plain text sensitive information is obtained, and in step S607, the plain text sensitive information is provided to the application module. In this way, the application module can use the sensitive information and encrypt the data to be transmitted with the encryption key.

[0082] Figure 7 Shown with Figure 5 The interactive flow chart of the decryption process corresponding to the encryption process. Figure 7 Steps S701-704 and S708 in the embodiment are respectively Figure 6Steps S601-604 and S607 in the embodiment are the same. Step S704 is the same as step S604 in content, and the key derivation rule is the same, such as selecting the same key derivation algorithm and using the same number of iterations.

[0083] exist Figure 7 In the embodiment of , the encrypted file includes the sensitive information in ciphertext form obtained after the sensitive information is encrypted and the first parameter. Figure 7 In the embodiment of the present invention, the encrypted file needs to be parsed to obtain the first parameter and the sensitive information in ciphertext. In step S705, the first parameter and the sensitive information in ciphertext are obtained by parsing the encrypted file.

[0084] In step S706, the encrypted sensitive information is decrypted using the derived key generated in step S704 and the first parameter parsed in step S705. Figure 5 The embodiment of the present invention is the same as that of the embodiment of the present invention, and the same symmetric encryption algorithm is used for decryption processing. In step S707, the decrypted plain text sensitive information is obtained. In step S708, the plain text sensitive information is sent to the application module for use by the application module.

[0085] It can be seen from the embodiments of the present disclosure that the key for encrypting sensitive information is not stored in the domain controller. In this way, even if the encrypted file of sensitive information is copied to other devices, it cannot be decrypted. Therefore, the technical solution of the present disclosure achieves hardware-level encryption.

[0086] In order to more clearly understand the application scenario of the technical solution of the present disclosure, the interaction between the car cloud module (APP) of the domain controller and the cloud server will be described as an example below. The sensitive information may be the key for encrypting the data sent out by the car cloud module. Figure 8 FIG. 2 shows a schematic diagram of the interaction process according to this embodiment. Figure 8 In the schematic diagram, sensitive information in ciphertext form has been stored in the domain controller as an encrypted file. When the car cloud module needs to transmit data (such as vehicle internal data, operating data, etc.) to the cloud server, the car cloud module requests sensitive information from the hardware security module (step 801), where the sensitive information is used to encrypt the data transmitted by the car cloud module to the cloud server. In step 802, the hardware security module requests the device number from the operating system module (Drive OS). In step 803, the hardware security module obtains the device number. Then, a derived key is generated in step 804, and the encrypted file is decrypted in step 805, so that the sensitive information in plaintext form is obtained in step 806. The specific contents of these steps can be referred to Figure 6 In addition, if the first parameter exists, refer to Figure 7The encryption process can also be referred to in Figure 4 or Figure 5 Embodiment of the invention.

[0087] In step S807, the hardware security module can return the sensitive information in plain text to the car cloud module. After the car cloud module obtains the sensitive information in plain text, the data to be transmitted can be encrypted by the sensitive information in plain text (step S808). After the encryption is completed, in step S809, the car cloud module sends the encrypted encrypted data to the cloud server. After receiving the encrypted data, the cloud server can decrypt the received data by using the key pre-stored in the cloud server. The key pre-stored in the cloud server is the key corresponding to the sensitive information of the domain controller. In the prior art, symmetric keys or asymmetric keys can be used. For example, in the case of an asymmetric key, a private key can be stored in the domain controller, and a public key can be stored in the cloud server. The cloud server decrypts the encrypted data by using the public key.

[0088] Fig. 9 A schematic diagram of the interaction between two electronic control units is shown in FIG. Fig. 9 As shown, the two electronic control units are the first electronic control unit and the second electronic control unit. When data is transmitted between the first electronic control unit and the second electronic control unit, sensitive information needs to be used to encrypt the transmitted data. Taking the second electronic control unit receiving data from the first electronic control unit as an example, the first electronic control unit encrypts the data using the first sensitive information to obtain encrypted data, and the second electronic control unit decrypts the encrypted data using the second sensitive information.

[0089] Before the two electronic control units transmit data, the first sensitive information and the second sensitive information have been stored in the first electronic control unit and the second electronic control unit as encrypted files, respectively. The corresponding sensitive information can be stored in the two electronic control units respectively through an external device. The process of storing the first sensitive information in the first electronic control unit includes steps S901 to S906, and the process of storing the second sensitive information in the second electronic control unit includes steps S921 to S926. The specific contents of these steps can be referred to the above description, and will not be repeated here.

[0090] When the first electronic control unit needs to send data to the second electronic control unit, the hardware security module can be requested through the application module of the application layer of the first electronic control unit to obtain sensitive information for encrypting the data to be transmitted. The specific steps may include steps S907 to S913. The specific contents of these steps can refer to the description above. After the application module of the first electronic control unit obtains the sensitive information, in step S914, the data to be transmitted to the second electronic control unit is encrypted by the sensitive information. Then in step S915, the first electronic control unit sends the encrypted data to the second electronic control unit.

[0091] After the second electronic control unit receives the encrypted data, the application module of the second electronic control unit requests its hardware security module to provide sensitive information. The specific content includes steps S927 to S933, and the specific content can refer to the above description. After the application module of the second electronic control unit obtains the sensitive information, the encrypted data from the first electronic control unit can be decrypted in step S934 to obtain the decrypted data from the first electronic control unit.

[0092] The present disclosure also provides an electronic control unit of a vehicle. Fig.10 Schematic diagram of the electronic control unit is shown. Fig.10 The electronic control unit may include a hardware security module (HSM), multiple application modules (APP1, APP2, ... APPn) and an operating system module. The hardware security module, multiple application modules and operating system module may be implemented on a system-on-chip of the electronic control unit. The system-on-chip refers to a chip that runs an operating system. In the technical solution disclosed in the present invention, encryption and decryption of sensitive information are performed by a hardware security module. In addition, the electronic control unit also includes other circuits, such as a power supply, a communication interface, and the like.

[0093] The electronic control unit may include a processor and a memory, a computer program is stored in the memory, and the processor may call and execute the computer program stored in the memory to enable the hardware security module to perform the following process.

[0094] During the encryption process, the hardware security module responds to a request to write sensitive information from an external device and obtains a unique identification code of the electronic control unit. The unique identification code is then input into a key derivation algorithm to generate a first derived key. Based on the first derived key, the sensitive information is then encrypted using an encryption algorithm to generate and store an encrypted file. The encrypted file can be stored in the system-level chip and does not need to be stored in a ROM specifically used to store sensitive information.

[0095] During the decryption process, the hardware security module: in response to the read request of the sensitive information of the application module of the electronic control unit, the hardware security module obtains the unique identification code of the electronic control unit. Then the unique identification code is input into the key derivation algorithm to generate a second derived key, where the second derived key is the same as the first derived key. Finally, the encrypted file is decrypted by the second derived key, and the decrypted sensitive information is provided to the application module.

[0096] According to a further embodiment of the electronic control unit, the hardware security module further includes obtaining a first parameter before encrypting the sensitive information through the encryption algorithm. When encrypting the sensitive information through the encryption algorithm, the sensitive information is encrypted through the encryption algorithm based on the first derived key and the first parameter, and then an encrypted file is generated, wherein the encrypted file includes the sensitive information in ciphertext form and the first parameter.

[0097] Furthermore, before decrypting the encrypted file, the hardware security module further includes: parsing a first parameter from the encrypted file, and when decrypting the encrypted file, decrypting the ciphertext sensitive information based on the second derived key and the parsed first parameter to obtain the sensitive information. In the encryption process and the decryption process, the key derivation rule of the key derivation algorithm is the same.

[0098] The specific implementation in the electronic control unit of the present application can refer to the implementation process of the corresponding steps in the above-mentioned method implementation mode of the present disclosure, which will not be repeated here.

[0099] According to an embodiment of the present disclosure, a vehicle is also provided. The vehicle includes the above-mentioned electronic control unit. The electronic control unit can interact with external devices outside the vehicle, for example, it can interact with cloud servers, diagnostic instruments, etc. The electronic control unit is preferably a domain controller of the vehicle.

[0100] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0101] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.

[0102] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0103] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0107] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

[0108] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for processing sensitive information, characterized in that: A hardware security module applied to an electronic control unit of a vehicle, the processing method is capable of decrypting sensitive information in ciphertext form and comprises: The hardware security module receives a sensitive information acquisition request from an application module of the electronic control unit; Based on the request, the hardware security module obtains a unique identification code of the electronic control unit from the operating system module; Based on the unique identification code, the hardware security module generates a first derived key by a key derivation algorithm, wherein the key derivation algorithm is also used to generate a second derived key during encryption of sensitive information, and the second derived key is the same as the first derived key; According to the first derived key, the hardware security module decrypts the sensitive information in ciphertext form by using a symmetric encryption algorithm to obtain the sensitive information in plaintext form, wherein the symmetric encryption algorithm is also used to encrypt the sensitive information according to the second derived key during the encryption process of the sensitive information to generate the sensitive information in ciphertext form; The hardware security module provides the sensitive information in plain text to the application module.

2. The method for processing sensitive information according to claim 1, characterized in that: According to the first derived key, before the hardware security module decrypts the sensitive information in ciphertext form by using a symmetric encryption algorithm, the method further includes: The hardware security module parses a first parameter and sensitive information in ciphertext from an encrypted file including sensitive information in ciphertext, wherein the first parameter serves as an input parameter of the symmetric encryption algorithm, and the encrypted file is generated according to the first parameter and the sensitive information in ciphertext during the encryption process of the sensitive information.

3. The method for processing sensitive information according to claim 2, characterized in that: Before decrypting the ciphertext sensitive information, it also includes: Based on the unique identification code, the plain text sensitive information is encrypted.

4. The method for processing sensitive information according to claim 3, characterized in that: Based on the unique identification code, encrypting the plaintext sensitive information includes: In response to a storage request for sensitive information, the hardware security module obtains a unique identification code of the electronic control unit from the operating system module; Based on the unique identification code, the hardware security module generates the second derived key by using the key derivation algorithm; According to the second derived key, the hardware security module encrypts the sensitive information through the symmetric encryption algorithm to obtain the sensitive information in ciphertext form.

5. The method for processing sensitive information according to claim 4, characterized in that: According to the second derived key, before the hardware security module encrypts the sensitive information through the symmetric encryption algorithm, it also includes: generating the first parameter.

6. The method for processing sensitive information according to claim 5, characterized in that: According to the second derived key, the hardware security module encrypts the sensitive information by using the symmetric encryption algorithm to obtain sensitive information in ciphertext form, including: The sensitive information is encrypted using the symmetric encryption algorithm according to the second derived key and the first parameter.

7. The method for processing sensitive information according to claim 5, characterized in that: After obtaining the sensitive information in ciphertext form, it also includes: The encrypted file is generated according to the sensitive information in ciphertext form and the first parameter.

8. An electronic control unit, characterized in that: The electronic control unit comprises a processor and a memory, wherein the memory stores a computer program, and the processor is capable of executing the computer program so that the hardware security module of the electronic control unit executes the processing method according to any one of claims 1 to 7.

9. A vehicle, characterized in that: The vehicle comprises an electronic control unit as claimed in claim 8.

10. A computer program product, characterized in that The computer program product comprises a computer program, which is used to implement at least the processing method according to any one of claims 1 to 7 when executed by a processor.