A blockchain-based method and system for authenticating internet of things devices

The IoT device authentication method that combines blockchain and LR-OPUF solves the problems of resource constraints and security vulnerabilities, achieves lightweight authentication and efficient communication, and improves the security and throughput of IoT devices.

CN121000534BActive Publication Date: 2026-04-14NANJING UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing IoT device authentication schemes suffer from resource limitations and security vulnerabilities. In particular, the CA is vulnerable to single points of failure due to attacks, and the PUF is easily reverse-engineered. Traditional schemes have high computational costs and are difficult to apply to resource-constrained IoT devices.

Method used

We adopt a blockchain-based IoT device authentication method, combined with LR-OPUF to generate dynamic identity codes. By leveraging the decentralization of blockchain and the dynamic state updates of LR-OPUF, we perform lightweight authentication through hash functions and XOR operations, and design smart contracts to achieve automated management.

Benefits of technology

It effectively resists modeling attacks, reduces computational and communication overhead, is suitable for resource-constrained IoT devices, improves system security and throughput, and reduces the risk of information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121000534B_ABST
    Figure CN121000534B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on blockchain's internet of things equipment authentication method and system, belong to internet of things technical field, this internet of things equipment authentication method includes following steps: step 1, equipment registration, specifically including following steps: step 1.1, generates the dynamic identity code of internet of things equipment;Step 1.2, server verifies dynamic identity code;Step 1.3, block chain receives and stores the data uploaded by server;Step 2: mutual authentication between internet of things equipment and server, specifically including following steps: step 2.1, the authentication initialization of internet of things equipment;Step 2.2, the authentication of internet of things equipment in server and the session key generation of server;Step 2.3, the authentication of server in internet of things equipment and the state reconstruction of internet of things equipment.The application avoids the risk of large-scale information leakage caused by the CA being broken;Significantly reduce the burden of internet of things equipment, further optimize overall communication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Internet technology, specifically relating to a blockchain-based method and system for authenticating Internet of Things (IoT) devices. Background Technology

[0002] The Internet of Things (IoT), as a core infrastructure connecting physical devices and the digital world, has been widely applied in key areas such as smart manufacturing (industrial sensors), smart healthcare (remote monitoring devices), and smart cities (environmental monitoring nodes). The proliferation of IoT devices has brought serious security challenges, such as IoT device capture, single points of failure, and modeling attacks. Therefore, IoT device authentication is crucial for ensuring the legitimacy of IoT device identities and communication security.

[0003] IoT device authentication and related security protocols have been widely used to address secure communication issues between untrusted entities. To enhance data security, Certificate Authorities (CAs) have been introduced as trusted third-party centers to achieve secure communication by verifying identities, issuing certificates, providing proof of validity, and maintaining certificate repositories. While enabling rapid authentication of large volumes of information, a compromised CA or a victim of a distributed denial-of-service (DDoS) attack can lead to large-scale data breaches and create a potential single point of failure.

[0004] To address the challenges posed by Certificate Authorities (CAs), blockchain was introduced. Blockchain is a distributed ledger technology maintained collaboratively by multiple nodes in a network. Each node has a copy of the ledger, and all transaction records in the ledger are public and transparent. The core characteristics of blockchain are decentralization, immutability, and traceability. These make data independent of a single central institution, difficult to tamper with, transactions publicly verifiable, data traceable, and allow multiple participants to collaborate without a foundation of trust. While blockchain-based solutions overcome single points of failure by leveraging their decentralization and tamper-proof nature, they often rely on pre-configured keys stored on IoT devices, which presents risks such as insecure key storage, complex distribution and management, and potential physical theft.

[0005] There are also authentication schemes based on Physically Unclonable Functions (PUFs). A PUF is a hardware security technology that utilizes inherent physical deviations in semiconductor manufacturing to produce a unique, non-replicable response to a given input, exhibiting characteristics such as unpredictability, uniqueness, and tamper resistance. This process can be represented as... In this model, a random challenge C is input, and a unique response R is generated through uncontrollable random differences within the PUF. Some PUF-based schemes use pre-shared challenge-response pairs (CRPs) for authentication and key negotiation between IoT devices and servers. However, this static storage model allows attackers to collect and analyze large amounts of CRP data to launch reverse engineering attacks, construct mathematical or machine learning models of the PUF response, and ultimately bypass authentication or clone the fingerprints of IoT devices.

[0006] In addition to traditional encryption and digital signature-based schemes, such as Identity-Based Cryptograph (IBC), many other solutions exist. IBC overcomes the limitations of traditional Public Key Infrastructure (PKI) which relies on a Certificate Authority (CA) to generate and manage public-private key pairs, allowing the direct use of user identity information as the public key, thus simplifying key management and certificate delivery. The SM9 algorithm, as a component of the IBC system, has shown broad application prospects in multiple fields due to its unique authentication mechanism. While offering strong security, its complex operations (such as elliptic curve multiplication) incur high computational costs on IoT devices, making it unsuitable for resource-constrained IoT devices.

[0007] Therefore, existing solutions generally have limitations, mainly in two core issues: resource constraints of IoT devices and security vulnerabilities. Summary of the Invention

[0008] In view of the above-mentioned problems in the prior art, the technical problem to be solved by the present invention is to provide a blockchain-based IoT device authentication method and system, which reduces security vulnerabilities in authentication and alleviates the burden on IoT devices.

[0009] Technical Solution: To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0010] A blockchain-based method for authenticating IoT devices includes the following steps:

[0011] Step 1, Device Registration, specifically includes the following steps:

[0012] Step 1.1: Based on LR-OPUF construction, generate dynamic identity codes for IoT devices;

[0013] Step 1.2: The server verifies the dynamic identity code. If the verification is successful, the server uploads the data to the blockchain.

[0014] Step 1.3: The blockchain receives and stores the data uploaded by the server;

[0015] Step 2: Mutual authentication between IoT devices and servers, specifically including the following steps:

[0016] Step 2.1: IoT device authentication initialization;

[0017] Step 2.2: IoT device authentication on the server and generation of session keys on the server;

[0018] Step 2.3: Server authentication of IoT devices and reconstruction of IoT device status.

[0019] Preferably, step 1.1 specifically includes:

[0020] Step 1.1.1: The IoT device randomly generates a new state. ,challenge and random numbers ;

[0021] Step 1.1.2: Based on the construction of LR-OPUF, calculate:

[0022] ,

[0023] ,

[0024] ,

[0025] ,

[0026] In the formula, IoT devices The mask output in the i-th round, It is the input transformation function. It is a collision-resistant hash function. It is the response of the IoT device in the i-th round. It is a physically non-clonable function. It is the temporary key for IoT devices in round i. It is the auxiliary data generated by NVM in the i-th round. It is the generation function of the fuzz extractor. IoT devices The mask output in the i-th round, It is the output transformation function;

[0027] The final output is the processed response. ;

[0028] Step 1.1.3: Calculate the temporary identity of the IoT device:

[0029]

[0030] In the formula, It is a temporary identity identifier for IoT devices in round i. It is a permanent identifier for IoT devices. It is a random number generated by an IoT device;

[0031] Then Split into two segments This temporary identity serves as a unique identifier for IoT devices in subsequent authentication processes.

[0032] Step 1.1.4, in order to hide and mask output Generate masks respectively:

[0033] ,

[0034] ;

[0035] In the formula, It is hidden The mask, It is hidden The mask;

[0036] Step 1.1.5: Calculate the dynamic identity code of the IoT device:

[0037] ;

[0038] Step 1.1.6, IoT devices will Stored in the database It is stored in non-volatile memory NVM, and then a registration request is sent to the server through a secure channel. .

[0039] Preferably, step 1.2 specifically includes:

[0040] Step 1.2.1: The server receives the data sent by the IoT device. Then, perform the same sharding operation as for IoT devices to obtain... ,

[0041] Step 1.2.2, Server Restoration and :

[0042] ,

[0043]

[0044] Step 1.2.3: Recalculate the dynamic identity code:

[0045]

[0046] The calculation results and those received from IoT devices If the values ​​are not equal, it indicates that the data has been tampered with or transmitted incorrectly, and the verification fails. If they are equal, the verification passes, and the server sends the data back to the server. Uploaded to the blockchain.

[0047] Preferably, step 2.1 specifically includes:

[0048] Step 2.1.1: When an IoT device wants to establish communication with the server, it generates a new random number. and first timestamp Meanwhile, IoT devices according to Loading parameters from NVM ;

[0049] Step 2.1.2, IoT device calculation , Using a fuzz extractor to extract from noisy PUF responses China Resumption ,calculate and , , ;

[0050] Step 2.1.3, will Slicing, calculation , and , , , and update on-chain data. ;

[0051] Step 2.1.4: In order to verify the IoT device on the server SE, the IoT device sends an authentication request through a secure channel. Send to the server.

[0052] Preferably, step 2.2 specifically includes:

[0053] Step 2.2.1: The server receives the request. Then, a second timestamp is generated. To verify The timeliness of the process is crucial; if verification fails, the process terminates; otherwise, [the process continues]. Perform the same sharding operation as IoT devices, based on Retrieve from the blockchain ,calculate and , , ;

[0054] Step 2.2.2: The server recalculates and verifies the dynamic identity code. If it matches the dynamic identity code on the blockchain, the identity of the IoT device is confirmed to be legitimate.

[0055] Step 2.2.3: The server generates random numbers. and third timestamp Calculate the dynamic binding parameters:

[0056]

[0057] In the formula, yes The mask, It is a random number. IoT devices The mask output in the i-th round;

[0058] Step 2.2.4: The server calculates its own verification code, which is used to verify the server on IoT devices.

[0059]

[0060] In the formula, It is the server's authentication code. It is a collision-resistant hash function;

[0061] Step 2.2.5: In order to communicate with IoT devices, the server generates a session key:

[0062]

[0063] In the formula, It is the session key;

[0064] Step 2.2.6: To verify the session key SK in IoT devices, the server generates a key verification code:

[0065]

[0066] In the formula, It is a key verification code;

[0067] Step 2.2.7, the server will Send to IoT devices.

[0068] Preferably, step 2.3 specifically includes:

[0069] Step 2.3.1, IoT device receives Then, a fourth timestamp is generated. To verify the third timestamp The timeliness of the process is crucial; if verification fails, the authentication process ends; otherwise, it is reverted. Calculate and verify , If sent with the server The same result indicates that the IoT device has successfully verified the server's identity.

[0070] Step 2.3.2, IoT device calculation and , , and verify Check if it matches the one sent by the server; if it matches, confirm the session key. efficient;

[0071] Step 2.3.3, Utilization of IoT devices The function reconfigures its state for the next round of secure communication:

[0072]

[0073] In the formula, This represents the state of the IoT device in round i+1. It's a reconfiguration function. It is a collision-resistant hash function. This represents the state of the IoT device in the i-th round.

[0074] Step 2.3.4: Update parameters:

[0075] .

[0076] ,

[0077] In the formula, IoT devices The mask output in the (i+1)th round, This is the challenge for IoT devices in round i+1. This represents the state of the IoT device in round i+1. It is the temporary key for IoT devices in round i+1. It is the auxiliary data generated by NVM in round i+1. It is the response of the IoT device in round i+1. It is a physically unclonable function;

[0078] Step 2.3.5: The IoT device updates its state in NVM to... The challenge has been updated to Auxiliary data updated to Overwrite the old value.

[0079] Preferably, to achieve IoT device registration and mutual authentication between IoT devices and servers, multiple smart contracts are designed, and the smart contract APIs perform the following operations:

[0080] saveA: Called by the server, it writes the information of successfully registered IoT devices into the blockchain. It can only be called by the server, and the data cannot be tampered with after it is written.

[0081] deleteA: Called by the server, this function logically deletes IoT devices identified as malicious nodes, updates the IoT device status to invalid, and prevents them from participating in authentication.

[0082] updateA: Called by IoT devices, it can only update the IoT device's own on-chain information;

[0083] queryA: Called by the server to find IoT devices. Corresponding and ,as well as .

[0084] This invention also discloses a blockchain-based IoT device authentication system, comprising:

[0085] The device layer is used for the collection and processing of data from IoT devices, including multiple IoT devices;

[0086] The management layer is used for IoT device registration and mutual authentication between IoT devices and servers; it includes servers and smart contract APIs. The servers are used for IoT device registration and access authentication, while the smart contract APIs are used to provide restricted operation interfaces, allowing only authorized users to add data on the chain. During the registration phase, IoT devices register through the server, while during the mutual authentication phase, the server and IoT devices authenticate each other so that IoT devices can access IoT gateways or transmit data.

[0087] The storage layer is used to store the information required for IoT device registration and authentication. It includes a local database and a blockchain. The database is used to store temporary sensitive data in the IoT device registration and authentication process. The blockchain, as a distributed ledger, stores the parameters required for registration and identity verification in a tamper-proof manner. Some IoT device information is stored in the local database, and some IoT device information required by the server is stored on the blockchain.

[0088] Preferably, for the purpose of automating the execution of secure information, IoT devices and servers call smart contract APIs to trigger the execution of smart contracts on the blockchain.

[0089] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0090] 1. Regarding system security, this invention integrates blockchain and LR-OPUF to provide multiple security safeguards. First, it utilizes the distributed storage characteristics of blockchain to manage dynamic identity fragments (such as dynamic identity codes DIC), achieving decentralized trust and thus avoiding the risk of large-scale information leakage due to CA breaches. Second, LR-OPUF uses dynamic state updates and a fuzzy extractor to process PUF noise, ensuring the uniqueness of each authentication credential. This dual mechanism not only meets the requirements of auditability and decentralization, but more importantly, the dynamic state update mechanism can effectively resist modeling attacks. Even if attackers collect CRPs, they cannot reverse-engineer the PUF challenge. Compared with existing PUF solutions, this solution has significant advantages in resisting such attacks.

[0091] 2. In terms of computational overhead, the solution relies only on lightweight operations such as hash functions and XOR operations, significantly reducing the burden on IoT devices and avoiding complex encryption algorithms (such as elliptic curve multiplication). This results in a reduction of approximately 54.12% in computational overhead on IoT devices compared to the comparison solution. This optimization feature makes it particularly suitable for IoT devices with limited computing resources (such as sensors).

[0092] 3. In terms of communication overhead, the solution significantly reduces bandwidth requirements and transmission latency by simplifying the authentication process to two rounds of communication, reducing communication overhead by approximately 53.12% and effectively improving system throughput. At the same time, the solution utilizes blockchain smart contracts (such as updateA and queryA) to automate the management of key processes such as registration and identity fragment query, further optimizing overall communication efficiency. Attached Figure Description

[0093] Figure 1 This is a structural diagram of LR-OPUF in an embodiment of the present invention;

[0094] Figure 2 This is a blockchain-based IoT device authentication architecture in the embodiment. Detailed Implementation

[0095] The present invention will be further illustrated below with reference to specific embodiments. These embodiments are implemented based on the technical solutions of the present invention, and it should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.

[0096] like Figure 2As shown, a blockchain-based IoT device authentication system includes:

[0097] The device layer is used for the collection and processing of data from IoT devices, including multiple IoT devices. There are many IoT devices in the Internet of Things, and each IoT device has a unique and legitimate identity to prove its identity. Their main function is to encrypt messages to be sent and to decrypt and authenticate received messages.

[0098] The management layer is used for IoT device registration and mutual authentication between IoT devices and the server. The server is mainly used for IoT device registration and access authentication. Only after the IoT device is authenticated by the server can it access the IoT network and transmit data. Smart contract APIs (multiple application programming interfaces) are used to provide restricted operation interfaces, allowing only authorized users to add data on the chain. During the registration phase, IoT devices register through the server, while during the mutual authentication phase, the server and IoT devices authenticate each other so that the IoT devices can access the IoT gateway or transmit data. In addition, for the automatic execution of security information (such as querying and adding), IoT devices and servers call smart contract APIs to trigger the execution of smart contracts on the blockchain.

[0099] The storage layer is used to store the information required for IoT device registration and authentication. It includes a local database (DB) and a blockchain (BC). The database is used to store temporary sensitive data in the IoT device registration and authentication process. The blockchain, as a distributed ledger, stores the parameters required for registration and identity verification in a tamper-proof manner. Due to authentication requirements, some IoT device information is stored in the local database, while some IoT device information required by the server is stored on the blockchain.

[0100] This embodiment also provides a blockchain-based IoT device authentication method that integrates blockchain and LR-OPUF. The existing LR-OPUF structure is as follows: Figure 1 As shown, this is a Logically Reconfigurable One-time Physical Unclonable Function (LR-OPUF). An LR-OPUF consists of two parts: control logic circuitry and a strong PUF (Physically Unclonable Function). The control logic circuitry includes... (Reconfiguration function) (Input transformation function) (Output Transformation Function). The IoT device receives an external challenge C, combines it with the current state S stored in the NVM (Non-Volatile Memory), and generates an internal challenge W through a hash function. The internal challenge W is then input into the underlying physical PUF to generate the original response R, R = P(W), where P represents the Physically Unclonable Function (PNF) and W represents the internal challenge. After fuzzy extraction and error correction using auxiliary data hd in the NVM, a key K is generated. Finally, the key K and the state S are hashed using a hash function. Obfuscated output final response . This indicates a collision-resistant hash function; after authentication, the state is reconfigured. The old state is written to NVM (non-volatile memory) and permanently discarded.

[0101] This method includes the following steps:

[0102] Step 1: Device Registration. Taking IoT device A as an example, when IoT device A needs to access the network, it must register with the server (Server SE). This includes the following steps:

[0103] Step 1.1: Based on LR-OPUF construction, generate the Dynamic Identity Code (DIC) for IoT device A; this step includes:

[0104] Step 1.1.1: IoT device A randomly generates a new state. ,challenge and random numbers .

[0105] Step 1.1.2: Based on the construction of LR-OPUF, calculate:

[0106] ,

[0107] ,

[0108] ,

[0109] ,

[0110] In the formula, It is IoT device A The mask output in the i-th round, It is the input transformation function. It is a collision-resistant hash function. It is the response of IoT device A in the i-th round. It is a physically non-clonable function. It is the temporary key of IoT device A in the i-th round. It is the auxiliary data generated by NVM in the i-th round. It is the generation function of the fuzz extractor. It is IoT device A The mask output in the i-th round, It is the output transformation function;

[0111] The final output is the processed response. .

[0112] Step 1.1.3: Calculate the temporary identity of IoT device A:

[0113]

[0114] In the formula, It is the temporary identity identifier of IoT device A in round i. It is the permanent identifier of IoT device A. It is a random number generated by IoT device A;

[0115] Then Split into two segments This temporary identity serves as a unique identifier for the device and is used in subsequent identity authentication processes.

[0116] Step 1.1.4, in order to hide and mask output Generate masks respectively:

[0117] ,

[0118] ;

[0119] In the formula, It is hidden The mask, It is hidden The mask.

[0120] Step 1.1.5: Calculate the dynamic identity code of IoT device A:

[0121] ;

[0122] In the formula, It is the dynamic identification code of IoT device A. It is a collision-resistant hash function.

[0123] Step 1.1.6, IoT device A will Stored in the database It is stored in non-volatile memory NVM, and then a registration request is sent to the server through a secure channel. .

[0124] Step 1.2: The server verifies the dynamic identity code. If the verification is successful, the server uploads the data to the blockchain. This step includes:

[0125] Step 1.2.1: The server receives the message sent by IoT device A. Then, perform the same sharding operation as IoT device A to obtain... .

[0126] Step 1.2.2, Server Restoration and :

[0127] ,

[0128] .

[0129] Step 1.2.3: Recalculate the dynamic identity code :

[0130]

[0131] The calculation results and the data received from IoT device A If the values ​​are not equal, it indicates that the data has been tampered with or transmitted incorrectly, and the verification fails. If they are equal, the verification passes, and the server sends the data back to the server. Uploaded to the blockchain.

[0132] Step 1.3: The blockchain receives and stores the data uploaded by the server.

[0133] Therefore, after registration, the blockchain contains a tuple of IoT device A. Servers can add or logically delete data on the blockchain, while IoT devices can only update their own information. Split into The attacker attempted to reverse engineer the derivation. and The complexity will increase significantly.

[0134] Step 2: Mutual authentication between IoT device A and the server. If IoT device A wants to communicate with other devices in the IoT, it needs to establish a secure session key through the following process. It employs a dynamic reconstruction PUF mechanism to defend against modeling attacks, specifically including the following steps:

[0135] Step 2.1, Authentication initialization of IoT device A, which includes:

[0136] Step 2.1.1: When IoT device A wants to establish communication with the server, it generates a new random number. and first timestamp Meanwhile, IoT device A according to Loading parameters from NVM .

[0137] Step 2.1.2, IoT device A calculates , Using a fuzz extractor to extract from noisy PUF responses China Resumption ,calculate and , , .

[0138] Step 2.1.3, will Slicing, calculation , and , , , and update on-chain data. .

[0139] Step 2.1.4: In order to verify IoT device A on server SE, IoT device A sends an authentication request through a secure channel. Send to the server.

[0140] Step 2.2: IoT device A's authentication on the server and generation of the server's session key. This step includes:

[0141] Step 2.2.1: The server receives the request. Then, a second timestamp is generated. To verify The timeliness of the process is crucial; if verification fails, the process terminates; otherwise, [the process continues]. Perform the same sharding operation as IoT device A, according to Retrieve from the blockchain ,calculate and , , .

[0142] Step 2.2.2: The server recalculates and verifies. , If it is related to the chain The same result confirms that IoT device A is legitimate.

[0143] Step 2.2.3: The server generates random numbers. and third timestamp Calculate the dynamic binding parameters:

[0144]

[0145] In the formula, yes The mask, It is a random number. It is IoT device A The mask output in the i-th round.

[0146] Step 2.2.4: The server calculates the server's verification code, which is used to verify the server on IoT device A.

[0147]

[0148] In the formula, It is the server's authentication code. It is a collision-resistant hash function.

[0149] Step 2.2.5: In order to communicate with IoT device A, the server generates a session key.

[0150]

[0151] In the formula, It is the session key.

[0152] Step 2.2.6: To verify the session key SK on IoT device A, the server generates a key verification code.

[0153]

[0154] In the formula, It is a key verification code.

[0155] Step 2.2.7, the server will Send to IoT device A.

[0156] Step 2.3: Server authentication of IoT devices and state reconstruction of IoT devices. This step includes:

[0157] Step 2.3.1, IoT device A receives... Then, a fourth timestamp is generated. To verify the third timestamp The timeliness of the process is crucial; if verification fails, the authentication process ends; otherwise, it is reverted. Calculate and verify , If sent with the server If the results are the same, it means that IoT device A has successfully verified the server's identity.

[0158] Step 2.3.2, IoT device A calculates and , , and verify Check if it matches the one sent by the server; if it matches, confirm the session key. efficient.

[0159] Step 2.3.3, IoT device A utilizes The function reconfigures its state for the next round of secure communication:

[0160]

[0161] In the formula, This is the state of IoT device A in the (i+1)th round. It's a reconfiguration function. It is a collision-resistant hash function. This is the state of IoT device A in the i-th round.

[0162] Step 2.3.4: Update parameters:

[0163] .

[0164] ,

[0165] In the formula, It is IoT device A The mask output in the (i+1)th round, This is the challenge for IoT device A in round i+1. This is the state of IoT device A in the (i+1)th round. It is the temporary key of IoT device A in round i+1. It is the auxiliary data generated by NVM in round i+1. This is the response of IoT device A in round i+1. It is a physically unclonable function.

[0166] Step 2.3.5: The IoT device updates its state in NVM to... The challenge has been updated to Auxiliary data updated to Overwrite the old value.

[0167] In this embodiment of the authentication method, in order to achieve device registration and mutual authentication between IoT devices and the server, multiple smart contracts are designed, and the smart contract APIs perform the following operations:

[0168] saveA: This saveA method is called by the server to write the information of successfully registered IoT devices into the blockchain. It can only be called by the server, and the data cannot be tampered with after it is written.

[0169] deleteA: This deleteA method is called by the server to logically delete the IoT device identified as a malicious node, update the IoT device status to invalid, and prevent it from participating in authentication;

[0170] updateA: When an IoT device calls this updateA method, it can only update the IoT device's own on-chain information.

[0171] queryA: This queryA method is called by the server to find IoT devices. Corresponding and ,as well as .

[0172] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A blockchain-based IoT device authentication method, characterized in that, Includes the following steps: Step 1: IoT device registration, which includes the following steps: Step 1.1: Based on LR-OPUF construction, generate dynamic identity codes for IoT devices; Step 1.1 specifically includes: Step 1.1.1: The IoT device randomly generates a new state. ,challenge and random numbers ; Step 1.1.2: Based on the construction of LR-OPUF, calculate: ; ; ; ; In the formula, IoT devices The mask output in the i-th round, It is the input transformation function. It is a collision-resistant hash function. It is the response of the IoT device in the i-th round. It is a physically non-clonable function. It is the temporary key for IoT devices in round i. It is auxiliary data generated by non-volatile memory NVM in the i-th round. It is the generation function of the fuzz extractor. IoT devices The mask output in the i-th round, It is the output transformation function; The final output is the processed response. ; Step 1.1.3: Calculate the temporary identity of the IoT device: , In the formula, It is a temporary identity identifier for IoT devices in round i. It is a permanent identifier for IoT devices. It is a random number generated by an IoT device; Then, Split into two segments This temporary identity serves as a unique identifier for IoT devices in subsequent authentication processes. Step 1.1.4, in order to hide and mask output Generate masks respectively: ; ; In the formula, It is hidden The mask, It is hidden The mask; Step 1.1.5: Calculate the dynamic identity code of the IoT device: ; Step 1.1.6, IoT devices will Stored in the database It is stored in non-volatile memory NVM, and then a registration request is sent to the server through a secure channel. ; Step 1.2: The server verifies the dynamic identity code. If the verification is successful, the server uploads the data to the blockchain. Step 1.3: The blockchain receives and stores the data uploaded by the server; Step 2: Mutual authentication between IoT devices and servers, specifically including the following steps: Step 2.1: IoT device authentication initialization; Step 2.1 specifically includes: Step 2.1.1: When an IoT device wants to establish communication with the server, it generates a new random number. and first timestamp Meanwhile, IoT devices according to Loading parameters from NVM ; Step 2.1.2, IoT device calculation , Using a fuzz extractor to extract from noisy PUF responses China Resumption ,calculate and , , ; Step 2.1.3, will Slicing, calculation , and , , , and update on-chain data. ; Step 2.1.4: In order to verify the IoT device on the server SE, the IoT device sends an authentication request through a secure channel. Send to the server; Step 2.2: IoT device authentication on the server. The server, based on... Retrieve from the blockchain ,calculate and And the server generates a session key; Step 2.3: The server authenticates the IoT device and reconstructs the state of the IoT device, and the IoT device will update its state in NVM, overwriting the old value.

2. The blockchain-based IoT device authentication method according to claim 1, characterized in that, Step 1.2 specifically includes: Step 1.2.1: The server receives the data sent by the IoT device. Then, perform the same sharding operation as for IoT devices to obtain... , 1) Step 1.2.2, Server Restoration and : ; ; Step 1.2.3: Recalculate the dynamic identity code: ; The calculation results and those received from IoT devices If the values ​​are not equal, it indicates that the data has been tampered with or transmitted incorrectly, and the verification fails. If they are equal, the verification passes, and the server sends the data back to the server. Uploaded to the blockchain.

3. The blockchain-based IoT device authentication method according to claim 1, characterized in that, Step 2.2 specifically includes: Step 2.2.1: The server receives the request. Then, a second timestamp is generated. To verify The timeliness of the process is crucial; if verification fails, the process terminates; otherwise, [the process continues]. Perform the same sharding operation as IoT devices, based on Retrieve from the blockchain ,calculate and , , ; Step 2.2.2: The server recalculates and verifies the dynamic identity code. If it matches the dynamic identity code on the blockchain, the identity of the IoT device is confirmed to be legitimate. Step 2.2.3: The server generates random numbers. and third timestamp Calculate the dynamic binding parameters: ; In the formula, yes The mask, It is a random number. IoT devices The mask output in the i-th round; Step 2.2.4: The server calculates its own verification code, which is used to verify the server on IoT devices. ; In the formula, It is the server's authentication code. It is a collision-resistant hash function; Step 2.2.5: In order to communicate with IoT devices, the server generates a session key: ; In the formula, It is the session key; Step 2.2.6: To verify the session key SK in IoT devices, the server generates a key verification code: ; In the formula, It is a key verification code; Step 2.2.7, the server will Send to IoT devices.

4. The blockchain-based IoT device authentication method according to claim 1, characterized in that, Step 2.3 specifically includes: Step 2.3.1, IoT device receives Then, a fourth timestamp is generated. To verify the third timestamp The timeliness of the process is crucial; if verification fails, the authentication process ends; otherwise, it is reverted. Calculate and verify , If sent with the server The same result indicates that the IoT device has successfully verified the server's identity. Step 2.3.2, IoT device calculation and , , and verify Check if it matches the one sent by the server; if it matches, confirm the session key. efficient; Step 2.3.3, Utilization of IoT devices The function reconfigures its state for the next round of secure communication: ; In the formula, This represents the state of the IoT device in round i+1. It's a reconfiguration function. It is a collision-resistant hash function. This refers to the state of the IoT device in the i-th round. 1) Steps 2, 3, and 4: Update parameters: ; , ; In the formula, IoT devices The mask output in the (i+1)th round, This is the challenge for IoT devices in round i+1. This represents the state of the IoT device in round i+1. It is the temporary key for IoT devices in round i+1. It is the auxiliary data generated by NVM in round i+1. It is the response of the IoT device in round i+1. It is a physically unclonable function; Step 2.3.5: The IoT device updates its state in NVM to... The challenge has been updated to Auxiliary data updated to Overwrite the old value.

5. The blockchain-based IoT device authentication method according to claim 1, characterized in that, To enable IoT device registration and mutual authentication between IoT devices and servers, multiple smart contracts are designed. The smart contract API performs the following operations: saveA: Called by the server, it writes the information of successfully registered IoT devices into the blockchain. It can only be called by the server, and the data cannot be tampered with after it is written. deleteA: Called by the server, this function logically deletes IoT devices identified as malicious nodes, updates the IoT device status to invalid, and prevents them from participating in authentication. updateA: Called by IoT devices, it can only update the IoT device's own on-chain information; queryA: Called by the server to find IoT devices. Corresponding and ,as well as .

6. An IoT device authentication system based on the blockchain-based IoT device authentication method according to any one of claims 1 to 5, characterized in that, include: The device layer is used for the collection and processing of data from IoT devices, including multiple IoT devices; Management layer, used for IoT device registration and mutual authentication between IoT devices and servers; This includes a server and a smart contract API. The server is used for IoT device registration and access authentication, while the smart contract API provides a restricted operation interface that only allows authorized users to add data on the chain. During the registration phase, IoT devices register through the server, while during the mutual authentication phase, the server and IoT devices authenticate each other so that IoT devices can access IoT gateways or transmit data. The storage layer is used to store the information required for the registration and authentication of IoT devices, including a local database and a blockchain. The database is used to store temporary sensitive data in the IoT device registration and authentication process. Blockchain, as a distributed ledger, stores the parameters required for registration and identity verification in a tamper-proof manner; Some IoT device information is stored in a local database, while some IoT device information required by the server is stored on a blockchain.

7. The IoT device authentication system according to claim 6, characterized in that, To enable automated execution of secure information, IoT devices and servers call smart contract APIs to trigger the execution of smart contracts on the blockchain.