Identity authentication method and device and storage medium
By adopting the identity authentication method of gateway center nodes in the CAN network of intelligent connected vehicles and using the session key allocation mechanism, the problem of increasing node identity authentication calculation volume is solved, reducing time and computing overhead, and improving the processing capability of the network and security.
Patent Information
- Application Number
- CN202411168741.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-06
AI Technical Summary
In the CAN network of intelligent connected vehicles, the increase in the number of nodes leads to a square increase in the amount of identity authentication computing, resulting in nodes with weak processing capabilities bear greater computing and time overhead.
By obtaining the list of authenticated nodes, the nodes are authenticated based on the gateway as the central node, the secondary authentication between nodes is reduced, and the session key allocation mechanism is adopted to ensure the secure transmission of authentication information and reduce calculation and time overhead.
It effectively reduces the time and computing overhead in the node identity authentication process, improves the processing capabilities of the CAN network, and ensures the security and reliability of the network.
Smart Images

Figure CN119094182A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology for intelligent connected vehicles, and in particular to an identity authentication method, device and storage medium. Background Art
[0002] With the rapid development of automobiles towards intelligence and networking, the number of ECUs (Electronic Control Units) in modern cars has increased significantly. ECUs are interconnected and communicate through the CAN (Controller Area Network) network. In order to ensure the safety and reliability of vehicle control systems, it is necessary to authenticate the ECU nodes in the CAN network.
[0003] At present, there are a large number of ordinary nodes in the automotive CAN network. In the existing scheme, each ECU node is mutually authenticated. When there are N nodes in the CAN network, the authentication process needs to be performed N*(N-1) / 2 times in total. The amount of calculation required for identity authentication increases quadratically with the number of nodes, which causes ordinary nodes with weaker processing capabilities to bear greater computing and time overheads.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide an identity authentication method, device and storage medium, aiming to solve the technical problem of how to reduce cost overhead in the process of node identity authentication.
[0006] To achieve the above purpose, the present application proposes an identity authentication method, the method comprising:
[0007] Obtaining a list of authentication nodes, and obtaining a current authentication node based on the list of authentication nodes;
[0008] Performing identity authentication on the current authentication node, and upon receiving verification confirmation information sent by the current authentication node, allocating a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key;
[0009] When receiving the authentication completion information fed back by the current authentication node, the next authentication node is obtained based on the node list, and identity authentication is performed on the next authentication node until all authentication nodes in the authentication node list complete identity authentication.
[0010] In one embodiment, the step of authenticating the current authentication node includes:
[0011] Sending authentication challenge information to the current authentication node, so that the current authentication node feeds back authentication response information and reverse challenge information based on the authentication challenge information;
[0012] Upon receiving the authentication response information and the reverse challenge information fed back by the current authentication node, verifying the authentication response information to obtain an authentication response information verification result;
[0013] When the authentication response information verification result is verification passed, reverse response information is sent to the current authentication node based on the reverse challenge information, so that the current authentication node verifies the reverse response information and feeds back verification confirmation information.
[0014] In one embodiment, the authentication challenge information includes an encrypted first random number;
[0015] The step of verifying the authentication response information and the reverse challenge information fed back by the current authentication node upon receiving the authentication response information and the reverse challenge information to obtain the authentication response information verification result comprises:
[0016] When receiving the authentication response information and the reverse challenge information fed back by the current authentication node, parsing the authentication response information to obtain an authentication response information parsing result;
[0017] When the first random number and the identifier of the current authentication node are matched in the authentication response information parsing result, determining that the authentication response information verification result is verification passed;
[0018] When the first random number or the identifier of the current authentication node is not matched in the authentication response information parsing result, it is determined that the authentication response information verification result is verification failure.
[0019] In one embodiment, the reverse challenge information includes an encrypted second random number;
[0020] When the authentication response information verification result is that the verification is passed, the step of sending reverse response information to the current authentication node based on the reverse challenge information includes:
[0021] When the authentication response information verification result is verification passed, the second random number is obtained based on the reverse challenge information, and reverse response information is sent to the current authentication node based on the second random number.
[0022] In one embodiment, the step of allocating a session key to the current authentication node upon receiving the verification confirmation information sent by the current authentication node includes:
[0023] Upon receiving the verification confirmation information sent by the current authentication node, obtaining a preset key matrix, wherein the preset key matrix includes at least one key matrix;
[0024] Determining a target key matrix from the preset key matrices;
[0025] A session key is assigned to the current authentication node based on the target key matrix.
[0026] In one embodiment, the step of determining a target key matrix from the preset key matrix includes:
[0027] Obtaining a security level table, wherein the security level table stores a mapping relationship between authentication nodes and security levels;
[0028] Query the security level corresponding to the current authentication node from the security level table;
[0029] A target key matrix is determined from the preset key matrices based on the security level.
[0030] In one embodiment, the step of allocating a session key to the current authentication node based on the target key matrix includes:
[0031] Get the preset random number and current counter;
[0032] Encrypting the target key matrix and the current counter based on the preset random number to obtain a target ciphertext;
[0033] The target ciphertext is distributed to the current authentication node, so that the current authentication node obtains a session key based on the target ciphertext.
[0034] In addition, to achieve the above purpose, the present application also proposes an identity authentication device, the identity authentication device comprising:
[0035] A node acquisition module, used to acquire an authentication node list, and acquire a current authentication node based on the authentication node list;
[0036] A key distribution module, used to perform identity authentication on the current authentication node, and when receiving the verification confirmation information sent by the current authentication node, distribute a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key;
[0037] The node update module is used to obtain the next authentication node based on the node list and perform identity authentication on the next authentication node when receiving the authentication completion information fed back by the current authentication node, until all authentication nodes in the authentication node list have completed identity authentication.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes an identity authentication device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the identity authentication method described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the identity authentication method described above are implemented.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the identity authentication method described above are implemented.
[0041] One or more technical solutions proposed in this application have at least the following technical effects:
[0042] Acquire a list of authentication nodes, and acquire a current authentication node based on the authentication node list; perform identity authentication on the current authentication node, and upon receiving verification confirmation information sent by the current authentication node, allocate a session key to the current authentication node, so that the current authentication node can feedback authentication completion information based on the session key; upon receiving the authentication completion information fed back by the current authentication node, acquire the next authentication node based on the node list, and perform identity authentication on the next authentication node, until all authentication nodes in the authentication node list have completed identity authentication, use the gateway as the central node, perform identity authentication on the authentication node based on the gateway, and there is no need to perform secondary authentication between the authentication nodes, thereby reducing time and computing overhead in the process of authenticating the nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A flowchart of the first embodiment of the identity authentication method of this application is provided;
[0046] Figure 2A network architecture diagram of the identity authentication method provided in Example 2 of the present application;
[0047] Figure 3 A flow chart of session key distribution of the identity authentication method provided in Example 1 of the present application;
[0048] Figure 4 This is a flow chart of the ECU filling authentication key of the identity authentication method provided in Example 1 of the present application;
[0049] Figure 5 A flowchart of the second embodiment of the identity authentication method of this application is provided;
[0050] Figure 6 A brief flowchart of the identity authentication method provided in Example 2 of the present application;
[0051] Figure 7 This is a schematic diagram of the module structure of the identity authentication device according to an embodiment of the present application;
[0052] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the identity authentication method in the embodiment of the present application.
[0053] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0055] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0056] The main solution of the embodiment of the present application is: obtain an authentication node list, and obtain the current authentication node based on the authentication node list; perform identity authentication on the current authentication node, and upon receiving the verification confirmation information sent by the current authentication node, allocate a session key to the current authentication node, so that the current authentication node can feedback authentication completion information based on the session key; upon receiving the authentication completion information fed back by the current authentication node, obtain the next authentication node based on the node list, and perform identity authentication on the next authentication node, until all authentication nodes in the authentication node list have completed identity authentication.
[0057] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a gateway device, etc. The following takes a gateway device as an example to illustrate this embodiment and the following embodiments.
[0058] Based on this, the present application embodiment provides an identity authentication method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the identity authentication method of this application.
[0059] In this embodiment, the identity authentication method includes steps S10 to S30:
[0060] Step S10, obtaining an authentication node list, and obtaining a current authentication node based on the authentication node list;
[0061] It should be noted that the authentication node specifically refers to the ECU in the CAN network. The authentication node list stores the information of all ECUs in the CAN network that need to be authenticated. The current authentication node refers to the ECU that is currently being authenticated in the authentication node list. ECU is a unit with control logic. An ECU may process (send or receive) messages of multiple security levels and needs to be compatible with multiple security protocols. When producing vehicles, OEMs (Original Equipment Manufacturers) can define the security level according to the vehicle model.
[0062] Specifically, when the security level is only one, there is no level distinction, and all ECUs have the same security strategy. When the security level is divided into two levels, such as high security level and low security level, the ECU that needs to process high security level messages will be defined as high security level ECU, such as acceleration, deceleration, shifting, and steering message categories; the ECU that only needs to process low security level messages will be defined as low security level ECU, such as lights, air conditioning, and seats message categories. High security level ECU contains HSM (Hardware Security Module), which can protect encryption keys and perform encryption operations. Low security level ECU adopts ordinary security strategy. The security level can also be divided into three levels: low, medium, and high.
[0063] Step S20, performing identity authentication on the current authentication node, and upon receiving the verification confirmation information sent by the current authentication node, allocating a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key;
[0064] It should be understood that the solution of the present application uses the gateway as a central node to authenticate the ECU in the CAN network. When an ECU in the CAN network passes the gateway node's authentication, the ECU will be considered safe and reliable. Other ECUs in the CAN network can trust the gateway node's authentication information for the ECU without the need for secondary authentication between nodes. Before authenticating the ECU, the cloud will first authenticate the gateway after detecting that the vehicle is powered on. When the cloud passes the gateway's authentication, the gateway will be confirmed as legitimate. Only then can the gateway act as a trusted central node to verify the ECU. Please refer to Figure 2 , Figure 2 This is a network architecture diagram of the identity authentication method provided in Example 1 of this application. Figure 2 As shown, after the gateway establishes communication with the cloud and performs identity authentication, it can establish communication with the ECU and authenticate the ECU.
[0065] It should be noted that, in the process of the gateway authenticating the current authentication node, the gateway will send authentication challenge information to the traversed current authentication node. When the current authentication node receives the authentication challenge information from the gateway, it will send authentication challenge response information to the gateway based on the authentication challenge information and send reverse challenge information to the gateway. When the gateway receives the authentication challenge response information and reverse challenge information from the current authentication node, it will verify the authentication challenge response information and send reverse response information to the current authentication node based on the reverse challenge information when the verification is successful. When the current authentication node receives the reverse response information from the gateway, it will verify the reverse response information and send verification confirmation information to the gateway when the verification is successful. At this time, the gateway will assign a session key to the current authentication node. When the current authentication node receives the session key, it saves the session key and sends authentication completion information to the gateway so that the gateway can authenticate the next authentication node.
[0066] In addition, it should be noted that the session key is used to generate and encrypt the HMAC value of the message. An ECU that fails identity authentication cannot communicate with an ECU that passes authentication, nor can it decrypt messages sent by an ECU with a high security level.
[0067] In a feasible implementation manner, the step of authenticating the current authentication node in step S20 may include steps A11 to A13:
[0068] Step A11, sending authentication challenge information to the current authentication node, so that the current authentication node feeds back authentication response information and reverse challenge information based on the authentication challenge information;
[0069] It should be understood that when the gateway authenticates the ECU, it will first send an authentication challenge message to the ECU to start the authentication process. The authentication challenge message contains an encrypted random number R1, which is generated by the gateway. The random number is used for subsequent authentication calculations to ensure the security and randomness of the authentication process. After receiving the authentication challenge message, the current authentication node will decrypt the authentication challenge message based on its own node identifier Node2, obtain the random number R1, and generate a message authentication code based on the random number R1 and the node identifier Node2 through the HMAC algorithm as part of the authentication response information, and send a reverse challenge message to the gateway. The reverse challenge message contains an encrypted random number R2, which is generated by the current authentication node. The reverse challenge message is additional challenge information generated by the current authentication node and sent to the gateway, which is used for the identity authentication of the gateway to achieve two-way authentication between the gateway and the ECU.
[0070] Step A12: upon receiving the authentication response information and reverse challenge information fed back by the current authentication node, verify the authentication response information to obtain an authentication response information verification result;
[0071] It should be understood that the authentication response information is a reply generated by the current authentication node based on the authentication challenge information, and the gateway can confirm the identity of the current authentication node by verifying the authentication response information.
[0072] In a feasible implementation, the authentication challenge information includes an encrypted first random number, and step A12 may include: when receiving the authentication response information and reverse challenge information fed back by the current authentication node, parsing the authentication response information to obtain an authentication response information parsing result; when the first random number and the identifier of the current authentication node are matched in the authentication response information parsing result, determining that the authentication response information verification result is a passed verification; when the first random number or the identifier of the current authentication node is not matched in the authentication response information parsing result, determining that the authentication response information verification result is a failed verification.
[0073] It should be understood that the authentication response information includes the encrypted first random number and the identifier of the current authentication node. The random number information and node identifier information of the node communicating with the gateway can be obtained by parsing the authentication response information, wherein the encrypted first random number is the random number R1 generated by the gateway. When the first random number previously generated by the gateway and the identifier of the current authentication node are matched from the acquired random number information and node identifier information, it means that the authentication response information is generated by the correct node based on the correct random number, and the identity of the node communicating with the gateway can be confirmed to be the correct current authentication node, and the verification is passed; when the first random number previously generated by the gateway and the identifier of the current authentication node are not matched from the acquired random number information and node identifier information at the same time, it means that there is a problem with the authentication response information or the identity of the current authentication node is in doubt, and the verification fails.
[0074] Step A13, when the authentication response information verification result is verification passed, reverse response information is sent to the current authentication node based on the reverse challenge information, so that the current authentication node verifies the reverse response information and feeds back verification confirmation information.
[0075] It should be understood that when the authentication response information verification result is verification passed, it means that the node communicating with the gateway is the correct current authentication node and the identity authentication process of the current authentication node has been successful before, and the identity authentication of the current authentication node can continue. That is, the gateway will decrypt the reverse challenge information, obtain the random number R2, and generate a message authentication code based on the random number R2 and the node identification Node1 of the gateway through the HMAC algorithm as part of the reverse response information. After receiving the reverse response information, the current authentication node will parse the reverse response information and verify the random number information and node identification information in the reverse response information to achieve two-way authentication between the gateway and the ECU.
[0076] In a feasible implementation, the reverse challenge information includes an encrypted second random number, and in step A13, when the verification result of the authentication response information is verified to be passed, the step of sending the reverse response information to the current authentication node based on the reverse challenge information may include: when the verification result of the authentication response information is verified to be passed, obtaining the second random number based on the reverse challenge information and sending the reverse response information to the current authentication node based on the second random number. The encrypted second random number is the random number R2 generated by the ECU.
[0077] In another feasible implementation manner, when receiving the verification confirmation information sent by the current authentication node in step S20, the step of allocating a session key to the current authentication node may include steps A21 to A23:
[0078] Step A21, upon receiving the verification confirmation information sent by the current authentication node, obtaining a preset key matrix, wherein the preset key matrix includes at least one key matrix;
[0079] It should be noted that when the verification confirmation information sent by the current authentication node is received, it means that the gateway and the ECU have already performed two-way authentication of identity, and a session key needs to be allocated to the current authentication node so that the authentication nodes that have completed identity authentication can communicate based on the session key. The key matrix is used to generate the session key for ECU communication of the corresponding security level. The preset key matrix is the key matrix randomly generated by the gateway before obtaining the authentication node list.
[0080] Step A22, determining a target key matrix from the preset key matrix;
[0081] It should be understood that before obtaining the authentication node list, the gateway randomly generates at least one key matrix, and different key matrices correspond to different security levels. In the case where there is only one security level, a key matrix will be randomly generated, and this key matrix is the target key matrix. In the case where there are multiple security levels, multiple key matrices will be randomly generated, and the target key matrix needs to be determined according to the security level of the current authentication node.
[0082] In a feasible implementation, step A22 may include: obtaining a security level table, the security level table storing a mapping relationship between authentication nodes and security levels; querying the security level corresponding to the current authentication node from the security level table; and determining a target key matrix from the preset key matrix based on the security level.
[0083] It should be understood that the security level table stores the corresponding relationship between each authentication node, that is, ECU and security level, and the security level corresponding to each ECU can be queried from the security level table based on the unique ECU identifier corresponding to each ECU. Exemplarily, as shown in Table 1, Table 1 can be used to not only query the security level of the ECU undergoing identity authentication, but also determine the ECU type of the ECU.
[0084] Table 1
[0085] ECU identification ECU Type Security Level 0000001 Gearbox high 0000002 Car Windows Low 0000003 engine high …… …… ……
[0086] It should be noted that after the administrator prepares the security level table, the security level table will be sent to the TSP. The TSP will encrypt the security level table with the session key. After sending the security level table to the gateway, the gateway will decrypt the ciphertext of the security level table to obtain the security level table and obtain the number of level divisions based on the security level table, generate a key matrix corresponding to the number of level divisions and save the key matrix to the non-volatile memory. When authenticating the current authentication node, the security level of the current authentication node is queried based on the security level table, and the key matrix corresponding to the security level is used as the target key matrix.
[0087] Step A23: assigning a session key to the current authentication node based on the target key matrix.
[0088] It should be noted that the key matrix can generate session keys through a derivation algorithm to ensure the secure transmission of data between ECUs when the car is running. Figure 3 , Figure 3 This is a flow chart of session key distribution of the identity authentication method provided in Example 1 of the present application. Figure 3 As shown, the gateway randomly generates a key matrix A, and the key matrix A can generate a session key B through a derivation algorithm. After the session key B is distributed to ECU1 and ECU2 with the same security level, ECU1 and ECU2 will be able to communicate.
[0089] In a feasible implementation, step A23 may include: obtaining a preset random number and a current counter; encrypting the target key matrix and the current counter based on the preset random number to obtain a target ciphertext; and allocating the target ciphertext to the current authentication node so that the current authentication node obtains a session key based on the target ciphertext.
[0090] It should be noted that the preset random number is a random number generated during the two-way identity authentication process between the gateway and the current authentication node. The current counter is the fresh value TripCounter, which is incremented each time a communication or specific event occurs. After the current authentication node parses the target ciphertext, it will detect the TripCounter value in the received information. When the TripCounter value is the latest, it will use the preset random number as input and combine it with the target key matrix to derive the session key and store the session key.
[0091] It should be understood that when authenticating the ECU, the gateway and ECU will complete the authentication process through encrypted information. In this process, the gateway and ECU encrypt and decrypt information through the authentication key. Please refer to Figure 4 , Figure 4 This is the ECU filling authentication key process of the identity authentication method provided in Example 1 of this application. Figure 4 As shown, TSP (Telematics Service Provider) applies for an authentication key from the key management center. After entering the manufacturer number and the car VIN code, the key management center will send the ECU authentication key to the gateway and send the corresponding authentication key to the corresponding ECU according to the security level table. The ECU will store the authentication key in non-volatile storage.
[0092] Step S30, upon receiving the authentication completion information fed back by the current authentication node, obtaining the next authentication node based on the node list, and performing identity authentication on the next authentication node until all authentication nodes in the authentication node list have completed identity authentication.
[0093] It should be understood that when the gateway completes the identity authentication with the current authentication node, the gateway will receive the authentication completion information sent by the current authentication node. At this time, the gateway will authenticate the next authentication node until all ECUs in the CAN network have completed the identity authentication to ensure that all nodes communicating in the CAN network are authorized and verified.
[0094] This embodiment provides an identity authentication method, which obtains an authentication node list and obtains a current authentication node based on the authentication node list; performs identity authentication on the current authentication node and, upon receiving verification confirmation information sent by the current authentication node, allocates a session key to the current authentication node so that the current authentication node feeds back authentication completion information based on the session key; upon receiving the authentication completion information fed back by the current authentication node, obtains a next authentication node based on the node list and performs identity authentication on the next authentication node until all authentication nodes in the authentication node list complete identity authentication, uses a gateway as a central node, performs identity authentication on authentication nodes based on the gateway, and does not require secondary authentication between authentication nodes, thereby reducing time overhead and computational overhead in the process of authenticating nodes.
[0095] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 5 Before step S10, the identity authentication method further includes steps S01 to S02:
[0096] Step S01, when a power-on request is detected, obtaining a history counter;
[0097] It should be noted that when a power-on request is detected, it means that the vehicle will be started. At this time, the gateway needs to read the history counter from the non-volatile memory to update the counter value in time, so that the gateway can verify the freshness of the message when authenticating with the current authentication node to ensure that the message is the latest and has not been replayed. In addition, when a wake-up request is detected, the counter value can also be updated.
[0098] Step S02: performing an accumulation operation on the history counter to obtain a current counter, and storing the current counter.
[0099] It should be understood that the accumulation operation on the historical counter specifically refers to increasing the value of the historical counter by 1 to indicate that the vehicle is powered on again. This operation ensures that the current counter obtained can accurately reflect the freshness of the message. Specifically, during the identity authentication process between the gateway and the current authentication node, when the gateway receives the verification confirmation information sent by the current authentication node, it will send the encrypted current counter to the current authentication node. The current authentication node will compare the newly obtained value of the current counter with the value of the historical counter stored during the last identity authentication. When the value of the historical counter is the same as the value of the current counter, it means that the current authentication node is repeatedly authenticated after the vehicle is powered on. At this time, the identity authentication process is stopped to avoid replay attacks.
[0100] For example, to help understand the implementation process of the identity authentication method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 6 , Figure 6 A brief flow chart of an identity authentication method is provided, specifically:
[0101] During the process of the gateway authenticating the ECU, the gateway (Node1) will randomly generate a preset key matrix (such as KeyMatrixH, KeyMatrixL), start traversing the authentication, and send authentication challenge information including Ex(R1) to the current authentication node (Node2) traversed. When the current authentication node receives the authentication challenge information from the gateway, it will send authentication challenge response information such as HMAC(R1+Node2)Ex(R2) to the gateway based on the authentication challenge information and send reverse challenge information such as Ex(R2) to the gateway. When the gateway receives the authentication challenge response information and reverse challenge information from the current authentication node, it will verify the authentication challenge response information and send reverse response information such as HMAC(R1+Node1) to the current authentication node based on the reverse challenge information when the verification is successful. When the current authentication node receives the reverse response information from the gateway, it will verify the reverse response information and send verification confirmation information to the gateway when the verification is successful. At this time, the gateway will select the key matrix KeyMatrix from the preset key matrix according to the security level and send the key matrix KeyMatrix and counter TripCounter encrypted based on the key (KeyA) and random number (R1, R2) to the current authentication node. After parsing the ciphertext, the current authentication node obtains the key matrix KeyMatrix and the counter TripCounter, derives a new authentication key (i.e., session key) in combination with the random number (R1, R2), and sends the authentication completion confirmation information to the gateway. After receiving the authentication completion confirmation information, the gateway also derives a new authentication key (i.e., session key) through R1 and R2 and saves it to the location corresponding to the current authentication node, completing the authentication process for the current authentication node, and authenticating the next authentication node until all authentication nodes in the CAN network are authenticated. At this time, the vehicle will be allowed to perform running operations such as starting the engine.
[0102] This embodiment updates the freshness counter when performing a specific operation, thereby ensuring that during the authentication process between current authentication nodes, the value of the freshness counter is used to verify the freshness of the message, ensuring that the message is the latest and has not been replayed.
[0103] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the identity authentication method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0104] This application also provides an identity authentication device, please refer to Figure 7 , the identity authentication device comprises:
[0105] The node acquisition module 10 is used to acquire an authentication node list, and acquire a current authentication node based on the authentication node list;
[0106] The key distribution module 20 is used to perform identity authentication on the current authentication node, and when receiving the verification confirmation information sent by the current authentication node, distribute a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key;
[0107] The node update module 30 is used to obtain the next authentication node based on the node list and perform identity authentication on the next authentication node when receiving the authentication completion information fed back by the current authentication node, until all authentication nodes in the authentication node list have completed identity authentication.
[0108] The identity authentication device provided by the present application adopts the identity authentication method in the above embodiment, which can solve the technical problem of how to reduce the cost in the process of authenticating the node. Compared with the prior art, the beneficial effects of the identity authentication device provided by the present application are the same as the beneficial effects of the identity authentication method provided by the above embodiment, and the other technical features in the identity authentication device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0109] The present application provides an identity authentication device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the identity authentication method in the above-mentioned embodiment one.
[0110] Reference below Figure 8 , which shows a schematic diagram of the structure of an identity authentication device suitable for implementing the embodiment of the present application. The identity authentication device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The identity authentication device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0111] like Figure 8As shown, the identity authentication device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the identity authentication device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the identity authentication device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows an identity authentication device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0112] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0113] The identity authentication device provided by the present application adopts the identity authentication method in the above embodiment, which can solve the technical problem of how to reduce the cost in the process of authenticating the node. Compared with the prior art, the beneficial effects of the identity authentication device provided by the present application are the same as the beneficial effects of the identity authentication method provided by the above embodiment, and the other technical features in the identity authentication device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0114] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0116] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the identity authentication method in the above-mentioned embodiment.
[0117] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0118] The computer-readable storage medium may be included in the identity authentication device; or may exist independently without being assembled into the identity authentication device.
[0119] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the identity authentication device, the identity authentication device: obtains an authentication node list, and obtains a current authentication node based on the authentication node list; performs identity authentication on the current authentication node, and when receiving the verification confirmation information sent by the current authentication node, allocates a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key; when receiving the authentication completion information fed back by the current authentication node, obtains the next authentication node based on the node list, and performs identity authentication on the next authentication node, until all authentication nodes in the authentication node list complete identity authentication.
[0120] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0123] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned identity authentication method, and can solve the technical problem of how to reduce cost in the process of authenticating nodes. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the identity authentication method provided by the above-mentioned embodiment, and will not be repeated here.
[0124] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned identity authentication method when executed by a processor.
[0125] The computer program product provided by the present application can solve the technical problem of how to reduce the cost in the process of authenticating the node. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the authentication method provided by the above embodiment, which will not be repeated here.
[0126] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An identity authentication method, characterized in that: The identity authentication method comprises: Obtaining a list of authentication nodes, and obtaining a current authentication node based on the list of authentication nodes; Performing identity authentication on the current authentication node, and upon receiving verification confirmation information sent by the current authentication node, allocating a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key; When receiving the authentication completion information fed back by the current authentication node, the next authentication node is obtained based on the node list, and identity authentication is performed on the next authentication node until all authentication nodes in the authentication node list complete identity authentication.
2. The method according to claim 1, characterized in that The step of authenticating the current authentication node includes: Sending authentication challenge information to the current authentication node, so that the current authentication node feeds back authentication response information and reverse challenge information based on the authentication challenge information; Upon receiving the authentication response information and the reverse challenge information fed back by the current authentication node, verifying the authentication response information to obtain an authentication response information verification result; When the authentication response information verification result is verification passed, reverse response information is sent to the current authentication node based on the reverse challenge information, so that the current authentication node verifies the reverse response information and feeds back verification confirmation information.
3. The method according to claim 2, characterized in that The authentication challenge information includes an encrypted first random number; The step of verifying the authentication response information and the reverse challenge information fed back by the current authentication node upon receiving the authentication response information and the reverse challenge information to obtain the authentication response information verification result comprises: When receiving the authentication response information and the reverse challenge information fed back by the current authentication node, parsing the authentication response information to obtain an authentication response information parsing result; When the first random number and the identifier of the current authentication node are matched in the authentication response information parsing result, determining that the authentication response information verification result is verification passed; When the first random number or the identifier of the current authentication node is not matched in the authentication response information parsing result, it is determined that the authentication response information verification result is verification failure.
4. The method according to claim 2, characterized in that The reverse challenge information includes an encrypted second random number; When the authentication response information verification result is that the verification is passed, the step of sending reverse response information to the current authentication node based on the reverse challenge information includes: When the authentication response information verification result is verification passed, the second random number is obtained based on the reverse challenge information, and reverse response information is sent to the current authentication node based on the second random number.
5. The method according to claim 1, characterized in that The step of allocating a session key to the current authentication node upon receiving the verification confirmation information sent by the current authentication node comprises: Upon receiving the verification confirmation information sent by the current authentication node, obtaining a preset key matrix, wherein the preset key matrix includes at least one key matrix; Determining a target key matrix from the preset key matrices; A session key is assigned to the current authentication node based on the target key matrix.
6. The method according to claim 5, characterized in that The step of determining a target key matrix from the preset key matrix comprises: Obtaining a security level table, wherein the security level table stores a mapping relationship between authentication nodes and security levels; Query the security level corresponding to the current authentication node from the security level table; A target key matrix is determined from the preset key matrices based on the security level.
7. The method according to claim 5, characterized in that The step of allocating a session key to the current authentication node based on the target key matrix comprises: Get the preset random number and current counter; Encrypting the target key matrix and the current counter based on the preset random number to obtain a target ciphertext; The target ciphertext is distributed to the current authentication node, so that the current authentication node obtains a session key based on the target ciphertext.
8. The method according to any one of claims 1 to 7, characterized in that Before the step of obtaining the authentication node list and obtaining the current authentication node based on the authentication node list, the method further includes: When a power-on request is detected, a history counter is obtained; Perform an accumulation operation on the historical counter to obtain a current counter, and store the current counter.
9. An identity authentication device, characterized in that: The device comprises: A node acquisition module, used to acquire an authentication node list, and acquire a current authentication node based on the authentication node list; A key distribution module, used to perform identity authentication on the current authentication node, and when receiving the verification confirmation information sent by the current authentication node, distribute a session key to the current authentication node, so that the current authentication node feeds back authentication completion information based on the session key; The node update module is used to obtain the next authentication node based on the node list and perform identity authentication on the next authentication node when receiving the authentication completion information fed back by the current authentication node, until all authentication nodes in the authentication node list have completed identity authentication.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the identity authentication method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Identity authentication method and apparatus, and storage medium
WO2026040255A1
