Security authentication method and device and electronic equipment
Through the two-way authentication mechanism between the vehicle and the diagnostic instrument, the identity certificate of the same root certificate is used to solve the problem of information security risks in vehicle wireless diagnosis, and the secure access and data security of legal equipment are achieved, and the safety and efficiency of vehicle diagnosis are improved.
Patent Information
- Application Number
- CN202510398566.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, there is a lack of an effective security authentication mechanism in the wireless diagnosis process of vehicles, which leads to information security risks. Especially in wireless vehicle diagnostic scenarios, the secure access to diagnostic equipment and the security of data flow cannot be guaranteed.
Through the two-way authentication mechanism between the vehicle and the diagnostic device, the first and second identity certificates of the same root certificate are used for authentication, ensuring the legality of the vehicle and the diagnostic device, and enabling the wireless diagnostic function of the vehicle after the two-way authentication is passed, the vehicle is used as the main node for diagnosis.
It realizes secure access to legal equipment during vehicle diagnosis, shortens communication routes, improves the security of vehicle information, prevents unintentional or malicious diagnostic attacks, and ensures the confidentiality and integrity of data.
Smart Images

Figure CN120358046A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and more particularly, to a security authentication method, apparatus, and electronic device. Background Art
[0002] With the development of automotive electronic technology, vehicle-network interconnection has developed rapidly, and vehicle information security has become extremely important. As an important tool for communicating with vehicles, an after-sales diagnostic instrument has multiple functions such as rewriting vehicle controller information and software flashing. If no secure and effective encryption authentication method is established, there will be great security risks. Summary of the Invention
[0003] In view of this, embodiments of the present application propose a security authentication method, apparatus, and electronic device to improve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a security authentication method, the method comprising: sending, by a vehicle head unit of a vehicle, first verification information corresponding to the vehicle head unit to a cloud; receiving, by the vehicle head unit, a first identity certificate sent by the cloud, wherein the first identity certificate is sent by the cloud when it determines that the vehicle head unit passes verification based on the first verification information; performing, by the vehicle head unit, mutual authentication with a diagnostic instrument based on the first identity certificate and a second identity certificate corresponding to the diagnostic instrument connected to the vehicle head unit, wherein the second identity certificate is sent to the diagnostic instrument by the cloud when it determines that the diagnostic instrument passes verification based on second verification information sent by the diagnostic instrument, and the first identity certificate and the second identity certificate have the same root certificate; and if the mutual authentication passes, enabling, by the vehicle head unit, a wireless diagnostic function of the vehicle.
[0005] In a second aspect, an embodiment of the present application provides a security authentication method, the method comprising: sending, by a diagnostic instrument, second verification information corresponding to the diagnostic instrument to a cloud; receiving, by the diagnostic instrument, a second identity certificate sent by the cloud, wherein the second identity certificate is sent by the cloud when it determines that the diagnostic instrument passes verification based on the second verification information; performing, by the diagnostic instrument, mutual authentication with a vehicle head unit based on the second identity certificate and a first identity certificate corresponding to the vehicle head unit connected to the diagnostic instrument, so that when the mutual authentication passes, the vehicle head unit enables a wireless diagnostic function of a vehicle corresponding to the vehicle head unit, wherein the first identity certificate is sent to the vehicle head unit by the cloud when it determines that the vehicle head unit passes verification based on first verification information sent by the vehicle head unit, and the first identity certificate and the second identity certificate have the same root certificate.
[0006] In a third aspect, an embodiment of the present application provides a security authentication device, which includes: a first verification information sending module, a first identity certificate receiving module, a vehicle head unit two-way authentication module, and a wireless diagnostic function enabling module. Among them, the first verification information sending module is configured to send the first verification information corresponding to the vehicle head unit to the cloud through the vehicle head unit of the vehicle; the first identity certificate receiving module is configured to receive the first identity certificate sent by the cloud through the vehicle head unit, where the first identity certificate is sent by the cloud when it determines that the vehicle head unit passes the verification based on the first verification information; the vehicle head unit two-way authentication module is configured to perform two-way authentication with the diagnostic instrument through the vehicle head unit based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the vehicle head unit, where the second identity certificate is sent to the diagnostic instrument by the cloud when it determines that the diagnostic instrument passes the verification based on the second verification information sent by the diagnostic instrument, and the first identity certificate and the second identity certificate have the same root certificate; the wireless diagnostic function enabling module is configured to enable the wireless diagnostic function of the vehicle through the vehicle head unit if the two-way authentication is passed.
[0007] In a fourth aspect, an embodiment of the present application provides a security authentication device, which includes: a second verification information sending module, a second identity certificate receiving module, and a diagnostic instrument two-way authentication module. Among them, the second verification information sending module is configured to send the second verification information corresponding to the diagnostic instrument to the cloud through the diagnostic instrument; the second identity certificate receiving module is configured to receive the second identity certificate sent by the cloud through the diagnostic instrument, where the second identity certificate is sent by the cloud when it determines that the diagnostic instrument passes the verification based on the second verification information; the diagnostic instrument two-way authentication module is configured to perform two-way authentication with the vehicle head unit through the diagnostic instrument based on the second identity certificate and the first identity certificate corresponding to the vehicle head unit connected to the diagnostic instrument, so that the vehicle head unit enables the wireless diagnostic function of the vehicle corresponding to the vehicle head unit when the two-way authentication is passed, where the first identity certificate is sent to the vehicle head unit by the cloud when it determines that the vehicle head unit passes the verification based on the first verification information sent by the vehicle head unit, and the first identity certificate and the second identity certificate have the same root certificate.
[0008] In a fifth aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, the memory is coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the processor executes the security authentication method provided in the first aspect and the security authentication method provided in the second aspect.
[0009] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the security authentication method provided in the first aspect and the security authentication method provided in the second aspect above.
[0010] In the solution of the present application, the vehicle head unit of the vehicle sends the first verification information corresponding to the head unit to the cloud, and the head unit receives the first identity certificate sent by the cloud. Among them, the first identity certificate is sent by the cloud when it is determined that the head unit passes the verification based on the first verification information, thereby confirming the legitimacy of the head unit. And the head unit performs mutual authentication with the diagnostic instrument based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the head unit. Among them, the second identity certificate is sent to the diagnostic instrument by the cloud when it is determined that the diagnostic instrument passes the verification based on the second verification information sent by the diagnostic instrument. The first identity certificate and the second identity certificate have the same root certificate. Thus, mutual authentication is performed between the legitimate head unit and the legitimate diagnostic instrument with the same root certificate. And if the mutual authentication passes, the wireless diagnostic function of the vehicle is enabled by the head unit. Furthermore, when performing vehicle diagnosis, the head unit can be used as the main node of the vehicle diagnostic function, allowing legitimate diagnostic instruments to safely access the vehicle for diagnosis, shortening the diagnostic communication route, and improving the security of vehicle information. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0012] Figure 1 It shows a schematic flowchart of the security authentication method provided by an embodiment of the present application;
[0013] Figure 2 It shows a schematic flowchart of the head unit authorization provided by an embodiment of the present application;
[0014] Figure 3 It shows a schematic flowchart of the security authentication method provided by an embodiment of the present application;
[0015] Figure 4 It shows a schematic flowchart of obtaining the first software package provided by an embodiment of the present application;
[0016] Figure 5 It shows a schematic diagram of the application environment provided by an embodiment of the present application;
[0017] Figure 6The figure shows a schematic flow chart of a security authentication method provided by an embodiment of the present application;
[0018] Figure 7 The figure shows a schematic flow chart of the authorization of a diagnostic instrument provided by an embodiment of the present application;
[0019] Figure 8 The figure shows a block diagram of modules of a security authentication device provided by an embodiment of the present application;
[0020] Figure 9 The figure shows a block diagram of modules of a security authentication device provided by an embodiment of the present application;
[0021] Figure 10 The figure shows a block diagram of an electronic device provided by an embodiment of the present application;
[0022] Figure 11 The figure shows a storage unit for storing or carrying program codes for implementing the security authentication method according to an embodiment of the present application. Detailed implementation manners
[0023] In order to enable those skilled in the art of the present technology to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
[0024] In order to better understand the solutions of the embodiments of the present application, the technical terms used in the embodiments of the present application will be explained below.
[0025] Over-The-Air (OTA) refers to the technology of downloading an upgrade package from a remote server through a wireless network to upgrade the system or application. In the automotive field, OTA technology is used to remotely upgrade automotive software, improve the user experience, and reduce the recall cost caused by software defects in vehicle factories, and has become a key technology for intelligent connected vehicles.
[0026] The OBD interface is usually a 16-pin diagnostic socket, and the pin definitions may vary for different vehicle models.
[0027] Service 27 is a security access service defined in the ISO 14229 standard, aiming to protect the key data and functions of a vehicle and ensure that only authorized personnel or devices can access and operate. Service 27 realizes security authentication through a seed and key mechanism to ensure that a diagnostic device must pass authentication before accessing sensitive data of the vehicle or performing critical operations.
[0028] Service 29 in the ISO standard is a newly added service to address the increasing security risks of connected vehicles. Its main purpose is to provide a method for authentication between a client and a server to verify the identity when accessing restricted data or services.
[0029] The implementation details of the technical solution of the embodiments of the present application are elaborated in detail as follows:
[0030] With the development of automotive electronics technology, vehicle-network interconnection has developed rapidly, and business functions such as remote diagnosis, remote control, and OTA have been successively applied to vehicles. However, the near-field vehicle diagnosis technology still relies on the OBD port and requires a wired connection, resulting in that diagnostic engineers rely heavily on the wiring connection between the OBD port and the diagnostic instrument during near-field diagnosis. For the traditional wired vehicle diagnosis technology solution based on the OBD port, ISO standard services 29 and 27 are used for the authentication of diagnostic devices, and this security mechanism cannot fully cover the wireless vehicle diagnosis scenario, and a single authentication service mechanism cannot ensure the diagnostic security of the wireless diagnosis scenario.
[0031] Based on this, wireless vehicle diagnosis technology has emerged. Correspondingly, people have put forward higher requirements and challenges for the information security of wireless vehicle diagnosis technology. For example, how to ensure the security of access to diagnostic devices, what authorized diagnostic services are, how to ensure the security of the data stream of wireless diagnosis, how to securely connect to the vehicle through wireless WiFi, and how to authenticate with the vehicle. Therefore, in related technologies, there are challenges in improving the information security during vehicle wireless diagnosis.
[0032] In view of the above problems, through long-term research, the inventors have proposed a security authentication method, device, and electronic device provided by the embodiments of the present application. By using the vehicle head unit as the main node of the vehicle diagnosis function during vehicle diagnosis, legal diagnostic instruments are allowed to securely access the vehicle for diagnosis, shortening the diagnostic communication route and improving the security of vehicle information. Among them, the specific security authentication method will be described in detail in the subsequent embodiments.
[0033] The embodiments involved in the present application will be described below with reference to the accompanying drawings.
[0034] Please refer to Figure 1 , Figure 1 which shows a schematic flowchart of a security authentication method provided by an embodiment of the present application. In a specific embodiment, the security authentication method can be applied to a security authentication device 200 as shown in Figure 8 and an electronic device 100 configured with the security authentication device 200 ( Figure 10 ). The following will take the electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device to which this embodiment is applied may include devices such as vehicles and in-vehicle terminals, which are not limited herein. The following will elaborate in detail on the process shown in Figure 1 , and the model training may specifically include the following steps:
[0035] Step S110: Send the first verification information corresponding to the in-vehicle computer of the vehicle to the cloud through the in-vehicle computer of the vehicle.
[0036] In some embodiments, the vehicle can receive a signature verification instruction input by the user through the in-vehicle computer of the vehicle, and can, in response to the signature verification instruction, send the first verification information corresponding to the in-vehicle computer to the cloud through the in-vehicle computer of the vehicle. Among them, the in-vehicle computer can be communicatively connected to the cloud, and the cloud can include devices such as vehicles, desktop computers, laptop computers, vehicle-mounted terminals, servers, etc.; among them, the cloud can be understood as an authentication server.
[0037] Among them, the first verification information can include the identification code of the vehicle, the identity information of the user corresponding to the in-vehicle computer, etc., which is not limited herein. Among them, the first verification information can be pre-set in the vehicle, or can be obtained by the in-vehicle computer from an associated cloud or electronic device, which is not limited herein.
[0038] Among them, a signature verification control can be provided on the vehicle, and the signature verification control can be a physical button; among them, the in-vehicle computer can determine whether it has received a signature verification instruction input by the user by detecting the pressing state of the physical button. Exemplarily, if the in-vehicle computer detects that the pressing duration of the physical button reaches a first duration, it can be determined that a signature verification instruction input by the user has been received.
[0039] Optionally, a screen can be provided on the vehicle, and the in-vehicle computer can display a two-dimensional code corresponding to the signature verification instruction on the screen, where the user can input the signature verification instruction by scanning the two-dimensional code; correspondingly, the in-vehicle computer can, when determining that the two-dimensional code has been scanned, send the first verification information corresponding to the in-vehicle computer to the cloud.
[0040] Optionally, a screen can be provided on the vehicle, and the in-vehicle computer can display an authorization request interface on the screen, and the authorization request interface can include an account input control, a password input control, an identity information input control, etc. Correspondingly, the user can input account information, password information, and identity information based on the authorization request interface; correspondingly, after obtaining the account information, password information, and identity information, the in-vehicle computer can obtain the first verification information based on the account information, password information, and identity information, and send the first verification information to the cloud to authenticate the engineer who requests to open the wireless diagnostic function of the vehicle, improving the security of the in-vehicle computer to open the wireless diagnostic function.
[0041] Exemplarily, please refer to Figure 2, which shows a schematic diagram of the vehicle head unit authorization provided by an embodiment of the present application. Among them, the vehicle head unit of the vehicle can be communicatively connected to the cloud, and the cloud can include an authentication service platform and a computer communicatively connected to the authentication service platform. Among them, the vehicle head unit can receive a signature verification instruction input by the user, and in response to the signature verification instruction, send a request authorization instruction carrying the first verification information to the authentication service platform. After receiving the request authorization instruction, the authentication service platform can forward the request authorization instruction to the computer communicatively connected to the authentication service platform to request the computer to perform a legality verification on the vehicle head unit according to the first verification information, and in the case of passing the verification, send the first identity certificate to the authentication service platform to authorize the vehicle head unit. Among them, the authentication service platform can forward the first identity certificate to the vehicle head unit to realize the authorization of the vehicle head unit.
[0042] Step S120: Receive the first identity certificate sent by the cloud through the vehicle head unit, where the first identity certificate is sent by the cloud when it is determined that the vehicle head unit passes the verification according to the first verification information.
[0043] In some embodiments, after the vehicle head unit sends the first verification information to the cloud, it can receive the first identity certificate sent by the cloud. Among them, the first identity certificate can be sent by the cloud when it is determined that the vehicle head unit passes the verification according to the first verification information. Among them, the first identity certificate can include information such as the public key and identity information of the vehicle head unit.
[0044] Among them, in the process of the cloud verifying the vehicle head unit according to the first verification information, it can obtain the identity information of the vehicle according to the first verification information, and in the case of determining that the identity information is legal, determine that the vehicle head unit passes the verification, and can generate the public key of the vehicle head unit, and can generate the first identity certificate according to the identity information and the public key, and send the first identity certificate to the vehicle head unit. Among them, the cloud can also, in the case of determining that the vehicle head unit fails the verification, not give any feedback to the vehicle to prevent unintentional or malicious diagnostic attacks; optionally, the cloud can also, in the case of determining that the vehicle head unit fails the verification, output a first prompt message, and the first prompt message can be used to prompt that the vehicle authentication is illegal.
[0045] Step S130: Perform two-way authentication with the diagnostic instrument through the vehicle head unit based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the vehicle head unit, where the second identity certificate is sent to the diagnostic instrument by the cloud when it is determined that the diagnostic instrument passes the verification according to the second verification information sent by the diagnostic instrument, and the first identity certificate and the second identity certificate have the same root certificate.
[0046] In some embodiments, the successful verification of the in-vehicle unit can be understood as the vehicle being legal. Correspondingly, when the in-vehicle unit is authenticated as legal, it can perform two-way authentication with the diagnostic instrument based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the in-vehicle unit. Among them, the second identity certificate can be sent to the diagnostic instrument by the cloud when it determines that the diagnostic instrument has passed the verification based on the second verification information sent by the diagnostic instrument. Among them, the first identity certificate and the second identity certificate have the same root certificate.
[0047] Among them, the diagnostic instrument can be communicatively connected to the cloud. The cloud communicatively connected to the diagnostic instrument can be the same as or different from the cloud communicatively connected to the in-vehicle unit, which is not limited herein. Among them, the second verification information can include the identity information of the diagnostic instrument (such as the model, supplier, etc. of the diagnostic instrument), the identity information of the user corresponding to the diagnostic instrument, etc. Among them, the second identity certificate can be sent by the cloud when it determines that the diagnostic instrument has passed the verification based on the second verification information sent by the diagnostic instrument. Among them, the second identity certificate can include information such as the public key of the diagnostic instrument and the identity information of the engineer corresponding to the diagnostic instrument. The successful verification of the diagnostic instrument can be understood as the diagnostic instrument being legal.
[0048] Among them, the connection between the in-vehicle unit and the diagnostic instrument can include a wired connection or a wireless connection, which is not limited herein. Exemplarily, the in-vehicle unit can connect to the hotspot of a personal mobile phone, and the diagnostic instrument can connect to the hotspot of the in-vehicle unit; among them, the IP address of the diagnostic instrument and the IP address of the in-vehicle unit can be in the same network segment, so as to connect the in-vehicle unit and the diagnostic instrument to an Ethernet for wireless communication.
[0049] Among them, considering that automotive diagnostic technologies can include remote diagnosis and local diagnosis, and local diagnosis can be divided into wireless diagnosis and wired diagnosis; based on this, this embodiment can perform security authentication for the possible information security risks in the wireless diagnosis process to improve the security of the vehicle's wireless diagnosis function.
[0050] Among them, the in-vehicle unit can store the diagnostic algorithm and the key corresponding to the public key of the first identity certificate. Among them, the key can be stored in the information security chip of the vehicle to ensure the security of the key; among them, the diagnostic algorithm can have an anti-reverse function and can run in the TEE / information security chip to ensure the security of the diagnostic algorithm. The first identity certificate obtained by the in-vehicle unit and the second identity certificate obtained by the diagnostic instrument can have the same root certificate to achieve two-way authentication between the in-vehicle unit and the diagnostic instrument.
[0051] Exemplarily, during the process of the in-vehicle unit performing two-way authentication based on the first identity certificate and the second identity certificate of the diagnostic instrument, the in-vehicle unit can send the first identity certificate with the public key of the in-vehicle unit to the diagnostic instrument. Among them, after receiving the first identity certificate, the diagnostic instrument can verify the validity of the first identity certificate. If it is determined that the first identity certificate is invalid, it can determine that the verification fails and can stop the authentication. If it is determined that the first identity certificate is valid, it determines that the verification is successful and continues the subsequent authentication process.
[0052] Among them, the diagnostic instrument can create a challenge and send a challenge message for the first identity certificate to the in-vehicle unit, requesting the in-vehicle unit to prove the ownership of the sent first identity certificate. The message contains the random number required for authentication. Among them, after receiving the challenge information, the in-vehicle unit can calculate the ownership proof based on the private key corresponding to the public key carried in the first identity certificate and send the ownership proof to the diagnostic instrument. Among them, the diagnostic instrument can verify the ownership proof based on the public key in the first identity certificate sent by the in-vehicle unit received, and compare it with the challenge message. If they are consistent, it can determine that the verification is successful and continue the next authentication step.
[0053] Among them, the diagnostic instrument can send the second identity certificate with the public key of the diagnostic instrument to the in-vehicle unit. After receiving the second identity certificate, the in-vehicle unit will verify the validity of the second identity certificate. If it is determined that the second identity certificate is invalid, it can determine that the verification fails and can stop the authentication process. If it is determined that the second identity certificate is valid, it can continue the subsequent authentication process.
[0054] Among them, the in-vehicle unit can create a challenge and send a challenge message for the second identity certificate to the diagnostic instrument, requesting the diagnostic instrument to prove the ownership of the sent second identity certificate. The message contains the random number required for authentication. Among them, after receiving the challenge, the diagnostic instrument can calculate the ownership proof based on the private key corresponding to the public key in the second identity certificate and can send the ownership proof to the in-vehicle unit. Among them, the in-vehicle unit can verify the ownership proof based on the public key in the received second identity certificate, and compare it with the challenge message. If they are consistent, it can determine that the verification is successful, grant the diagnostic instrument access rights to the in-vehicle unit, and can send a corresponding response to indicate that the two-way authentication is successful.
[0055] Step S140: If the two-way authentication passes, enable the wireless diagnostic function of the vehicle through the in-vehicle unit.
[0056] In some embodiments, if the two-way authentication between the in-vehicle unit and the diagnostic instrument based on the first identity certificate of the in-vehicle unit and the second identity certificate of the diagnostic instrument passes, the wireless diagnostic function of the vehicle where the in-vehicle unit is located can be enabled through the in-vehicle unit. Among them, the wireless diagnostic function of the vehicle can include routines such as vehicle reset, control, and refresh. Among them, the in-vehicle unit, as the main node of the vehicle's wireless diagnostic function, can be used to complete functions such as the legality authentication of the in-vehicle unit to enable the vehicle's diagnostic function and data forwarding, preventing unintentional or malicious diagnostic attacks, while allowing legitimate diagnostic instruments to safely access the vehicle for diagnosis, shortening the diagnostic communication route, and improving the security of vehicle information.
[0057] The security authentication method provided by an embodiment of the present application sends the first verification information corresponding to the in-vehicle unit to the cloud through the in-vehicle unit of the vehicle, and receives the first identity certificate sent by the cloud through the in-vehicle unit. Among them, the first identity certificate is sent by the cloud when it determines that the in-vehicle unit passes the verification based on the first verification information, thereby confirming the legality of the in-vehicle unit, and performing two-way authentication between the in-vehicle unit and the diagnostic instrument based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the in-vehicle unit. Among them, the second identity certificate is sent to the diagnostic instrument by the cloud when it determines that the diagnostic instrument passes the verification based on the second verification information sent by the diagnostic instrument. The first identity certificate and the second identity certificate have the same root certificate, so as to perform two-way authentication between the legitimate in-vehicle unit and the legitimate diagnostic instrument with the same root certificate, and if the two-way authentication passes, the wireless diagnostic function of the vehicle is enabled through the in-vehicle unit. Furthermore, it can be realized that when performing vehicle diagnosis, the in-vehicle unit is used as the main node of the vehicle diagnostic function, allowing legitimate diagnostic instruments to safely access the vehicle for diagnosis, shortening the diagnostic communication route, and improving the security of vehicle information.
[0058] Please refer to Figure 3 , Figure 3 which shows a schematic flowchart of the security authentication method provided by an embodiment of the present application. This method is applied to the above-mentioned electronic device. The following will elaborate in detail on the Figure 3 shown process. The security authentication method may specifically include the following steps:
[0059] Step S210: Send the first verification information corresponding to the in-vehicle unit to the cloud through the in-vehicle unit of the vehicle.
[0060] Step S220: Receive the first identity certificate sent by the cloud through the in-vehicle unit, where the first identity certificate is sent by the cloud when it determines that the in-vehicle unit passes the verification based on the first verification information.
[0061] Among them, for the specific description of steps S210 - S220, please refer to the description of steps S110 - S120 in the previous text, and details will not be repeated here.
[0062] Step S230: The in-vehicle unit adopts an ISO-standard authentication service and performs two-way authentication with the diagnostic instrument based on the first identity certificate and the second identity certificate. The second identity certificate is sent to the diagnostic instrument by the cloud when the diagnostic instrument is verified to pass according to the second verification information sent by the diagnostic instrument. The first identity certificate and the second identity certificate have the same root certificate.
[0063] In some embodiments, when the in-vehicle unit is verified and determined to be legal and authorized with the first identity certificate by the cloud according to the first verification information, and the diagnostic instrument is verified and determined to be legal and authorized with the second identity certificate by the cloud according to the second verification information, the in-vehicle unit can adopt an ISO-standard authentication service and perform two-way authentication with the diagnostic instrument based on the first identity certificate and the second identity certificate. The first identity certificate and the second identity certificate may have the same root certificate to achieve two-way authentication between the in-vehicle unit and the diagnostic instrument. For example, the first identity certificate and the second identity certificate are issued by the same automobile manufacturing unit. The authentication service may include service 29, service 27, which is not limited herein. Exemplarily, to enhance the security of vehicle diagnostic communication, the authentication service may be service 29.
[0064] Step S240: If the two-way authentication passes, enable the wireless diagnostic function of the vehicle through the in-vehicle unit.
[0065] For the specific description of step S240, please refer to the description of step S140 above and will not be elaborated here.
[0066] Step S250: If the in-vehicle unit receives the first software package sent by the diagnostic instrument, verify the vehicle manufacturer signature in the first software package through the in-vehicle unit based on the first identity certificate.
[0067] In some embodiments, after the in-vehicle unit enables the wireless diagnostic function of the vehicle, if it receives the first software package sent by the diagnostic instrument that has passed two-way authentication, it can verify the vehicle manufacturer signature in the first software package based on the first identity certificate.
[0068] The diagnostic instrument can obtain the first software package from the associated cloud or electronic device. The first software package may be an encrypted target software package including a supplier signature and a vehicle manufacturer signature. Exemplarily, please refer to Figure 4, which shows a schematic flowchart of obtaining a first software package provided by an embodiment of the present application. Among them, a parts supplier of an Electronic Control Unit (ECU) can encrypt a target software package, and can add a supplier signature to the encrypted target software package and send it to the vehicle factory. The vehicle factory can perform a second signature on the target software package including the supplier signature and encrypted, so as to add the vehicle factory signature to the target software package including the supplier signature, obtain the first software package, and send the first software package to the diagnostic instrument. Among them, the first software package can represent that the target software package is the software of a determined model supplied by the parts supplier corresponding to the supplier signature to the vehicle factory corresponding to the vehicle factory signature. Among them, the first software package can be understood as a flashing software package; among them, the diagnostic instrument can send the flashing software package to the in-vehicle computer to verify the data signature by the in-vehicle computer. For example, the in-vehicle computer can verify the vehicle factory signature in the first software package based on the public key in the first identity certificate.
[0069] Step S260: If the verification of the vehicle factory signature passes, send the first software package to the target electronic control unit in the vehicle through the in-vehicle computer.
[0070] Among them, in the process of the in-vehicle computer verifying the vehicle factory signature through the first identity certificate, it can verify the vehicle factory signature in the first software package based on the public key in the first identity certificate, and determine whether the vehicle factory signature in the first software package matches the vehicle factory that sends the first software package to the diagnostic instrument. If it matches, it can determine that the verification of the vehicle factory signature passes, and can send the first software package to the target electronic control unit in the vehicle to prevent the file transmitted by the wireless diagnostic instrument from carrying a virus. Among them, if it does not match, the transmission of the file can be stopped, and it can be determined that the file transmitted by the wireless diagnostic instrument carries a virus.
[0071] In some embodiments, in the process of the in-vehicle computer sending the first software package to the target electronic control unit in the vehicle, it can obtain the transmission address corresponding to the first software package, and can send the first software package to the target electronic control unit in the vehicle that matches the transmission address, so that the ECU node can verify the supplier signature, and after the signature passes, perform data decryption and data update work in the ECU node, thereby preventing the file transmitted by the wireless diagnostic instrument from carrying a virus through a two-level signature system, and ensuring the confidentiality, integrity and effectiveness of the vehicle wireless diagnostic function.
[0072] Exemplarily, please refer to Figure 5, which shows a schematic diagram of an application environment provided by an embodiment of the present application. Among them, the in-vehicle computer serves as the main control node for vehicle diagnosis and can be wirelessly connected to a diagnostic instrument with a wireless network card through WiFi. Among them, the in-vehicle computer can also communicate with ECUs (such as ECU1, ECU2... ECUn) in the vehicle through an in-vehicle network bus (such as CAN bus, LIN bus, FlexRay bus, and in-vehicle Ethernet, etc.); among them, ECU1 can serve as a diagnostic slave device Slave1, ECU2 can serve as a diagnostic slave device Slave2, and ECUn can serve as a diagnostic slave device Slaven. Among them, the in-vehicle computer can store the diagnostic algorithm and the key corresponding to the public key in the first identity certificate of the in-vehicle computer to ensure the security of the diagnostic algorithm and the key; among them, the in-vehicle computer can perform two-way authentication with the diagnostic instrument to allow the diagnostic instrument to wirelessly and securely access; among them, the in-vehicle computer can also perform signature verification on the files transmitted by the diagnostic instrument to effectively prevent the files or instructions transmitted by the wireless diagnostic instrument from carrying viruses. Compared with using the central gateway controller of the vehicle as the main control node for vehicle diagnosis, the information security condition judgment and control are advanced, the diagnostic communication route is shortened, the delay of the node for information security risk judgment is shortened, the window for information security attacks is reduced, and thus the information security of the vehicle is improved.
[0073] Step S270: Verify the vendor signature in the first software package based on the first identity certificate through the target electronic control unit.
[0074] Among them, after the target electronic control unit in the vehicle obtains the first software package, it can verify the vendor signature in the first software package based on the first identity certificate; among them, the target electronic control unit can verify the vendor signature in the first software package based on the public key in the first identity certificate, determine whether the vendor signature in the first software package matches the vendor that sent the first software package to the diagnostic instrument. If it matches, it can determine that the vendor signature verification passes and can decrypt the first software package to prevent the files transmitted by the wireless diagnostic instrument from carrying viruses. Among them, if it does not match, it can stop decrypting the software package and can determine that the files transmitted by the wireless diagnostic instrument carry viruses, thus ensuring the confidentiality, integrity, and effectiveness of the vehicle wireless diagnostic function.
[0075] Step S280: If it is determined that the vendor signature verification passes, decrypt the first software package through the target electronic control unit to obtain the target software package, and update the data in the target electronic control unit based on the target software package.
[0076] Among them, if the target electronic control unit determines that the verification of the supplier signature is passed, the target electronic control unit can decrypt the first software package to obtain the target software package, and can update the data in the target electronic control unit based on the target software package. Among them, the target electronic control unit can perform software upgrade on the data in the target electronic control unit based on the target software package, such as refreshing the software code, updating the data memory address, etc.
[0077] The security authentication method provided by an embodiment of the present application, compared with Figure 1 the security authentication method shown, this embodiment can also, after enabling the wireless diagnostic function of the vehicle through the in-vehicle unit, if the in-vehicle unit receives the first software package sent by the diagnostic instrument, verify the vehicle manufacturer signature in the first software package based on the first identity certificate; if the verification of the vehicle manufacturer signature is passed, send the first software package to the target electronic control unit in the vehicle through the in-vehicle unit; verify the supplier signature in the first software package by the target electronic control unit based on the first identity certificate; if it is determined that the verification of the supplier signature is passed, decrypt the first software package by the target electronic control unit to obtain the target software package, and update the data in the target electronic control unit based on the target software package, so as to perform two-level signature verification and decryption on the software refresh package, improving the security and confidentiality of updating the data in the vehicle based on the vehicle wireless diagnostic function. In addition, this embodiment can also adopt the authentication service of the ISO standard through the in-vehicle unit, and perform two-way authentication with the diagnostic instrument based on the first identity certificate and the second identity certificate, so as to ensure the security of the in-vehicle unit enabling the vehicle wireless diagnostic function through the three-party authentication among the in-vehicle unit, the cloud, and the diagnostic instrument.
[0078] Please refer to Figure 6 , Figure 6 which shows a schematic flowchart of the security authentication method provided by an embodiment of the present application. In a specific embodiment, this security authentication method can be applied to a security authentication device 300 as shown in Figure 9 and an electronic device 100 configured with the security authentication device 300 ( Figure 10 ). The following will take the electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device to which this embodiment is applied can include devices such as vehicles, desktop computers, laptop computers, in-vehicle terminals, etc., which are not limited here. The following will elaborate in detail on the Figure 6 process shown. The security authentication method can specifically include the following steps:
[0079] Step S310: Send the second verification information corresponding to the diagnostic instrument to the cloud through the diagnostic instrument.
[0080] In some embodiments, the diagnostic instrument can receive the signature verification instruction input by the user and can send the second verification information corresponding to the diagnostic instrument to the cloud in response to the signature verification instruction. The diagnostic instrument can be communicatively connected to the cloud, where the cloud can include devices such as vehicles, desktop computers, laptop computers, in-vehicle terminals, etc.; the cloud can be understood as an authentication server. The cloud communicatively connected to the diagnostic instrument can be the same as or different from the cloud communicatively connected to the vehicle head unit, which is not limited herein.
[0081] The second verification information can include the identity information of the diagnostic instrument (such as the model, supplier, etc. of the diagnostic instrument), the identity information of the user corresponding to the diagnostic instrument, etc., which is not limited herein. The second verification information can be preset in the diagnostic instrument or obtained by the diagnostic instrument from the associated cloud or electronic device, which is not limited herein.
[0082] A signature verification control can be provided on the diagnostic instrument, and the signature verification control can be a physical button; the diagnostic instrument can determine whether it has received the signature verification instruction input by the user by detecting the pressing state of the physical button. Exemplarily, if the diagnostic instrument detects that the physical button has been pressed for a second duration, it can be determined that the signature verification instruction input by the user has been received.
[0083] Optionally, a screen can be provided on the diagnostic instrument, and the diagnostic instrument can display a two-dimensional code corresponding to the signature verification instruction on the screen, where the user can input the signature verification instruction by scanning the two-dimensional code; correspondingly, the diagnostic instrument can send the second verification information corresponding to the diagnostic instrument to the cloud when it determines that the two-dimensional code has been scanned.
[0084] Optionally, a screen can be provided on the diagnostic instrument, and the diagnostic instrument can display an authorization request interface on the screen, which can include an account input control, a password input control, an identity information input control, etc. Correspondingly, the user can input account information, password information, and identity information based on the authorization request interface; correspondingly, after obtaining the account information, password information, and identity information, the diagnostic instrument can obtain the second verification information based on the account information, password information, and identity information and send the second verification information to the cloud to authenticate the engineer corresponding to the diagnostic instrument for diagnosing the vehicle, improving the security of opening the wireless diagnostic function.
[0085] Exemplarily, please refer to Figure 7, which shows a schematic diagram of the process of authorizing a diagnostic instrument provided by an embodiment of the present application. Among them, the diagnostic instrument can be communicatively connected to the cloud, and the cloud can include an authentication service platform and a computer communicatively connected to the authentication service platform. Among them, the diagnostic instrument can receive a signature verification instruction input by the user, and in response to the signature verification instruction, send a request authorization instruction carrying the second verification information to the authentication service platform. After receiving the request authorization instruction, the authentication service platform can forward the request authorization instruction to the computer communicatively connected to the authentication service platform to request the computer to perform a legality verification on the diagnostic instrument according to the second verification information, and in the case of passing the verification, send the second identity certificate to the authentication service platform to authorize the diagnostic instrument. Among them, the authentication service platform can forward the second identity certificate to the diagnostic instrument to achieve the authorization of the diagnostic instrument.
[0086] Step S320: Receive the second identity certificate sent by the cloud through the diagnostic instrument, where the second identity certificate is sent by the cloud when it is determined that the diagnostic instrument passes the verification according to the second verification information.
[0087] Among them, in the process of the cloud verifying the diagnostic instrument according to the second verification information, it can obtain the identity information of the engineer corresponding to the diagnostic instrument according to the second verification information, and in the case of determining that the identity information is legal, it can determine that the diagnostic instrument passes the verification, and can generate the public key of the diagnostic instrument, and can generate the second identity certificate according to the identity information and the public key, and send the second identity certificate to the diagnostic instrument. Among them, the cloud can also not give any feedback to the diagnostic instrument in the case of determining that the diagnostic instrument fails to pass the verification to prevent unintentional or malicious diagnostic attacks; optionally, the cloud can also output a second prompt message in the case of determining that the diagnostic instrument fails to pass the verification, and the second prompt message can be used to prompt that the diagnostic instrument is illegal. The diagnostic instrument passing the verification can be understood as the diagnostic instrument being legal.
[0088] Step S330: Perform two-way authentication with the vehicle-mounted computer through the diagnostic instrument based on the second identity certificate and the first identity certificate corresponding to the vehicle-mounted computer connected to the diagnostic instrument, so that when the two-way authentication passes, the vehicle-mounted computer enables the wireless diagnostic function of the vehicle corresponding to the vehicle-mounted computer, where the first identity certificate is sent to the vehicle-mounted computer by the cloud when it is determined that the vehicle-mounted computer passes the verification according to the first verification information sent by the vehicle-mounted computer, and the first identity certificate and the second identity certificate have the same root certificate.
[0089] In some embodiments, the diagnostic instrument can also perform two-way authentication with the in-vehicle unit corresponding to the diagnostic instrument based on the second identity certificate and the first identity certificate of the in-vehicle unit connected to the diagnostic instrument, so that before enabling the wireless diagnostic function of the vehicle corresponding to the in-vehicle unit when the two-way authentication is passed, a wireless connection is established with the in-vehicle unit. Among them, the IP address of the diagnostic instrument can be in the same network segment as the IP address of the in-vehicle unit. Exemplarily, the in-vehicle unit can be connected to a personal mobile phone hotspot, the diagnostic instrument can be connected to the in-vehicle unit hotspot, and the IP address configured by the diagnostic instrument can be in the same network segment as the in-vehicle unit, so as to configure the in-vehicle unit to turn on the wireless diagnostic function of the vehicle when the in-vehicle unit allows the wireless secure access of the diagnostic instrument.
[0090] Among them, after the diagnostic instrument is connected to the in-vehicle unit, it can perform two-way authentication with the in-vehicle unit based on the second identity certificate and the first identity certificate corresponding to the in-vehicle unit, so that when the two-way authentication is passed, the wireless diagnostic function of the vehicle corresponding to the in-vehicle unit is enabled.
[0091] In some embodiments, the diagnostic instrument can also perform two-way authentication with the in-vehicle unit based on the second identity certificate and the first identity certificate of the in-vehicle unit connected to the diagnostic instrument, so that after enabling the wireless diagnostic function of the vehicle corresponding to the in-vehicle unit when the two-way authentication is passed, a first software package is obtained. Among them, the first software package can be an encrypted target software package including a supplier signature and an OEM signature, and can send the first software package to the in-vehicle unit, so that the in-vehicle unit verifies the OEM signature in the first software package based on the first identity certificate, and when it is determined that the verification of the OEM signature passes, sends the first software package to the target electronic control unit in the vehicle corresponding to the in-vehicle unit, so that the target electronic control unit verifies the supplier signature in the first software package based on the first identity certificate, and when it is determined that the verification of the supplier signature passes, decrypts the first software package to obtain the target software package, and updates the data in the target electronic control unit based on the target software package. Thus, when the wireless diagnostic function of the vehicle is enabled through the in-vehicle unit, the software package with a two-level signature mechanism is sent to the in-vehicle unit for two-level signature verification, so that when both levels of signature verification pass, data is updated, effectively preventing the wireless diagnostic instrument from transmitting files with viruses and improving the security of vehicle information.
[0092] In some embodiments, the diagnostic instrument can perform operations such as resetting the vehicle, reading fault codes, and clearing fault codes when the wireless diagnostic function of the vehicle is enabled through the in-vehicle unit. Exemplarily, the diagnostic instrument can perform a reset operation on the vehicle when it passes the 27 security authentication of the in-vehicle unit and the vehicle is in a safe state (such as the vehicle is in the off state, the vehicle is in the start state but the engine is not started, the vehicle is on a flat ground, etc.), thus ensuring the confidentiality, integrity, and effectiveness of the vehicle wireless diagnostic function and improving the security of vehicle information.
[0093] In an embodiment of the present application, a security authentication method is provided. The diagnostic instrument sends the second verification information corresponding to the diagnostic instrument to the cloud, and the diagnostic instrument receives the second identity certificate sent by the cloud. The second identity certificate is sent by the cloud when it determines that the diagnostic instrument passes the verification based on the second verification information, thereby confirming the legitimacy of the diagnostic instrument. And based on the second identity certificate and the first identity certificate corresponding to the vehicle head unit connected to the diagnostic instrument, the diagnostic instrument performs two-way authentication with the vehicle head unit. When the two-way authentication passes, the vehicle head unit enables the wireless diagnostic function of the corresponding vehicle. The first identity certificate is sent to the vehicle head unit by the cloud when it determines that the vehicle head unit passes the verification based on the first verification information sent by the vehicle head unit. The first identity certificate and the second identity certificate have the same root certificate. Thus, two-way authentication is performed between the legitimate vehicle head unit and the legitimate diagnostic instrument with the same root certificate. If the two-way authentication passes, the wireless diagnostic function of the vehicle is enabled through the vehicle head unit. Furthermore, when performing vehicle diagnosis, a legitimate diagnostic instrument can safely access the vehicle, and the vehicle head unit is used as the main node of the vehicle diagnostic function, shortening the diagnostic communication route and improving the security of vehicle information.
[0094] Please refer to Figure 8 , Figure 8 which shows the module block diagram of a security authentication device provided by an embodiment of the present application. This security authentication device 200 is applied to the above-mentioned electronic device. Below, a detailed elaboration will be made on the Figure 8 shown process. The security authentication device 200 includes: a first verification information sending module 210, a first identity certificate receiving module 220, a vehicle head unit two-way authentication module 230, and a wireless diagnostic function enabling module 240, where:
[0095] The first verification information sending module 210 is configured to send the first verification information corresponding to the vehicle head unit of the vehicle to the cloud through the vehicle head unit.
[0096] The first identity certificate receiving module 220 is configured to receive the first identity certificate sent by the cloud through the vehicle head unit, where the first identity certificate is sent by the cloud when it determines that the vehicle head unit passes the verification based on the first verification information.
[0097] The vehicle head unit two-way authentication module 230 is configured to perform two-way authentication with the diagnostic instrument through the vehicle head unit based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the vehicle head unit. The second identity certificate is sent to the diagnostic instrument by the cloud when it determines that the diagnostic instrument passes the verification based on the second verification information sent by the diagnostic instrument. The first identity certificate and the second identity certificate have the same root certificate.
[0098] The wireless diagnosis function enabling module 240 is used to enable the wireless diagnosis function of the vehicle through the in-vehicle unit if the two-way authentication is passed.
[0099] Further, after enabling the wireless diagnosis function of the vehicle through the in-vehicle unit, the security authentication device 200 may include: an OEM signature verification unit, a software package sending-to-node unit, a supplier signature verification unit, and a software package decryption unit, where:
[0100] The OEM signature verification unit is used to verify the OEM signature in the first software package through the in-vehicle unit based on the first identity certificate if the in-vehicle unit receives the first software package sent by the diagnostic instrument.
[0101] The software package sending-to-node unit is used to send the first software package to the target electronic control unit in the vehicle through the in-vehicle unit if the OEM signature verification passes.
[0102] The supplier signature verification unit is used to verify the supplier signature in the first software package through the target electronic control unit based on the first identity certificate.
[0103] The software package decryption unit is used to decrypt the first software package through the target electronic control unit to obtain the target software package and update the data in the target electronic control unit based on the target software package if it is determined that the supplier signature verification passes.
[0104] Further, the software package sending-to-node unit may include: a transmission address acquisition unit and a software package sending-to-node sub-unit, where:
[0105] The transmission address acquisition unit is used to acquire the transmission address corresponding to the first software package through the in-vehicle unit.
[0106] The software package sending-to-node sub-unit is used to send the first software package to the target electronic control unit in the vehicle that matches the transmission address through the in-vehicle unit.
[0107] Further, the in-vehicle unit two-way authentication module 230 may include: an in-vehicle unit two-way authentication sub-unit, where:
[0108] The in-vehicle unit two-way authentication sub-unit is used to adopt the authentication service of the ISO standard through the in-vehicle unit and perform two-way authentication with the diagnostic instrument based on the first identity certificate and the second identity certificate.
[0109] Please refer to Figure 9 , Figure 9The block diagram of the security authentication device provided by an embodiment of the present application is shown. The security authentication device 300 is applied to the above-mentioned electronic device. The following will be elaborated in detail for Figure 9 the process shown. The security authentication device 300 includes: a second verification information sending module 310, a second identity certificate receiving module 320, and a diagnostic instrument two-way authentication module 330, where:
[0110] The second verification information sending module 310 is configured to send the second verification information corresponding to the diagnostic instrument to the cloud through the diagnostic instrument.
[0111] The second identity certificate receiving module 320 is configured to receive the second identity certificate sent by the cloud through the diagnostic instrument, where the second identity certificate is sent by the cloud when it determines that the diagnostic instrument passes the verification according to the second verification information.
[0112] The diagnostic instrument two-way authentication module 330 is configured to perform two-way authentication with the vehicle-mounted computer through the diagnostic instrument based on the second identity certificate and the first identity certificate corresponding to the vehicle-mounted computer connected to the diagnostic instrument, so that when the two-way authentication passes, the vehicle-mounted computer enables the wireless diagnostic function of the vehicle corresponding to the vehicle-mounted computer. The first identity certificate is sent to the vehicle-mounted computer by the cloud when it determines that the vehicle-mounted computer passes the verification according to the first verification information sent by the vehicle-mounted computer, and the first identity certificate and the second identity certificate have the same root certificate.
[0113] Further, after performing two-way authentication with the vehicle-mounted computer through the diagnostic instrument based on the second identity certificate and the first identity certificate corresponding to the vehicle-mounted computer connected to the diagnostic instrument, so that when the two-way authentication passes, the vehicle-mounted computer enables the wireless diagnostic function of the vehicle corresponding to the vehicle-mounted computer, the security authentication device 300 may further include: a software package obtaining unit and a software package sending unit, where:
[0114] The software package obtaining unit is configured to obtain a first software package through the diagnostic instrument, where the first software package is an encrypted target software package including a supplier signature and an OEM signature.
[0115] A software package sending unit, configured to send the first software package to the in-vehicle unit through the diagnostic instrument, so that the in-vehicle unit verifies the vehicle manufacturer signature in the first software package based on the first identity certificate, and when it is determined that the verification of the vehicle manufacturer signature passes, sends the first software package to a target electronic control unit in the vehicle, so that the target electronic control unit verifies the supplier signature in the first software package based on the first identity certificate, and when it is determined that the verification of the supplier signature passes, decrypts the first software package to obtain a target software package, and updates data in the target electronic control unit based on the target software package.
[0116] Further, before the security authentication device 300 performs a two-way authentication with the in-vehicle unit through the diagnostic instrument based on the second identity certificate and the first identity certificate corresponding to the in-vehicle unit connected to the diagnostic instrument, so that the in-vehicle unit enables the wireless diagnostic function of the corresponding vehicle when the two-way authentication passes, the security authentication device 300 may further include: a wireless connection establishing unit, where:
[0117] The wireless connection establishing unit is configured to establish a wireless connection with the in-vehicle unit through the diagnostic instrument, and the IP address of the diagnostic instrument and the IP address of the in-vehicle unit are in the same network segment.
[0118] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0119] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical, or other forms of coupling.
[0120] In addition, in each embodiment of the present application, each functional module may be integrated in a processing module, or each module may exist physically alone, or two or more modules may be integrated in one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0121] Please refer to Figure 10 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be a vehicle, a cloud platform, a server, a computer, or other devices with processing capabilities. Among them, the electronic device 100 may be understood as a server. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
[0122] Among them, the processor 110 may include one or more processing cores. The processor 110 is connected to various parts within the entire electronic device 100 through various interfaces and circuits. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120, it performs various functions of the electronic device 100 and processes data. Optionally, the processor 110 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 110 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 110 and may be implemented separately through a communication chip.
[0123] The memory 120 may include random access memory (RAM) and may also include read-only memory. The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created during the use of the electronic device 100 (such as phone book, audio and video data, chat record data, etc.).
[0124] Please refer to Figure 11 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable medium 400, and the program code can be called by the processor to execute the methods described in the above method embodiments.
[0125] The computer-readable storage medium 400 can be an electronic memory such as a flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 400 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 400 has a storage space for program code 410 that executes any of the method steps in the above-described methods. These program codes can be read out from or written into one or more computer program products. The program code 410 can be compressed in a suitable form, for example.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A security authentication method, characterized in that, The method includes: Sending, by the in-vehicle unit of the vehicle, first verification information corresponding to the in-vehicle unit to the cloud; Receiving, by the in-vehicle unit, a first identity certificate sent by the cloud, where the first identity certificate is sent by the cloud when it determines that the in-vehicle unit passes verification based on the first verification information; Performing two-way authentication with the diagnostic instrument by the in-vehicle unit based on the first identity certificate and a second identity certificate corresponding to the diagnostic instrument connected to the in-vehicle unit, where the second identity certificate is sent to the diagnostic instrument by the cloud when it determines that the diagnostic instrument passes verification based on second verification information sent by the diagnostic instrument, and the first identity certificate and the second identity certificate have the same root certificate; If the two-way authentication passes, enabling, by the in-vehicle unit, the wireless diagnostic function of the vehicle.
2. The method according to claim 1, characterized in that After enabling, by the in-vehicle unit, the wireless diagnostic function of the vehicle, it further includes: If the in-vehicle unit receives a first software package sent by the diagnostic instrument, verifying, by the in-vehicle unit, the vehicle manufacturer signature in the first software package based on the first identity certificate; If the verification of the vehicle manufacturer signature passes, sending, by the in-vehicle unit, the first software package to a target electronic control unit in the vehicle; Verifying, by the target electronic control unit, the supplier signature in the first software package based on the first identity certificate; If it is determined that the verification of the supplier signature passes, decrypting, by the target electronic control unit, the first software package to obtain a target software package, and updating data in the target electronic control unit based on the target software package.
3. The method according to claim 2, wherein The sending, by the in-vehicle unit, the first software package to a target electronic control unit in the vehicle includes: Obtaining, by the in-vehicle unit, a transmission address corresponding to the first software package; Sending, by the in-vehicle unit, the first software package to the target electronic control unit in the vehicle that matches the transmission address.
4. The method according to any one of claims 1 to 3, characterized in that The performing, by the in-vehicle unit, two-way authentication with the diagnostic instrument based on the first identity certificate and a second identity certificate corresponding to the diagnostic instrument connected to the in-vehicle unit includes: Performing two-way authentication with the diagnostic instrument by the in-vehicle unit using an ISO standard authentication service and based on the first identity certificate and the second identity certificate.
5. A security authentication method, characterized in that, The method includes: Sending, by the diagnostic instrument, second verification information corresponding to the diagnostic instrument to the cloud; Receiving, by the diagnostic instrument, a second identity certificate sent by the cloud, where the second identity certificate is sent by the cloud when it determines that the diagnostic instrument passes verification based on the second verification information; Performing two-way authentication with the in-vehicle unit by the diagnostic instrument based on the second identity certificate and a first identity certificate corresponding to the in-vehicle unit connected to the diagnostic instrument, so that when the two-way authentication passes, the in-vehicle unit enables the wireless diagnostic function of the vehicle corresponding to the in-vehicle unit, where the first identity certificate is sent to the in-vehicle unit by the cloud when it determines that the in-vehicle unit passes verification based on first verification information sent by the in-vehicle unit, and the first identity certificate and the second identity certificate have the same root certificate.
6. The method according to claim 5, wherein After the diagnostic instrument performs two-way authentication with the in-vehicle unit based on the second identity certificate and the first identity certificate corresponding to the in-vehicle unit connected to the diagnostic instrument, so that the in-vehicle unit enables the wireless diagnostic function of the vehicle corresponding to the in-vehicle unit when the two-way authentication is passed, it further includes: Obtain a first software package through the diagnostic instrument, where the first software package is an encrypted target software package including a supplier signature and an OEM signature; Send the first software package to the in-vehicle unit through the diagnostic instrument, so that the in-vehicle unit verifies the OEM signature in the first software package based on the first identity certificate, and when it is determined that the verification of the OEM signature passes, send the first software package to the target electronic control unit in the vehicle, so that the target electronic control unit verifies the supplier signature in the first software package based on the first identity certificate, and when it is determined that the verification of the supplier signature passes, decrypt the first software package to obtain the target software package, and update the data in the target electronic control unit based on the target software package.
7. The method according to claim 5 or 6, characterized in that, Before the diagnostic instrument performs two-way authentication with the in-vehicle unit based on the second identity certificate and the first identity certificate corresponding to the in-vehicle unit connected to the diagnostic instrument, so that the in-vehicle unit enables the wireless diagnostic function of the vehicle corresponding to the in-vehicle unit when the two-way authentication is passed, it further includes: Establish a wireless connection between the diagnostic instrument and the in-vehicle unit, and the IP address of the diagnostic instrument and the IP address of the in-vehicle unit are in the same network segment.
8. A security authentication device, characterized in that, The device includes: A first verification information sending module, configured to send the first verification information corresponding to the in-vehicle unit to the cloud through the in-vehicle unit of the vehicle; A first identity certificate receiving module, configured to receive the first identity certificate sent by the cloud through the in-vehicle unit, where the first identity certificate is sent by the cloud when it is determined that the in-vehicle unit passes the verification according to the first verification information; An in-vehicle unit two-way authentication module, configured to perform two-way authentication with the diagnostic instrument through the in-vehicle unit based on the first identity certificate and the second identity certificate corresponding to the diagnostic instrument connected to the in-vehicle unit, where the second identity certificate is sent to the diagnostic instrument by the cloud when it is determined that the diagnostic instrument passes the verification according to the second verification information sent by the diagnostic instrument, and the first identity certificate and the second identity certificate have the same root certificate; A wireless diagnostic function enabling module, configured to enable the wireless diagnostic function of the vehicle through the in-vehicle unit if the two-way authentication passes.
9. A security authentication device, characterized in that, The device includes: A second verification information sending module, configured to send the second verification information corresponding to the diagnostic instrument to the cloud through the diagnostic instrument; A second identity certificate receiving module, configured to receive the second identity certificate sent by the cloud through the diagnostic instrument, where the second identity certificate is sent by the cloud when it is determined that the diagnostic instrument passes the verification according to the second verification information; The diagnostic instrument two-way authentication module is used to perform two-way authentication with the vehicle head unit through the diagnostic instrument based on the second identity certificate and the first identity certificate corresponding to the vehicle head unit connected to the diagnostic instrument, so that the vehicle head unit enables the wireless diagnostic function of the vehicle corresponding to the vehicle head unit when the two-way authentication is passed. Among them, the first identity certificate is sent to the vehicle head unit by the cloud when it determines that the vehicle head unit passes the verification according to the first verification information sent by the vehicle head unit, and the first identity certificate and the second identity certificate have the same root certificate.
10. An electronic device, characterized in that, It includes: One or more processors; A memory; One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-7.
11. A computer-readable storage medium, characterized in that, Program code is stored in the computer-readable storage medium, and the program code can be called by the processor to execute the method according to any one of claims 1-7.