An authentication method and device based on an environmental internet of things
By using temporary keys and an N-round iterative algorithm to calculate authentication codes in environmental IoT systems, the problems of insufficient energy and computing power in the authentication process of tag devices and AIoTF network elements are solved, thereby achieving a reduction in security and energy consumption.
Patent Information
- Application Number
- CN202511463482.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-10-14
AI Technical Summary
In existing technologies, the authentication process fails due to insufficient energy or computing power when tag devices and AIoTF network elements are executing the authentication process, making it unsuitable for tag devices with low power consumption and low computing power.
An authentication method based on environmental IoT is adopted. By generating first and second challenge values, authentication is performed using a temporary key. The expected message authentication code and response are calculated using an N-round iterative algorithm, which simplifies the authentication process and reduces energy consumption.
It improves the security of the authentication process, reduces energy consumption, simplifies the authentication process, and is compatible with low-power, low-computing-capacity tag devices.
Smart Images

Figure CN120957141B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information security, and in particular to an authentication method and device based on ambient internet of things. BACKGROUND
[0002] An ambient internet of things (Ambient IoT, AIO T / AIoT) system is based on a cellular network communication infrastructure and is composed of a tag device (Device) and a reader (Reader), a radio access network node (RAN node), and an ambient internet of things function (AIoT function, AIoTF) network element. Main services include inventory, positioning, sensor data reporting, and commands.
[0003] Among them, the tag device supports a battery-free device without energy storage (i.e., without energy storage capability) or a battery-free device with energy storage (i.e., with energy storage capability), i.e., the tag device supports a device powered by energy harvesting (such as solar energy, radio waves, motion, vibration, heat, pressure, or other power sources), which can be battery-free or use only limited energy storage, without the need for manual battery replacement or charging, with the advantages of small size, low power consumption, and low complexity.
[0004] Among them, the tag device and the AIoTF network element need to be bidirectionally authenticated before establishing communication to confirm the legal identity of the other party and provide a security basis for subsequent positioning, command issuance, and other services. However, in the prior art, when the tag device and the AIoTF network element perform the authentication process, the tag device may have insufficient energy or insufficient computing power, resulting in a failure of the authentication process. Therefore, there is an urgent need for an authentication scheme that can be applied to tag devices and AIoTF network elements to adapt to low-power and low-computing-power tag devices. SUMMARY
[0005] The present application provides an authentication method and device based on ambient internet of things, which can make the authentication process more secure and reduce energy consumption, and achieve the requirements of AIoT authentication for lightweight and security.
[0006] In a first aspect, an authentication method based on an environmental Internet of Things is provided, and the method is applied to a first device. In the method, the first device can obtain a first challenge value and an initial key. Then, the first device determines a first key according to the first challenge value and the initial key. After that, the first device determines an expected message authentication code XMAC and a response RES according to the first key, the first challenge value, and a second challenge value. The first challenge value is randomly generated by an environmental Internet of Things function network element AIoTF, and is used to verify the identity of the first device. The second challenge value is randomly generated by the first device, and is used to verify the identity of the AIoTF network element. The XMAC is used for the first device to authenticate the identity of the AIoTF network element, and the RES is used for the AIoTF network element to authenticate the identity of the first device. In the method, the first key is used as a temporary key, so that the initial key can be prevented from directly participating in the calculation, the security of the authentication process is improved, the XMAC and the RES can be determined at one time according to the first key, the first challenge value, and the second challenge value, the energy consumption is reduced, and the authentication process is simplified.
[0007] In a possible implementation manner of the first aspect, the first challenge value is randomly generated by the AIoTF network element through a binary algorithm, and the second challenge value is randomly generated by the first device through a binary algorithm. The randomness of the authentication process is ensured by the first challenge value and the second challenge value.
[0008] In a possible implementation manner of the first aspect, the first device determines the XMAC and the RES according to the first key, the first challenge value, and the second challenge value, including that the first device combines the first challenge value and the second challenge value to obtain a first variable value. Then, the first device calculates the second variable value by using N rounds of iteration algorithms on the first variable value. Then, the first device separates the second variable value to determine the XMAC and the RES. The first variable value is composed of M binary digits. The second variable value is composed of M binary digits. Each round of iteration algorithm in the N rounds of iteration algorithms includes a first extension algorithm, a second extension algorithm, and a first cross algorithm. The first extension algorithm is used to output a first extension value according to the second challenge value and the first key, the second extension algorithm is used to output a second extension value according to the first challenge value and the first key, and the first cross algorithm is used to output the second variable value according to the first extension value and the second extension value. By using the N rounds of iteration algorithms, the first variable value can be highly confused and diffused to obtain the second variable value, and finally the XMAC and the RES are determined by using the second variable value. The XMAC and the RES can be obtained at one time in the whole process, and the energy consumption can be reduced.
[0009] In a possible implementation manner of the first aspect, the first extension algorithm includes that the first device performs exclusive OR operation on high M / 2 bits of the M-bit binary number and the first key to obtain a first value. Then, the first device obtains a second value according to the first value and a first constant of X bits. After that, the first device performs cyclic left shift operation on the second value to obtain a third value. After that, the first device performs exclusive OR operation on the third value and the second challenge value to obtain the first extension value. In this way, a complex function can be avoided, and the first extension value can be obtained only by using simple arithmetic operations, so that the authentication process is simpler.
[0010] In a possible implementation manner of the first aspect, the second extension algorithm includes that the first device performs exclusive OR operation on low M / 2 bits of the M-bit binary number and the first key to obtain a fourth value. Then, the first device obtains a fifth value according to the fourth value and a second constant of Y bits. After that, the first device performs cyclic right shift operation on the fifth value to obtain a sixth value. After that, the first device performs exclusive OR operation on the sixth value and the first challenge value to obtain the second extension value. In this way, a complex function can be avoided, and the second extension value can be obtained only by using simple arithmetic operations, so that the authentication process is simpler.
[0011] In a possible implementation manner of the first aspect, the first cross algorithm includes that the first device obtains a third extension value and a fourth extension value. The third extension value is related to the second extension value, and the fourth extension value is related to the first extension value and the second extension value. Then, the first device combines the third extension value and the fourth extension value to obtain a second variable value. By using the simple cross algorithm, the confusion degree of the obtained second variable value is higher, the uniqueness of authentication is enhanced, and the security of the authentication process is ensured.
[0012] In a possible implementation manner of the first aspect, the first device separates the second variable value to determine the XMAC and the RES, including that the first device takes high M / 2 bits of the second variable value as the RES, and takes low M / 2 bits of the second variable value as the XMAC.
[0013] In a possible implementation manner of the first aspect, the method further includes deleting the first key, so that the storage space can be saved, the risk of key leakage can be reduced, and the possibility of key cracking can be reduced.
[0014] In a second aspect, an authentication method based on an environmental Internet of Things is provided, which is applied to an AIoTF network element. In the method, the AIoTF network element acquires a second challenge value and an initial key. Then, the AIoTF network element determines a second key according to the first challenge value and the initial key. After that, the AIoTF network element determines a message authentication code (MAC) and an expected response (XRES) according to the second key, the first challenge value and the second challenge value. The second challenge value is randomly generated by a first device and used to verify the identity of the AIoTF network element. The first challenge value is randomly generated by the AIoTF network element and used to verify the identity of the first device. The MAC is used to authenticate the identity of the AIoTF network element by the first device. The XRES is used to authenticate the identity of the first device by the AIoTF network element. By using the second key as a temporary key, the method can avoid the initial key directly participating in the calculation, improve the security of the authentication process, and determine the MAC and the XRES through one calculation according to the second key, the first challenge value and the second challenge value, thereby reducing the energy consumption and simplifying the authentication process.
[0015] In a possible implementation of the second aspect, the first challenge value is randomly generated by the AIoTF network element through a binary algorithm, and the second challenge value is randomly generated by the first device through a binary algorithm. The randomness of the authentication process is ensured by the first challenge value and the second challenge value.
[0016] In a possible implementation of the second aspect, the AIoTF network element determines the MAC and the XRES according to the second key, the first challenge value and the second challenge value, which includes that the AIoTF network element combines the first challenge value and the second challenge value to obtain a first variable value. Then, the AIoTF network element calculates the third variable value by using N rounds of iterative algorithms on the first variable value. After that, the AIoTF network element separates the third variable value to determine the MAC and the XRES. The first variable value is composed of M binary digits, and the third variable value is composed of M binary digits. Each round of the N rounds of iterative algorithms includes a third expansion algorithm, a fourth expansion algorithm and a second cross algorithm. The third expansion algorithm is used to output a fifth expansion value according to the second challenge value and the second key. The fourth expansion algorithm is used to output a sixth expansion value according to the first challenge value and the second key. The second cross algorithm is used to output the third variable value according to the fifth expansion value and the sixth expansion value. By using the N rounds of iterative algorithms, the first variable value can be highly confused and diffused to obtain the third variable value. Finally, the MAC and the XRES are determined by the third variable value. The whole process can obtain the MAC and the XRES through one calculation, thereby reducing the energy consumption.
[0017] In a possible implementation manner of the second aspect, the third expansion algorithm includes that the AIoTF network element performs XOR operation on the upper M / 2 bits of the M-bit binary number and the second key to obtain a seventh value. Then, the AIoTF network element obtains an eighth value according to the seventh value and the X-bit first constant. After that, the AIoTF network element performs left cyclic shift operation on the eighth value to obtain a ninth value. After that, the AIoTF network element performs XOR operation on the ninth value and the second challenge value to obtain the fifth expansion value. In this way, the fifth expansion value can be obtained by using simple arithmetic operations instead of using a complex function, and the authentication process is simpler.
[0018] In a possible implementation manner of the second aspect, the fourth expansion algorithm includes that the AIoTF network element performs XOR operation on the lower M / 2 bits of the M-bit binary number and the second key to obtain a tenth value. Then, the AIoTF network element obtains an eleventh value according to the tenth value and the Y-bit second constant. After that, the AIoTF network element performs right cyclic shift operation on the eleventh value to obtain a twelfth value. After that, the AIoTF network element performs XOR operation on the twelfth value and the first challenge value to obtain the sixth expansion value. In this way, the sixth expansion value can be obtained by using simple arithmetic operations instead of using a complex function, and the authentication process is simpler.
[0019] In a possible implementation manner of the second aspect, the second cross algorithm includes that the AIoTF network element obtains the seventh expansion value and the eighth expansion value. The seventh expansion value is related to the sixth expansion value, and the eighth expansion value is related to the fifth expansion value and the sixth expansion value. Then, the AIoTF network element combines the seventh expansion value and the eighth expansion value to obtain the third variable value. By using the simple cross algorithm, the confusion degree of the obtained third variable value is higher, the uniqueness of authentication is enhanced, and the security of the authentication process is ensured.
[0020] In a possible implementation manner of the second aspect, the AIoTF network element separates the third variable value to determine the MAC and the XRES, including that the AIoTF network element takes the upper M / 2 bits of the third variable value as the XRES, and takes the lower M / 2 bits of the third variable value as the MAC.
[0021] In a possible implementation manner of the second aspect, the method further includes that the AIoTF network element deletes the second key, so that the storage space can be saved, the risk of key leakage can be reduced, and the possibility of key cracking can be reduced.
[0022] In a third aspect, a communication apparatus is provided. The communication apparatus includes one or more processors. The one or more processors are configured to execute a computer program or instructions, and when the one or more processors execute the computer program or instructions, the method in any one of the first aspect to the second aspect is performed.
[0023] In a possible implementation form of the third aspect, the communication apparatus further comprises one or more memories coupled to the one or more processors, the one or more memories configured to store the computer programs or instructions. In a possible implementation form, the memories are located outside the communication apparatus. In another possible implementation form, the memories are located inside the communication apparatus. In the present application, the processor and the memories can also be integrated into one device, i.e., the processor and the memories can also be integrated together. In a possible implementation form, the communication apparatus further comprises a transceiver, configured to receive information and / or transmit information.
[0024] In a possible design, the communication apparatus further comprises one or more communication interfaces coupled to the one or more processors, the one or more communication interfaces configured to communicate with other modules outside the communication apparatus.
[0025] In a fourth aspect, a communication apparatus is provided, comprising an interface circuit and a logic circuit; the interface circuit is configured to input and / or output information; the logic circuit is configured to perform the method in any one of the first aspect to the second aspect, process and / or generate information according to the information.
[0026] In a fifth aspect, a computer readable storage medium is provided, which stores computer instructions or programs, when the computer instructions or programs are run on a computer, the method in any one of the first aspect to the second aspect is performed.
[0027] In a sixth aspect, a chip is provided, comprising: a processor coupled to a memory, the memory configured to store programs or instructions, when the programs or instructions are executed by the processor, the method in any one of the first aspect to the second aspect is performed.
[0028] In a seventh aspect, a computer program product containing computer instructions is provided, when the computer instructions are run on a computer, the method in any one of the first aspect to the second aspect is performed.
[0029] In an eighth aspect, a communication system is provided, comprising a communication apparatus for implementing the method in the first aspect, and a communication apparatus for implementing the method in the second aspect.
[0030] The technical effects brought by any one of the second aspect to the eighth aspect can be referred to the technical effects brought by any one of the possible implementation forms of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1A schematic diagram of an architecture of a communication system provided by an embodiment of the present application is shown in FIG. 1.
[0032] Figure 2 A schematic diagram of a flow of an authentication method based on environmental Internet of Things provided by an embodiment of the present application is shown in FIG. 2.
[0033] Figure 3 A schematic diagram of a flow of another authentication method based on environmental Internet of Things provided by an embodiment of the present application is shown in FIG. 3.
[0034] Figure 4 A schematic diagram of a flow of a method for determining XMAC and RES provided by an embodiment of the present application is shown in FIG. 4.
[0035] Figure 5 A schematic diagram of a flow of a specific method for determining XMAC and RES provided by an embodiment of the present application is shown in FIG. 5.
[0036] Figure 6 A schematic diagram of a flow of a method for determining MAC and XRES provided by an embodiment of the present application is shown in FIG. 6.
[0037] Figure 7 A schematic diagram of a flow of a specific method for determining MAC and XRES provided by an embodiment of the present application is shown in FIG. 7.
[0038] Figure 8 A schematic diagram of a structure of a communication device provided by an embodiment of the present application is shown in FIG. 8.
[0039] Figure 9 A schematic diagram of a structure of another communication device provided by an embodiment of the present application is shown in FIG. 9. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0041] The technical solutions provided in the present application can be applied to various communication systems, for example: a global system for mobile communications (GSM) system, a general packet radio service (GPRS), a wireless local area network (WLAN), a long term evolution (LTE) system, an LTE frequency division duplex (FDD) system, an LTE time division duplex (TDD), a sidelink communication system, a universal mobile telecommunication system (UMTS), a worldwide interoperability for microwave access (WiMAX) communication system, a non-terrestrial network (NTN) communication system, a 5th generation (5G) mobile communication system or a new radio access technology (NR). The 5G mobile communication system can include a non-standalone (NSA) and / or standalone (SA). The technical solutions provided in the present application can also be applied to future communication systems. The present application is not limited in this regard.
[0042] Embodiments of the present application can be applied in an ambient Internet of Things (AIoT) scenario. AIoT mainly refers to an Internet of Things driven by energy collected from radio waves, light, motion, heat or any other available ambient energy. The communication method provided by the embodiments of the present application and the communication system applied can be an ambient Internet of Things, but this is not a limitation on other possible communication scenarios.
[0043] The following embodiments of the present application are described taking AIoT as an example. The AIoT is a kind of low-power environmental Internet of Things technology, which can improve the sustainability and performance of communication, and reduce the power consumption of wireless communication. The AIoT supports batteryless devices without energy storage (i.e., without the ability to store energy) or batteryless devices with energy storage (i.e., with the ability to store energy), that is, the AIoT supports devices powered by energy harvesting (such as solar power, radio waves, motion, vibration, heat, pressure, or other power sources), which can work without batteries or with only limited energy storage, without the need for manual battery replacement or charging. That is, the AIoT supports devices with small size, low power consumption, and low complexity, and therefore, the AIoT system can be more widely applied and can achieve hundreds of billions of connections.
[0044] Figure 1 is a schematic diagram of a communication system to which embodiments of the present application are applied. As shown in Figure 1 , the communication system 100 can include an ambient Internet of things device 101 (AIoT device), an ambient Internet of things reader 102 (AIoT reader), an ambient Internet of Things Function (AIoTF) network element 103, an application function (application function, AF) network element 104, and an ambient Internet of Things Data Management (AIoT Data Management, ADM) network element 105. The ambient Internet of things device 101 and the ambient Internet of things reader 102 can communicate through a wireless link. The ambient Internet of things reader 102 and the ambient Internet of Things Function network element 103 can communicate through a wired link; or the ambient Internet of things reader 102 and the ambient Internet of Things Function network element 103 can communicate through a wired link and a wireless link. The ambient Internet of Things Function network element 103 and the application function network element 104 communicate through a wired link. The application function network element 104 and the ambient Internet of Things Data Management network element 105 communicate through a wired link.
[0045] The ambient Internet of things device can also be referred to as an AIoT device, a tag device, an AIoT tag device, an ultra-low-power terminal, etc., without limitation. For ease of description, the AIoT device is taken as an example for description in the embodiments of the present application.
[0046] Exemplarily, the AIoT device includes, but is not limited to, a passive device based on the backscattering principle (for example, a passive tag), a semi-passive device based on the backscattering principle (for example, a semi-passive tag), and an active communication device with power consumption in the order of hundreds of microwatts. It can be understood that the passive tag is only one form of the passive Internet of Things device, and those skilled in the art can understand that the AIoT device is not limited to this form of passive tag.
[0047] The AIoT device can be applied to various scenarios, for example, can be applied to intelligent buildings, asset tracking, agriculture, smart home and the like. Exemplarily, the AIoT device can be a smart switch, a smart door lock, a smart meter, a sensor-based device for monitoring machine status, environmental conditions and the like, building automation and control devices, asset tag devices and the like, and the embodiments of the present application are not limited thereto. In these scenarios, the networking requirements of the AIoT device are generally simple, which can be simply asset information reporting or sending very little sensor data.
[0048] Optionally, the AIoT device can communicate with a communication node (including interaction signaling and / or data, and the data includes but is not limited to asset information, sensor data and the like). The communication node can be a reader, an entity of a radio access network (RAN) (such as a base station) or a user equipment (UE).
[0049] Among them, the environmental Internet of Things reader can also be referred to as an AIoT reader, an AIoT reader / writer, an AIoT reader / writer device, an AIoT reading device, an AIoT reader, etc., and is not limited. For ease of description, the embodiments of the present application take the AIoT reader as an example for description.
[0050] Exemplarily, the AIoT reader can read and write the AIoT device by using a wireless communication mode, so as to achieve the purpose of identifying the target and data exchange. For example, the AIoT reader provides energy for the AIoT by sending an excitation signal to the AIoT, the AIoT receives the signaling sent by the AIoT reader, and sends the signaling to the AIoT reader through the reflected signal, in this way, the AIoT reader can identify the identification information of the AIoT device, and read and write the AIoT device and the like.
[0051] It should be noted that in some cases, the base station or the UE can realize the function of the AIoT reader, in which case the AIoT reader can be a base station or a UE capable of realizing the function of the reader.
[0052] Among them, the environmental Internet of Things function network element is used to support environmental Internet of Things services. The AIoTF network element is used to manage AIoT systems and AIoT devices, provide AIoT related services and capabilities, and optionally register and manage AIoT devices, mobility management, etc. The AIoTF network element can select a base station as an AIoT reader, or select a UE as an AIoT reader, and send a selected UE list to the base station; the AIoTF network element can connect and communicate with the AIoT reader through the AMF network element, or directly connect and communicate with the AIoT reader.
[0053] Optionally, the AIoTF network element has the functions of any one of 1 to 13 as follows:
[0054] 1: The AIoTF network element has AIoT NAS protocol connection management with AIoT devices.
[0055] 2: The AIoTF network element has a connection with NG-RAN via a direct interface or via an AMF.
[0056] 3: The AIoTF network element has support for AIoT service operations for AIoT devices.
[0057] 4: The AIoTF network element has an AIoT service interface (or through) NEF for AF, and authorizes AIoT service operation requests of trusted AF.
[0058] 5: The AIoTF network element has triggering NG-RAN / RAN reader / UE reader to perform AIoT service operations for AIoT devices, and optionally determining and providing assistance information to NG-RAN.
[0059] 6: The AIoTF network element has triggering AIoT readers to perform AIoT service operations for AIoT devices, and optionally determining and providing assistance information to NG-RAN / AIoT readers.
[0060] 7: The AIoTF network element has reporting AIoT service running results to AF (or through NEF) according to local configuration or AF request.
[0061] 8: The AIoTF network element has selecting NG-RAN, and optionally selecting AIoT readers for AIoT service operations.
[0062] 9: When the AIoTF network element indirectly connects NG-RAN via an AMF network element, the AMF network element is selected based on target area information.
[0063] 10: The AIoTF network element has correlation ID allocation corresponding to AF service operation requests.
[0064] 11: The AIoTF network element is capable of retrieving AIoT device profile data from the ADM.
[0065] 12: The AIoTF network element is capable of retrieving AF authorization data from the ADM.
[0066] 13: The AIoTF network element is capable of performing aggregation of AIoT service responses, determining and providing assistance for AIoT aggregation in the NG-RAN.
[0067] It should be noted that the NG-RAN involved in the embodiments of the present application can be replaced by an NG-RAN node, i.e., an NG-RAN node; or the NG-RAN can also be replaced by a base station, which is not limited. Here, it is uniformly stated that the following embodiments will not be described again.
[0068] Among them, the AF network element and the AIoTF network element interwork to provide services for users.
[0069] Among them, the ADM network element is mainly used to manage AIoT device profile data and AF authorization data.
[0070] Optionally, the ADM network element has the functions described in any one of the following 1 to 3:
[0071] 1: The ADM network element manages AIoT device profile data.
[0072] 2: The ADM network element manages AF authorization data.
[0073] 3: The ADM network element supports generating related AIoT security keys and interacting with the AIoTF network element.
[0074] In some embodiments, the AIoT reader serves as a node between the AIoT device and the AIoTF network element. The AIoT reader can communicate with the AIoT device, such as reading data information in the AIoT device, and send the communication result to the AIoTF network element. The AIoTF network element can interact with the AF network element, so that the AF network element can manage the AIoT device and process AIoT data. For example, when the AIoT device is a sensor, in the sensor data reading scenario, the AF network element can obtain the data information in the sensor by issuing a read command (or called AIoT service request) of the data information to the sensor.
[0075] Exemplarily, the AF network element can send an AIoT service request to the AIoTF network element, the AIoTF network element receives the AIoT service request sent by the AF network element, the AIoTF network element determines one or more AIoT readers, each of which covers one or more AIoT devices. The AIoTF network element instructs the AIoT reader to perform the AIoT service (or AIoT service) based on the AIoT service request.
[0076] Optionally, the AIoT service mainly includes: inventory (Inventory), positioning (Positioning), sensor data reporting (Sensor data report), command (Command), etc.
[0077] Generally, AIoT devices and AIoTF network elements need to be authenticated before establishing communication to confirm the legal identity of the other party, providing a security foundation for subsequent positioning, command issuing and other services. Among them, the AIoT device structure is extremely simple, lifelong maintenance-free, and environmentally friendly, powered by external energy harvesting (such as environmental energy light, heat, vibration, etc.) or through limited energy storage capacity (such as capacitors) and the like. It has extremely low power consumption and computing power.
[0078] In the prior art, when AIoT devices and AIoTF network elements perform the authentication process, the AIoT devices may not have enough energy or computing power, resulting in authentication process failure. Therefore, there is an urgent need for an authentication scheme applicable to AIoT devices and AIoTF network elements to adapt to low-power and low-computing AIoT devices.
[0079] Therefore, the present application provides an authentication method and device based on an environmental Internet of Things, which can be applied to the authentication of AIoT devices and AIoTF network elements. The method and device can be applied to Figure 1 the architecture of the exemplary communication system shown.
[0080] The scheme provided by the present application will be described in detail below in conjunction with the corresponding flowchart. It can be understood that the main execution subject of the interaction in the exemplary flowchart provided by the present application is taken as an example, such as AIoT devices, AIoTF network elements, to illustrate the method, but the present application does not limit the execution subject of the interaction. For example, the devices (such as AIoT devices, AIoTF network elements) in the exemplary flowchart can also be a chip, chip system, or processor that supports the device to implement the method, and can also be a logic module or software that can implement all or part of the function of the device.
[0081] Herein, it is to be noted that the messages or signaling interactions involved in the interaction process of the embodiments of the present application can be the messages or signaling in the standards or newly introduced messages or signaling, and the embodiments of the present application do not make specific limitation thereon.
[0082] Figure 2 is a flowchart of an authentication method based on an environmental Internet of Things provided by the present application. As shown in the figure, the method comprises steps S201-S211. Figure 2
[0083] S201, the AF network element sends an inventory request to the AIoTF network element, and correspondingly, the AIoTF network element receives the inventory request from the AF network element.
[0084] The inventory request is used to trigger the AIoT reader to perform inventory on the AIoT device, or in other words, the inventory request is used to trigger the AIoT reader to perform the inventory operation, and the inventory request can also be used to trigger the bidirectional authentication of the AIoT device and the AIoTF network element.
[0085] The inventory request comprises an identification (ID) of the AIoT reader and an AIoT device ID. The AIoT reader ID is used to indicate the AIoT reader requesting the inventory, and the AIoT device ID is used to indicate the AIoT device to be inventoried, and the AIoT device ID can also be used to indicate the AIoT device to be authenticated. It can be understood that the inventory request can comprise one or more AIoT reader IDs, that is, the inventory request can be used to trigger one or more readers to perform the inventory operation. The inventory request can also comprise one or more AIoT device IDs, that is, one reader can inventory one or more devices, without limitation.
[0086] S202, the AIoTF network element sends a device information request to the ADM network element, and correspondingly, the ADM network element receives the device information request from the AIoTF network element.
[0087] The device information request is used to obtain the information of the AIoT device from the ADM network element to support the AIoTF network element to complete the inventory operation and the authentication operation.
[0088] The device information request comprises the AIoT device ID received by the AIoTF network element in step S201. Optionally, when there are multiple AIoT device IDs, the AIoTF network element can send one device information request to the ADM network element, comprising a list of multiple AIoT device IDs. Alternatively, the AIoTF network element can send multiple device information requests to the ADM network element, and each device information request comprises one AIoT device ID. The embodiments of the present application do not make limitation on the specific sending mode of the device information request.
[0089] S203, the ADM network element sends a device information response to the AIoTF network element, and correspondingly, the AIoTF network element receives the device information response from the ADM network element.
[0090] The device information response is used to send information of the AIoT device to the AIoTF network element.
[0091] It can be understood that the ADM network element pre-stores the initial key (Kaiot) and the correspondence between the AIoT reader and the AIoT device.
[0092] The device information response includes the AIoT reader ID and the initial key of the AIoT reader corresponding to the AIoT device indicated by the AIoT device ID in step S202.
[0093] Optionally, when the ADM network element receives multiple AIoT device IDs in step S202, the device information response sent by the ADM network element to the AIoTF network element can contain all AIoT reader IDs and initial keys of the AIoT readers corresponding to the AIoT devices indicated by the multiple AIoT device IDs.
[0094] For example, after the AIoTF network element receives the device information response from the ADM network element, the AIoTF network element starts a counter one in the AIoTF network element.
[0095] S204, the AIoTF network element calculates a network message authentication code (MACn).
[0096] The AIoTF network element can use a hash function to calculate the MACn. The MACn is generated by the AIoTF network element and is used to prove the identity of the AIoTF network element. The hash function is used to map input data of arbitrary length to output values (hash values) of fixed length. For example, MACn=HMAC(AIoT device ID, AIoT reader ID, count1, initial key). The initial key is received by the AIoTF network element in step S203. Count1 is the value of the counter one stored in the AIoTF network element.
[0097] S205, the AIoTF network element sends an inventory request to the AIoT reader, and correspondingly, the AIoT reader receives the inventory request from the AIoTF network element.
[0098] The inventory request is used to trigger the AIoT reader to inventory the AIoT device, or in other words, the inventory request is used to trigger the AIoT reader to perform an inventory operation. The inventory request can also be used to trigger bidirectional authentication of the AIoT device and the AIoTF network element.
[0099] The inventory request includes the AIoT device ID and the MACn, and if the value of the counter one in the AIoT network element is the initial value, the inventory request further includes a start indication, which is used to indicate that the value of the counter two in the AIoT device is also the initial value.
[0100] For example, the initial value can be 1, and if count1 = 1, the inventory request includes the start indication.
[0101] S206, the AIoT reader forwards the inventory request to the AIoT device, and correspondingly, the AIoT device receives the inventory request from the AIoT reader.
[0102] For example, the AIoT device starts the counter two after receiving the inventory request from the AIoT reader.
[0103] S207, the AIoT device verifies the MACn and calculates the MACu.
[0104] It can be understood that the AIoT device pre-stores the initial key, the AIoT device ID, and the AIoT reader ID of the AIoT reader corresponding to the AIoT device.
[0105] For example, the AIoT device calculates the expected network message authentication code MACn'. The MACn' is generated by the AIoT device and is used to verify the correctness of the MACn. For example, MACn' = HMAC (AIoT device ID, AIoT reader ID, count2, initial key). The count2 is the value of the counter two in the AIoT device.
[0106] If the inventory request received by the AIoT device in step S206 includes the start indication, it means that the start indication is valid, and the value of the counter two in the AIoT device count2 is also the initial value. For example, when the initial value is 1, count2 = 1.
[0107] If the MACn and the MACn' are the same, the identity authentication of the AIoT network element is successful, and then the AIoT device adds one to the value of the counter two, and the value of the counter two becomes count2 + 1.
[0108] The AIoT device can also calculate the device message authentication code (User Equipment Message Authentication Code, MACu). The MACu is generated by the AIoT device and is used to prove the identity of the AIoT device. For example, MACu = HMAC (AIoT device ID, AIoT reader ID, count2 + 1, initial key), wherein the initial key is the initial key stored in the AIoT device.
[0109] S208, the AIoT device sends an inventory response to the AIoT reader, and correspondingly, the AIoT reader receives the inventory response from the AIoT device.
[0110] The inventory response is used to indicate that the AIoT device has received the inventory request.
[0111] The inventory response can include the AIoT device ID.
[0112] Optionally, the inventory response can also include the MACu.
[0113] S209, the AIoT reader forwards the inventory response to the AIoT F network element, and correspondingly, the AIoT F network element receives the inventory response from the AIoT reader.
[0114] The AIoT F network element can add 1 to the value of the counter one after receiving the inventory response from the AIoT reader, and the value of the counter one becomes count1+1.
[0115] S210, the AIoT F network element verifies the MACu.
[0116] The AIoT F network element can calculate the expected device message authentication code MACu'. The MACu' is generated by the AIoT F network element to verify the correctness of the MACu. For example, MACu' = HMAC (AIoT device ID, AIoT reader ID, count1+1, initial key). The initial key is received by the AIoT F network element in step S203.
[0117] If the MACu and the MACu' are the same, the AIoT device authentication is successful. The AIoT F network element stores the value of the counter one, i.e. the value of the counter one is stored as count1+1.
[0118] S211, the AIoT F network element sends an inventory response to the AF network element.
[0119] The inventory response is used to indicate that the authentication is successful.
[0120] The inventory response can include the AIoT device ID and the AIoT reader ID.
[0121] Although the above method can be used for the authentication process of the AIoT device and the AIoTF network element, the hash function algorithm used in the above authentication process is relatively complex, and 4 times of calculation are required for MACn, MACn', MACu and MACu' in the bidirectional authentication of the AIoT device and the AIoTF network element, and the energy consumption of the AIoT device is relatively high. Further, the security of the initial key used in the authentication process is not high enough, and once the AIoT device is physically attacked and the key is leaked, the subsequent authentication will be affected. Moreover, the counter introduced to ensure that the data or message in the authentication process is newly generated (i.e. freshness) will also have a synchronization problem.
[0122] To solve the above problems, another authentication method based on environmental Internet of Things is disclosed in the present application. As shown in the method includes the following steps: Figure 3
[0123] S301, the AF network element sends a first request to the AIoTF network element, and correspondingly, the AIoTF network element receives the first request from the AF network element.
[0124] The first request is used to trigger the bidirectional authentication of the AIoTF network element and the first device (such as an AIoT device).
[0125] Exemplarily, the first request can be an inventory request, which is used to trigger the second device (such as an AIoT reader) to inventory the first device, and the inventory request can also be used to trigger the bidirectional authentication of the AIoTF network element and the first device.
[0126] Exemplarily, the first request can include a first device ID (such as an AIoT device ID), which is used to indicate the first device to be authenticated. It can be understood that the first request can include one or more first device IDs, which are not limited.
[0127] It can be understood that the above-mentioned first device can be an environmental Internet of Things device in Figure 1 , and the second device can be an environmental Internet of Things reader in Figure 1 , which are not limited.
[0128] S302, the AIoTF network element sends a device information request to the ADM network element, and correspondingly, the ADM network element receives the device information request from the AIoTF network element.
[0129] The device information request is used to obtain the information of the first device from the ADM network element to support the AIoTF network element to complete the authentication operation.
[0130] The device information request includes the first device ID received by the AIoTF network element in step S301.
[0131] Optionally, when there are multiple first device IDs, the AIoTF network element can send a device information request to the ADM network element, containing a list of multiple first device IDs. Alternatively, the AIoTF network element can send multiple device information requests to the ADM network element, each device information request including one first device ID. The specific sending mode of the device information request is not limited in the embodiments of the present application.
[0132] S303, the ADM network element sends a device information response to the AIoTF network element, and correspondingly, the AIoTF network element receives the device information response from the ADM network element.
[0133] The device information response is used to send the information of the first device to the AIoTF network element.
[0134] It can be understood that the ADM network element pre-stores an initial key (K) and the correspondence between the first device and the second device.
[0135] The device information response includes the second device ID corresponding to the first device ID in step S302 and K.
[0136] Optionally, when there are multiple first device IDs, the ADM network element can send a device information response to the AIoTF network element once, and the device information response contains all second device IDs and K corresponding to the multiple first device IDs.
[0137] S304, the AIoTF network element determines a second key based on the first challenge value and the initial key.
[0138] It can be understood that before step S304, the method further includes that the AIoTF network element randomly generates a first challenge value (Challenge1) through a binary algorithm.
[0139] The second key is used for subsequent authentication process between the AIoTF network element and the first device.
[0140] The AIoTF network element determines the second key based on the first challenge value and K in the device information response received by the AIoTF network element in step S303.
[0141] Illustratively, the AIoTF network element calculates the second key using formula (1).
[0142] Temp_key2 = SHA3_64(K^Challenge1) Formula (1),
[0143] The second key is Temp_key2, which can also be understood as a temporary key 2. K is an initial key received by the AIoTF network element from the ADM network element in step S303. Challenge1 is a first challenge value. ^ represents an exclusive or operation. SHA3-64 is a simplified version of the standard SHA3-512, which only performs the first two rounds of calculation and intercepts the high 64 bits as the output. K and Challenge1 must be byte sequences of the same length. SHA3-64 can be calculated by a standard library or by hardware.
[0144] S305, the AIoTF network element sends a second request to the second device, and correspondingly, the second device receives the second request from the AIoTF network element.
[0145] The second request is used to trigger the mutual authentication of the AIoTF network element and the first device.
[0146] For example, the second request can be an inventory request, which is used to trigger the mutual authentication of the AIoTF network element and the first device.
[0147] For example, the second request can include a first device ID and a first challenge value. The first device ID is used to indicate the first device to be authenticated. The first challenge value is used to verify the identity of the first device. It can be understood that the second request can include one or more first device IDs, which are not limited.
[0148] S306, the second device sends a third request to the first device, and correspondingly, the first device receives the third request from the second device.
[0149] The third request can be the same as the second request, or the third request can be different from the second request, that is, the second device processes the second request to obtain the third request. For example, the third request can include more content than the second request. Or the second device can directly forward the second request.
[0150] S307, the first device determines a first key according to the first challenge value and the initial key.
[0151] The first key is used in the subsequent authentication process between the AIoTF network element and the first device.
[0152] For example, the first device can calculate the first key using formula (2).
[0153] For example, the first device calculates the first key using formula (2).
[0154] Temp_key1 = SHA3_64(K^Challenge1) Formula (2),
[0155] Wherein, the first key is Temp_key1, which can also be understood as a temporary key 1. K is an initial key pre-stored by the first device, Challenge1 is a first challenge value included in the second request received by the first device in step S305. ^ represents an exclusive or operation, SHA3-64 is a simplified version of standard SHA3-512, which only performs the first two rounds of calculation and intercepts the high 64 bits as the output, and K and Challenge1 must be byte sequences of the same length. SHA3-64 can be calculated by a standard library or by hardware.
[0156] It should be noted that using the second key and the first key as temporary keys in the authentication process can avoid direct participation of the initial key in the calculation, effectively resist physical attacks, and improve the security of the authentication process.
[0157] S308, the first device determines an expected message authentication code XMAC and a response RES according to the first key, the first challenge value and the second challenge value.
[0158] Wherein, the second challenge value is randomly generated by the first device and used to verify the identity of the AIoTF network element. XMAC is used by the first device to authenticate the identity of the AIoTF network element, and RES is used by the AIoTF network element to authenticate the identity of the first device.
[0159] For example, the first device randomly generates a second challenge value (Challenge2) through a binary algorithm.
[0160] In some embodiments, the first device determines XMAC and RES according to the first key, the first challenge value and the second challenge value.
[0161] As Figure 4 shown is a method flowchart for determining XMAC and RES, comprising steps S401 to S404.
[0162] S401, the first device combines the first challenge value and the second challenge value to obtain a first variable value.
[0163] Wherein, the first variable value is composed of M-bit binary numbers.
[0164] For example, assuming that the first challenge value (Challenge1) is 64 bits, the second challenge value (Challenge2) is 64 bits, and the first variable is state, then state is 128 bits and state = Challenge1|Challenge2, wherein | represents a connector, i.e. Challenge1 is concatenated as the high 64 bits and Challenge2 is concatenated as the low 24 bits to form state.
[0165] S402, the first device calculates the first variable value by using an N-round iterative algorithm to determine a second variable value.
[0166] The second variable value is composed of M-bit binary numbers.
[0167] In the N-round iterative algorithm, each round of iterative algorithm includes a first extension algorithm, a second extension algorithm and a first cross algorithm. The first extension algorithm is used to output a first extension value according to the second challenge value and the first key. The second extension algorithm is used to output a second extension value according to the first challenge value and the first key. The first cross algorithm is used to output the second variable value according to the first extension value and the second extension value.
[0168] For example, the number of rounds N of iteration is to realize high confusion and diffusion of the input first variable value to obtain the second variable value. For example, N can be 8, and the number of iterations is not limited in the embodiments of the application.
[0169] The first extension algorithm includes XOR processing of the high M / 2-bit binary number in the M-bit binary number and the first key to obtain a first value. The second value is obtained according to the first value and the X-bit first constant. The third value is obtained by circularly left shifting the second value. The first extension value is obtained by XOR processing the third value and the second challenge value.
[0170] For example, assuming M=128, in the first round of iterative algorithm, the process of the first extension algorithm is: the high 64-bit binary number in state is Challenge1. The first value = Challenge1^first key, wherein ^ represents XOR operation. The second value = first value*first constant, wherein the number of bits X of the first constant can be 64 bits, and the first constant can be the low 64 bits of the golden ratio constant (0x9E3779B97F4A7C15). The golden ratio constant is , The golden ratio is a specific irrational number, and its value is about 1.6180339887… The golden ratio multiplication can introduce nonlinearity to ensure sufficient confusion and diffusion of data. The second value = (first value*0x9E3779B97F4A7C15)&0xFFFFFFFFFFFFFFFF. The third value can be obtained by circularly left shifting the second value by 17 bits, i.e. third value = ((second value<<17)|(second value>>47)), wherein | represents OR operation. The first extension value = third value^Challenge2.
[0171] The second expansion algorithm includes: performing exclusive-OR operation on the lower M / 2 bits of the M-bit binary number and the first key to obtain a fourth value. A fifth value is obtained according to the fourth value and a Y-bit second constant. The fifth value is cyclically right shifted to obtain a sixth value. The sixth value is subjected to exclusive-OR operation with the first challenge value to obtain the second expansion value.
[0172] For example, in the first round of the iteration algorithm, the process of the second expansion algorithm is as follows: the lower 64 bits of the state are Challenge2. The fourth value = Challenge2^the first key, wherein ^ represents exclusive-OR operation. The fifth value = the fourth value*the second constant, wherein the number of bits Y of the second constant can be 64 bits, and the second constant can be the lower 64 bits of a prime constant (0x9E3779B97F4A7BB9). The prime constant is the hexadecimal conversion of a prime number closest to the golden ratio constant. Nonlinearity can be introduced by prime addition to ensure sufficient confusion and diffusion of data. The fifth value = (the fourth value*0x9E3779B97F4A7BB9)&0xFFFFFFFFFFFFFFFF. The sixth value can be obtained by cyclically right shifting the fifth value by 23 bits, i.e., the sixth value = ((the fifth value<<23)|(the fifth value>>41)), wherein | represents OR operation. The second expansion value = the sixth value^Challenge1.
[0173] The first cross algorithm includes obtaining a third expansion value and a fourth expansion value. The third expansion value is related to the second expansion value, and the fourth expansion value is related to the first expansion value and the second expansion value. The third expansion value and the fourth expansion value are combined to obtain a second variable value.
[0174] For example, in the first round of the iteration algorithm, the process of the first cross algorithm is as follows: the third expansion value = the second expansion value. The fourth expansion value = the first expansion value^the second expansion value, wherein ^ represents exclusive-OR operation.
[0175] Then the value of the state can be updated, state = the third expansion value|the fourth expansion value, and the updated state is taken as the state of the second round of the iteration algorithm. The second round of the iteration algorithm is continued, including the first expansion algorithm, the second expansion algorithm and the first cross algorithm.
[0176] For example, in the second round of the iteration algorithm, the process of the first expansion algorithm is as follows: the first value = the higher 64 bits of the state^the first key. The second value = the first value*the first constant, wherein the number of bits X of the first constant can be 64 bits, and the first constant can be the lower 64 bits of a golden ratio constant (0x9E3779B97F4A7C15). The golden ratio constant is , The golden ratio is a specific irrational number, whose value is approximately 1.6180339887…, i.e., the second value = (the first value * 0x9E3779B97F4A7C15) & 0xFFFFFFFFFFFFFFFF. The third value can be obtained by circularly shifting the second value left by 17 bits, i.e., the third value = ((the second value << 17) | (the second value >> 47)). The first extended value = the third value ^ Challenge2.
[0177] Exemplarily, in the second round of the iteration algorithm, the process of the second extension algorithm is as follows: the fourth value = the low 64-bit binary number of state ^ the first key. The fifth value = the fourth value * the second constant, where the number of bits Y of the second constant can be 64 bits, and the second constant can be the low 64 bits of a prime constant (0x9E3779B97F4A7BB9). The prime constant is the hexadecimal conversion of a prime number closest to the golden ratio constant, i.e., the fifth value = (the fourth value * 0x9E3779B97F4A7BB9) & 0xFFFFFFFFFFFFFFFF. The sixth value can be obtained by circularly shifting the fifth value right by 23 bits, i.e., the sixth value = ((the fifth value << 23) | (the fifth value >> 41)). The second extended value = the sixth value ^ Challenge1.
[0178] Exemplarily, in the second round of the iteration algorithm, the process of the first cross algorithm is as follows: the third extended value = the second extended value. The fourth extended value = the first extended value ^ the second extended value.
[0179] Then the value of state can be updated, state = the third extended value | the fourth extended value, and the updated state is taken as the state of the third round of the iteration algorithm. The third round of the iteration algorithm is continued to be executed, including the first extension algorithm, the second extension algorithm and the first cross algorithm.
[0180] The specific steps of the third round of the iteration algorithm to the Nth round of the iteration algorithm can refer to the related description of the second round of the iteration algorithm, which will not be described herein.
[0181] Exemplarily, after the N rounds of the iteration algorithm, the value of the Nth round of state is the second variable value.
[0182] S403, the first device separates the second variable value to determine XMAC and RES.
[0183] The separating, by the first device, of the second variable value to determine XMAC and RES includes taking the high M / 2-bit binary number of the second variable value as RES and taking the low M / 2-bit binary number of the second variable value as XMAC.
[0184] For example, when M=128, the second variable value state obtained after N rounds of iterative algorithm is 128 bits. Then RES = the high 64 bits of state, and XMAC = the low 64 bits of state.
[0185] Optionally, S404 is also included after S403.
[0186] S404, The first device deletes the first key.
[0187] For example, after determining XMAC and RES, the first device can delete the first key previously generated by the first device, thereby saving storage space, reducing the risk of key leakage, and reducing the possibility of the key being cracked.
[0188] Figure 5 This is a flowchart illustrating a specific method for determining XMAC and RES, corresponding to steps S401-S404 above.
[0189] like Figure 5 As shown, input Challenge1 and Challenge2; record the iteration count as 0; calculate the first variable value (state) = Challenge1|Challenge2; determine if the iteration count is less than N. If the iteration count is less than N, then divide the state into a high M / 2 binary number and a low M / 2 binary number; input the high M / 2 binary number into the first expansion algorithm to obtain the first expansion value, and input the low M / 2 binary number into the second expansion algorithm to obtain the second expansion value; calculate the third expansion value = the second expansion value, and the fourth expansion value = the first expansion value^the second expansion value; calculate the second variable value, which is the updated state = the third expansion value|the fourth expansion value; after incrementing the iteration count by 1, it becomes 1, and the first iteration ends.
[0190] The first expansion algorithm includes calculating the first value = the high M / 2 bits of state ^ the first key, the second value = the first value × the first constant, the third value = ((second value << 17) | (second value >> 47)), and the first expanded value = the third value ^ Challenge2. The second expansion algorithm includes calculating the fourth value = the low M / 2 bits of state ^ the first key, the fifth value = the fourth value × the second constant, the sixth value = ((fifth value << 23) | (fifth value >> 41)), and the second expanded value = the sixth value ^ Challenge1.
[0191] Then, it is judged whether the iteration number is less than N, if the iteration number is less than N, the state is divided into a high M / 2-bit binary number and a low M / 2-bit binary number; the high M / 2-bit binary number is input into the first expansion algorithm to obtain a first expansion value, and the low M / 2-bit binary number is input into the second expansion algorithm to obtain a second expansion value. A third expansion value is calculated as the second expansion value, and a fourth expansion value is calculated as the first expansion value ^ the second expansion value; a second variable value, that is, an updated state, is calculated as the third expansion value | the fourth expansion value; the iteration number is increased to 2 times again, and the second iteration is ended.
[0192] Then, it is continuously judged whether the iteration number is less than N, until the iteration number is equal to or greater than N, a RES is calculated as a high M / 2-bit binary number of the second variable value, and an XMAC is calculated as a low M / 2-bit binary number of the second variable value, to obtain a final calculation result RES and XMAC. And the first key is deleted, and the calculation process is ended.
[0193] Through the above method, the first device can determine the expected message authentication code XMAC and the response RES according to the first key, the first challenge value and the second challenge value, and the calculation process uses simple arithmetic operations, does not need complex function calculation, and can obtain the XMAC and the RES through only one calculation, so that the energy consumption can be reduced and the authentication process can be simplified.
[0194] S309, the first device sends a first response to the second device, and correspondingly, the second device receives the first response from the first device.
[0195] The first response is used to trigger the bidirectional authentication of the AIoTF network element and the first device.
[0196] Illustratively, the first response can be an inventory response, and the inventory response is used to trigger the bidirectional authentication of the AIoTF network element and the first device.
[0197] Illustratively, the first response can include the first device ID, the second challenge value and the RES.
[0198] S310, the second device sends a second response to the AIoTF network element, and correspondingly, the AIoTF network element receives the second response from the second device.
[0199] The second response can be the same as the first response, or the second response can be different from the first response, that is, the second response is obtained after the first response is processed by the second device, for example, the second response can include more contents than the first response. Or the second device can directly forward the first response.
[0200] S311, the AIoTF network element determines a message authentication code MAC and an expected response XRES according to a second key, a first challenge value and a second challenge value.
[0201] wherein the MAC is used for the first device to authenticate the identity of the AIoTF network element. The XRES is used for the AIoTF network element to authenticate the identity of the first device.
[0202] In some embodiments, the AIoTF network element determines the MAC and the XRES according to the second key, the first challenge value and the second challenge value.
[0203] As Figure 6 Fig. 6 shows a flowchart of a method for determining the MAC and the XRES, comprising steps S601-S604.
[0204] S601, the AIoTF network element combines the first challenge value and the second challenge value to obtain a first variable value.
[0205] wherein the first variable value is composed of M-bit binary number.
[0206] For specific examples, reference can be made to the related description of step S401, which will not be repeated here.
[0207] S602, the AIoTF network element calculates the first variable value by using N rounds of iterative algorithm to determine a third variable value.
[0208] wherein the third variable value is composed of M-bit binary number.
[0209] wherein each round of the N rounds of iterative algorithm comprises a third expansion algorithm, a fourth expansion algorithm and a second cross algorithm. The third expansion algorithm is used to output a fifth expansion value according to the second challenge value and the second key. The fourth expansion algorithm is used to output a sixth expansion value according to the first challenge value and the second key. The second cross algorithm is used to output the third variable value according to the fifth expansion value and the sixth expansion value.
[0210] For example, the number of rounds N of iteration is to realize high confusion and diffusion of the input first variable value to obtain the second variable value. For example, N can be 8, and the number of iterations is not limited in the embodiments of the present application.
[0211] wherein the third expansion algorithm comprises XOR processing the high M / 2-bit binary number in the M-bit binary number with the second key to obtain a seventh value. According to the seventh value and a first constant of X bits, an eighth value is obtained. The eighth value is cyclically left shifted to obtain a ninth value. The ninth value is XOR processed with the second challenge value to obtain the fifth expansion value.
[0212] The third expansion algorithm has the same principle as the first expansion algorithm, and reference can be made to the related examples of the first expansion algorithm, which will not be repeated here.
[0213] The fourth expansion algorithm comprises: performing exclusive-OR operation on the lower M / 2 bits of the M-bit binary number and the second key to obtain a tenth value; obtaining an eleventh value according to the tenth value and a Y-bit second constant; performing cyclic right shift operation on the eleventh value to obtain a twelfth value; and performing exclusive-OR operation on the twelfth value and the first challenge value to obtain a sixth expansion value.
[0214] The fourth expansion algorithm has the same principle as the second expansion algorithm, and reference can be made to the related examples of the second expansion algorithm.
[0215] The second crossover algorithm comprises obtaining a seventh expansion value and an eighth expansion value. The seventh expansion value is related to the sixth expansion value, and the eighth expansion value is related to the fifth expansion value and the sixth expansion value. The seventh expansion value and the eighth expansion value are combined to obtain a third variable value.
[0216] For example, in the first round of iteration algorithm, the process of the second crossover algorithm is: the seventh expansion value = the sixth expansion value, and the eighth expansion value = the fifth expansion value ^ the sixth expansion value, where ^ represents exclusive-OR operation.
[0217] Then the value of state can be updated, state = the seventh expansion value | the eighth expansion value, and the updated state is taken as the state of the second round of iteration algorithm. The second round of iteration algorithm is continued to be executed, including the third expansion algorithm, the fourth expansion algorithm and the second crossover algorithm.
[0218] The above process is repeated to execute the third round of iteration algorithm to the Nth round of iteration algorithm, and finally the value of the Nth round of state is obtained as the third variable value.
[0219] S603, the AIoTF network element separates the third variable value to determine the MAC and the XRES.
[0220] The AIoTF network element separates the third variable value to determine the MAC and the XRES, comprising: taking the higher M / 2 bits of the third variable value as the XRES, and taking the lower M / 2 bits of the third variable value as the MAC.
[0221] For example, when M = 128, the third variable value state obtained after N rounds of iteration algorithm is 128 bits, then XRES = the higher 64 bits of state, and MAC = the lower 64 bits of state.
[0222] Optionally, S603 further comprises S604.
[0223] S604, the AIoTF network element deletes the second key.
[0224] Exemplarily, after determining the MAC and the XRES, the AIoTF network element can delete the second key generated by the previous AIoTF network element, thereby saving storage space, reducing the risk of key leakage, and reducing the possibility of key cracking.
[0225] Figure 7 A specific method flow diagram for determining the MAC and the XRES is shown in the foregoing steps S601-S604.
[0226] As shown in Figure 7 , input Challenge1 and Challenge2; record the iteration number as 0; calculate the first variable value (state) = Challenge1 | Challenge2; determine whether the iteration number is less than N, if the iteration number is less than N, then divide the state into high M / 2-bit binary numbers and low M / 2-bit binary numbers; input the high M / 2-bit binary numbers into the third expansion algorithm to obtain the fifth expansion value, and input the low M / 2-bit binary numbers into the fourth expansion algorithm to obtain the sixth expansion value; calculate the seventh expansion value = the sixth expansion value, and the eighth expansion value = the fifth expansion value ^ the sixth expansion value; calculate the third variable value, i.e., the updated state = the seventh expansion value | the eighth expansion value; the iteration number becomes 1 after being incremented by 1, and the first iteration ends.
[0227] The third expansion algorithm includes calculating the seventh value = the high M / 2-bit binary number of the state ^ the second key, the eighth value = the seventh value * the first constant, the ninth value = ((the eighth value << 17) | (the eighth value >> 47)), and the fifth expansion value = the ninth value ^ Challenge2. The fourth expansion algorithm includes calculating the tenth value = the low M / 2-bit binary number of the state ^ the second key, the eleventh value = the tenth value * the second constant, the twelfth value = ((the eleventh value << 23) | (the eleventh value >> 41)), and the sixth expansion value = the twelfth value ^ Challenge1.
[0228] Then, continue to determine whether the iteration number is less than N, if the iteration number is less than N, then divide the state into high M / 2-bit binary numbers and low M / 2-bit binary numbers; input the high M / 2-bit binary numbers into the third expansion algorithm to obtain the fifth expansion value, and input the low M / 2-bit binary numbers into the fourth expansion algorithm to obtain the sixth expansion value; calculate the seventh expansion value = the sixth expansion value, and the eighth expansion value = the fifth expansion value ^ the sixth expansion value; calculate the third variable value, i.e., the updated state = the seventh expansion value | the eighth expansion value; the iteration number becomes 2 after being incremented by 1 again, and the second iteration ends.
[0229] Then, it is judged whether the iteration number is less than N or not until the iteration number is equal to or greater than N, XRES is calculated as a high M / 2-bit binary number of the third variable value, MAC is calculated as a low M / 2-bit binary number of the third variable value, and a final calculation result XRES and MAC are obtained. And the second key is deleted, and the calculation process is ended.
[0230] Through the above method, the AIoTF network element can determine the message authentication code MAC and the expected response XRES according to the second key, the first challenge value and the second challenge value, and the calculation process uses simple arithmetic operations and does not need complex function calculation, and only one calculation is needed to obtain MAC and XRES, which can reduce energy consumption and simplify the authentication process.
[0231] S312, the AIoTF network element verifies whether RES is equal to XRES.
[0232] Wherein XRES is calculated by the AIoTF network element in step S311, and RES is received by the AIoTF network element in step S310 from the second device in the first response.
[0233] If RES=XRES, the first device is authenticated successfully, otherwise the first device fails to be authenticated.
[0234] S313, the AIoTF network element sends a fourth request to the second device, and correspondingly, the second device receives the fourth request from the AIoTF network element.
[0235] Wherein, the fourth request is used to trigger the bidirectional authentication of the AIoTF network element and the first device.
[0236] Illustratively, the fourth request can be an inventory request, and the inventory request is used to trigger the bidirectional authentication of the AIoTF network element and the first device.
[0237] Illustratively, the fourth request can include the first device ID and the MAC.
[0238] S314, the second device sends a fifth request to the first device, and correspondingly, the first device receives the fifth request from the second device.
[0239] Wherein, the fifth request can be the same as the fourth request, or the fifth request can be different from the fourth request, that is, the second device processes the fourth request to obtain the fifth request, for example, the fifth request can include more contents than the fourth request. Or the second device can directly forward the fourth request.
[0240] S315, the first device verifies whether the MAC is equal to XMAC.
[0241] Wherein, XMAC is calculated by the first device in step S308, and MAC is received by the first device from the second device in step S314, which is carried in the third request.
[0242] If MAC=XMAC, the AIoTF network element is authenticated successfully, otherwise the AIoTF network element is authenticated unsuccessfully.
[0243] S316, the first device sends a third response to the second device, and correspondingly, the second device receives the third response from the first device.
[0244] Wherein, the third response is used to indicate that the authentication is successful.
[0245] Exemplarily, the third response can include the first device ID, indicating that the first device and the AIoTF network element are authenticated successfully.
[0246] S317, the second device sends a fourth response to the AIoTF network element, and correspondingly, the AIoTF network element receives the fourth response from the second device.
[0247] Wherein, the fourth response can be the same as the third response, or the fourth response can be different from the third response, that is, the second device processes the third response to obtain the fourth response, for example, the fourth response can include more contents than the third response. Or the second device can directly forward the third response.
[0248] S318, the AIoTF network element sends a fifth response to the AF network element, and correspondingly, the AF network element receives the fifth response from the AIoTF network element.
[0249] Wherein, the fifth response can be the same as the fourth response, or the fifth response can be different from the fourth response, that is, the AIoTF network element processes the fourth response to obtain the fifth response, for example, the fifth response can include more contents than the fourth response. Or the AIoTF network element can directly forward the fourth response.
[0250] The method of the embodiments of the present application can avoid that the initial key directly participates in the calculation in the authentication, and through the method of generating a temporary key and deleting the temporary key in time after use, the physical attack can be effectively resisted, and the security in the authentication process is improved; without using the counter, the problem of counter asynchronization is avoided, the first challenge value and the second challenge value are used to ensure the freshness of each authentication process, and the replay attack is prevented; and the RES, XRES, MAC and XMAC required in the authentication process only need 2 times of calculation, the algorithm used in the authentication process is all simple mathematical operation, without complex function operation, the energy consumption can be reduced, the authentication process is simplified, thereby adapting to the devices with low power consumption and low computing capacity in the environmental Internet of Things.
[0251] The schemes provided by the present application will be described in detail below in combination with corresponding flowcharts. It can be understood that the main devices (such as the first device, the AIoTF network element) in the illustrative flowcharts are taken as examples of the execution subject of the interaction to illustrate the method, but the present application does not limit the execution subject of the interaction. For example, the devices (such as the first device, the AIoTF network element) in the illustrative flowcharts can also be a chip, a chip system or a processor supporting the device to implement the method, and can also be a logic module or software capable of implementing all or part of the functions of the device.
[0252] It should be understood that Figures 1 to 7 The flowcharts or scenario diagrams shown are only for understanding and are not intended to limit the embodiments of the present application to the examples shown in the diagrams. In fact, based on the examples in the embodiments of the present application, those skilled in the art can make equivalent transformations to obtain more implementation manners. Figures 1 to 7
[0253] The above describes in detail the authentication method based on the environmental Internet of Things provided by the embodiments of the present application. The device embodiments of the present application will be described in detail below. Figures 1 to 7 It should be understood that the communication device of the embodiments of the present application can execute the various authentication methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments. Figures 8 to 9 It should be understood that the communication device of the embodiments of the present application can execute the various authentication methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.
[0254] In the above embodiments, the first device can execute part or all of the steps in the embodiments; the AIoTF network element can execute part or all of the steps in the embodiments. These steps or operations are only examples, and the embodiments of the present application can also execute other operations or variations of various operations. In addition, each step can be executed in a different order as presented in each embodiment, and it is possible that not all operations in the embodiments of the present application are executed. Moreover, the size of the serial number of each step does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0255] Figure 8 is a structural schematic diagram of the communication device provided by the embodiments of the present application. As shown in Figure 8 The communication device 800 can include a communication module 820. The communication module 820 can implement a corresponding communication function, which can be an internal communication function of the communication device 800 or a communication function of the communication device 800 and other devices. Optionally, the communication module 820 can also be referred to as a communication interface or a transceiver module. Optionally, the communication device 800 further includes a processing module 810. The processing module 810 can implement a corresponding processing function.
[0256] Optionally, the communication apparatus 800 further includes a storage module, which can be used to store instructions and / or data; the processing module 810 can read the instructions and / or data in the storage module, so that the communication apparatus 800 implements the foregoing method embodiments.
[0257] In a possible design, the communication apparatus 800 can correspond to the first device in the foregoing method embodiments, or a component (such as a circuit, a chip, or a chip system, etc.) configured in the first device. The communication apparatus 800 can be used to execute steps or procedures performed by the first device in any of the foregoing method embodiments.
[0258] For example, the communication module 820 is configured to obtain a first challenge value and an initial key. The first challenge value is randomly generated by an environment Internet of Things function (AIoTF) network element, and is used to verify the identity of the first device.
[0259] The processing module 810 is configured to determine a first key according to the first challenge value and the initial key.
[0260] The processing module 810 is configured to determine an expected message authentication code (XMAC) and a response (RES) according to the first key, the first challenge value, and a second challenge value. The second challenge value is randomly generated by the first device, and is used to verify the identity of the AIoTF network element. The XMAC is used for the first device to authenticate the identity of the AIoTF network element, and the RES is used for the AIoTF network element to authenticate the identity of the first device.
[0261] For example, the first challenge value is randomly generated by the AIoTF network element through a binary algorithm, and the second challenge value is randomly generated by the first device through the binary algorithm.
[0262] For example, the processing module 810 is configured to determine the XMAC and the RES according to the first key, the first challenge value, and the second challenge value, including:
[0263] The processing module 810 is configured to combine the first challenge value and the second challenge value to obtain a first variable value. The first variable value is composed of M-bit binary numbers.
[0264] The processing module 810 is configured to perform calculation on the first variable value by using an N-round iteration algorithm to determine a second variable value. The second variable value is composed of M-bit binary numbers.
[0265] The processing module 810 is configured to separate the second variable value to determine the XMAC and the RES.
[0266] In the N rounds of iteration algorithm, each round of iteration algorithm includes a first extension algorithm, a second extension algorithm and a first cross algorithm. The first extension algorithm is configured to output a first extension value according to the second challenge value and the first key. The second extension algorithm is configured to output a second extension value according to the first challenge value and the first key. The first cross algorithm is configured to output a second variable value according to the first extension value and the second extension value.
[0267] For example, the first extension algorithm includes that the processing module 810 is configured to perform exclusive-OR operation on the high M / 2 bits of the M-bit binary number and the first key to obtain a first value.
[0268] The processing module 810 is configured to obtain a second value according to the first value and an X-bit first constant.
[0269] The processing module 810 is configured to perform cyclic left shift operation on the second value to obtain a third value.
[0270] The processing module 810 is configured to perform exclusive-OR operation on the third value and the second challenge value to obtain the first extension value.
[0271] For example, the second extension algorithm includes that the processing module 810 is configured to perform exclusive-OR operation on the low M / 2 bits of the M-bit binary number and the first key to obtain a fourth value. The processing module 810 is configured to obtain a fifth value according to the fourth value and a Y-bit second constant. The processing module 810 is configured to perform cyclic right shift operation on the fifth value to obtain a sixth value. The processing module 810 is configured to perform exclusive-OR operation on the sixth value and the first challenge value to obtain the second extension value.
[0272] For example, the first cross algorithm includes that the processing module 810 is configured to obtain a third extension value and a fourth extension value; the third extension value is related to the second extension value, and the fourth extension value is related to the first extension value and the second extension value.
[0273] The processing module 810 is configured to combine the third extension value and the fourth extension value to obtain the second variable value.
[0274] For example, the processing module 810 is configured to separate the second variable value to determine the XMAC and the RES, including that the processing module 810 is configured to take the high M / 2 bits of the second variable value as the RES, and take the low M / 2 bits of the second variable value as the XMAC.
[0275] For example, the processing module 810 is configured to delete the first key.
[0276] The above is only an example, and the detailed steps or processes can refer to the description of the foregoing embodiments.
[0277] In a possible design, the communication apparatus 800 can correspond to the AIoTF network element in the above method embodiments, or a component (such as a circuit, a chip, or a chip system, etc.) configured in the AIoTF network element. The communication apparatus 800 can be used to execute the steps or processes performed by the AIoTF network element in any of the above method embodiments.
[0278] For example, the communication module 820 is configured to obtain a second challenge value and an initial key. The second challenge value is randomly generated by the first device, and is used to verify the identity of the AIoTF network element.
[0279] The processing module 810 is configured to determine a second key according to the first challenge value and the initial key.
[0280] The processing module 810 is configured to determine a message authentication code (MAC) and an expected response (XRES) according to the second key, the first challenge value, and the second challenge value. The first challenge value is randomly generated by the AIoTF network element, and is used to verify the identity of the first device. The MAC is used for the first device to authenticate the identity of the AIoTF network element, and the XRES is used for the AIoTF network element to authenticate the identity of the first device.
[0281] For example, the first challenge value is randomly generated by the AIoTF network element through a binary algorithm, and the second challenge value is randomly generated by the first device through the binary algorithm.
[0282] For example, the processing module 810 is configured to determine the MAC and the XRES according to the second key, the first challenge value, and the second challenge value, including: the processing module 810 is configured to combine the first challenge value and the second challenge value to obtain a first variable value, and the first variable value is composed of M-bit binary numbers.
[0283] The processing module 810 is configured to perform calculation on the first variable value by using an N-round iteration algorithm to determine a third variable value. The third variable value is composed of M-bit binary numbers.
[0284] The processing module 810 is configured to separate the third variable value to determine the MAC and the XRES.
[0285] In each round of the N-round iteration algorithm, a third expansion algorithm, a fourth expansion algorithm, and a second cross algorithm are included. The third expansion algorithm is configured to output a fifth expansion value according to the second challenge value and the second key, and the fourth expansion algorithm is configured to output a sixth expansion value according to the first challenge value and the second key. The second cross algorithm is configured to output the third variable value according to the fifth expansion value and the sixth expansion value.
[0286] For example, the third expansion algorithm includes: the processing module 810 is configured to perform exclusive-OR operation on the second key and high M / 2-bit binary numbers in the M-bit binary number to obtain a seventh value.
[0287] The processing module 810 is configured to obtain an eighth value according to the seventh value and an X-bit first constant.
[0288] The processing module 810 is configured to perform left cyclic shift processing on the eighth value to obtain a ninth value.
[0289] The processing module 810 is configured to perform XOR processing on the ninth value and the second challenge value to obtain a fifth extended value.
[0290] For example, the fourth extension algorithm includes that the processing module 810 is configured to perform XOR processing on the lower M / 2-bit binary number in the M-bit binary number and the second key to obtain a tenth value.
[0291] The processing module 810 is configured to obtain an eleventh value according to the tenth value and a Y-bit second constant.
[0292] The processing module 810 is configured to perform right cyclic shift processing on the eleventh value to obtain a twelfth value.
[0293] The processing module 810 is configured to perform XOR processing on the twelfth value and the first challenge value to obtain a sixth extended value.
[0294] For example, the second cross algorithm includes that the processing module 810 is configured to obtain a seventh extended value and an eighth extended value. The seventh extended value is related to the sixth extended value, and the eighth extended value is related to the fifth extended value and the sixth extended value.
[0295] The processing module 810 is configured to combine the seventh extended value and the eighth extended value to obtain a third variable value.
[0296] For example, the processing module 810 is configured to separate the third variable value to determine the MAC and the XRES, including that the processing module 810 is configured to take the higher M / 2-bit binary number of the third variable value as the XRES, and take the lower M / 2-bit binary number of the third variable value as the MAC.
[0297] For example, the processing module 810 is configured to delete the second key.
[0298] The above is only an example, and detailed steps or processes can refer to the descriptions of the foregoing embodiments.
[0299] Figure 9 FIG. 9 is another structural schematic diagram of a communication apparatus 900 provided by an embodiment of the present application. The communication apparatus 900 can be a chip, a chip system, or a processor, etc. of a first device or an AIoT network element, which implements the above method. The communication apparatus 900 can be used to implement the method described in the above method embodiments, and details can be referred to the descriptions in the above method embodiments.
[0300] As Figure 9As shown, the communication apparatus 900 can include one or more processors 910, which can also be referred to as processing units or processing modules, and can implement certain control functions. The processor 910 can be a general processor or a special purpose processor, for example, a baseband processor or a central processing unit. The baseband processor can be used to process communication protocols and communication data, and the central processing unit can be used to control the communication apparatus 900 (e.g., a base station, a baseband chip, a user, a user chip), execute software programs, and process data of the software programs.
[0301] In an alternative design, the processor 910 can also store instructions and / or data, which can be executed by the processor 910, so that the communication apparatus 900 performs the methods described in the above method embodiments.
[0302] In another alternative design, the communication apparatus 900 can include a communication interface 920 for implementing receiving and sending functions. For example, the communication interface 920 can be a transceiver circuit, an interface, an interface circuit, or a transceiver, etc. The transceiver circuit, the interface, the interface circuit, or the transceiver for implementing receiving and sending functions can be separate or integrated together. The above transceiver circuit, the interface, the interface circuit, or the transceiver can be used for reading and writing of codes / data, or the above transceiver circuit, the interface, the interface circuit, or the transceiver can be used for transmission or transfer of signals.
[0303] Optionally, the communication apparatus 900 can include one or more memories 930, which can store instructions executable by the processor 910, so that the communication apparatus 900 performs the methods described in the above method embodiments. Optionally, the memory 930 can also store data. Optionally, the processor 910 can also store instructions and / or data. The processor 910 and the memory 930 can be separately arranged or integrated together.
[0304] It should be understood that, in a possible design, the steps in the method embodiments provided in the present application can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being completed by a hardware processor, or completed by a combination of hardware and software modules in the processor. The software modules can be located in random access memories, flash memories, read-only memories, programmable read-only memories, or electrically erasable programmable memories, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0305] In an implementation, the communication apparatus 900 can correspond to the terminal in the above method embodiments, and can be configured to perform each step and / or procedure performed by the terminal in the above method embodiments. The processor 910 can be configured to execute instructions stored in the memory 930, and when the processor 910 executes the instructions stored in the memory, the processor 910 is configured to perform each step and / or procedure of the above method embodiments corresponding to the terminal.
[0306] In another implementation, the communication apparatus 900 can correspond to the network device in the above method embodiments, and can be configured to perform each step and / or procedure performed by the network device in the above method embodiments. The processor 910 can be configured to execute instructions stored in the memory 930, and when the processor 910 executes the instructions stored in the memory, the processor 910 is configured to perform each step and / or procedure of the above method embodiments corresponding to the network device.
[0307] It should be understood that the above processing apparatus can be one or more chips. For example, the processing apparatus can be a field programmable gate array (FPGA), can be an application specific integrated circuit (ASIC), can be a system on chip (SoC), can be a central processor unit (CPU), can be a network processor (NP), can be a digital signal processor (DSP), can be a micro controller unit (MCU), can be a programmable logic device (PLD), or other integrated chip.
[0308] It is to be appreciated that the memory in the embodiments of the application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. In one example, a non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. A volatile memory can be random access memory (RAM), which acts as external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct Rambus RAM (DR RAM). It is to be appreciated that the memory described herein is intended to include, without being limited to, these and any other suitable types of memory.
[0309] According to the method provided in the embodiments of the application, the application further provides a chip system, which comprises one or more processors, and is used for calling and running instructions stored in a memory, so that the method provided in the embodiments of the application is executed. The chip system can be composed of a chip, or can comprise a chip and other discrete devices.
[0310] The chip system can comprise an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
[0311] According to the method provided in the embodiments of the application, the application further provides a communication system, which comprises the network device and the terminal described above.
[0312] According to the method provided in the embodiments of the application, the application further provides a computer program product, which comprises computer program code, and when the computer program code is run on a computer, the computer is caused to execute each step or process executed by the network device and the terminal in any of the method embodiments.
[0313] According to the method provided in the embodiments of the present application, the present application further provides a computer readable storage medium, which stores program codes, and when the program codes are run on a computer, the computer is caused to perform each step or process executed by the network device and the terminal in any of the foregoing method embodiments.
[0314] The computer readable storage medium can be the volatile memory or the non-volatile memory described above, or can simultaneously include the volatile memory and the non-volatile memory.
[0315] In the embodiments of the present application, each term and English abbreviation is an exemplary example given for convenience of description, and should not constitute any limitation on the present application. The present application does not exclude the possibility of defining other terms capable of achieving the same or similar functions in the existing or future protocols.
[0316] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
[0317] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0318] It should be understood that in various embodiments of the present application, the size of the serial number of each process does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0319] In summary, the above description is only a preferred embodiment of the technical scheme of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. An authentication method based on the Internet of Things for the environment, characterized in that, Applied to a first device, the method includes: Obtain the first challenge value and the initial key; the first challenge value is randomly generated by the AIoTF network element of the Environmental Internet of Things (AIoTF) function and is used to verify the identity of the first device; The first key is determined based on the first challenge value and the initial key; Based on the first key, the first challenge value, and the second challenge value, the expected message authentication code XMAC and the response RES are determined; wherein, the second challenge value is randomly generated by the first device and is used to verify the identity of the AIoTF network element; the XMAC is used by the first device to authenticate the identity of the AIoTF network element, and the RES is used by the AIoTF network element to authenticate the identity of the first device.
2. The method according to claim 1, characterized in that, The first challenge value is randomly generated by the AIoTF network element using a binary algorithm, and the second challenge value is randomly generated by the first device using a binary algorithm.
3. The method according to claim 2, characterized in that, The step of determining XMAC and RES based on the first key, the first challenge value, and the second challenge value includes: The first challenge value and the second challenge value are combined to obtain the first variable value; the first variable value consists of an M-bit binary number. The first variable value is calculated using an N-round iterative algorithm to determine the second variable value; the second variable value consists of an M-bit binary number. The second variable value is separated to determine the XMAC and the RES; In the N-round iterative algorithm, each round of iterative algorithm includes a first expansion algorithm, a second expansion algorithm, and a first cross algorithm; the first expansion algorithm is used to output a first expansion value based on the second challenge value and the first key, the second expansion algorithm is used to output a second expansion value based on the first challenge value and the first key, and the first cross algorithm is used to output the second variable value based on the first expansion value and the second expansion value.
4. The method according to claim 3, characterized in that, The first extension algorithm includes: The high M / 2 bits of the M-bit binary number are XORed with the first key to obtain the first value; Based on the first value and the first constant X, the second value is obtained; The second value is then shifted left in a circular manner to obtain the third value; The third value is XORed with the second challenge value to obtain the first extended value.
5. The method according to claim 3 or 4, characterized in that, The second extended algorithm includes: The lower M / 2 bits of the M-bit binary number are XORed with the first key to obtain the fourth value; Based on the fourth value and the second constant of Y, the fifth value is obtained; The fifth value is then cyclically shifted to the right to obtain the sixth value; The sixth value is XORed with the first challenge value to obtain the second extended value.
6. The method according to claim 3 or 4, characterized in that, The first crossover algorithm includes: Obtain a third extended value and a fourth extended value; wherein the third extended value is related to the second extended value, and the fourth extended value is related to the first extended value and the second extended value; The third extended value and the fourth extended value are combined to obtain the second variable value.
7. The method according to claim 3 or 4, characterized in that, The step of separating the second variable value to determine the XMAC and the RES includes: The high M / 2 bits of the second variable value are taken as RES, and the low M / 2 bits of the second variable value are taken as XMAC.
8. The method according to any one of claims 1-4, characterized in that, The method further includes: Delete the first key.
9. An authentication method based on the Internet of Things for the environment, characterized in that, Applied to AIoTF network elements, the method includes: Obtain the second challenge value and the initial key; the second challenge value is randomly generated by the first device and is used to verify the identity of the AIoTF network element; The second key is determined based on the first challenge value and the initial key; Based on the second key, the first challenge value, and the second challenge value, a message authentication code (MAC) and an expected response (XRES) are determined; wherein, the first challenge value is randomly generated by the AIoTF network element and is used to verify the identity of the first device; the MAC is used by the first device to authenticate the identity of the AIoTF network element; and the XRES is used by the AIoTF network element to authenticate the identity of the first device.
10. The method according to claim 9, characterized in that, The first challenge value is randomly generated by the AIoTF network element using a binary algorithm, and the second challenge value is randomly generated by the first device using a binary algorithm.
11. The method according to claim 10, characterized in that, The step of determining the message authentication code MAC and the expected response XRES based on the second key, the first challenge value, and the second challenge value includes: The first challenge value and the second challenge value are combined to obtain the first variable value; the first variable value consists of an M-bit binary number. The first variable value is calculated using an N-round iterative algorithm to determine the third variable value; the third variable value consists of an M-bit binary number. The third variable value is separated to determine the MAC and the XRES; In the N-round iterative algorithm, each round of iterative algorithm includes a third expansion algorithm, a fourth expansion algorithm, and a second cross algorithm; the third expansion algorithm is used to output a fifth expansion value based on the second challenge value and the second key, the fourth expansion algorithm is used to output a sixth expansion value based on the first challenge value and the second key; the second cross algorithm is used to output the third variable value based on the fifth expansion value and the sixth expansion value.
12. The method according to claim 11, characterized in that, The third extension algorithm includes: The high M / 2 bits of the M-bit binary number are XORed with the second key to obtain the seventh value; Based on the seventh value and the first constant of the X-bit, the eighth value is obtained; The eighth value is then cyclically shifted to the left to obtain the ninth value; The ninth value is XORed with the second challenge value to obtain the fifth extended value.
13. The method according to claim 11 or 12, characterized in that, The fourth extension algorithm includes: The lower M / 2 bits of the M-bit binary number are XORed with the second key to obtain the tenth value; Based on the tenth value and the second constant of Y, the eleventh value is obtained; The eleventh value is cyclically shifted to the right to obtain the twelfth value; The sixth extended value is obtained by XORing the twelfth value with the first challenge value.
14. The method according to claim 11 or 12, characterized in that, The second crossover algorithm includes: Obtain the seventh and eighth extended values; wherein the seventh extended value is related to the sixth extended value, and the eighth extended value is related to the fifth and sixth extended values; The seventh extended value and the eighth extended value are combined to obtain the third variable value.
15. The method according to claim 11 or 12, characterized in that, The step of separating the third variable value to determine the MAC and the XRES includes: The high M / 2 bits of the third variable value are used as XRES, and the low M / 2 bits of the third variable value are used as MAC.
16. The method according to any one of claims 9-12, characterized in that, The method further includes: Delete the second key.
17. A communication device, characterized in that, The communication device includes a processor; the processor is configured to run a computer program or instructions to cause the method as described in any one of claims 1-8 to be performed, or to cause the method as described in any one of claims 9-16 to be performed.
18. A communication device, characterized in that, The communication device includes an interface circuit and a logic circuit; the interface circuit is used for inputting and / or outputting information; the logic circuit is used to perform the method as described in any one of claims 1-8, or to perform the method as described in any one of claims 9-16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions or programs that, when executed on a computer, cause the method as described in any one of claims 1-8 to be performed, or cause the method as described in any one of claims 9-16 to be performed.
20. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions; when some or all of the computer program or computer instructions are run on a computer, the method as described in any one of claims 1-8 is performed, or the method as described in any one of claims 9-16 is performed.
Citation Information
Patent Citations
Internet of Things identity authentication method and device and Internet of Things equipment
CN115276998A
Information sharing method, terminal apparatus, storage medium, and computer program product
WO2021027554A1