Vehicle security access method and device, equipment and storage medium

By dynamically adjusting the security access level and key verification of the on-board controller, the problem of fixed security access level and easy to be cracked in the prior art is solved, and higher security and reliability are achieved.

CN119276540APending Publication Date: 2025-01-07江苏智驭汽车科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411265360.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing vehicle-mounted controller has fewer and fixed security access levels, which are easy to be cracked, resulting in invalid security access of the controller and affecting the safety of vehicle use.

Method used

By receiving the level confirmation request sent by the host computer, obtain the current security access level of the controller, and negotiate the target seed and key with the host computer, perform consistency verification, and dynamically adjust the security access level to ensure authorized access.

Benefits of technology

Effectively prevent unauthorized access, improve the security of the controller, and ensure the safety and reliability of vehicle use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276540A_ABST
    Figure CN119276540A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle safety access method, device and equipment and a storage medium, and the method comprises the steps: receiving a grade confirmation request sent by an upper computer, obtaining a current safety access grade of a controller, returning the current safety access grade to the upper computer, receiving a target seed request sent by the upper computer, and sending the target seed request to the controller; and obtaining a target seed, returning the target seed to the upper computer, receiving a key sent by the upper computer, performing consistency verification on the key, determining that the key consistency verification is passed, and unlocking the current security access level to the upper computer. Through the level confirmation request and the dynamic key verification, an illegal upper computer is prevented from finding out the security access level supported by the controller in a diagnosis message polling mode, it is ensured that the authorized upper computer securely accesses the controller, flexible access control can be carried out according to different security access levels, and the security of the access controller is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and in particular to a vehicle security access method, device, equipment and storage medium. Background Art

[0002] The vehicle control unit (VCU) is a core component in the vehicle's electronic system, used to manage and control the various subsystems of the vehicle. If there is no access restriction on the upload and download process of important data of the controller, it may pose a great threat to the safety of the entire vehicle. Therefore, it is necessary to build a security mechanism into the vehicle controller to prevent unauthorized access and potential malware attacks, especially for the controller in the chassis domain, which needs to take comprehensive security protection measures in terms of data interaction. Secure access controls and protects access to vehicle controller data and functions by implementing a series of security measures. The UDS (Unified Diagnostic Services) in the secure access mechanism is a standardized diagnostic service protocol that is widely used in vehicle diagnosis, troubleshooting and programming. The UDS protocol defines a series of services, among which the "$27 service" is mainly used to protect sensitive functions of the vehicle, such as programming, parameter settings and firmware updates, to prevent unauthorized access.

[0003] At present, the security access levels of existing vehicle controllers are generally divided into two layers according to different software running scenarios, including application layer software and Boot layer software. The algorithms of the two are generally the same, but there are differences in the keys used for encryption and decryption, so that different keys can be calculated to meet the security access requirements of different usage scenarios. However, whether it is application layer software or Boot layer software, its security access level is relatively small and fixed. External devices or users can lock the security access level supported by the controller by traversing the diagnostic request security access level. If the subsequent security algorithm is cracked, the security access will be completely cracked, resulting in invalid security access to the controller, further affecting the safety of vehicle use. Summary of the invention

[0004] In view of this, the present invention aims to propose a vehicle security access method, device, equipment and storage medium to solve the problem that the current vehicle controller security access level is small and fixed, and the security access is easy to be cracked, resulting in invalid security access of the controller, so as to achieve effective and reliable vehicle security access.

[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0006] In a first aspect of the present invention, a vehicle security access method is first provided, which is applied to a controller at a vehicle end, the controller being communicatively connected to a host computer, and the method comprises:

[0007] Receive the level confirmation request sent by the host computer, obtain the current security access level of the controller, and return the current security access level to the host computer; wherein the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level;

[0008] Receiving a target seed request sent by the host computer, obtaining a target seed and returning the target seed to the host computer;

[0009] Receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed;

[0010] Determine that the key consistency verification passes, and unlock the current security access level to the host computer.

[0011] Optionally, the receiving the level confirmation request sent by the host computer, obtaining the current security access level of the controller, and returning the current security access level to the host computer includes:

[0012] Receiving a level confirmation request sent by the host computer; wherein the level confirmation request includes the security access level of the controller;

[0013] Identify the security access level in the level confirmation request, and traverse the dynamic security access level state machine in the controller to obtain the current security access level of the controller; wherein the security access level in the level confirmation request is consistent with the current security access level of the controller;

[0014] The current security access level is returned to the host computer.

[0015] Optionally, receiving the target seed request sent by the host computer, obtaining the target seed and returning the target seed to the host computer includes:

[0016] Receiving a target seed request sent by the host computer within a preset time period;

[0017] According to the current security access level of the controller, generating a target seed corresponding to the current security access level;

[0018] The target seed is returned to the host computer.

[0019] Optionally, the receiving the key sent by the host computer and performing consistency verification on the key includes:

[0020] Pre-calculating the target seed using an agreed algorithm to generate a target key corresponding to the target seed;

[0021] Receiving a key sent by the host computer; wherein the key is obtained by the host computer calculating the target seed using the agreed algorithm;

[0022] The key sent by the host computer is verified for consistency with the pre-generated target key to generate a verification result.

[0023] Optionally, after verifying the consistency of the key sent by the host computer with the pre-generated target key and generating a verification result, the method further includes:

[0024] If it is determined that the verification result is that the key consistency verification fails, an error code is returned to the host computer.

[0025] Optionally, after determining that the key consistency verification is passed and unlocking the current security access level to the host computer, the method further includes:

[0026] Receiving a level switching request sent by the host computer, and performing a legitimacy verification on the level switching request;

[0027] It is determined that the level switching request passes verification, and the current security access level is switched to a target security access level.

[0028] Optionally, the receiving the level switching request sent by the host computer and performing legality verification on the level switching request includes:

[0029] Receiving a level switching request sent by the host computer, and returning a random string to the host computer; wherein the level switching request includes a target security access level to be switched;

[0030] The key string sent by the host computer is verified to determine the legitimacy of the level switching request of the host computer; wherein the key string is calculated by the host computer according to the random string.

[0031] In a second aspect of the present invention, a vehicle security access device is provided, which is applied to a controller at a vehicle end, the controller is communicatively connected to a host computer, and the device comprises:

[0032] A level confirmation module, used to receive a level confirmation request sent by the host computer, obtain the current security access level of the controller, and return the current security access level to the host computer; wherein the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level;

[0033] A seed acquisition module, used for receiving a target seed request sent by the host computer, acquiring a target seed and returning the target seed to the host computer;

[0034] A key verification module, used for receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed;

[0035] The unlocking level module is used to determine whether the key consistency verification is passed and unlock the current security access level to the host computer.

[0036] Optionally, the level confirmation module includes:

[0037] A first receiving submodule is used to receive a level confirmation request sent by the host computer; wherein the level confirmation request includes the security access level of the controller;

[0038] an identification submodule, configured to identify the security access level in the level confirmation request, and traverse the dynamic security access level state machine in the controller to obtain the current security access level of the controller; wherein the security access level in the level confirmation request is consistent with the current security access level of the controller;

[0039] The first returning submodule is used to return the current security access level to the host computer.

[0040] Optionally, the seed acquisition module includes:

[0041] A second receiving submodule is used to receive a target seed request sent by the host computer within a preset time period;

[0042] A first generating submodule, configured to generate a target seed corresponding to a current security access level according to a current security access level of the controller;

[0043] The second returning submodule is used to return the target seed to the host computer.

[0044] Optionally, the verification key module includes:

[0045] The second generation submodule is used to calculate the target seed using an agreed algorithm in advance to generate a target key corresponding to the target seed;

[0046] A third receiving submodule is used to receive a key sent by the host computer; wherein the key is obtained by the host computer calculating the target seed using the agreed algorithm;

[0047] The first verification submodule is used to verify the consistency of the key sent by the host computer with the pre-generated target key and generate a verification result.

[0048] Optionally, the verification key module further includes:

[0049] The third returning submodule is used to return an error code to the host computer if the verification result is that the key consistency verification fails.

[0050] Optionally, the device further comprises:

[0051] A verification request module, used for receiving a level switching request sent by the host computer, and performing a legitimacy verification on the level switching request;

[0052] The level switching module is used to determine whether the level switching request is verified to be passed and switch the current security access level to a target security access level.

[0053] Optionally, the verification request module includes:

[0054] The fourth receiving submodule is used to receive a level switching request sent by the host computer and return a random string to the host computer; wherein the level switching request includes a target security access level to be switched;

[0055] The second verification submodule is used to verify the key string sent by the host computer to determine the legitimacy of the level switching request of the host computer; wherein the key string is calculated by the host computer according to the random string.

[0056] According to another aspect of the present invention, there is also provided an electronic device, comprising:

[0057] processor;

[0058] a memory for storing instructions executable by the processor;

[0059] Wherein, the processor is configured to execute the instructions to implement the vehicle security access method as described above.

[0060] According to another aspect of the present invention, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle security access method described above are implemented.

[0061] The vehicle security access method of the present invention has the following advantages:

[0062] The vehicle security access method provided by the embodiment of the present invention receives a level confirmation request sent by the host computer, obtains the current security access level of the controller, returns the current security access level to the host computer, receives a target seed request sent by the host computer, obtains the target seed and returns the target seed to the host computer, receives the key sent by the host computer, performs consistency verification on the key, determines that the key consistency verification passes, and unlocks the current security access level to the host computer. The embodiment of the present invention prevents an illegal host computer from using diagnostic message polling to find out the security access level supported by the controller through level confirmation request and dynamic key verification, ensures that the host computer is authorized to securely access the controller, dynamically uses the target seed to generate the key corresponding to the security access level, ensures reliable communication between the host computer and the controller, can perform flexible access control according to different security access levels, meet security requirements in different scenarios, effectively prevent unauthorized controller information access through key consistency verification and security access level confirmation, improve the security of accessing the controller, and further ensure the safety of vehicle use.

[0063] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0065] Figure 1 is a flow chart of the steps of a vehicle security access method provided by an embodiment of the present invention;

[0066] Figure 2 yes Figure 1 The flowchart of step 101 in the vehicle security access method provided by the embodiment of the present invention is shown;

[0067] Figure 3 yes Figure 1 The flowchart of step 102 in the vehicle security access method provided by the embodiment of the present invention is shown;

[0068] Figure 4 yes Figure 1 The flowchart of step 103 in the vehicle security access method provided by the embodiment of the present invention is shown;

[0069] Figure 5 is a flowchart of another vehicle security access method provided by an embodiment of the present invention;

[0070] Figure 6 is a scenario schematic diagram of a vehicle security access method provided by an embodiment of the present invention;

[0071] Figure 7 is an interactive schematic diagram of a vehicle security access method provided by an embodiment of the present invention;

[0072] Figure 8 is a flow chart of a vehicle security access method provided by an embodiment of the present invention;

[0073] Fig. 9 is a structural schematic diagram of a vehicle security access device provided by an embodiment of the present invention;

[0074] Fig.10 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0075] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0076] The first embodiment of the present invention relates to a vehicle security access method, see Figure 1 , shows a flow chart of the steps of a vehicle security access method provided by an embodiment of the present invention, which is applied to a controller at the vehicle end, the controller is communicatively connected with a host computer, and the vehicle security access method includes the following steps:

[0077] Step 101, receiving a level confirmation request sent by a host computer, obtaining the current security access level of the controller, and returning the current security access level to the host computer.

[0078] The current security access level is used by the host computer to generate a target seed request corresponding to the current security access level.

[0079] In an embodiment of the present invention, in order to solve the problem that the existing vehicle-mounted controller has few and fixed security access levels, an external device or user can lock the security access level supported by the controller by traversing the diagnostic request security access level, and the security access is easily cracked, resulting in invalid security access to the controller. This embodiment adopts a dynamic security access mechanism. Dynamic security access requires confirming the currently supported security level with the controller in advance to avoid illegal host computers using diagnostic message polling to find out the security access level supported by the controller, ensure that the host computer is authorized to securely access the controller, dynamically use the target seed to generate a key corresponding to the security access level, and effectively prevent unauthorized controller information access through key consistency verification and security access level confirmation, thereby improving the security of access to the controller.

[0080] It should be noted that the controller on the vehicle side is communicatively connected with the host computer, and the controller receives a level confirmation request sent by the host computer. In response to the level confirmation request, the controller obtains its own current security access level and returns the security access level to the host computer, so that the host computer can generate a corresponding seed request based on the returned security access level. After the host computer (such as the UDS diagnostic tool) and the vehicle controller confirm the current security access level of the vehicle, a seed request is sent to the vehicle's ECU to request a target seed (Seed). The target seed is generated by the controller according to the current security access level, and the seed is a random number or pseudo-random number used to generate a key.

[0081] Specifically, dynamic security access must confirm the currently supported security level with the controller in advance. The controller first receives the level confirmation request sent by the host computer. The level confirmation request includes the security access level of the controller. By identifying the security access level in the level confirmation request, the dynamic security access level state machine in the controller is traversed to obtain the current security access level of the controller, ensuring that the security access level in the level confirmation request is consistent with the current security access level of the controller, and returning the current security access level to the host computer.

[0082] In this embodiment, the security access levels supported by the controller may include Level 1, Level 3, and Level 5. After passing the Level 1 security access, a small amount of data modification in the controller can be supported; after passing the Level 3 security access, a larger amount of data modification in the controller can be supported; after passing the Level 5 security access, all necessary data modification in the controller can be supported. Before any security operation is performed, the factory default security access level supported by the controller is Level 1.

[0083] It should be noted that this embodiment is based on the Dcm standard module of the AUTOSAR (AUTomotive Open System Architecture) architecture, combined with the state machine determination of the application layer. Since the current vehicle controller software is mostly developed using the AUTOSAR architecture, and UDS (Unified Diagnostic Services) diagnosis is developed based on the Dcm standard module of the AUTOSAR architecture, (Automotive Open System Architecture, AUTOSAR) is an open and standardized automotive software architecture for providing a common software platform for vehicle controllers. In the AUTOSAR architecture, Dcm (Diagnostic Communication Management) is a standard module responsible for implementing UDS diagnostic services. The Dcm module manages the diagnostic communication of the ECU, processes requests from diagnostic tools, and executes corresponding diagnostic services based on the requests. The Dcm module usually works in conjunction with other AUTOSAR modules (such as Com, PduR, etc.) to achieve complete diagnostic functions.

[0084] Specifically, the parameters Figure 6 , showing a scenario diagram of a vehicle security access method provided by an embodiment of the present invention, the CAN communication module may include modules such as Can, CanIf and CanTp defined in the AUTOSAR architecture, which are used to receive or send diagnostic requests / responses; that is, to realize the interaction between the controller and the host computer; the Dcm module is a diagnostic module defined in the AUTOSAR architecture, which is used to process various diagnostic requests and generate corresponding diagnostic responses; the controller processes requests and generates responses internally, and the dynamic security access module is an application layer software that specifically implements the dynamic security access function using the Callout function interface provided by the Dcm module, and is divided into two parts: a dynamic security access state machine and a specific request message processing, which will not be described one by one here.

[0085] Step 102, receiving a target seed request sent by the host computer, obtaining the target seed and returning the target seed to the host computer.

[0086] In an embodiment of the present invention, a controller receives a target seed request sent by a host computer, obtains a target seed and returns the target seed to the host computer, wherein the target seed is a random number or a pseudo-random number used for a subsequent key generation process. Specifically, the controller receives a target seed request sent by the host computer within a preset time period, generates a target seed corresponding to the current security access level according to the current security access level of the controller, and returns the target seed to the host computer. By receiving the target seed request from the host computer and returning the target seed, the integrity and security of the data are ensured, and the data is prevented from being tampered with during transmission. The target seed request and return process ensures that the communication between the host computer and the controller is reliable, thereby reducing security risks caused by communication errors.

[0087] Step 103, receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed.

[0088] In an embodiment of the present invention, a controller receives a key sent by a host computer and performs consistency verification on the key; wherein, the key is calculated by the host computer using a target seed, and the controller pre-calculates the target seed using an algorithm agreed with the host computer to generate a target key, and the target key is a key calculated by the controller using the algorithm agreed with the host computer. The controller receives the key from the host computer, and the key sent by the host computer is calculated by the host computer using the same agreed algorithm to calculate the target seed. The controller compares the key sent by the host computer with the pre-generated target key to verify whether the two are consistent. If the two are consistent, the controller generates a verification result, indicating that the key verification is passed; if the two are inconsistent, the controller generates a verification result, indicating that the key verification fails.

[0089] Step 104, determine that the key consistency verification is passed, and unlock the current security access level to the upper computer.

[0090] In order to facilitate those skilled in the art to fully understand the above vehicle security access method, refer to Figure 7 , Figure 7 It is an interactive schematic diagram of a vehicle security access method provided by an embodiment of the present invention, which shows the interactive process of vehicle security access provided by an embodiment of the present invention, specifically including: the host computer confirms the currently supported security level to the controller, the controller feeds back the currently supported security level, the host computer requests a seed of the corresponding level, the controller feeds back the seed of the corresponding level, the host computer calculates the Key according to the seed according to the agreed algorithm and feeds back the Key to the controller, the controller checks whether the Key is correct and feeds back to the host computer whether it is correctly unlocked.

[0091] The vehicle security access method provided by the embodiment of the present invention receives a level confirmation request sent by the host computer, obtains the current security access level of the controller, returns the current security access level to the host computer, receives a target seed request sent by the host computer, obtains the target seed and returns the target seed to the host computer, receives the key sent by the host computer, performs consistency verification on the key, determines that the key consistency verification passes, and unlocks the current security access level to the host computer. The embodiment of the present invention prevents an illegal host computer from using diagnostic message polling to find out the security access level supported by the controller through level confirmation request and dynamic key verification, ensures that the host computer is authorized to securely access the controller, dynamically uses the target seed to generate the key corresponding to the security access level, ensures reliable communication between the host computer and the controller, can perform flexible access control according to different security access levels, meet security requirements in different scenarios, effectively prevent unauthorized controller information access through key consistency verification and security access level confirmation, improve the security of accessing the controller, and further ensure the safety of vehicle use.

[0092] Further, see Figure 2 , showing Figure 1 A flowchart of step 101 of the vehicle security access method is provided, which is substantially the same as the vehicle security access method provided by the first embodiment of the present invention, and step 101 includes:

[0093] Step 201, receiving a level confirmation request sent by a host computer; wherein the level confirmation request includes the security access level of the controller.

[0094] Step 202, identifying the security access level in the level confirmation request, traversing the dynamic security access level state machine in the controller to obtain the current security access level of the controller; wherein the security access level in the level confirmation request is consistent with the current security access level of the controller.

[0095] Step 203, returning the current security access level to the host computer.

[0096] It should be noted that, in an embodiment of the present invention, the controller receives a level confirmation request from a host computer. The level confirmation request includes the current security access level of the controller to be confirmed by the host computer with the controller. The controller identifies the security access level contained in the level confirmation request, and traverses its internal dynamic security access level state machine to determine the current security access level. Among them, the dynamic security access level state machine is a predefined state transition diagram, which determines the security access level according to the current state of the controller and external events, and this embodiment does not specifically limit this.

[0097] In this embodiment, confirming that the security access level in the level confirmation request sent by the host computer is consistent with the current security access level of the controller is to ensure that the level requested by the host computer is valid and that the controller can support the level, thereby enhancing the security of the host computer accessing the vehicle controller. Thus, the controller returns its current security access level to the host computer, and the current security access level is used by the host computer to generate a corresponding target seed request for subsequent security access.

[0098] In an embodiment of the present invention, the host computer confirms the currently supported security level to the controller in advance, ensuring the consistency of the security access level between the host computer and the controller, thereby laying the foundation for subsequent seed request and key verification steps, thereby ensuring that only the host computer that correctly requests the security access level can access the vehicle controller, thereby improving the security and anti-tampering capabilities of the vehicle system.

[0099] Further, see Figure 3 , showing Figure 1 The flowchart of step 102 of the vehicle security access method provided is substantially the same as the vehicle security access method provided in the first embodiment of the present invention. Step 102 includes:

[0100] Step 301, receiving a target seed request sent by a host computer within a preset time period.

[0101] Step 302: Generate a target seed corresponding to the current security access level according to the current security access level of the controller.

[0102] Step 303, returning the target seed to the host computer.

[0103] It should be noted that, in the embodiment of the present invention, the controller receives a target seed request from the host computer. The target seed request is sent within a preset time window to ensure the timeliness and security of the request. The preset duration can be a fixed value or dynamically set according to the security policy of the system, which is not specifically limited here.

[0104] Specifically, the controller generates a target seed according to its current security access level. The target seed is a random number or pseudo-random number, which is used in the subsequent key generation process. This embodiment does not limit the algorithm involved in seed generation, and it can be any method of generating random numbers or pseudo-random numbers to ensure its randomness and unpredictability. The controller returns the generated target seed to the host computer for the host computer to calculate the key for subsequent security access verification.

[0105] It should be noted that if the host computer level confirmation request is not executed or the security access seed is not requested within the specified time after the host computer level confirmation request is executed, it is considered that the access requirements are not met, and the controller will return an error code to the host computer. That is, if the current security level is not confirmed to the controller or the seed is not requested within the specified time after the security level is confirmed, all subsequent messages requesting security access seeds will be regarded as error diagnosis requests and return an error code, so as to eliminate the possibility of obtaining the currently supported security access level through traversal means, thereby enhancing the security of security access.

[0106] The embodiment of the present invention ensures the dynamic generation and transmission of the target seed, thereby providing a basis for the subsequent key verification step. The target seed request sent by the upper computer within a preset time period can ensure the timeliness of access, improve the security and anti-tampering capabilities of the vehicle system, and prevent replay attacks and other types of security threats.

[0107] Further, see Figure 4 , showing Figure 1 The flowchart of step 103 of the vehicle security access method provided is substantially the same as the vehicle security access method provided by the first embodiment of the present invention. Step 103 includes:

[0108] Step 401, pre-calculate the target seed using an agreed algorithm to generate a target key corresponding to the target seed.

[0109] Step 402, receiving the key sent by the host computer; wherein the key is obtained by the host computer by calculating the target seed using an agreed algorithm.

[0110] Step 403, verify the consistency of the key sent by the host computer with the pre-generated target key to generate a verification result.

[0111] It should be noted that in the embodiment of the present invention, the controller pre-calculates the target seed using the algorithm agreed with the host computer to generate a target key. The target key is the key calculated by the controller using the algorithm agreed with the host computer, and is also the key expected to be received from the host computer. The controller receives the key from the host computer. The key sent by the host computer is obtained by the host computer using the same agreed algorithm to calculate the target seed. The controller compares the key sent by the host computer with the pre-generated target key to verify whether the two are consistent. If the two are consistent, the controller generates a verification result indicating that the key verification is passed; if the two are inconsistent, the controller generates a verification result indicating that the key verification fails. Among them, the agreed algorithm in this embodiment can be any algorithm for generating a key, which is used for the controller and the host computer to calculate the key using the same algorithm, and this embodiment does not specifically limit this.

[0112] The embodiment of the present invention ensures the dynamic generation and verification of keys, thereby providing security for access to the vehicle controller, ensuring that only the host computer that has passed the key verification can further access the vehicle controller, preventing unauthorized access and other types of security threats, and improving the security of the vehicle system.

[0113] Specifically, step 403 performs consistency verification between the key sent by the host computer and the pre-generated target key, and after generating the verification result, it also includes: if the verification result is that the key consistency verification fails, an error code is returned to the host computer.

[0114] It should be noted that, in an embodiment of the present invention, the key sent by the host computer is verified for consistency with the pre-generated target key to generate a verification result. The controller compares the key sent by the host computer with the pre-generated target key to verify whether the two are consistent. If the verification result indicates that the key consistency verification fails, the controller will return an error code to the host computer. The error code is used to indicate that the host computer key verification failed, which may be caused by key calculation errors, transmission errors or other security issues.

[0115] The embodiment of the present invention ensures timely feedback when key verification fails, thereby helping the host computer to identify and process the cause of the access failure, which can enhance the security and anti-tampering capabilities of the vehicle system. The use of error codes also makes troubleshooting and system maintenance more convenient and efficient.

[0116] Reference Figure 5 , shows a flow chart of steps of another vehicle security access method provided by an embodiment of the present invention, which method is basically the same as the vehicle security access method provided by the first embodiment of the present invention, except that the method may further include:

[0117] Step 101, receiving a level confirmation request sent by a host computer, obtaining the current security access level of the controller, and returning the current security access level to the host computer.

[0118] Wherein, the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level;

[0119] Step 102, receiving a target seed request sent by the host computer, obtaining the target seed and returning the target seed to the host computer;

[0120] Step 103, receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed.

[0121] Step 104, determine that the key consistency verification is passed, and unlock the current security access level to the upper computer.

[0122] The above steps 101 to 104 are described in the foregoing description and will not be described in detail here.

[0123] Step 105: receiving a level switching request sent by the host computer, and performing a validity verification on the level switching request.

[0124] It should be noted that, since the amount of data information that can be accessed at different security access levels is different, if the amount of data that the upper computer needs to access changes, a level switching request is sent to enable the controller to switch the currently supported security access level. Specifically, the upper computer can perform a variety of security operations, including security verification operation A, which is used to increase the currently supported security access level from Level 1 to Level 3; security operation B, which is used to increase the currently supported security access level from Level 3 to Level 5; and security operation C, which is used to reduce the currently supported security access level back to Level 1.

[0125] Step 106: Determine whether the level switching request verification is successful, and switch the current security access level to the target security access level.

[0126] In an embodiment of the present invention, after unlocking the current security access, the controller verifies through a diagnostic service that the host computer has the authority to switch to other security access levels. Specifically, it receives a level switching request sent by the host computer and verifies the legitimacy of the level switching request. This may include: first, receiving the level switching request sent by the host computer, and returning a random character string to the host computer; wherein the level switching request includes the target security access level to be switched; secondly, verifying the key character string sent by the host computer to determine the legitimacy of the level switching request of the host computer; wherein the key character string is calculated by the host computer based on the random character string.

[0127] For example, two $31 services are required to complete the legitimacy verification of the level switching request: $31 service A: the host computer sends a request message (including the security level to be switched to), and the controller returns a random string; $31 service B: the host computer obtains a key string based on the random string and the agreed algorithm, and the controller determines the legitimacy of the host computer by verifying whether the key string corresponding to the security level is correct.

[0128] It should be noted that the present embodiment does not limit the specific execution location of steps 105 and 106. In the present embodiment, for ease of understanding, the execution of steps 105 and 106 after step 104 is taken as an example for description. In actual use, steps 105 and 106 can also be completed as a step before step 105, and each case will not be described one by one here.

[0129] It should be noted that in the above steps, the controller receives a level switching request from the host computer, and the level switching request includes the target security access level to be switched. After receiving the level switching request, the controller verifies the legitimacy of the level switching request. Specifically, the controller returns a random string to the host computer, and the random string is used for subsequent key string generation and verification. The host computer calculates the key string based on the random string returned by the controller, and sends the key string to the controller. The controller verifies the key string sent by the host computer, which can be the controller recalculates the key string using the same algorithm and random string, and compares it with the key string sent by the host computer. If the two are consistent, the controller determines that the level switching request of the host computer is legal; if the two are inconsistent, the controller determines that the level switching request of the host computer is illegal.

[0130] On the basis of achieving the beneficial effects of the first embodiment, the embodiment of the present invention verifies the level switching request sent by the host computer, meets the security access level switching requirements of the host computer, increases corresponding security operations, further verifies the legitimacy of the host computer, increases the difficulty of deciphering security access, and ensures that the data in the controller cannot be easily tampered with. The embodiment of the present invention ensures the legitimacy verification of the level switching request, thereby preventing unauthorized level switching and other security threats, and can ensure that only authorized host computers can switch the security access level of the vehicle controller, thereby improving the security and anti-tampering capabilities of the vehicle system.

[0131] In order to facilitate those skilled in the art to fully understand the above vehicle security access method, refer to Figure 8 , Figure 8 : is a flow chart of a vehicle security access method provided by an embodiment of the present invention, which shows the overall process of vehicle security access provided by an embodiment of the present invention, specifically including:

[0132] S501, determining whether the host computer has confirmed the current security level within a preset time;

[0133] S502, obtaining the currently supported security access level from the dynamic security access state machine;

[0134] S503, determining whether request level security access is supported;

[0135] S504, the controller generates a seed using a random number and sends the seed to the host computer through a diagnostic response;

[0136] S505, the host computer uses the seed to calculate the key, and the controller receives the key sent by the host computer;

[0137] S506, determining whether the key has been verified;

[0138] S507, the controller returns an error code to the host computer;

[0139] S508, the controller is unlocked successfully through the diagnostic response feedback.

[0140] In the above steps of this embodiment, the controller determines whether the host computer has confirmed the current security level within the preset time, ensures that the host computer confirms the security level within the specified time, prevents potential security risks caused by long-term non-response, and improves the real-time and security of access. The controller obtains the currently supported security access level from the dynamic security access state machine. By dynamically obtaining the currently supported security access level, the security policy can be flexibly adjusted according to actual conditions. The controller uses random numbers to generate seeds, and sends the seeds to the host computer through diagnostic responses, which increases the randomness and unpredictability of key generation. The host computer uses the seeds to calculate the key and sends it to the controller, ensuring the uniqueness and security of the key. The communication between the host computer and the controller is ensured through key verification to prevent unauthorized access and data leakage. It is determined whether the key verification is passed. If not, an error code is returned when the key verification fails, and the host computer is notified of the problem in time, which is convenient for quickly locating and solving the problem, and the reliability of the system is improved; if the verification is passed, the controller is successfully unlocked through the diagnostic response feedback, ensuring that the host computer can know the operation result in time.

[0141] Reference Fig. 9 , shows a schematic diagram of the structure of a vehicle security access device provided by an embodiment of the present invention, the device comprising:

[0142] The level confirmation module 601 is used to receive the level confirmation request sent by the host computer, obtain the current security access level of the controller, and return the current security access level to the host computer; wherein the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level;

[0143] A seed acquisition module 602 is used to receive a target seed request sent by the host computer, acquire a target seed and return the target seed to the host computer;

[0144] A key verification module 603 is used to receive the key sent by the host computer and perform consistency verification on the key; wherein the key is calculated by the host computer using the target seed;

[0145] The unlocking level module 604 is used to determine whether the key consistency verification is passed and unlock the current security access level to the host computer.

[0146] Furthermore, the level confirmation module 601 includes:

[0147] A first receiving submodule is used to receive a level confirmation request sent by the host computer; wherein the level confirmation request includes the security access level of the controller;

[0148] an identification submodule, configured to identify the security access level in the level confirmation request, and traverse the dynamic security access level state machine in the controller to obtain the current security access level of the controller; wherein the security access level in the level confirmation request is consistent with the current security access level of the controller;

[0149] The first returning submodule is used to return the current security access level to the host computer.

[0150] Furthermore, the seed acquisition module 602 includes:

[0151] A second receiving submodule is used to receive a target seed request sent by the host computer within a preset time period;

[0152] A first generating submodule, configured to generate a target seed corresponding to a current security access level according to a current security access level of the controller;

[0153] The second returning submodule is used to return the target seed to the host computer.

[0154] Furthermore, the verification key module 603 includes:

[0155] The second generation submodule is used to calculate the target seed using an agreed algorithm in advance to generate a target key corresponding to the target seed;

[0156] A third receiving submodule is used to receive a key sent by the host computer; wherein the key is obtained by the host computer calculating the target seed using the agreed algorithm;

[0157] The first verification submodule is used to verify the consistency of the key sent by the host computer with the pre-generated target key and generate a verification result.

[0158] Furthermore, the verification key module 603 further includes:

[0159] The third returning submodule is used to return an error code to the host computer if the verification result is that the key consistency verification fails.

[0160] Furthermore, the device also includes:

[0161] A verification request module, used for receiving a level switching request sent by the host computer, and performing a legitimacy verification on the level switching request;

[0162] The level switching module is used to determine whether the level switching request is verified to be passed and switch the current security access level to a target security access level.

[0163] Furthermore, the verification request module includes:

[0164] The fourth receiving submodule is used to receive a level switching request sent by the host computer and return a random string to the host computer; wherein the level switching request includes a target security access level to be switched;

[0165] The second verification submodule is used to verify the key string sent by the host computer to determine the legitimacy of the level switching request of the host computer; wherein the key string is calculated by the host computer according to the random string.

[0166] The vehicle security access device provided by the embodiment of the present invention receives a level confirmation request sent by the host computer, obtains the current security access level of the controller, returns the current security access level to the host computer, receives a target seed request sent by the host computer, obtains the target seed and returns the target seed to the host computer, receives a key sent by the host computer, performs consistency verification on the key, determines that the key consistency verification passes, and unlocks the current security access level to the host computer. The embodiment of the present invention prevents an illegal host computer from using diagnostic message polling to find out the security access level supported by the controller through level confirmation request and dynamic key verification, ensures that the host computer is authorized to securely access the controller, dynamically uses the target seed to generate a key corresponding to the security access level, ensures reliable communication between the host computer and the controller, can perform flexible access control according to different security access levels, meet security requirements in different scenarios, effectively prevent unauthorized controller information access through key consistency verification and security access level confirmation, improve the security of accessing the controller, and further ensure the safety of vehicle use.

[0167] Reference Fig.10 , an embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0168] Memory 703, used for storing computer programs;

[0169] The processor 701 is used to execute the program stored in the memory 703 to implement the following steps:

[0170] Receive the level confirmation request sent by the host computer, obtain the current security access level of the controller, and return the current security access level to the host computer; wherein the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level;

[0171] Receiving a target seed request sent by the host computer, obtaining a target seed and returning the target seed to the host computer;

[0172] Receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed;

[0173] Determine that the key consistency verification passes, and unlock the current security access level to the host computer.

[0174] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0175] The communication interface is used for communication between the above terminal and other devices.

[0176] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0177] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0178] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the vehicle security access method described in any one of the above embodiments.

[0179] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0180] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0181] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0182] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A vehicle security access method, characterized in that: A controller applied to a vehicle, wherein the controller is communicatively connected to a host computer, and the method comprises: Receive the level confirmation request sent by the host computer, obtain the current security access level of the controller, and return the current security access level to the host computer; wherein the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level; Receiving a target seed request sent by the host computer, obtaining a target seed and returning the target seed to the host computer; Receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed; Determine that the key consistency verification passes, and unlock the current security access level to the host computer.

2. The method according to claim 1, characterized in that: The receiving the level confirmation request sent by the host computer, obtaining the current security access level of the controller, and returning the current security access level to the host computer includes: Receiving a level confirmation request sent by the host computer; wherein the level confirmation request includes the security access level of the controller; Identify the security access level in the level confirmation request, and traverse the dynamic security access level state machine in the controller to obtain the current security access level of the controller; wherein the security access level in the level confirmation request is consistent with the current security access level of the controller; The current security access level is returned to the host computer.

3. The method according to claim 1, characterized in that The receiving the target seed request sent by the host computer, obtaining the target seed and returning the target seed to the host computer includes: Receiving a target seed request sent by the host computer within a preset time period; According to the current security access level of the controller, generating a target seed corresponding to the current security access level; The target seed is returned to the host computer.

4. The method according to claim 1, characterized in that: The receiving the key sent by the host computer and performing consistency verification on the key includes: Pre-calculating the target seed using an agreed algorithm to generate a target key corresponding to the target seed; Receiving a key sent by the host computer; wherein the key is obtained by the host computer calculating the target seed using the agreed algorithm; The key sent by the host computer is verified for consistency with the pre-generated target key to generate a verification result.

5. The method according to claim 4, characterized in that After verifying the consistency of the key sent by the host computer with the pre-generated target key and generating a verification result, the method further includes: If it is determined that the verification result is that the key consistency verification fails, an error code is returned to the host computer.

6. The method according to claim 1, characterized in that After determining that the key consistency verification is passed and unlocking the current security access level to the host computer, the method further includes: Receiving a level switching request sent by the host computer, and performing a legitimacy verification on the level switching request; It is determined that the level switching request passes verification, and the current security access level is switched to a target security access level.

7. The method according to claim 6, characterized in that The receiving the level switching request sent by the host computer and performing a validity verification on the level switching request includes: Receiving a level switching request sent by the host computer, and returning a random string to the host computer; wherein the level switching request includes a target security access level to be switched; The key string sent by the host computer is verified to determine the legitimacy of the level switching request of the host computer; wherein the key string is calculated by the host computer according to the random string.

8. A vehicle security access device, characterized in that: A controller applied to a vehicle, the controller being communicatively connected to a host computer, the device comprising: A level confirmation module, used to receive a level confirmation request sent by the host computer, obtain the current security access level of the controller, and return the current security access level to the host computer; wherein the current security access level is used by the host computer to generate a target seed request corresponding to the current security access level; A seed acquisition module, used for receiving a target seed request sent by the host computer, acquiring a target seed and returning the target seed to the host computer; A key verification module, used for receiving the key sent by the host computer and performing consistency verification on the key; wherein the key is calculated by the host computer using the target seed; The unlocking level module is used to determine whether the key consistency verification is passed and unlock the current security access level to the host computer.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the instructions to implement the vehicle security access method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the vehicle security access method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Secure communication establishment method, system and apparatus for wireless bms

    WO2026166167A1