OTA upgrade security authentication method and device, and storage medium
The proposed OTA upgrade security authentication method uses key wrapping and session keys to securely and efficiently authenticate automotive OTA upgrades, addressing the risk of key compromise and storage bottlenecks in existing systems.
Patent Information
- Application Number
- CN202411366111.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
AI Technical Summary
Existing automotive OTA upgrade systems face security risks due to the use of a single key for signing all OTA version packages, which can be compromised, leading to unauthorized access and data tampering, and the encryption machine faces efficiency and storage bottlenecks from frequent key generation and deletion.
A method using key wrapping technology to generate authentication keys within the encryption machine, storing certificates in an external memory, and employing session keys to authenticate OTA upgrades, minimizing key exposure and optimizing storage usage.
This approach ensures secure, efficient authentication of OTA upgrades by using one package and one secret, reducing the risk of key leakage and improving encryption machine performance by avoiding frequent key operations.
Smart Images

Figure CN119201174A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile information security technology, and in particular to an OTA upgrade security authentication method, device and storage medium. Background Art
[0002] With the development of intelligent and connected cars, the complexity of car software has also increased greatly. Vehicle manufacturers use OTA (Over-the-Air Download Technology) on cars to implement system upgrades, application updates, vulnerability repairs and function activation of auto parts. OTA upgrades have become an important technology in the field of intelligent connected cars, allowing vehicle manufacturers to remotely update vehicle software to provide new functions, improve performance or solve security issues. If unauthorized access, data tampering or potential malicious attacks occur during the transmission of OTA upgrade packages, it will have a significant impact on the user's privacy, property and even life safety. Therefore, security measures need to be taken in car OTA upgrades to ensure the credibility and integrity of the upgrade package.
[0003] At present, in the method of taking security measures to achieve automotive OTA upgrade security authentication, digital signatures and PKI digital certificate systems are usually combined to solve data integrity and identity credibility issues. However, in the intelligent connected car OTA scenario, there are characteristics of frequent OTA version releases and high frequency of remote signature service calls. If a single key is used to sign all OTAs, there is a risk that all OTA version packages will be affected once the key is leaked. Therefore, in the field of intelligent connected OTA, a highly secure OTA upgrade security authentication solution is needed. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present application proposes an OTA upgrade security authentication method, device and storage medium, which can solve the security and performance problems of OTA upgrade security authentication based on digital signature and PKI digital certificate system.
[0005] In a first aspect, the present application provides an OTA upgrade security authentication method, which is applied to a server, wherein the server includes an encryption machine and an external memory, wherein the encryption machine is used to store a session key, and the external memory is used to store an authentication certificate; the method includes:
[0006] In response to a vehicle-side OTA upgrade request, the OTA upgrade file is determined according to the vehicle-side OTA upgrade request, an authentication certificate corresponding to the OTA upgrade file is obtained from the external memory, the OTA upgrade file is authenticated using the session key in the encryption machine to generate an authentication result, and the authentication result and the authentication certificate are sent to the vehicle-side.
[0007] In some implementation schemes, a symmetric key is pre-installed in the encryption machine; the method further includes: the server generates an authentication public key and an authentication private key corresponding to the OTA upgrade file in the encryption machine, encrypts the authentication private key using the symmetric key to obtain a wrapping key, and exports the wrapping key and the authentication public key from the encryption machine;
[0008] The server generates an authentication certificate corresponding to the OTA upgrade file based on the exported authentication public key; stores the authentication certificate and the wrapping key in the external memory, and deletes the authentication public key and the authentication private key in the encryption machine.
[0009] Furthermore, before using the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result, the method further includes:
[0010] Query whether a session key is stored in the encryption machine;
[0011] If yes, then executing the step of using the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result;
[0012] Otherwise, obtain the packaging key corresponding to the OTA upgrade file from the external memory, use the symmetric key to decrypt the packaging key in the encryption machine to obtain the authentication private key, and store the decrypted authentication private key as the session key in the encryption machine, and then execute the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result.
[0013] Furthermore, the method also includes: regularly clearing the session key stored in the encryption machine according to a preset time period.
[0014] In some implementation schemes, the server generates an authentication certificate corresponding to the OTA upgrade file based on the exported authentication public key as follows: the server passes the exported authentication public key to a PKI service to generate an authentication certificate corresponding to the OTA upgrade file.
[0015] In some implementation schemes, using the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result is specifically: using the session key in the encryption machine to perform a signing operation on the OTA upgrade file to generate a digital signature result, and using the digital signature result as the authentication result.
[0016] In some implementation schemes, the session key stored in the encryption machine and the authentication certificate stored in the external memory correspond one-to-one to the version of the OTA upgrade file.
[0017] In the second aspect, the present application provides an OTA upgrade security authentication method, which is applied to the vehicle side, and the method includes: responding to the authentication result and authentication certificate from the above-mentioned server side; the vehicle side checks whether the authentication certificate is legal, and if so, obtains the authentication public key based on the authentication certificate; uses the authentication public key to verify the authentication result, otherwise the authentication fails. Wherein, the authentication public key is the authentication public key corresponding to the OTA upgrade file generated by the server in the encryption machine, and after the server exports the authentication public key to the encryption machine and generates the authentication certificate and stores it in the external memory, it will delete the authentication public key in the encryption machine.
[0018] In a third aspect, the present application provides a smart device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned OTA upgrade security authentication method is implemented.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the OTA upgrade security authentication method described in any one of the technical solutions of the above-mentioned OTA upgrade security authentication method.
[0020] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:
[0021] In the technical solution of the present application, the encryption machine of the server is used to store the session key, and the external memory of the server is used to store the authentication certificate; the server responds to the vehicle-side OTA upgrade request, determines the OTA upgrade file according to the vehicle-side OTA upgrade request, obtains the authentication certificate corresponding to the OTA upgrade file from the external memory, uses the stored session key in the encryption machine to authenticate the OTA upgrade file to generate an authentication result, and sends the authentication result and the authentication certificate to the vehicle. The present application proposes a trusted OTA upgrade authentication scheme based on authentication certificate and session key technology, which realizes one package and one secret for OTA upgrade, solves the security problem of trusted authentication of OTA upgrade data, avoids the operation of frequently creating and deleting keys by the encryption machine, and improves the efficiency of encryption machine authentication operation. In addition, in the scheme of the present application, when there is no session key in the encryption machine, the wrapping key corresponding to the OTA upgrade file is obtained from the external memory, and then the pre-set symmetric key is used in the encryption machine to decrypt the wrapping key to obtain the authentication private key. The scheme proposed in the present application uses the key wrapping technology to realize that all key generation and authentication operations are completed in the encryption machine without occupying the storage space of the encryption machine, effectively solving the efficiency problem of trusted authentication of OTA upgrade data. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The disclosure of the present application will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. In addition, similar numbers in the drawings are used to represent similar components, among which:
[0023] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;
[0024] Figure 2 This is a schematic diagram of the main steps of an OTA upgrade security authentication method according to an embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of the main steps of generating an authentication key according to an embodiment of the present application;
[0026] Figure 4 This is a schematic diagram of the main steps of generating an authentication result according to an embodiment of the present application;
[0027] Figure 5 It is a schematic block diagram of a composition of an OTA upgrade security authentication system according to an embodiment of the present application;
[0028] Figure 6 It is a schematic diagram of the main structure of a smart device according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0030] In the description of the present application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program code, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include only A, only B or A and B. The singular terms "one" and "the" may also include plural forms.
[0031] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.
[0032] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.
[0033] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.
[0034] Some technical terms involved in this application are explained below.
[0035] OTA: The full name is Over-the-Air Technology, which means "over-the-air download technology". It is a technology that can download and install updated software without a wired connection. In the automotive field, OTA upgrades allow cars to receive and install updates via wireless networks, thereby improving vehicle performance and system functions. This technology is mainly suitable for pure electric vehicles or models equipped with Internet car systems.
[0036] PKI: The full name is Public Key Infrastructure, which is a key management system that follows established standards. It can provide cryptographic services such as encryption and digital signatures as well as the necessary key and certificate management system for all network applications. PKI uses certificates for public key management and bundles the user's public key and other identification information together through a third-party trusted organization to verify the user's identity online.
[0037] CA: The full name is Certificate Authority. It is a certificate issuing agency, an authoritative organization responsible for issuing and managing digital certificates. As a trusted third party, it is responsible for verifying the legitimacy of public keys in the public key system.
[0038] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0039] like Figure 1 As shown, it is a schematic diagram of the application scenario of the embodiment of the present application. The application scenario diagram includes a terminal 110 and a server 120. In the embodiment of the present application, the terminal 110 includes but is not limited to mobile phones, computers, smart home appliances, vehicles and other devices; the terminal can be installed with a client related to software upgrade management, etc., and the client can be software, or a web page, a small program, etc. The server 120 is a background server corresponding to the software or web page, small program, etc., or a server specifically used to manage OTA upgrade services, which is not specifically limited in this application. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms.
[0040] It should be noted that the OTA upgrade security authentication method of the embodiment of the present application can be applied to Figure 1 In the hardware environment shown in the figure composed of a terminal 110 and a server 120, the method is implemented by the cooperation between the terminal 110 and the server 120, wherein the server 120, as the executor of the OTA upgrade security authentication, is mainly used to generate a secure OTA upgrade file and send it to the terminal 110, and the terminal 110, as the executor of the OTA upgrade security authentication, is mainly used to perform security authentication on the OTA upgrade package.
[0041] When the terminal 110 is specifically a smart connected car, in the smart connected car OTA upgrade application scenario, there are characteristics of frequent OTA version releases and high frequency of remote signature service calls. If a single key is used to sign all OTA version upgrade packages, once the private key is leaked, all OTA version upgrade packages will be affected, so using one package and one key can minimize the risk of key leakage. However, for one package and one key, in order to prevent the leakage of private keys, key generation and signature operations must be completed in the encryption machine. In scenarios with high frequencies of key generation and signature requests, the encryption machine processing efficiency and storage capacity will have bottlenecks. Therefore, in the field of smart connected car OTA, a highly secure and efficient technical solution for OTA upgrade security authentication is needed.
[0042] To this end, this application proposes an OTA upgrade security authentication scheme that combines key wrapping / key unwrapping, PKI / CA, and session key technology based on the characteristics of the OTA service of intelligent connected vehicles. Among them, key wrapping (PKCS#11Wrapper) and key unwrapping (Unwrapper) technology allow keys and data to be wrapped in a secure form to ensure that they are not subject to unauthorized access or leakage. This wrapping technology usually involves using an encryption algorithm to wrap keys and data into ciphertext, and then using a specific unwrapping method to restore it. The encryption machine session key is a temporary key used to encrypt and decrypt data. It is usually generated at the beginning of a communication session and discarded after the session ends to ensure the security and privacy of the communication.
[0043] It should be noted that the OTA upgrade security authentication method of this application is applicable to the following two types of OTA. One is the firmware online upgrade FOTA (Firmware-Over-the-Air), which means that without changing the original accessories of the vehicle, by writing a new firmware program, the device with networking function is upgraded, including the vehicle's engine, motor, gearbox, chassis and other control systems. The other is the software online upgrade SOTA (Software-Over-the-Air), which is to upgrade the application based on the operating system, which refers to those applications that are closer to the user, UI interface and vehicle map, human-computer interaction interface and other functions, such as entertainment system update operation interface or theme.
[0044] like Figure 2 As shown, it is the main step flow of the OTA upgrade security authentication method of an embodiment of the present application. The method is applied to the server side. The execution subject of the method can be specifically an OTA server. The server side also includes an encryption machine and an external memory. The encryption machine is used to store session keys, and the external memory is used to store authentication certificates. It should be understood that the encryption machine and the external memory usually exist in the form of a cloud server, such as a cloud encryption machine and a cloud memory. As shown in the figure, the OTA upgrade security authentication method of this embodiment mainly includes the following steps S11 to S14:
[0045] Step S11: In response to the vehicle-side OTA upgrade request, determining an OTA upgrade file according to the vehicle-side OTA upgrade request;
[0046] Specifically, the vehicle-side OTA upgrade request can be understood as an upgrade request initiated by the vehicle-side to the server-side, or as an upgrade request actively initiated by the server-side. The vehicle-side OTA upgrade request includes the version of the OTA upgrade file, based on which the OTA upgrade file can be determined. The OTA upgrade file in this embodiment can be understood as a whole package file formed by concatenating the hash values of the upgrade packages of various functional components of the car. The OTA upgrade file is specifically used to implement the upgrade of various functional components on the vehicle-side.
[0047] Step S12: Obtaining an authentication certificate corresponding to the OTA upgrade file from an external memory;
[0048] It should be understood that a plurality of authentication certificates corresponding to the versions of the OTA upgrade file may be stored in the external memory at the same time, and the authentication certificate may be a CA certificate issued based on the PKI digital certificate system.
[0049] Step S13: using the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result;
[0050] Specifically, the session key is used in the encryption machine to perform a signing operation on the OTA upgrade file to generate a digital signature result, and the digital signature result is used as the authentication result.
[0051] It should be understood that digital signature technology is a commonly used security authentication method. The embodiments of the present application may also adopt other security authentication methods besides digital signature, which are not limited here.
[0052] Step S14: Send the authentication result and the authentication certificate to the vehicle end.
[0053] It should be understood that the above steps S11 to S14 implement the authentication process of the OTA upgrade file. Prior to this, the process of generating the authentication key is also included. Specifically, Figure 3 As shown, the process of generating the authentication key by the server includes the following steps S21 and S22:
[0054] Step S21: The server generates an authentication public key and an authentication private key corresponding to the OTA upgrade file in the encryption machine, encrypts the authentication private key using a pre-stored symmetric key to obtain a wrapping key, and exports the wrapping key and the authentication public key from the encryption machine;
[0055] Specifically, each authentication key (i.e., authentication public key and authentication private key) generated by the encryption machine corresponds to a version of the OTA upgrade file, i.e., one package and one key. The authentication key uses an asymmetric key, and the key production algorithm for generating the authentication private key (pri_key) and the authentication public key (pub_key) includes but is not limited to the RSA algorithm and the ECC algorithm. The length of the authentication key must comply with relevant security regulations.
[0056] In addition, a symmetric key needs to be preset in the encryption machine, denoted as wrapping_key. The symmetric key may include but is not limited to an AES key. The length of the symmetric key complies with relevant security regulations. In practical applications, the preset symmetric key may be generated and stored in the encryption machine using a symmetric encryption algorithm. The symmetric key is uniformly used to generate a wrapping key and decrypt a wrapping key.
[0057] Step S22: The server generates an authentication certificate corresponding to the OTA upgrade file based on the exported authentication public key; stores the authentication certificate and the wrapping key in an external memory, and deletes the authentication public key and the authentication private key in the encryption machine.
[0058] Specifically, since the authentication public key corresponds one-to-one with the version of the OTA upgrade file, the authentication certificate generated based on the authentication public key also corresponds one-to-one with the version of the OTA upgrade file. The authentication certificate in this embodiment is specifically a CA certificate issued based on the PKI digital certificate system, and the generation process of the authentication certificate can be specifically as follows: the server passes the exported authentication public key into the PKI service to generate an authentication certificate corresponding to the OTA upgrade file. It should be understood that the server is installed with authentication software (such as openssl) that provides PKI services, and the authentication software is called to call the PKI service to generate an authentication certificate.
[0059] In this embodiment, after obtaining the authentication certificate and wrapping key based on the authentication public key and the authentication private key, the authentication certificate and the wrapping key are stored in an external memory, and the authentication public key and the authentication private key in the encryption machine are deleted, which not only realizes one package and one key, but also transfers the storage pressure of the encryption machine.
[0060] In a security authentication method that uses one package and one secret for digital authentication, since the authentication private key cannot leave the encryption machine, although the risk of private key leakage is minimized, the encryption machine is faced with huge storage pressure, which in turn affects the performance of the encryption machine when performing digital authentication and other related operations. To address this issue, the embodiment of the present application adopts key wrapping technology to ensure that key generation and data authentication operations are efficiently completed within the encryption machine without occupying the storage space of the encryption machine, and by using temporary session keys, the encryption machine is avoided from frequently creating and deleting keys, thereby improving the efficiency of encryption machine authentication operations.
[0061] Further, based on the above step S13, a specific implementation method of using the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result is as follows: Figure 4 The process shown includes steps S31 to S34:
[0062] Step S31: Query whether the encryption machine stores a session key, if yes, execute step S34, otherwise execute step S32;
[0063] Step S32: Obtain a packaging key corresponding to the OTA upgrade file from an external memory;
[0064] Step S33: decrypting the wrapping key in the encryption machine using the symmetric key to obtain the authentication private key, and storing the decrypted authentication private key in the encryption machine as the session key;
[0065] Step S34: Using the session key in the encryption machine to authenticate the OTA upgrade file to generate an authentication result.
[0066] Specifically, using the session key to authenticate the OTA upgrade file to generate an authentication result can be specifically as follows: taking the OTA upgrade file as the data to be authenticated, using the session key to calculate the signature value of the data to be authenticated, and generating a digital signature result including the data to be authenticated and the signature value as the authentication result.
[0067] It should be understood that the session key stored in the encryption machine is a temporary key, which is generally automatically deleted from the encryption machine after the session ends, and does not need to be deleted frequently manually, thereby improving the authentication efficiency. Custom clearing logic can also be set for the session key, such as regularly clearing the session key stored in the encryption machine according to a preset time period. In practical applications, in order to improve communication efficiency, the session key is generally reused multiple times, that is, the preset time period is set to a longer time, so that a session key can serve multiple OTA upgrade requests, such as the preset time period, that is, the survival time of the session key is set to 1 hour, or 1 day, or it is set to survive during the startup of the cloud OTA service.
[0068] Furthermore, the present application also provides an OTA upgrade security authentication method, which is applied to the vehicle side, and the method includes:
[0069] In response to the authentication result and authentication certificate from the server; the vehicle side checks whether the authentication certificate is legal, and if so, obtains the authentication public key based on the authentication certificate; uses the authentication public key to verify the authentication result, otherwise the authentication fails. Among them, the authentication public key is the authentication public key generated by the server in the encryption machine corresponding to the OTA upgrade file, and the server will delete the authentication public key in the encryption machine after exporting the authentication public key from the encryption machine and generating the authentication certificate to store it in the external memory. It should be understood that the generation and deletion of the authentication public key and the generation of the authentication certificate can be specifically referred to the process of generating the authentication key by the server in the embodiment of the present application, which will not be repeated here.
[0070] Specifically, the authentication result includes data to be authenticated and a signature value, and the data to be authenticated is the OTA upgrade file (such as a manifest file). The use of the authentication public key to verify the authentication result specifically includes: using the authentication certificate to perform signature verification calculation on the data to be authenticated and the signature value, and according to the signature verification calculation result, it can be determined whether the data to be authenticated has been tampered with.
[0071] Based on the detailed description of the scheme in the embodiments of the present application, it can be known that in the OTA upgrade security authentication scheme proposed in the present application, each OTA version uses a pair of authentication keys separately, and the leakage of the private key of any OTA version will not affect the security of other OTA versions. Private key operations such as authentication key generation and authentication are generated inside the encryption machine, ensuring that the private key will never be exposed to the outside. The authentication certificate is issued by PKI / CA. Except for the vehicle and service ends, no third party can forge the authentication result through man-in-the-middle attacks or other means. The generation of the authentication key uses key wrapping technology to encrypt the authentication key into a wrapping key and export it for storage. Each authentication is first used in the encryption machine to decrypt the wrapping key to obtain the authentication private key, and store it in the encryption machine as a session key. Finally, the authentication operation is performed with the session key, which improves the efficiency of the authentication and transfers the storage pressure of the encryption machine. Therefore, the present application proposes a highly secure and efficient OTA upgrade security authentication scheme.
[0072] Furthermore, the present application also provides an OTA upgrade security authentication system.
[0073] See attached Figure 5 , Figure 5 It is a main structural block diagram of an OTA upgrade security authentication system according to an embodiment of the present application, which mainly includes an OTA cloud 20 and a vehicle terminal 30.
[0074] The OTA cloud 20 mainly includes a cloud encryption machine 201, a cloud storage 202 and an OTA management platform 203;
[0075] The vehicle terminal 30 mainly includes a vehicle-mounted T-Box 301 and multiple ECUs (ECU1\ECU2\ECU3...as shown in the figure) 302 connected to the vehicle-mounted T-BOX through a gateway, wherein the vehicle-mounted T-Box (short for Telematics BOX) is an important component of the Internet of Vehicles system, and multiple ECUs can be understood as upgrade objects.
[0076] Furthermore, the OTA management platform 203 includes an authentication module, which is mainly used to respond to the vehicle-side OTA upgrade request, determine the OTA upgrade file according to the vehicle-side OTA upgrade request, obtain the authentication certificate corresponding to the OTA upgrade file from the cloud storage 202, use the preset session key in the cloud encryption machine 201 to authenticate the OTA upgrade file to generate an authentication result, and send the authentication result and the authentication certificate to the vehicle terminal.
[0077] For the sake of ease of explanation, the introduction to the above-mentioned OTA upgrade security authentication system only shows the part related to the embodiment of the present application. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application.
[0078] It should be understood that since the setting of each module is only for illustrating the functional units of the present application, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.
[0079] It is understood by those skilled in the art that each module in the system can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of this application, and therefore, the technical solutions after splitting or merging will fall within the protection scope of this application.
[0080] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.
[0081] Furthermore, the present application also provides a smart device.
[0082] In an embodiment of an intelligent device according to the present application, the intelligent device may include at least one processor; and a memory connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. The intelligent device described in the present application may include a computer device, a driving device, an intelligent car, a robot, and other devices. Figure 6 , Figure 6 FIG. 4 exemplarily shows that the memory 11 and the processor 12 are communicatively connected via a bus.
[0083] In the embodiment of the present application, the smart device may be a control device device including various electronic devices. In some possible implementations, the computer device may include multiple memories and multiple processors. The program for executing the OTA upgrade security authentication method of the above method embodiment can be divided into multiple subprograms, and each subprogram can be loaded and run by the processor to execute different steps of the OTA upgrade security authentication method of the above method embodiment. Specifically, each subprogram can be stored in different memories, and each processor can be configured to execute programs in one or more memories to jointly implement the OTA upgrade security authentication method of the above method embodiment, that is, each processor executes different steps of the OTA upgrade security authentication method of the above method embodiment, to jointly implement the OTA upgrade security authentication method of the above method embodiment.
[0084] The above-mentioned multiple processors may be processors deployed on the same device. For example, the above-mentioned computer device may be a high-performance device composed of multiple processors, and the above-mentioned multiple processors may be processors configured on the high-performance device. In addition, the above-mentioned multiple processors may also be processors deployed on different devices. For example, the above-mentioned computer device may be a server cluster, and the above-mentioned multiple processors may be processors on different servers in the server cluster.
[0085] Furthermore, the present application also provides a computer-readable storage medium.
[0086] In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium can be configured to store a program for executing the OTA upgrade security authentication method of the above method embodiment, and the program can be loaded and run by the processor to implement the above OTA upgrade security authentication method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a memory device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0087] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. An OTA upgrade security authentication method, applied to a server, characterized in that: The server includes an encryption machine and an external memory, wherein the encryption machine is used to store a session key and the external memory is used to store an authentication certificate; The method comprises: In response to a vehicle-side OTA upgrade request, the OTA upgrade file is determined according to the vehicle-side OTA upgrade request, an authentication certificate corresponding to the OTA upgrade file is obtained from the external memory, the OTA upgrade file is authenticated using the session key in the encryption machine to generate an authentication result, and the authentication result and the authentication certificate are sent to the vehicle-side.
2. The OTA upgrade security authentication method according to claim 1, characterized in that: A symmetric key is preset in the encryption machine; The method further includes: the server generating an authentication public key and an authentication private key corresponding to the OTA upgrade file in the encryption machine, encrypting the authentication private key using the symmetric key to obtain a wrapping key, and exporting the wrapping key and the authentication public key from the encryption machine; The server generates an authentication certificate corresponding to the OTA upgrade file based on the exported authentication public key; stores the authentication certificate and the wrapping key in the external memory, and deletes the authentication public key and the authentication private key in the encryption machine.
3. The OTA upgrade security authentication method according to claim 2, characterized in that: Before the encryption machine uses the session key to authenticate the OTA upgrade file and generate an authentication result, the method further includes: Query whether a session key is stored in the encryption machine; If yes, then executing the step of using the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result; Otherwise, obtain the packaging key corresponding to the OTA upgrade file from the external memory, use the symmetric key to decrypt the packaging key in the encryption machine to obtain the authentication private key, and store the decrypted authentication private key as the session key in the encryption machine, and then execute the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result.
4. The OTA upgrade security authentication method according to claim 3, characterized in that: The method further comprises: regularly clearing the session key stored in the encryption machine according to a preset time period.
5. The OTA upgrade security authentication method according to claim 2, characterized in that: The server generates an authentication certificate corresponding to the OTA upgrade file based on the exported authentication public key specifically as follows: the server passes the exported authentication public key to a PKI service to generate an authentication certificate corresponding to the OTA upgrade file.
6. The OTA upgrade security authentication method according to claim 1, characterized in that: The use of the session key in the encryption machine to authenticate the OTA upgrade file and generate an authentication result is specifically: using the session key in the encryption machine to perform a signing operation on the OTA upgrade file to generate a digital signature result, and using the digital signature result as the authentication result.
7. The OTA upgrade security authentication method according to claim 1, characterized in that: The session key stored in the encryption machine and the authentication certificate stored in the external memory both correspond one-to-one to the version of the OTA upgrade file.
8. An OTA upgrade security authentication method, applied to the vehicle side, characterized in that: The method comprises: Responding to the authentication result and authentication certificate from the server; The vehicle end checks whether the authentication certificate is legal, and if so, obtains an authentication public key based on the authentication certificate, and uses the authentication public key to verify the authentication result; otherwise, the authentication fails; Among them, the authentication public key is the authentication public key generated by the server in the encryption machine corresponding to the OTA upgrade file, and after the server exports the authentication public key from the encryption machine and generates the authentication certificate and stores it in the external memory, it will delete the authentication public key in the encryption machine.
9. A smart device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the OTA upgrade security authentication method according to any one of claims 1 to 7 or claim 8 is implemented.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the OTA upgrade security authentication method according to any one of claims 1 to 7 or claim 8.