Bidirectional identity authentication method and system based on aggregate key distribution

By adopting a two-way identity authentication method of aggregated key distribution in IoT devices, one-way authentication and man-in-the-middle attack problems in IoT device authentication process are solved, and the efficiency and security of encrypted communication are improved.

CN115664643BActive Publication Date: 2024-11-08STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211109047.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2024-11-08
Estimated Expiration
2042-09-13

AI Technical Summary

Technical Problem

The authentication process of existing IoT devices has security problems such as one-way authentication and man-in-the-middle attacks, and the encryption communication efficiency is low in complex networks.

Method used

Using a two-way identity authentication method based on aggregation key distribution, the sensor terminal and node device respectively send identity privacy information to the registration center, obtain and verify the identity authentication private key and hash value, and generate two-way identity authentication instructions to ensure the identity authentication of both parties. Safety and efficiency.

Benefits of technology

The security of two-way identity authentication is realized, avoiding one-way authentication and man-in-the-middle attacks, and improving the efficiency of encrypted communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115664643B_ABST
    Figure CN115664643B_ABST
Patent Text Reader

Abstract

The present invention discloses a two-way identity authentication method and system based on aggregate key distribution. A registration center registers sensor terminals and node devices, and obtains identity authentication private keys, hash values ​​and identity identifiers of the sensor terminals and node devices; the sensor terminals and node devices store the identity authentication private keys, hash values ​​and identity identifiers of the sensor terminals and node devices. The sensor terminals and node devices use a two-way identity authentication method to authenticate the sensor terminals connected to the node devices and establish a session link based on the stored identity authentication private keys, hash values ​​and identity identifiers of the sensor terminals and node devices. The two-way identity authentication method and system based on aggregate key distribution provided by the present invention can avoid the problems of one-way authentication and the security problems caused by man-in-the-middle attacks or replay attacks, and improve the efficiency of encrypted communications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a two-way identity authentication method and system based on aggregate key distribution, belonging to the technical field of network security. Background Art

[0002] When an IoT device initiates the authentication process, the sensor terminal ID can be sent to the node device in plain text. The algorithm between the sensor terminal and the node device uses a lightweight block cipher algorithm to encrypt the random number Rand and the terminal ID to generate the authentication token AUTN.

[0003] Authentication messages between sensor terminals and node devices require integrity protection. This algorithm uses a hashing algorithm to generate a message authentication code (MAC), which in turn implements message integrity protection. During the authentication message exchange between the sensor terminal and node device, they exchange key generation resources—the random number Rand generated by each sensor terminal and node device—for protecting subsequent session messages. The sensor terminal and node device can each use the random number Rand to calculate the session confidentiality key and session integrity key. Therefore, the keys used in the post-authentication data transmission process do not need to be transmitted over the network. The complete authentication process consists of four message exchanges: connection request, authentication request, authentication response, and authentication notification.

[0004] However, existing technologies present the following technical issues: 1. The authentication token AUTN is one-way authentication, and the key only passes through one communication entity. If there is an interruption in forwarding the key to the other party after receiving it, the applicant may mistakenly believe that both parties have received the session key. 2. In complex networks, the lack of confirmation of multiple encryption relationships between communicating entities may lead to man-in-the-middle attacks or replay attacks, causing the authentication token to be replaced, resulting in security issues. 3. The communication system corresponding to the IoT sensor terminal consumes a large amount of memory, resulting in low authentication communication speed and efficiency. Summary of the Invention

[0005] Objective: To overcome the deficiencies in the prior art, the present invention provides a two-way identity authentication method and system based on aggregate key distribution.

[0006] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:

[0007] In a first aspect, a bidirectional identity authentication method based on aggregate key distribution is performed by a sensor terminal and includes the following steps:

[0008] The sensor terminal sends the identity privacy information of the sensor terminal to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the sensor terminal sent by the registration center in response to the identity privacy information of the sensor terminal;

[0009] Obtain the node device's identity authentication private key, hash value, and identity identifier sent by the registration center;

[0010] The sensor terminal stores the identity authentication private key, hash value and identity identification of the sensor terminal and the node device;

[0011] The sensor terminal verifies the identity authentication instruction sent from the node device according to the identity authentication private key, hash value and identity identifier of the sensor terminal and the node device, and sends a session authentication instruction to the node device.

[0012] As a preferred solution, the sensor terminal sends the identity privacy information of the sensor terminal to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the sensor terminal sent by the registration center in response to the identity privacy information of the sensor terminal, including:

[0013] The sensor terminal sends the device ID and chip unique identifier UID of the sensor terminal to the registration center, and obtains the identity identifier of the sensor terminal in response from the registration center. ID Sensor , hash value HFC Sensor , Identity authentication private key SK Sensor .

[0014] As a preferred solution, the sensor terminal verifies the identity authentication instruction sent from the node device based on the identity authentication private key, hash value and identity identifier of the sensor terminal and the node device, and sends a session authentication instruction to the node device, including:

[0015] The sensor terminal receives the identity authentication instruction APS1 sent from the node device and reads the FLASH SK Sensor ,according to SK Sensor Decrypt APS1 and obtain (MPOS||V||TS1), (MPOS||V||TS1)=LDA(APS1, SK Sensor ), where LDA (•) represents a lightweight decryption algorithm, and MPOS, Pos, V, and TS1 in MPOS are obtained according to (MPOS||V||TS1); where || represents a join operation; SK Sensor Represents the identity authentication private key of the sensor terminal; Pos represents random position data, and TS1 represents the current timestamp;MPos =( Pos || ID Sink )⊕ h ( HFC Sink || TS 1), V = h ( Pos || ID Sink || HFC Sink || TS 1); HFC Sink Indicates the hash value of the node device. ID Sink Indicates the node device identity; the sensor terminal reads the FLASH HFC sink and ID Sink ,calculate( Pos || ID Sink )= MPos ⊕ h ( HFC Sink || TS 1) and V' = h ( Pos || ID Sink || HFC Sink || TS 1); where ⊕ represents an XOR operation; h(•) represents a hash value calculation function;

[0016] Sensor terminal detection V' = V Is it established? If so, complete the identity authentication of the sensor and node device;

[0017] The sensor terminal reads the FLASH ID Sensor and HFC Sensor ,according to HFC Sensor Generate random numbers R ,calculate IDF = h ( ID Sensor || HFC Sensor || R )and K' =IEA( IDF , Pos),in, IDF Indicates the sensor identification field, K' represents the temporary session key, IEA (•) represents the identity extraction algorithm; ID Sensor Indicates the identity of the sensor terminal, HFC Sensor The hash value representing the sensor terminal;

[0018] The sensor terminal obtains the current timestamp TS 2. Calculation M =( ID Sensor || R )⊕ h ( ID Sink || TS 2) N =LEA( HFC Sensor || Pos || TS 2, K' ); LEA (•) stands for Lightweight Encryption Algorithm

[0019] The sensor terminal will ID Sink As the public key, obtain the session authentication instruction APS2 according to the public key, APS2=LEA(M||N||TS2);

[0020] The sensor terminal sends APS2 to the node device.

[0021] In a second aspect, a bidirectional identity authentication method based on aggregate key distribution is performed by a node device and includes the following steps:

[0022] The node device sends the identity privacy information of the node device to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the node device returned by the registration center in response to the identity privacy information of the node device;

[0023] Obtain the sensor terminal node device's identity authentication private key, hash value, and identity identifier sent by the registration center;

[0024] The node device stores the identity authentication private key, hash value and identity identification of the node device and the sensor terminal;

[0025] The node device authenticates the private key, hash value and identity of the node device and the sensor terminal, sends an identity authentication instruction to the sensor terminal, and verifies the session authentication instruction sent from the sensor terminal.

[0026] As a preferred solution, the node device sends the identity privacy information of the node device to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the node device returned by the registration center in response to the identity privacy information of the node device, including:

[0027] The node device sends the device ID and chip unique identifier UID to the registration center and obtains the node device identity in response from the registration center. ID Sink , hash value HFC Sink , Identity authentication private key SK Sink .

[0028] As a preferred solution, the node device authenticates the private key, hash value and identity identifier of the node device and the sensor terminal, sends an identity authentication instruction to the sensor terminal, and verifies the session authentication instruction sent from the sensor terminal, including:

[0029] Node devices generate random location data Pos , get the current timestamp TS 1. Read FLASH ID sink and HFC Sink ;

[0030] Node device calculation MPos =( Pos || ID Sink )⊕ h ( HFC Sink || TS 1) and V = h ( Pos || ID Sink || HFC Sink || TS 1); where || represents a join operation and ⊕ represents an exclusive-or operation; HFC Sink Indicates the hash value of the node device. ID Sink Indicates the node device identity;

[0031] The node device reads the sensor's identity in FLASH ID Sensor As the public key, obtain the identity authentication instruction APS1 according to the public key, APS1=LEA(MPOS||V||TS1, ID Sensor ), where LEA (•) represents the lightweight encryption algorithm;

[0032] The node device sends APS1 to the sensor device;

[0033] The node device receives the session authentication instruction APS2 sent from the sensor terminal and reads the FLASH SK Sink ,according to SK Sink Decrypt APS2 and obtain (M||N||TS2). According to (M||N||TS2), obtain M and M. ID Sink || TS 2;SK Sink Indicates the node device's identity authentication private key; TS2 indicates the current timestamp obtained by the sensor terminal; M =( ID Sensor || R )⊕ h ( ID Sink || TS 2) N =LEA( HFC Sensor || Pos || TS 2, K' ),in, ID Sensor Indicates the identity of the sensor terminal, HFC Sensor represents the hash value of the sensor terminal; R represents a random number; K' Represents a temporary session key;

[0034] Node device calculation ( ID Sensor || R' ) = M ⊕ h ( ID Sink || TS 2);

[0035] Node device according to ( ID Sensor || R' )calculate IDF' = h ( HFC Sensor || ID Sensor || R' ),according to IDF' and Pos, calculate K =IEA( IDF' ,Pos ); IEA (•) represents the identity extraction algorithm; R' represents a random number;

[0036] Node device according to K pair APS2 decrypts and obtains ( HFC' Sensor || Pos' || TS 2), ( HFC' Sensor || Pos' || TS 2) = LDA( APS2 , K ); LDA (•) represents lightweight decryption algorithm;

[0037] Node device detection HFC' Sensor = HFC Sensor and Pos' = Pos Is it successful? If successful, establish a session link between the node device and the sensor.

[0038] In a third aspect, a two-way identity authentication method based on aggregate key distribution is performed by a registration center and includes the following steps:

[0039] The registration center obtains the identity privacy information of the node device from the node device and generates the node device's identity authentication private key, hash value and identity identifier;

[0040] The registration center obtains the identity privacy information of the sensor terminal from the sensor terminal and generates the identity authentication private key, hash value and identity identifier of the sensor terminal;

[0041] The registration center sends the identity authentication private key, hash value and identity identification of the node device and the sensor terminal to the node device and the sensor terminal respectively.

[0042] As a preferred solution, the registration center obtains the identity privacy information of the node device from the node device and generates the identity authentication private key, hash value and identity identifier of the node device, including:

[0043] The registration center generates the node device identity based on the UID of the node device ID Sink ;

[0044] The registration center executes the node device identity ID Sink Generate the node device's identity authentication private key SK Sink , SK Sink = Setup (ID Sink );Setup (•) represents the private key generation function;

[0045] The registration center executes the function code FC of the node device according to the device ID of the node device Sink , according to function code FC Sink Calculate the hash value of the node device HFC Sink , HFC Sink = h (FC Sink ); h(•) represents the hash value calculation function.

[0046] As a preferred solution, the registration center obtains the identity privacy information of the sensor terminal from the sensor terminal and generates the identity authentication private key, hash value and identity identifier of the sensor terminal, including:

[0047] The registration center generates the sensor terminal identity based on the UID of the sensor terminal ID Sensor ;

[0048] The registration center executes the sensor terminal identity ID Sensor Generate the sensor terminal's identity authentication private key SK Sensor , SK Sensor = Setup (ID Sensor ); Setup (•) represents the private key generation function;

[0049] The registration center executes the function code FC of the sensor terminal according to the device ID of the sensor terminal Sensor , according to the sensor terminal function code FC Sensor Calculate the hash value of the sensor terminal HFC Sensor , ​ Sensor = h (FC Sensor ); h(•) represents the hash value calculation function.

[0050] In a fourth aspect, a bidirectional identity authentication system based on aggregate key distribution includes: a registration center, a sensor terminal, and a node device, characterized in that:

[0051] The registration center is used to obtain the identity privacy information of the node device, generate the identity authentication private key, hash value and identity identifier of the node device; obtain the identity privacy information of the sensor terminal, generate the identity authentication private key, hash value and identity identifier of the sensor terminal; and send the identity authentication private key, hash value and identity identifier of the node device and the sensor terminal to the node device and the sensor terminal respectively;

[0052] The sensor terminal is used to send the identity privacy information of the sensor terminal, obtain the identity authentication private key, hash value and identity identifier of the sensor terminal; obtain the identity authentication private key, hash value and identity identifier of the node device; store the identity authentication private key, hash value and identity identifier of the sensor terminal and the node device; verify the identity authentication instruction based on the identity authentication private key, hash value and identity identifier of the sensor terminal and the node device, and send a session authentication instruction;

[0053] The node device is used to send the identity privacy information of the node device, obtain the identity authentication private key, hash value and identity identification of the node device; obtain the identity authentication private key, hash value and identity identification of the sensor terminal node device; store the identity authentication private key, hash value and identity identification of the node device and the sensor terminal; send an identity authentication instruction based on the identity authentication private key, hash value and identity identification of the node device and the sensor terminal, and verify the session authentication instruction.

[0054] Beneficial effects: The two-way identity authentication method and system based on aggregate key distribution provided by the present invention generates an identity authentication value for confirming the communication relationship between two communicating entities, and uses the identity authentication value for two-way identity authentication, which can avoid the problems of one-way authentication and the security problems caused by man-in-the-middle attacks or replay attacks, and adopts a lightweight encryption algorithm to improve the efficiency of encrypted communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] ​ This is a schematic diagram of the method flow of the first embodiment of the present invention.

[0056] ​ Schematic diagram of the method flow of the second embodiment of the present invention.

[0057] ​ Schematic diagram of the method flow of the third embodiment of the present invention.

[0058] ​ 4 is a flow chart of a method according to a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be further described below with reference to specific embodiments.

[0060] like ​As shown, the first embodiment is a bidirectional identity authentication method based on aggregate key distribution, including a registration center, a sensor terminal, and a node device. The method includes the following steps:

[0061] Step 1: The registration center registers the sensor terminal and node device, and obtains the identity authentication private key, hash value and identity identification of the sensor terminal and node device; the sensor terminal and node device store the identity authentication private key, hash value and identity identification of the sensor terminal and node device.

[0062] Step 2: The sensor terminal and the node device use a two-way authentication method to authenticate the sensor terminal connected to the node device and establish a session link based on the stored sensor terminal and node device identity authentication private keys, hash values ​​and identity identifiers.

[0063] Furthermore, the step 1 specifically includes:

[0064] The sensor terminal and node device send their own identity privacy information to the registration center. The identity privacy information includes: device ID and chip unique identifier UID.

[0065] The registration center generates the sensor terminal identity based on the UID of the sensor terminal ​ Sensor Generate node device identity based on the UID of the node device ​ Sink .

[0066] The registration center obtains the function code FC of the sensor terminal according to the device ID of the sensor terminal Sensor , according to the sensor terminal function code FC Sensor Calculate the hash value of the sensor terminal ​ Sensor , ​ Sensor = h (FC Sensor ).

[0067] The registration center obtains the function code FC of the node device based on the device ID of the node device Sink , according to function code FC Sink Calculate the hash value of the node device ​ Sink , ​ Sink = h (FC Sink ). h(•) represents the hash value calculation function.

[0068] The registration center identifies the sensor terminal based on its ​ SensorGenerate the sensor terminal's identity authentication private key ​ Sensor , ​ Sensor ​ (ID Sensor ).

[0069] The registration center identifies the node device according to its ​ Sink Generate the node device's identity authentication private key SK Sink , ​ Sink ​ (ID Sink ). ​ (•) represents the private key generation function.

[0070] The registration center issues the authentication private key, hash value and identity to the sensor terminal and node device respectively through a secure channel.

[0071] The sensor terminal and node device store the authentication private key, hash value and identity in FLASH.

[0072] Furthermore, the step 2 specifically includes:

[0073] Node devices generate random location data ​ , get the current timestamp ​ 1. Read the node device FLASH ​ sink and ​ Sink .

[0074] Node device calculation ​ =( ​ || ​ Sink )⊕ h ( ​ Sink || ​ 1) and V = h ( ​ || ​ Sink || ​ Sink || ​ 1). In this example, || represents a join operation, and ⊕ represents an exclusive-or operation.

[0075] The node device reads the sensor's identity in the node device's FLASH ​ Sensor As the public key, obtain the identity authentication instruction APS1 according to the public key, APS1=LEA(MPOS||V||TS1,​ Sensor ), where LEA (•) represents the lightweight encryption algorithm.

[0076] The node device sends APS1 to the sensor.

[0077] After the sensor receives APS1, it reads the sensor FLASH ​ Sensor ,according to ​ Sensor Decrypt APS1 and obtain (MPOS||V||TS1), (MPOS||V||TS1)=LDA(APS1, ​ Sensor ), where LDA (•) represents the lightweight decryption algorithm, and MPOS, Pos, V, and TS1 in MPOS are obtained according to (MPOS||V||TS1).

[0078] Sensor reads sensor FLASH ​ sink and ​ Sink ,calculate( ​ || ​ Sink )= ​ ⊕ h ( ​ Sink || ​ 1) and V' = h ( ​ || ​ Sink || ​ Sink || ​ 1).

[0079] Sensor detection V' = V Is it true? If so, the sensor and the node device complete the identity authentication. Read the sensor FLASH ​ Sensor and ​ Sensor ,according to ​ Sensor Generate random numbers R ,calculate ​ ( ​ Sensor || ​ Sensor || R )and K' =IEA( ​ , ​ ),in, ​Indicates the sensor identification field, K' represents the temporary session key, and IEA (•) represents the identity extraction algorithm.

[0080] The sensor gets the current timestamp ​ 2. Calculation M =( ​ Sensor || R )⊕ h ( ​ Sink || ​ 2) N =LEA( ​ Sensor || ​ || ​ 2, K' ).

[0081] The sensor will ​ Sink As the public key, the session authentication instruction APS2 is obtained according to the public key, APS2=LEA(M||N||TS2), and the sensor sends APS2 to the node device.

[0082] After receiving APS2, the node device reads the node device FLASH ​ Sink ,according to ​ Sink Decrypt APS2 and obtain (M||N||TS2). According to (M||N||TS2), obtain M and M. ​ Sink || ​ 2.

[0083] Node device calculation ( ​ Sensor || R' ) = M ⊕ h ( ​ Sink || ​ 2).

[0084] Node device according to ( ​ Sensor || R' )calculate ​ = h ( ​ Sensor || ​ Sensor || R' ),according to ​ and ​ calculate K =IEA( ​, ​ ).

[0085] Node device according to ​ APS2 decrypts and obtains ( ​ Sensor || ​ || ​ 2), ( ​ Sensor || ​ || ​ 2) = LDA( ​ , K ).

[0086] Node device detection ​ Sensor = ​ Sensor and ​ Is it successful? If successful, establish a session link between the node device and the sensor.

[0087] Furthermore, the sensor identification field ​ By ID Sensor ||HFC Sensor ||R splicing to obtain a 1024-bit identification field and then performing hash function calculation 。

[0088] Furthermore, the identity tag is not allowed to be tampered with and is stored in a designated area of ​​FLASH and read-protected.

[0089] Furthermore, the hash value is not allowed to be read or tampered with except under normal operation. It is stored in a proprietary code protection area (PCROP). This area is an execution area only and can only be accessed by the STM32 CPU as instruction code. All other access (DMA, debugging, and CPU data reading, writing, and erasing) is strictly prohibited, thereby preventing third-party reading, writing, and erasing.

[0090] In order to achieve a unified scan when performing integrity check on the hash value, the hash value is planned to be stored in a fixed address of the FLASH, such as the area starting from Flash PCROP1 or Flash PCROP2.

[0091] Furthermore, FLASH has an error correction function that can achieve 2-bit detection and 1-bit correction, and can maintain the information stored in FLASH to a certain extent.

[0092] Furthermore, random position data ​ It consists of multiple random numbers generated by the RNG (random number generator) module.

[0093] Furthermore, the timestamp is obtained by the RTC timestamp module in the STM32.

[0094] like ​ As shown, the second embodiment is a two-way identity authentication method based on aggregate key distribution, which is executed by a sensor terminal and includes the following steps:

[0095] Send the sensor terminal's identity privacy information and obtain the sensor terminal's identity authentication private key, hash value, and identity identifier.

[0096] Obtain the node device's authentication private key, hash value, and identity.

[0097] The authentication private keys, hash values ​​and identity identifiers of sensor terminals and node devices are stored.

[0098] According to the identity authentication private key, hash value and identity identification of the sensor terminal and node device, the identity authentication instruction is verified and the session authentication instruction is sent.

[0099] Furthermore, the identity privacy information of the sensor terminal is sent to obtain the identity authentication private key, hash value and identity identifier of the sensor terminal, including:

[0100] Send the device ID of the sensor terminal and the chip unique identifier UID to obtain the identity of the sensor terminal ​ Sensor , hash value ​ Sensor , Identity authentication private key ​ Sensor .

[0101] Furthermore, based on the identity authentication private key, hash value and identity identifier of the sensor terminal and node device, the identity authentication instruction is verified and a session authentication instruction is sent, including:

[0102] Receive the identity authentication instruction APS1 and read the FLASH ​ Sensor ,according to ​ Sensor Decrypt APS1 and obtain (MPOS||V||TS1), (MPOS||V||TS1)=LDA(APS1, ​ Sensor), where LDA (•) represents a lightweight decryption algorithm. Pos, V, and TS1 in MPOS and MPOS are obtained based on (MPOS||V||TS1). || represents a join operation. Lightweight encryption and decryption algorithms are short for encryption and decryption algorithms in lightweight cryptographic algorithms. Common algorithms include AES (Advanced Encryption Standard), DESL (Data Encryption Standard Lightweight Extension), and TEA (Telemetry Encryption Algorithm). They generally refer to cryptographic algorithms with high computational efficiency and low hardware overhead.

[0103] Read FLASH ​ sink and ​ Sink ,calculate( ​ || ​ Sink )= ​ ⊕ h ( ​ Sink || ​ 1) and V' = h ( ​ || ​ Sink || ​ Sink || ​ 1). Where ⊕ represents the exclusive OR operation.

[0104] Detection V' = V Is it established? If so, complete the identity authentication of the sensor and node device.

[0105] Read FLASH ​ Sensor and ​ Sensor ,according to ​ Sensor Generate random numbers R ,calculate ​ ( ​ Sensor || ​ Sensor || R )and K' =IEA( ​ , ​ ),in, ​ Indicates the sensor identification field, K' represents the temporary session key, and IEA (•) represents the identity extraction algorithm.

[0106] Get the current timestamp ​ 2. Calculation M =( ​ Sensor || R )⊕ h ( ​ Sink || ​ 2) N =LEA( ​ Sensor || ​ || ​ 2, K' ).

[0107] Will ​ Sink As the public key, the session authentication instruction APS2 is obtained according to the public key, APS2=LEA(M||N||TS2).

[0108] Send APS2 to the node device.

[0109] like ​ As shown, a third embodiment of a two-way identity authentication method based on aggregate key distribution is performed by a node device and includes the following steps:

[0110] Send the node device's identity privacy information and obtain the node device's identity authentication private key, hash value, and identity identifier.

[0111] Obtain the authentication private key, hash value, and identity of the sensor terminal node device.

[0112] The identity authentication private keys, hash values ​​and identity identifiers of node devices and sensor terminals are stored.

[0113] According to the identity authentication private key, hash value and identity identification of the node device and sensor terminal, the identity authentication instruction is sent and the session authentication instruction is verified.

[0114] Furthermore, the identity privacy information of the node device is sent to obtain the identity authentication private key, hash value and identity identifier of the node device, including:

[0115] Send the device ID of the node device, the chip unique identifier UID, and obtain the identity of the node device ​ Sink , hash value ​ Sink , Identity authentication private key SK Sink .

[0116] Furthermore, according to the identity authentication private key, hash value and identity identifier of the node device and the sensor terminal, an identity authentication instruction is sent and the session authentication instruction is verified, including:

[0117] Generate random position data ​ , get the current timestamp ​ 1. Read FLASH ​ sink and ​ Sink .

[0118] calculate ​ =( ​ || ​ Sink )⊕ h ( ​ Sink || ​ 1) and V = h ( ​ || ​ Sink || ​ Sink || ​ 1). In this example, || represents a join operation, and ⊕ represents an exclusive-or operation.

[0119] Read the sensor ID in FLASH ​ Sensor As the public key, obtain the identity authentication instruction APS1 according to the public key, APS1=LEA(MPOS||V||TS1, ​ Sensor ), where LEA (•) represents the lightweight encryption algorithm.

[0120] Send APS1 to the sensor device.

[0121] Receive session authentication instruction APS2 and read FLASH ​ Sink ,according to ​ Sink Decrypt APS2 and obtain (M||N||TS2). According to (M||N||TS2), obtain M and M. ​ Sink || ​ 2.

[0122] calculate( ​ Sensor || R' ) = M ⊕ h ( ​ Sink || ​ 2).

[0123] according to( ​ Sensor || R')calculate ​ = h ( ​ Sensor || ​ Sensor || R' ),according to ​ and ​ calculate K =IEA( ​ , ​ ).

[0124] according to ​ APS2 decrypts and obtains ( ​ Sensor || ​ || ​ 2), ( ​ Sensor || ​ || ​ 2) =LDA( ​ , K ).

[0125] Detection ​ Sensor = ​ Sensor and ​ Is it successful? If successful, establish a session link between the node device and the sensor.

[0126] like ​ As shown, the fourth embodiment is a two-way identity authentication method based on aggregate key distribution, which is performed by a registration center and includes the following steps:

[0127] Obtain the identity privacy information of the node device and generate the node device's identity authentication private key, hash value and identity identifier.

[0128] Obtain the identity privacy information of the sensor terminal and generate the sensor terminal's identity authentication private key, hash value and identity identifier.

[0129] The identity authentication private key, hash value and identity identification of the node device and the sensor terminal are sent to the node device and the sensor terminal respectively.

[0130] Furthermore, the identity privacy information of the node device is obtained, and the identity authentication private key, hash value and identity identifier of the node device are generated, including:

[0131] Generate node device identity based on the UID of the node device ​ Sink .

[0132] According to the node device identity ​ SinkGenerate the node device's identity authentication private key SK Sink , ​ Sink ​ (ID Sink ). ​ (•) represents the private key generation function.

[0133] Get the function code FC of the node device according to the device ID of the node device Sink , according to function code FC Sink Calculate the hash value of the node device ​ Sink , ​ Sink = h (FC Sink ). h(•) represents the hash value calculation function.

[0134] Furthermore, the identity privacy information of the sensor terminal is obtained, and the identity authentication private key, hash value and identity identifier of the sensor terminal are generated, including:

[0135] Generate sensor terminal identity based on the UID of the sensor terminal ​ Sensor .

[0136] According to the sensor terminal identity ​ Sensor Generate the sensor terminal's identity authentication private key ​ Sensor , ​ Sensor ​ (ID Sensor ). ​ (•) represents the private key generation function.

[0137] Get the function code FC of the sensor terminal according to the device ID of the sensor terminal Sensor , according to the sensor terminal function code FC Sensor Calculate the hash value of the sensor terminal ​ Sensor , ​ Sensor = h (FC Sensor ). h(•) represents the hash value calculation function.

[0138] A fifth embodiment is a bidirectional identity authentication system based on aggregate key distribution, including: a registration center, a sensor terminal, and a node device:

[0139] The registration center is configured to obtain the identity privacy information of the node device and generate the node device's identity authentication private key, hash value, and identity identifier. The registration center also obtains the identity privacy information of the sensor terminal and generates the sensor terminal's identity authentication private key, hash value, and identity identifier. The registration center then sends the node device and sensor terminal's identity authentication private key, hash value, and identity identifier to the node device and sensor terminal, respectively.

[0140] The sensor terminal is configured to transmit the sensor terminal's identity privacy information, obtain the sensor terminal's identity authentication private key, hash value, and identity identifier. The sensor terminal also obtains the node device's identity authentication private key, hash value, and identity identifier. The sensor terminal and node device's identity authentication private keys, hash values, and identity identifiers are stored. An identity authentication instruction is verified based on the sensor terminal and node device's identity authentication private keys, hash values, and identity identifiers, and a session authentication instruction is transmitted.

[0141] The node device is configured to transmit the node device's identity privacy information, obtain the node device's identity authentication private key, hash value, and identity identifier. The node device also obtains the sensor terminal node device's identity authentication private key, hash value, and identity identifier. The node device and sensor terminal's identity authentication private key, hash value, and identity identifier are stored. Based on the node device and sensor terminal's identity authentication private key, hash value, and identity identifier, an identity authentication instruction is transmitted, and a session authentication instruction is verified.

[0142] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A two-way identity authentication method based on aggregate key distribution, comprising: Registration center, sensor terminal, node equipment; characterized by: The two-way identity authentication method is performed by the sensor terminal and includes the following steps: The sensor terminal sends the identity privacy information of the sensor terminal to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the sensor terminal sent by the registration center in response to the identity privacy information of the sensor terminal; Obtain the node device's identity authentication private key, hash value, and identity identifier sent by the registration center; The sensor terminal stores the authentication private key, hash value and identity of the sensor terminal and the node device; The sensor terminal verifies the identity authentication instruction sent from the node device according to the identity authentication private key, hash value and identity identifier of the sensor terminal and the node device, and sends a session authentication instruction to the node device; The sensor terminal sends the identity privacy information of the sensor terminal to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the sensor terminal sent by the registration center in response to the identity privacy information of the sensor terminal, including: The sensor terminal sends the device ID and chip unique identifier UID of the sensor terminal to the registration center, and obtains the identity ID of the sensor terminal in response from the registration center. Sensor 、Hash value HFC Sensor 、Identity authentication private key SK Sensor ; The sensor terminal verifies the authentication instruction sent from the node device according to the authentication private key, hash value and identity identifier of the sensor terminal and the node device, and sends a session authentication instruction to the node device, including: The sensor terminal receives the identity authentication command APS1 sent by the slave node device and reads the SK Sensor According to SK Sensor Decrypt APS1 and obtain (MPOS||V||TS1), (MPOS||V||TS1)=LDA(APS1,SK Sensor ), where LDA(·) represents a lightweight decryption algorithm, and MPOS, Pos, V, and TS1 in MPOS are obtained according to (MPOS||V||TS1); where || represents a join operation; SK Sensor represents the identity authentication private key of the sensor terminal; Pos represents random position data, TS1 represents the current timestamp; MPos=(Pos||ID Sink )⊕h(HFC Sink ||TS1), V=h(Pos||ID Sink ||HFC Sink ||TS1); HFC Sink Indicates the hash value of the node device, ID Sink Indicates the node device identity; the sensor terminal reads the HFC in the FLASH sink and ID Sink , calculate (Pos||ID Sink )=MPos⊕h(HFC Sink ||TS1) and V'=h(Pos||ID Sink ||HFC Sink ||TS1); where ⊕ represents an XOR operation; h(·) represents a hash value calculation function; The sensor terminal detects whether V'=V is established. If so, the sensor and node device identity authentication is completed; The sensor terminal reads the ID in FLASH Sensor and HFC Sensor , according to HFC Sensor Generate a random number R and calculate IDF=h(ID Sensor ||HFC Sensor ||R) and K'=IEA(IDF,Pos), where IDF represents the sensor identification field, K' represents the temporary session key, and IEA(·) represents the identification extraction algorithm; ID Sensor Indicates the identity of the sensor terminal, HFC Sensor A hash value representing the sensor terminal; The sensor terminal obtains the current timestamp TS2 and calculates M=(ID Sensor ||R)⊕h(ID Sink ||TS2), N=LEA(HFC Sensor ||Pos||TS2,K'); LEA(·) indicates lightweight encryption algorithm The sensor terminal will ID Sink As the public key, the session authentication instruction APS2 is obtained according to the public key, APS2 = LEA (M||N||TS2); The sensor terminal sends APS2 to the node device; The two-way identity authentication method is performed by a node device and includes the following steps: The node device sends the identity privacy information of the node device to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the node device returned by the registration center in response to the identity privacy information of the node device; Obtain the authentication private key, hash value and identity of the sensor terminal node device sent by the registration center; The node device stores the identity authentication private key, hash value and identity identification of the node device and the sensor terminal; The node device sends an identity authentication instruction to the sensor terminal based on the identity authentication private key, hash value and identity identifier of the node device and the sensor terminal, and verifies the session authentication instruction sent from the sensor terminal; The node device sends the identity privacy information of the node device to the registration center, and obtains the identity authentication private key, hash value and identity identifier of the node device returned by the registration center in response to the identity privacy information of the node device and sends them to the node device, including: The node device sends the device ID and chip unique identifier UID of the node device to the registration center, and obtains the identity ID of the node device in response from the registration center. Sink 、Hash value HFC Sink 、Identity authentication private key SK Sink ; The node device sends an authentication instruction to the sensor terminal based on the node device and the sensor terminal's identity authentication private key, hash value, and identity identifier, and verifies the session authentication instruction sent from the sensor terminal, including: The node device generates random position data Pos, obtains the current timestamp TS1, and reads the ID in FLASH sink and HFC Sink ; Node device calculates MPos = (Pos||ID Sink )⊕h(HFC Sink ||TS1) and V=h(Pos||ID Sink ||HFC Sink ||TS1); where || represents a join operation and ⊕ represents an XOR operation; HFC Sink Indicates the hash value of the node device, ID Sink Indicates the node device identity; The node device reads the sensor ID in FLASH Sensor As the public key, obtain the identity authentication instruction APS1 according to the public key, APS1 = LEA (MPOS || V || TS1, ID Sensor ), where LEA(·) represents lightweight encryption algorithm; The node device sends APS1 to the sensor device; The node device receives the session authentication command APS2 sent from the sensor terminal and reads the SK in the FLASH Sink According to SK Sink Decrypt APS2 to obtain (M||N||TS2), and obtain M and ID in M ​​according to (M||N||TS2) Sink ||TS2;SK Sink TS2 represents the current timestamp obtained by the sensor terminal; M = (ID Sensor ||R)⊕h(ID Sink ||TS2), N=LEA(HFC Sensor ||Pos||TS2,K'), where ID Sensor Indicates the identity of the sensor terminal, HFC Sensor represents the hash value of the sensor terminal; R represents a random number; K' represents a temporary session key; Node device calculation (ID Sensor ||R')=M⊕h(ID Sink ||TS2); Node device according to (ID Sensor ||R') calculate IDF'=h(HFC Sensor ||ID Sensor ||R'), according to IDF' and Pos, calculate K = IEA (IDF', Pos); IEA (·) represents the identification extraction algorithm; R' represents a random number; The node device decrypts APS2 according to K and obtains (HFC' Sensor ||Pos'||TS2), (HFC' Sensor ||Pos'||TS2)=LDA(APS2,K); LDA(·) represents lightweight decryption algorithm; Node device detection HFC' Sensor =HFC Sensor And Pos' = whether Pos is successful, if successful, establish a session link between the node device and the sensor; The two-way identity authentication method is performed by a registration center and includes the following steps: The registration center obtains the identity privacy information of the node device from the node device and generates the identity authentication private key, hash value and identity identifier of the node device; The registration center obtains the identity privacy information of the sensor terminal from the sensor terminal and generates the identity authentication private key, hash value and identity identifier of the sensor terminal; The registration center executes to send the identity authentication private key, hash value and identity identification of the node device and the sensor terminal to the node device and the sensor terminal respectively; The registration center obtains the identity privacy information of the node device from the node device and generates the node device's identity authentication private key, hash value and identity, including: The registration center generates the node device identity ID based on the node device’s UID Sink ; The registration center executes according to the node device identity ID Sink Generate the node device's identity authentication private key SK Sink , S.K. Sink =Setup(ID Sink );Setup(·) represents the private key generation function; The registration center executes the function code FC of the node device according to the device ID of the node device Sink , according to function code FC Sink Calculate the hash value HFC of the node device Sink , HFC Sink =h(FC Sink );h(·) represents the hash value calculation function; The registration center obtains the identity privacy information of the sensor terminal from the sensor terminal and generates the identity authentication private key, hash value and identity identification of the sensor terminal, including: The registration center generates the sensor terminal identity ID based on the UID of the sensor terminal Sensor ; The registration center executes according to the sensor terminal identity ID Sensor Generate the sensor terminal's identity authentication private key SK Sensor , S.K. Sensor =Setup(ID Sensor );Setup(·) represents the private key generation function; The registration center executes the function code FC of the sensor terminal according to the device ID of the sensor terminal. Sensor , according to the sensor terminal function code FC Sensor Calculate the hash value HFC of the sensor terminal Sensor , HFC Sensor =h(FC Sensor );h(·) represents the hash value calculation function.