Internet of Things device authentication method, device and storage medium
The message authentication code technology is used to authenticate the identity of multiple IoT devices and generate joint authentication information, which solves the problem of low identity authentication efficiency in the existing technology when the number of devices is large, and realizes fast and efficient multi-device authentication.
Patent Information
- Application Number
- CN202010779887.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-05
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-08-05
AI Technical Summary
The existing identity authentication methods of IoT devices are less efficient when the number of devices is large, resulting in reduced authentication efficiency.
Message Authentication Code (MAC) technology is used to authenticate the identity of multiple IoT devices, and the joint authentication information is generated by computing the identity information and key information of the device to achieve identity authentication for multiple devices at one time and reduce one-by-one comparison verification.
It improves the efficiency of identity authentication of IoT devices, especially when there are a large number of devices, it can achieve fast authentication and improve the processing capacity and security of the system.
Smart Images

Figure CN114079566B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to an Internet of Things device authentication method, device and storage medium. Background Art
[0002] With the development of IoT technology, more and more fields use IoT technology to achieve data cloud and big data analysis, such as industrial IoT, agricultural IoT, etc. IoT gateways, as the key link to connect various traditional devices and smart devices to IoT, play an important role in IoT. IoT gateways not only provide extensive access capabilities and data protocol conversion capabilities, but also provide management capabilities for IoT devices. The ability to manage IoT devices is an important basis for realizing the data of IoT devices on the cloud, such as managing the registration process of IoT devices and enabling IoT devices to pass cloud identity authentication.
[0003] Among them, the identity authentication of IoT devices is the prerequisite for achieving secure communication. The IoT gateway is responsible for reporting the identity information of each IoT device to the cloud; the cloud authenticates the IoT device; after the IoT device passes the identity authentication, the cloud provides the IoT device with corresponding data services. The existing identity authentication method for IoT devices has the problem of low authentication efficiency when there are a large number of IoT devices. Summary of the invention
[0004] Multiple aspects of the present application provide an Internet of Things device authentication method, device and storage medium to improve the authentication efficiency of the Internet of Things device.
[0005] An embodiment of the present application provides an IoT device authentication method, which is applicable to an IoT gateway. The method includes: obtaining identity information of multiple IoT devices in the IoT and key information required for identity authentication of the multiple IoT devices; calculating message authentication codes of the multiple IoT devices based on the identity information and key information of the multiple IoT devices; generating joint authentication information required for simultaneously authenticating the multiple IoT devices based on the message authentication codes of the multiple IoT devices; and reporting the joint authentication information and the identity information of the multiple IoT devices to an IoT cloud platform, so that the IoT cloud platform can simultaneously authenticate the multiple IoT devices based on the joint authentication information.
[0006] An embodiment of the present application also provides an IoT device authentication method, which is applicable to an IoT cloud platform, and the method includes: receiving first joint authentication information and identity information of multiple IoT devices reported by an IoT gateway; calculating message authentication codes of the multiple IoT devices based on the identity information of the multiple IoT devices and key information required for identity authentication; generating second joint authentication information required for simultaneously authenticating the multiple IoT devices based on the message authentication codes of the multiple IoT devices; and simultaneously authenticating the multiple IoT devices based on the first joint authentication information and the second joint authentication information.
[0007] An embodiment of the present application also provides an Internet of Things gateway, comprising: a memory, a processor and a communication component; the memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program, so as to: obtain identity information of multiple Internet of Things devices in the Internet of Things and key information required for identity authentication of the multiple Internet of Things devices; calculate message authentication codes of the multiple Internet of Things devices based on the identity information and key information of the multiple Internet of Things devices; generate joint authentication information required for simultaneously authenticating the multiple Internet of Things devices based on the message authentication codes of the multiple Internet of Things devices; report the joint authentication information and the identity information of the multiple Internet of Things devices to the Internet of Things cloud platform through the communication component, so that the Internet of Things cloud platform can simultaneously authenticate the multiple Internet of Things devices based on the joint authentication information.
[0008] An embodiment of the present application also provides an Internet of Things cloud platform, including: a memory, a processor and a communication component; the memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program, so as to: receive first joint authentication information reported by an Internet of Things gateway and identity information of multiple Internet of Things devices through the communication component; calculate message authentication codes of the multiple Internet of Things devices based on the identity information of the multiple Internet of Things devices and the key information required for identity authentication; generate second joint authentication information required for simultaneously authenticating the multiple Internet of Things devices based on the message authentication codes of the multiple Internet of Things devices; and simultaneously authenticate the multiple Internet of Things devices based on the first joint authentication information and the second joint authentication information.
[0009] The embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the steps in the Internet of Things authentication method provided in the embodiment of the present application.
[0010] In the embodiment of the present application, a message authentication code is used to authenticate the IoT device, and for multiple IoT devices, the message authentication codes of the multiple IoT devices are used to generate joint authentication information required for simultaneously (i.e., one-time) authenticating the multiple IoT devices. The joint authentication information can be used to authenticate the multiple IoT devices at one time, and there is no need to compare and verify each IoT device one by one, which is beneficial to improving the efficiency of identity authentication, especially when there are a large number of IoT devices, and rapid authentication can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0012] Figure 1 A schematic diagram of a partial structure of an Internet of Things system provided for an exemplary embodiment of the present application;
[0013] Figure 2 A schematic diagram of the interaction process between various devices in an Internet of Things system provided by an exemplary embodiment of the present application;
[0014] Figure 3 A schematic diagram of a process in which an IoT gateway and an IoT cloud platform cooperate with each other to perform identity authentication on multiple IoT devices provided by an exemplary embodiment of the present application;
[0015] Figure 4a A schematic diagram of a binary hash tree construction process provided for an exemplary embodiment of the present application;
[0016] Figure 4b A schematic diagram of the construction process of a multi-fork hash tree provided for an exemplary embodiment of the present application;
[0017] Figure 5 A flowchart of an IoT device authentication method provided for an exemplary embodiment of the present application;
[0018] Figure 6 A flowchart of another IoT device authentication method provided for an exemplary embodiment of the present application;
[0019] Figure 7 A schematic diagram of the structure of an Internet of Things gateway provided for an exemplary embodiment of the present application;
[0020] Figure 8 A schematic diagram of the structure of an Internet of Things cloud platform provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0022] Figure 1 The following is a partial structural diagram of an Internet of Things system provided by an exemplary embodiment of the present application. Figure 1 As shown, the IoT system 100 includes: an IoT cloud platform 101, an IoT gateway 102, and a plurality of IoT devices 103. The plurality of IoT devices 103 are connected to the IoT gateway 102 for communication, and access the IoT cloud platform 101 through the IoT gateway 102.
[0023] In this embodiment, the IoT device 103 is a node device in the IoT system 100. Depending on the application scenario of the IoT system 100, the IoT device 103 may have different implementation forms. For example, assuming that the IoT system 100 is a smart home system, the IoT device 103 in the IoT system 100 may include mobile phones, televisions, refrigerators, washing machines, water heaters, electric lights, switches, sweeping robots, air purifiers, ovens, stoves, laptops, tablet computers, weight scales, window sensors, doorbells, smoke detectors, alarms, speakers, and other electronic devices suitable for home environments and capable of accessing the IoT system.
[0024] For another example, assuming that the Internet of Things system 100 is an intelligent transportation system, the Internet of Things devices 103 in the Internet of Things system 100 may include various vehicle equipment, including cameras and electronic eyes installed on various roads to monitor traffic conditions, traffic control equipment (such as traffic lights) installed on various roads, etc., or vehicle detectors, electronic toll collection equipment, cameras, etc. installed at vehicle toll stations, or cameras installed in parking lots to monitor the status of parking spaces, etc.
[0025] For another example, assuming that the IoT system 100 is an industrial IoT system, the IoT device 103 in the IoT system 100 includes various sensors and related industrial equipment deployed in industrial environments. Among them, sensors commonly used in industrial environments include, but are not limited to, temperature sensors, humidity sensors, smoke sensors, light sensors, pressure sensors, liquid level sensors, and flow rate sensors. Industrial equipment refers to industrial production equipment and various machine tools, including but not limited to lathes, milling machines, grinders, planers and other machines, as well as CNC machine tools, flexible manufacturing systems, packaging equipment, cleaning equipment, transmission equipment, etc. It should be noted that in different industrial scenarios, sensors and industrial equipment will be different. The above is only an example and does not limit the industrial scenario.
[0026] The IoT gateway 102 is an intermediary device in the IoT system 100 that acts as an agent for the IoT device 103 to connect to the IoT cloud platform 103, and plays an important role in the IoT system 100. The IoT gateway 102 provides a wide range of access capabilities and data protocol conversion capabilities, and it also provides management capabilities for the IoT devices 103. Among them, the management capabilities of the IoT gateway 102 for the IoT devices 103 are an important basis for realizing the data of the IoT devices 103 on the cloud, such as but not limited to: managing the registration process of the IoT device 103, enabling the IoT device 103 to pass the identity authentication of the IoT cloud platform 101, obtaining the properties and events of the IoT device 103, and realizing remote control, design and maintenance of the IoT device 103.
[0027] The IoT cloud platform 101 is a cloud device in the IoT system 100. Its device form can be a conventional server, cloud server, cloud host, virtual center or server array, etc. It is mainly responsible for providing cloud services for IoT devices 103, such as cloud storage, big data analysis or other cloud applications. In addition, the IoT cloud platform 101 can also provide lifecycle management and digital modeling capabilities for IoT devices 103, provide real-time monitoring and remote operation and maintenance capabilities for devices, and provide multiple protections to ensure the safety of IoT devices 103 and itself. Among them, lifecycle management for IoT devices 103 means that IoT devices 103 can be created, deleted, disabled or enabled; digital modeling capabilities for IoT devices 103 refer to digital modeling of IoT devices 103, standardization of protocols and data structuring, and acceleration of cloud application development processes. Providing real-time monitoring of devices means supporting large-scale monitoring and alarm configuration, and can perceive abnormal changes of IoT devices 103 in real time; remote operation and maintenance capabilities mean that full-link log records of IoT devices 103 can be provided, and relevant logs can be quickly retrieved through dimensions such as tracking ID (TraceID), keywords, and time range. Providing multiple protections means providing a registration mechanism and an authentication mechanism for the IoT device 103 to reduce the security risk of the IoT cloud platform 101 being hacked; strictly controlling the scope of authority of the IoT device 103 and the user, requiring authority verification for any operation to prevent unauthorized access; using standard Internet security protocols for communication with the IoT gateway 102, such as the Transport Layer Security (TLS) protocol, to ensure data confidentiality and integrity, etc.
[0028] In the embodiment of the present application, the Internet of Things gateway 102 and the Internet of Things cloud platform 101 are interconnected using the Internet protocol, such as Figure 1As shown; a sub-network is formed between the Internet of Things gateway 102 and the Internet of Things device 103, and the data of the Internet of Things device 103 is related to the performance of the Internet of Things gateway 102 and the communication technology used by the sub-network. In the embodiment of the present application, the communication technology used between the Internet of Things gateway 102 and the Internet of Things device 103 is not limited, for example, it may include but is not limited to: Ethernet, Wi-Fi, RFID, NFC, Zigbee, 6LoWPAN, Bluetooth, GSM, GPRS, 3G, 4G, 5G, etc. Different communication technologies have a certain scope of application, which will determine the maximum number of Internet of Things devices 103 included in the Internet of Things system 100. The embodiment of the present application has no special requirements for the number of Internet of Things devices 103. All Internet of Things systems containing two or more Internet of Things devices 103 are applicable to the embodiment of the present application.
[0029] The interaction process between the IoT cloud platform 101, the IoT gateway 102 and the IoT device 103 is as follows: Figure 2 As shown. Referring to step 20, the IoT gateway 102 and the IoT cloud platform 101 use a standard Internet security protocol to establish a network connection, so that the IoT gateway 102, as an intermediary device between the IoT device 103 and the IoT cloud platform 101, can provide a secure data channel between the IoT device 103 and the IoT cloud platform 101. Optionally, a TLS connection can be established between the IoT gateway 102 and the IoT cloud platform 101 to ensure the confidentiality of the data channel.
[0030] Referring to step 21, for any IoT device 103, before formally joining the IoT system 100, it is necessary to access the IoT gateway 102 through the communication technology adopted by the IoT system 100; thereafter, a registration process is initiated to the IoT cloud platform 101 through the IoT gateway 102, as shown in step 22; further, in the registration process, the IoT cloud platform 101 provides the IoT device 103 with globally unique identity information and key information required for subsequent identity authentication of the IoT device 103, as shown in step 23. Optionally, the identity information of the IoT device 103 can be any information that can uniquely identify the IoT device 103, for example, it can be a globally unique device ID of the IoT device 103 in the IoT system 100, or an IP address or MAC address of the IoT device 103, but is not limited thereto.
[0031] Among them, both the IoT cloud platform 101 and the Internet of Things device 103 use the above-mentioned key information to implement identity authentication. In this embodiment, the implementation form of the key information is not limited, and it can be determined according to the encryption method agreed to be used in the identity authentication process. For example, if the IoT cloud platform 101 and the Internet of Things device 103 agree to use a symmetric encryption method, the key information provided by the IoT cloud platform 101 to the IoT device 103 is a shared key between the IoT cloud platform 101 and the Internet of Things device 103, and the IoT cloud platform 101 will also store the shared key locally. For another example, if the IoT cloud platform 101 and the Internet of Things device 103 agree to use an asymmetric encryption method, the key information provided by the IoT cloud platform 101 to the IoT device 103 is a private key in the asymmetric encryption method, and the IoT cloud platform 101 will store the public key corresponding to the private key locally.
[0032] Further, referring to step 24, the IoT device 103 stores the identity information (such as device ID) and key information (such as shared key) provided by the IoT cloud platform 101. Alternatively, optionally, the IoT gateway 102 may also act as an agent for the IoT device 103 to save the identity information and key information of the IoT device 103. It should be noted that, for different IoT devices 103, the IoT cloud platform 101 may use the same key information to authenticate different IoT devices 103; or, for different IoT devices 103, the IoT cloud platform 101 may also use different key information to authenticate different IoT devices 103, without limitation. Among them, the IoT cloud platform 101 uses the same key information to authenticate different IoT devices 103, which can save key resources and storage resources, and is conducive to reducing the computational complexity of identity authentication.
[0033] Further, referring to step 25, the IoT gateway 102 initiates an identity authentication process to the IoT cloud platform 101 for multiple IoT devices 103; the IoT cloud platform 101 performs identity authentication on multiple IoT devices 103, as shown in step 26. Further, as shown in steps 27 and 28, the IoT cloud platform 101 returns an identity authentication result message to the IoT gateway 102, and the IoT gateway 102 sends the identity authentication result message to the IoT device 103. Further, in the case of passing the identity authentication, the IoT device 103 uses the data service provided by the IoT cloud platform 101 through the IoT gateway 102, as shown in step 29.
[0034] In the embodiment of the present application, the IoT gateway 102 cooperates with the IoT cloud platform 101 to perform identity authentication on multiple IoT devices 103, such as Figure 2As shown in steps 25-28. Specifically, the message authentication code (MAC) technology is used to authenticate the IoT device 103, and for multiple IoT devices 103, the message authentication codes of multiple IoT devices 103 are used to generate the joint authentication information required for simultaneously (i.e., one-time) authenticating the multiple IoT devices 103. The joint authentication information is used to authenticate the multiple IoT devices 103 at one time, and no longer compares and verifies each IoT device 103 one by one, so as to improve the efficiency of identity authentication. Especially when the number of IoT devices 103 is large, this authentication method can achieve fast authentication. The following is combined with Figure 3 The interactive process shown illustrates the process of the IoT gateway 102 and the IoT cloud platform 101 cooperating with each other to perform identity authentication on multiple IoT devices 103.
[0035] like Figure 3 As shown, the identity authentication process includes the following steps:
[0036] Step 31: The IoT gateway 102 obtains the identity information of multiple IoT devices 103 in the IoT and the key information required for identity authentication of the multiple IoT devices 103.
[0037] Among them, the key information required for identity authentication of multiple IoT devices 103 is the key information issued by the IoT cloud platform 101. Optionally, the IoT gateway 102 can initiate an identity authentication process for multiple IoT devices 103 to the IoT cloud platform 101 each time it is restarted; or, the IoT gateway 102 can also initiate an identity authentication process for multiple IoT devices 103 to the IoT cloud platform 101 when an identity authentication trigger event is detected. Optionally, the identity authentication trigger event can be a timed event, and when the set time arrives, the IoT gateway 102 initiates an identity authentication process for multiple IoT devices 103 to the IoT cloud platform 101. Alternatively, the identity authentication trigger event can be an event in which a new IoT device 103 joins the physical network system 100, and when a new IoT device 103 is detected to join the physical network system 100, the IoT gateway 102 initiates an identity authentication process for multiple IoT devices 103 to the IoT cloud platform 101. Alternatively, the identity authentication trigger event may be an event of modifying the identity information of an existing IoT device 103 . After detecting that the identity information of an existing IoT device 103 has been modified, the IoT gateway 102 initiates an identity authentication process for multiple IoT devices 103 to the IoT cloud platform 101 .
[0038] Regardless of the above situation, when it is necessary to initiate an identity authentication process for multiple IoT devices 103 to the IoT cloud platform 101, the IoT gateway 102 can obtain the identity information of multiple IoT devices 103 in the IoT and the key information required for the multiple IoT devices 103 to perform identity authentication. In an optional embodiment, if the key information required for the IoT device 103 to perform identity authentication and the identity information of the IoT device 103 are stored by the IoT device 103, the IoT gateway 102 can obtain the respective identity information and the key information required for identity authentication from the multiple IoT devices 103 according to the communication protocol between it and the multiple IoT devices 103. Alternatively, in another optional embodiment, the key information required for identity authentication and the identity information of the IoT device 103 are stored by the IoT gateway 102, and the IoT gateway 102 can directly obtain the identity information of the multiple IoT devices 103 and the key information required for identity authentication of the multiple IoT devices 103 from the local.
[0039] Step 32: The IoT gateway 102 calculates message authentication codes of the multiple IoT devices according to the identity information of the multiple IoT devices 103 and the key information required for identity authentication of the multiple IoT devices 103 .
[0040] Among them, the message authentication code technology is a technology for confirming the integrity of a message and performing identity authentication, and is a hash function associated with a key. In an embodiment of the present application, the calculation process of the message authentication code refers to sending the identity information of the Internet of Things device 103 and the key information required for the Internet of Things device 103 to perform identity authentication as input parameters into the message authentication code algorithm, and outputting a fixed-length message authentication code after calculation. In this embodiment, the message authentication code algorithm used is not limited. For example, a hash-based message authentication code (Hash-based Message Authentication Code, HMAC) algorithm can be used, and HMAC is a one-way hash function. Among them, the hash function used by the HMAC algorithm can be a hash algorithm such as SHA-256, SHA-384 or SHA-512, and accordingly, the HMAC algorithm can be implemented as various HMAC algorithms such as HMAC-SHA-256, HMAC-SHA-384 or HMAC-SHA-512. For another example, a block cipher algorithm can also be used as the message authentication code algorithm used in this embodiment. For another example, a stream cipher or a public key cipher algorithm is used as the message authentication code algorithm used in this embodiment. Among them, regarding the implementation principles of various HMAC algorithms, block cipher algorithms, stream cipher algorithms or public key cipher algorithms, please refer to the prior art and will not be described in detail in the embodiments of this application.
[0041] Further optionally, the IoT gateway 102 can also obtain some additional information required for calculating the message authentication code, such as a timestamp and a random number, etc.; and then, the message authentication code of the IoT device 103 is calculated jointly based on the identity information of the IoT device 103, the key information required for the IoT device 103 to perform identity authentication, and the additional information (such as a timestamp and a random number). Among them, by attaching a timestamp, it is possible to identify whether the received message authentication code is the message authentication code generated during this identity authentication process, and it is possible to prevent the same legitimate message authentication code from being repeatedly used for identity authentication, which is conducive to further improving the security of identity authentication. Among them, the random number is obtained from the IoT cloud platform 101 each time the IoT gateway 102 initiates identity authentication. The random number obtained each time will change. The random number is considered in the process of generating the message authentication code. Based on the randomness of the random number, it is conducive to further improving the security of identity authentication.
[0042] Step 33: The IoT gateway 102 generates joint authentication information required for simultaneously authenticating the multiple IoT devices 103 based on the message authentication codes of the multiple IoT devices 103 .
[0043] In the embodiment of the present application, the joint authentication information is generated based on the message authentication codes of multiple IoT devices 103, which is a comprehensive embodiment of the message authentication code information of multiple IoT devices 103, and is also a comprehensive embodiment of the identity information of multiple IoT devices 103. In the embodiment of the present application, the method of generating the joint authentication information according to the message authentication codes of multiple IoT devices 103 is not limited. Any method that can generate joint authentication information that can simultaneously reflect the message authentication code information or identity information of multiple IoT devices 103 is applicable to the embodiment of the present application. For an exemplary description of the specific generation of the joint authentication information, please refer to the subsequent embodiments, which will not be repeated here.
[0044] Step 34: The IoT gateway 102 reports the joint authentication information and the identity information of the multiple IoT devices 103 to the IoT cloud platform 101 .
[0045] Among them, the IoT gateway 102 can report the above joint authentication information and the identity information of multiple IoT devices 103 to the IoT cloud platform 101 through the TLS connection between it and the IoT cloud platform 101. For the IoT cloud platform 101, the joint authentication information and the identity information of multiple IoT devices 103 reported by the IoT gateway 102 can be received; then, the IoT cloud platform 101 simultaneously performs identity authentication on multiple IoT devices 103 based on the received joint authentication information and the identity information of multiple IoT devices 103, see the following steps 35-37.
[0046] Step 35: The IoT cloud platform 101 calculates the message authentication codes of the multiple IoT devices 103 based on the key information required for identity authentication of the multiple IoT devices 103 and the identity information of the multiple IoT devices 103 reported by the IoT gateway 102.
[0047] Among them, the process of the Internet of Things cloud platform 101 generating a message authentication code for the Internet of Things device 103 is the same as the process of the Internet of Things gateway 102 generating a message authentication code for the Internet of Things device 103. Please refer to the description in the aforementioned steps and will not be repeated here.
[0048] Step 36: The IoT cloud platform 101 generates joint authentication information required for simultaneously authenticating the multiple IoT devices based on the message authentication codes of the multiple IoT devices 103 .
[0049] The process of generating joint authentication information by the IoT cloud platform 101 is the same as the process of generating joint authentication information by the IoT gateway 102. For specific exemplary methods of generating joint authentication information, please refer to the subsequent embodiments, which will not be described in detail here.
[0050] Step 37: The IoT cloud platform 101 performs identity authentication on multiple IoT devices 103 simultaneously based on the joint authentication information generated by it and the joint authentication information reported by the IoT gateway 102.
[0051] In this embodiment, for the convenience of description and distinction, the joint authentication information reported by the IoT gateway 102 is referred to as the first joint authentication information, and the joint authentication information generated by the IoT cloud platform 101 is referred to as the second joint authentication information. On this basis, the IoT cloud platform 101 can perform identity authentication on multiple IoT devices 103 at the same time based on the first joint authentication information and the second joint authentication information.
[0052] Specifically, the IoT cloud platform 101 can compare the first joint authentication information and the second joint authentication information; if the first joint authentication information and the second joint authentication information are the same, it means that multiple IoT devices 103 have passed the identity authentication; if the first joint authentication information and the second joint authentication information are different, it means that multiple IoT devices 103 have not passed the identity authentication. It can be seen that through a single comparison operation, multiple IoT devices 103 can be authenticated at the same time, and the identity authentication results of multiple IoT devices 103 can be obtained, thereby achieving the purpose of authenticating multiple IoT devices 103 at one time, and improving the efficiency of identity authentication for multiple IoT devices 103. In particular, the more the number of IoT devices 103, the more obvious the improvement in identity authentication efficiency.
[0053] In the embodiment of the present application, the method of generating joint authentication information according to the message authentication codes of multiple IoT devices 103 is not limited. The following is an exemplary description of the method of generating joint authentication information:
[0054] In an exemplary embodiment of the present application, hash calculation is performed on the message authentication codes of multiple IoT devices 103 to obtain joint authentication information that can simultaneously reflect the message authentication codes of multiple IoT devices 103. There are multiple hash calculation methods for performing hash calculation on the message authentication codes of multiple IoT devices 103 to obtain joint authentication information, and the following examples are provided:
[0055] Method A1: directly perform a hash calculation on the message authentication codes of multiple IoT devices 103 to obtain a hash value, and use the hash value as joint authentication information.
[0056] Method A2: Divide the message authentication codes of multiple IoT devices 103 into multiple groups, each group containing at least one message authentication code of IoT device 103; perform hash calculation on the message authentication codes of IoT devices 103 in each group in units of groups to obtain a hash value corresponding to each group; then, perform secondary hash calculation on the hash values corresponding to the multiple groups to obtain a hash value, and use the hash value as joint authentication information.
[0057] Mode A3: A hash tree is constructed by using the message authentication codes of multiple IoT devices 103 as leaf nodes of the hash tree, and the root node of the hash tree represents the joint authentication information. The constructed hash tree can be a binary hash tree or a multi-branch hash tree.
[0058] Combination Figure 4a As shown, the process of constructing a binary hash tree includes: using the message authentication codes of multiple IoT devices 103 as leaf nodes of the binary hash tree, starting from the layer where the leaf nodes are located, calculating the hash value of the nodes connected in pairs in the current layer, as a non-leaf node in the previous layer, recursively calculating layer by layer until the root node of the binary hash tree is calculated, and finally obtaining a binary hash tree. The binary hash tree can also be called a Merkle tree.
[0059] exist Figure 4a In the example, four physical network devices 103 are used to calculate the message authentication code of each physical network device 103 using the HMAC algorithm, which are respectively used as leaf nodes N1-N4 of the binary hash tree; Figure 4aIn the example, AuthData represents authentication information, including the identity information of the physical network device 103, and further includes additional information such as a timestamp and a random number; G_Key represents the key information required for the physical network device 103 to perform identity authentication; N1-N4 represent the message authentication codes of the four IoT devices 103 calculated using the HMAC algorithm; the numbers 1-4 in parentheses after AuthData, G_Key, and the HMAC algorithm represent the position of the IoT device 103 in the binary hash tree. Further, according to the Merkle tree construction principle, non-leaf nodes N5 and N6 can be calculated. The hash value of non-leaf node N5 after connecting leaf node N1 with leaf node N2, and similarly, non-leaf node N6 after connecting leaf node N3 with leaf node N4; further, the hash value calculated after connecting non-leaf node N5 and non-leaf node N6 is the root node N7. The root node N7 is the hash result of the hash values of all child nodes (including leaf nodes and non-leaf nodes), which can reflect the message authentication code of the four IoT devices 103. Therefore, by verifying the hash value corresponding to the root node N7, the four IoT devices 103 can be quickly authenticated.
[0060] Combination Figure 4b As shown, the process of constructing a multi-branch hash tree includes: using the message authentication codes of multiple IoT devices 103 as leaf nodes of the multi-branch hash tree respectively; calculating the hash values of the multiple leaf nodes connected as the root node in the multi-branch hash tree, and finally obtaining the multi-branch hash tree.
[0061] exist Figure 4b In the example, four physical network devices 103 are used to calculate the message authentication code of each physical network device 103 using the HMAC algorithm, which are respectively used as leaf nodes N1-N4 of the multi-branch hash tree; Figure 4b In the example, AuthData represents authentication information, including the identity information of the physical network device 103, and further includes additional information such as a timestamp and a random number; G_Key represents the key information required for the physical network device 103 to perform identity authentication; N1-N4 represents the message authentication code of the four IoT devices 103 calculated using the HMAC algorithm; AuthData, G_Key, and the numbers 1-4 in brackets after the HMAC algorithm represent the position of the IoT device 103 in the multi-fork hash tree. Further, according to the principle of constructing a multi-fork hash tree, the root node N8 can be calculated, and the root node N8 connects the leaf nodes N1-N4 to calculate the hash value. The root node N8 is the hash value of all leaf nodes, which can reflect the message authentication code of the four IoT devices 103. Therefore, by verifying the hash value corresponding to the root node N8, the four IoT devices 103 can be quickly authenticated.
[0062] The several methods listed above for calculating joint authentication information are applicable to both the IoT gateway 102 and the IoT cloud platform 101 for calculating joint authentication information.
[0063] Regardless of which of the above hash trees, for the IoT gateway 102, after obtaining the hash tree, one implementation method B1 for reporting the joint authentication information and the identity information of multiple IoT devices 103 to the IoT cloud platform 101 is: reporting the hash tree and the identity information of multiple IoT devices 103 to the IoT cloud platform 101. In addition, after obtaining the hash tree, one implementation method B2 for the IoT gateway 102 to report the joint authentication information and the identity information of multiple IoT devices 103 to the IoT cloud platform 101 is: reporting the root node of the hash tree and the identity information of multiple IoT devices 103 to the IoT cloud platform 101.
[0064] For implementation B1: The IoT gateway 102 reports the hash tree and the identity information of the multiple IoT devices 103 to the IoT cloud platform 101. The hash tree and the identity information of the multiple IoT devices 103 may be reported to the IoT cloud platform 101 in the same communication process, or the hash tree and the identity information of the multiple IoT devices 103 may be reported to the IoT cloud platform 101 in different communication processes. Accordingly, the IoT cloud platform 101 receives the hash tree reported by the IoT gateway 102 and the identity information of the multiple IoT devices 103; the IoT cloud platform 101 locally stores the key information required for the multiple IoT devices 103 to perform identity authentication; in addition, after receiving the identity information of the multiple IoT devices 103 reported by the IoT gateway 102, the message authentication codes of the multiple IoT devices 103 are calculated according to the identity information of the multiple IoT devices 103 and the key information required for the multiple IoT devices 103 to perform identity authentication; further, a hash tree is generated according to the message authentication codes of the multiple IoT devices 103, and the structure of the hash tree is the same as the structure of the hash tree reported by the IoT gateway 102, which is either a binary hash tree or a multi-fork hash tree; wherein, the detailed process of the IoT cloud platform 101 generating the hash tree is referred to the aforementioned embodiment, which will not be repeated here. Afterwards, the IoT cloud platform 101 can perform identity authentication on multiple IoT devices 103 at the same time (or at one time) according to the hash tree generated by itself and the hash tree reported by the IoT gateway 102.
[0065] For ease of description and distinction, in implementation B1, the hash tree reported by the IoT gateway 102 is called the first hash tree, and the hash tree generated by the IoT cloud platform 101 is called the second hash tree. The root node of the first hash tree represents the first joint authentication information generated by the IoT gateway 102; the root node of the second hash tree represents the second joint authentication information generated by the IoT cloud platform 101. The process by which the IoT cloud platform 101 simultaneously (or at one time) authenticates multiple IoT devices 103 based on the first hash tree reported by the IoT gateway 102 and the second hash tree generated by itself is as follows:
[0066] Compare whether the root node of the first hash tree is the same as the root node of the second hash tree; if the two are the same, it means that multiple IoT devices 103 have passed the identity authentication, and then return the first authentication result message that multiple IoT devices 103 have passed the identity authentication to the IoT gateway 102; if the two are not the same, the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication can be obtained by comparing the non-root nodes of the first hash tree and the second hash tree; return the first authentication result message containing the identity information of the first IoT device and / or the identity information of the second IoT device that has passed the identity authentication to the IoT gateway 102 for subsequent processing by the IoT gateway 102.
[0067] Optionally, if the first hash tree and the second hash tree are binary hash trees, then in the case of root node verification failure, the Internet of Things cloud platform 101 can use the binary hash tree to perform a binary search method to achieve a quick search of the first Internet of Things device that has not passed the identity authentication and / or the second Internet of Things device that has passed the identity authentication. Of course, in addition to the binary search method, the Internet of Things cloud platform 101 can also use a sequential search method, such as directly comparing the leaf nodes of the first hash tree and the second hash tree one by one, that is, directly comparing the message authentication codes of each Internet of Things device 103 on the two hash trees to see if they are the same, and the first Internet of Things device that has not passed the identity authentication and / or the second Internet of Things device that has passed the identity authentication can also be found.
[0068] Optionally, if the first hash tree and the second hash tree are multi-branch hash trees, then in the case of root node verification failure, the IoT cloud platform 101 can find the first IoT device that has not passed the identity authentication and / or the second IoT device that has passed the identity authentication by a sequential search method. The sequential search method refers to comparing the leaf nodes of the first hash tree and the second hash tree one by one, that is, for each IoT device 103, directly comparing its message authentication code on the two hash trees to see if it is the same, to find the first IoT device that has not passed the identity authentication and / or the second IoT device that has passed the identity authentication.
[0069] It is explained here that no matter which of the above hash trees are used, when the root nodes of the two hash trees are different, the IoT cloud platform 101 can only search for the first IoT device that has not passed the identity authentication and return the identity information of the first IoT device to the IoT gateway 102 through the first authentication result message; or the IoT cloud platform 101 can also only search for the second IoT device that has passed the identity authentication and return the identity information of the second IoT device to the IoT gateway 102 through the first authentication result message; or the IoT cloud platform 101 simultaneously searches for the first IoT device that has not passed the identity authentication and the second IoT device that has passed the identity authentication and returns the identity information of the first IoT device and the identity information of the second IoT device to the IoT gateway 102 through the first authentication result message. The first IoT device or the second IoT device is part of the multiple IoT devices 103.
[0070] For the IoT gateway 102, after reporting the first hash tree and the identity information of multiple IoT devices 103 to the IoT cloud platform 101, it can also receive a first authentication result message returned by the IoT cloud platform 101 for simultaneously authenticating the multiple IoT devices 103 based on the first hash tree; if the first authentication result message indicates that the authentication is successful, that is, the multiple IoT devices 103 have passed the identity authentication, then the identity authentication operation is terminated; if the first authentication result message indicates that the authentication failed, that is, the multiple IoT devices 103 have not passed the identity authentication, then the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication can be parsed from the first authentication result message, and subsequent processing can be performed.
[0071] Among them, the first authentication result message may only include the identity information of the first IoT device that has not passed the identity authentication, or may only include the identity information of the second IoT device that has passed the identity authentication, or may include both the identity information of the first IoT device that has not passed the identity authentication and the identity information of the second IoT device that has passed the identity authentication. In either case, the IoT gateway 102 can identify the first IoT device that has not passed the identity authentication and the second IoT device that has passed the identity authentication among the multiple IoT devices 103 based on the identity information of the IoT device contained in the first authentication result message, and perform subsequent processing on the identified first IoT device and / or second IoT device.
[0072] Optionally, one subsequent processing method is to remove the first IoT device from the IoT, assume that other IoT devices (i.e., the second IoT device) have passed the identity authentication, and no longer initiate the identity authentication operation. Another subsequent processing method is to perform corresponding processing on the first IoT device, and re-initiate the identity authentication operation to the IoT cloud platform 101 based on the processing result of the first IoT device.
[0073] In one implementation method C1, the corresponding processing of the first Internet of Things device can be: modifying the identity information of the first Internet of Things device; accordingly, the process of re-initiating an identity authentication operation to the Internet of Things cloud platform 101 includes: obtaining the modified identity information of the first Internet of Things device, and recalculating a new message authentication code for the first Internet of Things device based on the modified identity information of the first Internet of Things device and the key information required for the identity authentication of the first Internet of Things device; regenerating new joint authentication information based on the new message authentication code of the first Internet of Things device and the message authentication codes of other Internet of Things devices among the multiple Internet of Things devices 103 except the first Internet of Things device; reporting the new joint authentication information and the identity information of the multiple Internet of Things devices 103 to the Internet of Things cloud platform 101, so that the Internet of Things cloud platform 101 can simultaneously authenticate the multiple Internet of Things devices 103 based on the new joint authentication information.
[0074] In another implementation method C2, the corresponding processing of the first Internet of Things device can be: removing the first Internet of Things device from the Internet of Things; accordingly, the process of re-initiating an identity authentication operation to the Internet of Things cloud platform 101 includes: regenerating new joint authentication information based on the message authentication codes of other Internet of Things devices except the first Internet of Things device among the multiple Internet of Things devices 103; reporting the new joint authentication information and the identity information of the other Internet of Things devices to the Internet of Things cloud platform 101, so that the Internet of Things cloud platform 101 can simultaneously perform identity authentication on the other Internet of Things devices based on the new joint authentication information.
[0075] For implementation B2:The IoT gateway 102 reports the root node of the hash tree and the identity information of the multiple IoT devices 103 to the IoT cloud platform 101. The root node of the hash tree and the identity information of the multiple IoT devices 103 may be reported to the IoT cloud platform 101 in the same communication process; or the root node of the hash tree and the identity information of the multiple IoT devices 103 may be reported to the IoT cloud platform 101 in different communication processes. Accordingly, the IoT cloud platform 101 receives the root node of the hash tree reported by the IoT gateway 102 and the identity information of the multiple IoT devices 103; the IoT cloud platform 101 locally stores the key information required for the multiple IoT devices 103 to perform identity authentication; in addition, after receiving the identity information of the multiple IoT devices 103 reported by the IoT gateway 102, the message authentication codes of the multiple IoT devices 103 are calculated according to the identity information of the multiple IoT devices 103 and the key information required for the multiple IoT devices 103 to perform identity authentication; further, a hash tree is generated according to the message authentication codes of the multiple IoT devices 103, and the structure of the hash tree is the same as the structure of the hash tree to which the root node reported by the IoT gateway 102 belongs, which is either a binary hash tree or a multi-fork hash tree; wherein, the detailed process of the IoT cloud platform 101 generating the hash tree is referred to the aforementioned embodiment, which will not be repeated here. Afterwards, the IoT cloud platform 101 can perform identity authentication on multiple IoT devices 103 at the same time (or at one time) according to the root node of the hash tree generated by itself and the root node of the hash tree reported by the IoT gateway 102.
[0076] Similarly, for the sake of ease of description and distinction, in implementation method B2, the hash tree to which the root node reported by the IoT gateway 102 belongs is also referred to as the first hash tree, and the hash tree generated by the IoT cloud platform 101 is referred to as the second hash tree. The root node of the first hash tree represents the first joint authentication information generated by the IoT gateway 102; the root node of the second hash tree represents the second joint authentication information generated by the IoT cloud platform 101. Among them, the process by which the IoT cloud platform 101 simultaneously (or at one time) authenticates multiple IoT devices 103 based on the root node of the first hash tree reported by the IoT gateway 102 and the root node of the second hash tree generated by itself is as follows:
[0077] Compare whether the root node of the first hash tree is the same as the root node of the second hash tree; if the two are the same, it means that multiple IoT devices 103 have passed the identity authentication, and then return the second authentication result message that multiple IoT devices 103 have passed the identity authentication to the IoT gateway 102; if the two are not the same, then return the second authentication result message that multiple IoT devices 103 have not passed the identity authentication to the IoT gateway 102.
[0078] For the IoT gateway 102, after reporting the root node of the first hash tree and the identity information of multiple IoT devices 103 to the IoT cloud platform 101, it can also receive a second authentication result message returned by the IoT cloud platform 101; if the second authentication result message indicates that the authentication is successful, that is, multiple IoT devices 103 have passed the identity authentication, then the identity authentication operation is terminated; conversely, if the second authentication result message indicates that the authentication failed, that is, multiple IoT devices 103 have not passed the identity authentication, the first hash tree can be sent to the IoT cloud platform 101, so that the IoT cloud platform 101 can search and return the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication among the multiple IoT devices 103.
[0079] For the IoT cloud platform 101, after returning the second authentication result message that multiple IoT devices 103 failed to pass the identity authentication to the IoT gateway 102, it can also receive the first hash tree sent by the IoT gateway 102 according to the second authentication result message; then, compare the non-root nodes of the first hash tree and the second hash tree to obtain the identity information of the first IoT device that failed the identity authentication and / or the identity information of the second IoT device that passed the identity authentication; return the identity information of the first IoT device and / or the identity information of the second IoT device to the IoT gateway 102 for subsequent processing by the IoT gateway 102. For the detailed process of obtaining the identity information of the first IoT device that failed the identity authentication and / or the identity information of the second IoT device that passed the identity authentication by comparing the non-root nodes of the first hash tree and the second hash tree, please refer to the detailed description in the above-mentioned implementation method B1, which will not be repeated here.
[0080] In implementation method B2, the Internet of Things gateway 102 may only receive the identity information of the first Internet of Things device that failed to pass the identity authentication returned by the Internet of Things cloud platform 101, or may only receive the identity information of the second Internet of Things device that passed the identity authentication returned by the Internet of Things cloud platform 101, or may simultaneously receive the identity information of the first Internet of Things device that failed to pass the identity authentication and the identity information of the second Internet of Things device that passed the identity authentication returned by the Internet of Things cloud platform 101. In either case, the Internet of Things gateway 102 can identify the first Internet of Things device that failed to pass the identity authentication and the second Internet of Things device that passed the identity authentication among the multiple Internet of Things devices 103 based on the identity information of the received Internet of Things devices, and perform subsequent processing on the identified first Internet of Things device and / or second Internet of Things device. For a detailed description of the subsequent processing, please refer to the detailed description in the above-mentioned implementation method B1, which will not be repeated here.
[0081] Furthermore, no matter in which of the above embodiments or implementation methods, when multiple IoT devices 103 pass identity authentication, the IoT cloud platform 101 and the IoT gateway 102 can persist the joint authentication information corresponding to the multiple IoT devices 103, so that when the multiple IoT devices 103 do not change, the IoT gateway 102 can directly perform identity authentication on the multiple IoT devices 103 according to the persisted joint authentication information after each restart, thereby saving the process of regenerating the joint authentication information, simplifying the authentication process of the IoT devices, and realizing fast authentication when the network is restarted.
[0082] In detail, when multiple IoT devices 103 pass identity authentication, the IoT gateway 102 persists the first joint authentication information corresponding to the multiple IoT devices 103, and accordingly, the IoT cloud platform 101 persists the second joint authentication information corresponding to the multiple IoT devices 103. Optionally, the first joint authentication information may be the root node of the first hash tree, and the second joint authentication information may be the root node of the second hash tree. Afterwards, after the IoT gateway 102 is restarted, it can be determined whether the multiple IoT devices in the IoT have changed; if it is identified that the multiple IoT devices in the IoT have not changed, the persisted first joint authentication information is reported to the IoT cloud platform 101, so that the IoT cloud platform 101 can simultaneously authenticate the multiple IoT devices 103 based on the first joint authentication information. For the IoT cloud platform 101, the first joint authentication information reported by the IoT gateway 102 after the restart and identification that the multiple IoT devices 103 have not changed can be received; based on the first joint authentication information and the second joint authentication information, multiple IoT devices can be authenticated at the same time. Regarding the process of simultaneously authenticating multiple IoT devices based on the first joint authentication information and the second joint authentication information, please refer to the aforementioned embodiment and will not be reviewed here.
[0083] It can be seen that in the embodiment of the present application, a message authentication code is used to authenticate the IoT device, and for multiple IoT devices, the message authentication codes of multiple IoT devices are used to generate joint authentication information required for simultaneously (i.e., one-time) authenticating the multiple IoT devices. Using this joint authentication information, the identity authentication of multiple IoT devices can be achieved at one time, and there is no need to compare and verify each IoT device one by one, which is beneficial to improving the efficiency of identity authentication, especially when there are a large number of IoT devices, and rapid authentication can be achieved.
[0084] The following describes the IoT device authentication process provided in the embodiments of the present application from the perspectives of the IoT gateway and the IoT cloud platform respectively.
[0085] Figure 5A flowchart of an IoT device authentication method provided for an exemplary embodiment of the present application. This embodiment is described from the perspective of an IoT gateway. Figure 5 As shown, the method includes:
[0086] 51. Obtain identity information of multiple IoT devices in the IoT and key information required for identity authentication of the multiple IoT devices;
[0087] 52. Calculate the message authentication codes of multiple IoT devices based on the identity information and key information of multiple IoT devices;
[0088] 53. Generate joint authentication information required for simultaneously authenticating multiple IoT devices based on the message authentication codes of multiple IoT devices;
[0089] 54. Report the joint authentication information and the identity information of multiple IoT devices to the IoT cloud platform, so that the IoT cloud platform can simultaneously perform identity authentication on multiple IoT devices based on the joint authentication information.
[0090] In an optional embodiment, the above-mentioned generating joint authentication information required for simultaneously authenticating multiple IoT devices based on message authentication codes of multiple IoT devices includes: performing hash calculations on the message authentication codes of multiple IoT devices to obtain joint authentication information.
[0091] In an optional embodiment, the above-mentioned hash calculation is performed on the message authentication codes of multiple IoT devices to obtain joint authentication information, including: constructing a hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree, and the root node of the hash tree represents the joint authentication information.
[0092] In an optional embodiment, the above-mentioned construction of a hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree includes: using the message authentication codes of multiple IoT devices as leaf nodes of the binary hash tree respectively; starting from the layer where the leaf nodes are located, calculating the hash values of the nodes connected in pairs in the current layer, using them as a non-leaf node in the previous layer, and recursively calculating layer by layer until the root node of the binary hash tree is calculated to obtain a binary hash tree.
[0093] In an optional embodiment, the above-mentioned method of constructing a hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree includes: using the message authentication codes of the multiple IoT devices as leaf nodes of the multi-branch hash tree respectively; calculating the hash value after connecting the multiple leaf nodes as the root node in the multi-branch hash tree to obtain the multi-branch hash tree.
[0094] In an optional embodiment, the above-mentioned reporting of the joint authentication information and the identity information of the multiple IoT devices to the IoT cloud platform includes: reporting the hash tree and the identity information of the multiple IoT devices to the IoT cloud platform.
[0095] In an optional embodiment, after reporting the hash tree and the identity information of the plurality of IoT devices to the IoT cloud platform, the method further includes:
[0096] Receive a first authentication result message returned by the IoT cloud platform for simultaneously authenticating multiple IoT devices based on a hash tree;
[0097] If the first authentication result message indicates that the authentication failed, parsing the identity information of the first IoT device that failed the identity authentication and / or the identity information of the second IoT device that passed the identity authentication from the first authentication result message; and
[0098] The first Internet of Things device is removed from the Internet of Things or, based on the processing result of the first Internet of Things device, an identity authentication operation is re-initiated to the Internet of Things cloud platform.
[0099] In an optional embodiment, the above-mentioned re-initiating the identity authentication operation to the Internet of Things cloud platform according to the processing result of the first Internet of Things device includes:
[0100] If the processing method for the first IoT device is to modify the identity information of the first IoT device, the modified identity information of the first IoT device can be obtained, and a new message authentication code can be recalculated for the first IoT device according to the modified identity information and key information of the first IoT device;
[0101] Regenerate new joint authentication information according to a new message authentication code of the first IoT device and message authentication codes of other IoT devices among the plurality of IoT devices except the first IoT device;
[0102] The new joint authentication information and the identity information of multiple IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously authenticate the identities of multiple IoT devices based on the new joint authentication information.
[0103] In an optional embodiment, the above-mentioned re-initiating the identity authentication operation to the Internet of Things cloud platform according to the processing result of the first Internet of Things device includes:
[0104] If the processing method for the first IoT device is to remove the first IoT device from the IoT, it can be determined that the first IoT device is removed from the IoT, and new joint authentication information is regenerated based on message authentication codes of other IoT devices except the first IoT device among the multiple IoT devices;
[0105] The new joint authentication information and the identity information of other IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously authenticate the identities of other IoT devices based on the new joint authentication information.
[0106] In an optional embodiment, the above-mentioned reporting of the joint authentication information and the identity information of multiple IoT devices to the IoT cloud platform includes: reporting the root node of the hash tree and the identity information of multiple IoT devices to the IoT cloud platform.
[0107] In an optional embodiment, after reporting the root node of the hash tree and the identity information of multiple IoT devices to the IoT cloud platform, the method further includes:
[0108] Receive a second authentication result message returned by the IoT cloud platform for simultaneously authenticating multiple IoT devices based on the root node;
[0109] If the second authentication result message indicates that the authentication failed, the hash tree is reported to the IoT cloud platform, so that the IoT cloud platform can identify and return the first IoT device that failed the identity authentication and / or the second IoT device that passed the identity authentication based on the hash tree; and
[0110] The first Internet of Things device is removed from the Internet of Things or, based on the processing result of the first Internet of Things device, an identity authentication operation is re-initiated to the Internet of Things cloud platform.
[0111] In an optional embodiment, the method of this embodiment also includes: when multiple IoT devices pass identity authentication, persisting joint authentication information; and after the IoT gateway is restarted, if it is identified that multiple IoT devices in the IoT have not changed, reporting the persisted joint authentication information to the IoT cloud platform, so that the IoT cloud platform can simultaneously perform identity authentication on multiple IoT devices based on the joint authentication information.
[0112] In this embodiment, the IoT gateway and the IoT cloud platform cooperate with each other and use message authentication codes to authenticate IoT devices. Moreover, for multiple IoT devices, the message authentication codes of multiple IoT devices are used to generate joint authentication information required for simultaneously (i.e., one-time) authenticating multiple IoT devices. Using this joint authentication information, multiple IoT devices can be authenticated at one time, and there is no need to compare and verify each IoT device one by one, which is beneficial to improving the efficiency of identity authentication, especially when there are a large number of IoT devices, and rapid authentication can be achieved.
[0113] Figure 6 A flowchart of another IoT device authentication method provided for an exemplary embodiment of the present application. This embodiment is described from the perspective of an IoT cloud platform. Figure 6As shown, the method includes:
[0114] 61. Receive the first joint authentication information and identity information of multiple IoT devices reported by the IoT gateway;
[0115] 62. Calculate message authentication codes of multiple IoT devices based on the identity information of multiple IoT devices and the key information required for identity authentication of multiple IoT devices;
[0116] 63. Generate second joint authentication information required for simultaneously authenticating the multiple IoT devices based on the message authentication codes of the multiple IoT devices;
[0117] 64. Based on the first joint authentication information and the second joint authentication information, identity authentication is performed on multiple IoT devices at the same time.
[0118] In an optional embodiment, the above-mentioned generating second joint authentication information required for simultaneously authenticating multiple IoT devices based on message authentication codes of multiple IoT devices includes: performing hash calculation on the message authentication codes of multiple IoT devices to obtain the second joint authentication information.
[0119] In an optional embodiment, the above-mentioned hash calculation is performed on the message authentication codes of multiple IoT devices to obtain the second joint authentication information, including: using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree to construct a second hash tree, and the root node of the second hash tree represents the second joint authentication information.
[0120] In an optional embodiment, the above-mentioned method of constructing a second hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree includes: using the message authentication codes of multiple IoT devices as leaf nodes of the binary hash tree respectively; starting from the layer where the leaf nodes are located, calculating the hash values of the nodes connected in pairs in the current layer, using them as a non-leaf node in the previous layer, and recursively calculating layer by layer until the root node of the binary hash tree is calculated to obtain the binary hash tree.
[0121] In an optional embodiment, the above-mentioned method of constructing a second hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree includes: using the message authentication codes of the multiple IoT devices as leaf nodes of the multi-branch hash tree respectively; calculating the hash value after connecting the multiple leaf nodes as the root node in the multi-branch hash tree to obtain the multi-branch hash tree.
[0122] In an optional embodiment, the above-mentioned receiving the first joint authentication information reported by the Internet of Things gateway includes: receiving a first hash tree reported by the Internet of Things gateway, and the root node of the first hash tree represents the first joint authentication information.
[0123] In an optional embodiment, the above-mentioned simultaneous identity authentication of multiple IoT devices based on the first joint authentication information and the second joint authentication information includes:
[0124] Compare the root node of the first hash tree and the root node of the second hash tree to see if they are the same;
[0125] If they are not the same, comparing the non-root nodes of the first hash tree and the second hash tree to obtain the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication;
[0126] A first authentication result message including the identity information of the first Internet of Things device and / or the identity information of the second Internet of Things device that has passed the identity authentication is returned to the Internet of Things gateway.
[0127] In an optional embodiment, the above-mentioned receiving the first joint authentication information reported by the Internet of Things gateway includes: receiving the root node of the first hash tree reported by the Internet of Things gateway, and the root node of the first hash tree represents the first joint authentication information.
[0128] In an optional embodiment, the above-mentioned simultaneous identity authentication of multiple IoT devices based on the first joint authentication information and the second joint authentication information includes:
[0129] Compare the root node of the first hash tree and the root node of the second hash tree to see if they are the same;
[0130] If they are not the same, a second authentication result message that multiple IoT devices failed identity authentication is returned to the IoT gateway;
[0131] Receive a first hash tree sent by the Internet of Things gateway according to a second authentication result message;
[0132] Compare the non-root nodes of the first hash tree and the second hash tree to obtain the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication;
[0133] Return the identity information of the first IoT device and / or the identity information of the second IoT device to the IoT gateway.
[0134] In an optional embodiment, the method of this embodiment also includes: when multiple IoT devices pass identity authentication, persisting second joint authentication information; and receiving first joint authentication information reported by the IoT gateway after restarting and identifying that multiple IoT devices have not changed; based on the first joint authentication information and the second joint authentication information, simultaneously authenticating multiple IoT devices.
[0135] In this embodiment, the IoT cloud platform and the IoT gateway cooperate with each other and use message authentication codes to authenticate IoT devices. Moreover, for multiple IoT devices, the message authentication codes of multiple IoT devices are used to generate joint authentication information required for simultaneously (i.e., one-time) authenticating multiple IoT devices. Using this joint authentication information, multiple IoT devices can be authenticated at one time, and there is no need to compare and verify each IoT device one by one, which is beneficial to improving the efficiency of identity authentication, especially when there are a large number of IoT devices, and rapid authentication can be achieved.
[0136] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 31 to 37 can be device A; for another example, the execution subject of steps 31 and 34 can be device A, and the execution subject of steps 35 and 37 can be device B; and so on.
[0137] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 51, 52, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0138] Figure 7 The schematic diagram of the structure of an Internet of Things gateway provided by the exemplary embodiment of the present application is as follows. Figure 7 As shown, the Internet of Things gateway includes: a memory 71, a processor 72 and a communication component 73.
[0139] The memory 71 is used to store computer programs and can be configured to store various other data to support operations on the IoT gateway. Examples of such data include instructions, messages, pictures, videos, etc. for any application or method operating on the IoT gateway.
[0140] The processor 72 is coupled to the memory 71 and is configured to execute the computer program in the memory 71 to:
[0141] Obtain the identity information of multiple IoT devices in the IoT and the key information required for identity authentication of multiple IoT devices;
[0142] Calculate message authentication codes of multiple IoT devices based on identity information and key information of multiple IoT devices;
[0143] Generate joint authentication information required for simultaneously authenticating multiple IoT devices based on message authentication codes of multiple IoT devices;
[0144] The joint authentication information and the identity information of the multiple IoT devices are reported to the IoT cloud platform through the communication component 73, so that the IoT cloud platform can simultaneously perform identity authentication on the multiple IoT devices based on the joint authentication information.
[0145] In an optional embodiment, when generating the joint authentication information, the processor 72 is specifically used to: perform hash calculation on the message authentication codes of multiple IoT devices to obtain the joint authentication information.
[0146] In an optional embodiment, when the processor 72 performs hash calculation on the message authentication codes of multiple IoT devices to obtain joint authentication information, it is specifically used to: construct a hash tree using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree, and the root node of the hash tree represents the joint authentication information.
[0147] In an optional embodiment, when the processor 72 constructs a hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree, it is specifically used to: use the message authentication codes of the multiple IoT devices as leaf nodes of the binary hash tree respectively; starting from the layer where the leaf nodes are located, calculate the hash value of the connection between each two nodes in the current layer, as a non-leaf node in the previous layer, and recursively calculate layer by layer until the root node of the binary hash tree is calculated to obtain a binary hash tree.
[0148] In an optional embodiment, when the processor 72 constructs a hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree, it is specifically used to: use the message authentication codes of the multiple IoT devices as leaf nodes of the multi-branch hash tree respectively; calculate the hash value after connecting the multiple leaf nodes as the root node in the multi-branch hash tree to obtain the multi-branch hash tree.
[0149] In an optional embodiment, when the processor 72 reports the joint authentication information and the identity information of multiple IoT devices to the IoT cloud platform, it is specifically used to: report the hash tree and the identity information of multiple IoT devices to the IoT cloud platform through the communication component 73.
[0150] In an optional embodiment, after reporting the hash tree and the identity information of the plurality of IoT devices to the IoT cloud platform, the processor 72 is further configured to:
[0151] Receive, through the communication component 73, a first authentication result message returned by the IoT cloud platform for simultaneously authenticating multiple IoT devices based on a hash tree;
[0152] If the first authentication result message indicates that the authentication failed, parsing the identity information of the first IoT device that failed the identity authentication and / or the identity information of the second IoT device that passed the identity authentication from the first authentication result message; and
[0153] The first Internet of Things device is removed from the Internet of Things or, based on the processing result of the first Internet of Things device, an identity authentication operation is re-initiated to the Internet of Things cloud platform.
[0154] In an optional embodiment, when the processor 72 re-initiates the identity authentication operation to the Internet of Things cloud platform according to the processing result of the first Internet of Things device, it is specifically used to:
[0155] Obtain the modified identity information of the first IoT device to modify it, and recalculate a new message authentication code for the first IoT device according to the modified identity information and key information of the first IoT device;
[0156] Regenerate new joint authentication information according to a new message authentication code of the first IoT device and message authentication codes of other IoT devices among the plurality of IoT devices except the first IoT device;
[0157] The new joint authentication information and the identity information of multiple IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously authenticate the identities of multiple IoT devices based on the new joint authentication information.
[0158] In an optional embodiment, when the processor 72 re-initiates the identity authentication operation to the Internet of Things cloud platform according to the processing result of the first Internet of Things device, it is specifically used to:
[0159] Determine that the first IoT device is removed from the IoT, and regenerate new joint authentication information based on message authentication codes of other IoT devices except the first IoT device among the multiple IoT devices;
[0160] The new joint authentication information and the identity information of other IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously authenticate the identities of other IoT devices based on the new joint authentication information.
[0161] In an optional embodiment, when the processor 72 reports the joint authentication information and the identity information of multiple IoT devices to the IoT cloud platform, it is specifically used to: report the root node of the hash tree and the identity information of multiple IoT devices to the IoT cloud platform through the communication component 73.
[0162] In an optional embodiment, after reporting the root node of the hash tree and the identity information of multiple IoT devices to the IoT cloud platform, the processor 72 is further configured to:
[0163] Receive, through the communication component 73, a second authentication result message returned by the IoT cloud platform for simultaneously authenticating multiple IoT devices based on the root node;
[0164] If the second authentication result message indicates that the authentication failed, the hash tree is reported to the IoT cloud platform, so that the IoT cloud platform can identify and return the first IoT device that failed the identity authentication and / or the second IoT device that passed the identity authentication based on the hash tree; and
[0165] The first Internet of Things device is removed from the Internet of Things or, based on the processing result of the first Internet of Things device, an identity authentication operation is re-initiated to the Internet of Things cloud platform.
[0166] Further, if Figure 7 As shown, the Internet of Things gateway also includes: a power supply component 74 and other components. Figure 7 Only some components are shown schematically, which does not mean that the IoT gateway only includes Figure 7 Components shown.
[0167] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by the Internet of Things gateway in the above method embodiment.
[0168] Figure 8 The following is a schematic diagram of the structure of an Internet of Things cloud platform provided by an exemplary embodiment of the present application. Figure 8 As shown, the Internet of Things cloud platform includes: a memory 81, a processor 82 and a communication component 83.
[0169] The memory 81 is used to store computer programs and can be configured to store various other data to support operations on the IoT cloud platform. Examples of such data include instructions, messages, pictures, videos, etc. for any application or method operating on the IoT cloud platform.
[0170] The processor 82 is coupled to the memory 81 and is used to execute the computer program in the memory 81 to:
[0171] Receive the first joint authentication information and the identity information of the plurality of IoT devices reported by the IoT gateway through the communication component 83;
[0172] Calculate message authentication codes of multiple IoT devices based on the identity information of multiple IoT devices and key information required for identity authentication;
[0173] Generating second joint authentication information required for simultaneously authenticating the multiple IoT devices according to the message authentication codes of the multiple IoT devices;
[0174] Based on the first joint authentication information and the second joint authentication information, identity authentication is performed on multiple IoT devices at the same time.
[0175] In an optional embodiment, when generating the second joint authentication information, the processor 82 is specifically used to: perform hash calculation on the message authentication codes of multiple IoT devices to obtain the second joint authentication information.
[0176] In an optional embodiment, when the processor 82 performs hash calculation on the message authentication codes of multiple IoT devices to obtain the second joint authentication information, it is specifically used to: construct a second hash tree using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree, and the root node of the second hash tree represents the second joint authentication information.
[0177] In an optional embodiment, when the processor 82 constructs the second hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree, it is specifically used to: use the message authentication codes of the multiple IoT devices as leaf nodes of the binary hash tree respectively; starting from the layer where the leaf nodes are located, calculate the hash value of the connection between each two nodes in the current layer, as a non-leaf node in the previous layer, and recursively calculate layer by layer until the root node of the binary hash tree is calculated to obtain a binary hash tree.
[0178] In an optional embodiment, when the processor 82 constructs the second hash tree using the message authentication codes of multiple IoT devices as leaf nodes of the hash tree, it is specifically used to: use the message authentication codes of the multiple IoT devices as leaf nodes of the multi-branch hash tree respectively; calculate the hash value after connecting the multiple leaf nodes as the root node in the multi-branch hash tree to obtain the multi-branch hash tree.
[0179] In an optional embodiment, when receiving the first joint authentication information reported by the Internet of Things gateway, the processor 82 is specifically used to: receive the first hash tree reported by the Internet of Things gateway through the communication component 83, and the root node of the first hash tree represents the first joint authentication information.
[0180] In an optional embodiment, when the processor 82 simultaneously performs identity authentication on multiple IoT devices based on the first joint authentication information and the second joint authentication information, it is specifically configured to:
[0181] Compare the root node of the first hash tree and the root node of the second hash tree to see if they are the same;
[0182] If they are not the same, comparing the non-root nodes of the first hash tree and the second hash tree to obtain the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication;
[0183] A first authentication result message including the identity information of the first Internet of Things device and / or the identity information of the second Internet of Things device that has passed the identity authentication is returned to the Internet of Things gateway.
[0184] In an optional embodiment, when the processor 82 receives the first joint authentication information reported by the Internet of Things gateway, it is specifically used to: receive the root node of the first hash tree reported by the Internet of Things gateway through the communication component 83, and the root node of the first hash tree represents the first joint authentication information.
[0185] In an optional embodiment, when the processor 82 simultaneously performs identity authentication on multiple IoT devices based on the first joint authentication information and the second joint authentication information, it is specifically configured to:
[0186] Compare the root node of the first hash tree and the root node of the second hash tree to see if they are the same;
[0187] If they are not the same, a second authentication result message that multiple IoT devices failed identity authentication is returned to the IoT gateway;
[0188] Receive a first hash tree sent by the Internet of Things gateway according to a second authentication result message;
[0189] Compare the non-root nodes of the first hash tree and the second hash tree to obtain the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication;
[0190] Return the identity information of the first IoT device and / or the identity information of the second IoT device to the IoT gateway.
[0191] In an optional embodiment, the processor 82 is also used to: persist the second joint authentication information when multiple IoT devices pass the identity authentication; and receive the first joint authentication information reported by the IoT gateway after restarting and identifying that multiple IoT devices have not changed; and perform identity authentication on multiple IoT devices at the same time based on the first joint authentication information and the second joint authentication information.
[0192] Further, if Figure 8 As shown, the Internet of Things cloud platform also includes: power supply component 84 and other components. Figure 8 Only some components are shown schematically, which does not mean that the IoT cloud platform only includes Figure 8 Components shown.
[0193] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by the Internet of Things cloud platform in the above method embodiment.
[0194] The memory in the above embodiments can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0195] The communication component in the above-mentioned embodiment is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0196] The power supply assembly in the above embodiments provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.
[0197] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0198] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0199] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0201] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0202] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0203] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0204] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0205] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for authenticating an IoT device, applicable to an IoT gateway, characterized in that: The method comprises: Obtain identity information of multiple IoT devices in the IoT and key information required for identity authentication of the multiple IoT devices; Calculate message authentication codes of the multiple IoT devices according to the identity information of the multiple IoT devices and the key information; Generating joint authentication information required for simultaneously authenticating the multiple IoT devices according to the message authentication codes of the multiple IoT devices, including: constructing a hash tree using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree, wherein the root node of the hash tree represents the joint authentication information; The joint authentication information and the identity information of the multiple IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously perform identity authentication on the multiple IoT devices based on the joint authentication information.
2. The method according to claim 1, characterized in that: The method uses the message authentication codes of the plurality of IoT devices as leaf nodes of the hash tree to construct a hash tree, including: Using the message authentication codes of the multiple IoT devices as leaf nodes of a binary hash tree respectively; Starting from the layer where the leaf node is located, the hash value of each node in the current layer is calculated, which is used as a non-leaf node in the previous layer. The process is recursively performed layer by layer until the root node of the binary hash tree is calculated to obtain the binary hash tree.
3. The method according to claim 1, characterized in that The method uses the message authentication codes of the plurality of IoT devices as leaf nodes of the hash tree to construct a hash tree, including: Using the message authentication codes of the multiple IoT devices as leaf nodes of the multi-fork hash tree respectively; The hash values of the leaf nodes after connection are calculated as the root nodes in the multi-branch hash tree to obtain the multi-branch hash tree.
4. The method according to any one of claims 1 to 3, characterized in that: Reporting the joint authentication information and the identity information of the multiple IoT devices to the IoT cloud platform includes: Report the hash tree and the identity information of the multiple IoT devices to the IoT cloud platform.
5. The method according to claim 4, characterized in that After reporting the hash tree and the identity information of the plurality of IoT devices to the IoT cloud platform, the method further includes: Receiving a first authentication result message returned by the IoT cloud platform for simultaneously authenticating the multiple IoT devices based on the hash tree; If the first authentication result message indicates that the authentication fails, parsing the identity information of the first Internet of Things device that failed the identity authentication and / or the identity information of the second Internet of Things device that passed the identity authentication from the first authentication result message; and The first Internet of Things device is removed from the Internet of Things or, based on the processing result of the first Internet of Things device, an identity authentication operation is re-initiated to the Internet of Things cloud platform.
6. The method according to claim 5, characterized in that According to the processing result of the first IoT device, re-initiating an identity authentication operation to the IoT cloud platform, including: Obtaining the modified identity information of the first IoT device, and recalculating a new message authentication code for the first IoT device according to the modified identity information of the first IoT device and the key information; Regenerate new joint authentication information according to a new message authentication code of the first IoT device and message authentication codes of other IoT devices among the plurality of IoT devices except the first IoT device; The new joint authentication information and the identity information of the multiple IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously perform identity authentication on the multiple IoT devices based on the new joint authentication information.
7. The method according to claim 5, characterized in that According to the processing result of the first IoT device, re-initiating an identity authentication operation to the IoT cloud platform, including: Determine that the first Internet of Things device is removed from the Internet of Things, and regenerate new joint authentication information according to message authentication codes of other Internet of Things devices among the multiple Internet of Things devices except the first Internet of Things device; The new joint authentication information and the identity information of the other IoT devices are reported to the IoT cloud platform, so that the IoT cloud platform can simultaneously perform identity authentication on the other IoT devices based on the new joint authentication information.
8. The method according to any one of claims 1 to 3, characterized in that: Reporting the joint authentication information and the identity information of the multiple IoT devices to the IoT cloud platform includes: The root node of the hash tree and the identity information of the multiple IoT devices are reported to the IoT cloud platform.
9. The method according to claim 8, characterized in that After reporting the root node of the hash tree and the identity information of the plurality of IoT devices to the IoT cloud platform, the method further includes: Receiving a second authentication result message returned by the IoT cloud platform for simultaneously authenticating the multiple IoT devices based on the root node; If the second authentication result message indicates that the authentication fails, reporting the hash tree to the IoT cloud platform, so that the IoT cloud platform can identify and return the first IoT device that failed the identity authentication and / or the second IoT device that passed the identity authentication based on the hash tree; and The first Internet of Things device is removed from the Internet of Things or, based on the processing result of the first Internet of Things device, an identity authentication operation is re-initiated to the Internet of Things cloud platform.
10. The method according to any one of claims 1 to 3, characterized in that: Also includes: When the plurality of IoT devices pass identity authentication, persisting the joint authentication information; as well as After the IoT gateway is restarted, if it is identified that the multiple IoT devices in the IoT have not changed, the persistent joint authentication information is reported to the IoT cloud platform so that the IoT cloud platform can simultaneously perform identity authentication on the multiple IoT devices based on the joint authentication information.
11. A method for authenticating an IoT device, applicable to an IoT cloud platform, characterized in that: The method comprises: Receiving first joint authentication information and identity information of multiple IoT devices reported by the IoT gateway; Calculate message authentication codes of the multiple IoT devices based on the identity information of the multiple IoT devices and key information required for identity authentication of the multiple IoT devices; Generating second joint authentication information required for simultaneously authenticating the multiple IoT devices according to the message authentication codes of the multiple IoT devices, including: constructing a second hash tree using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree, wherein the root node of the second hash tree represents the second joint authentication information; Based on the first joint authentication information and the second joint authentication information, identity authentication is performed on the multiple Internet of Things devices at the same time.
12. The method according to claim 11, characterized in that The first joint authentication information reported by the IoT gateway includes: A first hash tree reported by the Internet of Things gateway is received, wherein a root node of the first hash tree represents the first joint authentication information.
13. The method according to claim 12, characterized in that Based on the first joint authentication information and the second joint authentication information, simultaneously authenticating the multiple IoT devices includes: Compare whether the root node of the first hash tree is the same as the root node of the second hash tree; If they are not the same, the identity information of the first IoT device that has not passed the identity authentication and / or the identity information of the second IoT device that has passed the identity authentication is obtained by comparing the non-root nodes of the first hash tree and the second hash tree; A first authentication result message including the identity information of the first Internet of Things device and / or the identity information of the second Internet of Things device that has passed the identity authentication is returned to the Internet of Things gateway.
14. The method according to claim 12, characterized in that The first joint authentication information reported by the IoT gateway includes: Receive a root node of a first hash tree reported by the Internet of Things gateway, where the root node of the first hash tree represents the first joint authentication information.
15. The method according to claim 14, characterized in that Based on the first joint authentication information and the second joint authentication information, simultaneously authenticating the multiple IoT devices includes: Compare whether the root node of the first hash tree is the same as the root node of the second hash tree; If they are not the same, returning a second authentication result message to the IoT gateway indicating that the multiple IoT devices have failed identity authentication; Receive a first hash tree sent by the Internet of Things gateway according to the second authentication result message; Compare the non-root nodes of the first hash tree and the second hash tree to obtain the identity information of the first Internet of Things device that has not passed the identity authentication and / or the identity information of the second Internet of Things device that has passed the identity authentication; Return the identity information of the first Internet of Things device and / or the identity information of the second Internet of Things device to the Internet of Things gateway.
16. The method according to any one of claims 11 to 15, characterized in that: Also includes: When the plurality of IoT devices pass identity authentication, persisting the second joint authentication information; as well as Receiving first joint authentication information reported by the IoT gateway after restarting and identifying that the plurality of IoT devices have not changed; Based on the first joint authentication information and the second joint authentication information, identity authentication is performed on the multiple Internet of Things devices at the same time.
17. An Internet of Things gateway, characterized in that: include: memory, processor, and communications components; The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute the computer program to: Obtain identity information of multiple IoT devices in the IoT and key information required for identity authentication of the multiple IoT devices; Calculate message authentication codes of the multiple IoT devices according to the identity information of the multiple IoT devices and the key information; Generating joint authentication information required for simultaneously authenticating the multiple IoT devices according to the message authentication codes of the multiple IoT devices, including: constructing a hash tree using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree, wherein the root node of the hash tree represents the joint authentication information; The joint authentication information and the identity information of the multiple IoT devices are reported to the IoT cloud platform through the communication component, so that the IoT cloud platform can simultaneously perform identity authentication on the multiple IoT devices based on the joint authentication information.
18. An Internet of Things cloud platform, characterized in that: include: memory, processor, and communications components; The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute the computer program to: Receiving, through the communication component, first joint authentication information and identity information of multiple IoT devices reported by the IoT gateway; Calculate message authentication codes of the multiple IoT devices based on the identity information of the multiple IoT devices and the key information required for identity authentication; Generating second joint authentication information required for simultaneously authenticating the multiple IoT devices according to the message authentication codes of the multiple IoT devices, including: constructing a second hash tree using the message authentication codes of the multiple IoT devices as leaf nodes of the hash tree, wherein the root node of the second hash tree represents the second joint authentication information; Based on the first joint authentication information and the second joint authentication information, identity authentication is performed on the multiple Internet of Things devices at the same time.
19. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to implement the steps in the method according to any one of claims 1 to 16.
