Nothing Special   »   [go: up one dir, main page]

Next Article in Journal
Synthetic Iris Images: A Comparative Analysis between Cartesian and Polar Representation
Previous Article in Journal
Design of an Ultrasound Sensing System for Estimation of the Porosity of Agricultural Soils
Previous Article in Special Issue
A Blockchain-Based Product Traceability System with Off-Chain EPCIS and IoT Device Authentication
You seem to have javascript disabled. Please note that many of the page functionalities won't work as expected without javascript enabled.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

SDACS: Blockchain-Based Secure and Dynamic Access Control Scheme for Internet of Things

1
State Key Laboratory of Information Photonics and Optical Communications, Beijing University of Posts and Telecommunications, Beijing 100876, China
2
School of Electronic Engineering, Beijing University of Posts and Telecommunications, Beijing 100876, China
3
School of Automation, Beijing Institute of Technology, Beijing 100876, China
4
Beijing Institute of Astronautical Systems Engineering, Beijing 100876, China
5
Joint Logistics Academy of NDU, China People’s Liberation Army National Defence University, Beijing 100876, China
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(7), 2267; https://doi.org/10.3390/s24072267
Submission received: 10 March 2024 / Revised: 24 March 2024 / Accepted: 27 March 2024 / Published: 2 April 2024
(This article belongs to the Special Issue Blockchain for Internet-of-Things Applications—2nd Edition)
Figure 1
<p>The architecture of SDACS.</p> ">
Figure 2
<p>Workflow of SDACS.</p> ">
Figure 3
<p>Access control process.</p> ">
Figure 4
<p>Computational cost of message authentication encryption/decryption [<a href="#B29-sensors-24-02267" class="html-bibr">29</a>,<a href="#B30-sensors-24-02267" class="html-bibr">30</a>,<a href="#B31-sensors-24-02267" class="html-bibr">31</a>,<a href="#B32-sensors-24-02267" class="html-bibr">32</a>].</p> ">
Figure 5
<p>Time cost in data encryption, decryption key generation, and data decryption [<a href="#B33-sensors-24-02267" class="html-bibr">33</a>].</p> ">
Figure 6
<p>IPFS startup process.</p> ">
Figure 7
<p>Data upload interface in the IPFS.</p> ">
Figure 8
<p>Data download interface in the IPFS.</p> ">
Figure 9
<p>Result of invoking the AddData() method.</p> ">
Figure 10
<p>Result of invoking the AddPolicy() method.</p> ">
Figure 11
<p>Result of invoking the QueryPolicy() method.</p> ">
Figure 12
<p>Result of invoking the UpdatePolicy() method.</p> ">
Figure 13
<p>Result of invoking the DeletePolicy() method.</p> ">
Figure 14
<p>Result of invoking the AccessData() method.</p> ">
Figure 15
<p>Result of sending frequent access requests.</p> ">
Figure 16
<p>(<b>a</b>) Average throughput performance of the APMC with different concurrent requests. (<b>b</b>) Average throughput performance of the DACC with different concurrent requests. (<b>c</b>) Average throughput performance of the DRMC with different concurrent requests.</p> ">
Figure 17
<p>(<b>a</b>) Average latency performance of the APMC with different concurrent requests. (<b>b</b>) Average latency performance of the DACC with different concurrent requests. (<b>c</b>) Average latency performance of the DRMC with different concurrent requests.</p> ">
Versions Notes

Abstract

:
With the rapid growth of the Internet of Things (IoT), massive terminal devices are connected to the network, generating a large amount of IoT data. The reliable sharing of IoT data is crucial for fields such as smart home and healthcare, as it promotes the intelligence of the IoT and provides faster problem solutions. Traditional data sharing schemes usually rely on a trusted centralized server to achieve each attempted access from users to data, which faces serious challenges of a single point of failure, low reliability, and an opaque access process in current IoT environments. To address these disadvantages, we propose a secure and dynamic access control scheme for the IoT, named SDACS, which enables data owners to achieve decentralized and fine-grained access control in an auditable and reliable way. For access control, attribute-based control (ABAC), Hyperledger Fabric, and interplanetary file system (IPFS) were used, with four kinds of access control contracts deployed on blockchain to coordinate and implement access policies. Additionally, a lightweight, certificateless authentication protocol was proposed to minimize the disclosure of identity information and ensure the double-layer protection of data through secure off-chain identity authentication and message transmission. The experimental and theoretical analysis demonstrated that our scheme can maintain high throughput while achieving high security and stability in IoT data security sharing scenarios.

1. Introduction

With the accelerated construction of network infrastructure, such as 5G and low-power wide-area networks, hundreds of the Internet of Things (IoT) terminal devices are connected to the network, thus generating tens of billions of IoT data [1]. The full utilization of IoT data can promote the cooperation between different devices, which is of great significance for promoting the intelligence of the IoT and providing faster problem solutions. However, due to the lack of a safe and trustworthy data sharing mechanism [2,3], the existing massive IoT data are exclusively analyzed and used internally by the data owners. The data lack circulation, and the synergy of the data cannot be fully utilized.
From the perspective of both data supply and demand sides, data sharing faces the following challenges: (1) The data owner has security and privacy concerns. The IoT data often contain a large amount of private information, such as identity information and address information. Achieving trustworthy data sharing in the IoT is a difficult problem due to the absence of trust between participants involved in data sharing. In addition, during the data transmission process, a malicious attacker is potentially able to perform a series of attacks, leading to user data loss and identity leakage. (2) Data users have concerns about utility and credibility. Traditional access control is usually performed by a central authority [4], and data are still managed by a semi-trusted intermediary, keeping the data sharing procedure unclear. When faced with an increasing number of false data and false recommendations, it is crucial to confirm the authenticity of data sources and the accuracy of data. (3) The shortcomings of the traditional IoT center architecture are exposed [5]. As the number of devices in the IoT grows exponentially, tasks such as data storage and processing are challenging for a single central server [6]. Once an error occurs in the central server, it is very likely to cause the entire network to collapse.
Technologies such as access control, encryption, and blockchain are fortunately capable of addressing the challenges faced by IoT data sharing. Access control stands out as a leading technology for securing IoT data, permitting users to access data within specified limits, legally [7,8,9]. It is widely recognized that conventional access control models provide only broad and coarse-grained access control, rendering them inadequate for the typical open environments of the IoT. Attribute-based access control (ABAC) realizes fine-grained and dynamic management of permissions by flexibly combining attributes, such as subjects, objects, permissions, and environments [10].
In order to enhance the security of ABAC, encryption technology and blockchain are introduced in the access control process. The distributed storage framework of the blockchain makes it difficult to lose on-chain data, ensuring the immutability and traceability of the data through the chain structure and hash algorithm. In addition, blockchain technology is able to solve the single point of failure problem caused by the application of centralized access control architecture. It should be noted that due to the open and transparent nature of blockchain, users storing and sharing data on the blockchain may lead to privacy leaks of stored data and user identities, which makes privacy protection particularly important. Therefore, the data to be shared can be encrypted and stored, and user identities can be managed in a trustworthy manner to achieve privacy protection.
In view of the above considerations, we propose a secure and dynamic access control scheme based on smart contracts, named SDACS. This scheme presents practical technical assistance for securely and efficiently sharing data among multiple parties within the IoT. Our contributions are listed as follows:
  • SDACS integrates the interplanetary file system (IPFS), blockchain technology, and ABAC. The encrypted data are stored on the IPFS, effectively solving the problems of high data storage costs and data security. On the blockchain, the scheme enables the sharing of data storage addresses and data hash. The data access control process is automatically executed by blockchain, which solves the trust issues caused by third-party institutions.
  • The access control scheme consists of APDC, DRMC, APMC, and DACC. The four smart contracts cooperate with each other to enable detailed and dynamic access control of data. For malicious data users, we design a punishment mechanism to impose corresponding behavioral restrictions through a misbehavior list. The data user can obtain correct data only through both on-chain authorization and off-chain identity authentication.
  • We propose a lightweight, certificateless authentication protocol that enables bidirectional identity authentication between a trusted central authority and users. In order to ensure minimal leakage of user identity information, the true identity of the user is known only to himself and TCA. Our protocol not only ensures the legitimacy of the user’s identity source, but also verifies whether the data user has access rights to the data, which achieves double-layer protection of data.
  • Our authentication scheme achieves unforgeability under adaptive selected message attacks. We develop a prototype system utilizing Hyperledger Fabric and Python. Theoretical analysis and experimental evaluation show that the performance of SDACS is effective for IoT data security sharing scenarios.
The subsequent sections of this paper are organized as follows. Section 2 describes the related work. Section 3 discusses the system architecture, basic algorithms, security model, and workflow of SDACS. In Section 4, we elaborate on the scheme. Section 5 presents the security analysis of SDACS. In Section 6, we evaluate the performance of the scheme based on the experiment results. Finally, in Section 7, we present a conclusion and discuss further work.

2. Related Work

Access control technology is an important means to ensure access and data security, and it has been widely used in various scenarios [11]. It restricts subjects’ access to objects through access control policies, thereby ensuring that the accessed data are used safely within the legal scope. However, current access control schemes face problems, such as single points of failure, low reliability, and difficult supervision. General solutions find it difficult to solve the above problems, and feasible methods, such as security certificates, are costly [12]. The characteristics of blockchain, such as decentralization, non-tampering, and traceability, allow these problems to be effectively solved. The access rights of data users can be enforced and controlled through smart contracts and consensus mechanisms. Therefore, many scholars have proposed schemes that combine the IoT and blockchain based on current methods of access control.

2.1. Blockchain-Based Access Control

Jiang et al. [13] proposed an attribute-based data access control scheme that simplifies the access management method. However, the entire access control process is performed off-chain, and the computing power of the blockchain is not fully utilized. Fugkeaw et al. [14] proposed a blockchain-based identity verification and access management system designed for Single Sign-On (SSO) access to data. In this system, access control for cloud resources by data users is managed through smart contracts, ensuring traceability throughout the access process. Moreover, the SSO authentication employs a hash-based token management to verify identities reliably. Despite these advancements, the storage of access control policies in cloud storage still poses a risk of data leakage. To ensure reliable access control for IoT data, Riabi et al. [15] integrated capability-based access control (CapBAC), identity-based access control (IBAC), and blockchain technology to facilitate trustworthy access management. Furthermore, they store topics and access permissions in an access control list (ACL), which data owners can incorporate into smart contracts. However, in existing large-scale IoT systems, creating an individual ACL for each user appears impractical due to the escalating storage costs on the blockchain as the number of user increases. In order to solve this problem, Sarfaraz et al. [16] developed an IoT access control model based on ABAC and blockchain. ABAC is used to restrict access to specific users with the necessary attributes in their certificates, eliminating the need to create ACLs or assign roles to all users. Zhang et al. [17] proposed an access control framework based on smart contracts. This framework is based on the Ethereum platform and realizes trusted access control through the cooperation of access control contracts, judgment contracts, and a registration contract. However, no work has been carried out to evaluate its feasibility.
Analysis: Current studies realize data access control by deploying access control policies in the blockchain, which solves the problems of privacy leakage and single point of failure of the traditional centralized IoT architecture. However, most schemes either have large storage overhead or build access control systems based on traditional blockchains, such as Ethereum. Each node of the traditional blockchain executes transactions sequentially, and system performance will not increase with the increase in the number of nodes, making it unsuitable for large-scale data access control scenarios.

2.2. Privacy Preservation in IoT Access Control

Secure data sharing in IoT is a major focus of ongoing research. In order to improve the security of access control systems, methods have been proposed to encrypt information or protect data in other ways. Li et al. [18] designed a dual-layer access control model based on attributes. The initial layer encrypts data by using attribute-based encryption algorithms, while the subsequent layer applies optimized smart contracts and coordination algorithms for access control, protecting the privacy of data sharing. Luo et al. [19] proposed a user data access control scheme based on smart contracts, using threshold secret sharing to optimize the data encryption and storage mechanism and reduce storage overhead. Hao et al. [20] designed a generic architecture for storing attribute-based resource access policies. Besides, the data owner assigns a set of attributes to the user through off-chain signatures, and data users can only gain access through both off-chain signatures and on-chain evaluations. Jambi et al. [21] proposed a lightweight and hierarchical access control method to safeguard the security of the IoT system. Their method utilizes edge blockchain managers for device authentication, manages ABAC policies through aggregated edge blockchain managers, and executes the access control process through a cloud federation blockchain manager. Ali et al. [22] presented an access control system that incorporates the use of ring signatures. This system enhances security and privacy through the application of smart contracts and encryption techniques. It employs ring signatures for the encryption and decryption of data, ensuring that only designated and authenticated users can access the signed data, while the identity of the signer remains concealed from the users. Nevertheless, it falls short in providing fine-grained access management.
Analysis: Current studies focus on protecting the data to be shared through encryption methods, while ignoring the privacy of transaction data in the blockchain. During the access control process, users inevitably need to provide identity data information to achieve data sharing, but there is a lack of specific research on how to minimize the disclosure of information to achieve privacy protection.

2.3. Secure Storage in IoT Access Control

During the process of data sharing, the data redundancy problem caused by distributed storage in the blockchain still needs to be solved. Liu et al. [23] proposed a blockchain-based access control scheme. To alleviate the storage burden on blockchain nodes, they opted to record the URL link of the data produced by devices on the blockchain. Moreover, their approach utilizes three smart contracts to handle requests from data users. However, the storage of data in the cloud introduces a heightened risk of data breaches. Similar to Liu’s scheme, Sun et al. [24] stored policy files in the local database, and the blockchain records the digest of policy files, access decisions for data users, and IoT entities’ attributes, which also needs to consider the security of data storage. IPFS is a decentralized storage protocol with the following advantages: (1) Each data block has a unique hash value as its identifier, and each node verifies whether the received data block is complete and correct based on the hash value, which effectively prevents the data from being tampered with or damaged during transmission. (2) Data are stored dispersedly on multiple nodes, and each node only needs to store part of the data it is responsible for, saving a lot of storage space [25]. Therefore, it is appropriate to apply IPFS to data storage in IoT scenarios. Zhao et al. [26] proposed an attribute-based access control scheme. Their approach stores encrypted data on IPFS, while hash values are stored on the blockchain. This storage method alleviates blockchain storage burdens and addresses the issue of single points of failure inherent in centralized data storage systems. Fan et al. [27] combined with the IPFS and blockchain technology to propose a secure storage and authorized access system for private information. The system uses the blockchain to save the hash value and access policy of encrypted private information, while the real private information is stored in IPFS.
Analysis: Most current studies store data in cloud servers or local databases. Centralized data storage is easily lead to single points of failure and data redundancy problems. IPFS solves these problems as a distributed storage platform for encrypted data. However, in existing research schemes based on IPFS and blockchain, the protection and privacy management of access policies have not received enough attention.
In summary, in the current access control research of IoT, blockchain guarantees the immutability of data. However, many studies fall short of addressing IoT needs because they ignore the bottleneck of large-scale data storage. In addition, the contradiction between the security and efficiency of data sharing in the access control process still needs to be resolved. A comparison of major blockchain-based access control schemes is shown in Table 1. Different from other studies, our proposed scheme can provide data privacy and security protection in large-scale data scenarios while achieving efficient access control. On the one hand, we designed an on-chain data access control scheme based on the ABAC model and high-performance Hyperledger Fabric, achieving dynamic and fine-grained access control through the mutual collaboration between four smart contracts. On the other hand, we set up a trusted third party to conduct off-chain security verification of the user’s identity data and access permissions based on a lightweight, certificateless authentication protocol, with the purpose of realizing the safe and reliable data sharing and privacy management while the user remains anonymous. Besides, for alleviating the storage pressure of the blockchain, we encrypted the data and stored it in IPFS. IPFS will fragment the file and copy multiple copies to its various nodes, reducing the possibility of data leakage.

3. System Model

3.1. System Architecture

Combined with the ABAC model in the IoT, we propose a data access control scheme based on blockchain, named SDACS. There are five main entities: trusted central authority, data owner, data user, blockchain, and IPFS. The detailed architecture of SDACS is shown in Figure 1.
  • Trusted central authority (TCA): The TCA is a trusted organization, which is responsible for generating system parameters and performing user registration. Additionally, it provides identity authentication and decryption key generation services for the data user.
  • Data owner (DO): The DO formulates the access policy for IoT data and encrypts the data based on parameters returned by the TCA. To improve storage efficiency, the DO sends the ciphertext to IPFS and synchronizes the data storage address and data hash, which we call data resource, to the blockchain through smart contracts. The DO is generally an IoT gateway device that connects device clusters to the blockchain network through wireless communication technology.
  • Data user (DU): The DU sends a request to the DO to obtain data. The access behavior of the DU will be recorded in the blockchain, ensuring the traceability of the data resource access process. If the verification is successful, they will decrypt the ciphertext based on the decryption key sent by the TCA to obtain the data resource.
  • Blockchain (BC): The BC is the core of the access control system. It is accountable for storing the storage address of data in the IPFS and data hash. As a fully trusted entity, all member nodes work honestly under the consensus mechanism. By deploying access control smart contracts, the blockchain system receives the DU’s access request, and automatically matches and verifies the attributes of the DU, which achieves fine-grained access control of the data.
  • IPFS: The IPFS is a secure storage system that allows large-size IoT data to be stored for the DO. In addition, the DU can obtain ciphertext from the IPFS based on the storage address.

3.2. Basic Algorithms and Security Model

3.2.1. Basic Algorithms

SDACS consists of seven basic algorithms.
S e t u p ( 1 λ ) ( p p , P K , M K ) : The TCA initialization algorithm inputs the security parameter λ , and outputs the public parameter p p , system master key P K , and system private key M K .
R e g i s t r a t i o n ( p p , I D i , P K ) ( U P K i , U S K i ,   P I D i ) : The user registration algorithm inputs the public parameter p p , the user’s true identity I D i , and the master key P K , and returns the public and private key pair ( U P K i , U S K i ) and the user’s pseudonym P I D i .
E n c r y p t ( m , p p , P K ) ( C T ) : The data encryption algorithm inputs data m , the public parameter p p , and the master key P K , and outputs the ciphertext C T .
A u E n c r y p t ( M , P K , p p , P I D S , U S K S , P I D R , U P K R ) ( C i p h e r ) : The message authentication encryption algorithm takes the message M , the public parameter p p , the master key P K , the pseudonym P I D i of the message sender and receiver, the sender’s private key U S K S , and the receiver’s public key U P K R as input parameters, and outputs the message ciphertext C i p h e r .
A u D e c r y p t ( C i p h e r , p p , P K , P I D S , U P K S , P I D R , U S K R ) ( M ) : The message authentication decryption algorithm inputs the message ciphertext C i p h e r , public parameter p p , master key P K , the pseudonym P I D i of the message sender and receiver, the sender’s public key U P K S , and the receiver’s private key U S K R , and outputs the message M .
K e y G e n ( P K , M K , p p ) ( S K O w n e r I D ) : The decryption key generation algorithm inputs the master key P K , the system private key M K , and the public parameter p p , and returns the decryption key S K O w n e r I D .
D e c r y p t ( S K O w n e r I D , C T ) ( m ) : The ciphertext decryption algorithm inputs the decryption key S K O w n e r I D and ciphertext C T , and outputs the decrypted data m .

3.2.2. Security Model

We utilized the security model proposed by Huang et al. [28] to assess the security of a lightweight, certificateless authentication protocol. In the security model, adversaries are divided into three security levels: normal, strong, and super adversary. If an authentication protocol is resistant to super adversaries, it means that it can also withstand attacks from powerful and normal adversaries.
We considered two types of adversaries, namely, adversary A I and adversary A II . A I can replace the public key, but it is not given TCA’s system private key. A II has TCA’s system private key but cannot perform public key replacement. The specific security model is characterized by the game between challenger C and adversary A I or A II . The definition of the corresponding security game is provided below.
Definition 1. 
If there is no A I and A II who can win two games with a non-negligible probability A d v A i ( λ ) , where i = 1,2 , we say that this lightweight, certificateless authentication protocol is existentially unforgeable against chosen-message attacks (EUF-CMA).
Game I. The security game definition for adversary A I attack is as follows:
Initialization Phase. Challenger C runs the S e t u p ( ) algorithm, inputs the security parameter λ , and returns the master key P K , public parameter p p , and system private key M K . Then, it sends P K and p p to A I . M K will be kept secret.
Query Phase. A I performs queries of the following polynomial bounded number.
  • Create-user query: A I inputs a query I D , and C searches the user list L u to confirm whether the user has been created. If so, C will return U P K I D to A I . Otherwise, C will execute a series of algorithms to create users. Then, C adds ( I D , P I D , d I D , x I D , U P K I D ) to L u , and sends U P K I D and P I D to A I . It is assumed that create-user query is always asked before other oracles.
  • Hash query: A I sends the relevant parameters to C to obtain the corresponding hash value.
  • TCA partial private key query: A I requests the TCA partial private key of the user, whose pseudonym is P I D . In response, C searches list L u and returns d I D to A I .
  • User private key generation query: A I requests the private key of the user, whose pseudonym is P I D . The challenger C outputs the corresponding user private key x . If the public key is replaced and A I does not provide the corresponding x , then is returned.
  • User public key replacement query: For any user whose pseudonym is P I D , the adversary A I can choose a new public key ( x , U P K ) , and C will replace ( x , U P K ) of the user. In addition, A I may not provide x corresponding to U P K . In this case, x = is returned.
  • Message authentication encryption query: Challenger C runs the A u E n c r y p t ( ) algorithm and outputs the message ciphertext, satisfying V e r i f y P I D , M , C i p h e r , p p , P K , U P K I D = 1 , where U P K I D is the latest public key stored in L u .
Forgery Phase. After the polynomial queries, for the message M , A I outputs a forged message ciphertext C i p h e r * for the user, whose pseudonym is P I D . When the following three conditions are met at the same time, A I is said to win in Game I:
  • V e r i f y P I D , M * , C i p h e r * , p p , P K , U P K I D * = 1 .
  • A I has never submitted ( P I D , M *   ) to perform message authentication encryption queries.
  • A I has never submitted P I D to perform TCA partial private key queries.
    The probability of A I winning Game I is defined as A d v A I ( λ ) .
Game II. The security game definition for adversary A II attack is as follows:
Initialization Phase. Challenger C runs the S e t u p ( ) algorithm, inputs the security parameter λ , and returns the master key P K , public parameter p p , and system private key M K . Then, it sends P K ,   p p , and M K to A II .
Query Phase. A II performs queries of the following polynomial bounded number.
  • Create-user query: A II takes as input a query I D , and C searches the user list L u to confirm whether the user has been created. If so, C will return U P K I D to A II . Otherwise, C will execute a series of algorithms to create users. Then, C adds ( I D , P I D ,   d I D , x I D , U P K I D ) to L u , and sends U P K I D and P I D to A II . It is assumed that create-user query is always asked before other oracles.
  • Hash query: A II sends the relevant parameters to C to obtain the corresponding hash value.
  • TCA partial private key query: A II requests the TCA partial private key of the user, whose pseudonym is P I D . In response, C searches list L u and returns d I D to A II .
  • User private key generation query: A II requests the private key of the user, whose pseudonym is P I D . The challenger C outputs the corresponding user private key x . If the public key is replaced and A II does not provide the corresponding x , then is returned.
  • User public key replacement query: For any user whose pseudonym is P I D , the adversary A II can choose a new public key ( x , U P K ) , and C will replace ( x , U P K ) of the user. In addition, A II may not provide x corresponding to U P K . In this case, x = is returned.
  • Message authentication encryption query: Challenger C runs the A u E n c r y p t ( ) algorithm and outputs the message ciphertext, satisfying V e r i f y P I D , M , C i p h e r , p p , P K , U P K I D = 1 , where U P K I D is the latest public key stored in L u .
Forgery phase. After the polynomial queries, for the message M , A II outputs a forged message ciphertext ( P I D , M * , C i p h e r * ) for the user, whose pseudonym is P I D . When the following three conditions are met at the same time, A II is said to win in Game II:
  • V e r i f y P I D , M * , C i p h e r * , p p , P K , U P K I D * = 1 .
  • A II has never submitted M * to perform message authentication encryption queries.
  • A II has never submitted P I D to perform user private key generation queries.
  • The probability of A II winning Game II is defined as A d v A II ( λ ) .
Unforgeability: If the success probability of any polynomial-time adversary is negligible in the above two games, then our lightweight, certificateless authentication protocol is unforgeable under adaptive chosen message attacks.

3.3. Workflow of SDACS

The purpose of the SDACS is to build a safe, reliable, traceable, and confidential IoT data access control scheme. The scheme ensures the integrity of access data and implements fine-grained dynamic access control. Moreover, all access operations involved in the scheme are traceable and auditable. As is shown in Figure 2, the workflow of SDACS mainly contains five processes.

3.3.1. Process 1: System Initialization and User Registration Process

The TCA generates public parameter p p , master key P K , and system private key M K , publishes P K and p p to the DU and DO, and retains the system private key M K .
The DO and DU register their identities in TCA.
The TCA generates the users’ public–private key pairs and sends them to the DO and DU. Then, the DO and DU generate their own public and private key pairs.

3.3.2. Process 2: Data Encryption Process

The DO encrypts the data sent by IoT sensors and stores the ciphertext in IPFS. Besides, the DO generates data hash for subsequent authentication.
The IPFS sends the storage address A d d r of the data to the DO.

3.3.3. Process 3: Blockchain Initialization Process

The DO initiates the blockchain network and installs smart contracts that can enforce access control mechanisms for DU. After the invoke function is used to initialize the smart contracts, the DO can upload the data resource and access policy through AddData() and AddPolicy() methods. Here, the DO sets the user’s operation permissions for IoT data based on the ABAC model. Specifically, the DO extracts the attributes of subject, object, permission, and environment, respectively, transforms permission management into attribute management, thus forming an access policy. Besides, the DO is able to update and delete the access policy through the access policy management contract.

3.3.4. Process 4: Access Control Process

The DU submits an access request to a specified data resource.
The access control contracts determine whether the DU has access rights to the data resource from four aspects: misbehavior verification, time verification, permission verification, and attribute matching.
If the permission verification is passed, the data resource is returned to the DU. However, if any of the links are invalid, the access verification process is stopped.

3.3.5. Process 5: Data Decryption Process

The DU sends a data retrieval request to the IPFS based on the ciphertext storage address.
The IPFS returns ciphertext based on the ciphertext address.
The DU sends a decryption key request to the TCA.
After the TCA ensures that the DU has obtained access rights by verifying the authenticity of the user’s identity, it sends the decryption key to the DU through a lightweight, certificateless authentication protocol.
The DU runs the decryption algorithm and obtains the data.

4. System Design

4.1. System Initialization

The system initialization algorithm is executed by the TCA. Specifically, the TCA releases the public parameter p p and master key P K with the given security parameter λ .
Firstly, the system selects the elliptic curve cyclic groups G 0 and G 1 with the order p of the security parameter λ ; that is, p = λ . The generator of the group G 0 is P . G 0 and G 1 are the cyclic additive group and the cyclic multiplicative group, respectively, and satisfy bilinear mapping, e : G 0 × G 0 G 1 . Then, the TCA selects the hash function: H 1 : { 0 , 1 } * × G 0 × G 0 Z p * , H 2 : { 0 , 1 } * × G 0 × { 0 , 1 } * × G 0 × G 0 × G 0 Z p * , and H 3 : { 0 , 1 } * { 0 , 1 } n , where n is the bit-length of the message. The TCA randomly selects α , β , s Z p * and outputs the public parameter p p = { G 0 , G 1 , P , e , p , H 1 , H 2 , H 3 } , master key P K = { Q 0 = e ( P , P ) α , Q 1 = β P , Q 2 = s P } , and system private key M K = { α , β , s } . Finally, the TCA publishes P K and p p , and retains M K .

4.2. User Registration

Generally speaking, the communication channels between off-chain institutions in the system are unreliable, and it is difficult to ensure the authenticity of a message during the transmission process. Without proper authentication mechanisms, the malicious adversaries are likely to intercept, modify messages being sent, and perform a range of attacks, which causes catastrophic damage to data owners and data users. Therefore, we propose a lightweight, certificateless authentication protocol to achieve secure two-way authentication between institutions.
We refer to the DO and DU collectively as users. It is assumed that the user registration phase takes place in a secure communication environment and data transmission is absolutely secure. In the identity authentication phase, attackers can eavesdrop, forge, or tamper with the transmitted messages, requiring institutions to authenticate and encrypt the communication information between each other. User registration is divided into the following steps:
User requests registration. The user submits a registration request to the TCA, which contains the real identification I D i .
The TCA checks whether I D i has been used for registration. If not, the TCA generates pseudonym ( P I D i ), for the users. It is assumed here that the pseudonym of the DO is OwnerID and the pseudonym of the DU is UserID. The purpose of this is to minimize the disclosure of information during the data sharing process and protect the privacy of user identities. Then, the TCA randomly selects r i Z p * and calculates R i = r i P , h 1 = H 1 ( P I D i | R i | Q 2 ) , and d i = r i + h 1 s . Finally, the TCA sends part of the user’s public–private key pair ( R i , d i , P I D i ) to the user.
User verification. The user calculates h i = H 1 ( P I D i | R i | Q 2 ) and verifies whether d i Q 2 = R i + h 1 Q 2 is true. If the equation holds, the protocol continues to generate the key. Otherwise, it returns to indicate registration failure.
User key generation. After receiving ( R i , d i ) , the user randomly selects x i Z p * and calculates X i = x i P . The user sets the user public key to U P K i = ( R i , X i ) , the user private key to U S K i = ( d i , x i ) , and the pseudonym to P I D i .

4.3. Data Encryption and Storage

The data encryption algorithm is executed by the DO. In order to prevent data leakage from the DO, after receiving the parameters sent by the TCA, the DO encrypts the data resource ( m ) using the public parameter p p and master key P K . The encryption process can be described as follows:
The DO randomly selects θ Z p * , and calculates the ciphertext message C m and ciphertext parameters C 1 , C 2 . The ciphertext output through the encryption algorithm can be expressed as: C T = { C m = m e ( P , P ) α θ , C 1 = θ β P , C 2 = θ P } . Besides, the DO executes S H A 256 ( D a t a I D | | I D D O ) to generate the data hash ( h a s h d a t a ).
If the C T is stored directly in the blockchain, its size will inevitably put pressure on the node memory and reduce the performance of the blockchain. Therefore, we store C T in IPFS, and IPFS returns the corresponding storage address ( A d d r ).
After completing the encryption and storage of data, the DO sets up the blockchain network. Since our scheme is based on Hyperledger Fabric to build a blockchain network, organizations joining the blockchain must have relevant certificates issued by a certificate authority (CA). The Hyperledger Fabric network we built includes two organizations, Org1 and Org2. Specifically, Org1 represents the DO, who owns data resources from IoT devices. Org2 represents the DU, who sends an access request to the data resource.
C A { O r g 1 , O r g 2 }
The DO formulates the access policy ( P o l i c y ) for the data resource, specifies the access restriction conditions through P o l i c y , and uploads it to the blockchain. Then, the DO stores the A d d r and h a s h d a t a into the blockchain through the Data Resource Management Contract. Section 4.4 details the designed smart contracts.

4.4. Design of Smart Contracts

Our proposed access control scheme consists of four parts: the Access Policy Development Contract (APDC), Data Resource Management Contract (DRMC), Access Policy Management Contract (APMC), and Data Access Control Contract (DACC). Generally, the DO defines the access control policy of data through the APDC method. When the DU initiates a data resource access request, the DACC calls the access policy provided by the APMC based on the attribute set input by the DU to determine whether the DU has the permission to access the corresponding resource. If passed, the DACC retrieves the data resource from the DRMC, including the storage address of the data and data hash. The DU can obtain the ciphertext from the IPFS according to the data resource, and decrypt it to obtain the data.
(1) APDC: The APDC defines the access policy structure, DU’s attribute structure, data storage structure, and misbehavior record storage structure. Moreover, the APDC can only be executed by the DO to set the policy format. The access policy is usually represented by a set of attributes, which describes the information of data resource.
P o l i c y = { A S , A O , A P , A E } . The DO generates the key value, R e s o u r c e I D = S H A 256 ( O w n e r I D , D a t a I D ) , associated with the access policy. The R e s o u r c e I D and P o l i c y can be expressed as R e s o u r c e I D , P o l i c y { k e y : v a l u e } . The DU uses R e s o u r c e I D as an identifier to associate with its own attribute set, and initiates data resource requests according to the defined request format.
As shown in Table 2, the DO divides the access policy model into Attribute of Subject (AS), Attribute of Object (AO), Attribute of Permission (AP), and Attribute of Environment (AE) in the APDC and defines the structure of each attribute.
AS includes the identity of the DO (OwnerID), owner department (Dep1), and owner role (Role1), and AO includes the identity of the data resource (DataID), the department to which the data belongs (Dep2), the role that generates data (Role2), and the address (Place). AP represents the data resource access permission, including allow (1) and deny (0). Besides, three parameters of AE are defined (i.e., CreationTime, EndTime, and Mode) to set the validity period of the access policy, with CreationTime and EndTime specified in unixtime format. Mode indicates whether the DU can dynamically access data resources, with 1 representing permission and 0 representing that the access policy is permanently valid.
R e q a c = { A S u , A O u , U s e r I D , A c t i o n } . The DU sends a request, R e q a c , to the blockchain. The GetUserReq() method extracts parameters such as A S u , A O u , and the identity of the DU ( U s e r I D ) in R e q a c , then attaches a timestamp to record the request time. The blockchain sets the hash value of OwnerID and DataID as the ResourceID of the DU in the APDC according to the GetID() method, which is used for quick searching and adding the access policy.
R e s o u r c e = { T i m e s t a m p , D a t a R e s o u r c e } . In the blockchain network, the storage of data resources has been unanimously recognized by most nodes in the network. Therefore, the data resources stored in the blockchain can effectively prevent malicious tampering.
R e c o r d = { U s e r I D , T i m e s t a m p , D a t a I D , E r r o r t i m e } . When the DU sends access requests too frequently, it will be identified as a malicious user by the blockchain. At this time, the blockchain will automatically record the DU’s visit as an incorrect access behavior and store the inappropriate behavior through the AddMisbehavior() method, which mainly includes the UserID, DataID, the time when the misbehavior was exhibited (Timestamp), and the number of access errors committed by the malicious user (ErrorNumber).
(2) DRMC: The DRMC is used to manage the data resources. The DO can upload data resources through the AddData() method. When the blockchain system determines that the DU’s access is legal, the DACC returns the data resource to the DU by calling the GetData() method of the DRMC.
(3) APMC: The APMC is responsible for the policy management of the DO. Note that this smart contract converts the format of the access policy into a JavaScript object notation (JSON) object. As shown in Algorithm 1 and Algorithm 2, DO is able to implement the addition and deletion of the access policy through the AddPolicy() and DeletePolicy() methods respectively. Besides, the DO can quickly search and modify the formulated access policy through ResourceID in the QueryPolicy() method. If DO wants to update the policy, it can execute the UpdatePolicy() method. In the AddPolicy() method, the DO creates a new storage unit corresponding to the ResourceID and adds the access policy to the blockchain. If the ResourceID already exists, the access policy will be automatically updated.
Algorithm 1 APMC.AddPolicy(): Add the policy into the blockchain network
Input: Policy
Output: Text or Error
%policy=<AS, AO, AP, AE>
ResourceID = SHA256 (Policy. AS. OwnerID + Policy. AO. DataID)
if (QueryPolicy (ResourceID) == True) then % Policy already exists
  UpdatePolicy (Policy)
   return Text (“Policy is updated”)
else
  API.Putstate (ResourceID, Policy)
   return Text (“Policy is added”)
endif
Algorithm 2 APMC.DeletePolicy(): Delete the policy from the blockchain network
Input: Policy
Output: Null or Error
<AS, AO, AP, AE> ← Policy
ResourceID = SHA256(Policy. AS. OwnerID + Policy. AO. DataID)
APIStub.DelState(ResourceID, Policy)
return null
(4) DACC: The core part of the smart contract system is the DACC. Algorithm 3 outlines the general process of the DACC processing an access request. The DACC performs access permission detection based on attribute matching through the AccessData() method, and maintains the misbehavior list of the DU at the same time. The request to access the data resource ( R e q a c ) must contain exactly the same AS and AO attribute information listed in Table 2, plus the requested operation (Action). Here, R e q a c can be expressed as { A S u , A O u , U s e r I D , A c t i o n } .
When the DACC receives the request R e q a c , it first calculates the ResourceID based on the DataID and OwnerID, then uses the ResourceID as input to call the APMC contract to retrieve the corresponding access policy. Afterward, the DACC determines whether the R e q a c is allowed based on the rules in the policy. We assume that the DU with UserID “DU1001” requests to perform a read operation on the data resource with the DataID “4564784528”. We show the general procedure of DACC in Figure 3, and the detailed steps can be described as follows.
Step 1: The DACC calls the GetUserReq() and GetID() methods in the APDC to obtain A S u , A O u , and UserID in the access request, and calculates the ResourceID based on the DataID and OwnerID.
Step 2: The DACC sends the ResourceID to the QueryPolicy() method of the APMC to query the related policy, p o l i c y t a r g e t . If there is no matching policy, the request’s handler should terminate.
Step 3: Based on the returned policy, the DACC determines whether the current access time of the DU is reasonably far from the last access time. When the DU is judged to be a frequent visitor, the SDACS system should restrict such behavior so that it cannot access the data resource within a period of time.
Algorithm 3 DACC.AccessData(): Get Data Resource According to Policy.
Input: Request of Data User
Output: Data Resource or Error
% MinTime represents the minimum allowed time interval for the data user, and the initial default value for UserID_LastTime is 0
User_Policy = < A S u , A O u , UserID> ← GetUserReq (User_Request)
record ← GetMisbehavior(APIstub, UserID)
if (record.ErrorTime < AllowedTimes) then
  return Text (“Access denied, access error limit reached”)
endif
Policy = <AS, AO, AP, AE> ← APIStub.InvokeChaincode (APMC.QueryPolicy, User_Policy.GetID())
if (Time.Now()–UserID_LastTime < MinTime) then
 AddMisbehavior(APIstub, UserID, Time.Now(), AO.DataID)
  return Text (“Time interval is too short, please access again after a while”)
endif
if (Policy. AP == 0) then
  return Text (“Access Denied”)
endif
if (Policy. AE. Mode == 1) then
  if (Time.Now() > Policy. AE. EndTime) then
   return Text (“Access Time Error”)
  endif
endif
if ((User_Policy. A S u != Policy. AS) || (User_Policy. A O u != Policy. AO)) then
  return Text (“Attribute Mismatch”)
endif
Data_Resource ← APIStub.InvokeChaincode (DRMC.GetData, User_Policy.AO. DataID)
UserID_LastTime ← APIstub.PutState(UserID, Time.Now())
return Data_Resource
In order to track a problematic DU, the DACC maintains a misbehavior list to save all inappropriate behaviors and return the results of the misbehavior to the DU, as shown in Table 3.
The DACC implements a misbehavior judgment method, and the punishment of the DU can be based on its wrong behavior history. Specifically, as shown in Algorithm 4, the DACC can record the DU’s inappropriate access behavior through the AddMisbehavior() method, and obtain the misbehavior history through the GetMisbehavior() method to determine the penalty for the DU.
Step 4: The DACC determines whether the data user is allowed to access the data resource based on the p o l i c y t a r g e t ; that is, it checks whether the value of AP is 1, and otherwise, it will terminate the DU’s request program.
Step 5: If the value of the execution condition mode is 1, the DACC verifies whether the DU’s access time is within the time range specified in the access policy. If the access time is later than the policy revocation time, it means that the access policy has expired, and the requested process should be terminated.
Step 6: The DACC verifies whether the Dep1, Dep2, Role1, and Role2 entered by the DU are consistent with the existing policy. If any of the attributes matched result in false, the request program will be terminated.
Step 7: The DACC calls the DRMC to obtain the corresponding data resource based on the DataID, and sends it to the DU. Finally, the DU obtains the ciphertext from the IPFS based on the data resource and decrypts it by using the decryption key from the TCA.
Algorithm 4 DACC. AddMisbehavior (): Add the misbehavior into the list of incorrect behaviors.
Input: UserID, Timestamp, DataID
Output: Null or Error
record = GetMisbehavior (UserID)
Errortime = record.Errortime + 1
Misbehavior = APDC. NewReocrd (UserID, Timestamp, DataID, Errortime)
 API.Putstate (UserID, Misbehavior)
  return Null

4.5. Security Authentication and Key Generation

The DU submits the access credentials P r o o f = { O w n e r I D , D a t a I D , U s e r I D , h a s h d a t a , h a s h D U = S H A 256 ( I D D U ) } to the TCA to request the decryption key, S K O w n e r I D , corresponding to the D a t a I D . The TCA encrypts S K O w n e r I D based on P r o o f and sends it to the DU.
With the purpose of verifying the authenticity of the user’s identity and confirming that the DU has obtained access permission, the TCA first queries I D D O and I D D U based on O w n e r I D and U s e r I D , and calculates and verifies whether S H A 256 D a t a I D | | I D D O = h a s h d a t a and S H A 256 I D D U = h a s h D U are true. If established, the TCA executes the K e y G e n () algorithm, inputs the master key P K , system private key M K , and public parameter p p , randomly selects t Z p , calculates the private key parameters D 1 = α P + β t P and D 2 = t P , then outputs S K O w n e r I D = { D 1 , D 2 } .
To achieve safe message transmission, we need to authenticate the identities of both parties sending and receiving the message each time and encrypt the transmitted message to ensure its confidentiality. Since the steps of message encryption and decryption in the identity authentication process are the same, for the convenience of description, we simplified the identity authentication process between the DU and TCA to the mutual authentication between user D a t a _ S e n d e r and user D a t a _ R e c e i v e r . Assuming that the identity of the message sender is P I D S , then the user’s public key is U P K S = { R S , X S } , and the user’s private key is U S K S = { d S , x S } . Similarly, we suppose the identity of the message recipient is P I D R , then the user’s public key is U P K R = { R R , X R } , the user’s private key is U S K R = { d R , x R } , and P I D S , P I D R { 0,1 } * .
When D a t a _ S e n d e r sends a message M to D a t a _ R e c e i v e r , it performs the following process based on the P I D R , U P K R , and U S K S :
D a t a _ S e n d e r selects a random value k Z p * and calculates T = k P .
Compute the shared secret value V S = k ( X R + R R + h 1 Q 2 ) , where h 1 = H 1 ( P I D R | R R | Q 2 ) .
Compute h 2 = H 2 ( M | T | P I D S | Q 2 | R S | | X S ) and δ = x S + k + h 2 d S x S .
Encrypt the message C = H 3 ( V S ) ( M ) , and send the message ciphertext C i p h e r = ( T , C , δ ) to the TCA.
When D a t a _ R e c e i v e r receives the C i p h e r sent by D a t a _ S e n d e r , it performs the following process based on the P I D S , U P K S , and U S K R :
Compute the shared secret value V R = ( x R + d R ) T and the recovery message M = C H 3 ( V R ) .
Compute h 1 = H 1 ( P I D S | R S | Q 2 ) and h 2 = H 2 ( M | T | P I D S | Q 2 | R S | | X S ) , then verify δ X S = X S + T + h 2 ( R S + h 1 Q 2 ) . If the above equation holds, D a t a _ R e c e i v e r receives M .
In our proposed protocol, it is assumed that the TCA is completely trustworthy. Moreover, the application of the protocol can be extended to any IoT scenario, even if the TCA is untrustworthy. In the case where neither of the identity authentication parties is a TCA, this protocol can simultaneously resist attacks by malicious message encryptors and malicious key generation centers. On the one hand, the message encryptor needs the TCA partial private key and the user key to generate valid message ciphertext. That is to say, an adversary who only possesses part of the TCA private key or the user’s private key cannot forge valid message ciphertext. On the other hand, to verify the validity of the message ciphertext, the master key, public parameters, and user public key need to be input simultaneously in the message authentication decryption algorithm, which means that the user private key and the TCA partial private key are properly combined in the generation of the message ciphertext. Therefore, our protocol is safe, trusted, and attack-resistant.

4.6. Data Decryption

The DU executes the decryption algorithm and inputs the S K O w n e r I D and C T , then the data is recovered, as computed:
C m e C 1 , D 2 e C 2 , D 1 = m e ( P , P ) α θ e θ β P , t P e θ P , α P + β t P = m e ( P , P ) α θ e P , P θ β t e P , P α θ e P , P β θ t = m
Therefore, the DU completes the request for obtaining the required data.

5. Security Analysis

5.1. Security Analysis of Lightweight, Certificateless Authentication Protocol

5.1.1. Proof of Correctness

(1)
Correctness of the message ciphertext
In the A u E n c r y p t ( ) algorithm, the verification of the message ciphertext can be completed by calculating the shared secret value, as shown in Equation (3):
V S = k · X R + R R + h 1 Q 2 = k · x R P + k · r R P + k · h 1 s P = x R + d R T = V R
(2)
Correctness of message decryption
In the A u D e c r y p t ( ) algorithm, the correctness of the decrypted message can be verified by Equation (4):
δ X S = x S + k + h 2 d S x S · x S P = x S + k + H 2 m T I D S Q 2 R S | | X S r S + H 1 I D S R S Q 2 s P = X S + T + h 2 R S + h 1 Q 2

5.1.2. Proof of Security

Theorem 1. 
In the random oracle model, if the elliptic curve discrete logarithm problem (ECDLP) is difficult, then the lightweight, certificateless authentication protocol is EUF-CMA for adversary A I and adversary A II .
Lemma 1. 
Suppose there is an adversary A I that can win Game I in polynomial time with probability ε , where q u and q s , respectively, represent the maximum number of create-user query and TCA partial private key query made by A I . Then, there will be an Algorithm 5 that can solve the ECDLP problem with the advantage of A d v E U F C M A ε q u ( 1 1 q u ) q s .
Proof. 
Suppose A I is an adversary who breaks the unforgeability of the lightweight, certificateless authentication protocol with probability ε in Game I. By constructing Algorithm 5, A I is used as a subroutine, aiming to solve ECDLP. That is, challenger C obtains an ECDLP instance ( G , P , Q = s P ) and tries to calculate s with the help of A I . After the game starts, C maintains lists L u , L 1 , L 2 , and L 3 to track queries to users and oracles. Each list is initially empty. □
Initialization Phase. C randomly selects an identity I D g as the target identity, runs the system initialization algorithm to generate public parameter p p = { G 0 , G 1 , P , e , p , H 1 , H 2 , H 3 } and master key P K = { Q 0 , Q 1 , Q 2 } , then sends them to the adversary A I .
Query Phase. A I performs queries of the following polynomial bounded number.
  • Create-user query: For the query with identity I D , C queries the list L u . If there is a corresponding entry in the list, U P K I D is returned. Otherwise, if I D I D g , C generates a pseudonym P I D , randomly selects d I D , h 1 , x I D Z p * , calculates R I D = d I D P Q 2 h 1 , X I D = x I D P , and sets h 1 = H 1 ( P I D | R I D | Q 2 ) . If I D = I D g , C randomly selects r I D , x I D , h 1 Z p * , and computes R I D = r I D P , X I D = x I D P , h 1 = H 1 ( P I D | R I D | Q 2 ) . Finally, C sends U P K I D = ( R I D , X I D ) and pseudonym P I D to A I , and adds ( I D , P I D , R I D , X I D , d I D , x I D , h 1 ) to the list L u .
  • H 1 query: When receiving the query H 1 P I D | R I D | Q 2 from A I , C queries the list L 1 . If ( P I D , R I D , Q 2 , h 1 ) is in the list, it returns h 1 to A I . Otherwise, C performs the create-user operation and extracts h 1 from L u and returns it to A I .
  • H 2 query: When receiving the query H 2 ( m | T | P I D | Q 2 | R I D | | X I D ) from A I , C queries the list L 2 . If the query value ( m , T , P I D , Q 2 , R I D , X I D , h 2 ) is in list, then C returns h 2 to A I . Otherwise, C randomly selects h 2 Z p * and sets h 2 = H 2 ( m | T | P I D | Q 2 | R I D | | X I D ) . Finally, C returns h 2 to A I .
  • H 3 query: When receiving a request H 3 ( V ) from A I , C queries the list L 3 . If the query value V exists in the list L 3 , it returns h 3 to A I . Otherwise, C selects the random number h 3 Z p * , sets h 3 = H 3 ( V ) , and returns h 3 to A I .
  • TCA partial private key query: When receiving the query ( P I D , d I D ) from A I , if P I D = P I D g , C returns and terminates the game. Otherwise, C searches list L u and returns d I D to A I .
  • User private key generation query: When receiving a request ( P I D , x I D ) from A I , C queries the list L u . If ( P I D , x I D ) is in the list, then it returns x I D to A I . Here, when the user’s public key is replaced and A I does not provide the corresponding x I D , the command to extract the user’s private key does not output the user’s private key.
  • User public key replacement query: When receiving the query ( P I D , R I D , X I D ) from A I , C queries the list L u and replaces the existing public key ( R I D , X I D ) with ( R I D , X I D ) , where x I D is set to .
  • Message authentication encryption query: C checks whether these three tuples, P I D , R I D , X I D , d I D , x I D , h 1 , P I D , R I D , Q 2 , h 1 , and ( m , T , P I D , Q 2 , R I D , X I D , h 2 ) , are in the lists L u , L 1 , and L 2 , respectively.
If P I D P I D g and x I D , C randomly selects k , h 1 , h 2 Z p * , and sets h 1 = H 1 P I D , R I D , Q 2 , h 2 = H 2 m T P I D Q 2 R I D | | X I D , then calculates T = k P and δ = x I D + k + h 2 d I D x I D .
If P I D = P I D g or x I D = , C randomly selects δ , h 1 , h 2 Z p * , computes T = δ X I D X I D h 2 ( R I D + h 1 Q 2 ) , and outputs C i p h e r 1 = ( T , δ ) . Then, C adds P I D , R I D , X I D , d I D , x I D , h 1 , ( P I D , R I D , Q 2 , h 1 ) , and ( m , T , P I D , Q 2 , R I D , X I D , h 2 ) to the lists L u , L 1 , and L 2 , respectively.
Forgery Phase. A I provides a valid message ciphertext tuple C i p h e r 1 ( 1 ) = ( T * , δ ( 1 ) ) ) for P I D * . This tuple can be replaced by A I ; that is, the equation δ ( 1 ) X I D * = X I D * + T * + h 2 ( 1 ) ( R I D * + h 1 * Q 2 ) . At the same time, A I does not allow the TCA partial private key query and message authentication encryption query. If P I D = P I D g , C terminates the game. According to the forking lemma, we can obtain the other two valid ciphertexts of the message C i p h e r 1 ( 2 ) = ( T * , δ ( 2 ) ) and C i p h e r 1 ( 3 ) = ( T * , δ ( 3 ) ) , which satisfies:
δ ( 2 ) X I D * = X I D * + T * + h 2 2 R I D * + h 1 * Q 2
δ ( 3 ) X I D * = X I D * + T * + h 2 3 R I D * + h 1 * Q 2
For convenience, we set ρ = δ ( 1 ) δ ( 2 ) h 2 1 h 2 3 ( δ ( 1 ) δ ( 3 ) ) ( h 2 1 h 2 2 ) , and from Equations (5) and (6), we can obtain:
δ ( 1 ) δ ( 2 ) x I D * = h 2 1 h 2 2 r I D * + h 1 * s
δ ( 1 ) δ ( 3 ) x I D * = h 2 1 h 2 3 r I D * + h 1 * s
Therefore,
x I D * = h 2 1 h 2 2 δ 1 δ 2 r I D * + h 1 * s
Taking x I D * into Equation (10), we can obtain:
ρ r I D * + h 1 * s = 0 , s = r I D * h 1 *
This is a solution for the ECDLP instance. Below, we discuss the probability of C winning in Game I. C will win when the following three events occur simultaneously:
E1: When A I queries the TCA partial private key, C does not terminate the game.
E2: C i p h e r 1 * is a valid forged message ciphertext.
E3: For the forged message ciphertext ( T * , δ * ) submitted by A I in the forgery stage, there is P I D * = P I D g .
We can obtain Pr E 1 ( 1 1 q u ) q s , Pr E 2 | E 1 ε , and Pr E 3 | E 1 E 2 1 q u . Therefore, the advantage of C is:
A d v E U F C M A Pr E 1 E 2 E 3 = Pr E 1 Pr E 2 | E 1 Pr E 3 | E 1 E 2 ε q u ( 1 1 q u ) q s
Lemma 2. 
Suppose there is an adversary A II that can win Game II in polynomial time with probability ε , where q u , q s , and q r , respectively, represent the maximum number of create-user query, user private key generation query, and user public key replacement query made by A II . Then, there will be an Algorithm 6 that can solve the ECDLP problem with the advantage of A d v E U F C M A ε q u ( 1 1 q u ) q s + q r .
Proof. 
Suppose A II is an adversary who breaks the unforgeability of the lightweight, certificateless authentication protocol with probability ε in Game II. By constructing Algorithm 6, A II is used as a subroutine, aiming to solve ECDLP. That is, challenger C obtains an ECDLP instance ( G , P , Q = x I D P ) and tries to calculate x I D with the help of A II . After the game starts, C maintains lists L u , L 1 , L 2 , and L 3 to track queries to users and oracles. Each list is initially empty. □
Initialization Phase. C randomly selects an identity I D g as the target identity and runs the system initialization algorithm to generate public parameter p p = { G 0 , G 1 , P , e , p , H 1 , H 2 , H 3 } . Then, C selects s Z p * , sets Q 2 = s P , generates master key P K = { Q 0 , Q 1 , Q 2 } , and sends ( p p , P K , s ) to the adversary A II .
Query Phase. A II performs queries of the following polynomial bounded number.
  • Create-user query: For the query with identity ID, C queries the list L u . If there is a corresponding entry in the list, U P K I D is returned. Otherwise, C generates a pseudonym P I D , randomly chooses r I D , h 1 Z p * , computes R I D = r I D P and d I D = r I D + h 1 s , then sets h 1 = H 1 ( P I D | R I D | Q 2 ) . If I D I D g , C randomly selects x I D Z p * and calculates X I D = x I D P . If I D = I D g , C sets X I D = x I D P and x I D = . Finally, C sends U P K I D = ( R I D , X I D ) and pseudonym P I D to A II , and adds ( I D , P I D , R I D , X I D , d I D , x I D , h 1 ) to the list L u .
  • H 1 query: When receiving the query H 1 P I D | R I D | Q 2 from A II , C queries the list L 1 . If ( P I D , R I D , Q 2 , h 1 ) is in the list, it returns h 1 to A II . Otherwise, C performs the create-user operation and extracts h 1 from L u and returns it to A II .
  • H 2 query: When receiving the query H 2 ( m | T | | P I D | | Q 2 | | R I D | X I D ) from A II , C queries the list L 2 . If the query value ( m , T , P I D , Q 2 , R I D , X I D , h 2 ) is in the list, then C returns h 2 to A II . Otherwise, C randomly selects h 2 Z p * and sets h 2 = H 2 ( m | T | | P I D | | Q 2 | | R I D | X I D ) . Finally, C returns h 2 to A II .
  • H 3 query: When receiving a request H 3 ( V ) from A II , C queries the list L 3 . If the query value V   exists in the list L 3 , it returns h 3 to A II . Otherwise, C selects the random number h 3 Z p * , sets h 3 = H 3 ( V ) , and returns h 3 to A II .
  • TCA partial private key query: When receiving the query ( P I D , d I D ) from A II , C searches list L u , and if the entry exists, C returns d I D to A II . Otherwise, C performs a create-user query using the identification P I D and returns d I D to A II .
  • User private key generation query: When receiving a request ( P I D , x I D ) from A II , if P I D = P I D g , C returns and terminates the game. Otherwise, C searches list L u and returns x I D to A II .
  • User public key replacement query: When receiving the query ( P I D , R I D , X I D ) from A I , if P I D = P I D g , C returns and terminates the game. Otherwise, C updates the list ( P I D , R I D , X I D , d I D , x I D , h 1 ) to ( P I D , R I D , X I D , d I D , x I D , h 1 ) , where x I D is set to .
  • Message authentication encryption query: C checks whether these three tuples, P I D , R I D , X I D , d I D , x I D , h 1 , ( P I D , R I D , Q 2 , h 1 ) , and ( m , T , P I D , Q 2 , R I D , X I D , h 2 ) , are in the lists L u , L 1 , and L 2 , respectively.
If P I D P I D g and x I D , C randomly selects k , h 1 , h 2 Z p * , and sets h 1 = H 1 P I D | | R I D | | Q 2 , h 2 = H 2 m | T | P I D | Q 2 | R I D | | X I D , then calculates T = k P and δ = x I D + k + h 2 d I D x I D .
If P I D = P I D g or x I D = , C randomly selects δ , h 1 , h 2 Z p * , computes T = δ X I D X I D h 2 ( R I D + h 1 Q 2 ) , and outputs C i p h e r 1 = ( T , δ ) . Then, C adds P I D , R I D , X I D , d I D , x I D , h 1 , ( P I D , R I D , Q 2 , h 1 ) , and ( m , T , P I D , Q 2 , R I D , X I D , h 2 ) to the lists L u , L 1 , and L 2 , respectively.
Forgery Phase. A II provides a valid message ciphertext tuple, C i p h e r 1 ( 1 ) = ( T * , δ ( 1 ) ) ) , for P I D * . At the same time, A II has never used P I D * for the user private key generation query and user public key replacement query and has never used ( M * , P I D * ) for the message authentication encryption query. If P I D P I D g , C terminates the game. Otherwise, C will search for the tuples ( P I D * , R I D * , X I D * , d I D * , x I D * , h 1 * ) , ( P I D * , R I D * , Q 2 , h 1 * ) , and ( m * , T * , P I D * , Q 2 , R I D * , X I D * , h 2 * ) in the lists L u , L 1 , and L 2 , respectively. According to the forking lemma, we can obtain the other two valid ciphertexts of the message C i p h e r 1 ( 2 ) = ( T * , δ ( 2 ) ) , which satisfies:
δ ( 2 ) X I D * = X I D * + T * + h 2 2 R I D * + h 1 * Q 2  
Below, we discuss the probability of C winning in Game II. C will win when the following three events occur simultaneously:
E1: When A II performs user private key generation query and user public key replacement query, C does not terminate the game.
E2: C i p h e r 1 * is a valid forged message ciphertext.
E3: For the forged message ciphertext ( T * , δ * ) submitted by A II in the forgery stage, there is P I D * = P I D g .
It is easy to obtain Pr E 1 ( 1 1 q u ) q s ( 1 1 q u ) q r , Pr E 2 | E 1 ε , and Pr E 3 | E 1 E 2 1 q u . Therefore, the advantage of C is:
A d v E U F C M A Pr E 1 E 2 E 3 = Pr E 1 Pr E 2 | E 1 Pr E 3 | E 1 E 2 ε q u ( 1 1 q u ) q s + q r

5.1.3. Informal Security Analysis

(1)
Bidirectional identity authentication
Our authentication protocol can achieve bidirectional identity authentication between D a t a _ S e n d e r and D a t a _ R e c e i v e r . D a t a _ S e n d e r uses D a t a _ R e c e i v e r ’s public key to encrypt the message. Only D a t a _ R e c e i v e r ’s private key can successfully decrypt the message ciphertext, thus verifying the identity of D a t a _ R e c e i v e r . Meanwhile, D a t a _ R e c e i v e r uses the public key of the D a t a _ S e n d e r to verify the identity of the message sender. If the formula δ X S = X S + T + h 2 ( R S + h 1 Q 2 ) is workable, the identity of the D a t a _ S e n d e r can be confirmed. Therefore, the authentication protocol realizes the mutual identity authentication.
(2)
Anonymity
In the authentication protocol, the real identity of the user is I D i . During the user registration phase, TCA randomly generates a pseudonym P I D i for user I D i . The user’s true identity is known only to himself and TCA. For any attacker, P I D i and I D i have no connection, so the corresponding I D i cannot be calculated according to P I D i . In this way, users’ anonymity can be better guaranteed.
(3)
Traceability
When there is an abnormality in the identity of P I D i , that is, there are some dangerous behaviors, it is necessary to obtain the true identity of the user. The investigator can obtain the true identity of the user by sending P I D i to TCA. Thus, the protocol guarantees user traceability.
(4)
Resist replay attacks
During the authentication phase of the protocol, the random number method is used to resist replay attacks. In each session, all messages sent by the D a t a _ S e n d e r through the public channel contain random numbers k . The random number is used to ensure the freshness and independence of the message ciphertext. The D a t a _ R e c e i v e r can detect whether a malicious attacker has launched a message replay attack by checking the random numbers in the received message. Therefore, our proposed authentication protocol is resistant to replay attacks.
(5)
Resist Man-in-the-Middle attacks
During the identity authentication process between TCA and DU, the attacker disguises himself as a legitimate communicator and attempts to communicate with TCA or DU. The message ciphertext transmitted during the authentication process is C i p h e r = ( T , C , δ ) . If the attacker wants to pretend to be a legitimate user, he needs to know the initial values of the variables k , x S and d S . k is a random number generated by D a t a _ S e n d e r , which cannot be accomplished by random guessing alone. Calculating the value of k based on the intercepted T is a discrete logarithm problem, so the attacker cannot find k in polynomial time. In addition, x S and d S are private keys of D a t a _ S e n d e r , which are saved locally and attackers cannot obtain them. Therefore, an attacker cannot disguise himself as a legitimate user, that is, the authentication protocol resists man-in-the-middle attacks.

5.2. Data Security Analysis

(1)
Data confidentiality
Data in the SDACS will be encrypted and uploaded to the IPFS. The characteristics of IPFS distributed storage and content-based addressing can achieve permanent data storage and data tamper-proofing. Besides, only the DU who meets the access policy requirements set by the DO can obtain the corresponding ciphertext address.
In the blockchain, users inevitably need to provide identity data information for data sharing. Although users can selectively provide identity information to the blockchain, they still face the problem of how to minimize the disclosure of information to achieve privacy protection. Therefore, we separate on-chain credentials and off-chain credentials so that only the TCA and the user themselves have real identity data to avoid exposing privacy on the chain. When the DU obtains the ciphertext from the IPFS, it sends a decryption key request to the TCA. The two parties send information through a lightweight identity authentication protocol, which verifies the identity and access rights while ensuring the security of off-chain information transmission. Since the decryption key and ciphertext are obtained separately, malicious attackers need to attack the two interactive processes at the same time to obtain data, which greatly increases the difficulty of the attack and ensures the confidentiality of the data.
(2)
Data immutability
The DO stores the data hash and storage address of the ciphertext into the blockchain together. Since the ledger data of the blockchain are immutable, that is, the stored hash value cannot be tampered with, once the data resource is changed, the TCA can determine whether the DU has the authority to obtain the decryption key by verifying h a s h d a t a .
(3)
Data security
For the given ciphertext C T = { C m = m e ( P , P ) α θ , C 1 = θ β P , C 2 = θ P } , the public parameter p p = { G 0 , G 1 , P , e , p , H 1 , H 2 , H 3 } , and master key P K = { Q 0 = e ( P , P ) α , Q 1 = β P , Q 2 = s P } , if the attacker wants to crack the ciphertext C m , the value of e ( P , P ) α θ needs to be calculated. The attacker can obtain e ( P , P ) α from the master key. Nevertheless, the parameter θ is a private parameter selected and saved by the DO. In addition, the process by which the attacker calculates the parameter θ based on θ P and the generator P is a discrete logarithm problem, so it is impossible to calculate θ based on C 2 in arbitrary polynomial time. Therefore, the attacker cannot obtain the corresponding data based on the given ciphertext, public parameters, and master key, which ensures the data security.

6. Performance Evaluation

In this section, we implement a prototype to evaluate the feasibility and effectiveness of the SDACS. All our programs are executed on VMware @Workstation Pro 16.1.2 with a dual-core Intel Core [email protected] GHz and 8.0 GB RAM running Ubuntu 20.04. In the off-chain part, we compare the computational and communication overhead of the authentication protocol, as well as encryption and decryption processes to verify the effectiveness of the SDACS. In the on-chain part, we evaluate SDACS based on the functional implementation, throughput, and transaction latency of smart contracts.

6.1. Authentication Evaluation

We compared the proposed lightweight certificateless authentication protocol with other certificateless authentication schemes for IoT. We evaluated the performance of the authentication scheme by calculating the computational and storage overhead in different schemes, including verifying message encryption and decryption times and the message ciphertext size. When evaluating the authentication protocol, the curve was chosen as the super singular elliptic curve, E : y 2 = x 3 + x   m o d   p 1 , on a finite field F p with p of 512-bit prime numbers. The curve parameters used in our protocol are shown in Table 4. Additionally, we used the Python-based Pairing-Based Cryptography (PBC) library to calculate the running time of encryption and decryption operations. We indicate the running time of relevant operations in Table 5. The comparison scheme is the certificateless authentication protocol of Basudan et al. [29], Barbosa et al. [30], Eslami et al. [31], and Liao et al. [32].

6.1.1. Computational Cost

We evaluated the computational cost of these protocols by calculating the running time of the message authentication encryption and message authentication decryption stages. Table 6 shows the computational cost for different protocols. We can see that our authentication protocol has lower costs compared to all protocols because we aimed to reduce consumption between the DU and TCA as much as possible. In the message authentication encryption and decryption phases, the message sender needs to perform four scalar multiplication operations on the elliptic curve and three hash operations mapped to Z p * each time. The computational cost comparison of message authentication encryption/decryption of the protocol is shown in Figure 4. Evidence shows that our protocol performed well in both the cost of message authentication encryption and decryption stages. In the message authentication decryption stage, our protocol had the lowest computational cost, which is suitable for scenarios with limited device computing capabilities.

6.1.2. Communication Cost

In the authentication protocol, the message sender runs the message authentication encryption algorithm to encrypt the sent information and sends the message ciphertext to the receiver. The message receiver runs the message authentication decryption algorithm to confirm the identity of the message sender and decrypt it. We evaluated the communication costs of the protocols by comparing the sizes of the message ciphertext. The communication cost comparison of different protocols is shown in Table 7. We can see that the communication overhead of our proposed protocol was relatively small. Liao et al.’s [32] protocol maps messages into Z p * , and the message receiver cannot decrypt the message itself. It only implements the identity authentication function and ignores the transmission of new data.

6.1.3. Storage Cost

In order to store key data used for authentication, the storage cost of the protocol is a significant part of the mutual authentication between the user and TCA. We compare the storage cost of the authentication protocol with other related schemes, as shown in Table 8. In our protocol, the user needs to store his pseudonym P I D i and real identity I D i locally. Assuming that the lengths of P I D i and I D i are x bits. In addition, the user also needs to store the public key U P K i = ( R i , X i ) and private key U P K i = ( R i , X i ) , where U P K i G 0 and U S K i Z p * . Therefore, the user’s storage overhead is 2 G 0 + 2 Z p * + 2 x = 2368 + 2 x   b i t s . Although the storage overhead of our authentication protocol is relatively large, our protocol assigns a pseudonym to each user, achieving anonymity of user identity, which is not applied by other protocols.
According to the above results, our lightweight, certificateless authentication protocol performed better than existing protocols in terms of computational cost, communication cost and storage cost.

6.2. Encryption and Decryption Evaluation

In the data encryption and decryption process, the DO stores the access policy in the blockchain, and users only need to perform a few operations. The access policy matching process is automatically executed by the smart contracts, thus reducing the user’s computing overhead. We experimentally tested the time of data encryption, decryption key generation, and data decryption. To show the advantage of our solution, we compared it with Li et al.’s scheme [33]. The experimental configuration is the same as in Section 6.1. The value measured in the experiment is the average time consumed by executing each type of operation 50 times.
As shown in Figure 5, our scheme was more efficient than Li et al.’s [33]. The ciphertext of both schemes does not contain the access policy. However, in Li et al.’s [33] scheme, the number of parameters contained in the decryption key increases as the number of access policies increases. When the access policies continue to increase, the decryption key generation time and data decryption time increase accordingly, which will undoubtedly bring greater computational overhead. In the above experiments, we set the number of the access policy to 1, which is the minimum time consumption of Li et al.’s [33] scheme. Our scheme ensures both efficiency and safety. On the one hand, we performed bilinear pairing based on the additive cyclic group. Compared with the multiplicative cyclic group used by Li et al. [33], the operation was faster, thus reducing the computational overhead. On the other hand, the decryption key generation requires the input of the TCA’s master key (which the DU cannot obtain), so the DU cannot generate the decryption key by itself, thus ensuring the security of data decryption.

6.3. Access Control Evaluation

To test the performance of the distributed dynamic access control scheme, we built a blockchain test platform with 24 peer nodes by using Hyperledger Fabric v1.4. The hardware and software environments of the experiment are shown in Table 9.

6.3.1. System and Function Display

Users can upload and download data according to the operating mechanism of the IPFS. After the DO adds the IPFS v0.14.0 installation directory to the environment variable, it can enter “ipfs daemon” in the terminal to start the IPFS, as shown in Figure 6.
Users upload and download data resources through IPFS WebUI. As shown in Figure 7, the DO stores ciphertext in the IPFS and obtains the content identifier (CID): QmeGjPFzYeM5nfFLUsSrxyuJms6gXyeiKLFMKVwGkuanz3. Then, the DU uploads the CID as a data resource to the blockchain network.
After the DU obtains the ciphertext address, it can search and download the ciphertext by entering the CID, as shown in Figure 8.
We tested the system functions from three aspects: data resource storage, policy management, and access control.
Data resource storage test: As shown in Figure 9, the DO invokes the AddData() method in the DRMC to upload the data resource to the blockchain network.
Policy management test: As shown in Figure 10, after uploading the data resource, the DO calls the AddPolicy() method in the APMC to upload the access policy. As depicted in Figure 11, the DO can call the QueryPolicy() method to query the access policy. The key used in the query is ResourceID, which can be obtained according to the following formula: Resource ID = SHA 256 ( Owner ID , Data ID ) . Besides, the DO can call the UpdatePolicy() method to update the policy (reference Figure 12 for more details). Figure 13 shows how the DO deletes the access policy through the DeletePolicy() method.
Access control test: The DU makes an access request to the DO’s data resource and invokes the CheckAccess() method of the DACC to perform permission detection. The DACC checks user attributes from four aspects: misbehavior verification, time verification, permission verification, and attribute matching. If the detection passes, the data resource will be returned to the DU, as shown in Figure 14. Figure 15 shows the result of the DU being punished as a malicious visitor by the blockchain network for sending frequent access requests.

6.3.2. Performance Testing

To test the performance of the SDACS, we designed two sets of experiments to demonstrate the impact of the number of concurrent requests by multi-threaded clients on the system’s smart contracts’ throughput and transaction latency. The experiments set that all simulated user requests have data access and read permissions, and the access policies and requests in each access control scheme were the same. The range of concurrent requests was from 0 to 1000. Then, the average throughputs of smart contracts are disclosed in Figure 16.
Read operations have higher throughput than write operations. For write operations, after the data location is found based on the data index value, a historical version of the old data needs to be generated for strict verification and accurate tracing. As can be seen from Figure 16a, the throughput of DeletePolicy() and QueryPolicy() in the APMC was higher than that of AddPolicy() and UpdatePolicy(). Figure 16b illustrates that the throughput of GetMisbehavior() and AccessData() in the DACC was higher than that of AddMisbehavior(). As shown in Figure 16c, the throughput of GetData() in the DRMC was higher than AddData().
When the number of concurrent requests was less than 300, the average throughput increased as the number of concurrent requests increased. Upon reaching approximately 300 concurrent requests, the system’s throughput stabilized. This is because the resource utilization of the blockchain reached saturation, but the transactions of a single node will not be affected.
Figure 16b shows that the throughput of AccessData() in the DACC was lower than other smart contracts that focus on read operations. The data access control contract of the SDACS system calls smart contracts named APDC, DRMC, and APMC, meaning that calling another smart contract in a smart contract will reduce the system performance and the overall throughput of the network.
Figure 17 shows how the average transaction latency of the system changed with the number of concurrent requests. We can see that when the number of concurrent accesses was greater than 200, the average transaction latency of the system had little relationship with the number of concurrent requests. The latency of read operations on access policy, misbehavior, and data resource was smaller than the latency of write operations. As noted from the graphs, the latency range for read operations was between 0 and 0.7 s, and for write operations between 8 and 11 s. Read operations are more reliable than write operations because they do not involve complex operations, such as data copying and consensus confirmation.

7. Conclusions and Future Work

In this study, we established a secure, dynamic, fine-grained IoT data storage and sharing scheme by combining off-chain message authentication transmission and on-chain access control permission verification, named SDACS. For malicious visitors, we proposed a punishment mechanism to impose corresponding behavior restrictions on the user through a misbehavior list. To achieve secure large-scale data storage, our scheme encrypts data and stores it in the IPFS. In addition, we proposed a lightweight, certificateless authentication protocol to minimize the disclosure of identity information and ensure the privacy of the off-chain message sharing process.
We used Hyperledger Fabric and Python to build and implement the proposed scheme, ensuring that only authorized data users can access the data. We also conducted extensive experiments to evaluate the performance of SDACS. Experimental results proved that our scheme has obvious advantages in tamper resistance, fast authentication, and minimum risk of privacy leakage. Additionally, it is suitable for scenarios where multi-party data are securely and efficiently shared in the IoT. In the future, we still need to conduct research on program improvement. For example, we can consider introducing zero-knowledge proof technology in the attribute matching process of data users, so that no information about attributes will be revealed during the permission verification process, thereby achieving a higher level of privacy protection.

Author Contributions

Conceptualization, methodology, software, validation, formal analysis, writing—original draft preparation, Q.G.; investigation, resources, data curation, Z.W. and X.W.; visualization, supervision, writing—review and editing, J.Z., X.Z. and X.Y.; project administration, funding acquisition, Y.L. and L.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Fund of State Key Laboratory of Information Photonics and Optical Communications, Beijing University of Posts and Telecommunications, Grant No. IPOC2021ZZ03, the National Key R&D Program of China, Grant No. 2021YFB3101900, the Pre-Research Project, Grant No. 31511130201, and the Information System Engineering Key Laboratory Project, Grant No. 6142101210207.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data is contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest. We declare that we do not have any commercial or associative interests that represent a conflict of interest in connection with the work submitted.

References

  1. Han, P.C.; Zhang, Z.Y.; Ji, S.; Wang, X.W.; Liu, L.; Ren, Y.J. Access control mechanism for the Internet of Things based on blockchain and inner product encryption. J. Inf. Secur. Appl. 2023, 74, 103446. [Google Scholar] [CrossRef]
  2. Liang, W.; Zhang, D.F.; Tang, M.D.; Li, K.C.; Albert, Y.Z. Circuit Copyright Blockchain: Blockchain-Based Homomorphic Encryption for IP Circuit Protection. IEEE Trans. Emerg. Top. Comput. 2021, 9, 1410–1420. [Google Scholar] [CrossRef]
  3. Liang, W.; Huang, W.H.; Long, J.; Zhang, K.; Li, K.C.; Zhang, D.F. Deep Reinforcement Learning for Resource Protection and Real-Time Detection in IoT Environment. IEEE Internet Things J. 2020, 7, 6392–6401. [Google Scholar] [CrossRef]
  4. Ghaffari, F.; Bertin, E.; Hatin, J.; Crespi, N. Authentication and access control based on distributed ledger technology: A survey. In Proceedings of the 2nd Conference on Blockchain Research & Applications for Innovative Networks and Services, Paris, France, 28–30 September 2020; pp. 79–86. [Google Scholar]
  5. Hao, J.L.; Tang, W.J.; Huang, C.; Liu, J.; Wang, H.M.; Xian, M. Secure Data Sharing with Flexible User Access Privilege Update in Cloud-Assisted IoMT. IEEE Trans. Emerg. Top. Comput. 2021, 10, 933–947. [Google Scholar] [CrossRef]
  6. Fan, Y.K.; Zhao, G.Q.; Lei, X.; Liang, W.; Li, K.C.; Choo, K.K.R.; Zhu, C.S. SBBS: A Secure Blockchain-Based Scheme for IoT Data Credibility in Fog Environment. IEEE Internet Things 2021, 8, 9268–9277. [Google Scholar] [CrossRef]
  7. Iqal, Z.M.; Selamat, A.; Krejcar, O. A Comprehensive Systematic Review of Access Control in IoT: Requirements, Technologies, and Evaluation Metrics. IEEE Access 2024, 12, 12636–12654. [Google Scholar] [CrossRef]
  8. Wang, J.P.; Li, M.H.; Sun, Y.B.; Tian, Z.H. An Access Control Method Against Unauthorized and Noncompliant Behaviors of Real-Time Data in Industrial IoT. IEEE Internet Things J. 2024, 11, 708–727. [Google Scholar] [CrossRef]
  9. Ameer, S.; Benson, J.; Sandhu, R. Hybrid Approaches (ABAC and RBAC) Toward Secure Access Control in Smart Home IoT. IEEE Trans. Dependable Secur. Comput. 2023, 20, 4032–4051. [Google Scholar] [CrossRef]
  10. Dan, N.; Ji, S.H.; Yuan, C.; Hu, G.J. Attribute based access control (ABAC)-based cross-domain access control in service-oriented architecture (SOA). In Proceedings of the International Conference on Computer Science and Service System, Nanjing, China, 11–13 August 2012; pp. 1405–1408. [Google Scholar]
  11. Panduro-Ramirez, J.; Lourens, M.; Gehlot, A.; Singh, D.P.; Singh, Y.; Salunke, D.J. Blockchain Approach for Implementing Access Control in IoT. In Proceedings of the 2023 International Conference on Artificial Intelligence and Smart Communication, Greater Noida, India, 27–29 January 2023; pp. 596–599. [Google Scholar]
  12. Hao, X.H.; Ren, H.; Fei, Y.Y.; Zhu, T.Q.; Choo, K.K.R. A Blockchain-Based Cross-Domain and Autonomous Access Control Scheme for Internet of Things. IEEE Trans. Serv. Comput. 2023, 16, 773–786. [Google Scholar] [CrossRef]
  13. Jiang, Y.; Xu, X.L.; Xiao, F. Attribute-Based Encryption with Blockchain Protection Scheme for Electronic Health Records. IEEE Trans. Netw. Serv. Manag. 2022, 19, 3884–3895. [Google Scholar] [CrossRef]
  14. Fugkeaw, S. Achieving Decentralized and Dynamic SSO-Identity Access Management System for Multi-Application Outsourced in Cloud. IEEE Access 2023, 11, 25480–25491. [Google Scholar] [CrossRef]
  15. Riabi, I.; Dhif, Y.; Ayed, H.K.B.; Zaatouri, K. A blockchain based access control for IoT. In Proceedings of the 15th International Wireless Communications and Mobile Computing Conference, Tangier, Morocco, 24–28 June 2019; pp. 2086–2091. [Google Scholar]
  16. Sarfaraz, A.; Chakrabortty, R.K.; Essam, D.L. AccessChain: An access control framework to protect data access in blockchain enabled supply chain. Future Gener. Comput. Syst. 2023, 148, 380–394. [Google Scholar] [CrossRef]
  17. Zhang, Y.Y.; Kasahara, S.J.; Shen, Y.L.; Jiang, X.H.; Wan, J.X. Smart Contract-Based Access Control for the Internet of Things. IEEE Internet Things J. 2018, 6, 1594–1605. [Google Scholar] [CrossRef]
  18. Li, S.; Zhou, T.; Yang, H.; Wang, P. Blockchain-Based Secure Storage and Access Control Scheme for Supply Chain Ecological Business Data: A Case Study of the Automotive Industry. Sensors 2023, 23, 7036. [Google Scholar] [CrossRef]
  19. Luo, X.; Xue, K.; Xu, J.; Sun, Q.; Zhang, Y. Blockchain Based Secure Data Aggregation and Distributed Power Dispatching for Microgrids. IEEE Trans. Smart Grid 2021, 12, 5268–5279. [Google Scholar] [CrossRef]
  20. Hao, J.; Huang, C.; Tang, W.; Zhang, Y.; Yuan, S. Smart Contract-Based Access Control Through Off-Chain Signature and On-Chain Evaluation. IEEE Trans. Circuits Syst. II Express Briefs 2022, 69, 2221–2225. [Google Scholar] [CrossRef]
  21. Jambi, K.; Almarhabi, K.; Khemakhem, M.; Basuhail, A.; Yamin, M. Hierarchical. Blockchain-Based Multi-Chaincode Access Control for Securing IoT Systems. Electronics 2022, 11, 711. [Google Scholar] [CrossRef]
  22. Ali, A.; Rahim, H.A.; Pasha, M.F.; Dowsley, R.; Masud, M.; Ali, J.; Baz, M. Security, Privacy, and Reliability in Digital Healthcare Systems Using Blockchain. Electronics 2021, 10, 2034. [Google Scholar] [CrossRef]
  23. Liu, H.; Han, D.Z.; Li, D. Fabric-IoT: A Blockchain-Based Access Control System in IoT. IEEE Access 2020, 8, 18207–18218. [Google Scholar] [CrossRef]
  24. Sun, S.A.; Du, R.; Chen, S.D.; Li, W.W. Blockchain-Based IoT Access Control System: Towards Security, Lightweight, and Cross-Domain. IEEE Access 2021, 9, 36868–36878. [Google Scholar] [CrossRef]
  25. Azbeg, K.; Ouchetto, X.M.; Andaloussi, S.J. Access Control and Privacy-Preserving Blockchain-Based System for Diseases Management. IEEE Trans. Comput. Soc. Syst. 2023, 10, 1515–1527. [Google Scholar] [CrossRef]
  26. Zhao, X.J.; Wang, S.P.; Zhang, Y.L.; Wang, Y. Attribute-based Access Control Scheme for Data Sharing on Hyperledger Fabric. J. Inf. Secur. Appl. 2022, 67, 103182. [Google Scholar] [CrossRef]
  27. Fan, X.; Fan, C.; Wu, Y. Realization of Privacy Protection of Food Supply Chain Based on Blockchain and IPFS. J. Appl. Sci. 2019, 37, 179–190. [Google Scholar]
  28. Huang, X.; Mu, Y.; Susilo, W.; Wong, D.S.; Wu, W. Certificateless Signatures: New Schemes and Security Models. Comput. J. 2012, 55, 457–474. [Google Scholar] [CrossRef]
  29. Basudan, S.; Lin, X.; Sankaranarayanan, K. A Privacy-Preserving Vehicular Crowdsensing-Based Road Surface Condition Monitoring System Using Fog Computing. IEEE Internet Things J. 2017, 4, 772–782. [Google Scholar] [CrossRef]
  30. Barbosa, M.; Farshim, P. Certificateless signcryption. In Proceedings of the 2008 ACM Symposium on Information, Computer and Communications Security, Tokyo, Japan, 18–20 March 2008; pp. 369–372. [Google Scholar]
  31. Eslami, Z.; Pakniat, N. Certificateless Aggregate Signcryption: Security Model and A Concrete Construction Secure in the Random Oracle Model. J. King Saud. Univ. Comput. Inf. Sci. 2014, 26, 276–286. [Google Scholar] [CrossRef]
  32. Liao, Y.J.; Liu, Y.L.; Liang, Y.K.; Wu, Y.; Nie, X.Y. Revisit of Certificateless Signature Scheme Used to Remote Authentication Schemes for Wireless Body Area Networks. IEEE Internet Things J. 2020, 7, 2160–2168. [Google Scholar] [CrossRef]
  33. Li, H.Z.; Han, D.Z.; Chang, C.C. DAC4SH: A Novel Data Access Control Scheme for Smart Home Using Smart Contracts. IEEE Sens. J. 2023, 23, 6178–6191. [Google Scholar] [CrossRef]
Figure 1. The architecture of SDACS.
Figure 1. The architecture of SDACS.
Sensors 24 02267 g001
Figure 2. Workflow of SDACS.
Figure 2. Workflow of SDACS.
Sensors 24 02267 g002
Figure 3. Access control process.
Figure 3. Access control process.
Sensors 24 02267 g003
Figure 4. Computational cost of message authentication encryption/decryption [29,30,31,32].
Figure 4. Computational cost of message authentication encryption/decryption [29,30,31,32].
Sensors 24 02267 g004
Figure 5. Time cost in data encryption, decryption key generation, and data decryption [33].
Figure 5. Time cost in data encryption, decryption key generation, and data decryption [33].
Sensors 24 02267 g005
Figure 6. IPFS startup process.
Figure 6. IPFS startup process.
Sensors 24 02267 g006
Figure 7. Data upload interface in the IPFS.
Figure 7. Data upload interface in the IPFS.
Sensors 24 02267 g007
Figure 8. Data download interface in the IPFS.
Figure 8. Data download interface in the IPFS.
Sensors 24 02267 g008
Figure 9. Result of invoking the AddData() method.
Figure 9. Result of invoking the AddData() method.
Sensors 24 02267 g009
Figure 10. Result of invoking the AddPolicy() method.
Figure 10. Result of invoking the AddPolicy() method.
Sensors 24 02267 g010
Figure 11. Result of invoking the QueryPolicy() method.
Figure 11. Result of invoking the QueryPolicy() method.
Sensors 24 02267 g011
Figure 12. Result of invoking the UpdatePolicy() method.
Figure 12. Result of invoking the UpdatePolicy() method.
Sensors 24 02267 g012
Figure 13. Result of invoking the DeletePolicy() method.
Figure 13. Result of invoking the DeletePolicy() method.
Sensors 24 02267 g013
Figure 14. Result of invoking the AccessData() method.
Figure 14. Result of invoking the AccessData() method.
Sensors 24 02267 g014
Figure 15. Result of sending frequent access requests.
Figure 15. Result of sending frequent access requests.
Sensors 24 02267 g015
Figure 16. (a) Average throughput performance of the APMC with different concurrent requests. (b) Average throughput performance of the DACC with different concurrent requests. (c) Average throughput performance of the DRMC with different concurrent requests.
Figure 16. (a) Average throughput performance of the APMC with different concurrent requests. (b) Average throughput performance of the DACC with different concurrent requests. (c) Average throughput performance of the DRMC with different concurrent requests.
Sensors 24 02267 g016
Figure 17. (a) Average latency performance of the APMC with different concurrent requests. (b) Average latency performance of the DACC with different concurrent requests. (c) Average latency performance of the DRMC with different concurrent requests.
Figure 17. (a) Average latency performance of the APMC with different concurrent requests. (b) Average latency performance of the DACC with different concurrent requests. (c) Average latency performance of the DRMC with different concurrent requests.
Sensors 24 02267 g017
Table 1. Comparisons of major blockchain-based access control schemes.
Table 1. Comparisons of major blockchain-based access control schemes.
ReferenceBasic ModelBlockchain PlatformStorage PlatformIdentity Privacy
Protection
Application
[15]CapBAC,
IBAC
Ethereum-NoIoT
[16]ABACEthereumBlockchainNoSupply Chain
[17]CapBACEthereumStorage DeviceNoIoT
[20]ABACEthereumResource PoolNoCommon scenarios
[21]ABACHyperledger FabricEdge Blockchain ManagerNoIoT
[22]ABACHyperledger FabricBlockchainYesHealthcare
[24]ABACHyperledger FabricLocal DatabaseNoIoT
[26]ABACHyperledger FabricIPFSNoIoT
[27]DACEthereumIPFSNoFood Supply
OursABACHyperledger FabricIPFSYesIoT
Table 2. An example of the access policy.
Table 2. An example of the access policy.
ASAOAPAE
OwnerID: DO1250DataID: Data11101CreationTime: 1698143280
Dep1: home1Dep2: sensor_company10Endtime: 1798748080
Role1: owner1Role2: light_intensity_sensor1 Mode:1
Place: room1
Table 3. An example of a misbehavior list.
Table 3. An example of a misbehavior list.
UserIDDataIDTimestampError NumberResults
DU1110Data111017013325712Time interval is too short.
DU1111Data1110170133265410Access denied, access error limit reached, access denied.
Table 4. Description of curve parameters.
Table 4. Description of curve parameters.
CurvePairingGroup | Z p * | Length of Elements of Group
E : y 2 = x 3 + x   m o d   p 1 e : G 0 × G 0 G 1 G 0 ( P ) Z p * = 160   bits G 0 = 2 p 1 = 1024   bits
Table 5. Description and running time of the cryptographic operation.
Table 5. Description and running time of the cryptographic operation.
Cryptographic OperationRunning Time (ms)
Bilinear pairing operation T b p 1.87
Scalar multiplication operation T e m 0.61
Hash operation T h 0.04
Table 6. Computational cost comparison of different authentication protocols.
Table 6. Computational cost comparison of different authentication protocols.
ProtocolMessage Authentication Encryption CostMessage Authentication Decryption Cost
Basudan et al. [29] 6 T e m + 2 T h 2 T h + 4 T b p
Barbosa et al. [30] 2 T e m + 3 T h + T b p 3 T h + 5 T b p + 2 T e m
Eslami et al. [31] 3 T h + 5 T e m 3 T h + 5 T b p + T e m
Liao et al. [32] 4 T e m + 2 T h + T b p T b p + T e m + T h
Our Protocol 4 T e m + 3 T h 4 T e m + 3 T h
Table 7. Communication cost comparison of different authentication protocols.
Table 7. Communication cost comparison of different authentication protocols.
ProtocolBasudan et al. [29]Barbosa et al. [30]Eslami et al. [31]Liao et al. [32]Our Protocol
Message Ciphertext Length 2 G 0 + n = 2048 + n   b i t s 2 G 0 + n = 2048 + n   b i t s 2 G 0 + n = 2048 + n   b i t s 3 G 0 + 2 Z p * = 3392   b i t s G 0 + Z p * + n = 1184 + n   b i t s
Table 8. Storage cost comparison of different authentication protocols.
Table 8. Storage cost comparison of different authentication protocols.
ProtocolBasudan et al. [29]Barbosa et al. [30]Eslami et al. [31]Liao et al. [32]Our Protocol
Storage Cost of the User 2 G 0 + 2 Z p * + x = 2368 + x   b i t s 2 G 0 + Z p * + x = 2208 + x   b i t s 2 G 0 + Z p * + x = 2208 + x   b i t s 3 G 0 + Z p * + x = 3232 + x   b i t s 2 G 0 + 2 Z p * + 2 x = 2368 + 2 x   b i t s
Table 9. Hardware and software environments.
Table 9. Hardware and software environments.
HardwareSoftware
CPUi5-7500 CPU 3.40 GHzOSUbuntu 16.04.7 LTS
Memory16.00 GBdockerv20.10.7
Hard Disk1 TBdocker-composev1.17.0
nodev16.17.0
golangv1.18.5
gitv2.7.4
Hyperledger Fabricv1.4
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gong, Q.; Zhang, J.; Wei, Z.; Wang, X.; Zhang, X.; Yan, X.; Liu, Y.; Dong, L. SDACS: Blockchain-Based Secure and Dynamic Access Control Scheme for Internet of Things. Sensors 2024, 24, 2267. https://doi.org/10.3390/s24072267

AMA Style

Gong Q, Zhang J, Wei Z, Wang X, Zhang X, Yan X, Liu Y, Dong L. SDACS: Blockchain-Based Secure and Dynamic Access Control Scheme for Internet of Things. Sensors. 2024; 24(7):2267. https://doi.org/10.3390/s24072267

Chicago/Turabian Style

Gong, Qinghua, Jinnan Zhang, Zheng Wei, Xinmin Wang, Xia Zhang, Xin Yan, Yang Liu, and Liming Dong. 2024. "SDACS: Blockchain-Based Secure and Dynamic Access Control Scheme for Internet of Things" Sensors 24, no. 7: 2267. https://doi.org/10.3390/s24072267

APA Style

Gong, Q., Zhang, J., Wei, Z., Wang, X., Zhang, X., Yan, X., Liu, Y., & Dong, L. (2024). SDACS: Blockchain-Based Secure and Dynamic Access Control Scheme for Internet of Things. Sensors, 24(7), 2267. https://doi.org/10.3390/s24072267

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