Authentication method, device and system
By reversely authenticating higher-level nodes in the smart car's hierarchical authentication architecture, lower-level nodes use shared keys and random numbers to generate authentication codes to identify and respond to faults or replacements, solving the security risks of smart car authentication in the existing technology. problems, improving the security and reliability of the system.
Patent Information
- Application Number
- CN202210781939.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-12
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2039-07-12
AI Technical Summary
The existing smart car-level authentication method has security risks. If the gateway, MDC or domain controller fails or is replaced, the entire authentication will be invalid, which may lead to driving accidents or information leakage.
In the hierarchical authentication architecture of smart cars, lower-level nodes reversely authenticate higher-level nodes, use shared keys and random numbers to generate authentication codes, identify and respond to failures or replacements of higher-level nodes, and enter abnormal states to Stop potential harm.
It improves the safety and reliability of smart car systems and avoids driving safety and information security threats caused by higher-level node failures or replacements.
Smart Images

Figure CN115378580B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 201910630536.4, and the original application date is July 12, 2019. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present invention relates to smart car technology, and in particular to an authentication method, system and device applied to smart cars. Background Art
[0003] The Advanced Driver Assistant System (ADAS) of autonomous vehicles relies on many sensors, such as cameras, millimeter-wave radars, ultrasonic radars, laser radars, and so on. In addition, the in-vehicle network also includes nearly 100 electronic control units (ECUs). ECU, also known as the "driving computer", is a microcomputer controller for automobiles, generally composed of CPU, memory, input / output interface, analog-to-digital converter, and large-scale integrated circuits such as shaping and driving. At first, ECU was used to control the operation of the engine. Later, with the development of vehicle electrification, ECU gradually occupied the entire car, from anti-lock braking system, four-wheel drive system, electronically controlled automatic transmission, active suspension system, airbag system, to now gradually extending to various safety, network, entertainment, sensor control systems, etc. of the car body. With the improvement of the degree of vehicle electrification, especially the increase of functions such as autonomous driving and active safety, the number of on-board sensors and ECUs has increased rapidly. The complexity of modern cars can be compared with aviation facilities. For intelligent driving systems, excessive complexity will affect the reliability and safety of the system and increase the difficulty of design.
[0004] In order to solve the bottleneck problem in the development of distributed automotive electronic and electrical architecture, leading Tier 1 (first-tier suppliers of automotive parts) such as Bosch and Delphi proposed the concept of "Domain Controller", dividing the whole vehicle into multiple domains such as powertrain, vehicle safety, body electronics, smart cockpit, and smart driving according to the functions of automotive electronic components, and using multi-core CPU / GPU chips with stronger processing power to relatively centrally control each domain, replacing the distributed automotive electronic and electrical architecture with a hierarchical architecture. Under the hierarchical architecture system, each functional component is placed in an independent domain, and each domain has a corresponding set of control functions. Domains can be securely isolated from each other, and can also communicate and interoperate according to needs. Whether it is ADAS, digital cockpit, or chassis control, they all have their own independent domains.
[0005] In the hierarchical architecture, the gateway acts as the main authentication node device to authenticate the administrators of each domain. It is the core component of the vehicle's electronic and electrical architecture and the data exchange hub of the vehicle network. It can route network data such as CAN (Controller Area Network), LIN (Local Interconnect Network), MOST (Media Oriented System Transport), and FlexRay in different networks. When the device in the domain is a sensor, the Mobile Data Center (MDC) acts as a domain administrator and acts as a secondary authentication node device to authenticate the sensor in the corresponding domain; when the device in the domain is an ECU, the domain controller acts as a domain administrator and acts as a secondary authentication node device to authenticate the ECU in the corresponding domain.
[0006] Legitimate vehicle-mounted sensors and ECUs are of good quality and high price, so they are likely to be stolen or replaced. For example, maintenance personnel are motivated to use counterfeit and low-quality equipment in order to make a profit; car owners may use cheap non-original equipment to replace original equipment; for profit, illegal merchants are also motivated to clone legitimate vehicle-mounted equipment. Fake vehicle-mounted sensors and ECUs will affect the function and performance of the vehicle, and even driving safety. From the perspective of information security, they will also introduce system weaknesses and risks. Therefore, the gateway as the primary authentication node device and the MDC and domain controller as the secondary authentication node device authenticate the devices in the domain to ensure the authenticity and legitimacy of the devices in the domain.
[0007] However, the existing hierarchical authentication method has a security risk: if the gateway, MDC or domain controller is not safe and reliable, such as failing or being replaced, the entire authentication will be invalid; even the replaced gateway, MDC or domain controller may be counterfeit genuine products, causing traffic accidents or information leaks. Summary of the invention
[0008] In order to solve the above technical problems, the embodiments of the present application provide an authentication method, system and device applied to a smart car.
[0009] In the first aspect, an authentication method applied to a smart car is provided, comprising: a second device in the smart car obtains authentication information from a first device in the smart car, the authentication information comprising a first authentication code generated by the first device and a first authentication parameter belonging to the first device; the second device generates a second authentication code using the first authentication parameter; the second device compares the first authentication code and the second authentication code to obtain a first authentication result; wherein the first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device that manages the smart car, and the second device is an intra-domain device. The intra-domain device includes an on-board sensor or an ECU, and the domain administrator device includes a mobile data center or a domain controller. In the hierarchical authentication architecture of a smart car, by enabling a lower-level node to reversely authenticate a higher-level node, the lower-level node can identify an abnormal situation in which a higher-level node fails or is maliciously replaced, thereby avoiding a threat to driving safety or information security caused by a failed or counterfeit higher-level node, and improving the safety and reliability of the smart car system.
[0010] According to the first aspect, in a first possible implementation of the authentication method, the first authentication parameter includes: the identifier of the first device; the second device generates the second authentication code using the first authentication parameter including: the second device generates the second authentication code using the identifier of the first device, the first authentication key shared between the second device and the first device, and the first random number; the first random number is generated by the second device, or carried in the first authentication parameter, or determined jointly based on the random number generated by the second device and the random number carried in the first authentication parameter. The sharing of the first authentication key by the first device and the second device is the basis for mutual authentication between the two devices, and the security and reliability of the authentication are improved by setting the random numbers involved in the authentication in various forms.
[0011] According to the first aspect or the first possible implementation of the first aspect, in a second possible implementation of the authentication method, when the first authentication result is an authentication failure, the second device enters an abnormal state, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm. The failure of the first authentication indicates that an abnormal situation may exist, and in this case, the second device entering an abnormal state can effectively prevent the occurrence of harm.
[0012] According to the first aspect, or any implementation of the first aspect above, in the third possible implementation of the authentication method, the first device is a domain administrator device in the smart car, and the second device is a domain device; the authentication information also includes a third authentication code generated by a third device in the smart car, and a second authentication parameter belonging to the third device, and the third device is a gateway in the smart car; the method also includes: the second device generates a fourth authentication code using the second authentication parameter; the second device compares the third authentication code and the fourth authentication code to obtain a second authentication result; when the first authentication result is an authentication failure and the second authentication result is an authentication success, the second device continues to work normally. Utilizing the multi-layer network structure of the hierarchical authentication architecture, the lower-level nodes not only reversely authenticate the higher-level nodes, but also further reversely authenticate the higher-level nodes, so as to avoid unnecessary abnormal operations as much as possible while improving the security and reliability of authentication.
[0013] According to the first aspect, or any implementation of the first aspect above, in a fourth possible implementation of the authentication method, when the second authentication result is an authentication failure, the second device enters an abnormal state, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or sounding an alarm. When a lower-level node fails to authenticate a higher-level node, it means that the security risk is likely to come from a higher-level node, and once the security risk comes from a higher-level node, the danger will be greater. In this case, making the second device enter an abnormal state can prevent the hazard from occurring.
[0014] According to the first aspect, or any implementation of the first aspect above, in a fifth possible implementation of the authentication method, the second authentication parameter includes: the identifier of the third device; the second device generating the fourth authentication code using the second authentication parameter includes: the second device generating the fourth authentication code using the identifier of the third device, the second authentication key shared between the second device and the third device, and the second random number; the second random number is generated by the second device, or carried in the second authentication parameter, or determined jointly based on the random number generated by the second device and the random number carried in the second authentication parameter. The second device and the third device sharing the second authentication key is the basis for mutual authentication between the two devices, and the security and reliability of the authentication are improved by setting the random numbers involved in the authentication in various forms.
[0015] According to the first aspect, or any implementation of the first aspect above, in a sixth possible implementation of the authentication method, the second device generates a fifth authentication code using a third authentication parameter; the second device sends the third authentication parameter and the fifth authentication code to the first device, and the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device; wherein the third authentication parameter includes: an identifier of the second device. The lower-level node reversely authenticates the higher-level node, which is combined with the higher-level node forwardly authenticating the lower-level node to form a two-way authentication operation, which better improves the security and reliability of the authentication system.
[0016] In the second aspect, a smart car-based authentication method is provided, characterized in that it includes: a first device in the smart car generates a first authentication code using a first authentication parameter belonging to the first device; the first device sends authentication information to a second device in the smart car, the authentication information includes the first authentication parameter and the first authentication code, and the first authentication parameter and the first authentication code are used for the second device to authenticate the first device; wherein the first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device in the smart car, and the second device is an intra-domain device. The intra-domain device includes an on-board sensor or an ECU, and the domain administrator device includes a mobile data center or a domain controller. In the hierarchical authentication architecture of a smart car, by making a higher-level node reversely authenticated by a lower-level node, the abnormal situation of a higher-level node failing or being maliciously replaced can be identified by the lower-level node, thereby avoiding the threat of fake higher-level nodes to driving safety or information security, thereby improving the safety and reliability of the smart car system.
[0017] According to the second aspect, in a first possible implementation manner of the authentication method, the first authentication parameter includes: an identifier of the first device.
[0018] According to the second aspect or the first possible implementation of the second aspect, in the second possible implementation of the authentication method, the first authentication parameter further includes: a first random number. By setting the random number involved in the authentication, the security and reliability of the authentication are improved.
[0019] According to the second aspect, or any implementation of the second aspect above, in the third possible implementation of the authentication method, the first device is a domain administrator device in the smart car, and the second device is a device in the domain; the authentication information also includes a third authentication code generated by a third device in the smart car, and a second authentication parameter belonging to the third device, the third device is a gateway in the smart car, and the second authentication parameter and the third authentication code are used for the second device to authenticate the third device. By utilizing the multi-layer network structure of the hierarchical authentication architecture, the lower-level nodes not only reversely authenticate the higher-level nodes, but also further reversely authenticate the higher-level nodes, so as to avoid unnecessary abnormal operations as much as possible while improving the security and reliability of authentication.
[0020] According to the second aspect, or any implementation manner of the second aspect above, in a fourth possible implementation manner of the authentication method, the second authentication parameter includes: an identifier of the third device.
[0021] According to the second aspect, or any implementation of the second aspect above, in a fifth possible implementation of the authentication method, the second authentication parameter further includes: a second random number. By setting the random number involved in the authentication, the security and reliability of the authentication are improved.
[0022] According to the second aspect, or any implementation of the second aspect above, in a sixth possible implementation of the authentication method, the first device obtains a third authentication parameter and a fifth authentication code from the second device, the third authentication parameter belongs to the second device and includes an identifier of the second device, and the fifth authentication code is generated by the second device using the third authentication parameter; the first device generates a sixth authentication code using the third authentication parameter; the first device compares the fifth authentication code with the sixth authentication code to obtain a third authentication result. The lower-level node reversely authenticates the higher-level node, which is combined with the higher-level node forwardly authenticating the lower-level node to form a two-way authentication operation, which better improves the security and reliability of the authentication system.
[0023] In a third aspect, a second device applied to a smart car is provided, comprising: a receiving module for obtaining authentication information from a first device in the smart car, wherein the authentication information comprises a first authentication code generated by the first device and a first authentication parameter belonging to the first device; an authentication code generation module for generating a second authentication code using the first authentication parameter; a comparison module for comparing the first authentication code and the second authentication code to obtain a first authentication result; wherein the first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device that manages the smart car, and the second device is an in-domain device. In-domain devices include vehicle-mounted sensors or ECUs, and domain administrator devices include mobile data centers or domain controllers.
[0024] According to the third aspect, in a first possible implementation manner of the second device, the first authentication parameter includes: an identifier of the first device; generating a second authentication code using the first authentication parameter includes: the authentication code generation module generates the second authentication code using the identifier of the first device, a first authentication key shared between the second device and the first device, and a first random number; the first random number is generated by a random number generation module included in the second device, or is carried in the first authentication parameter, or is jointly determined based on a random number generated by the random number generation module and a random number carried in the first authentication parameter.
[0025] According to the third aspect or the first possible implementation of the third aspect, in a second possible implementation of the second device, the second device further includes a control module, which is used to control the second device to enter an abnormal state when the first authentication result is an authentication failure, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm. According to the third aspect, or any one of the implementations of the third aspect above, in a third possible implementation of the second device.
[0026] According to the third aspect, or any implementation of the third aspect above, in a third possible implementation of the second device, the first device is a domain administrator device in the smart car, and the second device is an in-domain device; the authentication information also includes a third authentication code generated by a third device in the smart car, and a second authentication parameter belonging to the third device, and the third device is the gateway in the smart car; the authentication code generation module is also used to generate a fourth authentication code using the second authentication parameter; the comparison module is also used to compare the third authentication code and the fourth authentication code to obtain a second authentication result; the second device also includes a control module, which is used to control the second device to continue to work normally when the first authentication result is an authentication failure and the second authentication result is an authentication success.
[0027] According to the third aspect, or any implementation of the third aspect above, in a fourth possible implementation of the second device, when the second authentication result is authentication failure, the control module controls the second device to enter an abnormal state, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm.
[0028] According to the third aspect, or any implementation manner of the third aspect above, in a fifth possible implementation manner of the second device, the second authentication parameter includes: an identifier of the third device; the authentication code generation module generates the fourth authentication code using the identifier of the third device, a second authentication key shared between the second device and the third device, and a second random number; the second random number is generated by a random number generation module included in the second device, or is carried in the second authentication parameter, or is jointly determined based on a random number generated by the random number generation module and a random number carried in the second authentication parameter.
[0029] According to the third aspect, or any implementation manner of the third aspect above, in a sixth possible implementation manner of the second device, the second device also includes: a sending module, used to send a third authentication parameter and a fifth authentication code to the first device; wherein the third authentication parameter includes an identifier of the second device, the fifth authentication code is generated by the authentication code generation module using the third authentication parameter, and the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device.
[0030] In a fourth aspect, a first device applied to a smart car is provided, comprising: an authentication code generation module, used to generate a first authentication code using a first authentication parameter belonging to the first device; a sending module, used to send authentication information to a second device in the smart car, the authentication information including the first authentication parameter and the first authentication code, the first authentication parameter and the first authentication code being used for the second device to authenticate the first device; wherein the first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device in the smart car, and the second device is an in-domain device. In-domain devices include vehicle-mounted sensors or ECUs, and domain administrator devices include mobile data centers or domain controllers.
[0031] According to the fourth aspect, in a first possible implementation manner of the first device, the first authentication parameter includes: an identifier of the first device.
[0032] According to the fourth aspect or the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the first device, the first authentication parameter further includes: a first random number.
[0033] According to the fourth aspect, or any implementation of the fourth aspect above, in a third possible implementation of the first device, the first device is a domain administrator device in the smart car, and the second device is an in-domain device; the authentication information also includes a third authentication code generated by a third device in the smart car, and a second authentication parameter belonging to the third device, the third device is a gateway in the smart car, and the second authentication parameter and the third authentication code are used for the second device to authenticate the third device.
[0034] According to the fourth aspect, or any implementation manner of the fourth aspect above, in a fourth possible implementation manner of the first device, the second authentication parameter includes: an identifier of the third device.
[0035] According to the fourth aspect, or any implementation of the fourth aspect above, in a fifth possible implementation of the first device, the second authentication parameter further includes: a second random number.
[0036] According to the fourth aspect, or any implementation manner of the fourth aspect above, in a sixth possible implementation manner of the first device, the first device also includes: a receiving module, used to obtain a third authentication parameter and a fifth authentication code from the second device, the third authentication parameter belongs to the second device and includes an identifier of the second device, and the fifth authentication code is generated by the second device using the third authentication parameter; a comparison module, used to compare the fifth authentication code and the sixth authentication code to obtain a third authentication result, wherein the sixth authentication code is generated by the authentication code generation module using the third authentication parameter.
[0037] In a fifth aspect, a device applied to a smart car is provided, comprising a memory and a processor, wherein the memory stores computer program instructions, and the processor runs the computer program instructions to execute the authentication method of the first aspect or any one of the implementations of the first aspect above.
[0038] According to the fifth aspect, in a possible implementation manner of the device, the device further includes a transceiver configured to receive or send authentication-related messages.
[0039] In a sixth aspect, a device applied to a smart car is provided, comprising a memory and a processor, wherein the memory stores computer program instructions, and the processor runs the computer program instructions to execute the authentication method of the second aspect or any one of the implementations of the second aspect above.
[0040] According to a sixth aspect, in a possible implementation of the device, the device further includes a transceiver for receiving or sending authentication-related messages.
[0041] In the seventh aspect, an authentication system applied to a smart car is provided, comprising a gateway, a domain administrator device and an intra-domain device in the smart car, wherein the intra-domain device is the second device of the third aspect or any one of the implementation methods of the third aspect above, and the domain administrator device is the first device of the fourth aspect or any one of the implementation methods of the fourth aspect above.
[0042] In an eighth aspect, an authentication system applied to a smart car is provided, comprising a gateway, a domain administrator device and an intra-domain device in the smart car, wherein the intra-domain device is a device of the fifth aspect or any one of the implementation modes of the fifth aspect above, and the domain administrator device is a device of the sixth aspect or any one of the implementation modes of the sixth aspect above.
[0043] In a ninth aspect, a computer storage medium is provided, comprising computer instructions, which, when executed by a processor, enable the second device to execute the authentication method of the first aspect or any one of the implementations of the first aspect above.
[0044] In a tenth aspect, a computer storage medium is provided, comprising computer instructions, which, when executed by a processor, enable the first device to execute the authentication method of the second aspect or any one of the implementations of the second aspect above.
[0045] In an eleventh aspect, a computer program product is provided. When the computer program product runs on a processor, the second device executes the authentication method of the first aspect or any one of the implementations of the first aspect above.
[0046] In a twelfth aspect, a computer program product is provided. When the computer program product runs on a processor, the first device executes the authentication method of the second aspect or any one of the implementations of the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 This is a schematic diagram of the structure of the intelligent vehicle hierarchical architecture used in the present invention;
[0049] Figure 2 A flowchart of an authentication method provided in Embodiment 1 of the present invention;
[0050] Figure 3 A flowchart of an authentication method provided in Embodiment 2 of the present invention;
[0051] Figure 4 A flowchart of an authentication method for a lower-level node side provided in Embodiment 3 of the present invention;
[0052] Figure 5 A flowchart of an authentication method at a higher-level node side provided in Embodiment 4 of the present invention;
[0053] Figure 6 A structural block diagram of a second device at a lower level provided in Embodiment 5 of the present invention;
[0054] Figure 7 A structural block diagram of a first device at a higher level provided in Embodiment 6 of the present invention;
[0055] Figure 8 A structural block diagram of a second device at a lower level provided in Embodiment 7 of the present invention;
[0056] Fig. 9This is a structural block diagram of a first device at a higher level provided in Embodiment 8 of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The present invention is based on Figure 1 The hierarchical architecture of the smart car shown in the figure includes a gateway as a primary authentication node, a domain administrator as a secondary authentication node, and in-domain devices as leaf nodes. In-domain devices include vehicle-mounted sensors (Sensor) or electronic control units (ECU), and domain administrators include mobile data centers (MDC) or domain controllers (DC). Each domain (for example, domain 1 to domain 5) is divided according to the functional set of electronic components or the type of bus connection. For example, it can be divided into domains such as powertrain, vehicle safety, body electronics, smart cockpit, and smart driving, and can also be divided into domains such as CAN (Controller Area Network), LIN (Local Interconnect Network), MOST (Media Oriented System Transport), and FlexRay. The gateway is a core component in the electronic and electrical architecture of the entire vehicle and a data exchange hub for the entire vehicle network. The domain administrator is responsible for the overall control and data exchange of all devices in the domain.
[0059] Figure 2 FIG. 1 is a flow chart of an embodiment of the present invention applied to the authentication method of a smart car. Figure 2 As shown, the method includes:
[0060] Step 201, configure the key to implement gateway D GW With the domain administrator D i Shared authentication key K i , Gateway D GW , Domain Administrator D i With the device D in the domain ij Shared authentication key K ij , specifically:
[0061] Gateway D GW The root key K is configured, and the authentication key of each domain administrator is derived from the root key (such as domain administrator D i The authentication key K i =KDF(K,Di ), where KDF is the key derivation function, D i is the ID of the administrator of domain i), and the authentication key of each device in the domain is derived from the authentication key of the corresponding domain administrator (for example, the authentication key of the device D in the domain ij The authentication key K ij =KDF(K i ,D ij ), where D ij is the identifier of device j in domain i). Thus, gateway D GW With the domain administrator D i Shared authentication key K i , Gateway D GW , Domain Administrator D i With the device D in the domain ij Shared authentication key K ij , which is the basis for authentication between different levels.
[0062] Step 202, Gateway D GW Select a random number r for subsequent gateway D GW Domain administrator D of domain i i to get authenticated.
[0063] Step 203, Gateway D GW Send the random number r to the domain administrator D i .
[0064] Step 204, domain administrator D i Pick a random number r'.
[0065] Step 205, domain administrator D i Send r||r' to device D in the domain ij , where “||” represents the concatenation of random numbers. r||r' is used by the subsequent domain administrator D i For device D in the domain ij For authentication, or further, also for gateway D GW For device D in the domain ij to get authenticated.
[0066] Step 206: Device D in the domain ij Use the domain administrator D i Shared authentication key K ij Calculate the message authentication code s ij , where s ij =MAC Kij (r||r',D ij ), indicating s ij By K ij , r||r' and the device D in the domain ij Logo Dij In this step, the device D in the domain ij A random number R is also selected for use by the device D in the domain later ij To the domain administrator D i to get authenticated.
[0067] Step 207: Device D in the domain ij D ij 、s ij , R is sent to the domain administrator D i .
[0068] Step 208, domain administrator D i Calculate the message authentication code s ij ', where s ij '=MAC Kij (r||r',D ij ), then s ij and ij 'Compare, if they are equal, authenticate the device D in the domain ij If they are not equal, the authentication fails. i Also calculate the message authentication code s i =MAC Ki (r,D i ), where D i D is the domain administrator of domain i i The domain administrator Di also selects a random number R' for the domain administrator D i For Gateway D GW to get authenticated.
[0069] Step 209, domain administrator D i D i 、si、r'、tag i , {D ij ,s ij}j∈ERR, R' is sent to gateway D GW , where tag i Used to identify the domain administrator D i Authentication results for all devices in domain i, tag i =1 means all devices in domain i are authenticated successfully, tag i =0 indicates that there is a device in the domain that failed authentication. ij ,s ij}j∈ERR indicates the device D in the domain that failed authentication ij The identification and the device D in the domain that failed authentication ij The corresponding message authentication code s ij .
[0070] Step 210, Gateway D GW Calculate the message authentication code s i ', where s i '=MAC Ki (r,D i ), then s i and i 'Compare, if equal then authenticate administrator D i Success, if they are not equal, authentication fails. In this step, if tag i = 0, the gateway also authenticates the domain administrator D one by one i Device D in the domain that failed authentication ij , the authentication method used is still to calculate the s ij 'With the received s ij If they are the same, authentication succeeds; if they are different, authentication fails. i Authentication domain device D ij Failed, but the gateway authenticates the device D in the domain ij If successful, gateway D GW This will ensure that as many devices as possible in the domain remain operational while ensuring security.
[0071] Step 211, Gateway D GW According to R' and self-identification D GW , use and domain administrator D i Shared authentication key K i Calculate the message authentication code c = MAC Ki (R',D GW ).
[0072] Step 212, Gateway D GW Identify yourself as D GW and the message authentication code c to the domain administrator D i .
[0073] Step 213, domain administrator D i Calculate the message authentication code c' = MAC Ki (R',D GW ), then compare c and c', if they are equal, then authenticate gateway D GW Success, if they are not equal, authentication fails, domain administrator D i Entering an abnormal state. In this step, the domain administrator D i Also according to R and self-identification D i , use and domain device D ij Shared authentication key K ij Calculate the message authentication code ci = MAC Kij (R,Di ).
[0074] Step 214, domain administrator D i The message authentication code c i and self-identification D i Sent to device D in the domain ij .
[0075] Step 215: Device D in the domain ij Calculate the message authentication code c i '=MAC Kij (R,D i ), then c i and c i 'Compare, if they are equal, authenticate the domain administrator D of domain i i Success, if they are not equal, authentication fails, the device D in the domain ij Entering abnormal state.
[0076] Figure 3 FIG. 1 is a flow chart of another embodiment of the authentication method of the present invention applied to a smart car. Figure 3 As shown, the method includes:
[0077] Step 301, configure the key to implement gateway D GW With the domain administrator D i Shared authentication key K i , Gateway D GW , Domain Administrator D i With the device D in the domain ij Shared authentication key K ij , specifically:
[0078] Gateway D GW The root key K is configured, and the authentication key of each domain administrator is derived from the root key (such as domain administrator D i The authentication key K i =KDF(K,D i ), where KDF is the key derivation function, D i is the ID of the administrator of domain i), and the authentication key of each device in the domain is derived from the authentication key of the corresponding domain administrator (for example, the authentication key of the device D in the domain ij The authentication key K ij =KDF(K i ,D ij ), where D ij is the identifier of device j in domain i). Thus, gateway D GW With the domain administrator D i Shared authentication key K i , Gateway D GW , Domain Administrator D i With the device D in the domainij Shared authentication key K ij , which is the basis for device authentication between different tiers.
[0079] Step 302, Gateway D GW Select a random number r, and identify it according to r and itself GW , use and domain administrator D i Shared authentication key K i Calculate the message authentication code c = MAC Ki (r,D GW ).
[0080] Step 303: Gateway D GW Identify yourself as D GW , the message authentication code c and the random number r are sent to the domain administrator D i .
[0081] Step 304: Domain Administrator D i Calculate the message authentication code c' = MAC Ki (r,D GW ), then compare c and c', if they are equal, then authenticate gateway D GW Success, if they are not equal, authentication fails, domain administrator D i Entering an abnormal state. In this step, the domain administrator D i Also select a random number r', according to r||r' and its own identity D i , use and domain device D ij Shared authentication key K ij Calculate the message authentication code c i =MAC Kij (r||r',D i ).
[0082] Step 305, domain administrator D i r||r'、D i 、c i Sent to device D in the domain ij .
[0083] Step 306: Device D in the domain ij Calculate the message authentication code c i '=MAC Kij (r||r',D i ), then c i and c i 'Compare, if equal, authenticate domain administrator D i Success, if they are not equal, authentication fails, the device D in the domain ij Entering abnormal state. In this step, if the device D in the domain ijKeep working, then the device D in the domain ij It also uses the authentication key K shared with the domain administrator Di ij Calculate the message authentication code s ij , where s ij =MAC Kij (r||r',D ij ), indicating s ij By K ij , r||r' and the device D in the domain ij Logo D ij Calculated.
[0084] Step 307: Device D in the domain ij D ij 、s ij Sent to domain administrator Di.
[0085] Step 308, domain administrator D i Calculate the message authentication code s ij ', where s ij '=MAC Kij (r||r',D ij ), then s ij and ij 'Compare, if they are equal, authenticate the device D in the domain ij If they are not equal, the authentication fails. i Also calculate the message authentication code s i =MAC Ki (r,D i ), where D i D is the domain administrator of domain i i 's logo.
[0086] Step 309, domain administrator D i D i ,si,r',tagi,{D ij ,s ij}j∈ERR is sent to gateway D GW , where tag i Used to identify the domain administrator D i Authentication results for all devices in domain i, tag i =1 means all devices in domain i are authenticated successfully, tag i =0 indicates that there is a device in the domain that failed authentication. ij ,s ij}j∈ERR indicates the device D in the domain that failed authentication ij Identification and equipment in the domain D ij The corresponding message authentication code s ij .
[0087] Step 310, Gateway D GW Calculate the message authentication code s i ', where s i '=MAC Ki (r,D i ), then s i and i 'Compare, if equal, authenticate domain administrator D i Success, if they are not equal, authentication fails. In this step, if tag i = 0, the gateway also authenticates the domain administrator D one by one i Device D in the domain that failed authentication ij , the authentication method used is still to calculate the s ij 'With the received s ij If they are the same, authentication succeeds; if they are different, authentication fails. i Authentication domain device D ij Failed, but the gateway authenticates the device D in the domain ij If successful, gateway D GW This will ensure that as many devices as possible in the domain remain operational while ensuring security.
[0088] Through the above Figure 2 and Figure 3 By replacing some of the technical means in the two method embodiments shown or recombining different technical means, new embodiments can be obtained, all of which belong to the protection scope of this application. Specifically, for example, although using the spliced random number r||r' to calculate the message authentication code has better security than directly using the random number r or r', the message authentication code can also be calculated directly using the random number r or r', or the message authentication code can be calculated using the result obtained by performing other operations on r and r' except splicing, or even the device D in the domain ij A random code r' may also be selected, and the result of a specific operation of r, r', and r'' may be used to calculate the message authentication code; authentication may also be performed using other methods other than message authentication code comparison; the message authentication code may also be calculated using methods not used in the above two method embodiments; the random codes used in the two authentication directions between the two node devices participating in the two-way authentication may be as follows: Figure 2 Different from the example shown, it can also be Figure 3 The same as shown; the random number involved in the message authentication code generation can be Figure 2 As shown, it is selected by the authentication node device, or it can be selected as Figure 3 As shown in step 303 and step 305, the authenticated node device is selected; in addition, the gateway D GW For device D in the domainij The authentication steps can also be deleted.
[0089] By adopting two-way authentication, in addition to the gateway authenticating the domain administrator or the device in the domain, and the domain administrator authenticating the device in the domain, the device in the domain also authenticates the domain administrator or the gateway, and the domain administrator also authenticates the gateway. If the gateway fails or is replaced, the device in the domain or the domain administrator can also know the situation by authenticating the gateway, and put themselves into an abnormal state; similarly, if the domain administrator fails or is replaced, the device in the domain can also know the situation by authenticating the domain administrator, and put itself into an abnormal state. Reverse authentication can avoid the risks and hazards that may be caused by the failure or replacement of the higher-level authentication node, which leads to the failure of the forward authentication.
[0090] In the hierarchical architecture, the levels of gateways, domain administrators, and devices within the domain decrease in order from high to low. In subsequent embodiments, "higher level" and "lower level" are relative concepts. For example, if a device within the domain reversely authenticates a domain administrator or a gateway, the device within the domain is a lower-level node, and the domain administrator is a higher-level node. The gateway can be called a higher-level node, or, in order to distinguish it from the domain administrator, a higher-level node; if the domain administrator authenticates the gateway, the gateway is called a higher-level node, and the domain administrator is called a lower-level node.
[0091] Figure 4 FIG. 1 is a flow chart of an embodiment of an authentication method for a lower-level node of the present invention. Figure 4 As shown, the following steps are included:
[0092] Step 401: A second device in a smart car obtains authentication information from a first device in the smart car. The first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device that manages the smart car, and the second device is a device in the domain. The authentication information includes a first authentication code generated by the first device, and a first authentication parameter belonging to the first device, and the first authentication parameter includes an identifier of the first device.
[0093] Step 402: The second device generates a second authentication code using the first authentication parameter. Specifically, the second device generates the second authentication code using the identifier of the first device, a first authentication key shared between the second device and the first device, and a first random number. The first random number is generated by the second device, or carried in the first authentication parameter, or is determined jointly based on a random number generated by the second device and a random number carried in the first authentication parameter.
[0094] Step 403: the second device compares the first authentication code with the second authentication code to obtain a first authentication result. When the first authentication result is authentication failure, the second device enters an abnormal state. The abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm.
[0095] When the first device is a domain administrator device in the smart car and the second device is an intra-domain device, after obtaining the first authentication result in step 403, a step of authenticating the intra-domain device gateway may be further added to obtain a second authentication result, and the first authentication result and the second authentication result are combined to determine whether the intra-domain device enters an abnormal state, specifically:
[0096] The authentication information in step 401 also includes a third authentication code generated by the gateway in the smart car, and a second authentication parameter belonging to the gateway, wherein the second authentication parameter includes an identifier of the gateway;
[0097] Step 402 also includes the second device generating the fourth authentication code using the identifier of the gateway, a second authentication key shared between the second device and the gateway, and a second random number, wherein the second random number is generated by the second device, or carried in the second authentication parameter, or is jointly determined based on the random number generated by the second device and the random number carried in the second authentication parameter.
[0098] Step 403 also includes the second device comparing the third authentication code with the fourth authentication code to obtain a second authentication result;
[0099] When the first authentication result is authentication failure and the second authentication result is authentication success, the second device continues to work normally;
[0100] When the second authentication result is authentication failure, the second device enters an abnormal state regardless of the first authentication result.
[0101] In addition to the lower-level node authenticating the higher-level node, the lower-level node can also be authenticated by the higher-level node. In order to cooperate with the authentication initiated by the higher-level node, this embodiment may also optionally include the following steps:
[0102] Step 404: the second device generates a fifth authentication code using a third authentication parameter including an identification of the second device;
[0103] Step 405: The second device sends the third authentication parameter and the fifth authentication code to the first device, where the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device.
[0104] Figure 5FIG. 1 is a flow chart of an embodiment of an authentication method for a higher-level node of the present invention. Figure 5 As shown, the following steps are included:
[0105] Step 501: A first device in a smart car generates a first authentication code using a first authentication parameter belonging to the first device. The first authentication parameter includes an identifier of the first device and may also include a first random number.
[0106] Step 502: The first device sends authentication information to the second device in the smart car, the authentication information including the first authentication parameter and the first authentication code, the first authentication parameter and the first authentication code being used for the second device to authenticate the first device. The first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device in the smart car, and the second device is a device in the domain.
[0107] When the first device is a domain administrator device in the smart car and the second device is an intra-domain device, the intra-domain device can further authenticate the gateway. At this time, the authentication information also includes a third authentication code generated by the gateway in the smart car and a second authentication parameter belonging to the gateway. The second authentication parameter includes an identifier of the gateway and may further include a second random number. The second authentication parameter and the third authentication code are used for the second device to authenticate the gateway.
[0108] In addition to the high-level nodes being authenticated by the lower-level nodes, the higher-level nodes can also authenticate the lower-level nodes. This embodiment may also optionally include the following steps:
[0109] Step 503: The first device obtains a third authentication parameter and a fifth authentication code from the second device. The third authentication parameter belongs to the second device and includes an identification of the second device, and the fifth authentication code is generated by the second device using the third authentication parameter.
[0110] Step 504: The first device generates a sixth authentication code using the third authentication parameter.
[0111] Step 505: The first device compares the fifth authentication code with the sixth authentication code to obtain a third authentication result.
[0112] Figure 6 FIG. 1 is a structural block diagram of an embodiment of a second device at a lower level of the present invention. Figure 6 As shown, the device includes the following modules:
[0113] A receiving module 61 is used to obtain authentication information from a first device in the smart car, wherein the authentication information includes a first authentication code generated by the first device and a first authentication parameter belonging to the first device, wherein the first authentication parameter includes an identifier of the first device;
[0114] an authentication code generation module 62, configured to generate the second authentication code by using the identifier of the first device, a first authentication key shared between the second device and the first device, and a first random number, wherein the first random number is generated by a random number generation module included in the second device, or is carried in the first authentication parameter, or is jointly determined based on a random number generated by the random number generation module and a random number carried in the first authentication parameter;
[0115] A comparison module 63, configured to compare the first authentication code with the second authentication code to obtain a first authentication result;
[0116] The control module 64 is used to control the second device to enter an abnormal state when the first authentication result is an authentication failure, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm.
[0117] The first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device that manages the smart car, and the second device is an in-domain device.
[0118] When the first device is a domain administrator device in the smart car and the second device is a device in the domain, the function of authenticating the gateway of the device in the domain can be further added, specifically: the authentication information also includes a third authentication code generated by the gateway in the smart car and a second authentication parameter belonging to the gateway, the second authentication parameter includes the identifier of the gateway; the authentication code generation module 62 is also used to generate the fourth authentication code using the identifier of the third device, the second authentication key shared between the second device and the third device, and the second random number, the second random number is generated by the random number generation module included in the second device, or carried in the second authentication parameter, or determined jointly by the random number generated by the random number generation module and the random number carried in the second authentication parameter; the comparison module 63 is also used to compare the third authentication code and the fourth authentication code to obtain a second authentication result. When the first authentication result is authentication failure and the second authentication result is authentication success, the control module 64 controls the second device to continue normal operation; when the second authentication result is authentication failure, the control module 64 controls the second device to enter an abnormal state, the abnormal state includes at least one of the following: stop working, disconnect the communication connection with the first device, or issue an alarm.
[0119] In addition to the lower-level node authenticating the higher-level node, the lower-level node can also be authenticated by the higher-level node. In order to cooperate with the authentication initiated by the higher-level node, this embodiment further optionally includes a sending module 65, which is used to send a third authentication parameter and a fifth authentication code to the first device. Among them, the third authentication parameter includes the identifier of the second device, and the fifth authentication code is generated by the authentication code generation module 62 using the third authentication parameter. The third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device.
[0120] Figure 7 FIG. 1 is a structural block diagram of an embodiment of a first device at a higher level of the present invention. Figure 7 As shown, the device includes the following modules:
[0121] An authentication code generation module 71, configured to generate a first authentication code using a first authentication parameter belonging to the first device, wherein the first authentication parameter includes an identifier of the first device and may further include a first random number;
[0122] The sending module 72 is used to send authentication information to the second device in the smart car, where the authentication information includes the first authentication parameter and the first authentication code, and the first authentication parameter and the first authentication code are used for the second device to authenticate the first device.
[0123] The first device is a gateway in the smart car, and the second device is a domain administrator device in the smart car; or, the first device is a domain administrator device in the smart car, and the second device is an in-domain device.
[0124] When the first device is a domain administrator device in the smart car and the second device is an in-domain device, the in-domain device can be further enabled to authenticate the gateway. At this time, the authentication information also includes a third authentication code generated by the gateway in the smart car and a second authentication parameter belonging to the gateway. The second authentication parameter includes the identifier of the third device and can further include a second random number. The second authentication parameter and the third authentication code are used for the second device to authenticate the gateway.
[0125] In addition to the high-level and low-level nodes being authenticated by the lower-level nodes, the higher-level nodes can also authenticate the lower-level nodes. This embodiment may also optionally include the following modules:
[0126] a receiving module 73, configured to obtain a third authentication parameter and a fifth authentication code from the second device, wherein the third authentication parameter belongs to the second device and includes an identification of the second device, and the fifth authentication code is generated by the second device using the third authentication parameter;
[0127] The comparison module 74 is used to compare the fifth authentication code and the sixth authentication code to obtain a third authentication result, wherein the sixth authentication code is generated by the authentication code generation module 71 using the third authentication parameter.
[0128] above Figure 6 and Figure 7 One or more of the modules in the system may be implemented by software, hardware, firmware or a combination thereof. The software or firmware includes but is not limited to computer program instructions or codes, and may be executed by a hardware processor. The hardware includes but is not limited to various integrated circuits, such as a central processing unit (CPU), a digital signal processor (DSP), a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC).
[0129] Figure 8 FIG. 1 is a structural block diagram of an embodiment of a second device at a lower level of the present invention. Figure 8 As shown, the second device includes a memory 81 and a processor 82, the memory 81 stores computer program instructions, and the processor 82 runs the computer program instructions to execute Figure 4 The authentication-related operations on the lower-level node side described in Embodiment 3 are shown. The second device further includes a transceiver 83 for receiving or sending bearer authentication-related messages. Figure 8In the embodiment, the second device can be an intra-domain device, which initiates authentication to the domain administrator device and can also be authenticated by the domain administrator device; the second device can also be a domain administrator device, which initiates authentication to the smart car gateway and can also be authenticated by the smart car gateway.
[0130] Fig. 9 FIG. 1 is a structural block diagram of an embodiment of a first device at a higher level of the present invention. Fig. 9 As shown, the first device includes a memory 91 and a processor 92, the memory 91 stores computer program instructions, and the processor 92 runs the computer program instructions to perform Figure 5 The authentication-related operations at the higher-level node side described in Embodiment 4 are shown. The second device further includes a transceiver 93 for receiving or sending bearer authentication-related messages. Fig. 9 In the embodiment, the first device may be a domain administrator device, which is authenticated by the device in the domain and can also initiate authentication for the device in the domain; the first device may also be a smart car gateway, which is authenticated by the domain administrator and can also initiate authentication for the domain administrator device.
[0131] The above processors include but are not limited to various types of CPUs, DSPs, microcontrollers, microprocessors or artificial intelligence processors. The transceiver includes but is not limited to a communication interface or a communication device or a communication connector. The communication form can be wired, wireless or a combination of the two.
[0132] The above embodiments of the present invention are applied to the hierarchical authentication architecture of smart cars. By enabling lower-level nodes to reversely authenticate higher-level nodes, lower-level nodes can identify abnormal situations in which higher-level nodes fail or are maliciously replaced, thereby preventing faulty or counterfeit higher-level nodes from posing a threat to driving safety or information security, thereby improving the safety and reliability of the smart car system.
[0133] Those skilled in the art can clearly understand that the descriptions of the various embodiments provided in the present application can refer to each other. For the convenience and conciseness of the description, for example, the functions of the various devices and equipment provided in the embodiments of the present application and the execution steps can refer to the relevant description of the method embodiments of the present application, and the various method embodiments and the various device embodiments can also refer to each other.
[0134] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes all or part of the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0135] 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.
[0136] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways without exceeding the scope of the present application. For example, the embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0137] In addition, the described systems, devices and methods and schematic diagrams of different embodiments may be combined or integrated with other systems, modules, technologies or methods without exceeding the scope of the present application. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electronic, mechanical or other forms.
[0138] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the 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.
Claims
1. An authentication method, characterized in that: include: The second device obtains authentication information from the first device, where the authentication information includes a first authentication code generated by the first device and a first authentication parameter belonging to the first device; The second device generates a second authentication code using the first authentication parameter; The second device compares the first authentication code with the second authentication code to obtain a first authentication result; The first authentication parameter includes: an identifier of the first device; The second device generating a second authentication code using the first authentication parameter includes: the second device generating the second authentication code using an identifier of the first device, a first authentication key shared between the second device and the first device, and a first random number; The first random number is generated by the second device, or carried in the first authentication parameter, or is determined jointly based on the random number generated by the second device and the random number carried in the first authentication parameter; The authentication information also includes a third authentication code generated by a third device, and a second authentication parameter belonging to the third device; The method further comprises: The second device generates a fourth authentication code using the second authentication parameter; The second device compares the third authentication code with the fourth authentication code to obtain a second authentication result; When the first authentication result is authentication failure and the second authentication result is authentication success, the second device continues to work normally.
2. The method according to claim 1, characterized in that When the second authentication result is authentication failure, the second device enters an abnormal state, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm.
3. The method according to claim 1 or 2, characterized in that: The second authentication parameter includes: an identifier of the third device; The second device generating a fourth authentication code using the second authentication parameter includes: the second device generating the fourth authentication code using the identifier of the third device, a second authentication key shared between the second device and the third device, and a second random number; The second random number is generated by the second device, or is carried in the second authentication parameter, or is determined jointly based on the random number generated by the second device and the random number carried in the second authentication parameter.
4. The method according to claim 1 or 2, characterized in that: Also includes: The second device generates a fifth authentication code using the third authentication parameter; The second device sends the third authentication parameter and the fifth authentication code to the first device, where the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device; The third authentication parameter includes: an identifier of the second device.
5. The method according to claim 3, characterized in that: Also includes: The second device generates a fifth authentication code using the third authentication parameter; The second device sends the third authentication parameter and the fifth authentication code to the first device, where the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device; The third authentication parameter includes: an identifier of the second device.
6. An authentication method, characterized in that: include: The first device generates a first authentication code using a first authentication parameter belonging to the first device; The first device sends authentication information to the second device, where the authentication information includes the first authentication parameter and the first authentication code, where the first authentication parameter and the first authentication code are used for the second device to authenticate the first device; The first authentication parameter includes: an identifier of the first device and a first random number; The authentication information also includes a third authentication code generated by a third device and a second authentication parameter belonging to the third device, and the second authentication parameter and the third authentication code are used by the second device to authenticate the third device.
7. The method according to claim 6, characterized in that The second authentication parameter includes: an identifier of the third device.
8. The method according to claim 7, characterized in that The second authentication parameter further includes: a second random number.
9. The method according to any one of claims 6 to 8, characterized in that: The first device acquires a third authentication parameter and a fifth authentication code from the second device, the third authentication parameter belongs to the second device and includes an identifier of the second device, and the fifth authentication code is generated by the second device using the third authentication parameter; The first device generates a sixth authentication code using the third authentication parameter; The first device compares the fifth authentication code with the sixth authentication code to obtain a third authentication result.
10. A second device, characterized in that: include: A receiving module, configured to obtain authentication information from a first device, wherein the authentication information includes a first authentication code generated by the first device and a first authentication parameter belonging to the first device; An authentication code generation module, used to generate a second authentication code using the first authentication parameter; A comparison module, configured to compare the first authentication code with the second authentication code to obtain a first authentication result; The first authentication parameter includes: an identifier of the first device; The generating the second authentication code by using the first authentication parameter comprises: the authentication code generating module generates the second authentication code by using the identifier of the first device, the first authentication key shared between the second device and the first device, and the first random number; The first random number is generated by a random number generation module included in the second device, or is carried in the first authentication parameter, or is determined jointly by a random number generated by the random number generation module and a random number carried in the first authentication parameter; The authentication information also includes a third authentication code generated by a third device, and a second authentication parameter belonging to the third device; The authentication code generation module is further used to generate a fourth authentication code using the second authentication parameter; The comparison module is further used to compare the third authentication code and the fourth authentication code to obtain a second authentication result; The second device also includes a control module, which is used to control the second device to continue normal operation when the first authentication result is authentication failure and the second authentication result is authentication success.
11. The second device according to claim 10, characterized in that When the second authentication result is authentication failure, the control module controls the second device to enter an abnormal state, and the abnormal state includes at least one of the following: stopping working, disconnecting the communication connection with the first device, or issuing an alarm.
12. The second device according to claim 10 or 11, characterized in that The second authentication parameter includes: an identifier of the third device; The authentication code generation module generates the fourth authentication code by using the identifier of the third device, the second authentication key shared between the second device and the third device, and a second random number; The second random number is generated by a random number generation module included in the second device, or is carried in the second authentication parameter, or is determined jointly by a random number generated by the random number generation module and a random number carried in the second authentication parameter.
13. The second device according to claim 10 or 11, characterized in that: Also includes: A sending module, configured to send a third authentication parameter and a fifth authentication code to the first device; The third authentication parameter includes an identifier of the second device, the fifth authentication code is generated by the authentication code generation module using the third authentication parameter, and the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device.
14. The second device according to claim 12, characterized in that Also includes: A sending module, configured to send a third authentication parameter and a fifth authentication code to the first device; The third authentication parameter includes an identifier of the second device, the fifth authentication code is generated by the authentication code generation module using the third authentication parameter, and the third authentication parameter and the fifth authentication code are used for the first device to authenticate the second device.
15. A first device, characterized in that: include: an authentication code generation module, configured to generate a first authentication code using a first authentication parameter belonging to the first device; a sending module, configured to send authentication information to a second device, wherein the authentication information includes the first authentication parameter and the first authentication code, and the first authentication parameter and the first authentication code are used for the second device to authenticate the first device; The first authentication parameter includes: an identifier of the first device and a first random number; The authentication information also includes a third authentication code generated by a third device and a second authentication parameter belonging to the third device, and the second authentication parameter and the third authentication code are used by the second device to authenticate the third device.
16. The first device according to claim 15, characterized in that The second authentication parameter includes: an identifier of the third device.
17. The first device according to claim 16, characterized in that The second authentication parameter further includes: a second random number.
18. The first device according to any one of claims 15 to 17, characterized in that Also includes: a receiving module, configured to obtain a third authentication parameter and a fifth authentication code from the second device, wherein the third authentication parameter belongs to the second device and includes an identification of the second device, and the fifth authentication code is generated by the second device using the third authentication parameter; A comparison module is used to compare the fifth authentication code and the sixth authentication code to obtain a third authentication result, wherein the sixth authentication code is generated by the authentication code generation module using the third authentication parameter.
19. An authentication device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer program instructions, and the processor runs the computer program instructions to perform the method according to any one of claims 1 to 5.
20. The device according to claim 19, characterized in that The device also includes a transceiver for receiving or sending authentication related messages.
21. An authenticated device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer program instructions, and the processor runs the computer program instructions to perform the method according to any one of claims 6 to 9.
22. The device according to claim 21, characterized in that The device also includes a transceiver for receiving or sending authentication related messages.
23. An authentication system, characterized in that: include: The second device as claimed in any one of claims 10 to 14, and the first device as claimed in any one of claims 15 to 18.
24. An authentication system, characterized in that: include: The authentication device according to claim 19 or 20, and the authenticated device according to claim 21 or 22.
25. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed by a processor, cause the second device to execute the method according to any one of claims 1 to 5.
26. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed by a processor, cause the first device to execute the method according to any one of claims 6 to 9.
27. A computer program product, characterized in that When the computer program product runs on a processor, the second device is enabled to perform the method according to any one of claims 1 to 5.
28. A computer program product, characterized in that When the computer program product runs on a processor, the first device is caused to perform the method according to any one of claims 6 to 9.
Citation Information
Patent Citations
Methods and nodes in a wireless communication network
CN106922217A
Mutual authentication method and device for vehicular devices
CN108076016A
A vehicle network safety protection method based on Internet of Vehicles and a vehicle network architecture
CN109729056A
Providing User Authentication
US20140129834A1
