Abstract
Now, the security and privacy-preserving of Internet of Things are receiving more attention. This article proposes a new method of Internet of Things security and privacy preserving by combining differentiated nodes, precision clustering, RSA, multi-signature, and blockchain. To calculate the node rank value in Internet of Things, the number of nodes’ links is taken as the weight of nodes based on PageRank. This method increases the node rank values’ difference between nodes. Accurate clustering determines the initial central nodes of k-means based on the differentiated node rank values, which effectively differentiates the active and inactive nodes in Internet of Things and achieve different levels of protection. To ensure data’s reusability, we adopt the multi-signature. And considering node’s incoming nodes have certain decision on whether data can be transmitted, we filter out two nodes with the highest node rank value from active node’s incoming nodes to do 2/3 multi-signature which saves resources. We encrypt and sign the transmitted data with RSA, helping receivers to verify data. Data are transmitted safely through the blockchain. Successful validation indicates successful transmission. Experiments show that the proposed method can effectively distinguish between active and inactive nodes, which increases the difficulty of attackers’ attack and effectively protects the security and privacy of Internet of Things nodes and data.
Introduction
The Internet of Things (IoT) has been developing continuously in recent years and has gradually penetrated into various fields, including agricultural production, industrial manufacturing, climate monitoring, and medical care. It can also be seen everywhere in daily life, such as the Internet of Vehicles 1 and smart home. The IoT is a kind of network that enables intelligent identification, location, tracking, monitoring, and management. According to agreed protocols, it connects any item to the Internet through information sensing devices such as QR code recognition devices, radio-frequency identification (RFID) devices, 2 infrared sensors, global positioning systems, and laser scanners for information exchange and communication. 3 The IoT is an extension of the Internet. Its client extends between any item. 4
The IoT has given people great convenience in production and life, but as the application continues to expand, an important issue has also become prominent. There are countless sensors every day that collect a lot of information around us, which contains a lot of private information. This information can be obtained through special technical means, which may cause serious privacy problems. 5 For the individual, his position, travel time, and even his feelings are mastered by the smart devices. Since our devices are connected to the Internet, the information sent is at great risk of being stolen and modified. 6 Therefore, the issue of privacy protection in the IoT is getting more and more attention.
The privacy of the IoT mainly involves two aspects: one is national and corporate secrets, and the other is personal privacy. For countries and enterprises, data resources contain certain sensitive information. If they are not handled properly, it is easy to be attacked in the process of data sharing, resulting in confidential leakage, which constitutes a serious security threat. Similarly, for individuals, data information often involves privacy issues such as personal behaviors and interests. It also poses a threat to individuals. Therefore, the development of the IoT requires comprehensive consideration of these security factors. We should design and establish a relatively complete security mechanism. In addition, due to the topology of the IoT and the constraints of resources, security technology occupies more network resources, and the overhead of execution is large, which will affect the efficiency of the network. Therefore, it is necessary to consider the problem of resource consumption while taking protection measures.
However, mentioning the security protection of the network, multi-signature and the blockchain technology that has emerged in recent years have attracted more and more attention. Multi-signature is a special signature proposed by Itakura and Nakamura,
7
which allows
Blockchain technology is a new technology that has emerged in recent years. It can play an important role in security and can also be applied to the privacy protection of IoT. Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. The so-called consensus mechanism is a mathematical algorithm for realizing trust and acquiring rights between different nodes in the blockchain system. 9 Blockchain is an important concept of Bitcoin. It is essentially a decentralized database and serves as the underlying technology for Bitcoin. A blockchain is a string of data blocks generated by cryptographic methods. Each block contains information about the transaction of a Bitcoin for verifying the validity of its information and generating the next block. 10
The blockchain uses a decentralized collaboration mechanism to track and analyze the behavior of the participants through credit, evidence, and transaction records, ensuring that all transactions and data are trusted. The proponent of the blockchain concept, Nakamoto Sakamoto, has proved that when the illegal computing power is less than 50%, the transaction information on the blockchain is unforgeable and unmodifiable. All participating nodes will participate in the authentication of the transaction and guarantee the transaction through the encryption algorithm. As long as the number of illegal users is not more than half, the real chain must be the longest. In the event of a malicious tampering of the user during the transaction, the upstream and downstream blocks of the chain will be immediately monitored for anomalies. All subsequent transaction data will be automatically linked to the legal block, and the short chain will become an illegal chain. The characteristics of the blockchain in Bitcoin transactions can be applied to the privacy protection of the IoT. 11 The process of transaction is shown in Figure 1.

The authentication process for transactions on the blockchain.
We abstract the common IoT into a three-dimensional model which is inspired by the four-layer HetIoT architecture proposed by Qiu et al. 12 As shown in Figure 2, the bottom layer is a collection of sensors distributed throughout. They either pass data to the servers on the second layer, either single or multiple. The second layer contains all the servers that receive information about the sensors in a certain area, as shown by the dashed box in Figure 2. Considering that the data leakage of the sensor node has less impact than the leakage of the second layer, this article does not consider the situation of the bottom layer. We mainly propose protection methods for the second layer.

Three-layer structure of IoT model.
The top layer is the total server used to receive all data from servers of the second layer. In the second layer structure, this article proposes a new method of security and privacy protection of IoT with differentiated nodes, precision clustering, RSA algorithm, multi-signature, and blockchain. The method mainly includes the following parts:
1. Screening out active and inactive nodes using the DNK-Means method.
The method is based on the DNK-Means algorithm: an improved PageRank and k-means algorithm, which we proposed in our previous paper. 13 The NR value of the node is calculated by the number of links in each server node as the weight of the node. Then, according to the NR value, precision clustering is performed to find out the server with more data transmission, that is, the active node.
2. Generate public and private keys for each node in the IoT.
3. Multi-signature and blockchain transmission.
In order to solve the problem of resource consumption, the method proposed in this article only multi-signs active nodes. In addition, considering that incoming nodes of each node have certain decision on whether the data of the node can be transmitted, we filter the highest two nodes as the participating nodes of 2/3 multi-signature according to the NR value of each node. They do multiple signatures with the sending node. For the data to be transmitted, we perform RSA encryption processing and signature, and after receiving the data, the receiver uses the corresponding key to decrypt the data. The data are transmitted through the blockchain. If the receiver succeeds, the transaction is completed and the data are successfully transmitted.
Experiments show that the proposed method can effectively distinguish between active nodes and inactive nodes, increase the difficulty of attackers, and effectively protect the security and privacy of IoT.
Related work
With the increasing concern about privacy issues in the IoT, research on privacy protection has gradually begun. The encryption method is an important method in the privacy protection of the IoT, and it is also a method with more applications. In the protection method based on data encryption, the invisibility of original data and the non-loss of data are realized through the cryptographic mechanism, which not only ensures the confidentiality of data but also guarantees the privacy of data. The most used encryption methods are homomorphic encryption and Secure Multi-Party Computation (SMC). The homomorphic encryption was originally proposed by Rivest et al. in 1978. It is a cryptographic transformation technique that allows direct manipulation of ciphertext. 14 Later, it was further improved by Domingo et al. The homomorphism of the algorithm ensures that users can operate on sensitive data without revealing data information. The secret homomorphic technique is based on algebra theory, and its basic ideas are as follows:
Suppose
It can be seen from equation (1) that in order to protect the original private data such as
The attribute-based encryption (ABE) system has the ability to decrypt ciphertext when the user satisfies the required attributes. So, the ability makes it ideal for broadcast encryption and ciphertext-based access control. However, implementing ABE in resource-constrained IoT is very difficult. 16 So, we need an attribute-based lightweight encryption scheme. Yao et al. 17 proposed an attribute-based lightweight encryption scheme in encryption technology. The ABE scheme is based on elliptic curve cryptography (ECC) to solve privacy issues. The security of this scheme is demonstrated in the attribute-based selection model. By comparing and analyzing the existing ABE scheme, it performs better in terms of execution efficiency and communication cost.
While using encryption technology, the anonymization method is also a more common method of privacy protection. Sweeney proposed the k-anonymity privacy protection model in 2002. 18 In the data table T, the quasi-identifier of each record is at least the same as the other k-1 records, that is, the k records cannot be distinguished from each other, and the k records are said to belong to an anonymous group. Since k-anonymous models have no constraints on sensitive attributes, they are not resistant to Homogeneity Attack and Background Knowledge Attack, so l-diversity is proposed by Machanavajjhala et al., 19 which guarantees that each anonymous group has at least one different value for sensitive attributes. This allows the attacker to confirm the sensitive information of a sample with a maximum probability of 1/l. After that, the t-closeness model considers the distribution of sensitive attributes 20 on the basis of the two and makes further improvements. It requires that the distribution of sensitive attributes of all anonymous groups should be as close as possible to the global distribution of the attributes.
In recent years, Wang et al. 21 proposed a scheme based on the no-certificate-center algorithm and proved that the scheme has high anonymity and high efficiency. Tianhan Gao et al. proposed an anonymous access authentication scheme for vehicular ad hoc networks under edge computing based on ID-based short group signature mechanism to improve the efficiency and anonymity of access authentication. 22 In order to protect the privacy of vehicle nodes, multiple pseudonyms were proposed and a new evaluation method was designed to identify and revoke malicious vehicles. In addition to the Internet of Vehicles, mobile healthcare crowd sensing (MHCS) is also a typical application of the IoT. Some people have proposed corresponding privacy protection methods. Jingwei Liu et al. proposed a large-scale concurrent data anonymous batch verification scheme for MHCS which is based on improved certificateless aggregate signature. 23 They verify individual data of different users in bath. At the same time, the true identity of the participants is hidden. The scheme can simultaneously authenticate all sensed biological information. Performance evaluation shows that the scheme has high efficiency and is safe.
In addition to the traditional methods of privacy protection, people have gradually introduced the blockchain technology that has been emerging in recent years into the IoT. Due to the security of the blockchain, it can provide a new solution to the privacy protection problem in the IoT. Aafaf Ouaddah et al. 24 proposed a framework of access control based on blockchain technology—FairAccess—and provided a reference model for the proposed framework. FairAccess is a fully decentralized pseudonym and privacy protection authority management framework which allows users to own and control their data. To implement the model, they adjusted the blockchain to a decentralized access control manager. Compared with financial Bitcoin transactions, FairAccess introduces new types of transactions for granting, acquiring, commissioning, and revoking access. Lee and Lee 25 proposed a new update scheme on the firmware of many embedded devices in the IoT. They use blockchain technology to check the firmware version and verify the correctness of the firmware and download the latest firmware. The process of this firmware update scheme is the device makes an update request to a node in the network, the node responds, and it determines whether the firmware of the device is the latest version. If its firmware version is already the latest version, its integrity will be verified. If the firmware version is an older version, the embedded device can download the latest version from the firmware sharing network in a point-to-point manner. This solution effectively reduces the risk of embedded devices being attacked by vulnerabilities, while ensuring that the device’s firmware is up to date and correct.
In an important application scenario of the IoT: smart healthcare, blockchain technology helps solve privacy concerns. Aiqing Zhang and Xiaodong Lin proposed a blockchain-based secure and privacy-preserving personal health information (PHI) sharing scheme 26 to improve the diagnosis of electronic health systems. First, two blockchains are constructed by designing their data structures and consistent mechanisms: private blockchains and consortium blockchains. The private blockchain is responsible for storing the PHI, while the consortium blockchain records the security index of the PHI. All data, including PHI, keywords, and patient identities, are public keys using keywords encrypted with keyword search. In addition, in order to ensure the availability of the system, the block generator provides proof of conformance to add new blocks to the blockchain. Ji et al. 27 studied the location sharing of telecare medical information systems based on blockchain. They define the basic requirements for location sharing, including retrievability, verifiability, confidentiality, decentralization, multi-level privacy protection, and unforgeability. Then, a block-based multi-layer location sharing scheme, namely, BMPLS, is proposed. The experimental results show that the scheme is effective and feasible for patients and medical staff and can be applied to location information protection in telecare information systems.
To help peers to negotiate energy prices anonymously and execute transactions safely, Aitzhan and Svetinovic 28 used blockchain technology, multi-signature, and anonymous encrypted message flows to implement proof-of-concept for decentralized energy trading systems. To optimize IoT requirements, Dorri et al. 29 proposed a layered lightweight scalable blockchain (LSB) to use in smart homes. The central manager in the smart home establishes a shared key for communication and handles all incoming and outgoing requests. It is important for low-resource devices. The LSB includes throughput management, lightweight consistent algorithms, and distributed trust. Its decentralization is achieved by forming an overlay network.
While protecting privacy, reducing resource overhead as much as possible to improve system performance has always been the goal pursued by every IoT system. Many privacy protection methods, while protecting, consume too much resources. How to achieve the balance between privacy protection and resource conservation is one of our research priorities. Cai and Zheng 30 proposed a new data uploading mechanism in smart cyber-physical systems, which considers both energy saving and privacy protection. The mechanism protects privacy by hiding the abnormal behavior of participants and at the same time implements energy-efficient schemes for data upload by introducing acceptable additional content. Zheng et al. 31 proposed a new privacy protection framework for cyber-physical social systems (CPSSs), formulated privacy issues and user expectations in CPSSs, and designed a corresponding data publishing mechanism for users. It manages publishing behavior to hide sensitive physical profiles. This mechanism achieves a local maximized performance on the aspect of published data size, which is equal to the global optimal value. Liu et al. 32 proposed RFID estimation scheme with blocker tags (REB). The slotted Aloha protocol of the framework is specified in the EPCC1G2 standard. For each round of the Aloha protocol, REB executes the protocol on the genuine tags and the blocker tag at first and then executes the protocol on the known blocking IDs virtually using the same parameters. Statistical inferences were made from these two sets of reactions and the true number of tags was estimated. The program minimizes the time and energy costs required.
Security and privacy protection methods for IoT
In this article, we mainly combine DNK-Means algorithm which we proposed in this article before with data encryption, multi-signature, and blockchain to protect the privacy and security of IoT nodes and data. DNK-Means algorithm can effectively distinguish between active nodes and inactive nodes and effectively screen the nodes that need protection first. Data encryption can protect the data transmitted between nodes of the IoT for the first time. The use of multi-signature and blockchain not only enables diversified management of data and multiple guarantees but also effectively protects the security of nodes in data transmission, especially active nodes, making it more difficult for attackers to crack data.
DNK-Means algorithm is a k-means clustering algorithm based on differentiated nodes. This algorithm effectively avoids the disadvantages of clustering center uncertainty when k-means algorithm is used alone. Corresponding to the method of this article, the algorithm has two main parts. The first part of the algorithm is differential node sorting algorithm (DNR) based on PageRank. The DNR algorithm improved the shortcomings of PageRank which distributes the link weight on average and ignores the authority of each node. It takes the number of links of each node as the index to evaluate its authority and uses the adjacency matrix and the transfer matrix to represent the structure between the IoT nodes. When the NR value is assigned, the corresponding weight is assigned according to the authority of the node. The second part of the algorithm is based on the first part. According to the NR value of each IoT node obtained by the DNR algorithm, the higher the NR value, the higher the authority of the node. Then according to the current sorting result, combined with k-means algorithm for validity verification, the nodes in the IoT are divided into two categories more efficiently and accurately, providing convenience for the effective implementation of multi-signature in the later stage.
After the active node is obtained in the previous step, the nodes in the IoT can transmit data. In this article, the data are encrypted by RSA algorithm before transmission. After that, we divide the active node and the inactive node according to the DNK-Means algorithm and perform 2/3 multi-signature on the active node and then transmit the data. The verified transaction finally joins the blockchain, which realizes the protection of the security and privacy of nodes and data in the IoT.
DNR algorithm: differential node ranking algorithm based on PageRank
DNR algorithm is based on the idea that “the nodes linked from high-quality nodes must be high-quality nodes.” At the same time, it improves PageRank’s disadvantages of evenly distributing the links’ weights and ignoring the authority of nodes. In the abstract server layer model diagram of the IoT (Figure 3), the edge from A to B represents A sending data to B, A is the data sender, and B is the data receiver. At the same time, we illustrate the basic idea of the DNR algorithm with the IoT node diagram (Figure 3) of the five nodes.

Basic idea diagram of DNR algorithm.
DNR algorithm mainly considers the characteristics of personalized nodes and assigns corresponding weights according to the different authoritative of nodes when assigning NR values. In Figure 3, node A points to nodes B, C, D, and E because the authority value of nodes B, C, D, and E is different, and node A should not give B, C, D, and E the same NR value, that is, one-fourth authority value, but assign corresponding weight according to the authoritative of its nodes. Based on this idea, the DNR algorithm is proposed.
In the IoT node, the number of incoming links of a node represents the number of times it is a data receiver, and the number of outgoing links represents the number of times it is a data sender. To a certain extent, the more data a node sends and receives, the more active the node is and the more important it is. Therefore, the DNR algorithm uses the number of links of IoT nodes to measure the authority of nodes. In Figure 3, the total links’ number of B is 5, including 3 inbound links and 2 outbound links. The total links’ number of C is 4, including 3 in-links and 1 out-link. The total links’ number in D is 4, including 1 in-link and 3 out-links. The total links’ number in E is 3, including 2 in-links and 1 out-link. According to the idea of DNR algorithm, B will get the authority value of 5/(5 + 4 + 4 + 3) of node A, C and D will get the authority value of 4/(5 + 4 + 4 + 3) of node A, and E will get the authority value of 3/(5 + 4 + 4+ 3) of node A. The equation of DNR is shown in equation (2)
In equation (2), N is the sum number of the IoT nodes, d is the damping factor,
From the above analysis, we can get the calculation procedure of DNR as follows:
First, by the link structure in the IoT node diagram, we can obtain the adjacency matrix A of the IoT node. The calculation of A is shown in equation (3)
Next, the transition matrix T is calculated by the adjacency matrix A. The equation of T is shown in equation (4)
The description of the algorithm for solving the transition matrix by DNR is shown in Table 1.
DNR algorithm calculates transition matrix T.
Finally, an initial NR value 1/N is assigned to each node. N is the total numbers of IoT nodes. Then, we can obtain the iterative DNR value by using the transfer matrix T and the iteration times M.
DNK-Means: k-means analysis algorithm based on DNR algorithm
The main idea of the k-means algorithm is randomly select k objects from the data set as the initialization centers and assign unselected data objects to the clusters closest to them according to their distance from the center of these clusters. Then calculate the new cluster center for each cluster. Repeat this process until the clustering results remain stable. This algorithm clusters a given data set in a simple way, but there are also many shortcomings to be improved. The main performance is that the random selection of the initial cluster center will affect the aggregation effect. At the same time, in the process of finding the cluster center, a lot of iterative calculations are needed, and the time complexity is high.
To solve the problem of randomly determining the center at the beginning of k-means algorithm, we proposed DNK-Means algorithm which combines DNR algorithm and k-means algorithm to distinguish between active and inactive nodes in the IoT. The DNR algorithm optimizes the PageRank algorithm to increase the difference between the highest and lowest NR values of the node, and the sorting result is more accurate. At the same time, increasing the difference helps the k-means algorithm to determine the initial cluster center. In the IoT, if the DNR value of a node is higher, the more active the node is, the more important it is. Conversely, the lower the DNR value, the less active the node is and the less important it is.
The main ideas of DNK-Means are as follows:
First, the DNR algorithm is used to rank the nodes according to the number of links of the IoT nodes. The higher the DNR value, the higher the authority of the nodes and the higher the probability that the nodes belong to the active nodes. Conversely, the probability that the nodes belong to the inactive nodes increases.
Then, the node with the highest and lowest DNR value is taken as the center of the k-means cluster, the node with the highest DNR value is used as the cluster center of the active node, and the node with the lowest DNR value is the cluster center of the inactive node.
Finally, according to the concept of “material-like clustering,” the distance between data set objects is taken as the measurement standard, and the error criterion is taken as the sign at the end of the algorithm to cluster the nodes of the IoT. The number of nodes in each class is also calculated in the algorithm.
The algorithm description of DNK-Means is shown in Table 2.
DNK-Means algorithm description.
As can be seen from the DNK-Means description in Table 2, at first, the algorithm reconstructs the transition probability matrix according the DNR algorithm, and then, it uses T′ to be the input of the PageRank algorithm. The DNR value represents the authority of the IoT node. In order to identify the active nodes, it selects the maximum and minimum DNR values as inputs to the k-means, and then, it obtains the final clustering results. In addition, in order to confirm the node that performs multi-signature, the algorithm simultaneously calculates the number of active nodes and inactive nodes.
Multi-signature and data transmission on the blockchain
The combination of IoT and multi-signatures enables IoT nodes to be signed by multiple users before transmitting data and set permissions on whether data can be transmitted. This not only protects the IoT nodes but also ensures the security of data transmission, effectively preventing the attack node from destroying the data. In addition, the data are encrypted and signed multiple times during the signature process, further protecting the security of the data and avoiding the risk of data leakage. The specific process of multi-signature is as follows.
Generate keys
RSA algorithm is the most widely studied public key algorithm. It is the first algorithm that can be used for both encryption and digital signatures. Therefore, we use the RSA algorithm to generate the public and private keys of the IoT nodes in this article. The keys for the RSA algorithm are generated by the following way:
Choose two distinct prime numbers p and q.
Calculate modulus N, and the equation is shown in equation (5)
Calculate the totient r using equation (6)
Choose an integer e such that
Compute d to satisfy the congruence relation, and the equation is shown in equation (7)
Destroy the records of p and q.
Generate multi-signature address
Using multi-signature technique requires a multi-signature address which is generated by the node’s public key. In this article, we first select the nodes that need to be multi-signed based on the active nodes and inactive nodes obtained in the previous section, that is, the nodes that need to be significantly protected. Then, consider that the incoming nodes of the node in the IoT represent the node that transmits data to the node. The higher the NR value of a node’s incoming node, the greater the authority of this node, and the more authoritative it is in determining whether data can be transmitted. Because the
The algorithm description of obtaining the two nodes with the largest NR value in each active node’s incoming nodes is shown in Table 3.
The description of obtaining the two nodes with the largest NR value in each active node’s incoming node.
Encrypt and sign data
After generating a multi-signature address, a multi-signature transaction can be initiated. Taking Figure 3 as an example, suppose that node A wants to initiate a transaction. At this time, node A already knows the address and the public key of the receiver. This premise is specified by the blockchain. Before initiating the transaction, in order to ensure the security of the data, we first use the RSA algorithm to encrypt the data with the recipient’s public key. If the transaction is allowed to proceed, the receiver also uses the RSA algorithm to decrypt the data after receiving the data. RSA encryption and decryption are performed as follows.
Suppose
The encryption process
The decryption process
In this article, data are
Create a multi-signature transaction
Still taking Figure 3 as an example, suppose that node A wants to initiate a transaction. First, node A will package the previously processed data to be sent, the address of the recipient, and its own address into the transaction information. Then, Nodes B and D need to make a judgment on the transaction initiated by Node A. If Node B and D believe that the transaction is available, they will provide their own private key. If the number of private keys provided by the three parties (A, B, and D) is less than 2, then the transaction cannot be formed, the transaction is terminated, and the data to be sent by A is not allowed to be sent to the receiver. Otherwise, it is necessary to determine whether the private key corresponds to the public key of the multi-signature address: if it does not correspond, it means that the transaction may be attacked by the attacking party, and the transaction cannot be performed; if corresponding, the node providing the private key signs the transaction. Now check the number of signatures for the transaction. If the number of signatures is not equal to 2, the transaction is terminated; if the number of signatures is equal to 2, the data have been allowed to be sent to the recipient. Finally, the final transaction information is generated using the script file generated when the multi-signature address is generated, the transaction information of the sender application, and the signature of the node providing the private key.
The algorithm for this step is shown in Table 4.
The description of create multi-signature transactions.
Add transactions to the blockchain
If the transaction was successfully generated in the previous step, it will be verified by other nodes on the blockchain. After the successful verification, the transaction will be broadcast on the blockchain, and other nodes will also mine. After successful mining, all the transactions in a period of time will be packaged into the block and put into the blockchain. At this time, the transaction successfully joined the blockchain.
Verify transaction: receiver decrypts data and verifies signature
To verify the security of the data transmission and the integrity of the data, the receiver needs to decrypt the data and verify the signature after receiving the data as follows:
First, the receiver needs to decrypt the encrypted data. Decryption requires Base64 decoding of the data first and then decrypting the data with the private key it holds. After the decryption is successful, the receiver will get the transmitted data.
Then, the receiver does a SHA-1 hash on the decrypted data.
Finally, the receiver again base64 decodes the signature and then uses the sender’s public key to verify the signature. If the result obtained is the same as that obtained after the previous hash in step 2, the verification is successful, and it is proved that the received data are sent by the sender, not other nodes, such as the attacker, and the data transmitted this time is safe and reliable. If the verification fails, it indicates that the data transmission has an error and the data is unreliable.
The digital signature on the blockchain ensures the security of the information encryption, so that the receiver can easily confirm the data sender. And the data signature makes it very easy for the receiver to verify the information and confirms that no errors occur during the decryption process. Multi-signature requires the node to obtain sufficient authority before transmitting data, ensuring the security of the node and giving the data on the node multiple guarantees. In addition, multi-signature also ensures that a node can participate in the transaction when the node loses its own key, and the data can be transmitted, which ensures the reusability of the node and the data.
The complete algorithm description of multi-signature and blockchain data transmission is shown in Table 5.
The description of multi-signature and data transfer on blockchain.
Experimental results and analysis
The data used in this experiment are a randomly generated 20,000 × 20,000 matrix to simulate nodes in IoT.
The impact of DNR algorithms on the ranking of IoT nodes
In this part, we use the PageRank algorithm and the DNR algorithm separately to sort generated matrix in descending order of the NR values and compares the results to verify the role of the DNR algorithm in the ranking of differentiated nodes. The results of top 10 nodes and last 10 nodes NR values generated by two algorithms are shown in Tables 6 and 7.
The top 10 nodes of PageRank algorithm and DNR algorithm.
DNR: differential node sorting algorithm.
The last 10 nodes of PageRank algorithm and DNR algorithm.
DNR: differential node sorting algorithm.
By comparing and analyzing Tables 6 and 7, it can be seen that the results obtained by the DNR algorithm are different from those obtained by the PageRank algorithm. Among the top 10 nodes, the DNR value obtained by the DNR algorithm is generally larger than the NR value obtained by the PageRank algorithm; and in the last 10 nodes, the comparison results are exactly the opposite. The above results show that the DNR algorithm does increase the difference between nodes, which helps to distinguish the two types of nodes effectively in the following steps.
The clustering effect analysis of DNK-Means algorithm
We compare and analyze the clustering effect of DNK-Means algorithm and PK-Means algorithm with nodes in different feature. PK-Means is the algorithm that combines the PageRank and the k-means algorithm. The numbers of node feature vectors for comparison are 5, 50, 100, 150, 200, 300, and 500. The experimental results when the number of feature vector is 500 are representative, as shown in Figure 4.

The results of (a) DNK-Means and (b) PK-Means when the feature vector is 500.
In Figure 4, Figure 4(a) is the experimental result of DNK-Means, and Figure 4(b) is the experimental result of PK-Means. By comparing and analyzing the two results, it can be seen that the clustering effect of DNK-Means is better than that of PK-Means, and DNK-Means can distinguish two types of nodes more accurately and effectively.
The above results show that the DNK-Means algorithm can effectively distinguish between active nodes and inactive nodes, which is of great help to the subsequent steps of the method proposed in this article and the purpose of reducing resource consumption.
Comparative analysis of RSA and other encryption methods
In this article, the RSA algorithm is used to encrypt and sign data in the part of multi-signature and blockchain data transmission. The RSA algorithm is an asymmetric encryption algorithm that can be used for both encryption and digital signatures. The Data Encryption Standard (DES) algorithm is a symmetric encryption algorithm. Its encryption operation and decryption operation use the same key. Both sender and receiver of the information must hold the password (symmetric password) when transmitting and processing information. The Elliptic Curve Digital Signature Algorithm (ECDSA) is a simulation of a Digital Signature Algorithm (DSA) using ECC. The comparison of encryption and signature for these three methods is shown in Table 8.
The comparison of RSA and DES and ECDSA.
DES: Data Encryption Standard; ECDSA: Elliptic Curve Digital Signature Algorithm.
In addition, this article also compares the time consumed by RSA and DES + ECDSA in the process of encryption–decryption and signature verification. Because the key pair is saved directly to the file after it is generated, this article ignores the time it takes to generate the key. The comparison results are shown in Figure 5.

The time comparison of RSA and DES + ECDSA when using different character lengths.
As can be seen from Figure 5, although the DES encryption–decryption process is faster than RSA, the ESDCA signature-verification process is significantly slower than RSA. Overall, RSA has a lower latency than DES + ECDSA.
In addition, DES needs to share the key, and both the sending and receiving parties needs to manage the key which will cause some consumption. Also, if the key is leaked, the data may be decrypted. So, RSA is more secure in terms of security.
Evaluation of this study’s method
Safety
In this part, we mainly make a holistic assessment of the safety of the method proposed in the article. This article uses multi-signature, RSA algorithm, and blockchain. These technologies protect nodes and data transmission in IoT and achieve the purpose of protecting IoT privacy. The specific evaluation results are shown in Table 9.
Security and privacy requirement evaluation.
IoT: Internet of Things.
It can be seen from Table 9 that the method proposed in the article protects the IoT cRSA algorithm and multi-signature. The transmission of the node through the blockchain protects the privacy of the sender and the receiver, ensuring the smooth progress of the transaction and achieving the purpose of protecting the privacy of IoT.
Consumption
In order to protect the data stored in sensor nodes in the IoT, we use blockchain, multi-signature, and encryption techniques to protect the security and privacy of important data. But using these techniques requires some time and space overhead. Therefore, we try to reduce the consumption of time and space from several aspects.
We store the encrypted IoT data in the blockchain rather than the real data to be transmitted by the IOT node. The blockchain does not need to store a lot of important data in the IoT, so it does not take up too much space in the chain, and only the recipient can get true data.
Some nodes in the IoT do not send data frequently and have low correlation with other nodes. Some nodes send data frequently and have high correlation with other nodes. So, we divide all nodes into active nodes and inactive nodes through the improved PageRank algorithm (DNR) and only use multi-signature technology to determine the nodes that are active, thus reducing the time and space consumption.
The experimental results show that a large part of the time spent signing and encrypting comes from the time when the key pair is generated. So, when generating a pair of public and private keys for each node, we encrypt and store these key pairs. In this way, each node only needs to generate a key pair once, which avoiding generation of key pairs every time, thus reducing time consumption. Storage key pairs also do not need too much space, and the consumption of space resources can be negligible.
Without generating the key, the comparison between RSA and DES ECDSA shows that the process of encryption, decryption, and signature verification takes about 36.4 MS, which is much less than the time consumed by DES + ECDSA. For this reason, we chose RSA mode to encrypt, decrypt, and sign the data. And check the sign, so that this part of the consumption of the minimum time, which saves resources.
In general, the method proposed in this article optimizes the consumption of time and space and achieves the purpose of saving resources.
Conclusion and future work
In this article, in order to achieve the purpose of IoT privacy protection, we combine the DNK-Means algorithm with the blockchain and applied RSA encryption and multi-signature method to protect the security and privacy of nodes and transmitted data in the IoT.
We first proposed a DNK-Means algorithm that differentiates IoT nodes and improves clustering accuracy based on PageRank and k-means algorithm. The algorithm takes the number of links of each node in the IoT as the evaluation index of the weight of each node, increases the difference of NR values between nodes, and can accurately distinguish the active nodes and inactive nodes in the IoT. For the selected active nodes, considering that the incoming nodes of each node have certain decision on whether the data of the nodes can be transmitted, we filter the highest two nodes according to the NR value of each node’s incoming node, together with the node that sends the data as the 2/3 multi-signature participating node. The data are encrypted and signed by RSA before transmission. After receiving the data, the receiver can use the key to verify the data to ensure that the transaction is normal and not attacked.
DNK-Means effectively filters out active nodes and inactive nodes, which reduces the consumption of time and space for subsequent steps. The use of multi-signatures, encryption algorithms and blockchains increases the difficulty of attacks and effectively protects the security and privacy of IoT nodes and data. Multi-signature also enables a node to participate in the transmission of IoT data normally while losing the private key, effectively ensuring the reuse of IoT nodes and data.
Abstracted in this article is a static IoT structure. However, in real life, the IoT structure may change over time due to the different data transmitted between nodes, and the NR value of the node will also change. In the future, we can try to consider making timely adjustments based on the dynamic IoT structure. In addition, the data transmitted on the blockchain are limited, and how to transfer as much data as possible is also one of the future works.
Footnotes
Handling Editor: Wei Li
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is supported by National Natural Science Foundation of China (Grant Nos 61877043, 61877044, and 91746205) and Key Project for Science and Technology Support from Key R&D Program of Tianjin (Grant No. 18YFZCGX00960).
