An Internet of Things system authentication method based on distributed blockchain

By adopting distributed blockchain technology and Merkel tree in the Internet of Things system, the secure, efficient in-domain and inter-domain authentication problems between IoT devices are solved, and a secure, efficient and real-time authentication process is achieved.

CN119254408BActive Publication Date: 2025-03-14QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411783730.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-14
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to achieve secure and efficient in-domain and inter-domain authentication between IoT devices, especially in the case of diversified network topology and limited computing capabilities.

Method used

The authentication method based on distributed blockchain is adopted, through the collaboration of private blockchains and consortium blockchains, the Merkel tree is used for identity verification and data consensus, and the secure and efficient authentication of IoT devices is achieved.

Benefits of technology

It realizes secure and efficient in-domain and inter-domain authentication between IoT devices, enhances data security and privacy, and meets real-time and complex computing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254408B_ABST
    Figure CN119254408B_ABST
Patent Text Reader

Abstract

The present invention discloses an Internet of Things system authentication method based on distributed blockchain, which belongs to the field of Internet of Things technology. The technical problem to be solved is how to achieve safe and efficient intra-domain and inter-domain authentication between Internet of Things devices with the help of blockchain. It is applied to an Internet of Things system including an edge server, an Internet of Things device and a domain administrator node. The edge server and the Internet of Things devices managed by it are registered to a private blockchain to form a private domain. The domain administrator node of each private domain is registered to a consortium blockchain. The private blocks corresponding to the domain administrator node, the edge server and the Internet of Things device in the consortium blockchain form a Merkle tree. It includes three steps: system initialization, intra-domain authentication and inter-domain authentication, and achieves safe and efficient intra-domain and inter-domain authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to an Internet of Things system authentication method based on distributed blockchain. Background Art

[0002] Internet of Things (IoT) technology is widely used in many fields such as smart homes, smart cities, industrial automation, and healthcare. This massive growth of devices has not only led to the generation of massive amounts of data, but also brought challenges in secure communication and data management between devices. In order to ensure security, convenience, efficiency, sustainability, and economy, large IoT systems are usually divided into multiple domains, that is, divided by different accounts and access rights. Faced with the diversity of IoT devices and complex network topologies such as star, mesh, or daisy chain, identity authentication becomes extremely complex. In this context, traditional centralized authentication management solutions are vulnerable to attacks such as impersonation attacks, modification attacks, man-in-the-middle attacks, and denial of service attacks, and can no longer meet the challenges of the rapid growth of IoT devices and diversified network requirements. Therefore, there is an urgent need to develop a cross-domain identity authentication mechanism to ensure secure communication between devices.

[0003] Blockchain technology has a series of significant advantages, such as decentralization, data immutability, traceability, enhanced trust, anti-censorship and flexibility, and is widely used in many fields such as finance, supply chain, medical care, copyright protection, voting systems, etc. However, most of the current blockchain-based cross-domain authentication solutions are only implemented through a single blockchain. In actual applications, each cross-domain communication needs to be re-performed, resulting in low authentication efficiency, limited computing and storage capabilities of IoT device nodes, insufficient for complex identity authentication and encryption calculations, a large number of mobile nodes that need to be dynamically registered and authenticated, key management issues, and difficulty in meeting real-time requirements.

[0004] How to use blockchain to achieve secure and efficient intra-domain and inter-domain authentication between IoT devices is a technical problem that needs to be solved. Summary of the invention

[0005] The technical task of the present invention is to address the above shortcomings and provide an Internet of Things system authentication method based on distributed blockchain to solve the technical problem of how to use blockchain to achieve secure and efficient intra-domain and inter-domain authentication between Internet of Things devices.

[0006] The present invention discloses an Internet of Things system authentication method based on a distributed blockchain, which is applied to an Internet of Things system including an edge server, an Internet of Things device and a domain administrator node. The edge server and the Internet of Things device managed by the edge server are registered to a private blockchain to form a private domain. The domain administrator node of each private domain is registered to a consortium blockchain. A Merkle tree is constructed in each private blockchain and consortium blockchain according to the blocks therein. The method comprises the following steps:

[0007] System initialization: The domain administrator node builds an identity authentication block based on its identity, public key and system parameters and registers it to the private blockchain, and registers it to the alliance blockchain using its identity, public key and block number of the identity authentication block as identity information. For edge servers and IoT devices that serve as edge nodes, the domain administrator node builds the identity authentication block of the edge computing node based on its identity information and the identity information of the edge node, and uploads the identity authentication block to the private blockchain and alliance blockchain to which it belongs. The identity information of the edge node includes its identity, public key and identity signature. The public key of the edge node is allocated by the domain administrator node, and the identity signature of the edge computing node is a hash calculation based on the domain administrator node identity and the edge node identity.

[0008] Intra-domain authentication: The IoT device constructs intra-domain authentication information based on its identity and the identity of the domain administrator node. The intra-domain authentication information is encrypted using the public key of the edge server to which other IoT devices in the same private domain belong, and then sent to the edge server for decryption and identity authentication.

[0009] Inter-domain authentication: The IoT device constructs inter-domain authentication information based on its identity, identity signature, and the identity of the domain administrator node. The inter-domain authentication information is encrypted using the public key of the edge server to which the IoT device belongs in another private domain and sent to the edge server. The edge server in the other private domain cooperates with the domain administrator node to perform identity authentication on the inter-domain authentication information based on the Merkle root proof.

[0010] Preferably, the system initialization includes the following steps:

[0011] Domain administrator node initialization: For each private domain, the domain administrator node initializes system parameters and builds its own public key and private key. Based on its identity, public key and system parameters, it builds a block as an authentication block and sends it to the edge server and IoT device for verification. Based on its identity, public key and the block number of the authentication block, it creates a new block as the domain administrator node's block and uploads it to the alliance blockchain.

[0012] Edge server registration: For each edge server, the domain administrator node verifies the edge server based on its identity and verification public key, and assigns a public key and a private key to the edge server. The edge server broadcasts its identity and public key to other edge servers. The domain administrator node builds a block as the edge server's block based on its identity, public key, and block number of the authentication block, as well as the edge server's identity, public key, and identity signature, and uploads the edge server's block to its private blockchain and consortium blockchain, where the edge server's identity signature is a hash calculation based on the domain administrator node's identity and the edge server's identity.

[0013] IoT device registration: For each IoT device, based on its identity and verification public key, the domain administrator node verifies the IoT device and assigns a pseudonymous identity, public key and private key to the IoT device. The IoT device broadcasts its pseudonymous identity and public key to other IoT devices. The domain administrator node creates a block as the IoT device's block based on its identity, public key and block number of the authentication block and the pseudonymous identity, public key and identity signature of the IoT device, and uploads the IoT device's block to the private blockchain and consortium blockchain to which it belongs. The domain administrator node encrypts the pseudonymous identity of the IoT device based on the public key of the edge server to which the IoT device belongs and sends it to the corresponding edge server, where the identity signature of the IoT device is a hash calculation based on the domain administrator node identity and the pseudonymous identity of the IoT device.

[0014] Correspondingly, during intra-domain authentication, for two IoT devices as the sender and receiver in the same private domain, the IoT device at the sender end builds intra-domain authentication information based on its pseudonymous identity, verification public key and identity signature, and the identity of the domain administrator node, encrypts the intra-domain authentication information through the public key of the edge server at the receiver end to form an intra-domain authentication ciphertext, and sends it to the edge server at the receiver end. The edge server at the receiver end decrypts the intra-domain authentication ciphertext and verifies it based on the domain administrator node identity and the pseudonymous identity and identity signature of the IoT device. After the verification is passed, the intra-domain authentication is successful, wherein the edge server at the receiver end manages the IoT device as the receiver end;

[0015] Correspondingly, during inter-domain authentication, for two IoT devices located in different private domains, serving as the sender and receiver, the sending IoT device builds inter-domain authentication information based on its pseudonymous identity, verification public key and identity signature, and the identity of the domain administrator node of the private domain to which it belongs, encrypts the inter-domain authentication information through the public key of the receiving edge server to form an inter-domain authentication ciphertext, and sends it to the receiving edge server. The receiving edge server forwards the inter-domain authentication ciphertext to the domain administrator node of the private domain to which it belongs. The receiving domain administrator node decrypts the inter-domain authentication ciphertext, verifies it based on the identity of the sending domain administrator node and the pseudonymous identity of the sending IoT device, and verifies the identity signature of the sending IoT device based on the Merkle root proof. After the verification is successful, the inter-domain authentication is successful.

[0016] As a preferred embodiment, when the edge server is registered, the following is performed:

[0017] The edge server performs hash calculation based on its identity and verification public key, the public key of the domain administrator node, and the timestamp to form the authentication ciphertext;

[0018] The domain administrator node performs identity authentication based on the authentication ciphertext sent by the edge server. After the authentication is passed, the domain administrator node performs hash calculation based on the verification data, timestamp, and identity identifier, verification public key, and identity signature of the edge server to form a data authentication ciphertext.

[0019] The edge server verifies that the data has not been tampered with based on the data verification ciphertext sent by the domain administrator node;

[0020] After verification, the edge server broadcasts its identity and verification public key to other edge servers, and builds its public and private keys based on its verification public key and the received verification data;

[0021] After the domain administrator node verifies the edge server based on the identity signature, it builds a block as the edge server's block based on its identity, public key, and block number of the authentication block as well as the edge server's identity, public key, and identity signature, and uploads the edge server's block to its private blockchain and alliance blockchain;

[0022] The consortium blockchain verifies and reaches information consensus on the blocks of edge servers based on the identity signatures of edge servers.

[0023] As a preferred method, when registering an IoT device, the following is performed:

[0024] The IoT device performs hash calculation based on its identity and verification public key, the public key of the domain administrator node, and the timestamp to form an authentication ciphertext;

[0025] The domain administrator node authenticates the IoT device based on the authentication ciphertext sent by the IoT device. After the authentication is passed, the domain administrator node calculates the pseudonymous identity of the IoT device based on the identity of the IoT device and the verification public key, performs hash calculation based on the verification data, timestamp, pseudonymous identity, verification public key and identity signature generated by it to form the device-side data verification ciphertext, and performs hash calculation based on the timestamp, pseudonymous identity and verification public key of the IoT device to form the server-side data verification ciphertext;

[0026] The IoT device verifies that the data has not been tampered with based on the device-side data verification ciphertext sent by the domain administrator node. After the verification is passed, the IoT device broadcasts its pseudonymous identity and verification public key to other IoT devices, and constructs its public key and private key based on its verification public key and the received verification data;

[0027] After the domain administrator node verifies the IoT device based on the identity signature, it creates a block as the IoT device's block based on its identity and public key, timestamp, and the IoT device's pseudonymous identity, public key, and identity signature, and uploads the IoT device's block to its private blockchain and alliance blockchain. The alliance blockchain verifies the IoT device's block and reaches information consensus based on the identity signature.

[0028] After receiving the server-side data verification ciphertext sent by the domain administrator node, the edge server managing the Internet of Things device decrypts the server-side data verification ciphertext to obtain the pseudonym identity of the Internet of Things device.

[0029] Preferably, the domain administrator node initialization includes the following steps:

[0030] Based on elliptic curve cryptography, the domain administrator node generates a Prime number of bits , a finite field System elliptic curve on , a cyclic additive point group and a generator ;

[0031] The domain administrator node defines the following one-way hash function:

[0032] ,

[0033] ,

[0034] ,

[0035] ,

[0036] And generate random numbers as a private key, and construct a public key based on the generator , ;

[0037] The domain administrator node generates a transaction , affairs Contains the coordinate information of the administrator node , Identity , , , , , And one-way hash functions ,in, , , , And one-way hash functions As system parameters;

[0038] The domain administrator node will Packaged into a label The new block is used as the authentication block, and the authentication block is sent to the edge server and IoT device in the private domain. After receiving the authentication block, the edge server and IoT device detect the identity of the domain administrator node. Does it exist in a private blockchain? Already exists in the private blockchain, the verification fails. Otherwise, the identity verification block is used as the initial genesis block of the private blockchain;

[0039] After successful authentication, the domain administrator node will identify its identity , public key and the block number of the authentication block Package it into a new block as the block of the domain administrator node, and upload the block of the domain administrator node to the alliance blockchain.

[0040] Preferably, the edge server registration includes the following steps:

[0041] Edge server random selection , calculate its verification public key ;

[0042] The edge server is based on its identity and verify the public key , Domain Administrator Node The public key and timestamp Perform hash calculation to form authentication ciphertext , and the authentication ciphertext Sent to the domain administrator node ,in, The calculation formula is as follows:

[0043] ,

[0044] Domain Admin Node Received authentication ciphertext After that, store , and To decrypt, , get the edge server identity , and judge Whether it has been registered in the private blockchain. If it has been registered, the verification fails. If it has not been registered, the verification fails. The effectiveness of If it is valid, the identity authentication is passed;

[0045] After authentication is passed, the domain administrator node save , randomly generate an integer , and generate verification data and , the calculation formula is as follows:

[0046] ,

[0047] ,

[0048] ;

[0049] Domain Admin Node Based on the verification data generated and , Timestamp And the identity of the edge server , verify the public key Hash calculation is performed with the identity signature to form data verification ciphertext , and the data verification ciphertext Sent to the edge server, The calculation formula is as follows:

[0050] ,

[0051] in, Indicates the identity signature of the edge server;

[0052] The edge server receives the data verification ciphertext After that, extract , , , , as well as To verify, the verification formula is as follows:

[0053] ,

[0054] ,

[0055] in, ;

[0056] If the above verification formula is established, the data is verified to be tamper-free, and the edge server broadcasts its identity and verification public key to other edge servers, which then achieve information consensus between nodes based on the Byzantine algorithm;

[0057] The edge server verifies the public key based on the received verification data. and Build its public and private keys, the public key and private key The calculation formula is as follows:

[0058] ,

[0059] ,

[0060] The edge server extracts and stores its identity signature , and to the domain administrator node Send the identity signature information of successful registration;

[0061] Domain Admin Node Verify the accepted identity signature. The verification formula is as follows:

[0062] ,

[0063] After the identity signature information is verified, the domain administrator node Based on its identity , public key and the block number of the authentication block And the identity of the edge server , Private Key and identity signature As a block of the edge server, the edge server block is uploaded to the private blockchain and alliance blockchain. In the alliance blockchain, the edge server block is broadcast to other domain management nodes through the P2P network. The block content of the edge server is expressed as:

[0064] .

[0065] Preferably, the IoT device registration includes the following steps:

[0066] Random selection of IoT devices , and calculate its verification public key ;

[0067] Based on its identity and verify the public key , Domain Administrator Node The public key and timestamp Perform hash calculation to form authentication ciphertext , and the authentication ciphertext Sent to the domain administrator node , authentication ciphertext The calculation formula is as follows:

[0068] ;

[0069] Domain Admin Node Received authentication ciphertext After that, store , and Decrypt to get the identity of the IoT device , and judge Whether it has been registered in the private blockchain. If it has been registered, the verification fails. If it has not been registered, the verification fails. The effectiveness of If it is valid, the identity authentication is passed;

[0070] After verification, the domain administrator node Identification based on IoT devices and verify the public key Computing Pseudonymous Identities for IoT Devices , The calculation formula is as follows:

[0071] ;

[0072] Domain Admin Node storage , randomly generate an integer , and generate verification data and , the calculation formula is as follows:

[0073] ,

[0074] ,

[0075] ;

[0076] Domain Admin Node Based on the verification data generated and , Timestamp and pseudonymous identification of IoT devices , verify the public key and identity signature Perform hash calculation to form device-side data verification ciphertext , and verify the ciphertext of the device-side data Send to IoT devices, The calculation formula is as follows:

[0077] ;

[0078] Domain Admin Node Pseudonymous identity authentication for IoT devices , the edge server's verification public key , and timestamp Perform hash calculation to form server-side data verification ciphertext , and the server-side data verification ciphertext Sent to the edge server that manages IoT devices, The calculation formula is as follows:

[0079] ;

[0080] The IoT device receives the device-side data verification ciphertext After that, decrypt the ciphertext and verify whether the following equation holds:

[0081] ,

[0082] in, ;

[0083] If the above verification formula is established, the data is verified to be tamper-free, and the IoT device broadcasts its pseudonymous identity and verification public key to other IoT devices, which then achieve information consensus between nodes based on the Byzantine algorithm;

[0084] The IoT device verifies the public key based on the received verification data. and Build its public and private keys, the public key and private key The calculation formula is as follows:

[0085] ,

[0086] ,

[0087] IoT devices extract and store identity signatures , and to the domain administrator node Send the identity signature information of successful registration;

[0088] Domain Admin Node Verify the accepted identity signature. The verification formula is as follows:

[0089] ,

[0090] After the identity signature verification is passed, the domain administrator node Based on their identity , public key and the block number of the authentication block and the pseudonymous identity of the IoT device , Private Key and identity signature As a private block of the IoT device, a block of the IoT device is constructed, and the block of the IoT device is uploaded to the private blockchain and the alliance blockchain. In the alliance blockchain, the block of the IoT device is broadcast to other domain management nodes through the P2P network. The block content of the IoT device is expressed as:

[0091] ;

[0092] The edge server receives the server-side data verification ciphertext After that, based on the random number selected Decrypt and obtain the pseudonymous identity of the IoT device .

[0093] As a preferred embodiment, for two different edge sub-servers A1 and A2 in the private key area A, the identity identifier of the edge server A1 is , the identity of edge server A2 is ; For the domain administrator node in the private area, its identity is , whose public key is represented by , whose private key is represented by ; For IoT devices ST1 and ST2 managed by edge server A, the identity of IoT device STI is , the identity of IoT device ST2 is ,The authentication information between IoT devices ST1 and ST2 is distributedly processed by the edge server. The intra-domain authentication between IoT devices ST1 and ST2 includes the following steps:

[0094] IoT device ST1 random selection , and calculate its verification public key ;

[0095] IoT device ST1 is identified based on its pseudonymous identity , verify the public key and identity signature ) and the identity of the domain administrator node Construct domain authentication information, using the public key of edge server A2 Encrypt the domain authentication information to form the domain authentication ciphertext , and the domain authentication ciphertext Sent to edge server A2, with authentication ciphertext inside The calculation formula is as follows:

[0096] ,

[0097] in, ;

[0098] Edge server A2 authenticates the domain ciphertext Decrypt and check the extracted Whether it matches the identity of the domain management node in the private area to which it belongs. If they are the same, the authentication is successful and the next step is executed;

[0099] Edge server A2 sends an IoT device authentication request to edge server A1. Edge server A1 receives the IoT device authentication request based on the IoT device authentication request. , determine the identity Check whether the IoT device is managed by it. If so, the authentication is successful and go to the next step.

[0100] The edge server A2 calculates the identity signature information based on its identity and the pseudonymous identity of the IoT device A1, and performs a hash calculation on the identity signature information to determine whether the generated hash value is consistent with the authentication ciphertext from the domain. Extracted from Are they the same? If they are the same, it is determined that the data has not been tampered with and the domain authentication is successful.

[0101] As a preference, for the private area C, the identity of the edge server C3 in the private area C is , the public key of the domain administrator node is , the identity of the domain administrator node is , the IoT device is ST3, and for the private domain area D, the identity of the edge server D4 is , the public key of the domain administrator node is , the inter-domain authentication between the private key area C3 and the private area C4 includes the following steps:

[0102] IoT device ST3 random selection , and calculate its verification public key ;

[0103] IoT device ST3 identifies its pseudonymous identity , verify the public key and identity signature and the identity of the domain administrator node As inter-domain authentication information, the inter-domain authentication information is encrypted through the public key of the edge server D4 to generate the inter-domain authentication ciphertext , and the inter-domain authentication ciphertext Sent to edge server D4, where the inter-domain authentication information is represented as:

[0104] , ;

[0105] Edge server D4 receives the inter-domain authentication ciphertext After that, the inter-domain authentication ciphertext Then forward it to the domain administrator node of the private area to which it belongs;

[0106] The domain administrator node in private zone D authenticates the inter-domain ciphertext Decrypt it and get , , as well as , and retrieved through the consortium blockchain and Whether it has been legally registered, if so, proceed to the next step;

[0107] The domain administrator node in private area D obtains the Merkle tree path of the IoT device ST3 and the private blockchain to which the domain administrator node in private area C belongs;

[0108] The domain administrator node in private area D checks the hash value of each node in the Merkle tree and obtains the hash value of the root node of the Merkle tree;

[0109] The domain administrator node in private area D checks whether the hash value of the Merkle root node is the same as the hash value in the private blockchain block header. If they are the same, the next step is executed. If they are not the same, the identity verification ends.

[0110] The domain administrator node in private area D checks whether the signature hash value generated by itself in the private blockchain is the same. If it is the same, it executes the next step. If it is not the same, it ends the identity authentication.

[0111] The domain administrator node in the private area D encrypts the authentication result based on the public key of the edge server D4, and sends the encrypted authentication result to the edge server D4.

[0112] The IoT system authentication method based on distributed blockchain of the present invention has the following advantages:

[0113] 1. The edge server and the IoT devices managed by it are registered to the private blockchain to form a private domain. The domain administrator node of each private domain is registered to the alliance blockchain. Two distributed two-layer collaborative blockchains are used to interact with each other through Merkle proof, realizing secure and efficient intra-domain and inter-domain authentication.

[0114] 2. The domain administrator node acts as a key generation center to generate public and private keys for edge devices and IoT devices, and generates pseudonymous identities for IoT devices, ensuring data security and the privacy of IoT devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0115] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0116] The present invention is further described below in conjunction with the accompanying drawings.

[0117] Figure 1 A flowchart of a distributed blockchain-based authentication method for an Internet of Things system is provided as an implementation example;

[0118] Figure 2 This is a schematic diagram of the structure of a Merkle tree in an Internet of Things system authentication method based on a distributed blockchain. DETAILED DESCRIPTION

[0119] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.

[0120] The embodiment of the present invention provides an Internet of Things system authentication method based on a distributed blockchain, which is used to solve the technical problem of how to achieve secure and efficient intra-domain and inter-domain authentication between Internet of Things devices with the help of blockchain.

[0121] Example:

[0122] The present invention discloses an Internet of Things system authentication method based on distributed blockchain, which is applied to an Internet of Things system including an edge server, an Internet of Things device and a domain administrator node. The edge server and the Internet of Things device managed by the edge server are registered to a private blockchain to form a private domain. The domain administrator node of each private domain is registered to an alliance blockchain. A Merkle tree is constructed in both the private blockchain and the alliance blockchain according to the blocks therein.

[0123] The method of this embodiment includes three steps: system initialization, intra-domain authentication and inter-domain authentication.

[0124] Step S100 system initialization: the domain administrator node builds an identity authentication block based on its identity, public key and system parameters and registers it to the private blockchain, and registers it to the alliance blockchain using its identity, public key and block number of the identity authentication block as identity information. For edge servers and IoT devices that serve as edge nodes, the domain administrator node builds the identity authentication block of the edge computing node based on its identity information and the identity information of the edge node, and uploads the identity authentication block to the private blockchain and alliance blockchain to which it belongs, wherein the identity information of the edge node includes its identity, public key and identity signature, the public key of the edge node is allocated by the domain administrator node, and the identity signature of the edge computing node is a hash calculation based on the domain administrator node identity and the edge node identity.

[0125] As a specific implementation of system initialization, this step includes three operations: domain administrator node initialization, edge server registration, and IoT device registration.

[0126] Among them, when the domain administrator node is initialized, for each private domain, the domain administrator node initializes the system parameters and builds its own public key and private key, builds a block based on its identity, public key and system parameters as an authentication block and sends it to the edge server and IoT device for verification, and creates a new block based on its identity, public key and block number of the authentication block as the block of the domain administrator node and uploads it to the alliance blockchain.

[0127] When the edge server is registered, for each edge server, based on its identity and verification public key, the domain administrator node verifies the edge server and assigns a public key and a private key to the edge server. The edge server broadcasts its identity and public key to other edge servers. The domain administrator node builds a block as the edge server's block based on its identity, public key and block number of the authentication block and the edge server's identity, public key and identity signature, and uploads the edge server's block to its private blockchain and consortium blockchain, where the edge server's identity signature is a hash calculation based on the domain administrator node identity and the edge server identity.

[0128] As a specific implementation of edge server registration, perform the following operations:

[0129] (1) The edge server performs hash calculation based on its identity and verification public key, the public key of the domain administrator node, and the timestamp to form an authentication ciphertext;

[0130] (2) The domain administrator node performs identity authentication based on the authentication ciphertext sent by the edge server. After the authentication is passed, the domain administrator node performs hash calculation based on the verification data, timestamp, and identity identifier, verification public key, and identity signature of the edge server to form a data verification ciphertext.

[0131] (3) The edge server verifies that the data has not been tampered with based on the data verification ciphertext sent by the domain administrator node;

[0132] (4) After verification, the edge server broadcasts its identity and verification public key to other edge servers, and constructs its public key and private key based on its verification public key and the received verification data;

[0133] (5) After the domain administrator node verifies the edge server based on the identity signature, it builds a block as the edge server's block based on its identity, public key, and block number of the authentication block and the edge server's identity, public key, and identity signature, and uploads the edge server's block to its private blockchain and consortium blockchain;

[0134] (6) The consortium blockchain verifies and reaches information consensus on the blocks of the edge servers based on the identity signatures of the edge servers.

[0135] When registering an IoT device, for each IoT device, based on its identity and verification public key, the domain administrator node verifies the IoT device, and assigns a pseudonymous identity, public key and private key to the IoT device. The IoT device broadcasts its pseudonymous identity and public key to other IoT devices, and the domain administrator node creates a block as the block of the IoT device based on its identity, public key and block number of the authentication block and the pseudonymous identity, public key and identity signature of the IoT device, and uploads the block of the IoT device to its private blockchain and consortium blockchain, and the domain administrator node encrypts the pseudonymous identity of the IoT device based on the public key of the edge server to which the IoT device belongs and sends it to the corresponding edge server, wherein the identity signature of the IoT device is a hash calculation based on the domain administrator node identity and the pseudonymous identity of the IoT device.

[0136] As a specific implementation of IoT device registration, perform the following operations:

[0137] (1) The IoT device performs hash calculation based on its identity and verification public key, the public key of the domain administrator node, and the timestamp to form an authentication ciphertext;

[0138] (2) The domain administrator node authenticates the IoT device based on the authentication ciphertext sent by the IoT device. After the authentication is passed, the domain administrator node calculates the pseudonymous identity of the IoT device based on the identity of the IoT device and the verification public key, and performs hash calculation based on the verification data, timestamp, pseudonymous identity, verification public key and identity signature generated by it to form the device-side data verification ciphertext, and performs hash calculation based on the timestamp, pseudonymous identity and verification public key of the IoT device to form the server-side data verification ciphertext;

[0139] (3) The IoT device verifies that the data has not been tampered with based on the device-side data verification ciphertext sent by the domain administrator node. After the verification is passed, the IoT device broadcasts its pseudonymous identity and verification public key to other IoT devices, and constructs its public key and private key based on its verification public key and the received verification data;

[0140] (4) After the domain administrator node verifies the IoT device based on the identity signature, it creates a block as the IoT device block based on its identity and public key, timestamp, and the pseudonymous identity, public key, and identity signature of the IoT device, and uploads the IoT device block to its private blockchain and alliance blockchain. The alliance blockchain verifies the IoT device block and reaches information consensus based on the identity signature.

[0141] (5) After receiving the server-side data verification ciphertext sent by the domain administrator node, the edge server that manages the IoT device decrypts the server-side data verification ciphertext to obtain the pseudonymous identity of the IoT device.

[0142] Step S200: Intra-domain authentication: The IoT device constructs intra-domain authentication information based on its identity and the identity of the domain administrator node, encrypts the intra-domain authentication information using the public key of the edge server to which other IoT devices in the same private domain belong, and sends it to the edge server for decryption and identity verification.

[0143] In this embodiment, during intra-domain authentication, for two IoT devices serving as a sender and a receiver in the same private domain, the IoT device serving as the sender constructs intra-domain authentication information based on its pseudonymous identity, verification public key and identity signature, and the identity of the domain administrator node, encrypts the intra-domain authentication information using the public key of the edge server serving as the receiver to form an intra-domain authentication ciphertext, and sends the ciphertext to the edge server serving as the receiver, the edge server serving as the receiver decrypts the intra-domain authentication ciphertext, and performs verification based on the domain administrator node identity and the pseudonymous identity and identity signature of the IoT device. After the verification is successful, the intra-domain authentication is successful, wherein the edge server serving as the receiver manages the IoT device.

[0144] Step S300: Inter-domain authentication: The IoT device constructs inter-domain authentication information based on its identity, identity signature, and the identity of the domain administrator node, encrypts the inter-domain authentication information through the public key of the edge server to which the IoT device belongs in another private domain, and sends it to the edge server. The edge server in the other private domain cooperates with the domain administrator node to perform identity authentication on the inter-domain authentication information based on the Merkle root proof.

[0145] In this embodiment, during inter-domain authentication, for two IoT devices located in different private domains, serving as the sender and receiver, the sender IoT device constructs inter-domain authentication information based on its pseudonymous identity, verification public key and identity signature, and the identity of the domain administrator node of the private domain to which it belongs, encrypts the inter-domain authentication information through the public key of the receiving edge server to form an inter-domain authentication ciphertext, and sends it to the receiving edge server. The receiving edge server forwards the inter-domain authentication ciphertext to the domain administrator node of the private domain to which it belongs, and the receiving domain administrator node decrypts the inter-domain authentication ciphertext, performs verification based on the identity of the sending domain administrator node and the pseudonymous identity of the sender IoT device, and verifies the identity signature of the sender IoT device based on the Merkle root proof. After the verification is successful, the inter-domain authentication is successful.

[0146] As a specific implementation of the method of this embodiment, the following case is given:

[0147] Step 1: Initialize the domain administrator node, including the following operations:

[0148] (1) Based on elliptic curve encryption, the domain administrator node generates a Prime number of bits , a finite field System elliptic curve on , a cyclic additive point group and a generator ;

[0149] (2) The domain administrator node defines the following one-way hash function:

[0150] ,

[0151] ,

[0152] ,

[0153] ,

[0154] And generate random numbers as a private key, and construct a public key based on the generator , ;

[0155] (3) The domain administrator node generates a transaction , affairs Contains the coordinate information of the administrator node , Identity , , , , , And one-way hash functions ,in, , , , And one-way hash functions As system parameters;

[0156] (4) The domain administrator node sends the transaction Packaged into a label The new block is used as the authentication block, and the authentication block is sent to the edge server and IoT device in the private domain. After receiving the authentication block, the edge server and IoT device detect the identity of the domain administrator node. Does it exist in a private blockchain? Already exists in the private blockchain, the verification fails. Otherwise, the identity verification block is used as the initial genesis block of the private blockchain;

[0157] (5) After successful verification, the domain administrator node will identify its identity , public key and the block number of the authentication block Package it into a new block as the block of the domain administrator node, and upload the block of the domain administrator node to the alliance blockchain.

[0158] Step 2: Edge server registration, including the following operations:

[0159] (1) Random selection of edge servers , calculate its verification public key ;

[0160] (2) Edge server based on its identity and verify the public key , Domain Administrator Node The public key and timestamp Perform hash calculation to form authentication ciphertext , and the authentication ciphertext Sent to the domain administrator node ,in, The calculation formula is as follows:

[0161] ;

[0162] (3) Domain Administrator Node Received authentication ciphertext After that, store , and To decrypt, , get the edge server identity , and judge Whether it has been registered in the private blockchain. If it has been registered, the verification fails. If it has not been registered, the verification fails. The effectiveness of If it is valid, the identity authentication is passed;

[0163] (4) After the identity verification is passed, the domain administrator node save , randomly generate an integer , and generate verification data and , the calculation formula is as follows:

[0164] ,

[0165] ,

[0166] ;

[0167] (5) Domain Administrator Node Based on the verification data generated and , Timestamp And the identity of the edge server , verify the public key Hash calculation is performed with the identity signature to form data verification ciphertext , and the data verification ciphertext Sent to the edge server, The calculation formula is as follows:

[0168] ,

[0169] in, Indicates the identity signature of the edge server;

[0170] (6) The edge server receives the data verification ciphertext After that, extract , , , , as well as To verify, the verification formula is as follows:

[0171] ,

[0172] ,

[0173] in, ;

[0174] (7) If the above verification formula is established, the data is verified to be tamper-free, and the edge server broadcasts its identity and verification public key to other edge servers, which then achieve information consensus between nodes based on the Byzantine algorithm;

[0175] (8) The edge server verifies the public key based on the received verification data and Build its public and private keys, the public key and private key The calculation formula is as follows:

[0176] ,

[0177] ;

[0178] (9) The edge server extracts and stores its identity signature , and to the domain administrator node Send the identity signature information of successful registration;

[0179] (10) Domain Administrator Node Verify the accepted identity signature. The verification formula is as follows:

[0180] ;

[0181] (11) After the identity signature information is verified, the domain administrator node Based on its identity , public key and the block number of the authentication block And the identity of the edge server , Private Key and identity signature As a block of the edge server, the edge server block is uploaded to the private blockchain and alliance blockchain. In the alliance blockchain, the edge server block is broadcast to other domain management nodes through the P2P network. The block content of the edge server is expressed as: .

[0182] Step 3: IoT device registration, including the following steps:

[0183] (1) Random selection of IoT devices , and calculate its verification public key ;

[0184] (2) Based on their identity and verify the public key , Domain Administrator Node The public key and timestamp Perform hash calculation to form authentication ciphertext , and the authentication ciphertext Sent to the domain administrator node , authentication ciphertext The calculation formula is as follows:

[0185] ;

[0186] (3) Domain Administrator Node Received authentication ciphertext After that, store , and Decrypt to get the identity of the IoT device , and judge Whether it has been registered in the private blockchain. If it has been registered, the verification fails. If it has not been registered, the verification fails. The effectiveness of If it is valid, the identity authentication is passed;

[0187] (4) After verification, the domain administrator node Identification based on IoT devices and verify the public key Computing Pseudonymous Identities for IoT Devices , The calculation formula is as follows:

[0188] ;

[0189] (5) Domain Administrator Node storage , randomly generate an integer , and generate verification data and , the calculation formula is as follows:

[0190] ,

[0191] ,

[0192] ;

[0193] (6) Domain Administrator Node Based on the verification data generated and , Timestamp and pseudonymous identification of IoT devices , verify the public key and identity signature Perform hash calculation to form device-side data verification ciphertext , and verify the ciphertext of the device-side data Send to IoT devices, The calculation formula is as follows:

[0194] ;

[0195] (7) Domain Administrator Node Pseudonymous identity authentication for IoT devices , the edge server's verification public key , and timestamp Perform hash calculation to form server-side data verification ciphertext , and the server-side data verification ciphertext Sent to the edge server that manages IoT devices, The calculation formula is as follows:

[0196] ;

[0197] (8) The IoT device receives the device-side data verification ciphertext After that, decrypt the ciphertext and verify whether the following equation holds:

[0198] ,

[0199] in, ;

[0200] (9) If the above verification formula is established, the data is verified to be tamper-free, and the IoT device broadcasts its pseudonymous identity and verification public key to other IoT devices, which then achieve information consensus between nodes based on the Byzantine algorithm;

[0201] (10) The IoT device verifies the public key based on the received verification data and Build its public and private keys, the public key and private key The calculation formula is as follows:

[0202] ,

[0203] ;

[0204] (11) IoT devices extract and store identity signatures , and to the domain administrator node Send the identity signature information of successful registration;

[0205] (12) Domain Administrator Node Verify the accepted identity signature. The verification formula is as follows:

[0206] ;

[0207] (13) After the identity signature verification is passed, the domain administrator node Based on their identity , public key and the block number of the authentication block and the pseudonymous identity of the IoT device , Private Key and identity signature As a private block of the IoT device, a block of the IoT device is constructed, and the block of the IoT device is uploaded to the private blockchain and the alliance blockchain. In the alliance blockchain, the block of the IoT device is broadcast to other domain management nodes through the P2P network. The block content of the IoT device is expressed as:

[0208] ;

[0209] (14) The edge server receives the server-side data verification ciphertext After that, based on the random number selected Decrypt and obtain the pseudonymous identity of the IoT device .

[0210] Step 4: For two different edge servers A1 and A2 in private key area A, the identity of edge server A1 is , the identity of edge server A2 is ; For the domain administrator node in the private area, its identity is , whose public key is represented by , whose private key is represented by ; For IoT devices ST1 and ST2 managed by edge server A, the identity of IoT device STI is , the identity of IoT device ST2 is ,The authentication information between IoT devices ST1 and ST2 is distributedly processed by the edge server. The intra-domain authentication between IoT devices ST1 and ST2 includes the following steps:

[0211] (1) Random selection of IoT device ST1 , and calculate its verification public key ;

[0212] (2) IoT device ST1 based on its pseudonymous identity , verify the public key and identity signature ) and the identity of the domain administrator node Construct domain authentication information, using the public key of edge server A2 Encrypt the domain authentication information to form the domain authentication ciphertext , and the domain authentication ciphertext Sent to edge server A2, with authentication ciphertext inside The calculation formula is as follows:

[0213] ,

[0214] in, ;

[0215] (3) Edge server A2 authenticates the domain ciphertext Decrypt and check the extracted Whether it matches the identity of the domain management node in the private area to which it belongs. If they are the same, the authentication is successful and the next step is executed;

[0216] (4) Edge server A2 sends an IoT device authentication request to edge server A1. Edge server A1 receives the IoT device authentication request based on the IoT device authentication request. , determine the identity Check whether the IoT device is managed by it. If so, the authentication is successful and go to the next step.

[0217] (5) Edge server A2 calculates the identity signature information based on its identity and the pseudonymous identity of IoT device A1, and performs hash calculation on the identity signature information to determine whether the generated hash value is consistent with the authentication ciphertext obtained from the domain. Extracted from Are they the same? If they are the same, it is determined that the data has not been tampered with and the domain authentication is successful.

[0218] Step 5: For private area C, the identity of its internal edge server C3 is , the public key of the domain administrator node is , the identity of the domain administrator node is , the IoT device is ST3, and for the private domain area D, the identity of the edge server D4 is , the public key of the domain administrator node is , the inter-domain authentication between the private key area C3 and the private area C4 includes the following steps:

[0219] (1) Random selection of IoT device ST3 , and calculate its verification public key ;

[0220] (2) IoT device ST3 identifies its pseudonym , verify the public key and identity signature and the identity of the domain administrator node As inter-domain authentication information, the inter-domain authentication information is encrypted through the public key of the edge server D4 to generate the inter-domain authentication ciphertext , and the inter-domain authentication ciphertext Sent to edge server D4, where the inter-domain authentication information is represented as:

[0221] , ;

[0222] (3) Edge server D4 receives the inter-domain authentication ciphertext After that, the inter-domain authentication ciphertext Then forward it to the domain administrator node of the private area to which it belongs;

[0223] (4) The domain administrator node in private zone D authenticates the inter-domain ciphertext Decrypt it and get , , as well as , and retrieved through the consortium blockchain and Whether it has been legally registered, if so, proceed to the next step;

[0224] (5) The domain administrator node in private area D obtains the Merkle tree path of the IoT device ST3 and the private blockchain to which the domain administrator node in private area C belongs;

[0225] (6) The domain administrator node in private area D checks the hash value of each node in the Merkle tree and obtains the hash value of the root node of the Merkle tree;

[0226] (7) The domain administrator node in the private area D checks whether the hash value of the Merkle root node is the same as the hash value in the private blockchain block header. If they are the same, the next step is executed. If they are not the same, the identity authentication ends.

[0227] (8) The domain administrator node in the private area D checks whether the signature hash value generated by itself in the private blockchain is the same. If it is the same, it executes the next step. If it is not the same, it ends the identity authentication.

[0228] (9) The domain administrator node in private area D encrypts the authentication result based on the public key of edge server D4 and sends the encrypted authentication result to edge server D4.

[0229] In this embodiment, the blocks in the private blockchain and the alliance blockchain each form a Merkle tree, such as Figure 2 As shown in Figure 1, the Merkle tree is a binary tree used to verify the integrity and consistency of data. It merges the hash values ​​of data blocks level by level and finally generates a root hash value. The construction principle of the Merkle tree is as follows:

[0230] (1) Calculate the hash value for each data block. These hash values ​​are the leaf nodes of the Merkle tree.

[0231] (2) Combine the hash values ​​of two adjacent leaf nodes and calculate their hash values ​​to obtain the parent node of the subtree. This process is repeated until only one node remains, namely the root node.

[0232] (3) When constructing a subtree, if the number of leaf nodes is odd, the last node is copied and combined with itself to ensure that each parent node has two child nodes;

[0233] (4) The hash values ​​of the parent nodes of all subtrees are merged into a root hash value, which represents the hash value of the entire data set.

[0234] Based on this Merkle tree, to verify whether a data block belongs to the original data set, you only need to calculate the hash value of the data block and then verify it up the Merkle tree until the root node. If the final root hash value matches the known root hash value, the data block is valid.

[0235] for Figure 2, the Merkle tree given has five layers. The node content of the bottom layer, i.e., the fifth layer, is the block stored in the blockchain, where Block1, Block2...Block8 are respectively a block stored in the blockchain; for the nodes of the fourth layer, the node content is the hash calculation of the block in its child node (i.e., the fifth layer node), where h(Block1) represents the hash value of block Block1, h(Block2) represents the hash value of block Block2, h(Block3) represents the hash value of block Block3, and so on, h(Block8) represents the hash value of block Block8; for the nodes of the third layer, the node content is the hash value of the combination of the contents of its two child nodes (i.e., the two fourth layer nodes associated with it), where h(1,2) represents the hash value of the combination of h(Block1) and h(Block2), and h(3,4) represents the hash value of h(Block8). h(ck3) and h(Block4), h(5,6) represents the hash value of h(Block5) and h(Block6), and h(7,8) represents the hash value of h(Block7) and h(Block8). For the second-layer node, the node content is the hash value of the content of its two child nodes (i.e., the two third-layer nodes associated with it), where h(1,2,3,4) represents the hash value of h(1,2) and h(3,4), and h(5,6,7,8) represents the hash value of h(5,6) and h(7,8). For the root node, i.e., the first-layer node, the node content is the hash value of the content of its child nodes (i.e., the two second-layer nodes), and h(1,2,3,4,5,6,7,8) represents the hash value of h(1,2,3,4) and h(5,6,7,8).

[0236] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A distributed blockchain-based Internet of Things system authentication method, characterized in that: The method is applied to an IoT system including an edge server, an IoT device and a domain administrator node. The edge server and the IoT device managed by the edge server are registered to a private blockchain to form a private domain. The domain administrator node of each private domain is registered to a consortium blockchain. A Merkle tree is constructed in each private blockchain and consortium blockchain according to the blocks therein. The method comprises the following steps: System initialization: The domain administrator node builds an identity authentication block based on its identity, public key and system parameters and registers it to the private blockchain, and registers it to the alliance blockchain using its identity, public key and block number of the identity authentication block as identity information. For edge servers and IoT devices that serve as edge nodes, the domain administrator node builds the identity authentication block of the edge computing node based on its identity information and the identity information of the edge node, and uploads the identity authentication block to the private blockchain and alliance blockchain to which it belongs. The identity information of the edge node includes its identity, public key and identity signature. The public key of the edge node is allocated by the domain administrator node, and the identity signature of the edge computing node is a hash calculation based on the domain administrator node identity and the edge node identity. Intra-domain authentication: The IoT device constructs intra-domain authentication information based on its identity and the identity of the domain administrator node. The intra-domain authentication information is encrypted using the public key of the edge server to which other IoT devices in the same private domain belong, and then sent to the edge server for decryption and identity authentication. Inter-domain authentication: The IoT device constructs inter-domain authentication information based on its identity, identity signature, and the identity of the domain administrator node. The inter-domain authentication information is encrypted using the public key of the edge server to which the IoT device belongs in another private domain and sent to the edge server. The edge server in the other private domain cooperates with the domain administrator node to perform identity authentication on the inter-domain authentication information based on the Merkle root proof.

2. The distributed blockchain-based IoT system authentication method according to claim 1 is characterized in that: System initialization includes the following steps: Domain administrator node initialization: For each private domain, the domain administrator node initializes system parameters and builds its own public key and private key. Based on its identity, public key and system parameters, it builds a block as an authentication block and sends it to the edge server and IoT device for verification. Based on its identity, public key and the block number of the authentication block, it creates a new block as the domain administrator node's block and uploads it to the alliance blockchain. Edge server registration: For each edge server, the domain administrator node verifies the edge server based on its identity and verification public key, and assigns a public key and a private key to the edge server. The edge server broadcasts its identity and public key to other edge servers. The domain administrator node builds a block as the edge server's block based on its identity, public key, and block number of the authentication block, as well as the edge server's identity, public key, and identity signature, and uploads the edge server's block to its private blockchain and consortium blockchain, where the edge server's identity signature is a hash calculation based on the domain administrator node's identity and the edge server's identity. IoT device registration: For each IoT device, based on its identity and verification public key, the domain administrator node verifies the IoT device and assigns a pseudonymous identity, public key and private key to the IoT device. The IoT device broadcasts its pseudonymous identity and public key to other IoT devices. The domain administrator node creates a block as the IoT device's block based on its identity, public key and block number of the authentication block and the pseudonymous identity, public key and identity signature of the IoT device, and uploads the IoT device's block to the private blockchain and consortium blockchain to which it belongs. The domain administrator node encrypts the pseudonymous identity of the IoT device based on the public key of the edge server to which the IoT device belongs and sends it to the corresponding edge server, where the identity signature of the IoT device is a hash calculation based on the domain administrator node identity and the pseudonymous identity of the IoT device. Correspondingly, during intra-domain authentication, for two IoT devices as the sender and receiver in the same private domain, the IoT device at the sender end builds intra-domain authentication information based on its pseudonymous identity, verification public key and identity signature, and the identity of the domain administrator node, encrypts the intra-domain authentication information through the public key of the edge server at the receiver end to form an intra-domain authentication ciphertext, and sends it to the edge server at the receiver end. The edge server at the receiver end decrypts the intra-domain authentication ciphertext and verifies it based on the domain administrator node identity and the pseudonymous identity and identity signature of the IoT device. After the verification is passed, the intra-domain authentication is successful, wherein the edge server at the receiver end manages the IoT device as the receiver end; Correspondingly, during inter-domain authentication, for two IoT devices located in different private domains, serving as the sender and receiver, the sending IoT device builds inter-domain authentication information based on its pseudonymous identity, verification public key and identity signature, and the identity of the domain administrator node of the private domain to which it belongs, encrypts the inter-domain authentication information through the public key of the receiving edge server to form an inter-domain authentication ciphertext, and sends it to the receiving edge server. The receiving edge server forwards the inter-domain authentication ciphertext to the domain administrator node of the private domain to which it belongs. The receiving domain administrator node decrypts the inter-domain authentication ciphertext, verifies it based on the identity of the sending domain administrator node and the pseudonymous identity of the sending IoT device, and verifies the identity signature of the sending IoT device based on the Merkle root proof. After the verification is successful, the inter-domain authentication is successful.

3. The distributed blockchain-based IoT system authentication method according to claim 2 is characterized in that: When registering the edge server, perform the following: The edge server performs hash calculation based on its identity and verification public key, the public key of the domain administrator node, and the timestamp to form the authentication ciphertext; The domain administrator node performs identity authentication based on the authentication ciphertext sent by the edge server. After the authentication is passed, the domain administrator node performs hash calculation based on the verification data, timestamp, and identity identifier, verification public key, and identity signature of the edge server to form a data authentication ciphertext. The edge server verifies that the data has not been tampered with based on the data verification ciphertext sent by the domain administrator node; After verification, the edge server broadcasts its identity and verification public key to other edge servers, and builds its public and private keys based on its verification public key and the received verification data; After the domain administrator node verifies the edge server based on the identity signature, it builds a block as the edge server's block based on its identity, public key, and block number of the authentication block as well as the edge server's identity, public key, and identity signature, and uploads the edge server's block to its private blockchain and alliance blockchain; The consortium blockchain verifies and reaches information consensus on the blocks of edge servers based on the identity signatures of edge servers.

4. The distributed blockchain-based IoT system authentication method according to claim 2 is characterized in that: When registering an IoT device, execute the following: The IoT device performs hash calculation based on its identity and verification public key, the public key of the domain administrator node, and the timestamp to form an authentication ciphertext; The domain administrator node authenticates the IoT device based on the authentication ciphertext sent by the IoT device. After the authentication is passed, the domain administrator node calculates the pseudonymous identity of the IoT device based on the identity of the IoT device and the verification public key, performs hash calculation based on the verification data, timestamp, pseudonymous identity, verification public key and identity signature generated by it to form the device-side data verification ciphertext, and performs hash calculation based on the timestamp, pseudonymous identity and verification public key of the IoT device to form the server-side data verification ciphertext; The IoT device verifies that the data has not been tampered with based on the device-side data verification ciphertext sent by the domain administrator node. After the verification is passed, the IoT device broadcasts its pseudonymous identity and verification public key to other IoT devices, and constructs its public key and private key based on its verification public key and the received verification data; After the domain administrator node verifies the IoT device based on the identity signature, it creates a block as the IoT device's block based on its identity and public key, timestamp, and the IoT device's pseudonymous identity, public key, and identity signature, and uploads the IoT device's block to its private blockchain and alliance blockchain. The alliance blockchain verifies the IoT device's block and reaches information consensus based on the identity signature. After receiving the server-side data verification ciphertext sent by the domain administrator node, the edge server managing the Internet of Things device decrypts the server-side data verification ciphertext to obtain the pseudonym identity of the Internet of Things device.

5. The distributed blockchain-based Internet of Things system authentication method according to any one of claims 2 to 4, characterized in that: The domain administrator node initialization includes the following steps: Based on elliptic curve cryptography, the domain administrator node generates a Prime number of bits , a finite field System elliptic curve on , a cyclic additive point group and a generator ; The domain administrator node defines the following one-way hash function: , , , , And generate random numbers as a private key, and construct a public key based on the generator , ; The domain administrator node generates a transaction , affairs Contains the coordinate information of the administrator node , Identity , , , , , And one-way hash functions ,in, , , , And one-way hash functions As system parameters; The domain administrator node will Packaged into a label The new block is used as the authentication block, and the authentication block is sent to the edge server and IoT device in the private domain. After receiving the authentication block, the edge server and IoT device detect the identity of the domain administrator node. Does it exist in a private blockchain? Already exists in the private blockchain, the verification fails. Otherwise, the identity verification block is used as the initial genesis block of the private blockchain; After successful authentication, the domain administrator node will identify its identity , public key and the block number of the authentication block Package it into a new block as the block of the domain administrator node, and upload the block of the domain administrator node to the alliance blockchain.

6. The distributed blockchain-based IoT system authentication method according to claim 5 is characterized in that: Edge server registration includes the following steps: Edge server random selection , calculate its verification public key ; The edge server is based on its identity and verify the public key , Domain Administrator Node The public key and timestamp Perform hash calculation to form authentication ciphertext , and the authentication ciphertext Sent to the domain administrator node ,in, The calculation formula is as follows: , Domain Admin Node Received authentication ciphertext After that, store , and To decrypt, , get the edge server identity , and judge Whether it has been registered in the private blockchain. If it has been registered, the verification fails. If it has not been registered, the verification fails. The effectiveness of If it is valid, the identity authentication is passed; After authentication is passed, the domain administrator node save , randomly generate an integer , and generate verification data and , the calculation formula is as follows: , , ; Domain Admin Node Based on the verification data generated and , Timestamp And the identity of the edge server , verify the public key Hash calculation is performed with the identity signature to form data verification ciphertext , and the data verification ciphertext Sent to the edge server, The calculation formula is as follows: , in, Indicates the identity signature of the edge server; The edge server receives the data verification ciphertext After that, extract , , , , as well as To verify, the verification formula is as follows: , , in, ; If the above verification formula is established, the data is verified to be tamper-free, and the edge server broadcasts its identity and verification public key to other edge servers, which then achieve information consensus among nodes based on the Byzantine algorithm; The edge server verifies the public key based on the received verification data. and Build its public and private keys, the public key and private key The calculation formula is as follows: , , The edge server extracts and stores its identity signature , and to the domain administrator node Send the identity signature information of successful registration; Domain Admin Node Verify the accepted identity signature. The verification formula is as follows: , After the identity signature information is verified, the domain administrator node Based on its identity , public key and the block number of the authentication block And the identity of the edge server , Private Key and identity signature As a block of the edge server, the edge server block is uploaded to the private blockchain and alliance blockchain. In the alliance blockchain, the edge server block is broadcast to other domain management nodes through the P2P network. The block content of the edge server is expressed as: 。 7. The distributed blockchain-based IoT system authentication method according to claim 6 is characterized in that: IoT device registration includes the following steps: Random selection of IoT devices , and calculate its verification public key ; Based on its identity and verify the public key , Domain Administrator Node The public key and timestamp Perform hash calculation to form authentication ciphertext , and the authentication ciphertext Sent to the domain administrator node , authentication ciphertext The calculation formula is as follows: ; Domain Admin Node Received authentication ciphertext After that, store , and Decrypt to get the identity of the IoT device , and judge Whether it has been registered in the private blockchain. If it has been registered, the verification fails. If it has not been registered, the verification fails. The effectiveness of If it is valid, the identity authentication is passed; After verification, the domain administrator node Identification based on IoT devices and verify the public key Computing Pseudonymous Identities for IoT Devices , The calculation formula is as follows: ; Domain Admin Node storage , randomly generate an integer , and generate verification data and , the calculation formula is as follows: , , ; Domain Admin Node Based on the verification data generated and , Timestamp and pseudonymous identification of IoT devices , verify the public key and identity signature Perform hash calculation to form device-side data verification ciphertext , and verify the ciphertext of the device-side data Send to IoT devices, The calculation formula is as follows: ; Domain Admin Node Pseudonymous identity authentication for IoT devices , the edge server's verification public key , and timestamp Perform hash calculation to form server-side data verification ciphertext , and the server-side data verification ciphertext Sent to the edge server that manages IoT devices, The calculation formula is as follows: ; The IoT device receives the device-side data verification ciphertext After that, decrypt the ciphertext and verify whether the following equation holds: , in, ; If the above verification formula is established, the data is verified to be tamper-free, and the IoT device broadcasts its pseudonymous identity and verification public key to other IoT devices, which then achieve information consensus between nodes based on the Byzantine algorithm; The IoT device verifies the public key based on the received verification data. and Build its public and private keys, the public key and private key The calculation formula is as follows: , , IoT devices extract and store identity signatures , and to the domain administrator node Send the identity signature information of successful registration; Domain Admin Node Verify the accepted identity signature. The verification formula is as follows: , After the identity signature verification is passed, the domain administrator node Based on their identity , public key and the block number of the authentication block and the pseudonymous identity of the IoT device , Private Key and identity signature As a private block of the IoT device, a block of the IoT device is constructed, and the block of the IoT device is uploaded to the private blockchain and the alliance blockchain. In the alliance blockchain, the block of the IoT device is broadcast to other domain management nodes through the P2P network. The block content of the IoT device is expressed as: ; The edge server receives the server-side data verification ciphertext After that, based on the random number selected Decrypt and obtain the pseudonymous identity of the IoT device .

8. The distributed blockchain-based IoT system authentication method according to claim 7 is characterized in that: For two different edge sub-servers A1 and A2 in private key area A, the identity of edge server A1 is , the identity of edge server A2 is ; For the domain administrator node in the private area, its identity is , whose public key is represented by , whose private key is represented by ; For IoT devices ST1 and ST2 managed by edge server A, the identity of IoT device STI is , the identity of IoT device ST2 is ,The authentication information between IoT devices ST1 and ST2 is distributedly processed by the edge server. The intra-domain authentication between IoT devices ST1 and ST2 includes the following steps: IoT device ST1 random selection , and calculate its verification public key ; IoT device ST1 is identified based on its pseudonymous identity , verify the public key and identity signature ) and the identity of the domain administrator node Construct domain authentication information, using the public key of edge server A2 Encrypt the domain authentication information to form the domain authentication ciphertext , and the domain authentication ciphertext Sent to edge server A2, with authentication ciphertext inside The calculation formula is as follows: , in, ; Edge server A2 authenticates the domain ciphertext Decrypt and check the extracted Whether it matches the identity of the domain management node in the private area to which it belongs. If they are the same, the authentication is successful and the next step is executed; Edge server A2 sends an IoT device authentication request to edge server A1. Edge server A1 receives the IoT device authentication request based on the IoT device authentication request. , determine the identity Check whether the IoT device is managed by it. If so, the authentication is successful and go to the next step. The edge server A2 calculates the identity signature information based on its identity and the pseudonymous identity of the IoT device A1, and performs a hash calculation on the identity signature information to determine whether the generated hash value is consistent with the authentication ciphertext from the domain. Extracted from Are they the same? If they are the same, it is determined that the data has not been tampered with and the domain authentication is successful.

9. The distributed blockchain-based IoT system authentication method according to claim 7, characterized in that: For private area C, the identity of its internal edge server C3 is , the public key of the domain administrator node is , the domain administrator node's identity is , the IoT device is ST3, and for the private domain area D, the identity of the edge server D4 is , the public key of the domain administrator node is , the inter-domain authentication between the private key area C3 and the private area C4 includes the following steps: IoT device ST3 random selection , and calculate its verification public key ; IoT device ST3 identifies its pseudonymous identity , verify the public key and identity signature and the identity of the domain administrator node As inter-domain authentication information, the inter-domain authentication information is encrypted through the public key of the edge server D4 to generate the inter-domain authentication ciphertext , and the inter-domain authentication ciphertext Sent to edge server D4, where the inter-domain authentication information is represented as: , ; Edge server D4 receives the inter-domain authentication ciphertext After that, the inter-domain authentication ciphertext Then forward it to the domain administrator node of the private area to which it belongs; The domain administrator node in private zone D authenticates the inter-domain ciphertext Decrypt it and get , , as well as , and retrieved through the consortium blockchain and Whether it has been legally registered, if so, proceed to the next step; The domain administrator node in private area D obtains the Merkle tree path of the IoT device ST3 and the private blockchain to which the domain administrator node in private area C belongs; The domain administrator node in private area D checks the hash value of each node in the Merkle tree and obtains the hash value of the root node of the Merkle tree; The domain administrator node in private area D checks whether the hash value of the Merkle root node is the same as the hash value in the private blockchain block header. If they are the same, the next step is executed. If they are not the same, the identity verification ends. The domain administrator node in private area D checks whether the signature hash value generated by itself in the private blockchain is the same. If it is the same, it executes the next step. If it is not the same, it ends the identity authentication. The domain administrator node in the private area D encrypts the authentication result based on the public key of the edge server D4, and sends the encrypted authentication result to the edge server D4.

Citation Information

Patent Citations

  • Cross-domain access control method based on block chain in mobile edge computing

    CN113572734A

  • Science and technology service platform cross-domain identity authentication scheme based on a block chain

    CN113676447A