accuracy. However, a few privacy-preserving schemes face an issue of trade-
off; the more the use of expensive protocols, the less the speed of the
transaction. An efficient Blockchain-based approach called FPPP (Fast and
Privacy Preserving Blockchain) is modelled by Li et al. [233] to achieve the
performance of a system with guaranteed privacy of transactions. In this
approach, an Ethereum Blockchain is enforced with an off-chain storage system
to record many transactions which can significantly enhance the computation
time and speed of the transaction process. Moving further to another approach,
Ziegeldorf et al. [129] proposed the CoinParty scheme which efficiently
utilised the distributed mixing method to combine the different identities for
the protection of “financial privacy”. The CoinParty method used both mix nets
and threshold signatures to preserve users’ anonymity and scalability in a
decentralised public environment. Another coin mixing scheme for Bitcoin and
their related cryptocurrencies was proposed by Liu et al. [234], enabling the
users to unlink their “identities” from the coins without the need of any
central party. Furthermore, the scheme utilises the different cryptography
primitives such as ring signatures and elliptic curve digital signature
schemes to preserve the privacy of the transactions.

Figure 9: Blockchain-based Healthcare Industry Model

###  5.2 Healthcare Industry

The existing industry healthcare models, particularly those using centralised
architectures [235], have identified many vulnerabilities, including single-
point failure and unauthorised modifications, as well as further security and
privacy issues [236]. Since the conventional models are no longer reliable and
stable, patient data is no longer maintained in this situation. Privacy of
patient data is also key to effective health care management [237]. These
problems and challenges can be addressed by applying Blockchain technology
sponsored by Industry 4.0 to achieve data security, including integrity and
privacy, and eliminating a single point of failure issue [238].

Industry 4.0 is also transforming the healthcare sector, in a similar way to
other industries, in order to embrace the adoption of innovative technologies.
In the healthcare industry, patient data is considered the most valuable
source of information to regularly monitor patient health and make critical
decisions that assist doctors and researchers to improve the diagnostic
learning process effectively, providing an efficient way to address health-
related issues. The healthcare industry makes use of the IoT, along with cloud
computing and big data services, to collect and store a massive amount of
patient data that enables doctors, researchers and health workers around the
world to build a digital global healthcare ecosystem called Healthcare 4.0
[239, 240].

Blockchain technology has proved to be a promising technology due to its
characteristics of transparency, immutability and security, as well as its
ability to connect multiple organisations through the decentralised and
distributed aspects of the network. The rise of Blockchain technology in the
healthcare industry empowers electronic health records (EHRs) and telecare
medicine by keeping patient data secure and anonymous while opening the door
to medical researchers to perform reliable analysis. Moreover, Blockchain has
made healthcare transactions more transparent and accessible, enabling
patients to know more about their treatment options and providers [238, 241].

The role of Blockchain in the healthcare industry is multifaceted. For
example, Blockchain is reliable in terms of network structure since there is
no centralised structure for a malicious user to target the patient data
stored in a single location. Further, Blockchain technology enables patients
to have full access to their medical records and history in a secure way.
Accessing medical records in conventional systems can be difficult since they
are usually spread across multiple healthcare facilities; however, Blockchain
technology and primarily distributed ledger technology can be applied to
safely access and exchange patient medical records [242]. The distributed
ledger technology enables the secure transfer of patient health records
between doctors, researchers, and government agencies [243]. This ledger also
helps in the effective and safe management of medication supplies and assists
healthcare researchers in unlocking the human genome. Additionally, Blockchain
technology can enhance the security and quality of mobile apps and remote
monitoring machines used in the healthcare industry. Fig. 9 reflects the
Blockchain-based EHR model to provide a better understanding of the Blockchain
role in the healthcare industry, and the involvement of individuals in the
system, such as patients, doctors, medical researchers, and government
organisations who can interact and communicate securely with each other using
Blockchain technology.

By following the idea of implementing Blockchain technology for the healthcare
industry, Zhang et al. [130] designed the FHIRChain, a Blockchain-based scheme
to meet the specific needs and requirements of national health infrastructure
organisations who “control and manage” further health-related organisations
and sectors. The proposed scheme carefully determines the specifications of
health organisations in order to bridge the gap between patients and service
providers, such as hospitals. In EHR systems, “access control” is a crucial
task that determines the access of personal data given to the right person for
the right purposes. Therefore, to solve the access control challenge
specifically for EHR, Hussein, et al. [144] proposed a private Blockchain-
based data-sharing scheme that allows doctors to access the sensitive data of
patients who have granted access rights. This scheme uses the discrete wavelet
transformation technique to ensure the privacy and anonymisation of clinical
data. The proposed scheme also employs the query service interface at which
the genetic algorithm technique can access and optimise the Blockchain data.
The experimental result determines that the scheme is scalable and robust
against different types of security attacks. Similar to this scheme [144],
Dagher et al. [139] implemented the Ancile, a Blockchain-based “access
control” scheme to utilise the private and sensitive information of patients
without disclosing this information to others. In addition to access control,
the scheme also confirms patients’ data privacy, which would not be disclosed
to others while accessing the data via multiple platforms.

Another significant contribution is put forward by Yue et al. [243] to solve
the problems between patients and doctors about the “controlling of sensitive
information”. The proposed scheme empowers the patients by giving them the
appropriate control over their data and allows them to send and securely
receive data. Another “secure data sharing” scheme (MeDShare) was proposed by
Xia et al. [244] to solve the disputing correspondence among different public
parties using Blockchain technology. “Data reliability” is another major
challenge in electronic health data that requires substantial contributions
from the researchers to propose secure solutions for the reporting of
patients’ data at different levels. Kuo and Ohno-Machado proposed a solution
to a particular challenge [137] that implements the Blockchain-based privacy
preserving public model called “ModelChain”, in order to preserve the privacy
of patient data by using machine learning techniques.

Sun et al. [245] proposed the Blockchain-based privacy preserving scheme that
utilised the patient’s attributes in attribute-based signatures so as to
protect personal information. In the proposed model, both on-chain and off-
chain storage systems are employed with the private Blockchain system so that
on-chain is used to store the original data, whereas off-chain is used to
store indexes of data. Another privacy preserving scheme called BSPP
(Blockchain-based secure and privacy preserving) was proposed by Zhang and Lin
[138] to “protect the personal data” from different health-related
organisations involved in the whole process. In the proposed scheme, both
private and consortium Blockchains construct the data structure, which can
securely store the patient’s data.

Similar to the scheme presented in [138], Guo et al. [246] utilised the
attribute-based signature scheme to provide the “validation of health record”
stored on the public Blockchain. In the proposed scheme, many authorities can
sign and send data without disclosing patients’ personal information unless it
requires evidence. To solve the “authentication and accountability challenges”
of the patient health record, Azaria et al. [247] proposed the MedRec, a novel
Blockchain-based methodology to secure the medical data of patients in a
decentralised public environment. In the proposed architecture, patients can
easily control and access their own data from remote places. Ji et al. [248]
made a significant contribution to the Blockchain-based EHR application,
investigating a “location sharing problem” regarding patients in a telecare
medical information system. To identify location issues of health data, a
Blockchain-based location preserving scheme called BMPLS was proposed to
achieve multi-level location sharing protection by employing a Merkle hash
tree which can store the patient data in an hierarchical form. Apart from the
different security challenges in the EHR, there have been many issues in
distributed applications such as “retrieving, indexing, and aggregating” of
data collected from multiple domains. To solve the given challenges, Zhou et
al. [249] proposed the distributed “data vending” framework that utilises
indexing and embedding methods to save similar data into different locations
with the calculated indexes.

###  5.3 Transport and Logistics

Figure 10: Blockchain-based Transport and Logistics – A Complete Process

Industry 4.0 is driving substantial and pervasive change within the transport
and logistics sector because of a rise in supply chain demand and usage of
modern and emerging technologies, as well as the potential to build the
industry process’s digital supply chain [250, 251, 252]. Transport and
logistics sectors are following a trend towards increased automation levels so
that these sectors integrate their business models to access different market
segments. The increased availability of information through the physical
internet and open standards encourages manufacturers to reposition their
supply chains to support social and data-driven market dynamics and innovation
in traceability and acquisitiveness [253, 254].

In supply chains, formal concepts being applied to real-world shipping
processes, with flexible, sustainable and online shipping varying from a large
container to a small box, are becoming industry standards worldwide. These
containers are constantly tracked and monitored and guided through the IoT
[255]. The shipping industry is an important player in virtually every
industry and operation that manages the shipment of vast containers from one
place to another. These containers consist of various items sent to a specific
destination, assuming that it does not include illegal or mislabelled items.
However, the central agencies cannot check and perform audit procedures on
each container’s items due to bulk quantities and time-restrictions [256].

Moreover, the audit procedure includes tracking and selecting random items
from the container with detailed information, such as item id, company name
and addresses of both sending and receiving parties. Mostly, the auditing
agencies stored the data about all items at a single location or server, which
is easily accessible for every auditing party to audit. On the other hand,
centralised systems are more at risk when authorised access or a single point
of failure attack can breach the privacy of shipping information. However,
with the advent of Blockchain technology, decentralisation and immutability
features allow the freight system to transfer freight items from one place to
another in a secure manner.

The role of Blockchain technology in transportation and logistics is to ensure
data integrity and security in the ecosystem, as the entire network
contributes to data validation. Moreover, Blockchain-based logistics systems
facilitate document sharing through a shared distributed ledger, obviating the
need for manual paper-based processes. The use of smart contracts speeds up
and automates the customs clearance and approval process, resulting in reduced
processing times for items at customs checkpoints. Fig. 10 illustrates the
Blockchain-based transport and logistics framework, which shows the complete
process of transferring the items from one destination to others, through the
shipping agencies.

To protect the “data privacy” of shipping items, Vos et al. [257] proposed
DEFEND, a secure decentralised Blockchain-based platform that protects the
privacy of containers and the store items. In this system, the sending agency
carries out the following tasks: make a claim of sending items, encrypt the
claim and send it to other destination agencies. At the destination side, the
claim can only be accessed and decrypted by the destination custom agency. The
proposed scheme’s main contribution is the partitioning of the data among the
different parties involved in the Blockchain system. Moreover, experimental
results and performance analysis claim that the proposed scheme is efficient
for both customs agencies and economic operators so as to perform risk
analysis on items without causing the delay.

###  5.4 Energy Industry

Figure 11: Blockchain-based Smart Grid System Model

Industry 4.0 has provided the path for continuous and widespread grid-based
use of alternative energy sources, by implementing a flexible framework called
the SG in order to manage increasing demands in overall energy consumption.
More precisely, in the area of Industry 4.0, the SG is developed by the
convergence of electricity networks and state-of-the-art information and
communication technologies (ICTs), including smart meters, smart information
processing units and advanced communication protocols to address numerous
barriers and vulnerabilities such as increased energy consumption, faulty
transmission, increased construction costs and less efficient delivery in
conventional metering systems. The purpose of designing the SG is to control
and track the energy resources of users and suppliers using smart digital
metres in a more effective, accurate, functional, scalable, safe and cost-
effective manner [258, 259].

In the SG scenario, one unit called the grid collects the real-time data (also
referred to as meter reading in a conventional meter) from smart meters
deployed at different locations such as homes and industries. Most of the data
collected are in low-level operations and this allows data analysts to
discover significant data outcomes and help coordinate subsequent usage,
followed by even more complex analytics and planning [260]. This technology
has become a significant part of any country’s success, encouraging its power
consumers to use smart meters to manage and efficiently control power
consumption. However, one crucial challenge found in the SG is the “leakage of
personal information” through the streaming data. Personal information can
include the details of household users, such as billing information, metering
units and address, and these can cause severe security threats and loss of
privacy for both consumers and providers [261].

Blockchain technology is an emerging technology that can be utilised to
provide a solution that enables secure, transparent and efficient energy
transactions. Indeed, it provides a decentralised management and P2P energy
trading. In SG architectures, the primary role of the Blockchain technology is
to handle network transactions. Each entity in the SG, including producers,
customers, distributors, and managing authorities, communicates with others
operating as Blockchain nodes, and their interactions are recorded on the
Blockchain as a transaction. There are usually two types of entities in the
Blockchain-based SG architecture: light nodes and full nodes. Light nodes are
typically customers that use electricity and pay their bills, while full nodes
are those nodes that handle electricity and participate in the Blockchain
mining process. Further, smart contracts are typically used to enforce
transactions in Blockchain-based SG. These transactions include the payer’s
and payee’s remaining balances, balance deductions, benefit or loss on the
grid side, and so on [262]. Fig.12 indicates the Blockchain-based SG model in
which each grid is acting as a miner to manage and control the group of homes
using the Blockchain architecture.

As we mentioned earlier, streaming data can disclose the household users’
private information, which causes further security and privacy problems in the
SG environment. An attacker can also obtain power consumption history by
tracking and analysing the different behaviour patterns of users, such as on
and off timing for a job, switching off the house lights and recharging smart
meters. To tackle these issues, Guan et al. [135] proposed the Blockchain-
based “privacy” preserving and data aggregation method for the SG in which the
users are divided into separate subgroups and each subgroup head can record
the data of their sub-users. To protect the users’ information, each head
employs the pseudonym technique to hide the streaming data during data
transmission to other neighbouring heads.

Similar to the previous scheme [135], Aitzhan and Svetinovic [65] designed a
private Blockchain-based decentralised system that provides secure “end-to-end
communication” between the smart meter and the SG without the need for any
trusted third party. A multi-signature scheme and anonymous encrypted messages
are used to transform the trading transactions anonymously between the
different end-users to preserve transaction privacy. Rottondi and Verticale
[141] made another contribution towards the “privacy preservation” proposal in
a SG network when they implemented the Blockchain-based smart metering
architecture in which public users can transform their data to the SG in a
secure way. In the proposed system, a secure multi-party protocol which is
utilised for encryption and authentication purposes, guarantees users the
correctness and authenticity of their data without them being disclosed by the
SG.

###  5.5 Technology Industry

The technology industry includes internet-of-things, big data and cloud
computing, crowdsensing, and eCommerce as Blockchain-based Industry 4.0
applications.

####  5.5.1 Internet of Things

Figure 12: Blockchain-based Internet of Things (IoT) Network

Industry 4.0 has used the IoT and its associated technologies and protocols to
conduct digital manufacturing in which almost all embedded devices, such as
robots, machines and tools, have sensors to gather data from the environment
and function accordingly. IoT has changed the lifestyle of humans by
implicating ubiquitous applications at every step, which help to perform daily
tasks automatically and more efficiently. In conjunction with Fog computing,
IoT plays a significant role in offering time-sensitive services such as
disaster related services, smart transportation and smart health services
[263, 264]. However, the improvement of the IoT’s current paradigms can only
occur with continuous research and development in the underlying technology.
Although this technology simplifies and facilitates human life, it also
introduces numerous performance, security, and privacy concerns, as well as
other risks to human life. Thanks to Blockchain technology that filled the
missing gap between IoT services and security challenges due to its tremendous
features such as decentralisation, immutable ledger, transparency and data
auditability.

The role of Blockchain technology in IoT has the ability to alleviate security
and performance concerns. The use of Blockchain technology in IoT-based
applications adds another security level, which is almost impossible for the
attackers to get access to the network. The overall contribution of Blockchain
to IoT systems, either full or partial, can be summarised as follows: the
distributed ledger in a Blockchain system is immutable, eliminating the need
for trust between the parties involved. No one organisation has complete
control over the massive amounts of data produced by IoT devices. Blockchain
technology offers a significantly higher degree of security, making it almost
impossible to bypass existing data records. The transparency features of
Blockchain allow anyone with authorisation to access the network to monitor
previous transactions. By facilitating trust between stakeholders, Blockchain
enables IoT companies to cut costs by removing the processing overhead
associated with IoT gateways [265]. Fig. 12 illustrates one example of
integration of a decentralised IoT network with Blockchain technology. In this
illustration, the IoT devices act as the light nodes that are resource-
constrained in nature and whose security such as authentication and
authorisation is desirable and the scalability challenge. The miners’ nodes
are the full nodes and work as gateway nodes responsible for providing IoT
devices’ secure interaction to the Blockchain. Miners nodes are also
responsible for mining the transactions for validation and adding purposes
into the Blockchain. Administrator authority is responsible for deploying the
entire system and managing the behaviour of nodes in the network.

To solve the “user’s privacy” challenge in IoT, Cha et al. [266] proposed the
Blockchain-based scheme for IoT users that provides a secure gateway to
achieve the privacy of users in the IoT network. The secure gateway restricts
unauthorised access to users’ personal data from the Blockchain in the
proposed scheme. To achieve the ”authentication of users” in IoT, a digital
signature scheme is utilised to manage users’ access to resources. Another
Blockchain-based IoT scheme is proposed by Wan et al. [267] to achieve
security and privacy among different industrial processes. In the proposed
scheme, existing industrial models are studied and then the weaknesses
analysed in order to overcome any potential challenges of industrial
applications. The devices in IoT are subject to different types of
constraints, such as computation and limited memory. Therefore, there is a
need for third parties or cloud service providers to process and store a
massive amount of data on them. Although cloud computing is considered the
most potent resource for computation and storage of data, this technology has
its security and privacy concerns that need to be overcome. To address the
“access control challenges” for IoT devices, Le and Mutka [268] proposed the
CapChain, a novel access control scheme that allows the IoT devices to store
and manage their data on a public cloud without disclosing any personal
information. An anonymisation technique is utilised to protect sensitive
information, such as identities, from adversaries in order to preserve user
privacy. For the “protection of sensor data”, Chanson et al. [269] proposed
the certification-based Blockchain scheme to achieve data integrity in the IoT
network. The certification authority allows the users to perform
authentication steps in three different stages to prevent malicious activities
in the system.

Nowadays, IoT-based smart home applications are becoming very popular and many
home appliances are connected to the internet to control and manage the home
environment remotely. The increasing demand for smart home devices raises
different problems in terms of “security and privacy”, efficiency and
scalability. To cover such needs for designing a smart home system, Singh et
al. [270] proposed the Blockchain-based smart home network to achieve “secure
communication” between IoT devices. In the proposed system, the multi-
correlation technique analyses the network traffic that contains malicious
data and information. The security analysis of the proposed system claims the
high efficiency and throughput of the system. Another potential design of IoT-
based smart home was proposed by Dorri et al. [271] to guarantee the “security
and privacy” of home users. In their proposed Blockchain design, three major
components are used in a complete smart home setup: cloud, overlay network and
home appliances. On-chain storage is used to store the local processing data,
whereas off-chain storage, such as cloud, is utilised to store future data
which can only be retrieved through separate transactions.

####  5.5.2 Big Data and Cloud Computing

Big data analytics refers to the use of advanced computing techniques
implemented by many enterprises and industries to discover significant
patterns in broad datasets, in order to help businesses detect trends and the
impact of consumer preferences. Within Industry 4.0, data analytics plays a
critical role in smart factories, where equipment captures relevant machine
data to predict when maintenance and operations are required. Manufacturing
companies use big data analytics in the same way that manufacturers use it,
with the exception of emphasis. In manufacturing, numerous distributed
sensors, which are deployed through cloud computing and IoT technologies, help
the manufacturer uncover patterns which enable them to manage the supply chain
more efficiently [272].

Cloud computing is a stack of on-demand different resources and services
provided to users to deliver different operations appropriately. The resources
and services provided to Cloud users are controlled and managed by Cloud
Services Providers (CSPs), which monitor and determine the applicability of
on-demand access with the available resources. With the rapid pace of the
development of cloud computing applications, numerous industrial organisations
utilise cloud computing services for their data’s extensive computations and
storage.

The partnership between the Cloud and Industry 4.0 is a winning one, as both
technologies required time to develop and gain acceptance within the broader
industry communities. This incorporation enables businesses to fundamentally
and profoundly reconsider their entire spectrum of digitisation processes and
modify their current architectures to accommodate a broader industry market.
Additionally, all of this occurred with increased versatility across the
globe, from consumer response to cost control and proper management. With the
convergence of big data and cloud computing services into Industry 4.0,
millions of people today can use devices and applications daily that contain
highly complicated data in an ever-changing technological environment. The
growing trend of digital innovation, such as cloud computing, big data, and
the IoT, creates new connectivity and knowledge-sharing opportunities.
However, with such a large volume of sensitive data, it must be handled and
secured effectively and continuously. The convergence of Blockchain technology
and cloud computing brings the industrial community into a new era of data
protection and service availability. The majority of cloud research problems
can be resolved by leveraging Blockchain characteristics such as
decentralisation, immutability, and transparency.

The role of Blockchain technology into cloud computing and big data is many-
fold. For instance, there is no single authority responsible for data
management, eliminating the risk of a single point of failure. Depending on
the level of data protection needed, Blockchain technology offers better deals
than traditional providers in terms of security using an immutable ledger. In
terms of storage, a cloud storage network could be managed by the nodes that
assist with transaction facilitation, with the nodes granting the user access
to storage on their devices. Additionally, advanced cryptographic technologies
used in Blockchain can partition user data stored in the cloud into small
bits, encrypt them for an extra layer of data security, and distribute them
across the network.

From the security point of view, CSPs are solely responsible for giving proper
access to cloud users using the different authentication and authorisation
services available. However, the prevalent issue revealed in cloud computing
services is a single point of failure, which mostly leads to disclosing the
personal information of cloud users. For the alleviation of the
”authentication issue” occuring in cloud computing, Lu. et al. [273] proposed
the Blockchain-based decentralised authentication system for storing a
complete access control list of users on the Blockchain. The proposed system
provides authorisation and accounting features which utilise virtual coin
features commonly available for the digital currencies system. For security
enhancement, a simple one-way hash function is employed to secure the links
between users’ transactions; this confirms transparency at a higher level.
Another Blockchain-based scheme for trusted “data sharin” with the cloud
service provider was designed by Zheng et al. [45], in which unauthorised
users were restricted from performing the malicious modifications on data. In
the proposed scheme, Paillier cryptography was utilised to achieve the
confidentiality of data stored at distributed databases.

For the “protection of data” from unauthorised access, Fan et al. [274]
proposed the Blockchain-based privacy preserving scheme to protect users’
information being communicated over a content-centric 5G mobile network. The
proposed scheme successfully established a secure connection between different
service providers and users for transferring data. In addition to data
protection, the access control mechanism is also used to ensure access to
cloud resources.

Figure 13: Blockchain-based Crowdsensing Framework

####  5.5.3 Crowdsensing

Giving freedom of knowledge to people in order to obtain information through
some valuable resources has become a popular concept, used to discover
innovations in information and communication technologies. One of the most
popular ways of providing leverage to the crowd about real knowledge discovery
is crowdsensing [275]. In Industry 4.0, crowdsensing has been proven to solve
diverse problems effectively, while lowering costs and extending the reach of
ideas. The use of individuals’ data to implement processes and projects
differs greatly in every sector, from production to delivery, depending on
intent. Computational frameworks with high throughput are important in
streamlining organisational processes and also assist in connecting decisions
to crowd-sourced information and expertise through decision making projects.
Crowdsensing aids in monitoring ecosystems and mapping and exchanging
information and knowledge get by the peoples. For instance, in energy sector,
crowdsensing can help minimising the building’s energy consumption by
monitoring users behaviour and thermal comfort. In industry, crowdsensing can
minimise maintenance cycles and help fix machinery issues by tracking
environmental conditions and failure. Crowdsensing also assists in monitoring
ecosystems and mapping, and exchanging information and knowledge gained by the
people [276].

Human beings are equipped with sensing devices in the crowdsensing approach to
sense the data from surrounding environments and to take useful actions over
data in the industrial process. The quality of data captured by sensing
devices depends on the number of people and their level of competency, such as
primary, average and high skilled users. However, the limitation found in the
crowdsensing process is that the data of users who participated in the data
capturing process can be leaked during the sensing, which prevents further
users from joining the crowdsensing network. Furthermore, the crowdsensing
process faces several challenges, including fact discovery, knowledge quality,
and estimation quality using sensing data [277].

To overcome these limitation, the Blockchain technology is introduced in
crowdsensing that can support the joining of the maximum number of highly
qualified users in the crowdsensing method, using a rewarding mechanism that
attracts and motivates skilled users to participate in the data collection
process, in order to receive high rewards as an incentive for their services
for the crowdsensing process. The aim of integrating the Blockchain network
with current crowdsensing systems is to use the characteristics of Blockchain,
such as decentralisation, to provide a way for emerging decentralised systems
to solve the issues of a single point of failure in traditional systems and to
provide equal opportunity to contribute in the fair data collection.
Furthermore, the distributed ledger, as a core component of Blockchain in
crowdsensing, ensures the immutability and traceability of users’ data and
their feedback for use in different processes. Thus, the overall role of
Blockchain technology in crowdsensing can be summarised in terms of achieving
the following objectives: increasing worker efficiency, implementing a fair
compensation system, protecting confidential data, and lowering deployment
costs [278]. Fig.13 describes the Blockchain-based crowdsensing framework,
consisting of different nodes such as assigners, groups of users and miners to
participate and control the overall crowdsensing process.

For instance, Wang et al. [279] proposed the Blockchain-based “privacy-
preserving” incentive scheme for crowdsensing applications that allows highly
skilled users to participate in the sensing process publically and securely,
in order to gain high incentives. In the proposed mechanism, the k-anonymity
scheme is utilised to anonymise skill users’ profiles to protect privacy.
Another similar approach presented by Cai et al. [280] to “protect the
personal information” of the crowd uses the knowledge discovery method,
without disclosing personal information. In this method, the public Blockchain
platform collects knowledge from different sensing users in different
distributed places. To provide the “guaranteed privacy” of mobile users and
crowdsensing providers, Chatzopoulos et al. [128] proposed the Blockchain-
based crowdsensing scheme that specifies the smart contracts to ensure the
secure relationship ? between them. The proposed scheme uses the secure multi-
party computation algorithm in conjunction with smart contracts to protect
users’ privacy and incentive payments.

####  5.5.4 E-Commerce

In modern times, electronic commerce (eCommerce) business has been widely
accepted as a leading trading platform for the purchase and sale of online
goods or services to promote their business via the Internet. With the
widespread adoption of Blockchain technology in every field, traditional
eCommerce platforms have been shifted to Blockchain technology to allow
customers to carry out fair transactions without having a trusted party
between them. However, one of the key issues identified in these systems is
that it does not protect customer transactional privacy, such as content,
addresses, account details and trading information. While several Blockchain-
based privacy security mechanisms have been put in place to protect financial
transactions, there is still a trade-off between privacy and the speed at
which transactions are processed. To resolve this ongoing challenge, Li and
Wang [281] proposed RZKPB – a Blockchain-based “Privacy Preservation” scheme
that does not allow financial information to be stored in a plain-text format
on the Blockchain. Multiple cryptography primitives, such as hashing and
signatures, are used in the proposed methodology to verify transactions to
establish a secure relationship between trading partners.

##  6 Security and Privacy Techniques for Blockchain-based Industry 4.0
Applications

Figure 14: A Taxonomy of Security and Privacy Techniques for Blockchain-based
Industry 4.0 Applications

This section provides a detailed description of security and privacy
preserving methods used in different Blockchain-based Industry 4.0
applications. We categorise them as cryptography, mixing, anonymisation,
artificial intelligence and others, such as discrete wavelet, clustering and
bloom filters. These categories are further divided into sub-categories,
giving a better understanding of security and privacy methods and their usage
in Blockchain-based Industry 4.0 applications. A taxonomy of security and
privacy techniques is illustrated in Fig. 14.

###  6.1 Cryptography

Cryptography is a security technique that consists of a mathematical set of
rules and logic used to secure the communication between parties. In
cryptography, a plaintext is converted into some hidden text using a logic
known only to both the sender and the receiver. The objective of the
cryptography technique is to send the information securely only to those who
are authorised to see and read the information. Cryptography techniques are
used in many ways, such as protecting information from theft or modification,
providing authentication and ensuring user and data access [282].

####  6.1.1 Encryption

In cryptography, encryption is the most frequently used technique to transform
simple text or plain data into an encoded format that can only be read by
those persons who have access to decode it. It is important to describe here
that this encoding/decoding process would not be possible without a shared
key, which two or more parties mutually set for secure communication. The key
is an important encryption element that provides data security between end-to-
end components and should not be disclosed to other network components.

There have been several other techniques proposed that are purely based on the
encryption used to solve the security and privacy challenges in different
Blockchain application domains. Here, we divide the encryption technique into
further sub-extensions of encryption.

  * 1.

Simple Encryption: As stated above, encryption is a method to convert the
simple text format into another format, which others cannot easily understand.
There are two types of encryption methods, that is symmetric and asymmetric.
In the symmetric method, one secret key is shared between two parties to
encrypt and decrypt the data. However, in the asymmetric approach, each party
has two types of keys, such as public and private, in order to encode and
decode the data, respectively. In the Blockchain, each transaction is
encrypted in other forms, which hide content details.

  * 2.

Homomorphic Encryption: This is an extended version of encryption that allows
the user to perform computations, such as addition and exponents of encrypted
text. In contrast, simple encryption does not allow users to perform any
useful computations on the ciphertext. Therefore, the main advantage of
homomorphic encryption is two-fold: (i) to perform complex mathematical
functions on encrypted data and (ii) to analyse encrypted data without losing
the original data. Additionally, homomorphic encryption is the most common
technique used in cloud computing, in which different organisations are
involved in-service analysis of their encrypted data stored in the public
cloud. In Blockchain-based applications [45, 132], homomorphic encryption is
used to preserve users’ privacy without revealing personal and sensitive
information to others.

  * 3.

Multi-Party Encryption: Multi-party encryption or multiparty computation is
another encryption form with which multiple users jointly perform the
encryption of data. However, data remain private during the multi-party
process and are not disclosed to others in the group. The advantage of using
multi-party encryption in secure computations is that it can prevent the
attacker from obtaining the secret information of any targeted users in the
network. To illustrate this concept, [147] utilise multi-party computation to
provide users’ guaranteed security and privacy in the decentralised Blockchain
network.

  * 4.

Proxy Re-Encryption: In cryptosystems, proxy re-encryption is a third-party
encryption technique in which the third-party (medium party) changes the
plaintext into ciphertext, without knowing the actual content inside it.
Generally, proxy re-encryption is considered a public-key cryptography
technique that uses public and private keys to encrypt and decrypt the data.
The proxy re-encryption scheme is commonly used in those applications when the
different users want to exchange encrypted data without sharing their secret
key. In Blockchain-based IoT applications [11, 65, 139, 138, 246, 248], proxy
re-encryption is used to share private contracts between users so as to
control and manage the IoT devices.

  * 5.

Paillier Encryption: The Paillier cryptography or Paillier encryption is a
key- pair based algorithm that utilises two keys, that is public and private,
to encrypt and decrypt the data, respectively. It is also known as
probabilistic asymmetric cryptography since it performs n-th computations on
multiple residue classes. In Paillier cryptography, additive homomorphic
encryption applies to the given set of messages, and each message is
encoded/decoded with the key pairs of respective users. Considering the
implementation of Blockchain in IoT [266] and cloud computing [45] domains,
Paillier cryptography is used to achieve privacy and anonymity in such
decentralised applications.

####  6.1.2 Hashing

A hashing technique is used to compact or digest any arbitrary size input into
a fixed-size output. The input can be given in any sizes and formats such as
integer, character, string and binary. Hash functions work according to a
specific data format, which is often called a hash table. This is used to map
the input data values on stored values to produce the output. A hash
function’s strength is that it is designed to be a one-way function, which
means that a user cannot change the input back from a given output value.

In cryptography, the hash functions are utilised to achieve the integrity of
data messages because any single change in data value can be detected easily
by a change in output value. Apart from data integrity, the cryptography hash
functions are also used in digital signatures and different checksum protocols
to achieve users’ authentication. The best cryptography hash function must
have the following important key features. Firstly, it should be collision-
resistant which means that two of the same inputs must produce different
output values. Secondly, it should be impossible for everyone to regenerate
the same input from the output values. Finally, the hash function should
easily detect any small modification in data values. Many families of hash
functions in cryptography have been proposed but the most commonly used hash
families are MD5 and SHA-0 to SHA-3 with different output sizes.

In Blockchain, cryptography hash functions are extensively used to link and
maintain the integrity of blocks. The blocks are linked with other blocks so
that the hash of the previous block is stored in the header of the next block
to form a complete hash chain. Moreover, hash functions are used in different
Blockchain applications such as financial systems [231, 283], eHealth [249],
IoT [266, 268], IoT [11, 284, 285] and crowdsensing [257] to achieve the
security and privacy of transactions and users.

####  6.1.3 Signatures

In the past, the signature method was utilised as the simplest method to
authenticate any document by placing hand-written signatures at the bottom of
documents [286]. In the digital world, the signature method is used to protect
software ownership and digital communication in a well-defined way. Also, this
is an essential tool in information security to achieve the authenticity,
integrity and non-repudiation of messages [287].

We classify the signatures into the following sub-categories, such as digital
signatures, multi-signatures, threshold signatures, ring signatures, blind
signatures, attribute-based signatures, identity-based signatures and elliptic
curve digital signatures algorithms.

  * 1.

Digital Signature: This is a public-key cryptography technique that binds the
identity of users to their digital data using a signature mechanism. In
digital signatures, a private key (or secret key) is only known to the
specific user and is utilised to sign the messages [288].. The digital
signature method confirms the authenticity of the text from the sender, to the
receiver and he/she cannot repudiate the origin of the message. In addition,
digital signatures are also used to check the integrity of a message and
ensure that an adversary in the communication does not modify it [289].

  * 2.

Multi-Signature: Similar to digital signatures, multi-signature is also a
digital signature technique used to prove the authenticity of digital
documents. However, multi-signature allows people to sign one single document
instead of a single user per document. For example, in government
organisations, one document is passed on from many people having different
ranks (bottom-up) to authenticate and prove it. Typically, a multi-signature
scheme generates one single joint signature from a group of people, rather
than individual signatures [290]. In the Blockchain, multi-signatures are used
to sign cryptocurrency transactions in order to add extra security protection
to them [21]. The total number of signatures required for one document is
decided before the generation of addresses. In [65], a multi-signature scheme
is utilised in energy trading systems to protect users’ privacy and their
related energy consumption data.

  * 3.

Threshold Signature: The working of threshold signatures is similar to a
multi-signature where a group of people signs one document to ensure its
authenticity. However, the only difference in threshold signatures comparing
to the multi-signature is that it requires a fixed number of peoples to
produce a valid signature for the document [291]. To illustrate the proof of
threshold signatures, [129, 292] proposed the Blockchain-based E-voting scheme
to achieve the security and privacy of voters.

  * 4.

Ring Signature:

Another most important type of digital signature is a ring signature that
works in a group pattern arranged in a ring shape. Ring signatures enhance the
idea of a group signature to provide better security and privacy to group
users. In a group, the signature can be generated by any group member who is
assigned valid cryptography keys. In this way, it is challenging for others to
determine the group’s actual user who generated the signature with their
public key [293]. In Blockchain-based applications, ring signatures are
employed to protect the input transactions signatures with the public key of
any node. Therefore, it is complicated for adversaries to find the correct
identity of the group [127, 234].

  * 5.

Blind Signature: In this signature algorithm, the user acts as a blind person
in the overall signature process and generates a signature without knowing the
actual content; thus, it is called a blind signature. However, the result of
the blind signature is publicly available to everyone to verify the original
contents. It is essential to describe here that blind signatures are mostly
used in privacy-preserving protocols to achieve the anonymity of users (or
signers) belonging to different parties [294]. In the Blockchain scenario,
blind signatures are widely used in e-voting applications to achieve the
security and privacy of voters and candidates [231, 295].

  * 6.

Attribute-Based Signature (ABS): This is a modern technique in digital
signature methods that allows signature parties to sign documents with users’
information on fine-grained access control policies. This known information is
formally called attributes given by the central authority in attribute-based
signatures [296]. Each user in the attribute-based signature comes with
different types of attributes that are not identical to others. Therefore, the
changing nature of attributes can also generate different signatures. The ABS
is mostly employed in Blockchain-based E-health applications in which concern
for users’ privacy is essential [245, 31].

  * 7.

Identity-Based Signature (IBS): Certificates follow the idea of a public-key
certificate to the user for signing documents. In this way, no one can go
beyond their credential limits as defined by certification authorities.
Compared with other digital signature schemes, the IBS scheme has some
advantages in terms of implementation and computation [297]. However, the
drawback of the IBS scheme is that it can increase the length of the
signatures by combining the two different signatures, that is one from the
user and the other from the certification authority. Similarly, it needs two
verifiers to verify and prove the generated signatures. In the Blockchain, the
IBS scheme is frequently used in authentication systems in which users require
authentication before using system resources [298].

  * 8.

Elliptic Curve Digital Signature Algorithm (ECDSA): This algorithm combines
the elliptic curve cryptography and digital signature algorithms to generate
the signature of data contents. Therefore, it is considered the most powerful
digital signature algorithm and mostly used in IoT based-applications [299].
In Blockchain-based applications, the ECDSA is utilised to ensure the
integrity and authenticity of transactions [57]. However, the drawback of
ECDSA is that the key size needs to be double that of the other available
cryptography algorithms.

####  6.1.4 Secret Sharing

In cryptography, secret sharing is a common technique used in distributed
computing when one secret is shared equally among all of the group
participants. In particular, this secret sharing scheme builds the trust of
group participants by fulfilling the following criteria: a sufficient number
of participants and the conditions and types of shares to reconstruct the
share later. To build the secret, an (n, m) - threshold method is used, which
is often called the (n, m) - threshold scheme [300]. The advantage of using
secret sharing with Blockchain-based applications is that it can reduce the
communication and storage costs for sharing and storing data on distributed
ledgers.

In cryptography, secret sharing is a common technique used in distributed
computing where one secret is shared equally among all of the group
participants. Especially, the secret sharing scheme builds the trust of group
participants by fulfilling the following criteria, such as a sufficient number
of participants, conditions and types of shares to reconstruct the share
later. To build the secret, an (n, m) - threshold method is used, which is
often called (n, m)- threshold scheme . The advantage of using secret sharing
with Blockchain-based applications is that it can reduce the communication and
storage costs for sharing and storing data on distributed ledgers.

  * 1.

Shamir Secret Sharing: This is a security scheme that uses the concept of
encryption to provide evidence securely from the majority of community
participants. The Shamir secret scheme works in the form of a hierarchy in
which most participants trust each other to maintain the trusted relationship
between them [301]. For instance, one participant must be reliable in
distributing the private keys to other group members. In the Blockchain, the
secret Shamir scheme requires a number (or secret) to define the threshold
value to reconstruct the secret used by the miners [302].

  * 2.

Additive Secret Sharing: Additive secret sharing is another cryptography
primitive used to achieve privacy by employing the multi-party computation
method. Similar to the Shamir secret sharing scheme, no one can recover the
total value of a secret using their shared secret [303]. The advantage of
using the additive secret sharing scheme in Blockchain applications is that it
follows homomorphic encryption for bitwise transactions processing.

####  6.1.5 Zero-Knowledge Proof

Zero-Knowledge Proof (ZKP) is one of the fundamental concepts of applied
cryptography used to ensure security properties, for example anonymity,
privacy and verification of transactions. In ZKP, a verifier party verifies
the proof of the claimant and provides proof of knowledge without disclosing
personal information to others [304]. The advantage of ZKP in the Blockchain
is that each verifier (or miner) can prove a shared secret challenge if the
claimant does not provide any information (zero-knowledge). ZKP is most
commonly used in business applications in which parties exchange confidential
information without fear of personal information leakage [305].

###  6.2 Mixing

Mixing service plays a vital role in privacy to conceal the senders’ and
receivers’ transactions in such a way that no one can know what is actually
inside them. In the mixing technique, both incoming and outgoing transactions
are mixed up with the same type of transactions of others. This approach aims
to separate the transaction detail from the identities of the sender/receiver.
Generally, there are two types of mixing techniques used in Blockchain
applications, that is transaction mixing and address mixing.

####  6.2.1 Transaction Mixing

In the Blockchain, transactions are stored in the distributed ledger and are
open to everyone for graph analysis and other purposes. An adversary can
easily track individuals by knowing the information stored in the Blockchain.
To protect the information, especially financial information (bitcoins) from
adversaries, transaction mixing services help users to mix their financial
transactions so that it would be difficult for others to trace the original
user who is involved in the transactions. According to defined criteria, these
services accept the transactions as inputs from different users, mix or
shuffle them according to defined criteria, and send them as outputs at
different addresses. The mixing services are mostly charge-based services that
charge the users to mix their transactions. However, the main issue identified
in existing mixing services is that it depends on third parties that hold the
transactions (coins) for some time. These services are often attacked or
operated by malicious parties that use attacking techniques such as DDOS and
ransomware to steal coins from both parties’ accounts. To resolve such issues,
many Blockchain-based mixing services, such as CoinJoin and CoinShuffle, have
been proposed to remove the third party’s requirement to mix financial
transactions between the sender and the receiver.

####  6.2.2 Address Mixing

Address mixing (or address shuffling) is also a mixing service in which an
input address of the transaction is related to the transaction’s output
address. The address mixing service can be implemented in two ways, that is
explicit address shuffling and implicit address shuffling. In explicit address
shuffling, the mixing party explicitly knows the senders’ and their addresses
for which the shuffling service is performing. CloakCoin [306] is the
cryptocurrency that used the explicit address shuffling scheme to relate the
input address to the output address. Simultaneously, the senders’ and senders’
addresses are completely hidden in implicit (or hidden) shuffling services. In
an implicit shuffling service, the mixing server cannot relate the address of
the sender with the address of the receiver. An example of implicit address
shuffling is Maxwell’s CoinJoin [307] cryptocurrency that used blind
signatures to implement this strategy.

###  6.3 Anonymisation

Anonymisation is a commonly used data hiding technique that ensures that users
are anonymous throughout the process. The anonymisation technique is designed
to make it impossible for others to identify the specific user and their data
stored in the database. The main aim of the anonymisation process is to
protect users’ privacy with cryptography or generalisation methods.

####  6.3.1 K-Anonymity

K-anonymity is the most popular technique used to achieve the anonymisation of
users’ data. The goal of the k-anonymity technique is to protect users’
privacy while performing complex operations on data, for instance, data
required to fulfil the k-anonymity property if it is not distinguished from
the at-least remaining k-1 users involved in the computation process. In this
way, the k-anonymity property ensures that the probability of identifying the
users in a given data set must not exceed 1/k [308]. To achieve k-anonymity,
the two most commonly used approaches are generalisation and data suppression.
In the Blockchain, k-anonymity is the basic method used to achieve users’
privacy in the public environment [309].

###  6.4 Artificial Intelligence

Artificial Intelligence (AI) is a combination of different intelligence
features and practices for using native hardware in meaningful ways. At
present, this technology can increase the level of thinking using the concepts
of the neural network, machine learning and deep learning [310]. Blockchain
technology is designed to store the data on the immutable ledger by using
different cryptography algorithms. In addition, AI algorithms have also been
used to examine user activities in the Blockchain network and practise
different heuristic approaches in a deterministic way [311].

####  6.4.1 Machine Learning

This is a basic and more frequently used technique in artificial intelligence
that enables the system to learn from experience and make an automatic
decision to improve it. The inputs to machine learning techniques are usually
in learning data, collected heuristic observations and experiences. Thus, the
only objective of machine learning technology is to allow the system to take
automatic action without human intervention.

Blockchain technology, with a combination of machine learning methods, plays a
significant role in developing Blockchain-based applications. In fact, it
changes the way of thinking about building decentralised applications [312].
In addition, machine learning approaches also improve the Blockchain system’s
security, using analytical learning methods, and provide a way to design new
privacy-preserving models for decentralised applications [310].

####  6.4.2 Deep Learning

Deep Learning is another widely used technique of artificial intelligence
(sometimes referred to as machine learning sub-field) that has a significant
impact on some different areas capable of performing multiple tasks to produce
accurate results [313]. Similar to the machine learning technique, deep
learning also gives instructions to the computer in some available datasets,
such as text, images, audio and videos [314]. As the deep learning method
integrates and works with large data sets to produce high-quality results,
data security is an important requirement that requires significant solutions
in terms of security and privacy.

Building on Blockchain technology, deep learning features can ensure user data
security and can also meet the privacy needs of different applications. In
addition, decentralised deep learning approaches are used with Blockchain
applications to ensure consistency and transparency of Blockchain data [315].

###  6.5 Others

Many other approaches are available to respond to the security and privacy
problems in the Blockchain-based application. For example, a solution to
privacy problems in the E-Health application [144] is a discrete wavelength
transformation method in which a conversion strategy is utilised to convert
the wavelets into discrete sampling, in order to achieve accurate frequency
and timing information of stored data. In Blockchain security, the discrete
wavelength transformation is used with cryptography functions to generate the
key pairs for encryption/decryption. In [11], a clustering technique, in which
each vehicle is linked and tracked by the respective controlling unit, called
RSU (Road-Side Unit), is used to protect vehicle users’ privacy. The unit
authenticates the vehicles using some asymmetric cryptography primitives.
Another privacy preserving approach, called the three-weight subjective
logical [131] , is employed in the vehicular network to protect vehicles’
data. This approach is purely based on a probabilistic logic model in which
data is assigned a different weight, in order to calculate the subjective
logic in the decision-making process. There are also a few other methods, such
as Range Query [136], Game Theory [128], Bilinear Maps [138], Bloom Filter
[127] and Statistical Measures [316] which are used to deal with the problem
of security and privacy in different Blockchain-based applications.

##  7 Security and Privacy Attacks on Blockchain-based Industry 4.0
Applications

This section describes the various security and privacy attacks on Blockchain-
based Industry 4.0 Applications, in which the attacker uses different
approaches to obtain data and information. Since our survey paper aims to
integrate Blockchain technology with various industrial applications, it is
important to mention here that the attack surface includes attacks on both
platforms, such as the Blockchain network and the industrial applications.

We categorise the attacks based on their layers as follows: data layer,
network layer, consensus layer, incentive layer, smart contract layer and
application layer. We also categorise the security breaches into three
different primary branches: (i) breach of confidentiality, (ii) breach of
integrity and (iii) breach of availability. In breach of confidentiality, the
attacker tries to listen to the communication between two parties without the
consent of the owner of the data rights. In breach of integrity, the attacker
aims to change or modify the original data into another form, after listening
to the communication channel. Undoubtedly, breach of availability is one of
the most severe breaches because the attacker’s intention is to disrupt the
network or data services using some malicious attacks, such as a denial of
services, to make these services unavailable to legitimate users. Moreover, we
explain each attack with the attacker’s goals and objectives to expose
vulnerabilities and threats in the system. We also sort attacks and targeted
applications whereby some attacks, such as 51% attacks, double spending
attacks and selfish mining attacks, are specially designed for Bitcoin and
Ethereum applications. However, most of the attacks can also be targeted
generally to the other domains, including IoT, SG, medical and vehicles. We
also present state-of-the-art solutions and techniques used to protect the
applications and their underlying systems against a subset of such malicious
attacks.

Table 4 presents a summary of the reviewed attacks on both the Blockchain
network and industrial applications, along with their layer categories,
attacker goals and objectives, security breaches and vulnerabilities, as
exploited in the system or network. In addition, we also include the targeted
applications suffering from these potential threats and vulnerabilities, and
prevention methods and security approaches in the table.

Table 4: Security and Privacy Attacks on Blockchain-based Industry 4.0 Applications Layer |  Attack |  Attacker Objectives |  Security Breaches Occurred |  Vulnerabilities Exploited |  Target Applications | Countermeasures
---|---|---|---|---|---|---
|  Malleability Attack |  Duplication of signatures to create impact of double spending problem |  Breach of Integrity |  Change few bytes of signatures |  Bitcoin and other cryptocurrencies |  Segregated Witness, Modification of the bitcoin specification , Time commitment method
|  Time Hijacking Attack |  To modify the time stamps of both the network and a node |  Breach of Integrity |  Incorrect time stamps are broadcast to other network nodes |  Bitcoin and other cryptocurrencies |  Hardware oriented systems, Network time protocol, time constraints
Data |  Quantum Attack |  utilise quantum computing to solve the cryptographic portion of Blockchain |  Breach of Integrity, Breach of Availability |  Performed hash collisions |  All Applications |  Quantum post-signature scheme
|  Replay Attack |  To hold the valid transactions not to be added in the Blockchain |  Breach of Integrity, Breach of Availability |  Delay caused in a P2P communication network |  Online Digital Platform, Vehicle |  Add nonce in each transaction, Mixing techniques, Digital signatures can be used to prevent replay attack
|  Modification Attack |  To perform modification in transmitted data |  Breach of Confidentiality, Breach of Integrity |  Caused the harmful activities in the system or network |  SG, IoT, Medical |  Consensus algorithms, cryptography techniques
|  Fault Injection Attack |  To impersonate the Blockchain by adding fake data or block in existing Blockchain |  Breach of Integrity |  The reputation of the system is getting worst when performance is the prime factor |  Vehicle |  Digital Signatures, Hashing
|  Upgraded Attack |  To make modifications in the threshold values to impersonate the miners |  Breach of Integrity |  An illegal decision made by the fake miners to perform malicious activities |  Vehicle |  Digital Signatures
|  51% attack |  To take control of the overall network by colluding with more than 50% devices in the network |  Breach of Integrity |  Make wrong decisions even when there are honest miners, Transferring of bitcoins into targeted accounts |  Bitcoin, Ethereum |  Random selection of miners
|  DoS Attack |  To disrupt the network resources provided by the host |  Breach of Availability |  Unavailability of legitimate services such as network and security |  All Applications |  Decentralised networks, Consensus algorithms
Network |  DDoS Attack |  To disrupt or overload the network resources as collectively |  Breach of Availability |  Unavailability of legitimate services such as network, and security |  All Applications |  Consensus algorithms
|  Eclipse Attack |  To target the specific node in P2P network rather than attacking the whole network to perform malicious activities |  Breach of Integrity |  A single targeted node hijack and bypass the whole network communication at once, A node can also govern their own rules in the network |  Bitcoin |  A number of possible solutions can be applied including the usage of a private network, randomly selection of miners and limiting the number of incoming/outgoing connections

Layer |  Attack |  Attacker Objectives |  Security Breaches Occurred |  Vulnerabilities Exploited |  Target Applications | Countermeasures
---|---|---|---|---|---|---
|  Sybil Attack |  Creation of fake accounts to exploit the network |  Breach of Integrity |  Leakage of personal information of users |  Bitcoin, Online Digital Platforms, IoT Medical, Vehicle, Cloud |  Limit the creation of identities in the network, Assign reputations to the users
|  BGP Hijacking Attack |  To determine the data path routes in the network from source to destination |  Breach of Integrity |  All network traffic directed to the malicious server |  Bitcoin |  Verify and monitoring the network traffic, BGP sec protocol can be used to avoid malicious traffic
|  Phishing Attack |  Obtaining the confidential details of a network user |  Breach of Confidentiality |  Use the obtained personal details in inappropriate ways |  All applications |  Anti-spyware softwares Upgrade firewalls
|  Liveness Attack |  To hold the transaction longer than their confirmation time |  Breach of Availability |  A valid verification of a transaction is not possible on time |  Bitcoin, Ethereum |  Round trip time
|  Routing Attack |  To perform malicious modifications in data packet before transmitting to other nodes in the network |  Breach of Integrity |  All traffic of targeted server is routed towards the malicious one's |  All applications |  Audit and verification protocols to check the integrity of the message, Round trip time to check the propagation time, cryptography techniques
|  Man-in-the- middle (MITM) Attack |  To bypass the communication channel to obtain secret information between parties |  Breach of Confidentiality, Breach of Integrity |  Different secrets such as private key and personal identities are disclosed to the attackers |  Online Digital Platforms, Medical, Vehicle, Finance IoT |  Authentication schemes can be used to prevent a MITM attack
Consensus |  Double spending Attack |  To send the same money (bitcoins) to different users |  Breach of Integrity |  Duplicate and reproduction of digital transactions |  Bitcoin, Digital Currencies |  Consensus protocols, digital signatures
|  Stake Bleeding Attack |  To gain ownership of the blocks that will be added to the Blockchain |  Breach of Integrity |  Increase the number of stakes |  Incentives-based applications |  Validity of context-oblivious transactions
|  Selfish mining Attack |  To hold the valid block without broadcasting to other nodes in the network |  Breach of Integrity, Breach of Availability |  Resource consumption is high, Claim the more rewards compared to other nodes |  Bitcoin, Ethereum |  Define the scale and height to detect the miner behaviour
|  Bribery Attack |  To create a fake mining capacity |  Breach of Availability |  To gain the more power on the network |  Incentive-based applications |  PoW consensus mechanism
Incentive |  Refund Attack |  To reclaim payments sent to users |  Breach of Availability |  To reimburse payments made to users |  Bitcoin and digital currencies-based applications |  Request that the user submit a payment request with sufficient evidence
|  Block Withholding Attack |  Disguising the hash of the puzzle rather than returning it to the mining pool |  Breach of Availability, Breach of Integrity |  Waste computing resources and reduces the overall mining pool’s income |  Incentives-based Applications |  silent time stamps, zero determinant methods, contribution of smaller pools, and a game model based on the consensus protocol and Nash equilibrium

Layer |  Attack |  Attacker Objectives |  Security Breaches Occurred |  Vulnerabilities Exploited |  Target Applications | Countermeasures
---|---|---|---|---|---|---
|  Balance Attack |  To delay the Communication among nodes having the same mining power(balance) in the Blockchain network |  Breach of Integrity |  Selected miners can increase their balance by disrupting the communication of others |  Bitcoin, Ethereum |  Limiting the numbers of miners with more balance in the network
|  Integer Overflow Attack |  To overflow the defined limits |  Breach of Integrity |  This resulted in memory overflow and system halting problems |  Ethereum |  Carefully Code analysis, rewriting, and testing
Smart Contract |  Re-Entrancy Attack |  To create malicious smart contracts that call re-entrance functions |  Breach of Integrity |  Take ethers from other people’s wallets |  Ethereum-based applications |  Dynamic taint tracking of smart contract data flows, fuzzing testing
|  Short Address Attack |  To enter a short address in order to execute malicious code modifications |  Breach of Integrity, Breach of Availability |  Exploitation of smart contract code |  Ethereum-based applications |  Correct code verification and synthesis
|  Location cheating Attack |  To send the wrong location to the road- side unit |  Breach of Integrity |  Consume the maximum resources of the system |  Vehicle |  Calculate the new location from existing stored locations
|  Ballot stuffing Attack |  To do the multiple entries instead of permitted one entry in the system |  Breach of Integrity |  Perform malicious actions by taking control of the overall network |  eCommerce, E-Voting |  Digital Signatures
|  Badmouthing Attack |  To destroy someone 's reputation by giving negative feedback |  Breach of Confidentiality Breach of Integrity |  Malicious activities can occur in the system by single or group of attackers to take unlawful actions |  eCommerce |  Self-organizing maps
|  Guess Attack |  To guess the keyword by performing brute forcing or matching techniques |  Breach of Confidentiality, Breach of Integrity |  Disclose the system secrets such as private keys or personal information |  Medical |  Encryption, Hashing
Application |  Chosen Ciphertext Attack |  To obtain the secret key to recover the original data from the ciphertext |  Breach of Confidentiality, Breach of Integrity |  Obtain the personal data or information |  Medical |  Elliptic Curve Digital Signature Algorithm (ECDSA)
|  Impersonation Attack |  To create a fake profile or mimic the behaviour of others nodes to gain maximum benefit |  Breach of Integrity |  Control the overall network by maximising the benefits from others |  Vehicle, Crowd Sensing |  Verification techniques, Cryptography
|  Linking Attack |  To map the stored data using various linking algorithms |  Breach of Confidentiality, Breach of Integrity |  Extract some useful information to harm the privacy of users |  Bitcoin, Online Digital Platforms, IoT, Vehicle, |  Generate the new key every time to encrypt the data
|  Collusion Attack |  Tries to mix the different inputs to reveal the secrets about the node in the Blockchain network |  Breach of Confidentiality, Breach of Integrity |  Personal or secret information is revealed to malicious users |  Medical, eCommerce |  The pseudo-random method can be used to prevent collusion attack

###  7.1 Data Layer

The data layer is the last layer of the Blockchain framework; it defines the
physical structure and properties of a block and encapsulates the data and
chain of connecting blocks to the Blockchain. The data layer is responsible
for handling data that is stored on the Blockchain (on-chain) and in the
database (off-chain). The attacks on the data layer of Blockchain
architecture, which include malleability attack, time hijacking attack,
quantum attack, replay attack, modification attack, fault injection attack and
upgraded attack, are listed in detail.

####  7.1.1 Malleability Attack

The malleability attack is a specific type of double-spending attack that
often happens in networks due to the malleability of signatures. In this
attack, the attacker broadcasts the two transactions to the Blockchain
network, resulting in the appearance of double-spending. For instance,
attackers can monitor transactions on the Bitcoin network and change their
signatures while still authenticating the transactions. The signature uses the
secure sockets layer protocol, which means that even though an attacker
modifies any bytes, the signature remains valid. Upon modifying the signature
of a transaction, a new transaction identifier is generated [317].

Numerous solutions have been proposed to this attack in order to prevent the
network from being malleable, including segregated witness [318], modification
of the bitcoin specification [319] and time commitment methods [320].

####  7.1.2 Time Hijacking Attack

Time hijacking attacks occur as a result of a loophole discovered in the time
stamp protocol of Bitcoin and their related cryptocurrencies. In this attack,
the attacker’s goal is to change the time counters of both the node and the
network.

One strategy for resolving this problem is implementing hardware-oriented
systems, which benefit from replacing older network time technologies. Time
hijacking attacks can also be mitigated by using tolerance range constraints
and improved network time protocols [321].

####  7.1.3 Quantum Attack

Quantum computers are explicitly developed to solve cryptographic problems
based on complex mathematical problems. Quantum attacks are generally aimed at
the Blockchain’s cryptographic component, with the primary objective of
resolving the mathematical problem of cryptographic dependency. For instance,
attackers may conduct quantum attacks against Blockchain in order to perform
hash collisions against consensus protocols such as PoW.

Khalifa et al. [322] suggested general security steps against quantum elastic
Blockchain using the quantum post-signature scheme to minimise the problem of
quantum attacks on Blockchain.

####  7.1.4 Replay Attack

In Blockchain systems, the replay attack is the most common issue faced by
Blockchain transactions and can cause a long delay in the communication
between the two parties. In response to the attack, the opponent holds certain
transactions in the network and does not send them to the miners for
verification. As a result, each node has to wait a long time to acknowledge
its transactions and results. Some significant works have shown that this
problem is addressed by using multiple approaches, such as adding a nonce to
each transaction, mixing techniques and digital signature methods [323].

####  7.1.5 Modification Attack

An adversary always tries to change the broadcasted transactions in the
Blockchain network before sending them to the miners for verification.
Furthermore, it can also involve the modification of acknowledgment messages
received from miners. As a result, the attacker breaches the system’s
integrity to launch harmful activities and can take complete control of the
underlying system. To overcome this problem, some approaches [137, 147, 31]
use cryptography operations as attribute-based signatures and consensus
algorithms utilised to provide resistance to modification attacks in
Blockchain systems.

####  7.1.6 Fault Injection Attack

In a fault injection attack, the adversary can change the programme’s
execution by inserting malicious or fake code inside the program. The purpose
of the fault injection is to either stop the execution of specific
instructions or disrupt the complete code. This vulnerability usually occurs
in the system due to the improper use of code validations in the program. In
the Blockchain, the adversary attempts to impersonate the Blockchain by adding
fake data or blocks to the existing Blockchain, using fault injection methods.
To give the idea of a fault injection attack, [136] proposed the Blockchain-
based vehicular system in which different cryptography methods, such as
hashing and digital signatures, were used to protect the system from injection
attacks.

####  7.1.7 Upgraded Attack

The upgraded attack is a type of data attack in which the adversary involves
changing the trust values defined as threshold values of the system’s
participant amount. The system’s trust level can reach higher than the current
level with many users in the Blockchain network. In an upgraded attack, the
Blockchain miner controls the overall network to launch the network’s upgraded
attack. Multiple fake miners can change the current threshold value to perform
malicious activity in the system. A possible solution to overcome this problem
was proposed in [324], in which digital signatures were utilised to verify the
defined threshold values in the vehicular network. In this way, the
modification in the threshold values can easily be detected and mitigated.

###  7.2 Network Layer

The network layer is the fifth layer in the Blockchain layered architecture
and it is primarily responsible for information transmission between
Blockchain nodes. As we all know, Blockchain operates on a network known as a
P2P network, in which peers exchange knowledge about the state of the network.
For example, any node in the public Blockchain may enter the network. That
node can be any ordinary home computer or mobile device; therefore, network
layer protection must be implemented to prevent further network attacks.
Therefore, security and privacy are also important components of the network
layer. The network layer is subject to the following attacks such as 51%
attack, denial-of-service attack, distributed denial-of-service attack,
eclipse attack, Sybil attack, BGP Hijacking attack, phishing attack, liveness
attack, routing attack and man-in-the-middle attack. These attacks are
described in detail below.

####  7.2.1 51% Attack

One of the common vulnerabilities found in the Blockchain network, especially
in Bitcoin and Ethereum applications, is the 51% attack. A group of miners
wants to control the network with more than 50% mining (or computing) power
[325]. The mining group prevents the newly created transactions and would not
allow them to go to other miners to pass the confirmation successfully. In
this case, the 51% controlling group takes control of the overall Blockchain
and creates wrong decisions to dispute the network’s reputation. Moreover, 51%
of miners would be able to transfer all of the bitcoins from the user account
to their targeted accounts. One approach to solve this problem involves
selecting random miners and restricting them from recycling their bitcoins to
participate in the consensus process [326].

####  7.2.2 Denial of Services (DoS) Attack

Denial of Services is a common attack on centralised systems; this prevents
the host’s network communication or services from performing some legitimate
actions. In this way, the particular node or system cannot provide legal
services to others until it recovers so as to provide the same services again.
In the Blockchain systems, the DoS attack could restrict one particular node
from sending and receiving updates from other nodes in the P2P network.
Generally, applications that are specifically based on centralised
architectures may suffer most from a DoS attack. The standard solutions to
this problem are decentralised networks and optimal consensus protocols that
better protect the systems from DoS attack [327, 328].

####  7.2.3 Distributed Denial of Services (DDoS) Attack

Compared with the DoS attack, the attacker’s main aim in a DDoS attack is to
interrupt the complete services of the integrated network, instead of an
attack on a specific node in the network [329]. In most cases, this attack
happened in the network due to poorly managed cache records of Domain Name
Services (DDoS), in which the nodes could not receive the updates from other
nodes on time. This attack is most dangerous for network applications when all
legal services go down at once; therefore, it requires significant solutions
to overcome this problem. In Blockchain-based cryptocurrencies, the consensus
mechanism plays a vital role in a decentralised and distributed environment to
make an optimal decision at some common points [330].

####  7.2.4 Eclipse Attack

In an eclipse attack, the attacker aims to target a single specific node
rather than capture all the P2P network nodes. In this way, the attacker could
stop the targeted node from receiving the new updates from the other nodes.
Indeed, the attacker wants to connect the target node with the other malicious
captured nodes in the network. The major difference between the eclipse and
Sybil attack is that the eclipse attack only targets the specific node. In
contrast, the Sybil attack captures and takes control of all network nodes at
once. If the attacker successfully launches the eclipse attack, he can govern
his own rules in the network. Several possible solutions can resist the
eclipse attack by applying the following methodologies, such as using the
private network, a random selection of miners, static IP address and limiting
the number of incoming/outgoing connections [331, 332].

####  7.2.5 Sybil Attack

Sybil attack refers to the most important issue of the P2P network. An
adversary exploits the performance of the network by creating multiple fake
identities of the same user. Similarly, a malicious node in the Blockchain can
cover a large portion of the network by creating multiple fake profiles of the
same node. In this scenario, the honest nodes in the same network cannot
detect fraudulent behaviour and seem to receive the transactions from other
honest nodes in the network. This malicious behaviour of the network nodes
infers that the attacker aims to control the overall Blockchain network. There
are many solutions available to reduce the risk of Sybil attack in Blockchain-
based applications such as eHealth [137],smart vehicles [324], trusted
computing [57] and online digital platforms [333]. However, one simple
technique that can restrict the access of a malicious user is to apply some
identity-based mechanisms in the systems. Moreover, consensus algorithms, such
as PoW, are also used in many cryptocurrencies to protect the Sybil attack.
Each node requires solving the expensive puzzle problem to participate in the
mining process.

####  7.2.6 BGP Hijacking Attack

In a BGP (Border Gateway Protocol) hijacking attack, the adversary takes
advantage of a vulnerability found in network operators to intercept and
manipulate the network traffic routing through gateways [334]. In Blockchain
systems, the BGP attack controls miners’ mining power (or mining pool server)
by splitting them into different groups to cause the propagation delay of
blocks in the network. Thus, all traffic from the Blockchain nodes is directed
towards the malicious server to gain others’ bitcoins. The common strategy
used to tackle the BGP hijacking is the BGPsec protocol that prevents the
malicious traffic from gaining access to the system [335]. Moreover,
monitoring and verifying network traffic after some intervals can also be a
useful solution.

####  7.2.7 Phishing Attack

A phishing attack is a type of social engineering activity that is often used
to obtain financial benefits by stealing user personal information, login
credentials and banking information such as credit card numbers. This attack
is typically carried out when an attacker attempts to pose a trustworthy party
and persuades a victim to act in various ways, such as opening an email or
responding to a text message.

The most successful way to prevent phishing attacks on the system is to
install anti-spyware software and periodically upgrade firewall settings.
Furthermore, firewall security can prevent unauthorised file access by
blocking malicious attempts [336].

####  7.2.8 Liveness Attack

This attack happens in Bitcoin and Ethereum applications, when the attacker
can hold the broadcasted transactions longer than their confirmation time, in
order to cause a delay in the network. As a result, an attacker can build a
single chain consisting of transactions that are not transferred to honest
miners on the network. The size of the private chain is longer than the public
chain maintained by honest nodes in the network [337]. The round-trip time
(RTT) is used to solve the liveness attacks in Blockchain-based applications
in order to overcome this problem.

####  7.2.9 Routing Attack

In a routing attack, an attacker compromises and intercepts the network
channel to perform malicious modifications to the data packets. An attacker in
a routing attack aims to temper with the data values inside the packet before
transmitting to other nodes in the network. The adversary in the routing
attack routes the data traffic towards the malicious server by changing the
packet header’s destination addresses. This attack is a common attack on
client-server-based applications, and especially on those applications based
on a P2P network. As Blockchain technology follows the idea of a P2P network,
the attacker can change the destination address of broadcasted transactions to
get the maximum reward from the system [338, 339, 340]. In the Blockchain, the
standard solution used to detect the routing attack is simply discarding those
updates that do not match the other received updates. Moreover, the network
parameters, such as round-trip time (RTT) and irregular patterns, can also
help users identify and detect the routing attacks in the network.

####  7.2.10 Man-in-the-Middle (MITM) Attack

This is one of the common vulnerabilities found in network systems in which
the attacker plays the role of a middleman to bypass the network traffic to
obtain users’ personal information or secrets. Once the attacker successfully
captures the communication channel’s data, he can use this data in further
malevolent activities. The MITM attack also takes advantage of vulnerabilities
found in key-agreement protocols and storage systems to retrieve the secret
keys from them. In Blockchain-based cryptocurrency systems, the attacker uses
the MITM attack to steal money from the victim’s wallet by changing the
destination address with their fake wallet address. The most significant way
to overcome the MITM attack is using an advanced authentication mechanism
which does not allow the adversary to enter into the system.

###  7.3 Consensus Layer

The consensus layer is regarded as the foundation layer of the layered
architecture of Blockchain. Further, it contains numerous consensus algorithms
essential to the operation of all Blockchain networks; for example, they allow
Blockchain nodes to agree on the validity of newly generated data blocks. The
security of the Blockchain is based on the participation of each node in the
network. The security of Bitcoin, for example, is dependent on the high hash
power of the nodes that participated in the PoW. There are several distinct
consensus protocols, for example, PoW, PoS, PBFT and DPoS. The attacks on
consensus layers are described below, including the double-spending attack and
the stake bleeding attack.

####  7.3.1 Double Spending Attack

In Blockchain-based cryptocurrencies, especially in Bitcoin, an attacker with
some bitcoins tries to collude with the network by sending a transaction of
already consumed bitcoins to others, with the intention of a newly generated
transaction. In this case, the attacker can use and spend the double bitcoins
to collude with someone in the network. This type of vulnerability is only
found in digital cryptocurrencies due to the limitation of miners’ abilities
during the verification process. Therefore, recently proposed cryptocurrencies
and different Blockchain systems [65, 140, 142] are trying to overcome the
double-spending attack by using the latest consensus protocols and
cryptography mechanisms, such as digital signatures.

####  7.3.2 Stake Bleeding Attack

As the name implies, a stake-bleeding attack is a type of attack against the
PoS consensus mechanism. The attacker used transaction fees and processed
transactions out of context in this attack, enabling attackers to track the
newly added block to the Blockchain. Stake-bleeding attacks on Blockchain
networks grew in probability as the number of legitimate transactions and
adversarial shares increased.

To address this problem in Blockchain networks, Gazi et al.[341] suggested a
protocol focused on perspective transactions for validating low-growth chains
in order to avoid stake-bleeding attacks.

###  7.4 Incentive Layer

The incentive layer in the Blockchain architecture is intended to provide
rewards to nodes for participating in the mining process in order to ensure
security and verification of blocks added to the Blockchain. The security of
the Blockchain is determined by a few factors such as the number of miner
nodes, the consensus protocol and the mining method. This layer, however, is
vulnerable to the following attacks, as described below: selfish mining
attack, bribery attack, refund attack, block withholding attack and balance
attack.

####  7.4.1 Selfish Mining Attack

In a selfish mining attack, an adversary acting as a miner shows selfish
behaviour by holding the confirmed blocks, without broadcasting to the other
miners in the pool network. More than one miner is involved in selfish mining
behaviour in order to govern their own rules and policies. In this way, the
selfish miners collecting the validated blocks can demonstrate and claim more
reward against their PoW (hashing power) than other honest miners in the
mining pool. Recently, one solution was proposed to tackle the selfish mining
attack when a fair mining mechanism is adapted to determine the scale and
height of the block. It also allows the network to block the selfish miners in
the event of a discrepancy in the blocks [342].

####  7.4.2 Bribery Attack

In a bribery attack, the attackers attempt to obtain a temporary majority of
miners to increase mining ability on the network. This attack is made by
renting it from the nominal owners and mining on the fork that does not
require this transaction. Consequently, the attackers may execute a
transaction first and the supplier will then await transaction confirmation.
Attackers used various methods to bribe miners and increase mining power,
including direct payment, fraudulent mining pools and inside payout via
tokens.

An efficient strategy to alleviate this problem is using the PoW consensus
mechanism as attackers have to pay considerable costs to discredit the miner
[343].

####  7.4.3 Refund Attack

In a refund attack, the attacker aims to refund the transactions (or payments)
made to illegal users by honest users and then fairly deny them to participate
in the refund transaction phase. In such an attack, the intruder impersonates
unauthorised traders in order to exploit the entire network by rejecting all
sent transactions.

McCorry et al. [344] suggest an effective solution to this problem in which
users are asked to include payment request message along with a few verifiable
pieces of evidence such as a delivery address, which reduces the attacker’s
incentive for profitable attacks.

####  7.4.4 Block Withholding Attack

A block withholding attack is a form of resource squandering attack in which
miners violate the mining rules by disguising the hash of the puzzle rather
than returning it to the mining pool for a greater self-reward. In a real-
world example, as miners engage in mining activities through a mining pool,
all miners share the reward for successfully solving the computing puzzle
based on their computing power quota. However, block withholding attacks waste
computing resources and reduces the overall mining pool’s income, as only
malicious miners profit from this attack and collect additional rewards.

A wide range of solutions to this problem have been suggested, including
silent time stamps [345], zero determinant methods [346], contribution of
smaller pools [347] and a game model based on the consensus protocol and Nash
equilibrium [348].

####  7.4.5 Balance Attack

As the name suggests, a balance attack is an attack on some consensus
mechanism to increase the balance by using some unfair means. Balance Attack
is a special type of attack on a PoW-based consensus protocol. An attacker
with low balance or power attempts to delay communication between those
subgroups of miners who have the same hashing power (or balance) [349]. In
this way, the attacker captures some of the information from their
communications and allows for other types of attacks, such as double-spending.
This type of attack is most common in Bitcoin and Ethereum-based applications
that have coins and ethers to spend. Generally speaking, this problem is
resolved by limiting the number of more balanced miners in the network.

###  7.5 Smart Contract Layer

The contract layer is the fifth layer of the Blockchain network and comprises
three major components: the smart contract itself, scripting code and an
algorithm or logic. These three elements represent the key logic and
conditions in the executed contract. These logics are generally written in
Solidity, a programming language. The smart contract layer attacks are as
follows: integer overflow attack, re-entrancy attack and short address attack,
all of which are described further below.

####  7.5.1 Integer Overflow Attack

Integer overflow is a common security vulnerability in many applications,
especially ethereum smart contracts on the Blockchain, which occurred
primarily due to a lack of code validations. Smart contracts are a series of
programme codes in which unique numbers determine the upper and lower limits
of an integer. When the value executed reaches their prescribed limits, an
integer overflow problem occurs, causing the machine to halt for specific
errors.

A few solutions have been suggested to mitigate the risk of integer overflow
attack in smart contracts; however, most of them focus on careful analysis,
rewriting, verification of codes writing [350, 142].

####  7.5.2 Re-Entrancy Attack

Reentrancy attacks are normally triggered by those functions that are not
meant to be re-entered by developers. In this attack, attackers can create
malicious contracts that call these functions reentrantly with the intent of
stealing Ether from an honest user’s account, causing the user to lose his
credentials and all Ethers. An example of this type of attack is the DAO
attack on smart contracts, which occurred in 2016 and resulted in the loss of
60 million Ether.

Many solutions have been suggested to overcome the re-entrancy attack on smart
contracts. For example, one approach called Sereum [351] is proposed to solve
the re-entrance attack, allowing for dynamic taint tracking of smart contract
data flows. ReGuard [352] is an automatic detection system that conducts
fuzzing tests in order to fix the issue of re-entry attacks.

####  7.5.3 Short Address Attack

A short address attack is actually a bug in developer-side code that causes
users to enter a short address instead of the full address. For example, if a
user uses the transfer method to withdraw coins and is needed to enter a short
address. If the size of the address entered by the user is not checked due to
a lack of validation measures, a short address attack may occur.

A solution to this problem is suggested by a technique called SmartScopy
[353]—automatically synthesising adversarial contracts to achieve smart
contract stability.

###  7.6 Application Layer

The application layer is responsible for the execution of applications used by
end-users to communicate with the Blockchain network. Application layer
security refers to the protection of this layer and the users who communicate
with it. Since this layer is a combination of different Blockchain components
and third-party technologies to develop an application, it is vulnerable to a
wide range of attacks, including location cheating attack, ballot stuffing
attack, badmouthing attack, guess attack, chosen ciphertext attack,
impersonation attack, linking attack and collusion attack. These attacks are
detailed below.

####  7.6.1 Location Cheating Attack

A location cheating attack is a common attack on most vehicular networks when
both passengers and drivers are involved in the location cheating activities
by sending false locations to a central authority called a road-side unit
(RSU). In the case of passengers, an adversary launches the location cheating
attack by sending a false and long-distance location to an RSU to pick up the
passengers from some point. On the other hand, the driver can also be involved
in the location cheating attack by spoofing the identity of an RSU to cheat
passengers. To rectify the issue of location cheating in vehicular networks,
[233] proposed a robust and secure Blockchain-based method to calculate
drivers’ and passengers’ authenticity.

####  7.6.2 Ballot Stuffing Attack

Ballot stuffing (or ballot-box stuffing) is an attack on the electronic voting
system. An adversary tries to carry out this illegal activity by casting
several votes (ballots) favouring a target. This fraudulent behaviour triggers
the system’s breach of integrity to increase the number of votes for one
candidate, thus reducing another candidate’s credibility. In this case, the
attacker may be able to exploit the system’s vulnerability by taking control
of the overall election process. One way to overcome this problem is to use
digital signatures in the voting process to validate voters’ and candidates’
authenticity. In addition, there are a variety of Blockchain-based e-voting
applications designed to detect ballot stuffing attacks in the systems [295,
354, 355].

####  7.6.3 Badmouthing Attack

A badmouthing attack is a widespread attack on rating or feedback systems in
which the opponent is trying to respond negatively to the target party. In
this attack, the opponent’s main objectives are twofold: (i) to degrade the
reputation of a particular user in the system by making the scale system
negative or (ii) to increase the rating of a favourable user. As a result, a
badmouth attack can significantly reduce a network’s reputation and , or
corrupt the entire system. To solve this issue, the self-organising maps
technique [356] is used to detect and prevent users’ malicious behaviour.

####  7.6.4 Guess Attack

In this attack, the attacker’s goal is to discover a specific user’s personal
information from some stored data using brute force or other matching
techniques. The guess attack can occur during the searching process, when an
attacker tries to match the randomly typed keywords with the stored
information. If the attacker is successful in his actions, he can easily steal
the record, that is, the private keys and personal information of any user. To
solve these issues, [138] proposed the Blockchain-based E-health scheme in
which cryptography primitives, such as encryption and hashing, are employed to
protect the personal information of both patients and doctors.

####  7.6.5 Chosen Ciphertext Attack

The chosen ciphertext attack aims to obtain the target user’s private key by
analysing the different chosen ciphertexts obtained from the communication
channel [357]. In this attack, an adversary uses some packet sniffing tools to
access the network’s ciphertexts and attempts to retrieve the secret keys for
decryption. This problem can overcome by using advanced cryptography methods,
such as order-preserving encryption and ECDSA in different systems, to
transform the secret key to others [248].

####  7.6.6 Impersonation Attack

This is an illegal attempt against an individual or a group to retrieve
personal information from databases. In this attack, the attacker first
creates a fake profile of the legitimate user in the network and then uses
some social engineering methods, such as email and links, to reach a targeted
system. In Blockchain systems, the miners involved in the consensus process
gain some incentives to reward their computations. Thus, the attacker uses
some common techniques to access miner’s systems to maximise profit. To reduce
the chances of impersonation attacks on Blockchain systems, that is transport
and crowdsensing applications, [298, 279, 31] proposed the security mechanism
that prevents the miners from impersonation attack and only validates those
miners who have the valid attributes to log in to the system.

####  7.6.7 Linking Attack

In a linking attack, the adversary’s goal is to create the link between the
external data and stored data by using some de-anonymisation techniques to
expose the personal information of users. The linking attack is a severe type
of attack that is applied over many Blockchain systems such as Bitcoin [234],
online digital platforms [333], IoT and vehicular networks [11], in order to
extract the secret data from stored transactions. This problem has been widely
discussed and several approaches have been proposed to resolve a link attack
but the most accurate approach is to create a new key pair each time so as to
encrypt the data.

####  7.6.8 Collusion Attack

In a collusion attack, the adversary aims to retrieve users’ secrets by
combining several different copies of data obtained from the network. For this
purpose, the attacker examines the network traffic using some packet sniffing
tools to obtain data packets containing users’ personal information. The same
issue could occur in the Blockchain network if multiple miners try to collude
with the network to get the maximum reward for their mining activities. To
address collusion activity that occurred in Blockchain-based eHealth and
eCommerce applications, [295, 246] utilise pseudo-random methods in which the
random seed is shared between two users in such a way that it can resist N-1
other fake users in the system.

###  7.7 Analysis and Discussion on Attacks

((a)) Percentages of Blockchain Layers Impacted by Attacks ((b)) Percentages
of Security Breaches Cause of Attacks ((c)) Percentages of Industrial
Applications Impacted by Attacks ((d)) Percentages of Security Solutions Used
to Mitigate Attacks

Figure 15: A Graphical Representations of Performed Analysis of Security and
Privacy Attacks in terms of Layers, Security Breaches, Applications and
Security Solutions

We provide an in-depth analysis of the security and privacy attacks covered in
this survey paper. For analysis, we compared the attacks with the various
parameters listed in the table, such as layers, security breaches,
applications and solutions. Figure 15 shows various graphical representations
of security and privacy attacks in percentages, with several parameters such
as layers, security breaches, impacted applications and security solutions.

Fig. 15(a) shows the percentage of each Blockchain layer affected by security
and privacy attacks included in the paper. The Blockchain layers are the
network layer, data layer, consensus layer, incentive layer, smart contract
layer and application layer. Overall, it is clear that the network layer of
Blockchain architecture is the target of a large number of attacks, accounting
for 26% of all attacks. It is also worth noting that the application layer and
the incentive layer are the most affected layers by these attacks, with just a
2% gap between the two. Attacks on these layers account for 21% and 19% of all
attacks, respectively. In comparison, the data layer is impacted by these
attacks by 17%, while the smart contract layer is only impacted by 12%.
Finally, only a small percentage of attacks are countered at the consensus
layer, approximately 5%.

Figure 15(b) depicts the percentage of different security breaches that cause
the security and privacy attacks discussed in our paper. In our work, we
mainly considered three types of security breaches: breach of confidentiality,
breach of integrity and breach of availability. Additionally, attacks may
occur as a result of a combination of those security breaches. Overall, it is
clear that a significant proportion of attacks on various Blockchain and
industrial applications are the result of a breach of integrity, which is
regarded as the primary security breach in this analysis part. Furthermore, it
is worth noting that nearly half of all attacks for breach of integrity result
from a combination of these security breaches. A combination of security
breaches may come in the form of a breach of confidentiality and a breach of
integrity, or a breach of confidentiality and a breach of availability. On the
other side, there is just a 6% difference between the remaining two breaches
(breach of confidentiality and breach of integrity).

Fig. 15(c) illustrates the percentage of various industrial applications
susceptible to security and privacy attacks explored in our work. Financial
services, health industry, energy industry, transport and logistics and
technology industry are among the industrial applications covered by our
research. At first glance, it appears that financial services are the most
affected application by these security attacks. The primary goal of the
attacker is to obtain financial benefits in the form of Bitcoins, Ether and
other related cryptocurrencies. The percentage of financial applications
affected is 29%, which is less than a third of the overall percentages.
However, it is clear that the technology industry is also affected by these
attacks, with just a 5% difference from the financial industry. Furthermore,
the vehicle industry and transport and logistics have been exposed to these
attacks, with just a 3% gap between the two. Finally, the same comparison
applied to the other two industrial applications, such as the energy industry
and the health industry, with just a 2% disparity between the two.

Fig. 15(d) represents the percentages of various types of security solutions
used to mitigate security and privacy threats on Blockchain-based Industry 4.0
applications. These solutions are classified as cryptographic methods, address
mixing, anonymization, artificial intelligence and a few others. Overall, it
is clear that the most effective solution for securing industrial applications
from attacks is the use of various cryptographic techniques such as
encryption, hashes, digital signatures, which accounts for nearly two-fifths
of all other security solutions. By leading this, nearly a third used a
combination of security solutions such as bilinear maps, three weight models,
time ranks and consensus mechanisms to minimise the risks of attacks on
Blockchain-based applications. Anonymization techniques, which account for 16%
of the total, also play an important role in securing those applications from
attacks. Address mixing and artificial intelligence-based solutions are also
used to solve security issues, but these are in the minority.

##  8 Open Issues

Despite the fact that potential Blockchain features offer enormous benefits to
industry users, some issues must be addressed in order to broaden the scope of
industry and business applications. In this section, we highlight open issues
that arise from integrating Blockchain technology into industrial
applications, limiting its applicability to Blockchain technology adoption at
a broader industry level. The open issues of Blockchain adoption in Industry
4.0-based applications are summarised in Fig. 16.

###  8.1 Interoperability and Governance

As the scope of Industry 4.0 is not limited to some applications, it includes
a wide range of applications and businesses, in order to interact and share
valuable data or assets with others. To achieve this interaction between
different industrial applications, interoperability is defined as a network
infrastructure or capacity that enables the industry partner to exchange
information over the network. Similarly, Blockchain interoperability allows
different Blockchain systems to interact by sending messages and sharing
trusted values with others [358]. However, the issues arising during the
interoperability of Blockchain systems are the security of the exchanged data
and the appropriate industry guidelines for the regulation and control of
applications [157]. Thus, there is a need to design a mechanism that can
ensure interaction between different Blockchain platforms and define the
appropriate rules and regulations, in line with industry principles and
guidelines [168].

###  8.2 Legal and Compliance Issues

Some of the significant obstacles to the deployment of Blockchain technology
in the industrial context is using a different standard, agreement laws and
some uncertainty around government regulatory bodies, which prevents this
technology from being deployed in larger industrial domains. For example,
stakeholders in the manufacturing industry use Blockchain tools to ensure that
their internal processes and goods adhere to legal and regulatory frameworks
[359]. According to commercial law, there must be specific contracts between
industry users and government regulations relating to negotiation, execution,
administration and Blockchain management. Furthermore, liability must be
acknowledged if a contract were miscoded and is not carried out as intended
[360].

Another crucial problem between the parties’ legal and compliance arrangements
is to adhere to substantive law, effective governance, jurisdiction and
settlement, as well as ensuring the privacy of both consumers and the product.
Additionally, the sharing of manufacturing data across various platforms can
pose challenges for manufacturers and their products. Therefore, when
developing industry platforms, it is imperative to protect both the users’
privacy and their data [361]. In regard to the public interest, when making
new laws, rules, creating guidelines and applying laws in the industries,
governments should hold to account a specific government obligation. One way
to achieve this aim is to use a private Blockchain to stop illicit activities
such as money laundering or bypassing regulations. Additionally, there should
be some mechanism to prevent new blocks from being produced by fake miners.

Figure 16: Open Issues of Blockchain Adoption in Industry 4.0-based
Applications

###  8.3 Scalability

Blockchain technology has been proven to be better due to its adherent
features, such as decentralisation, in reforming current centralised systems.
It provides a dynamic environment for P2P network nodes to mine blocks over a
specified time and frequently updates transactions to other network nodes. For
example, Bitcoin and Ethereum Blockchain systems have both their capabilities
and their limitations in handling users and transactions. However, the issues
of scalability in existing Blockchain technology discourage broad adoption and
implementation. One such example is that VISA [362] can process about 2,000
transactions per second, while Bitcoin [2] can process just seven transactions
per second. With the increased adoption and applicability of Blockchain
technology in Industry 4.0, the length of a particular system increases, and
thousands of nodes are needed to join the network for block creation and
mining. Thus, the scalability of Blockchain is questioned; this is a
significant challenge for network security systems and their related
applications [363, 364].

###  8.4 Storage Capacity

Storage capacity has been questioned in many Blockchain-based applications as
part of the storage constraint for storing data on a secure distributed
ledger. As in Bitcoin, the chain is increasing by one megabyte every 10
minutes and each node in the network has a copy of the full chain. A full node
can store the entire blocks but total storage requirements expand
exponentially with transaction size, thereby growing the entire system’s
capacity. Since the amount of manufacturing data in an industrial setup is
enormous, incorporating Blockchain technology with many industrial processes
is a difficult problem [365]. Furthermore, the underlying Blockchain protocols
cause significant traffic congestion in the system, increasing the system’s
need for overall Blockchain storage space [366]. A further problem with
oversized chains is that they put unnecessary synchronisation overload on new
users. For example, in the industrial IoT context, with the growing number of
sensors and produced data, the problem is greatly amplified [367]. Even though
Ethereum-inspired frameworks have recently been developed, resource
constrained IoT solutions are still in their infancy and are perhaps incapable
of supporting more industrial applications at this time [368].

###  8.5 Performance Overhead

Most industrial applications, such as IoT, SG, eHealth, and so on, are simple
in nature and have minimal computing, storage and energy capabilities. With
the integration of Blockchain with those applications, the most challenging
problems arise in node computation limitations [369]. They require significant
computation to mine blocks and perform extensive cryptography operations,
including hashing, encryption/decryption and digital signatures. Many
solutions have been proposed that distinguish mining nodes and simple nodes as
full nodes and simple nodes in Blockchain-based IoT applications, respectively
[370]. Another performance issue arising in industrial applications is
communication overhead, in which each mining node is responsible for
performing multiple functions, such as mining and updating Blockchain, along
with sending updated blocks to other peer nodes over the network [371]. This
issue creates an extra network overhead that affects the overall bandwidth and
performance of the network. Thus, computation and communication overheads in
Blockchain-based Industry 4.0 applications create barriers to their adoption
at a wider industry level [372].

###  8.6 Device Standards and Protocols

The key part of any industrial setup is the use of various heterogeneous IoT
devices that are involved in continuous monitoring and controlling of the
environment in order to undertake some future measures. However, device
standards and protocols have become another barrier for IoT and Industry 4.0,
in which a vast range of smart devices are deployed. Integrating them is
expensive and challenging since they all record data in different formats and
use different protocols [373]. Manufacturing companies such as Bosch and the
Eclipse Foundation aim to create more common data formats and communication
protocols for data sharing, such as MQTT [374]. The main objective is to
assist smart devices in providing popular data formats that enable them to
interact seamlessly with one another; however, more data formats mean more
complexity in developing a single data model [375].

###  8.7 Cost-Effectiveness and Energy Sustainable Consensus Mechanisms

Consensus algorithms such as POW and POS are considered very energy-intensive,
as they tend to use more energy and computational resources [376, 377]. As the
Blockchain’s size grows over time, more successful miners, as well as some
energy-efficient consensus protocols, such as DPoS [378] and Proof of Trust
(PoT) [379], have been proposed recently to execute this process in cost-
effective ways. The key advantage of using these protocols is that they can
only store the most recent transaction data on the Blockchain. However, since
energy and resource-scarce industrial IoT devices are surrounded by enormous
amounts of data, more efficient consensus algorithms are required [380].

###  8.8 Infrastructure / Implementation Cost

Blockchain technology generally requires specialised infrastructure, such as
additional storage and computationally intensive hardware resources to store
the Blockchain. Blockchain storage is built on Distributed Ledger Technology
(DLT) and serves as a shared database of knowledge regarding transactions
between various parties. The DLT must be able to store an increasing number of
blocks indefinitely and immutably. According to one estimation, between April
2019 and March 2021, Bitcoin is seen a growth rate of 340GB; however, this
growth varies with the discovery rate of new blocks [381]. Furthermore, as the
number and size of Bitcoin miners have grown dramatically, mining the blocks
requires more sophisticated hardware and computational power [382].

As a result, using Bitcoin’s infrastructure cost as an example, one must
consider various cost scenarios when implementing Blockchain technology in
industrial settings. These scenarios can include: (i) the cost of implementing
and deploying the Blockchain setup, (ii) the cost of replacing the current
industry infrastructure, (iii) the cost of training employees to be familiar
with Blockchain technology, and (iv) the cost of energy running resources as a
backup [3].

###  8.9 Privacy and Trust

One of the most appealing features and benefits of Blockchain technology is to
achieve anonymity of user identity and transactions, using pseudo-anonymity
methods [18]. However, the selection of public Blockchain type and the use of
different pseudo-anonymous techniques in Blockchain applications may connect
the identity of users to transactions such as public keys, thus increasing the
chances of disclosing personal information to others [383]. Therefore, there
is a substantial need to implement pseudo-anonymity methods that must be fully
anonymous and must achieve a higher level of privacy and trust among
Blockchain users [384].

###  8.10 Attack Surface

With an increasing number of industrial applications that have adopted
Blockchain technology, many attack surfaces have been targeted. These attacks
take advantage of various methods and vulnerabilities found in applications to
get into the environment and they have made some malicious changes to user
data [385]. For example, the Bitcoin Double Spending Attack comes in various
ways that sometimes combine with other attacks, such as a Sybil attack, to
obtain details of user wallets, balance and private keys [386]. In addition,
the vulnerabilities identified in the smart contract code and, in some cases,
open source applications, have made Blockchain systems more vulnerable to
other malicious users [387]. Therefore, carefully designed Blockchain
applications with proper guidelines and secure cryptography mechanisms across
different layers can minimise the chances of attacks [86].

##  9 Conclusion and Future Work

The integration of Blockchain technology with various industrial applications
such as IoT, finance, SG, eHealth, transport and logistics and the cloud is
growing at a rapid pace, and it has changed human lives in a beneficial way.
However, the integration of Blockchain into existing applications has
increased many security and privacy challenges for the users and their data.
Considering the design of secure Blockchain-based Industry 4.0 applications,
we present a detailed study achieving a significant number of contributions
regarding security and privacy for Blockchain-based Industry 4.0 applications.
Firstly, we provide an overview of Blockchain features and properties that map
and initiate the design requirements for secure Blockchain applications.
Secondly, we categorise the design phase of such applications into different
design, security and privacy requirements. Thirdly, we extend our survey with
various types of security and privacy attacks on Blockchain applications,
along with the categories of attacks, the attacker’s objectives, exploited
vulnerabilities and targeted applications. Furthermore, we provide an in-depth
review of Blockchain-based Industry 4.0 applications in terms of defined
requirements. Then we explore different security and privacy enhancement
solutions used to achieve security and privacy requirements in Blockchain-
based Industry 4.0 applications. Finally, we discuss open design issues which
provide the fuel to researchers and developers for the advancement of secure
applications.

In the latter part of the work, we present several future recommendations for
design and security requirements, as well as open issues, providing the
directions to both researchers and developers for designing secure, scalable,
efficient and flexible Blockchain-based applications. Currently, most of the
existing Blockchain-based schemes designed for applications are lacking in the
achievement of the following requirements: scalability, interoperability,
usability, flexibility, modularity and transparency. Scalability is the most
critical requirement among all others for designing the Blockchain
applications, especially in the industrial domain, in which systems perform
poorly with the increasing number of users and their real-time transactions.
However, many systems (such as Ethereum [61] and Hyperledger [71]) are subject
to their restrictions regarding mining and validating transactions that
influence the system’s scalability. Therefore, researchers and developers need
to address the scalability challenge during the development of Blockchain
applications. Another design requirement issue found in the Blockchain
applications is the linking gap between the system internal modules, which is
also referred to as an interoperability issue. In practice, industrial
processes are dependent on each other and linked together to obtain recent
updates about the system activities. Moreover, the interoperability of system
components also helps the administrator to take instant security actions
against malicious activities occurring in the system. Thus, the
interoperability challenge needs to be addressed in the design course of
secure Blockchain applications.

Blockchain consists of many supporting and underlying features which provide
ease of use for the completion of multiple tasks. However, not all ordinary
users understand the technical detail and working of Blockchain technology.
Thus, it stops them from adopting the Blockchain applications in different
businesses and industries. As a result, a Blockchain model must endorse
usability and flexibility requirements, while building the Industry 4.0
applications and business domains. Moving forward to the modularity design
requirement, developers need to write the application code that achieves
greater applicability among different Blockchain applications, and it should
support the wide variety of services that offer network resources efficiently.
As Blockchain applications are gaining popularity within the community, it
becomes essential for researchers and developers to provide a secure
environment in which users can share resources efficiently and communicate
transparently with each other.

## Declarations of Interest

The authors declare that they have no known competing financial interests or
personal relationships that could have appeared to influence the work reported
in this paper.

## References

  * [1] B. Oberer, A. Erkollar, Leadership 4.0: Digital leaders in the age of industry 4.0, International Journal of Organizational Leadership (2018).
  * [2] T. Alladi, V. Chamola, R. M. Parizi, K.-K. R. Choo, Blockchain applications for industry 4.0 and industrial iot: A review, IEEE Access 7 (2019) 176935–176951.
  * [3] J. Lee, M. Azamfar, J. Singh, A blockchain enabled cyber-physical system architecture for industry 4.0 manufacturing systems, Manufacturing Letters 20 (2019) 34–39.
  * [4] U. Bodkhe, S. Tanwar, K. Parekh, P. Khanpara, S. Tyagi, N. Kumar, M. Alazab, Blockchain for industry 4.0: A comprehensive review, IEEE Access 8 (2020) 79764–79800.
  * [5] N. Mohamed, J. Al-Jaroodi, Applying blockchain in industry 4.0 applications, in: 2019 IEEE 9th Annual Computing and Communication Workshop and Conference (CCWC), IEEE, 2019, pp. 0852–0858.
  * [6] M. Swan, Blockchain: Blueprint for a new economy, ” O’Reilly Media, Inc.”, 2015\.
  * [7] S. Wang, J. Wan, D. Li, C. Zhang, Implementing smart factory of industrie 4.0: An outlook, International Journal of Distributed Sensor Networks 12 (1) (2016) 3159805.  doi:10.1155/2016/3159805.
URL https://doi.org/10.1155/2016/3159805

  * [8] Y. Guo, C. Liang, Blockchain application and outlook in the banking industry, Financial Innovation 2 (1) (2016) 24.
  * [9] K. Fanning, D. P. Centers, Blockchain and its coming impact on financial services, Journal of Corporate Accounting & Finance 27 (5) (2016) 53–57.
  * [10] E. Mengelkamp, B. Notheisen, C. Beer, D. Dauer, C. Weinhardt, A blockchain-based smart grid: towards sustainable local energy markets, Computer Science-Research and Development 33 (1-2) (2018) 207–214.
  * [11] A. Dorri, M. Steger, S. S. Kanhere, R. Jurdak, Blockchain: A distributed solution to automotive security and privacy, IEEE Communications Magazine 55 (12) (2017) 119–125.
  * [12] M. Mettler, Blockchain technology in healthcare: The revolution starts here, in: 2016 IEEE 18th International Conference on e-Health Networking, Applications and Services (Healthcom), IEEE, 2016, pp. 1–3.
  * [13] Y. Cai, D. Zhu, Fraud detections for online businesses: a perspective from blockchain technology, Financial Innovation 2 (1) (2016) 20.
  * [14] D. Yang, J. Gavigan, Z. Wilcox-O’Hearn, Survey of confidentiality and privacy preserving technologies for blockchains, R3, Zcash Company, Res. Rep (2016).