Towards Secure Industrial Iot: Blockchain System With Credit-Based Consensus Mechanism
Towards Secure Industrial Iot: Blockchain System With Credit-Based Consensus Mechanism
Towards Secure Industrial Iot: Blockchain System With Credit-Based Consensus Mechanism
fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
1
Abstract—Industrial Internet of Things (IIoT) plays an in- In recent years, with the emergence of blockchain, the idea
dispensable role for Industry 4.0, people are committed to of combining blockchain and IoT has gained considerable
implementing a general, scalable and secure IIoT system to be interest [3]–[5]. By leveraging the features of tamper-proof and
adopted across various industries. However, existing IIoT systems
are vulnerable to single point of failure and malicious attacks, decentralized consensus mechanism in blockchain, we have
which cannot provide stable services. Due to the resilience and the chance to solve the aforementioned security issues in IIoT
security promise of blockchain, the idea of combining blockchain systems.
and IoT gains considerable interest. However, blockchains are There are some existing research on this topic, for example,
power-intensive and low-throughput, which are not suitable O. Novo [4] proposes an access control system based on
for power-constrained IoT devices. To tackle these challenges,
we present a blockchain system with credit-based consensus the blockchain technology to manage IoT devices. However,
mechanism for IIoT. We propose a credit-based proof-of-work the system is not fully built on a distributed architecture
(PoW) mechanism for IoT devices, which can guarantee system because of the usage of the central management hub. Once the
security and transaction efficiency simultaneously. In order to management hub is failed or attacked, IoT devices connected
protect sensitive data confidentiality, we design a data authority to it become unavailable. Z. Li et al. [6] exploit the consortium
management method to regulate the access to sensor data. In
addition, our system is built based on directed acyclic graph blockchain technology to propose a secure energy trading
(DAG)-structured blockchains, which is more efficient than the system. But they do not consider privacy issues such as the
satoshi-style blockchain in performance. We implement the sensitive data disclosure risk, and thus it cannot guarantee
system on Raspberry Pi, and conduct a case study for the smart sensitive data confidentiality. The aforementioned systems all
factory. Extensive evaluation and analysis results demonstrate adopt chain-structured blockchains in IoT systems, which are
that credit-based PoW mechanism and data access control are
secure and efficient in IIoT. overloaded for power-constrained IoT devices. Z. Xiong et al.
[7] introduce edge computing for mobile blockchain applica-
Index Terms—Industrial IoT, blockchain, credit-based, proof- tions and present a Stackelberg game model for efficient edge
of-work, directed acyclic graph, security, efficiency, privacy.
resource management for mobile blockchain. They reduce
computational requirements of mobile devices by leveraging
I. I NTRODUCTION edge computing. In addition, there are some other challenges
that also brought in the meantime when introducing the novel
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
2
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
3
16
7
9
8 14
2 12 19 Tangle Network
0
1 5 10 17
3 13
4
6 18 Smart Factory
11
15 Manage
IoT devices
represent verified transactions, while gray squares represent tips. Wireless sensors
Gateway
Topology
AES
can improve network throughput and system response time Wireless sensors
theoretically. IOTA [11], Byteball [13], NANO are three
representative DAG-structured blockchains.
Credit-based PoW Mechanism
Though DAG-structured blockchain has been designed to
satisfy the demands of frequent transactions in IoT system, Fig. 3. The architecture of blockchain-based IIoT system for smart factory.
ability-limited IoT devices, e.g., battery powered nodes, are
restricted to run light wallets due to the complex consensus
algorithm [14]. According to the official document, we know 1) Wireless Sensors: Wireless sensors deployed in a smart
that the minimum difficulty value of proof-of-work required to factory belong to the group of light nodes. Each sensor will
attach transaction to tangle is 141 , and we test its performance generate a blockchain account when initialized, i.e., a pair of
running on a Raspberry Pi in Section V. The Fig. 7 shows that public/secret key (P K, SK), which is the unique identifier in
it takes over 200 seconds to run the PoW algorithm, which is the system. The key pair for each device is not only used to
unacceptable for IIoT systems. Hence, we need to design a sign transactions, but also to make the key distribution, which
new light-weight consensus mechanism for IIoT systems. will be described in Section III-C.
2) Gateways: Gateways play the role of full nodes, which
are committed to maintaining the tangle network. More spe-
III. A B LOCKCHAIN S YSTEM WITH C REDIT-BASED cific, Gateways receive the requests from various sensors and
C ONSENSUS M ECHANISM FOR II OT broadcast the transactions in the tangle, they only process
transactions from legal sensors that are authorized by the
In this section, we present the overview of the proposed manager.
blockchain-based IIoT system. We introduce the detailed 3) Manager: Manager is a specific full node, which is
design of system from three parts, including the system responsible for managing IoT devices in a smart factory. The
architecture, credit-based PoW mechanism and data authority public key of the manager will be hard-coded into software
management method. in gateways, which means only the manager has the rights to
publish the authorization list of devices. Then the manager can
manage IoT devices (add/delete) through launching a transac-
A. Architecture Design for Smart Factory tion where records public keys of authorized IoT devices. It
can be described as:
The system infrastructure is built on DAG-structured
blockchain, each entity is a node in the blockchain-based IIoT T X = SignSKM (P Kd1 , P Kd2 , ..., P Kdn ), (1)
system. In terms of functional division, they can be divided where T X represents a transaction, SKM represents the secret
into two categories, i.e., light nodes and full nodes. Light nodes key of the manager, P Kd1 , P Kd2 , ..., P Kdn represent public
are those power-constrained devices like IoT devices, they keys of IoT devices. Because the manager signs the transaction
do not store blockchain information due to their constrained by using his secret key, which cannot be forged, thus gateways
nature. What they can do are to verify tips, run PoW consensus can discriminate legal devices by fetching authorized devices
algorithm and send new transactions to full nodes. Full nodes list published by the manager from blockchain.
are those more powerful devices like gateways or servers, In each smart factory, the existence of one or more managers
their main duty is to maintain the whole blockchain network, are permitted, which depends on the decision of the owner of
i.e., the tangle. They receive transaction requests from light IoT devices. The role of a manager can help to manage the
nodes and broadcast in the blockchain network to complete IoT devices in a smart factory, also block the invalid requests
the transactions. from unauthorized devices. In this way, our system can be
The architecture of our system is shown in Fig. 3, and there scaled and managed flexibly.
are four components in the architecture. 4) Tangle Network: The tangle network in our system
is a public blockchain network, any party can access the
1 [Online]. Available: https://github.com/iotaledger/iota.js network. Gateways, i.e., full nodes, keep the network secure
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
4
and stable by broadcasting transactions and keeping copies of CriP is positively related to the number of normal transac-
the blockchain. Among factories, secure data sharing is also tions over a unit of time of node i, i.e., is measured by the
supported. For some sensitive data, we can use data authority level of node activity, which is defined as:
management method to protect the privacy of sensor data, Pni
wk
which will be detailed introduced in Section III-C. CriP = k=1 , (3)
∆T
The architecture of our system is distributed and re-
where ni denotes the number of valid transactions of node
silient to various attacks, such as DDoS, Sybil, double-
i during the latest unit of time, ∆T denotes a unit of time,
spending, etc. Also, our system is based on DAG-structured
wk denotes the weight of the k-th transaction. The weight of a
blockchain, which improves system throughput comparing
transaction means the number of validation to this transaction.
to chain-structured blockchain. In order to further improve
That is to say, if node i is active during a period of time,
throughput of our system and make access control in the
CriP will adjust according to the level of activity, which
system, we propose credit-based PoW mechanism and data
guarantee active nodes in the system can submit transactions
authority management method in the rest part of this section.
faster while using less power. If node i does not submit
transactions for a period of time, we consider it as an inactive,
B. Credit-Based PoW Mechanism even an untrusted node, so the system will not decrease the
difficulty of PoW for it at the beginning, i.e., CriP = 0.
In this part, we design credit-based PoW mechanism to
CriN is negatively related to the number of malicious
make the trade-off between efficiency and security in con-
behaviours of node i, which is defined as:
sensus mechanism. mi
We define that node i has a property of credit value Cri , X ∆T
CriN = − α(B) · , (4)
and the credit value will change in real time based on node’s t − tk
k=1
behaviours. Normal behaviours, i.e., obey the system rules
to send transactions, will increase the credit value over time where mi represents the total number of malicious behaviours
gradually. In the opposite, nodes which conduct abnormal conducted by node i, t represents current time, tk represents
behaviours will decrease credit value. The difficulty of PoW the time point of the k-th malicious behaviour conducted by
mechanism is self-adaptive according to credit value of each node i, and α(B) represents the punishment coefficient for
node, the lower credit value is, the longer time taken to run malicious behaviour B, which is defined as:
(
PoW algorithm. So this mechanism will let honest nodes con- αl if B is lazy tips behaviour;
sume less resources while force malicious nodes to increase α(B) = (5)
αd if B is double-spending behaviour,
the cost of attacks.
Before giving the detailed design of credit-based PoW where αl and αd can be adjusted according to the requirement
mechanism, we firstly state two possible existing abnormal of sensitivity to malicious behaviours. We will discuss concrete
behaviours in the system. parameters setting in Section V-A.
1) Lazy tips: A ‘lazy’ node could always verify a fixed As described in Eqn. 4, we can observe that malicious
pair of very old transactions, while not contributing to the behaviours impact on a node will gradually decrease over
verification of more recent transactions. For example, a mali- time, but different from CriP , it cannot be eliminated over
cious entity can artificially inflate the number of tips by issuing time. When a malicious behaviour happened just a moment,
many transactions that verify a fixed pair of transactions. This the absolute value of CriN will be so large that the malicious
would make it possible for future transactions to select these node cannot continue conducting attacks because of the large
tips with very high probability, effectively abandoning the tips difficulty of PoW. Thus we can stop the malicious behaviours
belonging to honest nodes. in time.
2) Double-spending: A malicious node wants to spend We notice that the credit formulation mechanism requires
the same token twice or more through submitting multiple full transaction information of each sensor involved, is it
transactions before the previous one is verified. Even though possible to calculate correct credit scores? We know that the
such behaviour will be detected and canceled by asynchronous whole tangle network is transparent, so we can obtain the
consensus mechanism, it slows down the efficiency of system transaction information of all the sensors and the relationships
because other associated transactions also will be redone. between transactions from the DAG network. Thus we can
obtain the weights of transactions w and malicious behaviours
Thus, according to the behaviour of node i, we divide Cri
records α(B) by sweeping the DAG structure easily.
into two components, which can be denoted as:
After we calculate CriP and CriN respectively, we can get
Cri = λ1 CriP + λ2 CriN , (2) Cri according to Eqn. 2. Similar to the definition of the
difficulty of mining in Bitcoin [15], the difficulty of PoW
where CriP represents the positive impact part, CriN repre- in this system is inversely proportional to the credit scores,
sents the negative impact part, λ1 and λ2 represent the weight which is adjusted dynamically throughout the lifetime of the
coefficient of each part respectively. system. We define Cri = δ D1i , where Di is the difficulty of
We can distribute the weight of these two parts by adjusting PoW for node i, δ is a scale factor (δ = 11 in this paper). So,
λ1 and λ2 . If we want to adopt strict punishment strategy in there is still a question, how to control the difficulty of PoW
the system, we can set λ2 bigger. algorithm?
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
5
( PK D , SK D ) ( PK M , SK M ) There are three steps for one time secret key distribution,
the process of secret key distribution is shown in Fig. 4, where
IoT Device Manager
T S denotes a timestamp, M denotes a message, Enc and Dec
Generate symmetric are the abbreviation of encrypt and decrypt respectively. The
M1 = EncPK D {signSKM ( SK S , TS1, noncea )}
secret key SK S step of generating symmetric secret key is only done for one
time. Each message is signed with the sender’s secret key,
DecSK D ( M 1 )
M 2 = EncSK S {signSK D (nonceb , TS 2 , noncea )} which ensures received message is not tampered or damaged.
T S in each message presents timeliness of the message, which
DecSK S ( M 2 )
M 3 = EncSKS {signSKM (nonceb ,TS3 )} is used to resist the replay attack.
M1 is encrypted by the public key of IoT device, which
nonceb ¬ DecSK S ( M 3 ) means the message only can be decrypted by the IoT device.
Distribute the symmetric secret key without
central trust server
noncea attached in M1 is used to launch a response-challenge,
if IoT device returns the correct nonce, we consider the IoT
Fig. 4. The process of symmetric secret key distribution. device has decrypted M1 correctly. IoT device decrypts M1
and gets the symmetric secret key, then sends M2 encrypted
by SKS to demonstrate the success of decryption. nonceb is
In tangle, a new transaction should ’bundle’ with two former
also a response-challenge which is used to test the correctness
transactions through PoW algorithm before submitting, which
of SKS . And manager returns nonceb in M3 to complete this
can be expressed in formula as:
round of key distribution.
output = hash{hash(T X1)||hash(T X2 )||nonce}, (6) This key distribution scheme utilizes the public/secret key
of each node to distribute symmetric secret key without any
where T X1 and T X2 are hash values of two former trans- central trust server. Also, it is flexible to update symmetric
actions respectively, the nonce is a random number which keys if needed.
nodes need to calculate. If output satisfies the requirement of Because the function of each device is relatively fixed,
minimum length of prefix zero, then nodes succeed to find the hence, for those devices whose collected data is not sensitive,
valid nonce.
they do not need to encrypt sensor data. So manager only
Due to the computing complexity and anti-collision of hash
distributes secret key to those devices which collect sensitive
algorithm, we know that if the demand of minimum length of
data. After IoT devices get the symmetric secret key, then they
prefix zero is bigger, it is more difficult to calculate a valid
can encrypt sensor data before posting it to blockchain. Only
nonce. Thus we can control the difficulty of PoW through
people who have the secret key can decrypt those sensitive
adjusting the demand of minimum length of prefix zero.
data, which guarantees data confidentiality in a transparent
Hence, credit-based PoW mechanism can decrease the pow-
system efficiently.
er consumption of honest nodes while defending malicious
attacks efficiently.
IV. I MPLEMENTATION
C. Data Authority Management Method We implement the proposed system in order to conduct
evaluation and analysis on it. In this section, we present
Due to the transparency of blockchain, sensor data stored
the detailed implementation of our system. We implement
in blockchain is exposed in public. So we propose a data
our system by modifying IOTA implementation, which is
authority management method to support access control of
one of the most popular DAG-structured blockchain platform
sensor data in the system.
currently. In the rest part of this section, we will introduce the
The way to protect data confidentiality in a transparent
implementation of full nodes and light nodes.
system is encryption. There are two main types of encryption
algorithms, which are symmetric key encryption and public
key encryption. Considering the efficiency of encryption al- A. Full Nodes
gorithms, symmetric key encryption is much faster (about There are two roles of full nodes, which are manager
100˜1000 times faster) than public key encryption, which is the and gateway. They are implemented based on IRI2 , which is
benefit for power-constrained devices. Also, there are massive the official reference implementation of full nodes. A full-
quantities of sensor data in smart factories, it is unbearable to featured node is a part of the tangle network as both a
use the much slower public key encryption. transaction relay and network information provider. It provides
However, different from public key encryption, if we adopt a convenient RESTful HTTP interface, so light nodes can
symmetric key encryption, we must consider a secure way post transactions to full nodes through the RPC interface.
to distribute the secret key. So in order to design a flexible Besides, We modify IRI to provide the credit-based PoW
data authority management method, we propose our secret key mechanism and integrate the functionality of symmetric key
distribution scheme without any central trust party firstly. generation and distribution into full nodes, we use the SHA-
From the aforementioned architecture design, we know that 256 algorithm to distribute secret keys, and use the AES block
every node has a pair of public/secret key (P K, SK) as the cipher algorithm implemented by C to encrypt sensor data.
unique identifier, so we can utilize public key encryption to
distribute the symmetric key. 2 [Online]. Available: https://github.com/iotaledger/iri
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
6
7DQJOH1HWZRUN
,R7 ,R7
*DWHZD\V 0DQDJHU
'HYLFH 'HYLFH
,QLWLDOL]HJDWHZD\V
*HQHUDWHOLJKW DQGVHWXSPDQDJHU ,QLWLDOL]HWKH
*HQHUDWHIXOOQRGH
QRGHVDFFRXQWV WDQJOH
DFFRXQWVDQG
DQGILQGFORVHVW
UHJLVWHUSXEOLFNH\ 5HJLVWHU,R7GHYLFHVE\
JDWHZD\HQDEOHG
RIPDQDJHU UHFRUGLQJWKHLUSXEOLF
53&SRUW 0DQDJH
NH\VLQWDQJOHQHWZRUN GHYLFHV
'LVWULEXWHV\PPHWULF
VHFUHWNH\WR,R7'HYLFH
'LVWULEXWH
6XFFHVV
*HWWZRUDQGRPWLSV VHFUHWNH\V
LQIRUPDWLRQIURPJDWHZD\V
5HWXUQWUDQVDFWLRQLQIRUPDWLRQ
9DOLGDWHWKHVHWZRWLSVDQG
EXQGOHQHZWUDQVDFWLRQZLWK &ROOHFW
WKHPWKURXJK3R: 6XEPLWDQHZWUDQVDFWLRQZLWK VHQVRUGDWD
DOJRULWKP WKHPHVVDJHRIVHQVRUGDWD
6XFFHVV
Fig. 5. The implementation of system on PC and Raspberry Pi. not sensitive, but for IoT device 2, it will encrypt data by
using symmetric secret key before posting transactions
in order to guarantee sensitive data privacy.
B. Light Nodes 4) After that, an IoT device will get two random tips to
Light nodes are IoT devices in this system, which connect validate them before submitting a new transaction.
to full nodes to interact with the tangle network. They are 5) When validation is passed, the IoT device bundles the
implemented based on PyOTA3 , which is the IOTA Python new transaction with these two verified tips through the
API Library. However, PyOTA does not provide local PoW PoW algorithm, and submits it to the gateways.
interface, in order to adjust the difficulty of PoW algorithm Step 4 and step 5 are a single process for sensor data
flexibly, so we implement an extension package written in submission, which can be done repeatedly.
Java to extend PyOTA. The implementation specification of
package is based on aforementioned design of credit-based V. E VALUATION AND A NALYSIS
PoW mechanism. We also implement the AES-based data
In this section, we evaluate performance in credit-based
authority management method on light nodes by using C to
PoW mechanism and how the introduction of data authori-
encrypt collected sensor data.
ty management impact on the efficiency of transactions. In
addition, we provide security analysis of the whole system
C. Tangle Network from two aspects, i.e., system security and privacy. IOTA
Full nodes maintain the tangle network through broadcast- already provides official live transaction visualizer4 , which
ing, storing and synchronizing blockchain information, and also displays the average number of transaction per second
light nodes contribute to increasing the stability of tangle (TPS) of the whole tangle network. For this reason, this
through validating and submitting new transactions. Here we section will not evaluate tangle network and target the new
use a PC as a gateway/manager to run a full node, and use components proposed in our system.
a Raspberry Pi Model 3B as an IoT device to run a light Because the system is designed for Industrial IoT devices,
node, which is shown in Fig. 5. The Raspberry Pi reports in order to be closer to the actual application scenario, all
collected data continuously and the PC screen shows the status experiments were done on a Raspberry Pi Model 3B with Quad
of transactions in real time. Core@1.2GHz, which is a power-constrained and computing-
In this system, the interaction between manager, gateway limited device.
and IoT device is shown in Fig. 6. The workflow of system
can be described as following steps: A. Performance in Credit-Based PoW Mechanism
1) The manager initializes gateways to set up the tan- In this part, we evaluate credit-based PoW mechanism
gle network firstly, i.e., records gateways identifiers in comparing to traditional PoW algorithm on performance. We
blockchain that cannot be tampered. firstly discuss parameters settings that presented in Section
2) Then, the manager can authorize or deauthorize IoT III-B.
devices through updating authorized devices list in We run PoW algorithm with increasing difficulty to find the
blockchain. relationship between running time and difficulty of PoW, the
3) In the stage of secret key distribution, the manager result is shown in Fig. 7.
does not need to distribute the secret key to all IoT The minimum difficulty of PoW is 1, and the maximum
devices, only to devices which collect sensitive data. should not exceed the length of hash. Indeed, it cannot reach
More specific, in this case, for IoT device 1, it does not the maximum value for normal light nodes because running
need to encrypt collected sensor data because its data is time increases exponentially when the value of difficulty D
3 [Online]. Available: https://pyota.readthedocs.io/ 4 [Online]. Available: https://thetangle.org/live
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
7
250 10
X: 14
Y: 245.3 5
200
0
Running time (second)
Credit value
-5 w-weight of transaction
150
Cr-credit value
-10
CrP-positive credit value
-15 CrN-negative credit value
100
-20
50 -25
X: 12
X: 1 Y: 10.98
Y: 0.162 -30
0 0 10 20 30 40 50 60 70 80 90 100
0 2 4 6 8 10 12 14 Time (second)
Difficulty of PoW algorithm
(a) When a malicious attack happens
Fig. 7. Running time of PoW algorithm with increasing difficulty.
10
0
is larger than 11, and when D = 14, the running time on
-10
Raspberry Pi has reached 245.3 seconds, which is unbearable.
Credit value
But on the other side, it is also a good way to punish malicious -20
nodes. -30
Due to the running time of PoW on different IoT devices
-40
may be different, in this experiment, we choose the range of w-weight of transaction
Cr-credit value
difficulty is from 1 to 14, and set 11 as the initial difficulty of -50 CrP-positive credit value
CrN-negative credit value
PoW, which is the relatively appropriate initial value. -60
In addition, according to Eqn. 2, there are four tunable 0 10 20 30 40 50 60 70 80 90 100
Time (second)
parameters, which are λ1 , λ2 , ∆T , α(B). The weight of each
(b) When two malicious attacks happen
transaction w can be counted from tangle network. Here we
Fig. 8. Credit value changes based on nodes’ behaviours.
set λ1 = 1, λ2 = 0.5. According to the Eqn. 4, the negative
part of credit scores has a greater gain, so we set it to 0.5. If
you want a more severe punishment mechanism, you can set
it bigger. Considering the frequent requests in IIoT systems, after conducting a malicious behaviour. Thus there is a spacing
we set ∆T = 30 seconds, a not so long interval. And we between 24th second and 61st second in Fig. 8 (a) because of
set α(B) = 0.5 for event B is lazy tip and α(B) = 1 for the punishment for the malicious behaviour, so it takes 37
event B is double-spending. From the definition of these two seconds to recover the normal transaction in this experiment,
abnormal behaviours in Section III-B, we know that double- and during this time, CrP also decreases because it is inactive.
spending will cause the rollback of transactions, which impacts The degree of punishment can be adjusted flexibly according
the system much more severe than lazy tips. Thus, we set to the requirement of system. With time goes, the credit value
double-spending behaviours to 1. Of course, they can be set to of node will rise gradually and return to normal transaction
other value if needed because they are adjustable parameters. rate. Besides that, we can notice that, in Fig. 8 (b), if the
We simulate behaviours of a light node to present working node conducts malicious attacks twice or more, it will take
mechanism of credit-based PoW, which is shown in Fig. 8. a longer time to recover normal transaction rate, which can
The x-axis represents the time sequence, we give a range well prevent malicious nodes from attacking. The simulation
of three ∆T to show how does credit-based PoW mechanism results indicate that credit-based PoW mechanism can defend
work. The y-axis represents credit value for three curves and malicious attacks efficiently.
also denotes weight of transactions for bars, especially, we use Then, we compare credit-based PoW mechanism with o-
a negative weight value to denote a malicious attack. riginal PoW mechanism in performance, and set four control
We can observe that the curve of Cr overlaps with that of experiments as shown in Fig. 9.
CrP when CrN = 0, which means the node does not conduct We conduct these four control experiments during a range
any malicious behaviour before, so the negative credit part is 0. time of three ∆T , i.e., 90 seconds, and evaluate average time
Once the node does any abnormal behaviour, it will be detected of PoW per transaction. From Fig. 9, we can observe that
immediately and there will be the corresponding adjustment credit-based PoW with normal behaviours perform best in
for credit value. From Fig. 8 (a), we can see that when time is running time, which only needs 0.118 second of PoW for each
at 24th second, the node conducts a malicious attack, CrN has transaction on average, while it needs 0.7 second on average
a sharp decline in a short time, thus Cr also sharply decreases for original PoW mechanism. This indicates that credit-based
according to Eqn. 2. PoW can speed up transactions for honest nodes.
1
We know that Cr ∝ D , which means the less Cr is, the We also notice that for malicious nodes, the more malicious
more difficult PoW becomes, so that the node has to take a behaviours they conduct, the longer time they need to post a
long time to calculate a correct nonce for the next transaction transaction. The penalty time is exponential with the number
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
8
0
C. Security Analysis
Four control experiments
In this part, we firstly present several possible attack models,
Fig. 9. Performance evaluation in credit-based PoW mechanism. The four and then analyze security from two aspects, i.e., system
control experiments respectively represent original PoW, credit-based PoW
with normal behaviours, credit-based PoW with a malicious attack, credit- security and privacy.
based PoW with two malicious attacks. In this work, we assume that attackers are able to launch
following attacks We are not concerned about how attackers
launch different attacks, but focus on defend the system against
1.5
X: 20 these possible attacks.
Y: 1.491
• Single Point of Failure. A single point of failure is a
Running time (second)
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
9
and other full nodes are authorized and managed by the man- mechanism, which decreases power consumption for honest
ager, which can improve credibility to a certain extent. Even nodes while increasing computing complexity for malicious
though these devices changes to malicious nodes suddenly, our nodes, helps to make the DAG structured blockchain more
proposed credit-based PoW mechanism can prevent malicious suitable for IIoT systems. Also, the data authority management
behaviours efficiently, which has been demonstrated in Fig. 8. method can protect data privacy without affecting the system
In protecting data privacy, due to the transparency of performance, which is also practical in IIoT system. The
blockchain, we utilize the symmetric encryption algorithm to results of extensive experiments and evaluation show that our
implement a data authority management method, which pro- system has a good performance in IIoT.
tects sensor data confidentiality through encrypting data before This work will be of importance to research in distributed
storing in blockchain. Only people who have the secret key industrial IoT systems by providing a practical DAG structured
can decrypt and get sensor data, which realizes data authority blockchain based solution. Our solution is not only suitable for
control in a transparent system. Also, the introduction of this smart factory, but also able to adapt to various IIoT scenarios.
method brings little impact on transaction efficiency, which is However, there are still some limitations in our systems, such
resource-friendly to IoT devices. as sensor data quality control, storage limitations. In future
directions, we can explore sensor data quality control schemes
VI. R ELATED W ORK in blockchain-based systems and some methods to store huge
In industrial IoT system, there are common technical chal- amounts of data.
lenges [1], [16] needed to tackle such as scalability, depend-
ability, privacy, access control, etc. In this section, we review ACKNOWLEDGMENT
related work carried out for solving these challenges and
This work was supported in part by the National Key
discuss the insufficiencies of them briefly.
There are some existing solutions that are not based on R&D Program of China 2018YFB1004703, China NSF grant
blockchain technologies. As an example, C. E. Kaed et al. [17] 61672349, 61672353, 61373155, and CCF-IFAA Collabora-
present a semantic rules engine for industrial IoT gateways tive Research Project Z50201800178.
that allows implementing dynamic and flexible rule-based
control strategies, which is vulnerable to single point failure R EFERENCES
and malicious attacks due to the centralized architecture. M. [1] Y. Lu and L. D. Xu, “Internet of things (iot) cybersecurity research: A
Shamim Hossain et al. [18] present a HealthIIoT-enabled review of current research topics,” IEEE Internet of Things Journal, pp.
monitoring framework to collect healthcare data from mobile 1–1, 2018.
[2] H. Yu, P. B. Gibbons, M. Kaminsky, and F. Xiao, “Sybillimit: A
devices and sensors, which also faces the same risks. In near-optimal social network defense against sybil attacks,” in IEEE
addition, healthcare data stored in central servers may be Symposium on Security and Privacy (S&P), May 2008, pp. 3–17.
vulnerable to privacy disclosure. [3] A. Dorri, S. S. Kanhere, R. Jurdak, and P. Gauravaram, “Blockchain
for iot security and privacy: The case study of a smart home,” in IEEE
There are also many research combining blockchain with International Conference on Pervasive Computing and Communications
IoT to solve the aforementioned issues. For example, A. Dorri Workshops (PerCom Workshops), March 2017, pp. 618–623.
et al. [3] propose a Blockchain-based smart home framework [4] O. Novo, “Blockchain meets iot: An architecture for scalable access
management in iot,” IEEE Internet of Things Journal, vol. 5, no. 2, pp.
to achieve security goals of confidentiality, integrity and avail- 1184–1195, April 2018.
ability. But they eliminate the concept of PoW to speed up ef- [5] Z. Yang, K. Yang, L. Lei, K. Zheng, and V. C. M. Leung, “Blockchain-
ficiency of transactions, which will raise system security risks. based decentralized trust management in vehicular networks,” IEEE
Internet of Things Journal, pp. 1–1, 2018.
Also, K. Christidis et al. [19] adopt a similar implementation, [6] Z. Li, J. Kang, R. Yu, D. Ye, Q. Deng, and Y. Zhang, “Consortium
i.e., use a white-list scheme, to cancel consensus mechanisms blockchain for secure energy trading in industrial internet of things,”
in private networks, thus it faces the same secure issues. Z. IEEE Transactions on Industrial Informatics, vol. 14, no. 8, pp. 3690–
3700, Aug 2018.
Shae et al. [20] propose a blockchain platform for clinical [7] Z. Xiong, Y. Zhang, D. Niyato, P. Wang, and Z. Han, “When mobile
trial and precision medicine, which still stuck in the concept blockchain meets edge computing,” IEEE Communications Magazine,
stage and is a lack of evaluation. K. R. ?zy?lmaz et al. [21] vol. 56, no. 8, pp. 33–39, August 2018.
[8] M. Swan, Blockchain: Blueprint for a new economy. ” O’Reilly Media,
try to integrate low-power IoT devices to a blockchain-based Inc.”, 2015.
infrastructure, but the system is implemented on Ethereum [9] K. Karlsson, W. Jiang, S. Wicker, D. Adams, E. Ma, R. van Renesse,
blockchain, which is overload for IoT devices. And the low and H. Weatherspoon, “Vegvisir: A partition-tolerant blockchain for the
internet-of-things,” in IEEE 38th International Conference on Distribut-
throughput of Ethereum blockchain cannot satisfy the demands ed Computing Systems (ICDCS), July 2018, pp. 1150–1158.
of IIoT system. Di Pietro et al. [22] describe a distributed [10] Z. Zheng, S. Xie, H. Dai, X. Chen, and H. Wang, “An overview of
trust model for the IoT that bridges them to create end-to-end blockchain technology: Architecture, consensus, and future trends,” in
Big Data (BigData Congress), 2017 IEEE International Congress on.
trust between IoT devices without any third party, which just IEEE, 2017, pp. 557–564.
simply apply blockchain technology into IoT system and do [11] S. Popov, “The tangle,” cit. on, p. 131, 2016.
not present a detailed implementation. [12] R. B?hme, N. Christin, B. Edelman, and T. Moore, “Bitcoin: Economics,
technology, and governance,” Journal of Economic Perspectives, vol. 29,
no. 2, pp. 213–38, May 2015.
VII. C ONCLUSION [13] A. Churyumov, “Byteball: A decentralized system for storage and
In this work, we propose a blockchain-based IIoT system transfer of value,” URL https://byteball. org/Byteball. pdf, 2016.
[14] X. Wang, X. Zha, W. Ni, R. P. Liu, Y. J. Guo, X. Niu, and K. Zheng,
in the applied scenarios of smart factory to address aforemen- “Survey on blockchain for internet of things,” Computer Communica-
tioned challenges for IIoT. The proposed credit-based PoW tions, 2019.
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TII.2019.2903342, IEEE
Transactions on Industrial Informatics
10
[15] M. Vukolić, “The quest for scalable blockchain fabric: Proof-of-work Min-You Wu received the Ph.D. degree from Santa
vs. bft replication,” in Open Problems in Network Security. Springer Clara University, Santa Clara, CA in 1984. He is a
International Publishing, 2016, pp. 112–125. professor in the Department of Computer Science
[16] K. Iwanicki, “A distributed systems perspective on industrial iot,” in and Engineering at Shanghai Jiao Tong University
IEEE 38th International Conference on Distributed Computing Systems and a research professor with the University of New
(ICDCS), July 2018, pp. 1164–1170. Mexico. His research interests include grid comput-
[17] C. E. Kaed, I. Khan, A. V. D. Berg, H. Hossayni, and C. Saint- ing, wireless networks, sensor networks, multimedia
Marcel, “Sre: Semantic rules engine for the industrial internet-of-things networking, parallel and distributed systems, and
gateways,” IEEE Transactions on Industrial Informatics, vol. 14, no. 2, compilers for parallel computers.
pp. 715–724, Feb 2018.
[18] M. S. Hossain and G. Muhammad, “Cloud-assisted industrial internet
of things (iiot) C enabled framework for health monitoring,” Computer
Networks, vol. 101, pp. 192–202, 2016.
[19] K. Christidis and M. Devetsikiotis, “Blockchains and smart contracts for
the internet of things,” IEEE Access, vol. 4, pp. 2292–2303, 2016.
[20] Z. Shae and J. J. P. Tsai, “On the design of a blockchain platform
for clinical trial and precision medicine,” in IEEE 37th International
Conference on Distributed Computing Systems (ICDCS), June 2017, pp.
1972–1980.
[21] K. R. ?zy?lmaz and A. Yurdakul, “Work-in-progress: integrating low-
power iot devices to a blockchain-based infrastructure,” in International
Conference on Embedded Software (EMSOFT), Oct 2017, pp. 1–2.
[22] R. Di Pietro, X. Salleras, M. Signorini, and E. Waisbard, “A blockchain-
based trust system for the internet of things,” in Proceedings of the
23rd ACM on Symposium on Access Control Models and Technologies Xue Liu received the B.S. degree in mathematics
(SACMAT), 2018, pp. 77–83. and the MS degree in automatic control both from
Tsinghua University, China, and the PhD degree in
computer science from the University of Illinois at
Urbana-Champaign in 2006. He is a full professor in
the School of Computer Science at McGill Universi-
Junqin Huang received the B.E. degree in computer ty. He has also worked as the Samuel R. Thompson
science and technology from University of Elec- associate professor in the University of Nebraska-
tronic Science and Technology of China, Chengdu, Lincoln and HP Labs in Palo Alto, California. His
China, in 2018. research interests include computer networks and
He is currently working toward the Master’s de- communications, smart grid, real-time and embed-
gree in computer technology at Shanghai Jiao Tong ded systems, cyber-physical systems, data centers, and software reliability.
University, Shanghai, China. His research interests His research interests include computer networks and communications, smart
include big data, Internet of things, blockchain, grid, real-time and embedded systems, cyberphysical systems, data centers,
crowdsensing. and software reliability.
1551-3203 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.