Next Article in Journal
Path Loss Prediction in Tropical Regions using Machine Learning Techniques: A Case Study
Previous Article in Journal
Exploring the Ability to Classify Visual Perception and Visual Imagery EEG Data: Toward an Intuitive BCI System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Blockchain-Based and SGX-Enabled Access Control Framework for IoT

1
College of Electronic Science and Technology, National University of Defense Technology, Changsha 410073, China
2
Unit 31438, Shenyang 110000, China
3
Department of Electronic and Optical Engineering, University of Aerospace Engineering, Beijing 101416, China
*
Authors to whom correspondence should be addressed.
Electronics 2022, 11(17), 2710; https://doi.org/10.3390/electronics11172710
Submission received: 1 August 2022 / Revised: 24 August 2022 / Accepted: 25 August 2022 / Published: 29 August 2022
(This article belongs to the Section Computer Science & Engineering)

Abstract

:
With the rapid development of physical networks, tens of billions of Internet of Things (IoT) devices have been deployed worldwide. Access control is essential in the IoT system, which manages user access to vital IoT data. However, access control for the IoT is mainly based on centralized trusted servers, which face problems such as a single point of failure and data leakage. To tackle these challenges, we propose an access control framework for the IoT by combining blockchain and Intel software guard extension (SGX) technology. A blockchain validates both IoT devices and edge servers added to the network. The access control contract is deployed on the blockchain, which can manage attribute-based access control policies in a fine-grained manner and make access control decisions flexibly. SGX technology is introduced into the edge computing server to realize the confidentiality of data processing. Finally, we implemented the prototype of the framework on Quorum and conducted extensive experiments and theoretical analyses on the performance of the blockchain. The results of the experimental tests and theoretical analyses show that our framework has more advantages in computing costs and on-chain storage costs.

1. Introduction

With the rapid development of modern information technology, the Internet of Things (IoT) technology has brought significant digital changes to all levels of society. It is profoundly changing the traditional industrial form and human production and lifestyle. The Internet of Things is widely used in sensor networks, healthcare systems, smart cities, transportation, smart industries, communication systems, and manufacturing [1]. Statista [2] states that the number of Internet of Things connected devices worldwide will be 19.1 billion by 2025. Additionally, forecasts suggest that by 2030 approximately 29.4 billion of these IoT devices will be in use worldwide, creating a massive web of interconnected devices spanning everything from smartphones to kitchen appliances. IoT significant data statistics [3] show that, with increased adoption, devices will generate exponentially more data globally in the following years. The numbers will reach 73.1 ZB by 2025, which equals 422% of the 2019 output when 17.3 ZB of data was produced. The increase in IoT devices will inevitably generate user data.
Such colossal data computing overhead is unacceptable for computing-resource constrained IoT devices. Suppose users access many IoT devices simultaneously in a short time. In that case, a large amount of data will be uploaded to the cloud data center server, inevitably leading to network delay. Therefore, to alleviate the pressure on data center servers, the Internet of Things architecture introduces edge computing [4] close to the data source as an extension of the cloud computing center to alleviate network and storage pressure on the cloud data center. Edge computing (EC) uses the edge zone close to the data source to provide network services and computing power closer to the client, which should improve data processing efficiency and reduce service response delay.
However, edge computing in the Internet of Things architecture will face huge data security problems. The data collected and processed by the edge server is closely related to user privacy, and the security of data is related to the immediate interests of users. The first problem is how to prevent malicious edge nodes from illegally obtaining sensitive data of users. In 2020, Amazon’s IoT devices, including the Ring doorbell and Home security camera, were exposed to hacker intrusion [5], resulting in the disclosure of dozens of people’s privacy. The attacker intercepted the username and password through the unencrypted HTTP protocol of the local user network, thus gaining access to the IoT devices. The second problem is that the security protection of edge nodes is weaker than that of cloud computing centers, which puts user data in edge nodes at risk of malicious tampering [6], which is unacceptable for data related to medical care. According to the data of Cynerio in its 2022 report [7] on the security status of Internet of Things devices in health care, 53% of hospital networked medical devices and other IoT devices have known severe vulnerabilities. In addition, one-third of the bedside healthcare IoT devices on which patients rely most for optimal health outcomes have identified severe risks. If attacked, these vulnerabilities may affect service availability, data confidentiality, or patient security with potentially life-threatening consequences for patient care.
As malicious users often abuse rules to gain unauthorized access to IoT devices, there is an urgent need for a credible IoT access control framework to prevent such behavior. The public have gradually learned about blockchain technology with the rise of non-fungible tokens (NFT) and the encrypted digital currency industry in recent years. Blockchain [8] is a distributed storage technology. A trust relationship can be established in a decentralized network environment through a peer-to-peer (P2P) network, consensus mechanism, and encryption algorithm, ensuring the integrity of data on the chain and providing a new access control solution. Trusted computing technology, represented by intel software guard extensions (SGX) technology [9], can execute applications in an isolated environment using secure hardware. It provides a new way to solve the problem of malicious disclosure or tampering with user privacy data through untrusted edge nodes. Intel SGX technology provides hardware-level memory isolation and remote security attestation, allowing applications to open a trusted execution area, known as an enclave in memory. Malicious software, privileged software, and even the operating system on the same platform cannot be accessed without authorization, thus preventing data leakage and malicious tampering within the enclave.
To solve the issues of malicious access and tampering of private user data resources in the mentioned IoT environment, we propose an improved fine-grained access control framework for the Internet of Things based on blockchain and SGX technology, which has three main innovations:
  • The performance of the existing public blockchain cannot meet the massive terminal nodes of the Internet of Things; to solve this issue, we designed a blockchain framework of the permissioned blockchain on Quorum, based on the Ethereum protocol, to break the practical bottleneck. The framework saved the valuable storage space of the blockchain by distributing attribute signatures for clients off the chain. Specifically, it dramatically improves data-carrying capacity and transmission efficiency.
  • We have designed an attribute-based access control contract to manage the access control strategy of IoT data resources in a fine-grained manner. It can effectively complete the process of client access verification on the blockchain. At the same time, the on-chain access control policy can be updated dynamically. We use a set of attributes to describe the client’s identity and grant it access through an off-chain attribute signature distribution mechanism. Therefore, our control access framework decouples access policy on the blockchain from client identity, which is more flexible than previous work [10,11].
  • In data processing and the transmission of edge nodes, we use the Enclave security zone provided by Intel SGX as a trusted execution environment to process sensitive data. We use the remote attestation mechanism provided by Intel SGX to build a secure communication channel from the edge server to the client to ensure the credibility of data in the remote processing process and the security of the transmission process.
  • We implemented a prototype of the proposed framework on Quorum. We conducted many experiments and compared them with previous work. Finally, we demonstrated the superiority of the proposed scheme with excellent performance data.
The rest of this article is organized as follows. Section 2 introduces the related technologies of blockchain, SGX, and access control. In Section 3, we discuss the related work of predecessors. In Section 4, we first introduce the system architecture of the proposed framework and then present our scheme in detail from two aspects of the access control process and the trusted data processing process. We completed the experimental verification in Section 5 and compared it with similar work to show the superiority of our scheme. Section 6 discusses the advantages and limitations of the framework. Finally, in Section 7, we summarize the framework of this article and discuss the direction of future research.

2. Related Technologies

2.1. Quorum and Smart Contract

Satoshi Nakamoto first proposed blockchain technology in his article [8] published in 2008. It is a decentralized, distributed data ledger linked by digital blocks in chronological order. Inspired by bitcoin, Buterin put forward the concept of Ethereum [12] in 2013, which is widely known as blockchain 2.0. The most prominent feature of Ethereum is that it adds support for smart contracts. Ethereum is popular as it establishes a Turing complete platform that allows developers to write arbitrary smart contracts and decentralized applications (DApps).
Quorum [13] is a branch of the Go language implementation version of Ethereum, developed by JPMorgan Chase Company, which reuses and extends some features of Ethereum. Quorum is an enterprise blockchain platform and a permissioned chain supporting privacy transactions. It supports confidentiality and privacy of transactions as well as PBFT consensus algorithms. Quorum is suitable for application scenarios that require high-speed transactions and high throughput to handle private transactions.
In an ideal state, the smart contract can be regarded as a Turing machine, a piece of program code that can be automatically executed according to the preset rules. Smart contracts can be developed and programmed in high-level languages such as Solidity, Serpent, Vyper, etc. Smart contracts for Ethereum are often written in Solidity. The compilation, interpretation, and execution of smart contracts are completed through the 256-bit Ethereum virtual machine (EVM) [14] installed on each Ethereum node. The EVM compiles the contract into byte code and deploys it in the blockchain. A successfully deployed smart contract is treated as an account, and the contract is executed similarly to a user sending a transaction to the account. All Ethereum nodes can execute deployed smart contracts through EVM. When the trigger conditions of the contract are met, predefined code logic can be independently executed. The execution results cannot be changed in the chain after validation by other nodes.

2.2. Intel SGX

In 2013, the Intel corporation published three papers [9,15,16] on processor security in SGX technology, introducing the design framework, technical route, and security features of SGX. SGX is an extension of the Intel Architecture (IA) to enhance software security by allowing an application code to be executed in a secure operating environment called an enclave. The SGX technology has two main mechanisms: isolated execution [15] and SGX attestation [16].

2.2.1. Isolated Execution

The isolation execution mechanism of SGX technology is shown in Figure 1. An enclave is similar to a protected memory container, which stores the code, data, and important data related to the application. These contents are encrypted and stored in the memory during operation. Programs not hosted in the enclave are not allowed to access the enclave’s memory area, including privileged programs such as virtual machine monitors, BIOS, and operating systems. The operating system has an enclave page cache (EPC) [17] memory space that can hold enclave and SGX data structures.

2.2.2. SGX Attestation

SGX attestation is a process used to prove that an application has been correctly instantiated on the enclave platform. There are two ways to do this. One way is local attestation, that is, attestation between two different enclaves on the same platform; and the other is remote attestation, that is, attestation between two enclaves on various platforms.
In Figure 2, enclave B must prove its identity to other enclaves on the platform for local attestation. In this case, Enclave B requires the hardware to generate a credential, also known as a REPORT. The REPORT contains the following data: the identity of Enclave B, the attributes related to Enclave B, the reliability of the hardware trusted computing base (TCB), the additional information that the Enclave B authenticator wants to deliver to the target Enclave A, and the message authentication code (MAC) tag. When the target REPORT structure is generated, Enclave B will request the REPORT identity and will pass the report to the final target Enclave A. The target Enclave A will then verify Enclave B, and will request attestation to determine whether it is on the same platform.
The remote attestation mechanism is an extension of the local attestation mechanism, but local attestation uses symmetric keys, while remote attestation uses asymmetric keys. In remote attestation, because the key to the processor needs to be accessed during the attestation process, the quoting enclave is used. In Figure 3, supposea remote attestation process where the authenticator, Enclave C, authenticates Enclave D. First, Enclave D needs to generate the REPORT hardware credentials, and the MAC is generated using the quoting enclave (Q) reporting key. Then package the above and additional information to Q. The quoting enclave can verify whether Enclave D works on this platform through the above content. Suppose Enclave D is determined to be on the same platform as itself. In that case, Q will pack the received content into a reference structure QUOTE, sign the QUOTE, and send it to Enclave C. Enclave C first verifies the correctness of the signature. It then uses QUOTE to conduct remote attestation after verification.

2.3. Access Control

Access control [18] is a security protection technology that aims to prevent unauthorized users from accessing resources with limited operation permissions. It also prevents authorized users from performing operations that are not within the scope of authorization. System administrators use access control to control user access to network resources, such as servers, directories, and files. The basic concepts involved in access control include subject, object, and operation. A subject is a user requesting access to a resource to act. The object refers to the resources the subject requests to access, including files, applications, servers, APIs, etc. The operation refers to the action that the subject wants to perform on the object. Typical operations include read, write, execute, modify, copy, and delete.
Role-based access control (RBAC) [19] is control through access to roles. By becoming a member of the appropriate role, the subject obtains the rights of its role and associates its access rights with the role. Attribute-based access control (ABAC) [20] generates policy decisions according to subject and object attributes, operation, and environment to control the access of objects to resources. Object-based access control (OBAC), from the point of view of the managed object, directly associates the subject’s access rights with the controlled object and regulates the object’s access by defining the access control list (ACL) of the object.

3. Related Work

In recent years, because many IoT devices are connected to the internet, a large amount of data are uploaded to the data center in a short time, resulting in inevitable network delays. Edge computing provides a solution to solve the problem of high latency in the mass data transmission of Internet of Things devices. Yang et al. [21] put forward a trusted edge computing framework suitable for the power of the Internet of Things, aimed at real-time and security-functional requirements of the power of the Internet of Things system. Li et al. [22] proposed an adaptive transmission architecture for the industrial Internet of Things scenario. This architecture combined software defined networks (SDN) and edge computing (EC) technologies to design an optimal routing algorithm for data streams. Their scheme improved the network performance of data exchange between intelligent industrial devices. The limited device capacity of the Internet of Things also affects service performance. Chen et al. [23] proposed an energy-saving dynamic unloading algorithm. They combined their algorithm with mobile edge computing to reduce the energy consumed during the transmission and processing of computing tasks. The above work applies edge computing to specific IoT scenarios and puts forward optimized solutions to meet the performance requirements of processing increasing IoT device data. All of the schemes above are based on the notion that edge nodes are trusted. However, edge nodes will face attacks and threats from all sides in today’s complex and changeable network space. When edge servers are not trusted, private user data may be leaked.
Data access control is the key to ensuring the data security of the Internet of Things. Due to the data security requirements of the Internet of Things, some researchers have optimized and adjusted the traditional access control framework [24,25,26]. Xu et al. [24] proposed an access control framework suitable for lightweight and resource-limited devices for the Internet of Medical Things scenario. It combined attribute-based encryption, cloud computing, and edge computing technologies to reduce data communication overhead and network delay. Alkhresheh et al. [25] proposed an attribute-based dynamic access control framework in the IoT to improve the adaptability of access policies to the active IoT environment. However, all the above work is based on centralized authorization to realize authorized access, that is, authorization through the central server. This authorization process lacks transparency, and there are problems with user data security and a single point of failure.
In recent years, the advantages of blockchain technology, such as decentralization, immutability, transparency, and consensus, have attracted the attention of many researchers. At present, the era of blockchain 2.0 is the era of smart contract development and application, represented by Ethereum. It claims that blockchain technology can be applied to all aspects of society, from the financial field, to establishing trust relationships between individuals, and realizing data sharing without the intervention of centralized third-party organizations. As an emerging technology with great potential, blockchain technology provides a programmable application development environment for smart contracts. Most existing blockchain applications are programmed using smart contracts. Many studies have applied blockchain technology to traditional services to ensure that the service process is implemented correctly according to agreed specifications under transparent and open conditions. Mahmood et al. [27] proposed a security model that uses federated learning and supports blockchain. This model utilizes Ethereum’s incentive mechanism and the proof-of-work (PoW) consensus algorithm to promote cooperation between decentralized nodes. Han et al. [28] implemented a framework for searchable encryption on Ethereum. This framework manipulated the access control and searchable encryption process through smart contracts, significantly reducing the communication overhead. Barenji et al. [29] proposed a blockchain resource and asset sharing platform based on hyperledger fabric and edge computing. Moreover, they implemented the proof-of-delivery (PoD) mechanism based on smart contracts, which proved the feasibility of the scheme through experiments.
Therefore, in recent years, some scholars have turned to studying the decentralized access control framework in the Internet of Things. Most studies [10,11,30,31,32,33,34] combined blockchain technology with access control. Ouaddah et al. [30] proposed a decentralized authorization management framework called FairAccess, which introduced the token concept. They specified the output address of the transaction and stored the access rights on the blockchain in the form of a bitcoin script. However, Bitcoin’s PoW consensus algorithm will lead to highly inefficient transaction throughput, which does not apply to the IoT system. Ding et al. [31], Alansari et al. [32], and Damiano et al. [33] combined blockchain with attribute-based access control technology (ABAC). Moreover, they used blockchain to record attribute information but did not consider the diversity of resources in the IoT. Li et al. [34] proposed a double-layer blockchain IoT access control framework on Ethereum and Fisco. They used the linear secret sharing scheme to achieve a fine-grained access strategy. Still, the increase in the number of attributes will lead to a large amount of gas overhead on the blockchain. Therefore, the scalability of the framework proposed by this study will be severely limited. Zhang et al. [10] designed an ACL-based access control framework for the IoT based on the smart contract of Ethereum, in which each subject and object are assigned corresponding ACLs to achieve access control. However, in large-scale IoT, the storage overhead on the chain will increase linearly with the number of clients, and the scalability will be greatly limited. Yutaka et al. [11] designed ABAC’s access control framework based on the smart contract of Ethereum. They used multiple contracts to store, manage, and make decisions regarding the attributes and policy information of subjects and objects. When receiving an access request, the contract retrieved related subject and object attributes and policy information. Then contract executed the access decision and output the decision result. As the client’s attributes also need to be stored in the blockchain, this also causes the problem of high on-chain storage overhead in large-scale networks.
The storage space in the blockchain is valuable. Therefore, in most studies combining blockchain with access control, the blockchain is mainly used to record some metadata, and the original data are stored under the chain. The security of users is primarily ensured by traditional encryption technology. However, performing complex encryption and decryption operations on the blockchain will take up a lot of valuable computing resources.
In recent years, Intel SGX hardware technology has attracted the attention of researchers because of its security and high efficiency. Park et al. [35] proposed a key management framework combined with SGX in the Internet of Things environment, ensuring key management security for data access control. Gao et al. [36] introduced SGX technology into edge computing for the access control scenario of the Internet of Medical Things resources. Their scheme ran the data analysis process in the enclave to ensure the confidentiality of the data analysis process. Ayoade et al. [37] combined SGX technology to achieve data security processing in the IoT Middleware system. The system supported users in implementing data access policy control in the enclave. Moreover, their scheme ensured that computations of even untrusted systems were performed through a remote-proof mechanism.
For the above work related to IoT access control, we summarized the characteristics of some representative studies in Table 1.
In this article, using attribute-based access control, blockchain, and SGX technologies, we propose an extensible and fine-grained access control framework for trusted Internet of Things. Specifically, on the one hand, we have designed an attribute-based access control contract on Quorum, a permissioned chain of Ethereum, which can perform a fine-grained access control process on the chain. Moreover, the access policies on the chain can be updated as needed. On the other hand, SGX technology makes up for the lack of security in the computing process of edge nodes. It handles the original data safely and credibly in an isolated environment, thus ensuring the confidentiality and security of the original data.

4. Design and Implementation

4.1. System Framework

As shown in Figure 4, the IoT access control framework proposed in this paper mainly includes six components: Quorum blockchain, IoT device, inter-planetary file system (IPFS) storage layer, trusted edge computing layer, data owner, and client.
Quorum blockchain: As a foundation for the rest of the framework, the blockchain alliance network consists of edge nodes, IoT device nodes, and clients. Data owners deploy smart contracts on blockchain networks. The contract can register the identity of IoT devices, store data index addresses, metadata, and access policies, and make decisions about client access requests.
IoT device: As the data source of this framework, IoT devices are composed of IoT devices in different scenarios, including smart medical devices (such as thermometers, sphygmomanometers, etc.), smart home devices (such as mobile phones, televisions, etc.), and smart industrial devices (such as cameras, cars, etc.). They are responsible for real-time sensing, collecting, and processing the perceived object information of the surrounding environment, encrypting the information, and forwarding the data to the IoT gateway through different protocols.
IPFS storage layer: The IPFS storage layer provides an IPFS storage service for IoT device data. IPFS is a point-to-point storage file system with a distributed network structure. When the data file is stored in the IPFS system, IPFS will return the unique corresponding hash index. By adopting the IPFS distributed storage scheme, IoT user data can be obtained from nearby nodes, which saves bandwidth resources and can effectively resist the downtime of central servers in the real world.
Trusted edge computing layer: This layer provides trusted data processing services. The edge computing servers in this framework have enabled the trusted computing service of Intel SGX, which ensures the confidentiality and integrity of the original data in the access process and protects the privacy of the data owner. Moreover, the edge computing server safely returns the data to the client through the constructed secure communication channel.
Data owner ( D O ): The D O is the owner of the accessed resource object, which exists in the form of an edge server. As the owner of all IoT devices in the current edge cluster, it has the right to call the data resources of the IoT devices to which it belongs.
Client: The client is the interactive front-end for data access by data users, bound to the client’s identity. If the client’s attributes meet the access policy corresponding to the target data, the smart contract will authorize the client’s access. The requested data is safely returned to the client after being processed by the SGX-enabled edge server.
Professionals typically use unified modeling language (UML) to model system architectures. UML deployment diagrams are generally applied to physical structure modeling and functional to physical components mapping. Górski [38] proposed a 1 + 5 architecture view model for designing blockchain and internet technology (IT) system integration solutions. They mainly described an integration flow diagram that extended the UML activity diagram. Inspired by their work, we use the UML deployment diagram to represent physical nodes and the allocation of components in this framework, as shown in Figure 5. Table 2 summarizes the stereotypes of nodes, services, and protocols in the UML deployment diagram.

4.2. Access Control of IoT Based on Blockchain

Before the detailed description is given, we first introduce some relevant symbol meanings in Table 3.

4.2.1. Initialization of Blockchain

In this framework, we use Quorum to deploy a blockchain network. The nodes of the Quorum network include edge servers, IoT devices, and clients. As a blockchain application, Quorum is installed on the above nodes. Its functions include blockchain network communication, key pair generation, transaction management, and the creation and operation of smart contracts. Quorum’s account address is generated by K e c c a k 256 hash using the p k of keypair ( p k , s k ) When the Quorum network is created, the D O s account is initialized to the network administrator’s role. All D O s are jointly responsible for maintaining the permission of nodes in the whole network, such as approving new nodes (including IoT nodes and client nodes) to join the alliance chain network. This permissioned mechanism is more secure, targeted, and controllable than the public chain.
First, when a new IoT device node needs to be added to the framework, it needs to be approved by the D O before it can connect to the blockchain network and then create the corresponding account. The IoT device’s public key uniquely identifies the device account. We use smart contracts to define the data structure of the IoT device account, the storage address index, metadata, and data access policy for the data. The specific data structure is shown in Figure 6.

4.2.2. Attribute-Based Access Control Contract

This section will introduce the detailed process of using smart contracts to implement the access control framework.
  • Initialization of the Contract
The D O first creates an access control contract, as shown in Algorithm 1, and deploys the contract to the blockchain by sending the transaction. During the deployment phase of the contract, we define a set of state variables, including the D O s address, the mapping between D a t a I D and A P , and the mapping between C A d d r and C A t t and T o k e n . We store the values of these variables persistently in the blockchain. We also define an event interface to record the results of access decisions in history. In the deployment phase of the contract, the constructor function is used to initialize the contract status, and the variable owner is initialized to the account address of the D O , which sends the contract deployment.
Algorithm 1. Initialization of the Contract
1:address o w n e r
2:enum R e s u l t { U n r e g i s t e r e d , U n s i g n e d , U n p e r m i t t e d , P e r m i t t e d }
3:mapping( D a t a I D   => P o l i c y ) p o l i c y _ a l l
4:event ResultEvent( a d d r e s s , D a t a I D , R e s u l t )
5:mapping( a d d r e s s => t o k e n ) c l i e n t T o k e n
6:function Constructor():            ▷only invoked once by D O
7:      o w n e r = m s g . s e n d e r
8:end function
  • Management of Access Policy
After the contract deployment, the D O first encrypts and uploads the original data collected by IoT devices to IPFS, and returns the address index of the data to IPFS. As shown in Algorithm 2, the D O can send transactions to invoke the AddDataPol , DelDataPol , and QueryData methods of the contract, which correspond to the addition, deletion, and query of on-chain access policies. The onlyOwner modifier function ensures that data resources can only be added and removed by the D O .
Algorithm 2. Management of Access Policy
Input: I D : the target data’ID
H a s h : IPFS address index
P :the access policy
1:function AddDataPol( I D , H a s h , P ) o n l y O w n e r :   ▷only invoked by D O
2:    policy_all[ I D ] = ( H a s h , P )
3:end function
4:function DelDataPol( I D ) o n l y O w n e r          ▷only invoked by D O
5:     d e l e t e   p o l i c y _ a l l [ I D ]
6:end function
7:function QueryData( I D )                ▷only invoked by E S
8:     r e q u i r e ( m s g . s e n d e r   ==   E S )
9:    return p o l i c y _ a l l   [ I D ] . m e t a d a t a
10:end function
AddDataPol : In the actual Internet of Things scenario, data is generated anytime, anywhere. Therefore, the D O takes the D a t a I D , IPFS address index, and access policy as the input to add the target data and corresponding access policy dynamically. It is important to note that to avoid storing the plaintext information of the data access policy on the blockchain, we have one-way hashed the key fields in the access policy.
DelDataPol : The D O takes the number of D a t a I D corresponding to the data on the chain as the input and calls the contract keyword d e l e t e to release the data stored in the contract. After the function is called, D a t a I D s corresponding access policy in the blockchain will be cleared.
QueryData : The edge server inputs D a t a I D to query the IPFS address index corresponding to the target data and downloads the data locally. The edge server then completes the trusted processing of the data in the data processing stage.
  • Assignment of Client Permission
First, the data owner D O defines a set of attributes according to the system role. When client C is added to the framework, the D O will define its set of attributes C A t t according to its permissions and will then sign the message ( C A d d r | | C A t t | | T o k e n ) with the private key. The D O then sends a message containing ( C A t t ,   T o k e n ,   S i g D O ( C A d d r | | C A t t | | T o k e n ) ) to the offline client C , where C A d d r   is the blockchain account address of the client C , and C A t t   is the attribute of the client C . In addition, the contract initializes the token of each newly added client with 1 , persistently saves the mapping value c l i e n t T o k e n , records the token value of each client address, and uses it in the phases of client deregistration and recovery.
  • Access Control
To request access to the specified data, client C calls the AccessControl function of the contract, and the input is ( D a t a I D ,   C A t t ,   S i g D O ( C A d d r | | C A t t | | T o k e n ) ) . The access control process of the smart contract is shown in Algorithm 3:
Algorithm 3. Assignment of Client Permission
Input: I D : the target data’ID
A : the C l i e n t s attribute set
Sign : a message signed by D O
1:function AccessControl( I D , A , Sign ):       ▷only invoked by C l i e n t
2:     r e q u i r e ( m s g . s e n d e r   ==   C l i e n t )
3:    if c l i e n t T o k e n [ m s g . s e n d e r ] ! = 1:
4:         e m i t ResultEvent( I D , m s g . s e n d e r , U n r e g i s t e r e d )
5:    elif SignVerify( A , Sign ) == f a l s e :
6:         e m i t ResultEvent( I D , m s g . s e n d e r , U n s i g n e d )
7:    elif PolicyVerify( I D , A ) == f a l s e :
8:         e m i t ResultEvent( I D , m s g . s e n d e r , U n p e r m i t t e d )
9:    else:
10:         e m i t ResultEvent( I D , m s g . s e n d e r , P e r m i t t e d , p e r m i t   t i m e )
11:    end if
12end function
13:function SignVerify( A , Sign ):             ▷only invoked internally
14:    msgHash =   k e c c a k 256 ( m s g . s e n d e r | | A | | 1 )
15:    if e c r e c o v e r ( m s g H a s h , Sign ) == o w n e r :
16:        return t r u e
17:    else
18:        return f a l s e
19:    end if
20:end function
21:function PolicyVerify( I D , A ):             ▷only invoked internally
22:     P = p o l i c y _ a l l [ I D ] . p o l i c y
23:    if P is satisfied by A :
24:        return t u r e
25:    else
26:        return f a l s e
27:    end if
28:end function
TokenVerify : The smart contract first checks the token value corresponding to the client address. Only when the token value is 1 will the access request continue to authenticate. Otherwise, an   U n r e g i s t e r e d event will be triggered.
SignVerify : The function takes the client attribute set C A t t   and the signed message S i g D O ( C A d d r | | C A t t | | T o k e n ) in the access request message as inputs to verify whether the signature matches the D O s address D O A d d r . If the signature authentication succeeds, it indicates that client C s attribute set C A t t and T o k e n are valid, and the attribute verification continues. Otherwise, an U n s i g n e d event will be emitted. Specifically, Quorum provides a reliable signature verification mechanism in smart contracts, ensuring the authenticity of key pairs and data used for the signature. The ecrecover function in the contract is used to obtain the address associated with the public key from the signed message.
PolicyVerify : This function takes the data identifier D a t a I D , and the client attribute set C A t t in the access request message as inputs and verifies whether the client attribute set C A t t meets the access policy P related to D a t a I D . If satisfied, the contract will trigger a P e r m i t t e d event. Otherwise, it will trigger an U n p e r m i t t e d event. When the blockchain node catches the P e r m i t t e d event, client C has been granted access to the data related to D a t a I D within the specified time interval. When the access times out, a T i m e o u t event will be triggered, and the client needs to re-initiate the access request when it catches this event.
  • Deregistration and Recovery of Client
As shown in Algorithm 4, toderegister client C , the D O   sends a transaction to call the DeregisterClient function in the contract, taking the client’s account address C A d d r as input. The token value associated with C will be updated to T o k e n + 1 . It will make it impossible for a signed message previously sent by the D O to pass access control signature verification. After the client C deregisters, the D O can resend the signature message by updating the client’s token to recover the corresponding permissions of client C .
Algorithm 4. Deregistration of Client
Input: Addr : the C l i e n t s account address
1:function DeregisterClient( Addr ) o n l y O w n e r :   ▷only invoked by D O
2:     c l i e n t T o k e n [ Addr ]   ++
3:end function

4.3. Trusted Processing of IoT Data Based on SGX-Enabled Edge Computing

In this framework, we combine SGX-enabled edge computing services and blockchain to achieve trusted processing of IoT data. As shown in Figure 7, the data owner of IoT is the D O , the data requester is the client C , and the edge computing server is E S . We assume that the D O and C have established a secure communication channel within the enclave through remote attestation.
We use a UML sequence diagram to represent the IoT data access and processing flow based on SGX edge computing, as shown in Figure 8. The trusted data processing flow based on SGX is as follows.
Step 1: The D O encrypts the raw data of the IoT device using its key K D O , then uploads the encrypted data to IPFS to obtain the data index I D .
Step 2: The D O calls the smart contract to store the access policy corresponding to the D a t a I D on the blockchain.
Step 3: The D O assigns access permissions to registered clients.
Step 4: The client C invokes the AccessControl function of the smart contract to request access to specified data.
Step 5: The smart contract makes access decisions according to the access control process described in the previous section.
Step 6: When the access decision is passed, the P e r m i t t e d event will be triggered and broadcast in the blockchain network.
Step 7: When the blockchain program of E S catches the P e r m i t t e d event, E S will download the corresponding encrypted data from IPFS.
Step 8: When the D O catches the P e r m i t t e d event, it will encrypt its key K D O with K D H , get the ciphertext C T D O , and send it to the enclave of the edge node.
Step 9: When the client catches the “permitted” event, it will encrypt its key K C with K D H to obtain the ciphertext C T C . The client sends the required data type and C T C to the enclave of the edge node.
Step 10:  E S uses K D H to recover K D O as the input for data decryption to obtain the plaintext of IoT data.
Step 11:  E S uses P d a t a p r o c e s s   to process the IoT plaintext data and takes the decrypted IoT data and the data type specified by the client as input parameters.
Step 12: The data processing results are generated when the data processing is complete. The result is encrypted by K C and returned to the client C .
In the process of data decryption, data processing, and data encryption by SGX, E S keeps the IoT data in the enclave, ensuring the confidentiality and integrity of user data. The data processing program can also verify the correctness of the process through the SGX.

5. Performance Evaluation

To verify the feasibility and effectiveness of this scheme, we set up an experimental environment to simulate the process of deploying access policies to the blockchain through smart contracts and calling contracts to obtain data access authorization. We then tested the gas overhead and communication delay of the blockchain. We also tested the data processing performance of the edge server before and after SGX was enabled. The hardware environment of the experiment is as follows. The D O and client C are instantiated on a notebook with an Intel Core I7-11800H CPU at 2.30GHz and 16GB RAM, running on the Windows 10 system. The SGX-enabled E S runs on a server with an Intel Xeon e3-1280 v6 CPU at 3.90GHz and 32GB RAM, running on Ubuntu18.04 (64b). The software environment is as follows. E S data processing program uses SGX SDK 2.9 written. The Quorum version is v22.4.2, and the installed version of IPFS is v0.4.19. The smart contract is written in Solidity (V 0.4.22), debugged and compiled, and deployed with Truffle and Ganache’s tools. Using the JavaScript web3.js library, we implemented the signature mechanism of the chain, mainly by calling the transaction signature algorithm ECDSA-SecP256K. In the experiment, we used Boolean expressions composed of attributes to describe the data access strategy. In this case, the access policy can only be satisfied when the attribute set C A t t of the client C makes the attribute expression true.

5.1. Performance of Access Control Contract

In Quorum, gas is the basic unit used to measure the computing resources consumed by each transaction, such as the deployment and invocation of smart contracts. As Quorum is a coin-free blockchain, its gas is not anchored to any cryptocurrency. The more complex the computational steps required for Quorum to execute a transaction are, the more gas will be consumed. We used Solidity to write contracts to realize the whole access control process. At the same time, we selected the related common indicators and set the number of attributes involved to four. We compared our scheme with other work [10,11] in detail in terms of the gas cost of the main operations. The data comparison is shown in Table 4. We only need to deploy one contract in our scheme, so the gas cost of deploying the contract is the lowest, and the subsequent gas cost is used to call the calculation operation of the contract interface. The gas cost of adding access policies and verifying access is mainly determined by the complexity of access policies and the number of attributes. The schemes of Zhang et al. [10] and Yutaka et al. [11] have relatively complex data information interactions between attributes and policies of different contracts, resulting in more gas overhead in the access control process than our scheme.
Furthermore, we recorded the comparison of the gas cost of calling AddDataPol , DelDataPol , AccessControl , and QueryData operations in the access control contract when the scheme in this paper involves different quantity attributes, as shown in Figure 9.
As the number of attributes increases, the calculation and storage overhead of blockchain contract execution will increase, so the gas cost of these four operations will also increase correspondingly. In the experimental results, the gas overhead of AddDataPol is significantly higher than that of DelDataPol . Storing new data on the blockchain will lead to excessive resource usage while deleting data will free up storage space on the blockchain and return the appropriate gas. Unqualified tokens or invalid signature and attribute sets will end early in the access control function. If the client passes all the verification stages, it can finally trigger the P e r m i t t e d event, where the gas cost of token verification and signature verification is fixed, and the total gas cost of access request processing is mainly determined by the attribute verification process. As attribute verification requires Boolean operations on the attributes involved, the more attributes means the more computing resources used, and the higher the gas cost. In most attribute-based access control scenarios in the internet of things, 10 attributes can meet the needs of the scenario. When the access policy contains 10 attributes, the access control cost is only 79,172 gas, which is still less than the gas cost of adding the access policy, proving that the proposed scheme is very efficient and friendly to the client access control process in this case.
Regarding communication delay, we recorded an average of 10 contract test results, as shown in Table 5. The access control contract is deployed on the Quorum blockchain. As Quorum is a permissioned chain that supports high concurrency and low latency, the time-consuming nature of the contract-deployed transactions being packaged into the blockchain by miners is mainly related to external factors, such as the network status of nodes or the computing power of nodes. In the 10 repeated experimental tests, the average deployment time of the contract was 30 s , which was approximately 1/2 faster than the work of Zhang et al. [10]. In the contract’s access control interface test, the average execution time of our scheme was within 2 s , which had a significant advantage over the work of [10,11] in terms of time efficiency. This is because, in their studies [10,11], the information interaction between different contracts on attributes and policies is relatively complex.
The authors of [10] need to specify the ACL for each client on the chain, and the authors of [11] need to record the attributes of each client on the blockchain. Therefore, the on-chain storage cost is directly proportional to the number of clients. As the number of clients increase, the on-chain storage cost increases linearly. However, in our scheme, the attributes of clients are distributed off the chain by the D O signature, and the number of clients will not affect the storage overhead of the blockchain, which significantly saves the valuable on-chain storage space. Table 6 records the relationship between the on-chain storage overhead and the number of clients n .

5.2. Performance of Trusted Data Processing Based on SGX

We assume that the E S has captured the P e r m i t t e d event triggered by the client and downloaded the corresponding data set from IPFS. First, we developed two programs with the same data processing capabilities on the server, one on an SGX-enabled server and the other on a non-SGX-enabled server. We used data sets of different sizes to test the data processing time in the two environments and executed the data processing process 10 times for each data set. Finally, we took the average test time as the experimental result. We conducted experiments in the two environments to compare the difference in data processing performance before and after the SGX function was enabled. Figure 10 compares data processing results before and after the SGX function was enabled on the server. Generally, the data processing time in both environments increases with the data set size. Data processing times of the same size with SGX enabled are always higher than without SGX enabled. When the data set is small, the data processing time of the two cases is the same. The time difference between the two cases gradually increases with the size of the processed data set. Mainly, when the data set is 90,000 pieces of data, the time difference between them is 1.31 s , which is still an acceptable range in most cases.

6. Discussion and Limitations

In this article, we combine blockchain, SGX, and IPFS technologies to propose an IoT access control framework. Our discussion on the scheme of this article is as follows:
(1)
Auditability
Traditional Internet of Things access control is performed by centralized cloud center servers, leading to a lack of transparency in the process. In our proposed framework, blockchain enables all participants (DOs, clients, edge servers, IoT devices) to monitor contract events continuously and verify access control results. In addition, blockchain can record all process events, including transaction initiation, processing, contract call process, authorization, and other events. In this way, all illegal and unauthorized operations can be traced. Therefore, the proposed framework guarantees auditability.
(2)
Flexibility
In our framework, access policies and clients are separated. The client is described by a set of attributes instead of being described by a unique identity. IoT data is bound with attribute-based access policies. When a new client node joins, its access rights are granted by distributing attribute signatures of the chain, so it is unnecessary to store the client-related permission information on the blockchain. Therefore, increasing the number of clients will not lead to an increase in blockchain storage costs. Thus, the flexibility of the proposed framework is greatly enhanced.
(3)
Authenticity
The nodes involved in this framework, including IoT devices, edge servers, and clients, need to be approved by the DO in the blockchain first to obtain identity information. Secondly, the client’s address is included in the attribute signature signed by the DO. When the client calls the smart contract, the smart contract can verify its identity from the transaction information by using the SignVerify method of the AccessControl function. The node’s identity will also be remotely authenticated when registering in the edge server’s enclave. Therefore, the proposed framework guarantees authenticity.
(4)
IoT Data Confidentiality
After IoT data is generated, it is encrypted by the DO’s symmetric key and uploaded to the IPFS. The edge server downloads the encrypted data from the IPFS. Without an encryption key, a malicious attacker cannot access sensitive information in the data. The key for encrypting IoT data is encrypted with the shared key obtained by the enclave through key exchange protocol, ensuring that only the enclave in the edge server and the DO can decrypt the IoT data. The decryption, processing, and re-encryption of IoT data are all performed in the edge server’s enclave, guaranteed by the remote attestation mechanism provided by SGX. In summary, in data transmission and trusted processing, the proposed framework ensures the confidentiality of IoT data through encryption algorithms and Intel’s SGX technology.
However, we also note that there are some limitations to the proposed scheme. Firstly, it should be highlighted that our experimental results were obtained in a laboratory environment, not in a real IoT scenario. Therefore, we have not considered all the potential limitations in our research. Currently, the continuous delivery and deployment of blockchain-distributed software is widely and rapidly developing, and there have been many excellent works [39,40]. Tran et al. [39] proposed a novel framework for the automated deployment and evaluation of blockchain applications. The framework is driven by blockchain network architecture specifications that support heterogeneous multi-channel networks and describe high-level design decisions (e.g., network topology, protocol selection). Górski [40] proposed a solution for continuously delivering blockchain applications to different deployment environments. They implemented two continuous delivery pipelines using a Jenkins automated server. The first pipeline prepares the business application, while the second pipeline generates the complete node deployment package. In terms of software delivery and deployment, in our proposed scheme, blockchain software Quorum is designed and deployed in edge server nodes, user client nodes, and IoT device nodes. However, in different IoT scenarios, the computing resources of IoT nodes are various, affecting whether IoT nodes are deployed as blockchain full nodes or lightweight nodes. Moreover, the blockchain platform selected in this scheme is the permissioned blockchain Quorum, which supports the design of multi-channel heterogeneous scenarios. Still, it needs further adjusted and adapted according to specific business requirements. Therefore, the scheme of this article still needs further in-depth study in terms of continuous delivery and deployment combined with specific IoT scenarios (such as the Internet of Medical Things).

7. Conclusions

This article proposes an IoT access control framework based on blockchain and SGX. We designed an attribute-based access control contract based on blockchain. We deployed it on the Quorum blockchain to achieve flexible management of access policies and fine-grained access control in IoT systems. In addition, our scheme distributes attribute information to clients in the form of signatures, stores it offline, and realizes the signature check mechanism on the blockchain, saving valuable storage space on the chain. Meanwhile, combined with SGX technology, we designed the trusted processing flow of IoT data in edge servers, eliminating the possibility of malicious servers accessing data illegally. Finally, we conducted extensive experiments on Quorum blockchain and SGX-enabled servers. Through testing and analysis of comparative experiments, the performance of our framework is more advantageous in terms of gas overhead, deployment time, and storage overhead on the chain. The experimental results proved the feasibility and rationality of the proposed framework.
In future work, we plan to deploy the framework proposed in this article in factual IoT scenarios (such as the Internet of Medical Things). We will try to use privacy protection technologies such as zero-knowledge proof and homomorphic encryption to protect the privacy of user identities and IoT data. And we will explore the solution of continuous delivery and deployment of our framework in combination with the slockchain-as-a-service (BaaS) platform.

Author Contributions

Writing—original draft preparation, methodology, software, and validation of the proposed scheme, J.H.; conceptualization, Y.Z.; writing—review and editing and funding acquisition, J.L. and Z.L.; supervision, H.W.; project administration, M.X.; visualization, F.M. and Y.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China under Grant No. 61801489.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Shah, A.A.; Piro, G.; Grieco, L.A.; Boggia, G. A Qualitative Cross-Comparison of Emerging Technologies for Software-Defined Systems. In Proceedings of the 2019 Sixth International Conference on Software Defined Systems (SDS), Rome, Italy, 10–13 June 2019; pp. 138–145. [Google Scholar] [CrossRef]
  2. Lionel Sujay Vailshery. IoT Connected Devices Worldwide 2030. Available online: https://www.statista.com/statistics/802690/worldwide-connected-devices-by-access-technology/ (accessed on 22 January 2021).
  3. Nikolina Cveticanin. 30 Big Data Statistics Everybody’s Talking About. Available online: https://dataprot.net/statistics/data-statistics/ (accessed on 8 March 2022).
  4. Ning, Z.; Dong, P.; Wang, X.; Hu, X.; Guo, L.; Hu, B.; Guo, Y.; Qiu, T.; Kwok, R.Y.K. Mobile Edge Computing Enabled 5G Health Monitoring for Internet of Medical Things: A Decentralized Game Theoretic Approach. IEEE J. Sel. Areas Commun. 2020, 39, 463–478. [Google Scholar] [CrossRef]
  5. Kari, P. Dozens sue Amazon’s Ring after Camera Hack Leads to Threats and Racial Slurs. Available online: https://www.theguardian.com/technology/2020/dec/23/amazon-ring-camera-hack-lawsuit-threats (accessed on 23 December 2020).
  6. Roman, R.; Lopez, J.; Mambo, M. Mobile edge computing, Fog et al.: A survey and analysis of security threats and challenges. Futur. Gener. Comput. Syst. 2018, 78, 680–698. [Google Scholar] [CrossRef]
  7. Hahn, W. Cynerio Research Finds Critical Medical Device Risks Continue to Threaten Hospital Security and Patient Safety. Available online: https://www.cynerio.com/blog/cynerio-research-finds-critical-medical-device-risks-continue-to-threaten-hospital-security-and-patient-safety (accessed on 19 January 2022).
  8. Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. Decentralized Bus. Rev. 2008, 21260. [Google Scholar] [CrossRef]
  9. Hoekstra, M.; Lal, R.; Pappachan, P.; Phegade, V.; Del Cuvillo, J. Using innovative instructions to create trustworthy software solutions. HASP@ISCA 2013, 11, 2487726–2488370. [Google Scholar] [CrossRef]
  10. Zhang, Y.; Kasahara, S.; Shen, Y.; Jiang, X.; Wan, J. Smart Contract-Based Access Control for the Internet of Things. IEEE Internet Things J. 2018, 6, 1594–1605. [Google Scholar] [CrossRef]
  11. Yutaka, M.; Zhang, Y.; Sasabe, M.; Kasahara, S. Using Ethereum Blockchain for Distributed Attribute-Based Access Control in the Internet of Things. In Proceedings of the 2019 IEEE Global Communications Conference (GLOBECOM), Waikoloa, HI, USA, 9–13 December 2019; pp. 1–6. [Google Scholar] [CrossRef]
  12. Wood, G. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Proj. Yellow Pap. 2014, 151, 1–32. [Google Scholar]
  13. Baliga, A.; Subhod, I.; Kamat, P.; Chatterjee, S. Performance evaluation of the quorum blockchain platform. arXiv 2018, arXiv:1809.03421. [Google Scholar] [CrossRef]
  14. Lin, D.; Wu, J.; Yuan, Q.; Zheng, Z. Modeling and Understanding Ethereum Transaction Records via a Complex Network Approach. IEEE Trans. Circuits Syst. II: Express Briefs 2020, 67, 2737–2741. [Google Scholar] [CrossRef]
  15. McKeen, F.; Alexandrovich, I.; Berenzon, A.; Rozas, C.V.; Shafi, H.; Shanbhogue, V.; Savagaonkar, U.R. Innovative instructions and software model for isolated execution. HASP@ISCA 2013, 10, 1–8. [Google Scholar] [CrossRef] [Green Version]
  16. Anati, I.; Gueron, S.; Johnson, S.; Scarlata, V. Innovative technology for CPU based attestation and sealing. In Proceedings of the Proceedings of the 2nd International Workshop on Hardware and Architectural Support for Security and Privacy; ACM: New York, NY, USA, 2013; Volume 13. [Google Scholar]
  17. Intel Corporation. Intel Software Guard Extensions. Available online: https://software.intel.com/sgx (accessed on 23 December 2020).
  18. Sandhu, R.; Samarati, P. Access control: Principle and practice. IEEE Commun. Mag. 1994, 32, 40–48. [Google Scholar] [CrossRef]
  19. Sandhu, R.S. Role-based Access Control. In Advances in Computers; Elsevier: Amsterdam, The Netherlands, 1998; Volume 46, pp. 237–286. [Google Scholar] [CrossRef]
  20. Hu, V.C.; Kuhn, D.R.; Ferraiolo, D.F. Attribute-Based Access Control. Computer 2015, 48, 85–88. [Google Scholar] [CrossRef]
  21. Yang, W.; Liu, W.; Wei, X.; Guo, Z.; Yang, K.; Huang, H.; Qi, L. EdgeKeeper: A trusted edge computing framework for ubiquitous power Internet of Things. Front. Inf. Technol. Electron. Eng. 2021, 22, 374–399. [Google Scholar] [CrossRef]
  22. Li, X.; Li, D.; Wan, J.; Liu, C.; Imran, M. Adaptive Transmission Optimization in SDN-Based Industrial Internet of Things with Edge Computing. IEEE Internet Things J. 2018, 5, 1351–1360. [Google Scholar] [CrossRef]
  23. Chen, Y.; Zhang, N.; Zhang, Y.; Chen, X.; Wu, W.; Shen, X.S. Energy Efficient Dynamic Offloading in Mobile Edge Computing for Internet of Things. IEEE Trans. Cloud Comput. 2019, 9, 1050–1060. [Google Scholar] [CrossRef]
  24. Xu, S.; Li, Y.; Deng, R.H.; Zhang, Y.; Luo, X.; Liu, X. Lightweight and Expressive Fine-Grained Access Control for Healthcare Internet-of-Things. IEEE Trans. Cloud Comput. 2019, 10, 474–490. [Google Scholar] [CrossRef]
  25. Alkhresheh, A.; Elgazzar, K.; Hassanein, H.S. DACIoT: Dynamic Access Control Framework for IoT Deployments. IEEE Internet Things J. 2020, 7, 11401–11419. [Google Scholar] [CrossRef]
  26. Pal, S.; Hitchens, M.; Varadharajan, V.; Rabehaja, T. Policy-based access control for constrained healthcare resources in the context of the Internet of Things. J. Netw. Comput. Appl. 2019, 139, 57–74. [Google Scholar] [CrossRef]
  27. Mahmood, Z.; Jusas, V. Blockchain-Enabled: Multi-Layered Security Federated Learning Platform for Preserving Data Privacy. Electronics 2022, 11, 1624. [Google Scholar] [CrossRef]
  28. Han, J.; Li, Z.; Liu, J.; Wang, H.; Xian, M.; Zhang, Y.; Chen, Y. Attribute-Based Access Control Meets Blockchain-Enabled Searchable Encryption: A Flexible and Privacy-Preserving Framework for Multi-User Search. Electronics 2022, 11, 2536. [Google Scholar] [CrossRef]
  29. Barenji, A.V.; Montreuil, B. Open Logistics: Blockchain-Enabled Trusted Hyperconnected Logistics Platform. Sensors 2022, 22, 4699. [Google Scholar] [CrossRef]
  30. Ouaddah, A.; Elkalam, A.A.; Ouahman, A.A. Harnessing the power of blockchain technology to solve IoT security & privacy issues. In Proceedings of the Second International Conference on Internet of Things, Data and Cloud Computing, Cambridge, UK, 22–23 March 2017; Volume 7. [Google Scholar] [CrossRef]
  31. Ding, S.; Cao, J.; Li, C.; Fan, K.; Li, H. A Novel Attribute-Based Access Control Scheme Using Blockchain for IoT. IEEE Access 2019, 7, 38431–38441. [Google Scholar] [CrossRef]
  32. Alansari, S.; Paci, F.; Sassone, V. A Distributed Access Control System for Cloud Federations. In Proceedings of the 2017 IEEE 37th International Conference on Distributed Computing Systems (ICDCS), Atlanta, GA, USA, 5–8 June 2017; pp. 2131–2136. [Google Scholar] [CrossRef]
  33. Maesa, D.D.F.; Mori, P.; Ricci, L. Blockchain Based Access Control. In Proceedings of the IFIP International Conference on Distributed Applications and Interoperable Systems; Springer: Berlin/Heidelberg, Germany, 2017; pp. 206–220. [Google Scholar] [CrossRef]
  34. Li, Z.; Hao, J.; Liu, J.; Wang, H.; Xian, M. An IoT-Applicable Access Control Model Under Double-Layer Blockchain. IEEE Trans. Circuits Syst. II: Express Briefs 2020, 68, 2102–2106. [Google Scholar] [CrossRef]
  35. Park, M.; Kim, J.; Kim, Y.; Cho, E.; Park, S.; Sohn, S.; Kang, M.; Kwon, T. An SGX-Based Key Management Framework for Data Centric Networking. In Proceedings of the International Workshop on Information Security Applications; Springer: Berlin/Heidelberg, Germany, 2019; pp. 370–382. [Google Scholar] [CrossRef]
  36. Gao, Y.; Lin, H.; Chen, Y.; Liu, Y. Blockchain and SGX-Enabled Edge-Computing-Empowered Secure IoMT Data Analysis. IEEE Internet Things J. 2021, 8, 15785–15795. [Google Scholar] [CrossRef]
  37. Ayoade, G.; El-Ghamry, A.; Karande, V.; Khan, L.; Alrahmawy, M.; Rashad, M.Z. Secure data processing for IoT middleware systems. J. Supercomput. 2018, 75, 4684–4709. [Google Scholar] [CrossRef]
  38. Górski, T. The 1+5 Architectural Views Model in Designing Blockchain and IT System Integration Solutions. Symmetry 2021, 13, 2000. [Google Scholar] [CrossRef]
  39. Tran, N.K.; Babar, M.A.; Walters, A. A Framework for Automating Deployment and Evaluation of Blockchain Network. arXiv 2020, arXiv:2203.10647. [Google Scholar] [CrossRef]
  40. Górski, T. Continuous Delivery of Blockchain Distributed Applications. Sensors 2021, 22, 128. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Isolation execution mechanism.
Figure 1. Isolation execution mechanism.
Electronics 11 02710 g001
Figure 2. SGX attestation flow of local attestation.
Figure 2. SGX attestation flow of local attestation.
Electronics 11 02710 g002
Figure 3. SGX attestation flow of remote attestation.
Figure 3. SGX attestation flow of remote attestation.
Electronics 11 02710 g003
Figure 4. Overall view of components and layers of the system framework.
Figure 4. Overall view of components and layers of the system framework.
Electronics 11 02710 g004
Figure 5. The UML deployment diagram of the system framework.
Figure 5. The UML deployment diagram of the system framework.
Electronics 11 02710 g005
Figure 6. Data structure of the IoT device account.
Figure 6. Data structure of the IoT device account.
Electronics 11 02710 g006
Figure 7. Access and processing flow of IoT data based on SGX edge computing.
Figure 7. Access and processing flow of IoT data based on SGX edge computing.
Electronics 11 02710 g007
Figure 8. The UML sequence diagram of IoT data access and processing flow based on SGX edge computing.
Figure 8. The UML sequence diagram of IoT data access and processing flow based on SGX edge computing.
Electronics 11 02710 g008
Figure 9. The variation in gas costs of AddDataPol , DelDataPol , AccessControl , and QueryDataPol with the number of attributes.
Figure 9. The variation in gas costs of AddDataPol , DelDataPol , AccessControl , and QueryDataPol with the number of attributes.
Electronics 11 02710 g009
Figure 10. Performance comparison between non-SGX-enabled and SGX-enabled machines.
Figure 10. Performance comparison between non-SGX-enabled and SGX-enabled machines.
Electronics 11 02710 g010
Table 1. Comparison of Internet of Things access control schemes.
Table 1. Comparison of Internet of Things access control schemes.
SchemesBasic FrameworkEnable BlockchainEnable SGXDecision Maker
Xu [24]ABACNONOEdge Server
Zhang [10]ACLYES (Ethereum)NOSmart contract
Yutaka [11]ABACYES (Ethereum)NOSmart contract
Gao [36]ACLYES (Hyperledger Fabric)YESEdge Server
OursABACYES(Quorum)YESSmart contract
Table 2. Stereotypes for nodes, services, and protocols.
Table 2. Stereotypes for nodes, services, and protocols.
NameExtended UML Element
I o T D e v i c e N o d e Node
I o T G a t e w a y N o d e Node
I P F S N o d e Node
C l i e n t N o d e Node
S G X S e r v e r N o d e Node
d a t a C o l l e c t i o n S e r v i c e Artifact
d a t a U p l o a d S e r v i c e Artifact
distributedStorageService Artifact
b l o c k c h a i n S e r v i c e Artifact
t r u s t e d C o m p u t i n g S e r v i c e Artifact
W i F i / R J 45 / Generic Connection
I P F S Generic Connection
P 2 P Generic Connection
H T T P S Generic Connection
Table 3. Notations.
Table 3. Notations.
NotationDescription
D O The data owner
D O A d d r Data owner’s account address
C The client
C A d d r Client’s account address
D The IoT device
D A d d r IoT device’s account address
C A t t Attributes of the client
A P Access policy
S i g D O ( d a t a ) Sign data with the data owner’s public key
T o k e n A label bound to the client deregister
D a t a I D The ID of IoT data
K D O Encryption key of the data owner
K C Encryption key of the client
K D H DH shared secret key between enclaves
P d a t a p r o c e s s Data process program
Table 4. Comparison of gas costs for main operations.
Table 4. Comparison of gas costs for main operations.
SchemeDeploying ContractsAdding
Attributes
Adding a
Policy
Access
Control
Total
[10]1,706,290-128,77775,7711,910,838
[11]1,301,972308,109363,964264,6352,238,680
ours871,268-163,28442,7641,077,316
Table 5. Comparison of communication delay for main operations.
Table 5. Comparison of communication delay for main operations.
SchemeDeploying ContractsAccess Control
[10]≈1 min≈30 s
[11]≈80 s≈36 s
Ours≈33 s≈2 s
Table 6. Comparison of the relationship between on-chain storage overhead and the number of clients n .
Table 6. Comparison of the relationship between on-chain storage overhead and the number of clients n .
SchemeOn-Chain Storage Overhead
[10] O ( n )
[11] O ( n )
ours O ( 1 )
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Han, J.; Zhang, Y.; Liu, J.; Li, Z.; Xian, M.; Wang, H.; Mao, F.; Chen, Y. A Blockchain-Based and SGX-Enabled Access Control Framework for IoT. Electronics 2022, 11, 2710. https://doi.org/10.3390/electronics11172710

AMA Style

Han J, Zhang Y, Liu J, Li Z, Xian M, Wang H, Mao F, Chen Y. A Blockchain-Based and SGX-Enabled Access Control Framework for IoT. Electronics. 2022; 11(17):2710. https://doi.org/10.3390/electronics11172710

Chicago/Turabian Style

Han, Jiujiang, Yuxiang Zhang, Jian Liu, Ziyuan Li, Ming Xian, Huimei Wang, Feilong Mao, and Yu Chen. 2022. "A Blockchain-Based and SGX-Enabled Access Control Framework for IoT" Electronics 11, no. 17: 2710. https://doi.org/10.3390/electronics11172710

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop