Lightweight encryption authentication method and related equipment for wireless sensor networks
By using physical unclonable functions and one-way hash functions to generate instantaneous keys in wireless sensor networks and combining them with multiple authentication mechanisms, the security and efficiency issues of resource-constrained sensor nodes are solved, and efficient data transmission and privacy protection are achieved.
Patent Information
- Application Number
- CN202411176817.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-08-26
AI Technical Summary
Existing wireless sensor network authentication methods rely on complex cryptographic mechanisms with high computational complexity, resulting in low efficiency on resource-constrained sensor nodes and unable to effectively ensure security and adapt to the resource constraints of wireless sensor networks.
A lightweight encryption authentication method is adopted, and a physical unclonable function and a one-way hash function are used to generate an instantaneous key. Combined with a multiple authentication mechanism, a session key is generated through mutual authentication between the gateway node, the user terminal and the sensor node to ensure data security and privacy protection.
It reduces computational complexity and communication overhead, improves the overall performance of wireless sensor networks, is suitable for resource-constrained sensor nodes, and ensures the security and privacy protection of data transmission.
Smart Images

Figure CN119136191B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of communication network technology, and in particular to a lightweight encryption authentication method, apparatus, device, and storage medium for a wireless sensor network. Background Art
[0002] Currently, with the development of Internet of Things (IoT) technology, wireless sensor networks (WSNs) have been widely used in environmental monitoring, industrial automation, smart home and other fields as an important means of data collection and monitoring. However, due to the resource-constrained characteristics and open communication environment of wireless sensor networks, they face challenges such as data security, privacy protection and identity authentication. Most of the existing wireless sensor network authentication methods rely on complex cryptographic mechanisms. Although these methods provide high security, they have low operating efficiency on resource-constrained sensor nodes due to high computational complexity and are not suitable for resource-constrained sensor nodes. Therefore, it is necessary to design an authentication method that can both ensure security and adapt to the resource constraints of wireless sensor networks. Summary of the Invention
[0003] The embodiment of the present application provides a lightweight encryption authentication method for wireless sensor networks, which can use physically unclonable functions and one-way hash functions to reduce computational complexity, simplify the authentication process, and reduce communication overhead to improve the overall performance of the system. It is suitable for resource-constrained sensor nodes and can effectively solve the security authentication problem of wireless sensor networks.
[0004] To achieve the above-mentioned purpose, the first aspect of an embodiment of the present application provides a lightweight encryption authentication method for a wireless sensor network, wherein the wireless sensor network includes a user terminal, a gateway node and a sensor node that are communicatively connected, and the method includes: the gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, respectively, and sends the sensor transient key, the user transient key, the preset sensor long-term key and the user long-term key to the user terminal and the sensor node, respectively; the user terminal obtains a user identity and user password data generated by the user, and sends the user identity to the gateway node to complete user registration; the sensor node obtains a sensor identifier and a sensor initial value, and sends the sensor identifier and the sensor initial value to the gateway node , to complete sensor registration; the user terminal authenticates the identity information currently input by the user based on the user identity identifier and the user password data, and performs mutual authentication between the user terminal, the gateway node and the sensor node based on the identity information, so as to send the sensor hash message authentication code and the user hash message authentication code to the sensor node according to the authentication result; the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code and the random number and timestamp generated by the gateway node, so as to obtain a session key according to the authentication result; the session key is shared among the user terminal, the gateway node and the sensor node, so as to exchange data among the user terminal, the gateway node and the sensor node based on the session key.
[0005] In some embodiments, the gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, including: a one-way hash function based on anti-collision h (.)Generate a random one-time random number R 1 and R 2. Use the physical unclonable function PUF to generate the challenge value C 1 and C 2 and the initialization vector φ 1 and φ 2, based on random numbers R 1 and R 2. Challenge value C 1 and C 2 and the initialization vector φ 1 and φ 2Generate sensor instant key T S and user transient key T M ;in, T S =h ( Enc k ( PUF 1( C 1)|| φ 1|| R 1)); T M = h ( Enc k ( PUF 2( C 2)|| φ 2|| R 2)).
[0006] In some embodiments, the sensor node obtains a sensor identifier and a sensor initial value, and sends the sensor identifier and the sensor initial value to the gateway node to complete sensor registration, including: the sensor node obtains a sensor identifier SID j and sensor initial value IV S and share the sensor identifier with the gateway node through a secure channel SID j and the initial value of the sensor IV S The gateway node sends the sensor initial value through a secure channel IV S , the parameter set formed by the sensor long-term key and the user long-term key is sent to the memory of the sensor node, so that the sensor node sets the cycle counter c Set to 1.
[0007] In some embodiments, the user terminal authenticates the identity information currently input by the user based on the user identity identifier and the user password data, including: the user terminal receives the identity identifier input by the user UID i * and password PW i * If the user terminal verifies the identity of the user input UID i * and password PW i * The user identity cached by the user terminal UID i If the user password data PWi matches, the user is successfully authenticated; if the user is successfully authenticated, the user terminal sends the identity identifier to the gateway node. UIDi * .
[0008] In some embodiments, the mutual authentication is performed between the user terminal, the gateway node and the sensor node based on the identity information, so as to send the sensor hash message authentication code and the user hash message authentication code to the sensor node according to the authentication result, including: the gateway node authenticates the user based on the user identity information. UID i Verify the identity UID i * , in the case of successful verification, generate a random number R 3. Based on random numbers R 3 and the user identification UID i Get authentication parameters A 1=( R 3 ||UID i ), and sends to the sensor node A 1 corresponding to the authentication response; the sensor node retrieves the counter c And the sensing instantaneous key T S and the user's transient key T M , and determine the timestamp T 1, to calculate authentication parameters A 2=( SID j ||c||T 1 || ( T 1)|| ( T 1 ||UID i ||SID j ||)) and sends it to the gateway node A 2 corresponding authentication message; the gateway node according to the R 3 and stated A 2Calculating Security Tokens A 4=( R 3|| c || ( T 1)|| T 1) and send the security token to the user terminal A 4; The user terminal obtains the counter c The corresponding sensor instantaneous key T S ,based on TS Verify the security token A 4. If the verification is successful, the timestamp is obtained. T 1 and the random number R 3 news A 5=( ( T 1) ||R 3) and send A 5 to the gateway node; the gateway node calculates the user identity UID i , the identity of the sensor node SID j , the counter c , the random number R 3 and the timestamp T Authentication message 1 B 1, and send the B 1 to the user terminal; the user terminal obtains the counter c The corresponding user instant key T M ,based on T M Verify the B 1. If the verification is successful, send the timestamp T 1. The user identity UID i , the identity of the sensor node SID j , the counter c and the random number R 3 authentication message B 2 to the gateway node; the gateway node is based on the B 2. Sensor Hash Message Authentication Code and user hashed message authentication code Sent to the sensor node.
[0009] In some embodiments, the method further includes: the sensor node incrementing the counter each time the authentication process is successfully completed c value.
[0010] In some embodiments, the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, and the random number and timestamp generated by the gateway node to obtain a session key according to the authentication result, including: the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, the random number R3 and the timestamp T1, so that the sensor node calculates the session key δ ( c ), wherein the session key δ ( c ) is calculated as: δ ( c )= h ( ( T 1|| R 3))⊕ h ( ( T 1|| UID i || SID j || R 3));
[0011] in, B 3= h ( T 1 ||Φ ( c )), Φ ( c )= ( T 1 ||R 3)⊕ ( T 1 ||UID i ||SID j ||R 3).
[0012] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application provides a lightweight encryption authentication device for a wireless sensor network, the device comprising: a system setting module, used to control the gateway node to generate a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, respectively, and send the sensor transient key, the user transient key, the preset sensor long-term key and the user long-term key to the user terminal and the sensor node, respectively; a registration module, used to control the user terminal to obtain a user identity and user password data generated by the user, and send the user identity to the gateway node to complete user registration; and used to control the sensor node to obtain a sensor identifier and a sensor initial value, and send the sensor identifier and the sensor initial value to the gateway node to complete sensor registration; a login authentication module, Used to control the user terminal to authenticate the identity information currently input by the user based on the user identity identifier and the user password data, and to perform mutual authentication between the user terminal, the gateway node and the sensor node based on the identity information, so as to send the sensor hash message authentication code and the user hash message authentication code to the sensor node according to the authentication result; a key negotiation module is used to control the sensor node to perform key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code and the random number and timestamp generated by the gateway node, so as to obtain a session key according to the authentication result; so that the session key is shared among the user terminal, the gateway node and the sensor node, and data is exchanged between the user terminal, the gateway node and the sensor node based on the session key.
[0013] To achieve the above-mentioned objectives, the third aspect of an embodiment of the present application provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; and when at least one of the programs is executed by at least one of the processors, a lightweight encryption authentication method for a wireless sensor network as described in any one of the first aspects is implemented.
[0014] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the lightweight encryption authentication method for a wireless sensor network as described in any one of the fourth aspects.
[0015] The embodiment of the present application provides a lightweight encryption authentication method, device, equipment and storage medium for a wireless sensor network. The method is applied to a wireless sensor network, which is composed of a user terminal, a gateway node and a sensor node. These nodes are connected by wireless communication. The method includes: a key generation and distribution stage, in which the gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, respectively, and sends the sensor transient key, the user transient key, the preset sensor long-term key and the user long-term key to the user terminal and the sensor node, respectively; a registration stage, in which the user terminal obtains a user identity and user password data generated by the user, and sends the user identity to the gateway node to complete user registration, and the sensor node obtains a sensor identifier and a sensor initial value, and sends the sensor identifier and the sensor initial value to the gateway node to complete sensor registration; a login authentication stage, in which the user terminal authenticates the identity information currently input by the user based on the user identity and user password data, and performs mutual authentication between the user terminal, the gateway node and the sensor node based on the identity information , so that the sensor hash message authentication code and the user hash message authentication code are sent to the sensor node according to the authentication result; in the key negotiation stage, the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code and the random number and timestamp generated by the gateway node to obtain the session key according to the authentication result, and then share the session key between the user terminal, the gateway node and the sensor node to exchange data between the user terminal, the gateway node and the sensor node based on the session key; it can be understood that the one-way hash function is used to encrypt and hash data to ensure the irreversibility of the data, and the physical unclonable function generates a unique key based on the characteristics of the hardware and is difficult to copy. Therefore, this application can ensure the security of data transmission by combining transient keys and long-term keys, and adopts a multiple authentication mechanism, including local verification of the user terminal, mutual authentication between the gateway node and the user terminal and sensor node, to ensure that only legitimate users and sensors can access the network, and then through session key negotiation based on timestamps and random numbers, ensure that each communication has a new key, thereby enhancing the security of the system. In summary, through the above-mentioned lightweight encryption authentication mechanism, this application can effectively solve the security issues in wireless sensor networks and is suitable for sensor nodes with limited resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the architecture of a wireless sensor network provided in one embodiment of the present application;
[0017] Figure 2 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0018] Figure 3A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0019] Figure 4 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0020] Figure 5 A flowchart for obtaining visually associated word units and image mask position information provided in an embodiment of the present application;
[0021] Figure 6 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0022] Figure 7 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0023] Figure 8 A timing flow chart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0024] Figure 9 A timing flow chart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application;
[0025] Figure 10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0027] In some embodiments, although the system diagrams illustrate functional module divisions and the flowcharts illustrate logical sequences, in some cases, the steps shown or described may be performed in a sequence that differs from the module divisions in the system or the sequence in the flowcharts. The terms "first," "second," and so on in the specification, claims, and drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0028] In addition, unless otherwise clearly specified and limited, the term "connection / connection" should be understood in a broad sense. For example, it can be a fixed connection or a movable connection, a detachable connection or a non-detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or mutual communication; it can be a direct connection or an indirect connection through an intermediate medium.
[0029] In the description of the embodiments of the present application, the reference terms "one embodiment / implementation", "another embodiment / implementation" or "certain embodiments / implementations", "in the above-mentioned embodiments / implementations" and the like mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least two embodiments or implementations disclosed in the present application. In the disclosure of this application, the schematic representation of the above terms does not necessarily refer to the same embodiment or implementation. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that in the flowchart.
[0030] Currently, with the development of Internet of Things (IoT) technology, wireless sensor networks (WSNs) have been widely used in environmental monitoring, industrial automation, smart home and other fields as an important means of data collection and monitoring. However, due to the resource-constrained characteristics and open communication environment of wireless sensor networks, they face challenges such as data security, privacy protection and identity authentication. Most of the existing wireless sensor network authentication methods rely on complex cryptographic mechanisms. Although these methods provide high security, they have low operating efficiency on resource-constrained sensor nodes due to high computational complexity and are not suitable for resource-constrained sensor nodes. Therefore, it is necessary to design an authentication method that can both ensure security and adapt to the resource constraints of wireless sensor networks.
[0031] Based on this, the present application provides a lightweight encryption authentication method for a wireless sensor network, including: the gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, respectively, and sends the sensor transient key, the user transient key, the preset sensor long-term key and the user long-term key to the user terminal and the sensor node, respectively; after the user terminal and the sensor node are registered, the user terminal authenticates the identity information currently input by the user, and performs mutual authentication between the user terminal, the gateway node and the sensor node based on the identity information, so as to send the sensor hash message authentication code and the user hash message authentication code to the sensor node according to the authentication result, so that the sensor node and the gateway node perform key negotiation authentication to obtain a session key, and then wireless sensor network communication can be carried out based on the session key, effectively solving the security authentication problem of the wireless sensor network.
[0032] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0033] refer to Figure 1 , Figure 1A schematic diagram of the architecture of a wireless sensor network provided in an embodiment of the present application. A first aspect of an embodiment of the present application provides a lightweight encryption authentication method for a wireless sensor network, wherein the wireless sensor network includes a user terminal, a gateway node, and a sensor node connected in communication; wherein, it can be understood that a wireless sensor network (WSN) is a distributed network composed of multiple sensor nodes for monitoring and collecting data in an environment or a specific area, and a WSN includes the following three main entities: a sensor node (SensorNode, S j ):These nodes are distributed in the area of interest and are used to collect data (such as environmental parameters such as temperature and humidity) and send them to the central node or other nodes; Gateway Node (GWN): As a bridge between sensor nodes and external networks, the gateway node is responsible for processing and forwarding data, as well as performing authentication and other security-related tasks; User End (UserEnd, MD i ):Usually refers to end users or applications that want to access the data collected by sensor nodes. U i Available via mobile devices MD i (such as a smartphone or tablet) to access S j data.
[0034] In some embodiments, Figure 1 The network model of WSN is shown. In this model, the user end communicates with the sensor node through the mobile device. There is no direct communication between the user end and the sensor node, but it is relayed through the gateway node. In addition, S j and MD i Both embed a physical unclonable function that acts as a hardware-based cryptographic primitive during authentication. The GWN is deployed as a cryptographic primitive based on some long-term master key. Ψ S and Ψ U Generates a transient key pair that is unique to each session and is derived from the master key and a preset Trivium stream cipher initial value.
[0035] It is understood that a Physical Unclonable Function (PUF) is a hardware-based cryptographic primitive that can use the physical characteristics of hardware (such as tiny differences in the manufacturing process) to generate a unique key or identifier for sensor nodes. S j and user side MDi Both are embedded with PUF for key generation in the authentication process, while the Gateway Node (GWN) is responsible for generating and managing transient key pairs, which are derived from the long-term master key. Ψ S and Ψ U and the initial value of the Trivium stream cipher; further, the protocol execution process corresponding to this application may include the following stages: a system setup stage, in which the gateway node selects a collision-resistant one-way hash function and generates a random number (nonce) and an initialization vector (IV) for generating a transient key pair; a user and sensor registration stage, in which users and sensor nodes need to register before they can participate in communication. The user generates an identity identifier (UIDi) and a password (PW) and shares the identity identifier with the gateway node through a secure channel. The sensor node selects its unique identifier (SIDj) and initial value (IVS) and sends them to the gateway node; in the login and authentication stage, the user enters identity information through the mobile device, the device verifies the user's identity, and mutually authenticates with the gateway node and the sensor node; in the key negotiation stage, once the user and sensor node are authenticated, they negotiate a session key for encrypted communication; in the data exchange stage, the session key is shared between the user end, the gateway node, and the sensor node to ensure the security of data transmission.
[0036] Through these steps, the present application can ensure data security and privacy protection while reducing computational, energy, and communication costs to be suitable for resource-constrained wireless sensor network environments.
[0037] refer to Figure 2 , Figure 2 This is a flowchart of a lightweight encryption authentication method for a wireless sensor network provided in an embodiment of the present application, the method comprising:
[0038] Step S210: The gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, and sends the sensor transient key, the user transient key, the preset sensor long-term key, and the user long-term key to the user terminal and the sensor node, respectively.
[0039] In step S220, the user terminal obtains the user identity and user password data generated by the user, and sends the user identity to the gateway node to complete the user registration; the sensor node obtains the sensor identity and sensor initial value, and sends the sensor identity and sensor initial value to the gateway node to complete the sensor registration;
[0040] Step S230: the user terminal authenticates the identity information currently input by the user based on the user identity identifier and the user password data, and performs mutual authentication between the user terminal, the gateway node, and the sensor node based on the identity information, so as to send the sensor hash message authentication code and the user hash message authentication code to the sensor node according to the authentication result;
[0041] In step S240, the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, and the random number and timestamp generated by the gateway node to obtain a session key according to the authentication result; the session key is shared between the user end, the gateway node, and the sensor node to exchange data among the user end, the gateway node, and the sensor node based on the session key.
[0042] Among them, a one-way hash function is an encryption function used to generate a fixed-length output (hash value), and it is difficult to reverse the original input from the hash value, so that the gateway node uses the one-way hash function to generate a transient key; a physical unclonable function (PUF) is a hardware-based encryption primitive that can use tiny differences in the device manufacturing process to generate a unique key or identifier for generating a transient key; a sensor transient key ( T S ) and the user's transient key ( T M ): The transient key is a one-time key used to protect the security of a specific session. The gateway node generates these two keys using PUF and a one-way hash function; the sensor long-term key ( Ψ S ) and the user's long-term key ( Ψ U ): Long-term keys are pre-configured keys used to generate transient keys and remain unchanged throughout their lifecycle.
[0043] Among them, the user identity ( UID i ) and user password data ( PW i ) generates data for users so that they can register and authenticate themselves; sensor identification ( SID j ) and initial sensing value ( IV S ): The sensor node generates this data for registration, the sensor identity is the unique identifier of the sensor node, and the sensor initial value is used to generate the transient key.
[0044] In some embodiments, identity authentication is the process by which the user verifies whether the identity information entered by the user is correct. Mutual authentication is the process by which the user, the gateway node, and the sensor node authenticate each other to ensure that all parties are legitimate participants. ) and the user hashed message authentication code ( ) is an authentication code generated based on a hash function, used to ensure the integrity of the data and the authenticity of the source; the random number ( R 3) and timestamp ( T 1) is a random value generated by the gateway node to ensure the uniqueness of each session and prevent replay attacks; the session key (δ(c)) is a temporary key used to encrypt and decrypt data for a specific session. The session key is determined between the sensor node and the gateway node through a key negotiation process.
[0045] In some embodiments, through the key negotiation and authentication process, the sensor node and the gateway node negotiate a session key to ensure the secure transmission of data. The entire process uses lightweight encryption algorithms and hardware-based encryption primitives (such as PUF) to reduce computational complexity while ensuring the security of the wireless sensor network. Through these steps, the user end, gateway node and sensor node can securely exchange data while protecting the privacy and integrity of the data.
[0046] It is understandable that this application can ensure the security of data transmission by combining transient keys and long-term keys, and adopt a multiple authentication mechanism, including local verification of the user end, mutual authentication between the gateway node and the user end and sensor nodes, to ensure that only legitimate users and sensors can access the network. Furthermore, through session key negotiation based on timestamps and random numbers, it ensures that each communication has a new key, thereby enhancing the security of the system. In summary, through the above-mentioned lightweight encryption authentication mechanism, this application can effectively solve the security problems in wireless sensor networks and is suitable for resource-constrained sensor nodes.
[0047] refer to Figure 3 , Figure 3 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application; in some embodiments, a gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, respectively, including:
[0048] Step S310: One-way hash function based on anti-collision h (.)Generate a random one-time random number R 1 and R 2;
[0049] Step S320: Generate a challenge value using the physical unclonable function PUF C1 and C 2 and the initialization vector φ 1 and φ 2, based on random numbers R 1 and R 2. Challenge value C 1 and C 2 and the initialization vector φ 1 and φ 2Generate sensor instant key T S and user transient key T M ;in, T S = h ( Enc k ( PUF 1( C 1)|| φ 1|| R 1)); T M = h ( Enc k ( PUF 2( C 2)|| φ 2|| R 2)).
[0050] Among them, the collision-resistant one-way hash function h (.) It has one-way and anti-collision properties. One-way means that it is difficult to infer the input from a given output; anti-collision means that it is difficult to find two different inputs that produce the same output. This ensures the security of the hash function; one-time random number R 1 and R 2 is used to create a transient key, which helps ensure that each key generated is unique, thereby improving security.
[0051] Among them, the challenge values C1 and C2 are random values generated by PUF and used in the subsequent key generation process. They can be regarded as "questions" to PUF, and PUF will generate corresponding "answers" based on its internal physical properties; initialization vector φ 1 and φ 2 is used in encryption algorithms to ensure that even identical plaintexts do not produce identical ciphertexts. In this context, φ 1 and φ 2 is used to add additional randomness to make the generated key more secure; encryption function Enc k () can encrypt the input by using a long-term key k, which can refer to the sensor long-term key or the user long-term key mentioned previously.
[0052] In some embodiments, T S = h ( Enc k ( PUF 1( C 1)|| φ 1|| R 1)); T M = h ( Enc k ( PUF 2( C 2)|| φ 2|| R 2)); wherein, the symbol || represents the concatenation operation of data, that is, connecting multiple data segments together to form a continuous data stream. The above formula shows that the present application can combine the output of PUF, the initialization vector and the random number to generate a transient key, and further process it using the encryption function and the hash function to obtain the final transient key; through the above steps, the gateway node can generate a one-time sensor transient key and a user transient key, which will be used in subsequent secure communication processes. Since the output of PUF is based on hardware characteristics, each sensor or user device will generate a different key, which increases the overall security of the system.
[0053] refer to Figure 4 , Figure 4 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application; in some embodiments, a sensor node obtains a sensor identifier and a sensor initial value, and sends the sensor identifier and the sensor initial value to a gateway node to complete sensor registration, including:
[0054] Step S410: The sensor node obtains the sensor identifier SID j and sensor initial value IV S and share sensor identification with gateway nodes through secure channels SID j and sensor initial value IV S ;
[0055] Step S420: The gateway node sends the initial value of the sensor to the IV S , sensor long-term key and user long-term key to form a parameter set that is sent to the memory of the sensor node so that the sensor node will set the cycle counter c Set to 1.
[0056] In some embodiments, the sensor identification SID j It is the unique identifier of the sensor node, which is used to uniquely identify the sensor node in the network. IV S It is an initial value used by sensor nodes during the registration process to generate instantaneous keys; secure channels are used to ensure sensitive information (such as SID j and IV S ) security during transmission.
[0057] In some embodiments, the sensor long-term key is used to generate the transient key and remains unchanged throughout the entire life cycle. The user long-term key is used to generate the transient key of the user end and remains unchanged throughout the entire life cycle. Cycle counter c: This is a counter used to track the number of authentication processes between the sensor node and the gateway node. After each successful authentication, the value of the counter will increase.
[0058] refer to Figure 5 , Figure 5 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application; in some embodiments, a user terminal authenticates the identity information currently input by the user based on the user identity identifier and user password data, including:
[0059] Step S510: The user terminal receives the identity input by the user UID i * and password PW i * ;
[0060] Step S520: If the user terminal verifies the identity input by the user UID i * and password PW i * User ID cached by the client UID i and user password data PW i If they match, the user is successfully authenticated;
[0061] Step S530: If the user is successfully authenticated, the user sends the identity token to the gateway node. UID i * .
[0062] In some embodiments, UID i* It is an identifier entered by the user, used to uniquely identify the user in the network. PW i * It is the password data entered by the user, used to verify the user's identity. If the user terminal verifies that the user's input identity ID UIDi and password PWi are the same as the user's cached user identity ID UID i and user password data PW i If the user is successfully authenticated, the user sends the identity to the gateway node. UID i * ; It can be understood that the sensor registration process ensures that the sensor node can securely join the network and establishes the necessary trust relationship with the gateway node. The user authentication process ensures that only legitimate users can access network resources and services. By using secure channels and pre-configured long-term keys, these steps improve the security of the entire system. The use of loop counters helps prevent replay attacks and ensures the correctness of the authentication process.
[0063] refer to Figure 6 , Figure 6 A flowchart of a lightweight encryption authentication method for a wireless sensor network provided in one embodiment of the present application; in some embodiments, mutual authentication is performed between a user terminal, a gateway node, and a sensor node based on identity information, and a sensor hash message authentication code and a user hash message authentication code are sent to the sensor node based on the authentication result, including:
[0064] Step S610: The gateway node uses the user identity UID i Verify identity UID i * , in the case of successful verification, generate a random number R 3. Based on random numbers R 3 and user identity UID i Get authentication parameters A 1=( R 3 ||UID i ) and sends it to the sensor node A 1 corresponding to the authentication response;
[0065] Step S620: The sensor node retrieves the counter c and sensor instant key T S and user transient key T M, and determine the timestamp T 1, to calculate authentication parameters A 2=( SID j ||c||T 1 || ( T 1)|| ( T 1 ||UID i ||SID j ||)) and sends it to the gateway node A 2 corresponding authentication message;
[0066] Step S630, the gateway node R 3 and A 2Calculating Security Tokens A 4=( R 3|| c || ( T 1)|| T 1) and send a security token to the user A 4;
[0067] Step S640: The user terminal obtains a counter c Corresponding sensor instant key T S ,based on T S Verifying security tokens A 4. If the verification is successful, get the timestamp T 1 and random numbers R 3 news A 5=( ( T 1) ||R 3) and send A 5 to the gateway node;
[0068] Step S650: The gateway node calculates the user identity UID i , sensor node identity SID j ,counter c , random numbers R 3 and timestamp T Authentication message 1 B 1, and send B 1 to the user end;
[0069] Step S660: The user terminal obtains the counter c Corresponding user instant key TM ,based on T M verify B 1. If the verification is successful, send a T 1. User identity UID i , sensor node identity SID j ,counter c and random numbers R 3 authentication message B 2 to the gateway node;
[0070] Step S670: The gateway node is based on B 2. Sensor Hash Message Authentication Code and user hashed message authentication code Sent to the sensor node.
[0071] In some embodiments, corresponding to step S610, the gateway node checks the identity sent by the user terminal UID i * Is it consistent with the known legitimate user identity? UID i Once the verification is successful, the gateway node generates a random number R 3, and use random numbers R 3 and user identity UID i Combined into authentication parameters A 1=( R 3 ||UID i ), so that the gateway node will authenticate the parameters A 1 is sent to the sensor node.
[0072] In some embodiments, corresponding to step S620, the sensor node reads the current cycle counter c The sensor node generates the current timestamp T 1. Use the identity of the sensor node SID j ,counter c , timestamp T 1 and user identity UID i To construct authentication parameters A 2, so that the sensor node will authenticate the parameters A 2 is sent to the gateway node.
[0073] In some embodiments, corresponding to step S630, the gateway node uses the previously generated random number R 3. Counterc and timestamp T 1 to create a security token A 4, so that the gateway node will be the security token A 4 is sent to the user end.
[0074] In some embodiments, corresponding to step S640, the user terminal uses the current counter c Corresponding sensor instant key T S To verify the security token A 4. If the verification is successful, the user side constructs the message A 5 and sent to the gateway node.
[0075] In some embodiments, corresponding to step S650, the gateway node calculates the user identity UID i , sensor node identity SID j ,counter c , random numbers R 3 and timestamp T Authentication message 1 B 1, and send B 1 to the user end, so that the gateway node uses the previous various parameters to construct the authentication message B 1, and the authentication message B 1 is sent to the user end.
[0076] In some embodiments, corresponding to step S660, the user terminal uses the current counter c Corresponding user instant key T M To verify the authentication message B 1. If the verification is successful, the user terminal constructs the authentication message B 2 and sent to the gateway node.
[0077] In some embodiments, corresponding to step S670, the gateway node receives the authentication message B 2. Build and send the hashed message authentication code to the sensor node.
[0078] It can be understood that the mutual authentication process mentioned above ensures that the user terminal, gateway node and sensor node can communicate securely by using random numbers. R 3. Timestamp T 1. User identity UID i and the identity of the sensor node SID j and other parameters, as well as by using various transient keys T S andT M To verify these parameters, this process provides authentication and data integrity.
[0079] refer to Figure 7 , Figure 7 This is a flowchart of a lightweight encryption authentication method for a wireless sensor network provided in an embodiment of the present application; in some embodiments, the method further includes:
[0080] Step S710: The sensor node increases the counter each time the authentication process is successfully completed. c value.
[0081] It is understandable that the sensor node will set the counter after each successful completion of the authentication process. c The value of the counter increases by 1. c The use of helps prevent replay attacks and ensures the timeliness of communications.
[0082] In some embodiments, the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, and the random number and timestamp generated by the gateway node to obtain the session key according to the authentication result, including: the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, the random number R3 and the timestamp T1, so that the sensor node calculates the session key δ ( c ), where the session key δ ( c ) is calculated as: δ ( c )= h ( ( T 1|| R 3))⊕ h ( ( T 1|| UID i || SID j || R 3)), where B 3= h ( T 1 ||Φ ( c )), Φ ( c )= ( T 1 ||R 3)⊕ ( T 1 ||UID i ||SID j ||R 3).
[0083] In some embodiments, the sensor node receives the sensor hash message authentication code, the user hash message authentication code, the random number and the timestamp from the gateway node to calculate the token δ ( c ), the token is timestamped T 1 and random numbers R 3 XOR (⊕) timestamp T 1. User identity UID i , sensor node identity SID j and random numbers R 3-character string.
[0084] Among them, the sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, user hash message authentication code, random number and timestamp. The sensor node uses the timestamp, random number, user identity and sensor node identity to calculate the session key δ(c). Here, the ⊕ operator represents the bitwise XOR operation, which ensures that even if part of the information is leaked, the key is still difficult to crack. In addition, the hash function h (.) can ensure that even a slight change in the original data will produce a completely different output, enhancing the security of the key.
[0085] It can be understood that the session key δ(c) is calculated based on the current timestamp and random number, which ensures that even if the future session key is leaked, the past session key cannot be inferred; similarly, even if the past session key is leaked, the future session key cannot be inferred because each new session will generate a new timestamp and random number, and since each session contains a new timestamp, the old session data cannot be reused; in addition, the calculation of the hashed message authentication code depends on the timestamp and token, which ensures the integrity and source authentication of the message.
[0086] In summary, in this way, a secure session key δ(c) can be established between the sensor node and the gateway node through the key negotiation and authentication process. The key is calculated based on the current timestamp, random number, user identity and sensor node identity, which ensures efficient and secure communication even in resource-constrained environments.
[0087] refer to Figure 8 , Figure 8 A timing flow chart of a lightweight encryption authentication method for a wireless sensor network provided in an embodiment of the present application; in some embodiments, Figure 8 Corresponding to the system setup phase and registration phase in this application, corresponding to Figure 8 ,System Setup Phase, this application is executed by the GWN through the setup procedure, ,whose goal is to generate security values that can be deployed in the ,registration and authentication phases.,The GWN first selects h (.) as a collision-resistant one-way hash function. Next, it generates two random nonce numbers: R 1 and R 2. After that, it uses the PUF challenge C 1 and C 2 and the initialization vector φ 1 and φ 2, to export separately S j and MD i The instant key: T S = h ( Enc k ( PUF 1( C 1)|| φ 1|| R 1)) and T M = h ( Enc k ( PUF 2( C 2)|| φ 2|| R 2)). Finally, it will T S and T M Publish to MD i and S j ,like Figure 2 Finally, the master key is sent to S j and U i .
[0088] During the registration phase, users U i Generate a unique identity UID i and password PW i These security parameters are then cached in MD i 's memory. Thereafter, MD iShared with GWN via secure channel UID i Similarly, sensor nodes S j Also select its unique identifier SID j and initial value IV S , the unique identifier SID j and initial value IV S It is also shared with the GWN through a secure channel. Figure 8 As shown, the parameter set {Ψ S ,Ψ U ,IV S} is loaded into S j In the memory of the sensor node S j Cycle Counter c Set to 1.
[0089] refer to Figure 9 , Figure 9 A timing flow chart of a lightweight encryption authentication method for a wireless sensor network provided in an embodiment of the present application; in some embodiments, Figure 9 Corresponding to the login and authentication phase and key negotiation phase in this application, the purpose of these phases is to allow MD i For users U i Authentication and promotion MD i , GWN and S j The following steps detail these login and authentication procedures:
[0090] Step 1: U i Towards MD i supply UID i * and PW i * ,Then MD i Confirm whether UID i * ≟ UID i . In addition, it checks whether PW i** ≟ PW i * , so that the login session is abandoned when authentication fails. Otherwise, U i Will be MD i Successful authentication. After that, MD i Send authentication message to GWN via public channel Auth 1= {UID i *}, as shown in Figure 3.
[0091] Step 2: From MD i Get Message Auth 1, GWN confirms whether UID i * ≟ UID i Basically, if the authentication fails, the session is terminated. Otherwise, it generates a random one-time nonce R 3 and export parameters A 1= ( R 3 ||UID i ). Finally, it compiles the authentication response Auth 2= {A 1} and forwarded to S j .
[0092] Step 3: After receiving the Auth 2 after, S j Will retrieve the counter c and the equivalent transient key pair T S and T M . It will then establish the current timestamp T 1 and calculate the value A 2= ( SID j ||c||T 1 |||) ( T 1)|| ( T 1 ||UID i | |SID j ||)). Finally, it compiles the message Auth 3={A 2} and send it to GWN.
[0093] Step 4: Get Auth 3:00, GWN calculates security token A 4= ( R 3|| c || ( T 1)|| T 1) , The security token is transmitted via a public channel in the message Auth 4 = {A 4 } Forward to MD i .
[0094] Step 5: Get from GWN Auth After 4, MD i Retrieve and receive counters c The corresponding instant key T S Use this T S , which verifies the received T 1. If verification fails, the session is terminated. Otherwise, it exports A 5= ( ( T 1) ||R 3) and in the message Auth 5= {A 5} and sends it back to the GWN. Finally, it will c Add 1.
[0095] Step 6: Get Auth 5, GWN calculation B 1= ( UID i || SID j || c || R 3|| ( T 1|| UID i || SID j )|| T 1|| Ψ U ). After that, it is in the message Auth 6= {B 1} Lieutenant General B 1Send to MDi , as shown in Figure 3.
[0096] Step 7: Get from GWN Auth After 6, MD i Retrieve and receive counters c The corresponding instant key T M Next, it verifies T 1 、UID i and SID j If the HMAC verification succeeds, it verifies T 1 time validity. In addition, it also Ψ U Authenticate User U i Basically, if any of these verifications fail, the session is terminated. Otherwise, the procedure in step 8 is executed.
[0097] Step 8: MD i calculate B 2 = ( T 1 ||UID i ||SID j )||R 3) And in the message Auth 7 = {B 2} and sends it to the GWN. After that, it will c Increase by 1.
[0098] In addition, in the corresponding key negotiation phase, the GWN has received S j and the user's mobile device MD i This phase is executed immediately after receiving the hashed message authentication code. The following steps detail these key agreement procedures:
[0099] Step 1: Use the received hashed message authentication code and , GWN export token Φ ( c ) = ( T 1 || R 3) ⊕ ( T 1 ||UIDi ||SID j ||R 3) and B 3= h ( T 1 ||Φ ( c )). After that, GWN will send the message Auth 8= {Φ ( c ), B Tokens in 3} Φ ( c) Forward to S j .
[0100] Step 2: Get Auth After 8, S j Establish the current timestamp T 2. And confirm whether T 2- T 1≤ ∆ T .here, ∆T Represents the maximum allowed transmission delay. If the verification fails, it means that the response was received outside the set time window, so the request is marked as a replay. Otherwise, S j Independently generated tokens Φ ( c ) * = ( T 1|| R 3)⊕ ( T 1|| UID i || SID j || R 3) and parameters B 3 * = h ( T 1 ||Φ * ( c )). Next, confirm whether B 3 * ≟ B 3. Verify the re-exported B 3 * Is it equivalent to the message Auth Received in 8 B 3. If the verification fails, the authentication process is terminated. Otherwise, S j The GWN has been effectively verified, and MDi It provides access to the sensed data.
[0101] Step 3: S j The loop counter c Increase by 1 and derive the session key δ ( c ) = h ( ( T 1|| R 3))⊕ h ( ( T 1|| UID i || SID j || R 3)), the session key δ ( c )exist S j , GWN and MD i This session key is then used to protect data exchanged over the public internet.
[0102] Through the above steps, the present application can share a session key among the user terminal, the gateway node and the sensor node, so as to exchange data among the user terminal, the gateway node and the sensor node based on the session key.
[0103] Furthermore, the present application also provides the following examples to analyze and illustrate the effects of the present application.
[0104] In some embodiments, the security of the negotiated session key can be verified by adopting a Real or Random (ROR) model. Specifically, the difficulties faced by the adversary when trying to obtain the communication session key are analyzed. By simulating different attack strategies that the adversary may adopt, the effectiveness of the present scheme in resisting various attacks can be demonstrated. In addition, an informal security analysis is performed, including the use of various formulated and verified theorems, which can prove that the present scheme can resist typical WSN attacks.
[0105] In some embodiments, the present scheme can be implemented on a machine with an Intel Core i5 processor, 6GB RAM, and a Windows 11 operating system at 2.6 GHz. For the Trivium stream cipher, the Python pytrivium library is used, and the results are as follows: 11 hash message authentication code (THMAC) and 3 one-way hash (Th) operations are performed. The experimental results show that the computational cost of the present scheme is only 16.04 ms, which is much lower than the computational cost of other related lightweight authentication schemes. Therefore, it can be concluded that since the sensor nodes in WSN are limited in terms of computing resources, the present scheme is the most suitable in this environment.
[0106] In some embodiments, considering the information exchange in the login, authentication and key agreement stages, in these processes, it is assumed that the information Auth1 = {UIDi*}, Auth2 = {A1}, Auth3 = {A2}, Auth4 = {A4}, Auth5 = {A5}, Auth6 = {B1}, Auth7 = {B2} and Auth8 = {Φ(c), B3} are exchanged between Sj, GWN and MDi, and the result is: the cumulative computation overhead is 1824 bits, which is much lower than the communication overhead of other related lightweight authentication schemes; it can be understood that due to the limited communication capabilities of WSN sensor nodes, this scheme is most suitable for deployment in this application field.
[0107] In some embodiments, the energy consumption of sensor nodes and mobile devices is considered. In a WSN environment, energy is given by the product of computational overhead and maximum processing power, where the maximum processing power is 10.88 watts. In this embodiment, the energy consumption of sensor nodes and mobile devices is 142.27 mJ and 152.43 mJ, respectively, which is much lower than the energy consumption of other related lightweight authentication schemes. It can be understood that since most sensor nodes in WSN are powered by batteries, energy resources are limited. Therefore, this scheme performs well in terms of energy consumption and is very suitable for resource-constrained wireless sensor network environments.
[0108] In summary, through the above embodiments, the effectiveness of the lightweight encryption authentication mechanism of the present application has been fully verified. This solution can not only provide significant security and privacy protection, but also achieve efficient computing, energy and communication costs in a resource-constrained environment. It can effectively solve security problems in wireless sensor networks and is suitable for resource-constrained sensor nodes.
[0109] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application provides a lightweight encryption authentication device for a wireless sensor network, the device comprising: a system setting module, used to control the gateway node to generate a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, respectively, and send the sensor transient key, the user transient key, the preset sensor long-term key and the user long-term key to the user terminal and the sensor node respectively; a registration module, used to control the user terminal to obtain the user identity and user password data generated by the user, and send the user identity to the gateway node to complete the user registration; and a module for controlling the sensor node to obtain the sensor identification and the sensor initial value, and send the sensor identification and the sensor initial value to the gateway node to complete the sensor registration. Device registration; a login authentication module, used to control the user end to authenticate the identity information currently input by the user based on the user identity identifier and user password data, and to perform mutual authentication between the user end, the gateway node and the sensor node based on the identity information, so as to send the sensor hash message authentication code and the user hash message authentication code to the sensor node according to the authentication result; a key negotiation module, used to control the sensor node to perform key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code and the random number and timestamp generated by the gateway node, so as to obtain the session key according to the authentication result; so that the session key is shared among the user end, the gateway node and the sensor node, and data is exchanged between the user end, the gateway node and the sensor node based on the session key.
[0110] To achieve the above-mentioned objectives, the third aspect of an embodiment of the present application provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; and a lightweight encryption authentication method for a wireless sensor network as described in any one of the first aspects when the at least one program is executed by the at least one processor.
[0111] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing computer-executable instructions, which are used to execute the lightweight encryption authentication method for wireless sensor networks as described in any one of the fourth aspects.
[0112] Some embodiments of the present application provide an electronic device, Figure 10 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application, refer to Figure 10 The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the lightweight encryption authentication method for a wireless sensor network of any one of the above embodiments is implemented, for example, the method described above is executed. Figure 2 Steps S210 to S240 of the method, Figure 3Steps S310 to S320 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S530 of the method, Figure 6 Steps S610 to S670 of the method, Figure 7 Method step S710 in .
[0113] The electronic device 1000 of the embodiment of the present application includes one or more processors 1010 and a memory 1020. Figure 10 In the figure, a processor 1010 and a memory 1020 are taken as an example.
[0114] The processor 1010 and the memory 1020 may be connected via a bus or other means. Figure 10 The bus connection is taken as an example.
[0115] The memory 1020 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 1020 may include a high-speed random access memory and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1020 may optionally include a memory 1020 remotely located relative to the processor 1010. These remote memories can be connected to the electronic device 1000 via a network. At the same time, examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0116] In some embodiments, when executing the computer program, the processor executes the lightweight encryption authentication method for a wireless sensor network according to any one of the above embodiments at preset intervals.
[0117] Those skilled in the art will understand that Figure 10 The device structure shown in the figure does not constitute a limitation on the electronic device 1000, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0118] exist Figure 10 In the electronic device 1000 shown, the processor 1010 can be used to call the lightweight encryption authentication method for the wireless sensor network stored in the memory 1020, thereby implementing the lightweight encryption authentication method for the wireless sensor network.
[0119] Based on the hardware structure of the above-mentioned electronic device 1000, various embodiments of the lightweight encryption authentication device for the wireless sensor network of the present application are proposed. At the same time, the non-transient software programs and instructions required to implement the lightweight encryption authentication method for the wireless sensor network of the above-mentioned embodiments are stored in the memory. When executed by the processor, the lightweight encryption authentication method for the wireless sensor network of the above-mentioned embodiments is executed.
[0120] The embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, which are used to execute the above-mentioned lightweight encryption authentication method for wireless sensor networks, and can enable the above-mentioned one or more processors to execute the lightweight encryption authentication method for wireless sensor networks of any one of the above-mentioned embodiments, for example, to execute the above-mentioned Figure 2 Steps S210 to S240 of the method, Figure 3 Steps S310 to S320 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S530 of the method, Figure 6 Steps S610 to S670 of the method, Figure 7 Method step S710 in .
[0121] The present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the lightweight encryption authentication method for a wireless sensor network according to any one of the above embodiments, for example, the above-described Figure 2 Steps S210 to S240 of the method, Figure 3 Steps S310 to S320 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S530 of the method, Figure 6 Steps S610 to S670 of the method, Figure 7 Method step S710 in .
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network nodes. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0123] Those skilled in the art will appreciate that all or some of the steps and systems described above can be implemented as software, firmware, hardware, or any combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer-readable storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer-readable storage media encompasses volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-to-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0124] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A lightweight encryption authentication method for wireless sensor networks, characterized in that: The wireless sensor network includes a user terminal, a gateway node, and a sensor node that are communicatively connected. The method includes: The gateway node generates a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, and sends the sensor transient key, the user transient key, the preset sensor long-term key and the user long-term key to the user terminal and the sensor node respectively; The user terminal obtains the user identity and user password data generated by the user, and sends the user identity to the gateway node to complete the user registration; the sensor node obtains the sensor identifier and the sensor initial value, and sends the sensor identifier and the sensor initial value to the gateway node to complete the sensor registration; The user terminal authenticates the identity information currently input by the user based on the user identity identifier and the user password data, and performs mutual authentication between the user terminal, the gateway node and the sensor node based on the identity information, so as to send a sensor hash message authentication code and a user hash message authentication code to the sensor node according to the authentication result; The sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, and the random number and timestamp generated by the gateway node, so as to obtain a session key according to the authentication result; The session key is shared among the user terminal, the gateway node, and the sensor node, so that data is exchanged among the user terminal, the gateway node, and the sensor node based on the session key.
2. The lightweight encryption authentication method for wireless sensor networks according to claim 1, characterized in that: The gateway node generates a sensor instantaneous key and a user instantaneous key based on a one-way hash function and a preset physical unclonable function, respectively, including: One-way hash function based on collision resistance h (.)Generate a random one-time random number R 1 and R 2; Generate a challenge value using a physically unclonable function (PUF) C 1 and C 2 and the initialization vector φ 1 and φ 2, based on random numbers R 1 and R 2. Challenge value C 1 and C 2 and the initialization vector φ 1 and φ 2Generate sensor instant key T S and user transient key T M ; in, T S = h ( Enc k ( PUF 1( C 1)|| φ 1|| R 1)); T M = h ( Enc k ( PUF 2( C 2)|| φ 2|| R 2)), where the encryption function Enc k () is used to encrypt the input by using a long-term key k, where the long-term key k refers to the sensor long-term key or the user long-term key.
3. The lightweight encryption authentication method for wireless sensor networks according to claim 2, characterized in that: The sensor node obtains a sensor identifier and a sensor initial value, and sends the sensor identifier and the sensor initial value to the gateway node to complete sensor registration, including: The sensor node obtains the sensor identifier SID j and sensor initial value IV S and share the sensor identifier with the gateway node through a secure channel SID j and the initial value of the sensor IV S ; The gateway node transmits the sensor initial value through a secure channel IV S , the sensor long-term key and the user long-term key to form a parameter set to the memory of the sensor node, so that the sensor node will cycle counter c Set to 1.
4. The lightweight encryption authentication method for wireless sensor networks according to claim 3, characterized in that: The user terminal authenticates the identity information currently input by the user based on the user identity identifier and the user password data, including: The user terminal receives the identity identifier input by the user UID i * and password PW i * ; If the user terminal verifies the identity of the user input UID i * and password PW i * The user identity cached by the user terminal UID i If it matches the user password data PWi, the user is successfully authenticated; When the user is successfully authenticated, the user terminal sends the identity identifier to the gateway node. UID i * .
5. The lightweight encryption authentication method for wireless sensor networks according to claim 4, characterized in that: The mutual authentication is performed between the user terminal, the gateway node, and the sensor node based on the identity information, so as to send a sensor hash message authentication code and a user hash message authentication code to the sensor node according to the authentication result, including: The gateway node is based on the user identity UID i Verify the identity UID i * , in case of successful verification, a random number is generated R 3. Based on random numbers R 3 and the user identity UID i Get authentication parameters A 1=( R 3 ||UID i ), and sends to the sensor node A 1 corresponding to the authentication response; The sensor node retrieves the counter c And the sensing instantaneous key T S and the user's transient key T M , and determine the timestamp T 1, to calculate authentication parameters A 2=( SID j ||c||T 1 || ( T 1)|| ( T 1 ||UID i ||SID j ||)) and sends it to the gateway node A 2 corresponding authentication message; The gateway node is based on the R 3 and stated A 2Calculating Security Tokens A 4=( R 3|| c || ( T 1)|| T 1) and send the security token to the user terminal A 4; The user terminal obtains the counter c The corresponding sensor instantaneous key T S ,based on T S Verify the security token A 4. If the verification is successful, the timestamp is obtained. T 1 and the random number R 3 news A 5=( ( T 1) ||R 3) and send A 5 to the gateway node; The gateway node calculates the user identity UID i , the identity of the sensor node SID j , the counter c , the random number R 3 and the timestamp T Authentication message 1 B 1, and send the B 1 to the user terminal; The user terminal obtains the counter c The corresponding user instant key T M ,based on T M Verify the B 1. If the verification is successful, send the timestamp T 1. The user identity UID i , the identity of the sensor node SID j , the counter c and the random number R 3 authentication message B 2 to the gateway node; The gateway node is based on the B 2. Sensor Hash Message Authentication Code and user hashed message authentication code Sent to the sensor node.
6. The lightweight encryption authentication method for wireless sensor networks according to claim 5, characterized in that: The method further comprises: The sensor node increases the counter each time it successfully completes the authentication process c The value of .
7. The lightweight encryption authentication method for wireless sensor networks according to claim 5, characterized in that: The sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, and the random number and timestamp generated by the gateway node to obtain a session key according to the authentication result, including: The sensor node performs key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, the random number R3 and the timestamp T1, so that the sensor node calculates the session key δ ( c ), wherein the session key δ ( c ) is calculated as: δ ( c )= h ( ( T 1|| R 3))⊕ h ( ( T 1|| UID i || SID j || R 3)).
8. A lightweight encryption authentication device for a wireless sensor network, characterized in that: The device comprises: a system setting module, configured to control the gateway node to generate a sensor transient key and a user transient key based on a one-way hash function and a preset physical unclonable function, and to send the sensor transient key, the user transient key, the preset sensor long-term key, and the user long-term key to the user terminal and the sensor node, respectively; A registration module, configured to control the user terminal to obtain a user identity and user password data generated by the user, and to send the user identity to the gateway node to complete user registration; and to control the sensor node to obtain a sensor identifier and a sensor initial value, and to send the sensor identifier and the sensor initial value to the gateway node to complete sensor registration; a login authentication module, configured to control the user terminal to authenticate the identity information currently input by the user based on the user identity identifier and the user password data, and to perform mutual authentication between the user terminal, the gateway node, and the sensor node based on the identity information, so as to send a sensor hash message authentication code and a user hash message authentication code to the sensor node according to the authentication result; A key negotiation module is used to control the sensor node to perform key negotiation authentication with the gateway node based on the sensor hash message authentication code, the user hash message authentication code, and the random number and timestamp generated by the gateway node, so as to obtain a session key according to the authentication result; so that the session key is shared among the user terminal, the gateway node and the sensor node, and data is exchanged between the user terminal, the gateway node and the sensor node based on the session key.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the lightweight encryption authentication method for a wireless sensor network according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing computer-executable instructions, wherein when the computer-executable instructions are executed by a processor, the lightweight encryption authentication method for a wireless sensor network according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Key distribution method based on physical unclonable function in wireless sensor network
CN111278009A
Anti-traceability-attack wireless sensor network lightweight access authentication method and system
CN112954680A