You are currently viewing a new version of our website. To view the old version click .
Electronics
  • Article
  • Open Access

29 August 2022

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

,
,
,
,
,
,
and
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.
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 []. Statista [] 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 [] 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 [] 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 [], 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 [], which is unacceptable for data related to medical care. According to the data of Cynerio in its 2022 report [] 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 [] 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 [], 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 [,].
  • 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.

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.
Figure 4. Overall view of components and layers of the system framework.
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 [] 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.
Figure 5. The UML deployment diagram of the system framework.
Table 2. Stereotypes for nodes, services, and protocols.

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.
Table 3. Notations.

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.
Figure 6. Data structure of the IoT device account.

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.
Figure 7. Access and processing flow of IoT data based on SGX edge computing.
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.
Figure 8. The UML sequence diagram of IoT data access and processing flow based on SGX edge computing.
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 [,] 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. [] and Yutaka et al. [] 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.
Table 4. Comparison of gas costs for main operations.
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.
Figure 9. The variation in gas costs of AddDataPol , DelDataPol , AccessControl , and QueryDataPol with the number of attributes.
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. []. 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 [,] in terms of time efficiency. This is because, in their studies [,], the information interaction between different contracts on attributes and policies is relatively complex.
Table 5. Comparison of communication delay for main operations.
The authors of [] need to specify the ACL for each client on the chain, and the authors of [] 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 .
Table 6. Comparison of the relationship between 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.
Figure 10. Performance comparison between non-SGX-enabled and SGX-enabled machines.

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 [,]. Tran et al. [] 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 [] 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]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.