Distributed identity authentication method and system of Internet of Things sensor equipment

By adopting distributed identity authentication methods of edge blockchain and smart contracts in IoT sensor devices, and using zero-knowledge proof and identification password algorithms, the problems of low efficiency and insufficient security in the existing technology are solved, and the problem of inefficient identity authentication in the existing technology is realized. Efficient and secure identity authentication and key generation reduce communication overhead and centralized risks.

CN119299106APending Publication Date: 2025-01-10福建福链科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411416484.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing IoT sensor device identity authentication solutions cannot achieve efficient and secure identity authentication, especially in distributed and complex network environments, there are problems such as high cost of data infrastructure construction, poor interoperability and insufficient ability to resist malicious attacks.

Method used

Using distributed identity authentication method, using edge blockchain nodes and smart contracts, sign identity authentication request messages through the device private key, and verify based on the identification password algorithm to generate zero-knowledge proofs, and combine smart contracts to automate identity authentication to achieve efficient and Secure identity authentication.

Benefits of technology

It reduces the communication overhead between sensor devices, improves the efficiency and tamper-proof ability of identity authentication, avoids single point of failure and centralized risks, and enhances the security and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299106A_ABST
    Figure CN119299106A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed identity authentication method and system for sensor equipment of the Internet of Things, and the method comprises the steps: transmitting an identity authentication request message after signature of the sensor equipment and an identifier of the sensor equipment to an edge block chain node; and the edge block chain node verifies the signed identity authentication request message by using the identifier based on an identifier cryptographic algorithm, judges whether a verification result is successful or not, generates a zero-knowledge proof and sends the zero-knowledge proof to the sensor equipment if the verification result is successful, and the sensor equipment sends the zero-knowledge proof to the edge block chain node. The edge block chain nodes use the smart contract to verify the validity of the zero-knowledge proof, multiple edge block chain nodes can maintain the same information without central authorization, the communication overhead with the sensor device is effectively reduced, identity authentication can be automatically executed through the combination of the zero-knowledge proof and the smart contract, and the user experience is improved. And the efficiency and tamper-proof capability of the system are improved, so that efficient and safe identity authentication is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of identity authentication, and in particular to a distributed identity authentication method and system for an Internet of Things sensor device. Background Art

[0002] In recent years, with the rapid development of IoT technology, the application scale of IoT devices has shown explosive growth, and various physical devices, smart meters, wireless temperature sensors, smart vehicle accessories, etc. have been widely popularized and applied. However, the limitations of IoT devices, the complex network environment, and the currently used access control system based on centralized and hierarchical structures have brought new challenges to the field of IoT. First, due to the wide distribution of devices, complex application environment, and limited computing power, the centralized network model brings huge data infrastructure construction and cost investment. Secondly, the current centralized IoT platforms are incompatible with each other, which makes it difficult to achieve collaborative work and information sharing between IoT devices on different platforms. In addition, the centralized platform has poor ability to resist malicious attacks, and private data is easily leaked.

[0003] Identity authentication is the first line of defense for IoT security. IoT sensor devices need to ensure device security and data security through mutual identification and identity authentication. The number of IoT sensor devices will grow rapidly in the future, the application scale will be larger, and the security requirements will be higher. Therefore, it is urgent to realize distributed identity authentication and trusted access of IoT sensor devices. At present, there are three common schemes for IoT identity authentication: 1) In the identity authentication scheme based on public key infrastructure (PKI), the certificate authority assigns a digital certificate to each device, which contains the device's public key and the digital signature of the certificate authority. The device uses its own private key to generate a message signature, and the public key is used by the recipient to verify the signature. This scheme does not disclose the true identity of the device during the verification process. 2) In the identity-based signature (IBS) scheme, a private key generator (PKG) is set to distribute the device private key. In this way, the problem of device public key transmission can be solved. 3) In the certificateless signature (CLS)-based authentication scheme, the key generation center (KGC) generates a corresponding partial private key for the IoT sensor device based on its identity document (ID), and the device uses the secret value and the partial private key to generate the actual private key.

[0004] Although the above solutions can guarantee the security of identity authentication to a certain extent, they still cannot achieve more efficient and secure identity authentication. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a distributed identity authentication method and system for an Internet of Things sensor device, which can achieve efficient and secure identity authentication.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0007] A distributed identity authentication method for an Internet of Things sensor device comprises the following steps:

[0008] The sensor device signs the identity authentication request message using the device private key to obtain the signed identity authentication request message, and sends the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node;

[0009] The edge blockchain node receives the signed identity authentication request message, and verifies the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result;

[0010] The edge blockchain node determines whether the verification result is passed, and if so, generates a zero-knowledge proof and sends the zero-knowledge proof to the sensor device;

[0011] The sensor device sends the zero-knowledge proof to the edge blockchain node;

[0012] The edge blockchain node uses a smart contract to verify the validity of the zero-knowledge proof. If it is valid, it returns an identity authentication success message to the sensor device through a secure channel. If it is invalid, it returns an identity authentication failure message to the sensor device through a secure channel.

[0013] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0014] A distributed identity authentication system for an Internet of Things sensor device includes a sensor device and an edge blockchain node, wherein the sensor device includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the edge blockchain node includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, wherein the first processor implements the following steps when executing the first computer program:

[0015] Sign the identity authentication request message using the device private key to obtain a signed identity authentication request message, and send the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node;

[0016] When the second processor executes the second computer program, the following steps are implemented:

[0017] Receiving the signed identity authentication request message, and verifying the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result;

[0018] Determine whether the verification result is a passed verification, and if so, generate a zero-knowledge proof and send the zero-knowledge proof to the sensor device;

[0019] When the first processor executes the first computer program, the following steps are further implemented:

[0020] Sending the zero-knowledge proof to the edge blockchain node;

[0021] When the second processor executes the second computer program, the following steps are further implemented:

[0022] A smart contract is used to verify the validity of the zero-knowledge proof. If it is valid, an identity authentication success message is returned to the sensor device through a secure channel. If it is invalid, an identity authentication failure message is returned to the sensor device through a secure channel.

[0023] The beneficial effects of the present invention are as follows: the identity authentication request message signed by the sensor device and the identifier of the sensor device are sent to the edge blockchain node, the edge blockchain node verifies the signed identity authentication request message based on the identifier cryptographic algorithm using the identifier, and determines whether the verification result is passed. If so, a zero-knowledge proof is generated and sent to the sensor device, the sensor device sends the zero-knowledge proof to the edge blockchain node, and the edge blockchain node verifies the validity of the zero-knowledge proof using a smart contract. Since the blockchain is a distributed system, multiple edge blockchain nodes can maintain the same information without central authorization, effectively reducing the communication overhead with the sensor device, and the identity authentication can be automatically performed through the combination of zero-knowledge proof and smart contract, thereby improving the efficiency and anti-tampering capability of the system, thereby achieving efficient and secure identity authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A flowchart of a distributed identity authentication method for an Internet of Things sensor device according to an embodiment of the present invention;

[0025] Figure 2A schematic diagram of the structure of a distributed identity authentication system for an Internet of Things sensor device according to an embodiment of the present invention;

[0026] Figure 3 A schematic diagram of an Internet of Things environment in a distributed identity authentication method for an Internet of Things sensor device according to an embodiment of the present invention;

[0027] Figure 4 This is a schematic diagram of the ProVerif tool verification result code in the distributed identity authentication method for the Internet of Things sensor device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in conjunction with the implementation modes and the accompanying drawings.

[0029] Please refer to Figure 1 , a distributed identity authentication method for an Internet of Things sensor device, comprising the steps of:

[0030] The sensor device signs the identity authentication request message using the device private key to obtain the signed identity authentication request message, and sends the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node;

[0031] The edge blockchain node receives the signed identity authentication request message, and verifies the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result;

[0032] The edge blockchain node determines whether the verification result is passed, and if so, generates a zero-knowledge proof and sends the zero-knowledge proof to the sensor device;

[0033] The sensor device sends the zero-knowledge proof to the edge blockchain node;

[0034] The edge blockchain node uses a smart contract to verify the validity of the zero-knowledge proof. If it is valid, it returns an identity authentication success message to the sensor device through a secure channel. If it is invalid, it returns an identity authentication failure message to the sensor device through a secure channel.

[0035] From the above description, it can be seen that the beneficial effects of the present invention are: the identity authentication request message signed by the sensor device and the identifier of the sensor device are sent to the edge blockchain node, and the edge blockchain node uses the identifier to verify the signed identity authentication request message based on the identifier cryptographic algorithm, and determines whether the verification result is verified. If so, a zero-knowledge proof is generated and sent to the sensor device. The sensor device sends the zero-knowledge proof to the edge blockchain node, and the edge blockchain node uses a smart contract to verify the validity of the zero-knowledge proof. Since the blockchain is a distributed system, multiple edge blockchain nodes can maintain the same information without central authorization, effectively reducing the communication overhead with the sensor device, and the zero-knowledge proof combined with the smart contract can automatically perform identity authentication, thereby improving the efficiency and anti-tampering capability of the system, thereby achieving efficient and secure identity authentication.

[0036] Furthermore, the identification cryptographic algorithm is an SM9 algorithm;

[0037] The identity authentication request message after the signature is verified using the identity based on the identity cryptographic algorithm, and the verification result obtained includes:

[0038] The edge blockchain node verifies whether the first signature value in the signed identity authentication request message belongs to a preset value range, and whether the second signature value in the signed identity authentication request message belongs to a first N-order cyclic subgroup. If both are true, the first element in the first N-order cyclic subgroup is calculated according to the generator of the first N-order cyclic subgroup and the signature master private key, and the second element in the first N-order cyclic subgroup is calculated according to the first element in the first N-order cyclic subgroup and the first signature value, and the first integer in the first N-order cyclic subgroup is calculated according to the identifier;

[0039] The edge blockchain node calculates the first element in the second N-order cyclic subgroup according to the first integer, the generator in the second N-order cyclic subgroup, and the signature master public key;

[0040] The edge blockchain node calculates the third element in the first N-order cyclic subgroup according to the second signature value and the first element in the second N-order cyclic subgroup, and calculates the fourth element in the first N-order cyclic subgroup according to the third element in the first N-order cyclic subgroup and the second element in the first N-order cyclic subgroup;

[0041] The edge blockchain node calculates a second integer based on the fourth element in the first N-order cyclic subgroup, and determines whether the second integer is consistent with the first signature value. If so, the verification result is determined to be passed; if not, the verification result is determined to be failed.

[0042] From the above description, it can be seen that the SM9 algorithm uses the user's natural identity information as the public key, and does not require a public key certificate to prove the binding relationship between the user identity and the user's public key. The SM9 algorithm is used to verify the signed identity authentication request message first, which is more efficient and more secure.

[0043] Furthermore, the sensor device signs the identity authentication request message using the device private key, and before obtaining the signed identity authentication request message, it also includes:

[0044] The sensor device establishes a secure channel with the edge blockchain node;

[0045] The sensor device calculates a device public key according to an identifier of the sensor device, a generator in a first N-order cyclic subgroup, and a signature master public key;

[0046] All of the edge blockchain nodes as a key generation group calculate a first intermediate parameter based on the identification of the sensor device on a finite field;

[0047] If the first intermediate parameter is not 0, the edge blockchain node calculates a second intermediate parameter according to the first intermediate parameter, and sends the second intermediate parameter to the sensor device;

[0048] The sensor device calculates a device private key according to the second intermediate parameter sent by all the edge blockchain nodes;

[0049] The sensor device generates identity registration request information according to the device private key, timestamp and life time, and signs the identity registration request information to obtain the signed identity registration request information;

[0050] The sensor device sends the signed identity registration request information to the edge blockchain node through the secure channel;

[0051] The edge blockchain node checks whether the sensor device has been registered through a smart contract. If not, the identity information of the sensor device is registered and identity registration success information is returned to the sensor device.

[0052] From the above description, it can be seen that before identity authentication, the sensor device is first registered. In this process, all edge blockchain nodes act as a key generation group to assist the sensor device in generating device private keys, realizing distributed key generation, avoiding single point failures and centralization risks, and enhancing the security and reliability of the system.

[0053] Furthermore, the sensor device and the edge blockchain node establish a secure channel including:

[0054] The sensor device selects a random number, and calculates a temporary public key based on the random number and a generator in a first N-order cyclic subgroup;

[0055] The sensor device calculates a session key according to the node identifier of the edge blockchain node and the random number;

[0056] The sensor device generates a message and encrypts the message using the session key to obtain a ciphertext;

[0057] The sensor device sends the ciphertext, the random number and the temporary public key to the edge blockchain node;

[0058] The edge blockchain node uses the node private key, the random number and the temporary public key to recover the session key, and uses the session key to decrypt the ciphertext to obtain the message;

[0059] The edge blockchain node stores the session key.

[0060] From the above description, it can be seen that the sensor device and the edge blockchain node establish a secure channel between them by generating a session key. Subsequent important data can be transmitted through the secure channel, that is, the transmitted data is encrypted and decrypted using the session key, thereby ensuring the security of communication.

[0061] Furthermore, the sensor device signs the identity authentication request message using the device private key, and before obtaining the signed identity authentication request message, it also includes:

[0062] The sensor device performs hash calculation based on the factory information and the current timestamp to obtain the identification of the sensor device;

[0063] All of the edge blockchain nodes act as a key generation group to generate a signature master public key and a signature master private key.

[0064] From the above description, it can be seen that the sensor device performs hash calculation based on the factory information and the current timestamp to obtain the identification of the sensor device. All edge blockchain nodes act as a key generation group to generate a signature master public key and a signature master private key, thereby realizing system initialization and facilitating identity authentication of subsequent sensor devices.

[0065] Please refer to Figure 2Another embodiment of the present invention provides a distributed identity authentication system for an IoT sensor device, including a sensor device and an edge blockchain node, wherein the sensor device includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the edge blockchain node includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, wherein the first processor implements the following steps when executing the first computer program:

[0066] Sign the identity authentication request message using the device private key to obtain a signed identity authentication request message, and send the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node;

[0067] When the second processor executes the second computer program, the following steps are implemented:

[0068] Receiving the signed identity authentication request message, and verifying the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result;

[0069] Determine whether the verification result is a passed verification, and if so, generate a zero-knowledge proof and send the zero-knowledge proof to the sensor device;

[0070] When the first processor executes the first computer program, the following steps are further implemented:

[0071] Sending the zero-knowledge proof to the edge blockchain node;

[0072] When the second processor executes the second computer program, the following steps are further implemented:

[0073] A smart contract is used to verify the validity of the zero-knowledge proof. If it is valid, an identity authentication success message is returned to the sensor device through a secure channel. If it is invalid, an identity authentication failure message is returned to the sensor device through a secure channel.

[0074] From the above description, it can be seen that the beneficial effects of the present invention are: the identity authentication request message signed by the sensor device and the identifier of the sensor device are sent to the edge blockchain node, and the edge blockchain node uses the identifier to verify the signed identity authentication request message based on the identifier cryptographic algorithm, and determines whether the verification result is verified. If so, a zero-knowledge proof is generated and sent to the sensor device. The sensor device sends the zero-knowledge proof to the edge blockchain node, and the edge blockchain node uses a smart contract to verify the validity of the zero-knowledge proof. Since the blockchain is a distributed system, multiple edge blockchain nodes can maintain the same information without central authorization, effectively reducing the communication overhead with the sensor device, and the zero-knowledge proof combined with the smart contract can automatically perform identity authentication, thereby improving the efficiency and anti-tampering capability of the system, thereby achieving efficient and secure identity authentication.

[0075] Furthermore, the identification cryptographic algorithm is an SM9 algorithm;

[0076] When the second processor executes the second computer program, the following steps are further implemented:

[0077] Verify whether the first signature value in the signed identity authentication request message belongs to a preset value range, and whether the second signature value in the signed identity authentication request message belongs to a first N-order cyclic subgroup; if both are true, calculate the first element in the first N-order cyclic subgroup according to the generator of the first N-order cyclic subgroup and the signature master private key, calculate the second element in the first N-order cyclic subgroup according to the first element in the first N-order cyclic subgroup and the first signature value, and calculate the first integer in the first N-order cyclic subgroup according to the identifier;

[0078] Calculate a first element in the second N-order cyclic subgroup according to the first integer, a generator in the second N-order cyclic subgroup, and the signature master public key;

[0079] Calculate the third element in the first N-order cyclic subgroup according to the second signature value and the first element in the second N-order cyclic subgroup, and calculate the fourth element in the first N-order cyclic subgroup according to the third element in the first N-order cyclic subgroup and the second element in the first N-order cyclic subgroup;

[0080] A second integer is calculated according to the fourth element in the first N-order cyclic subgroup, and it is determined whether the second integer is consistent with the first signature value. If so, the verification result is determined to be passed; if not, the verification result is determined to be failed.

[0081] From the above description, it can be seen that the SM9 algorithm uses the user's natural identity information as the public key, and does not require a public key certificate to prove the binding relationship between the user identity and the user's public key. The SM9 algorithm is used to verify the signed identity authentication request message first, which is more efficient and more secure.

[0082] Furthermore, when the first processor executes the first computer program, the first processor further implements the following steps:

[0083] Establish a secure channel with edge blockchain nodes;

[0084] Calculate a device public key according to the identifier of the sensor device, the generator in the first N-order cyclic subgroup, and the signature master public key;

[0085] When the second processor executes the second computer program, the following steps are further implemented:

[0086] Establishing a secure channel with the sensor device;

[0087] calculating a first intermediate parameter based on the identification of the sensor device over a finite field as a key generation group;

[0088] If the first intermediate parameter is not 0, calculating a second intermediate parameter according to the first intermediate parameter, and sending the second intermediate parameter to the sensor device;

[0089] When the first processor executes the first computer program, the following steps are further implemented:

[0090] Calculate a device private key according to the second intermediate parameter sent by all the edge blockchain nodes;

[0091] Generate identity registration request information according to the device private key, timestamp and life time, and sign the identity registration request information to obtain signed identity registration request information;

[0092] Sending the signed identity registration request information to the edge blockchain node through the secure channel;

[0093] When the second processor executes the second computer program, the following steps are further implemented:

[0094] The smart contract is used to check whether the sensor device has been registered. If not, the identity information of the sensor device is registered, and identity registration success information is returned to the sensor device.

[0095] From the above description, it can be seen that before identity authentication, the sensor device is first registered. In this process, all edge blockchain nodes act as a key generation group to assist the sensor device in generating device private keys, realizing distributed key generation, avoiding single point failures and centralization risks, and enhancing the security and reliability of the system.

[0096] Furthermore, when the first processor executes the first computer program, the first processor further implements the following steps:

[0097] Select a random number, and calculate a temporary public key based on the random number and a generator in a first N-order cyclic subgroup;

[0098] Calculate a session key based on the node identifier of the edge blockchain node and the random number;

[0099] Generate a message, and encrypt the message using the session key to obtain a ciphertext;

[0100] Sending the ciphertext, the random number and the temporary public key to the edge blockchain node;

[0101] When the second processor executes the second computer program, the following steps are further implemented:

[0102] Recover the session key using the node private key, the random number and the temporary public key, and decrypt the ciphertext using the session key to obtain the message;

[0103] The session key is saved.

[0104] From the above description, it can be seen that the sensor device and the edge blockchain node establish a secure channel between them by generating a session key. Subsequent important data can be transmitted through the secure channel, that is, the transmitted data is encrypted and decrypted using the session key, thereby ensuring the security of communication.

[0105] Furthermore, when the first processor executes the first computer program, the first processor further implements the following steps:

[0106] Perform hash calculation based on factory information and current timestamp to obtain the identification of the sensor device;

[0107] When the second processor executes the second computer program, the following steps are further implemented:

[0108] As a key generation group, a signature master public key and a signature master private key are generated.

[0109] From the above description, it can be seen that the sensor device performs hash calculation based on the factory information and the current timestamp to obtain the identification of the sensor device. All edge blockchain nodes act as a key generation group to generate a signature master public key and a signature master private key, thereby realizing system initialization and facilitating identity authentication of subsequent sensor devices.

[0110] The distributed identity authentication method and system of the IoT sensor device described above in the present invention can be applied to the identity authentication scenario of the IoT perception layer sensor device, which is described below through specific implementation methods:

[0111] Please refer to Figure 1 , Figure 3 and Figure 4 , Embodiment 1 of the present invention is:

[0112] Build an IoT environment, such as Figure 3 As shown, it includes sensor devices at the IoT perception layer, RTU (remote system unit) / DTU (data transmission unit) devices at the edge layer that integrate the ZKWASM virtual machine module, and gateways. Multiple RTU / DTU devices are deployed as edge blockchain nodes through the blockchain network. At the same time, they can also be used as key generation groups in the future to store the latest process data of identity authentication in the blockchain. At the same time, the data will be persisted to an off-chain database that is consistent with the blockchain data to ensure the security, non-tamperability, and traceability of the authentication data.

[0113] A distributed identity authentication method for an Internet of Things sensor device comprises the following steps:

[0114] S1. The sensor device performs hash calculation based on the factory information and the current timestamp to obtain the sensor device S i Logo S IDi , specifically:

[0115] S IDi =Hash(FI||TS);

[0116] In the formula, Hash() represents the hash function, FI represents the factory information, and TS represents the current timestamp.

[0117] S2. All the edge blockchain nodes act as a key generation group to generate a signature master public key and a signature master private key.

[0118] Specifically, each edge blockchain node acts as a key generator to form a key generation group to generate a signature master public key and a signature master private key, specifically including S21-S23:

[0119] S21, set common parameters (G1, G2, e), where G1 represents the first N-order cyclic subgroup, G2 represents the second N-order cyclic subgroup, e: G1×G2→GT It is a bilinear pairing, choose generators P1∈G1 and P2∈G2.

[0120] S22. All key generators determine the random number s∈[1,N-1] and each holds another random number r i , where i represents the i-th key generator and N represents a 1024-bit large prime number used in the subsequent key generation process.

[0121] S23, each key generator calculates the element P in the second N-order cyclic subgroup G2 pub-s =[s]P2 and And calculate successively n represents the number of key generators, and the signature master key pair is (r, P pub-s , P pub-e ), r represents a random number, P pub-s Represents the signature master public key, P pub-e Represents the signature master private key.

[0122] S3. The sensor device establishes a secure channel with the edge blockchain node, including:

[0123] S31. The sensor device selects a random number, and calculates a temporary public key according to the random number and a generator in a first N-order cyclic subgroup.

[0124] Specifically, the sensor device selects a random number k and calculates a temporary public key P according to the random number k and the generator P1 in the first N-order cyclic subgroup G1. k =k·P1.

[0125] S32. The sensor device calculates a session key based on the node identifier of the edge blockchain node and the random number.

[0126] Specifically, the sensor device uses the node identification ID of the edge blockchain node K and random number k to calculate the session key T = H2(k*H1(ID K )), wherein H1() represents the first hash function and H2() represents the second hash function.

[0127] S33. The sensor device generates a message, and uses the session key to encrypt the message to obtain a ciphertext.

[0128] Specifically, the sensor device generates a message and encrypts the message using the session key T to obtain a ciphertext C.

[0129] S34. The sensor device sends the ciphertext, the random number and the temporary public key to the edge blockchain node.

[0130] S35. The edge blockchain node uses the node private key, the random number and the temporary public key to recover the session key, and uses the session key to decrypt the ciphertext to obtain the message.

[0131] The edge blockchain node uses the node private key, the random number and the temporary public key to restore the session key specifically as follows:

[0132] T=H2(d IDk *P k )=H2(k*H1(ID k ));

[0133] Where, d IDk Represents the node private key.

[0134] S36. The edge blockchain node saves the session key.

[0135] At this point, both parties have a session key that can be used to subsequently encrypt and decrypt transmitted data.

[0136] S4. The sensor device calculates a device public key according to the identifier of the sensor device, the generator in the first N-order cyclic subgroup, and the signature master public key, specifically:

[0137]

[0138] In the formula, Represents the device public key, and hid represents an identifier associated with the user, which is used to increase the security of the hash function.

[0139] S5. All the edge blockchain nodes as a key generation group calculate a first intermediate parameter based on the identifier of the sensor device on a finite field, specifically:

[0140] t1=H1(S IDi ||hid,N)+s;

[0141] Wherein, t1 represents the first intermediate parameter.

[0142] S6. If the first intermediate parameter is not 0, the edge blockchain node calculates the second intermediate parameter based on the first intermediate parameter and sends the second intermediate parameter to the sensor device. If the first intermediate parameter is 0, return to S1.

[0143] The edge blockchain node calculates the second intermediate parameter according to the first intermediate parameter, specifically:

[0144]

[0145] Where, ti Represents the second intermediate parameter.

[0146] S7. The sensor device calculates a device private key according to the second intermediate parameter sent by all the edge blockchain nodes, specifically:

[0147]

[0148] In the formula, Represents the device private key.

[0149] S8, the sensor device generates identity registration request information according to the device private key, timestamp and lifetime, and signs the identity registration request information to obtain the signed identity registration request information, specifically including S81-S85:

[0150] S81, sensor device according to device private key Timestamp TS and lifetime LT generate identity registration request information

[0151] S82, calculate the element g=e(P1, P1) in the first N-order cyclic subgroup G1. pub-e ).

[0152] S83, select a random number r∈[1,N-1], calculate w=g r And the integer h = H2(M reg ||w,N).

[0153] S84. Calculate the integer l=(rh)modN.

[0154] S85, if l is 0, return to S83 to execute; if l is not 0, calculate Get the signed identity registration request information (h, S).

[0155] S9. The sensor device sends the signed identity registration request information to the edge blockchain node through the secure channel.

[0156] Specifically, the sensor device encrypts the signed identity registration request information (h, S) using the session key T and sends it to the edge blockchain node.

[0157] S10. The edge blockchain node checks whether the sensor device has been registered through a smart contract. If not, the identity information of the sensor device is registered and identity registration success information is returned to the sensor device.

[0158] Specifically, the edge blockchain node uses the session key T to decrypt the received encrypted and signed identity registration request information (h, S), and checks whether the sensor device has been registered through the smart contract according to the signed identity registration request information (h, S). If it has been registered, it refuses to register repeatedly. If it has not been registered, it stores the signed identity registration request information (h, S) in the blockchain in the structure of the Verkle tree, and returns the identity registration success information to the sensor device. The identity registration contract in the blockchain is divided into a variable area and a function area. The variable area contains a mapping structure that maps user identity information. The function area contains the IdentityRegistered() function, which is used to register identity information, and the IdentityUpdated() function, which is used to update user identity information.

[0159] Among them, the Verkle tree is an optimization of the Merkle tree and is a bandwidth-efficient alternative. In the application process, the Verkle tree can be used to store a large amount of data and generate a short proof for any one or a group of data objects. The data can be verified by simply having the root node of the tree structure. For VT, its construction is similar to MT, but it uses vector commitments instead of cryptographic hash functions, and can reduce the size of the proof provided during the application process, thereby reducing bandwidth consumption. For example, to store files F0, F1, ..., Fn, first select the branching factor k of the Verkle tree, then group the files into k subsets, and calculate the vector commitment C on each file subset and the membership proof πi of each vector commitment of each file Fi in the subset about C. Finally, continue to calculate the vector commitments C1, C2, and C3, and calculate the membership proofs π9, π10, and π11 of commitments C1, C2, and C3 relative to commitment C4, respectively. The summary of the Verkle tree is the root commitment, as shown in the figure, which is C4. The branching factor k is variable and can be adapted to different criteria, and the exact value of k may vary from application to application, depending on environment-specific optimizations between computing power and bandwidth. For example, the branching factor can be reduced from k=1024 to k=32, which will significantly reduce the computing power required for the Verkle tree to only 8.4 milliseconds per leaf, about 13 times faster. Therefore, applications that make frequent updates to their trees may wish to choose a lower branching factor, while more static Verkle trees can be maintained with a higher branching factor, saving bandwidth and reducing the size of membership proofs.

[0160] S11. The sensor device signs the identity authentication request message using the device private key to obtain the signed identity authentication request message, and sends the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node.

[0161] Specifically, the sensor device uses the device private key Sign the identity authentication request message M′ to obtain the signed identity authentication request message (h′, S′), and send the signed identity authentication request message (h′, S′) and the sensor device identifier S IDi Sent to edge blockchain nodes.

[0162] S12, the edge blockchain node receives the signed identity authentication request message, and verifies the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result, specifically including S121-S124:

[0163] Among them, the identification password algorithm is the SM9 algorithm.

[0164] S121. The edge blockchain node verifies whether the first signature value in the signed identity authentication request message belongs to a preset numerical range, and whether the second signature value in the signed identity authentication request message belongs to a first N-order cyclic subgroup. If both are true, the first element in the first N-order cyclic subgroup is calculated based on the generator of the first N-order cyclic subgroup and the signature master private key, and the second element in the first N-order cyclic subgroup is calculated based on the first element in the first N-order cyclic subgroup and the first signature value, and the first integer in the first N-order cyclic subgroup is calculated based on the identifier.

[0165] Specifically, the edge blockchain node verifies whether the first signature value h' in the signed authentication request message (h', S') belongs to [1, N-1], and whether the second signature value S' in the signed authentication request message (h', S') belongs to the first N-order cyclic subgroup G1. If both are true, then according to the generator P1 of the first N-order cyclic subgroup G1 and the signature master private key P pub-e Calculate the first element g=e(P1,P pub-e ), and calculate the second element t=g in the first N-order cyclic subgroup G1 according to the first element g in the first N-order cyclic subgroup G1 and the first signature value h′ h' , according to the identification S IDi Compute the first integer of G1 in the first N-order cyclic subgroup

[0166] S122. The edge blockchain node calculates the first element in the second N-order cyclic subgroup based on the first integer, the generator in the second N-order cyclic subgroup, and the signature master public key.

[0167] Specifically, the edge blockchain node generates a signature based on the first integer h1, the generator P2 in the second N-order cyclic subgroup G2, and the signature master public key P pub-s Compute the first element of the second N-order cyclic subgroup G2

[0168] S123. The edge blockchain node calculates the third element in the first N-order cyclic subgroup based on the second signature value and the first element in the second N-order cyclic subgroup, and calculates the fourth element in the first N-order cyclic subgroup based on the third element in the first N-order cyclic subgroup and the second element in the first N-order cyclic subgroup.

[0169] Specifically, the edge blockchain node is based on the second signature value S′ and the first element in the second N-order cyclic subgroup G2. Compute the third element in the first N-order cyclic subgroup G1 And the fourth element w′=u·t in the first N-order cyclic subgroup G1 is calculated according to the third element u in the first N-order cyclic subgroup G1 and the second element t in the first N-order cyclic subgroup G1.

[0170] S124. The edge blockchain node calculates a second integer based on the fourth element in the first N-order cyclic subgroup, and determines whether the second integer is consistent with the first signature value. If so, the verification result is determined to be passed; if not, the verification result is determined to be failed.

[0171] Specifically, the edge blockchain node calculates the second integer h2=H2(M'||w',N) based on the fourth element w′ in the first N-order cyclic subgroup G1, and determines whether the second integer h2 is consistent with the first signature value h′. If so, the verification result is determined to be passed; if not, the verification result is determined to be failed.

[0172] S13. The edge blockchain node determines whether the verification result is passed. If so, a zero-knowledge proof is generated and sent to the sensor device.

[0173] Specifically, the edge blockchain node determines whether the verification result is passed. If so, it uses the ZKWASM (zero-knowledge WebAssembly) virtual machine module to generate a zero-knowledge proof and sends the zero-knowledge proof to the sensor device.

[0174] ZKWASM combines the cross-platform advantages of WASM with zero-knowledge proof technology, allowing developers to write code in familiar high-level programming languages. These codes are then compiled into WASM modules and further converted into verifiable zero-knowledge proofs, greatly simplifying the development process. Developers do not need to have an in-depth understanding of complex cryptographic principles to convert business logic into secure and efficient off-chain calculations, and ensure the correctness and privacy of their results through zero-knowledge proofs.

[0175] S14. The sensor device sends the zero-knowledge proof to the edge blockchain node.

[0176] S15. The edge blockchain node uses a smart contract to verify the validity of the zero-knowledge proof. If it is valid, an identity authentication success message is returned to the sensor device through a secure channel. If it is invalid, an identity authentication failure message is returned to the sensor device through a secure channel.

[0177] ProVerif (a tool for verifying the security of protocols) formal tool software is used for security analysis. ProVerif is a cryptographic protocol analysis tool developed by Bruno Blanchet. It is based on the Dolev-Yao model and is a commonly used formal automatic verification tool for cryptographic protocols. ProVerif is developed using the Prolog language and can describe most cryptographic primitives such as shared keys, public keys, hash functions, Deffie-Hellman key exchange protocols, etc. Its input language is the application of PI calculus or Horn sentences.

[0178] The ProVerif formalized tool software is used to verify the main steps of the identity authentication of the present invention, such as Figure 4 As shown, Figure 4 The ProVerif tool verification result code is displayed, which shows that the distributed identity authentication described in this invention is safe and reliable and can meet the needs of user identity authentication in the IoT scenario. The specific conclusions are as follows:

[0179] (1) Unforgeability: The verification results show that attackers cannot forge legitimate signatures or keys, ensuring the unforgeability of identity authentication.

[0180] (2) Security: The system can effectively resist malicious KGC (Key Generation Center) node attacks and public key replacement attacks, ensuring the security and reliability of the sensor's identity authentication process in the edge layer network.

[0181] (3) Integrity: Through ProVerif verification, all declared security properties are met, further proving the robustness and anti-attack capabilities of the system.

[0182] (4) Through formal verification using the ProVerif tool, the practicality and security of the distributed identity authentication method described in the present invention in the IoT scenario are further enhanced.

[0183] According to the security model of certificateless signature, the scheme needs to ensure that the member key cannot be forged for the signature.

[0184] Type 1 adversary: ​​public key replacement attack. Public key replacement attack means that the attacker attacks by replacing the public key of the legitimate user. The identity-based certificateless signature algorithm of the present invention effectively resists this attack:

[0185] (1) The signature verification process is based on identity, not an independent public key. For the signature algorithm, because the identity-based certificateless signature algorithm uses the node ID to sign the public key, it can resist public key replacement attacks.

[0186] (2) The system master key is inaccessible: The adversary cannot obtain the system master key because the system master key is jointly generated and managed by multiple key generator nodes in the key generation group.

[0187] (3) Elliptic Curve Discrete Logarithm Problem (ECDLP): The adversary cannot deduce the private key of a node by solving the discrete logarithm problem on an elliptic curve.

[0188] (4) The probability of signature verification is extremely small: Since the adversary cannot obtain the system master key and the node’s private key, the probability that the adversary’s forged signature σ matches the legitimate signature is extremely small, u1=u2, so the probability of passing the verification is also extremely small.

[0189] Type 2 adversary: ​​malicious KGC attack:

[0190] (1) For the master key, the system master key is jointly managed by multiple nodes in the key generation group. A single node cannot obtain the complete system master key. Even if a malicious KGC node knows part of the value of the system master key and the random number it holds, it still cannot obtain the complete master key.

[0191] (2) For signatures, each KGC node can only obtain the part of the private key related to itself. Due to the problem of solving discrete logarithms on elliptic curves, attackers cannot obtain the complete private key from the known private key. Therefore, attackers cannot forge legitimate signatures.

[0192] In summary, the present invention designs a distributed key generation mechanism to avoid single point failures and centralization risks, thereby enhancing the security and reliability of the system; through zero-knowledge proof and Verkle tree-based blockchain technology, a decentralized and auditable identity registration and authentication process is realized; in addition, the use of smart contracts to automatically perform key management and identity authentication improves the efficiency and tamper-proof capabilities of the system, provides a new design idea for the identity authentication of sensor devices in edge layer networks, and effectively improves the overall security.

[0193] As a distributed system, multiple network nodes of blockchain can maintain the same information without central authorization, which can effectively reduce the communication overhead between IoT sensor devices, gateways, etc. Based on the above characteristics of IoT and blockchain technology, a signature scheme based on the decentralized SM9 algorithm is constructed to achieve more efficient and secure device identity authentication.

[0194] Please refer to Figure 2 , Embodiment 2 of the present invention is:

[0195] A distributed identity authentication system for an Internet of Things sensor device, comprising a sensor device and an edge blockchain node, wherein the sensor device comprises a first memory, a first processor, and a first computer program stored on the first memory and executable on the first processor, and the edge blockchain node comprises a second memory, a second processor, and a second computer program stored on the second memory and executable on the second processor, wherein the first processor implements the steps executed by the sensor device in the above-mentioned distributed identity authentication method for an Internet of Things sensor device when executing the first computer program;

[0196] When the second processor executes the second computer program, the steps performed by the edge blockchain node in the above-mentioned distributed identity authentication method for an Internet of Things sensor device are implemented.

[0197] In summary, the present invention provides a distributed identity authentication method and system for an IoT sensor device. The identity authentication request message signed by the sensor device and the identifier of the sensor device are sent to the edge blockchain node. The edge blockchain node verifies the signed identity authentication request message based on the identifier cryptographic algorithm and determines whether the verification result is passed. If so, a zero-knowledge proof is generated and sent to the sensor device. The sensor device sends the zero-knowledge proof to the edge blockchain node. The edge blockchain node verifies the validity of the zero-knowledge proof using a smart contract. Since the blockchain is a distributed system, multiple edge blockchain nodes can maintain the same information without central authorization, effectively reducing the communication with the transmission network. The communication overhead between sensor devices is reduced, and identity authentication can be automatically performed through zero-knowledge proof combined with smart contracts, which improves the efficiency and tamper-proof ability of the system, thereby realizing efficient and secure identity authentication. In addition, before identity authentication, the sensor device is first registered. In this process, all edge blockchain nodes act as key generation groups to assist sensor devices in generating device private keys, realizing distributed key generation, avoiding single point failures and centralization risks, and enhancing the security and reliability of the system. At the same time, the sensor device and the edge blockchain node establish a secure channel between the two by generating a session key. Subsequent important data can be transmitted through the secure channel, that is, the transmitted data is encrypted and decrypted using the session key, ensuring the security of communication.

[0198] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A distributed identity authentication method for an Internet of Things sensor device, characterized in that: Includes steps: The sensor device signs the identity authentication request message using the device private key to obtain the signed identity authentication request message, and sends the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node; The edge blockchain node receives the signed identity authentication request message, and verifies the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result; The edge blockchain node determines whether the verification result is passed, and if so, generates a zero-knowledge proof and sends the zero-knowledge proof to the sensor device; The sensor device sends the zero-knowledge proof to the edge blockchain node; The edge blockchain node uses a smart contract to verify the validity of the zero-knowledge proof. If it is valid, it returns an identity authentication success message to the sensor device through a secure channel. If it is invalid, it returns an identity authentication failure message to the sensor device through a secure channel.

2. A distributed identity authentication method for an Internet of Things sensor device according to claim 1, characterized in that: The identification cryptographic algorithm is the SM9 algorithm; The identity authentication request message after the signature is verified using the identity based on the identity cryptographic algorithm, and the verification result obtained includes: The edge blockchain node verifies whether the first signature value in the signed identity authentication request message belongs to a preset value range, and whether the second signature value in the signed identity authentication request message belongs to a first N-order cyclic subgroup. If both are true, the first element in the first N-order cyclic subgroup is calculated according to the generator of the first N-order cyclic subgroup and the signature master private key, and the second element in the first N-order cyclic subgroup is calculated according to the first element in the first N-order cyclic subgroup and the first signature value, and the first integer in the first N-order cyclic subgroup is calculated according to the identifier; The edge blockchain node calculates the first element in the second N-order cyclic subgroup according to the first integer, the generator in the second N-order cyclic subgroup, and the signature master public key; The edge blockchain node calculates the third element in the first N-order cyclic subgroup according to the second signature value and the first element in the second N-order cyclic subgroup, and calculates the fourth element in the first N-order cyclic subgroup according to the third element in the first N-order cyclic subgroup and the second element in the first N-order cyclic subgroup; The edge blockchain node calculates a second integer based on the fourth element in the first N-order cyclic subgroup, and determines whether the second integer is consistent with the first signature value. If so, the verification result is determined to be passed; if not, the verification result is determined to be failed.

3. A distributed identity authentication method for an Internet of Things sensor device according to claim 1, characterized in that: The sensor device signs the identity authentication request message using the device private key, and before obtaining the signed identity authentication request message, the method further includes: The sensor device establishes a secure channel with the edge blockchain node; The sensor device calculates a device public key according to an identifier of the sensor device, a generator in a first N-order cyclic subgroup, and a signature master public key; All of the edge blockchain nodes as a key generation group calculate a first intermediate parameter based on the identification of the sensor device on a finite field; If the first intermediate parameter is not 0, the edge blockchain node calculates a second intermediate parameter according to the first intermediate parameter, and sends the second intermediate parameter to the sensor device; The sensor device calculates a device private key according to the second intermediate parameter sent by all the edge blockchain nodes; The sensor device generates identity registration request information according to the device private key, timestamp and life time, and signs the identity registration request information to obtain the signed identity registration request information; The sensor device sends the signed identity registration request information to the edge blockchain node through the secure channel; The edge blockchain node checks whether the sensor device has been registered through a smart contract. If not, the identity information of the sensor device is registered and identity registration success information is returned to the sensor device.

4. A distributed identity authentication method for an Internet of Things sensor device according to claim 3, characterized in that: The sensor device and the edge blockchain node establish a secure channel including: The sensor device selects a random number, and calculates a temporary public key based on the random number and a generator in a first N-order cyclic subgroup; The sensor device calculates a session key according to the node identifier of the edge blockchain node and the random number; The sensor device generates a message and encrypts the message using the session key to obtain a ciphertext; The sensor device sends the ciphertext, the random number and the temporary public key to the edge blockchain node; The edge blockchain node uses the node private key, the random number and the temporary public key to recover the session key, and uses the session key to decrypt the ciphertext to obtain the message; The edge blockchain node stores the session key.

5. The distributed identity authentication method for an Internet of Things sensor device according to claim 2, characterized in that: The sensor device signs the identity authentication request message using the device private key, and before obtaining the signed identity authentication request message, the method further includes: The sensor device performs hash calculation based on the factory information and the current timestamp to obtain the identification of the sensor device; All of the edge blockchain nodes act as a key generation group to generate a signature master public key and a signature master private key.

6. A distributed identity authentication system for an IoT sensor device, comprising a sensor device and an edge blockchain node, wherein the sensor device comprises a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the edge blockchain node comprises a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, characterized in that: When the first processor executes the first computer program, the following steps are implemented: Sign the identity authentication request message using the device private key to obtain a signed identity authentication request message, and send the signed identity authentication request message and the identifier of the sensor device to the edge blockchain node; When the second processor executes the second computer program, the following steps are implemented: Receiving the signed identity authentication request message, and verifying the signed identity authentication request message using the identifier based on an identifier cryptographic algorithm to obtain a verification result; Determine whether the verification result is a passed verification, and if so, generate a zero-knowledge proof and send the zero-knowledge proof to the sensor device; When the first processor executes the first computer program, the following steps are further implemented: Sending the zero-knowledge proof to the edge blockchain node; When the second processor executes the second computer program, the following steps are further implemented: A smart contract is used to verify the validity of the zero-knowledge proof. If it is valid, an identity authentication success message is returned to the sensor device through a secure channel. If it is invalid, an identity authentication failure message is returned to the sensor device through a secure channel.

7. A distributed identity authentication system for IoT sensor devices according to claim 6, characterized in that: The identification cryptographic algorithm is the SM9 algorithm; When the second processor executes the second computer program, the following steps are further implemented: Verify whether the first signature value in the signed identity authentication request message belongs to a preset value range, and whether the second signature value in the signed identity authentication request message belongs to a first N-order cyclic subgroup; if both are true, calculate the first element in the first N-order cyclic subgroup according to the generator of the first N-order cyclic subgroup and the signature master private key, calculate the second element in the first N-order cyclic subgroup according to the first element in the first N-order cyclic subgroup and the first signature value, and calculate the first integer in the first N-order cyclic subgroup according to the identifier; Calculate a first element in the second N-order cyclic subgroup according to the first integer, a generator in the second N-order cyclic subgroup, and the signature master public key; Calculate the third element in the first N-order cyclic subgroup according to the second signature value and the first element in the second N-order cyclic subgroup, and calculate the fourth element in the first N-order cyclic subgroup according to the third element in the first N-order cyclic subgroup and the second element in the first N-order cyclic subgroup; A second integer is calculated according to the fourth element in the first N-order cyclic subgroup, and it is determined whether the second integer is consistent with the first signature value. If so, the verification result is determined to be passed; if not, the verification result is determined to be failed.

8. The distributed identity authentication system for IoT sensor devices according to claim 6, characterized in that: When the first processor executes the first computer program, the following steps are further implemented: Establish a secure channel with edge blockchain nodes; Calculate a device public key according to the identifier of the sensor device, the generator in the first N-order cyclic subgroup, and the signature master public key; When the second processor executes the second computer program, the following steps are further implemented: Establishing a secure channel with the sensor device; calculating a first intermediate parameter based on the identification of the sensor device over a finite field as a key generation group; If the first intermediate parameter is not 0, calculating a second intermediate parameter according to the first intermediate parameter, and sending the second intermediate parameter to the sensor device; When the first processor executes the first computer program, the following steps are further implemented: Calculate a device private key according to the second intermediate parameter sent by all the edge blockchain nodes; Generate identity registration request information according to the device private key, timestamp and life time, and sign the identity registration request information to obtain signed identity registration request information; Sending the signed identity registration request information to the edge blockchain node through the secure channel; When the second processor executes the second computer program, the following steps are further implemented: The smart contract is used to check whether the sensor device has been registered. If not, the identity information of the sensor device is registered, and identity registration success information is returned to the sensor device.

9. A distributed identity authentication system for IoT sensor devices according to claim 8, characterized in that: When the first processor executes the first computer program, the following steps are further implemented: Select a random number, and calculate a temporary public key based on the random number and a generator in a first N-order cyclic subgroup; Calculate a session key based on the node identifier of the edge blockchain node and the random number; Generate a message, and encrypt the message using the session key to obtain a ciphertext; Sending the ciphertext, the random number and the temporary public key to the edge blockchain node; When the second processor executes the second computer program, the following steps are further implemented: Recover the session key using the node private key, the random number and the temporary public key, and decrypt the ciphertext using the session key to obtain the message; The session key is saved.

10. The distributed identity authentication system for IoT sensor devices according to claim 7, characterized in that: When the first processor executes the first computer program, the following steps are further implemented: Perform hash calculation based on factory information and current timestamp to obtain the identification of the sensor device; When the second processor executes the second computer program, the following steps are further implemented: As a key generation group, a signature master public key and a signature master private key are generated.