An Attribute-Based Collaborative Access Control Scheme Using Blockchain for IoT Devices

The Internet of Things (IoT) benefits our lives by integrating physical devices to the real world and offers a crucial internet infrastructure for future civilization. Because IoT devices are widely distributed and restricted in resources, it is difficult for them to adopt traditional security methods to resist malicious attacks. Unauthorized access to IoT devices, which results in severe privacy and security problems, has become a major challenge that has impeded IoT technology from being widely adopted. Therefore, the access control for IoT devices urgently needs to be improved when dealing with authorization issues. In this paper, we propose an attribute-based access control scheme that provides decentralized, flexible, and fine-grained authorization for IoT devices. Blockchain is utilized to provide authentic and reliable credentials. More importantly, a verifiable collaboration mechanism is designed to meet the needs of controlled access authorization in emergencies. Authority nodes are constructed to execute major computation tasks and interact with the blockchain. The security analysis shows that our scheme can reliably guarantee the security of authorized access. More than security assurance, a proof-of-concept prototype has been implemented to prove that our scheme is scalable, efficient, and accommodates IoT devices well.


Introduction
The Internet of Things (IoT) has emerged as a revolutionary type of technology that connects all smart devices together through a distributed capillary networking infrastructure. It enables IoT smart devices to collect and share data more efficiently and autonomously [1], making changes in every corner of our daily lives, including healthcare, transport, environment, energy, business, and culture [2]. Although IoT is promising, security and privacy have been two major issues that have become a bottleneck impeding the application of IoT technology in open environments, where IoT devices are connected to the internet and exposed to unauthorized access [3]. Access control is a technology that can restrict access privileges to a target according to a control rule, thereby helping to solve these security issues. The widely known traditional centralized access control modes include discretionary access control (DAC), mandatory access control (MAC), and role-based access control (RBAC). However, the most widely distributed IoT devices can hardly meet the requirements of traditional security systems due to their limitations in CPU, memory, and battery resources [4], as well as their decentralized and dynamic architectures [5]. DAC assigns an authorization list or matrix to each object, which is impossible for subjects without identifiers or without enough resources. MAC relies on a central authority and is too rigid for IoT scenarios. When adapting RBAC into IoT scenarios, the number of rules that need to be managed increases exponentially with the growth of devices. To solve these problems, a collaborative access control scheme for IoT is proposed by combining the ABAC model and blockchain technology [14]. By adopting blockchain, this solution can build trust among IoT devices and need not rely on third-party authorities. Blockchain is utilized as a keyvalue database, in which the stored information is distributed and resistant to a single point of failure. The secure database is utilized to provide credible credentials as well as to trustfully transmit access information for authorization on behalf of IoT devices. A verifiable collaboration mechanism is also designed to satisfy the collaboration requirement. Authority nodes are constructed to verify the access credentials by interacting with the blockchain network and afford most of the computing tasks for authorization. Our scheme overcomes the above-mentioned problems by these three methods and the main contributions of our scheme are threefold: (1) We address the authorization issue of real-time access to IoT devices by proposing a collaborative ABAC scheme using blockchain. Blockchain is utilized to generate a digital account for each device to record the attributes and access policy used for authorization, as well as to forward access information trustfully. The data stored in the blockchain is reliable and credible, guaranteed by the no single point failure and tamper-proof feature offered by the blockchain. Based on these credentials, our scheme can reliably guarantee authorized access and is both efficient and scalable.
(2) A controlled and verifiable collaboration mechanism is also introduced when trustworthy collaboration is needed. This mechanism will ask for extra authorization, reconstruct the access tree, and prevent unwanted collaboration with the help of three novel proposed algorithms. The data structure of the access tree built from the access policy in our scheme was specially designed. Moreover, the access tree is modified by adding a collaborative node so that collaboration is controlled and verifiable.
(3) Authority nodes are constructed to build an access structure from access policy, to make authorization decisions and to interact with the blockchain network. Moreover, IoT devices only need to store a string of access information and perform a constant number of simple cryptographic computations. These factors will make our scheme light-weight and well-adapted to IoT scenarios.
The rest of the manuscript is organized as follows: Section 2 contains background and related work. Section 3 presents the architecture of our proposed system. The implementation of the scheme is detailed in Section 4. The security and performance analysis are presented in Sections 5 and 6. Finally, Section 7 introduces the conclusions and main results of this paper.

Background and Related Work
In this section, we first introduce two important technologies utilized in our scheme. Then, related works that concern the authorization issue of IoT devices using the blockchain are summarized. To solve these problems, a collaborative access control scheme for IoT is proposed by combining the ABAC model and blockchain technology [14]. By adopting blockchain, this solution can build trust among IoT devices and need not rely on third-party authorities. Blockchain is utilized as a key-value database, in which the stored information is distributed and resistant to a single point of failure. The secure database is utilized to provide credible credentials as well as to trustfully transmit access information for authorization on behalf of IoT devices. A verifiable collaboration mechanism is also designed to satisfy the collaboration requirement. Authority nodes are constructed to verify the access credentials by interacting with the blockchain network and afford most of the computing tasks for authorization. Our scheme overcomes the above-mentioned problems by these three methods and the main contributions of our scheme are threefold: (1) We address the authorization issue of real-time access to IoT devices by proposing a collaborative ABAC scheme using blockchain. Blockchain is utilized to generate a digital account for each device to record the attributes and access policy used for authorization, as well as to forward access information trustfully. The data stored in the blockchain is reliable and credible, guaranteed by the no single point failure and tamper-proof feature offered by the blockchain. Based on these credentials, our scheme can reliably guarantee authorized access and is both efficient and scalable.
(2) A controlled and verifiable collaboration mechanism is also introduced when trustworthy collaboration is needed. This mechanism will ask for extra authorization, reconstruct the access tree, and prevent unwanted collaboration with the help of three novel proposed algorithms. The data structure of the access tree built from the access policy in our scheme was specially designed. Moreover, the access tree is modified by adding a collaborative node so that collaboration is controlled and verifiable.
(3) Authority nodes are constructed to build an access structure from access policy, to make authorization decisions and to interact with the blockchain network. Moreover, IoT devices only need to store a string of access information and perform a constant number of simple cryptographic computations. These factors will make our scheme light-weight and well-adapted to IoT scenarios.
The rest of the manuscript is organized as follows: Section 2 contains background and related work. Section 3 presents the architecture of our proposed system. The implementation of the scheme is detailed in Section 4. The security and performance analysis are presented in Sections 5 and 6. Finally, Section 7 introduces the conclusions and main results of this paper.

Background and Related Work
In this section, we first introduce two important technologies utilized in our scheme. Then, related works that concern the authorization issue of IoT devices using the blockchain are summarized.

Attribute-Based Access Control Model
We detail the construction of the ABAC model that is implemented in our scheme. The ABAC model is governed by the attributes and access policies. The access policy should be translated into the access structure. According to the definition of access structure [15], it is efficient to judge whether the requester's attributes meet the target's access requirements.
The way we translate the access policy to the access structure in our scheme is the same as the process in [12]. The access structure is represented by an access tree made of non-leaf nodes and leaf nodes. Each non-leaf node of the tree represents a threshold gate k and the number of children nodes n, where 0 < k ≤ n. When k = 1, the node can be seen as an OR gate, and when k = n, it becomes an AND gate. Each leaf node is composed of a threshold value k = 1, and one of the attributes described in the access policy, which is denoted as att_i [12,16].
Then, we modify the access tree to meet the collaboration requirements in our work by introducing a collaboration node, as shown in Figure 1. The collaboration node (CN) is designed to be a leaf node. The feature of verifiable and controlled collaboration lies in a key modification, whereby CN additionally stores the identity of the group, denoted as GroupId. The GroupId is used to restrict collaboration in a certain group. In our scheme, devices in the same group are allowed to provide collaborative attributes in order to help the requester obtain secure authorization.
Let T be an access tree with root node γ. Then, we designed an efficient algorithm, Satisfy(L), to compute whether a list of attributes L satisfies access tree T. We execute the algorithm from the root node γ recursively. If x is a non-leaf node, we obtain the result of Satisfy x (L) by computing Satisfy x' (L) for all children x' of node x. Satisfy(x) evaluates TRUE when at least k X children nodes returned by Satisfy x '(L) are TURE. If x is a leaf node, Satisfy x (L) returns TRUE only if att_i belongs to L. Additionally, for the collaboration node x C , the GroupId stored in x C is used to verify whether the provider of att_i belongs to the GroupId. If so, Satisfy Xc (L) also returns TRUE.

Blockchain Technology
The blockchain plays an important role as a distributed database that is used to provide credible and public digital credentials. Blockchain technology has the following features:

1.
Decentralization: The decentralized architecture of the blockchain has great advantages in its scalability and flexibility. Moreover, there is no need to rely on a central authority to build trust among participators in the blockchain. All transactions recorded by the public ledger will be validated by all peers to reach a consensus.

2.
Distribution: All peers in the blockchain preserve a digital and public data ledger, which eliminates the problem of a single-point failure.

3.
Security: The blockchain is tamper-proof and secured by cryptographic tools. All information recorded in the blocks cannot be manipulated.
We chose a consortium blockchain [17] project called Hyperledger Fabric [18] to construct our blockchain network. Compared with the public blockchain, the consortium blockchain executes more efficient and less expensive consensus algorithms, such as the Kafka and Raft [19]. These algorithms deal with thousands of transactions per second, which make the consortium blockchain more efficient for validating transactions and forming new blocks. The features of the consortium blockchain are appropriate for the efficiency required in our scheme [20,21].

Related Works
Our proposed method, concentrating on the issue of unauthorized access in IoT environments, requires the collaboration of the blockchain and access control. Therefore, we explore a combination of these two research scopes by presenting the previous research and comparing related works to our proposed scheme.
Novo [5] proposed a distributed blockchain-based authorization scheme to manage devices in IoT. A special design was presented in his work to avoid integrating the blockchain into IoT devices, which provides great inspiration to the design of our scheme. This design extends the application of blockchain technology to more wide-ranging IoT scenarios [5], especially for resource-constrained devices. Ouaddah [22,23] described a blockchain-based authorization scheme named FairAccess. Smart contracts were used to trade fulfillments of access control policies for access tokens. The authors included IoT devices in the blockchain but did pursue the real-time authorization issue or the efficiency of the scheme. Xu [24] proposed a decentralized, federated capability-based access control mechanism using a smart contract. This scheme is scalable, light-weight, and supports hierarchical and multi-hop delegation. The Control Chain in [25] is user transparent, user-friendly, fully decentralized, and fault-tolerant. However, it has to maintain four different blockchains to perform access control, and the efficiency of the scheme was not proven in their work.
To the best of our knowledge, the only previous work that also utilized blockchain and the ABAC model to handle the issue of real-time authorization for IoT is [21]. However, the methods in [21] that are used to integrate the ABAC model into IoT scenarios are totally different from our scheme and the differences are threefold. First, we translate the access policy into an access tree and do not need to forward the attributes list during an authorization request; this makes the authorization process controlled and efficient. Instead, the work in [21] requests the device to select the satisfied subset of the policy by itself, whose performance and reliability have not been proven theoretically. Second, our scheme can meet the demands of collaborative authorization, which was not included in [21]. Moreover, our collaboration process is efficient and secure based on the special design of the access tree. Third, our scheme constructs authority nodes to execute computation tasks and delegate IoT devices to interact with the blockchain. However, the devices used in [21] had to query and invoke the chaincode by themselves.

Overview of Our Proposed Access Control System
To facilitate understanding, the system in which we implemented our proposed scheme will be detailed in this section, as presented in Figure 2. A brief introduction is given before the comprehensive description that is provided in Sections 3.1-3.6. Then, the main authorization process supported the five constituents aforementioned is shown in Figure 2 and can be briefly summarized as follows: The requester sends the access request to the target; Then, the target forwards the access information to the AN; The AN will send the transaction to invoke the chaincode to record the access information and transmit the response to the requester. The requester signs the required information using the private key and builds the exchanged access information. This information will be sent to the AN to successfully satisfy the access policy. Every AN can handle the request, due to the fact the access information stored in the  We explain the relationships between these components. Our blockchain network includes authority nodes and common nodes. The blockchain information denoted as the public ledger will be copied and recorded by all relative participants in the blockchain. IoT devices belong to a certain group and will be allocated with a group ID and an IP address. With this information, the IoT devices in our system can communicate with the devices in any group. The majority of IoT devices are resource-constrained and cannot store the public ledger [5]. Therefore, we separate IoT devices from the blockchain and introduce authority nodes to function as the blockchain clients, which take the responsibility of interacting with the blockchain network on behalf of the IoT devices. Additionally, a chaincode is deployed on the authority nodes in our system. Transactions are sent to query or invoke the chaincode by clients to maintain the distributed public ledger. The access tree is built from the access information collected from the public ledger by the authority node (AN).
Then, the main authorization process supported the five constituents aforementioned is shown in Figure 2 and can be briefly summarized as follows: 1.
The requester sends the access request to the target; 2.
Then, the target forwards the access information to the AN; 3.
The AN will send the transaction to invoke the chaincode to record the access information and transmit the response to the requester. 4.
The requester signs the required information using the private key and builds the exchanged access information. This information will be sent to the AN to successfully satisfy the access policy. Every AN can handle the request, due to the fact the access information stored in the public ledger in Step 3 is distributed and available without a single point failure.

5.
Afterward, the AN will query the chaincode and retrieve the registered access credentials to verify the validity of the requesters' identity and the target's access policy. Then, the AN constructs the access tree to make authorization. 6.
Finally, the AN will record the final access information with the authorization result to the blockchain and send the result to the requester.
Last, we present the organization of our description of our system. Sections 3.1-3.5 describes the above-mentioned five important constituents. Section 3.6 introduces assumptions in our system, including the threat model and the security model. The detailed description is listed as follows.

Consortium Blockchain Network
The design of the consortium blockchain network is described in this part. The blockchain network constructed by the Hyperledger fabric works as a distributed database to provide reliable digital credentials for IoT devices. The nodes in this certain consortium blockchain can be categorized as Certificate Authority (CA) nodes, Order nodes, and Peer nodes. Peer nodes can be further divided into Committer, Endorser, Leader, and Anchor nodes. All the peer nodes will function as Committers to record a copy of the blockchain. All these nodes have their own duties and work together to sort the transactions, generate new blocks, and finally reach a consensus. We construct ANs as endorser nodes, and the other nodes are denoted as common nodes in our system. The blockchain client is installed on the authority node and utilized to query and invoke the chaincode by sending transactions. All the query and invoke operations will be recorded in the form of transactions in the blocks.

Authority Nodes
The authority node (AN) has two important functions in our scheme. Firstly, the AN acts as an endorser peer [18] in this consortium blockchain. The chaincode is installed in it to provide a blockchain service that generates trustworthy digital accounts for registered devices by maintaining a key-value state database. The devices' public keys, attributes, access policies, and other digital credentials will all be registered by sending transactions to the blockchain. Once the transactions are validated by other nodes, the devices' accounts will be updated accordingly. Secondly, the AN deployed near IoT networks is also a credible hub. It not only assigns the attributes to devices but also takes responsibility for policy construction and decision making. Moreover, for distribution, we allocate public IP addresses to the ANs so that the ANs can be reached by IoT devices in different groups to transmit the message through the blockchain and provide distributed, reliable, and scalable services. The ANs can be gateways, personal computers, servers, or even smart phones, which are relatively rich in resources.

IoT Devices
We explain the requirements of IoT devices in our scheme. Each IoT device should possess an Elliptic Curve Cryptography (ECC) key pair. Although separated from the blockchain network, these devices possess their own individual blockchain accounts to record registered information, including attributes and access policies. Only if a requester's authorized attributes satisfy the target device's access policy will access be permitted. The address of a device's account is produced by computing the hash of the device's identity, denoted as Hash (IDs). Accordingly, the device's identity ID is generated from the ECC public key.

Chainchode and Public Ledgers in the Blockchain
Our proposed system is supported by a chaincode instanced on the authority node. We present the main functions of the chaincode by describing the data structure of the public ledgers that it maintained. The chaincode is invoked or queried by the blockchain client and generates new transactions. Then, the changes of the data brought by these transactions will work together to maintain a key-value state database, which is denoted as the public ledger. There are three closely related key-value databases maintained in our scheme, including Device, Attribute, and Access. Their data structures are marked as red in Figure 3, and the descriptions are listed as following: Electronics 2020, 9, x FOR PEER REVIEW 7 of 22 blockchain service that generates trustworthy digital accounts for registered devices by maintaining a key-value state database. The devices' public keys, attributes, access policies, and other digital credentials will all be registered by sending transactions to the blockchain. Once the transactions are validated by other nodes, the devices' accounts will be updated accordingly. Secondly, the AN deployed near IoT networks is also a credible hub. It not only assigns the attributes to devices but also takes responsibility for policy construction and decision making. Moreover, for distribution, we allocate public IP addresses to the ANs so that the ANs can be reached by IoT devices in different groups to transmit the message through the blockchain and provide distributed, reliable, and scalable services. The ANs can be gateways, personal computers, servers, or even smart phones, which are relatively rich in resources.

IoT Devices
We explain the requirements of IoT devices in our scheme. Each IoT device should possess an Elliptic Curve Cryptography (ECC) key pair. Although separated from the blockchain network, these devices possess their own individual blockchain accounts to record registered information, including attributes and access policies. Only if a requester's authorized attributes satisfy the target device's access policy will access be permitted. The address of a device's account is produced by computing the hash of the device's identity, denoted as Hash (IDs). Accordingly, the device's identity ID is generated from the ECC public key.

Chainchode and Public Ledgers in the Blockchain
Our proposed system is supported by a chaincode instanced on the authority node. We present the main functions of the chaincode by describing the data structure of the public ledgers that it maintained. The chaincode is invoked or queried by the blockchain client and generates new transactions. Then, the changes of the data brought by these transactions will work together to maintain a key-value state database, which is denoted as the public ledger. There are three closely related key-value databases maintained in our scheme, including Device, Attribute, and Access. Their data structures are marked as red in Figure 3, and the descriptions are listed as following:  (1) Device database: When a device is registered, the device's address, denoted as Hash (Id), will be the index in the database. The detailed registration credentials, including the device's public key, Attribute library, device's access policy, IP address, groupId, and Access history, will be recorded as the value in the form of Device Account, as presented in the top of Figure 3.
(2) Attribute Database: When an attribute is registered, the attribute will be indexed by the attribute name. The value, recorded in the form of Attribute Account, is composed of the attribute name and the owner list. When an attribute is assigned to a device, the identity of the device will be added to the owner list. At the same time, the attribute name will be assigned to an owner and stored in its related Attribute library, which is contained in the Device Account mentioned above.
(3) Access Database: The access information sent by the requester will also be stored in the blockchain during the authorization process. The blockchain is utilized to transmit these data reliably and trustfully. The key of the database is the identity of the access request and the data structure of (1) Device database: When a device is registered, the device's address, denoted as Hash (Id), will be the index in the database. The detailed registration credentials, including the device's public key, Attribute library, device's access policy, IP address, groupId, and Access history, will be recorded as the value in the form of Device Account, as presented in the top of Figure 3.
(2) Attribute Database: When an attribute is registered, the attribute will be indexed by the attribute name. The value, recorded in the form of Attribute Account, is composed of the attribute name and the owner list. When an attribute is assigned to a device, the identity of the device will be added to the owner list. At the same time, the attribute name will be assigned to an owner and stored in its related Attribute library, which is contained in the Device Account mentioned above.
(3) Access Database: The access information sent by the requester will also be stored in the blockchain during the authorization process. The blockchain is utilized to transmit these data reliably and trustfully. The key of the database is the identity of the access request and the data structure of the Electronics 2020, 9, 285 8 of 22 value is Access Account, as shown in the middle of Figure 3. When the authorization result is finally recorded, the access Id will be stored in Access history.
In general, the chaincode in blockchain will maintain these three databases, with the purpose of providing credible credentials and transmitting the data trustfully. In addition, the changes in Attribute Database and Access Database will update the Device Database dynamically.

Access Tree
The access tree is detailed from three aspects, including its data structure, the collaborative node, and the reconstruction mechanism. In our scheme, each device can define the access policy according to its own requirements. The access policy is required to be translated into the access tree. For collaboration, the collaborative node is introduced, as well as a mechanism that reconstructs the access tree for verification.
(1) Access Tree: For illustration purposes, we take advantage of an access policy, as shown in the top of Figure 4a. The policy is specially described by a string and will be transformed into an access tree by the AN. The access tree contains three kinds of nodes: the root node, the leaf node, and the non-leaf node. The data structure of the node is shown in the left side and has the threshold (k), the number of the child nodes (n), the groupId, and two flags that are used to judge the state of the node during the process of decision making. In addition, the data structure of Attribute in a node is displayed on the right side. When the access tree is initialized, the policy string is split, and the information of each node is stored in the form of a string array. Every node is in turn constructed based on the array from the leftmost leaf node to the root node. The understanding of the construction process of the access tree should be combined with the definition in Section 2.1.
In general, the chaincode in blockchain will maintain these three databases, with the purpose of providing credible credentials and transmitting the data trustfully. In addition, the changes in Attribute Database and Access Database will update the Device Database dynamically.

Access Tree
The access tree is detailed from three aspects, including its data structure, the collaborative node, and the reconstruction mechanism. In our scheme, each device can define the access policy according to its own requirements. The access policy is required to be translated into the access tree. For collaboration, the collaborative node is introduced, as well as a mechanism that reconstructs the access tree for verification.
(1) Access Tree: For illustration purposes, we take advantage of an access policy, as shown in the top of Figure 4a. The policy is specially described by a string and will be transformed into an access tree by the AN. The access tree contains three kinds of nodes: the root node, the leaf node, and the non-leaf node. The data structure of the node is shown in the left side and has the threshold (k), the number of the child nodes (n), the groupId, and two flags that are used to judge the state of the node during the process of decision making. In addition, the data structure of Attribute in a node is displayed on the right side. When the access tree is initialized, the policy string is split, and the information of each node is stored in the form of a string array. Every node is in turn constructed based on the array from the leftmost leaf node to the root node. The understanding of the construction process of the access tree should be combined with the definition in Section 2.1.
(2) Collaborative Node: When the target needs to set the B1 as the collaborative node, the access policy should be modified as shown in Figure 4b. More specifically, during the construction of the collaboration node, the target will set the collaborative flag to be true and add the required groupId to the node. Thereby, the collaborative node helps to restrict the collaboration in a certain group.
(3) Reconstruction Mechanism: Last, we introduce a reconstruction mechanism that modifies the access tree as presented in Figure 4c. During reconstruction, we will remove the collaboration node from the subtree. Correspondingly, the father of the collaboration node will modify the k and n to accommodate to the new tree. This mechanism is frequently used to judge whether the requester is allowed to request extra authorization. (   (2) Collaborative Node: When the target needs to set the B1 as the collaborative node, the access policy should be modified as shown in Figure 4b. More specifically, during the construction of the collaboration node, the target will set the collaborative flag to be true and add the required groupId to the node. Thereby, the collaborative node helps to restrict the collaboration in a certain group.
(3) Reconstruction Mechanism: Last, we introduce a reconstruction mechanism that modifies the access tree as presented in Figure 4c. During reconstruction, we will remove the collaboration node from the subtree. Correspondingly, the father of the collaboration node will modify the k and n to Electronics 2020, 9, 285 9 of 22 accommodate to the new tree. This mechanism is frequently used to judge whether the requester is allowed to request extra authorization.

Threat and Security Model
In this part, we detail the models and assumptions in our system, which will enhance the trustworthiness as well as the security of the proposed scheme. We first summarize four types of attacks that aim at obtaining access authorization based on the threat model. Then, we introduce our security model by proposing several security assumptions for our system, in order to achieve the goal of resisting the attacks threating access authorization.

Threat Model
The threat model is based on the widely-used Dolev-Yao model [26]. In our model, each IoT device belongs to a certain group and is able to communicate with other devices and exchange the packets inside or across the group through an open and unreliable channel. However, there are no security methods able to protect an open channel. That is to say, an attacker can read, modify, drop, or inject network messages in an open channel. Our threat model also has similar abilities to the model in [27,28]. The main difference is that the attacker will try to satisfy the access policy by obtaining or using attributes illegally [13].
The main goal of the attacker is to obtain authorization privileges for the target, although the attacker is assumed to control the open channel [26,27] based on the threat model mentioned-above. Therefore, we are interested only in attacks threatening the authorization process. Attacks that block the open channel or deny service (DoS/DDoS) are not under discussion [28]. Our scheme is effectively resistant to various types of attacks:

1.
Collusion Attack: Devices may be untrusted and have the chance to collude with other devices.
To satisfy the access policy, the attacker may try to collect enough attributes from other devices.

2.
Malicious Collaboration Attack: An attacker may use attributes illegally and propose a malicious collaboration, where the behavior is inherently unwanted or the extra attributes requested are from undefined groups.

3.
Relay Attack: An attacker may choose to record some packets, such as signatures, during the transmission process and reply to them in another request. Since the messages are generated by valid users, there is a possibility that this information can satisfy the verification and help obtain illegal authorization.

4.
Message Substitution Attack: An attacker may create a false identity to impersonate a certain device in the open channel in order to use one's privilege. More problematically, valid messages may be intercepted and altered intentionally so that the target cannot perceive the forgery of the information and will accept them as usual.

Security Model
The security model consists of several reasonable assumptions of the system. The ANs are assumed to be semi-honest [28] and always available. More specifically, the algorithms in our scheme will be executed correctly by the ANs, which are intended to be curious and honest and try their best to infer and obtain sensitive information [13]. In addition, the AN will store its private key securely. IoT devices are usually exposed to malicious attacks and are viewed as untrustworthy participators in our scheme. In our security model, we assume that IoT devices will not suffer from physical attacks under the protection of the solutions proposed in [29,30]. This means that IoT devices can secretly store sensitive information, such as private keys. The assumptions in our scheme has many similarities to the ones proposed in [5,21]. The main difference lies in the blockchain network.
From the perspective of the blockchain network, the scope of the security assumption is extended and is different from the model in [21], which resists Byzantine failures. We assume that the blockchain network in our system is safe, as in [5,31], which means that the security model of the blockchain network can be alternated according to the consensus algorithm that it uses. Transactions proposed by blockchain clients should be correctly recorded to form new blocks and also maintain the state of the database. Based on the assumptions of the system, the scheme implemented should be trustworthy and secure.

Proposed Access Control Scheme
In this section, we detail our proposed access control scheme implemented in the above-mentioned system. The integrated authorization process is divided into four different phases, including system initialization, registration, authorization, and collaboration. These phases will be explained as follows.

System Initialization Phase
We initialize each IoT group and the authority node individually using the following steps: 1.
The AN chooses a non-singular elliptic curve Ep(a,b) over a prime finite field Z p , in which the elliptic curve discrete logarithm problem is difficult. Then, the AN selects a base point P of order n over Ep(a,b) such that n*P equals a zero point or a point in infinity.

2.
The AN randomly selects the ECC private key priKey∈Z p * and obtains its public key Q = priKey*P.
Moreover, we use a collision-resistant one-way cryptographic hash function, denoted as Hash, which maps a bit string with a flexible size into a new bit string of a fixed size.

3.
Lastly, the AN acquires its ECC private key priKey, and the system parameters {Ep(a,b), Q, P, p, Hash} are made public.

Registration Phase
After the initialization of the system, devices' credentials are registered in the blockchain in this phase. The related three operations should be performed in a secure and private environment.

1.
Each device generates its own ECC key pairs and sends its registration parameters {ID, GroupId, L, PK, Policy, IP address} to the AN. L represents a list of the device's attributes, and Policy is denoted as the access policy.

2.
Then, the AN generates the address of each device's account in the blockchain by computing the hash of the identity: Address = Base68Check(ID).
3. Afterward, the AN authorizes the device's attributes and invokes the chaincode to upload the device's digital credentials to Device database, as explained in Section 3.4. Thus, this information stored in the blockchain is credible and trustworthy.

Authorization Phase
At first, we will explain how multiple participators authenticate each other and establish session keys to protect open channels before the introduction of our authorization process. We utilize an authentication and key agreement (AKA) scheme based on the blockchain, the ANs' public parameters, the devices' digital accounts, and the Elliptic Curve Integrate Encrypt Scheme (ECIES) [32]. The AKA scheme will establish session keys for each access request, which is specially designed for the system architecture. However, this paper concentrates on the issue of authorization for IoT devices. Thus, we omit detailed descriptions of the AKA scheme and only give a performance analysis in Section 6. Indeed, the AKA process can also be operated using other well-known and outstanding schemes for IoT. Wazid et al. [33] proposed a secure and very light-weight three-factor authentication scheme that applies smart cards, passwords, and personal biometrics, which proves to be secure formally. Aman et al. [34] proposed a mutual authentication scheme using physical unclonable functions (PUFs). The scheme contributes to establishing session keys between a device and a server or two devices.
The identity-based authentication scheme [35] is also efficient upon verification of the device's identity. In summary, our choice of the AKA scheme will not influence the security and performance analysis of our authorization process.
The authorization process between devices S Re and S Target is performed, as shown in Figure 5, where En{*} and De{*} stand for the symmetric encryption activity AES-128, and Sig{*} and Ver{*} are the operations using an elliptic curve digital signature algorithm scheme (ECDSA). The operations conducted by the related objects are itemized in a rectangle. The arrows in Figure 5 show the directions of data flow.  The authorization process includes five steps: Firstly, the requester generates a random number as the ID to label each access request. Session keys (SK1, SK2) will then be established and stored through the AKA process. SK1 is used to protect the open channel between the IoT devices, and SK2 guarantees communication between the devices and authority nodes. The requester sends its identity IDRe and access number ID, as well as its signature Sig {ID|| IDRe) }prikRe, signed by the requester, to the target: The target decrypts the packet and verifies the signature, generates a random number N, chooses the access policy P, and calculates the hash of all the required information as shown in Equation The AN decrypts the packet and verifies the hash. Then, the chaincode deployed in the AN will be invoked. The access history forwarded by the target will be recorded temporarily, except for the result. As is known to us, the information stored in the blockchain ledger is tamper-proof and distributed. Thus, the access history can be trustfully and reliably queried by each AN, Figure 5. The authorization process of our proposed attribute-based access control scheme between two devices using a blockchain in an IoT scenario.
The authorization process includes five steps: 1. Firstly, the requester generates a random number as the ID to label each access request. Session keys (SK1, SK2) will then be established and stored through the AKA process. SK1 is used to protect the open channel between the IoT devices, and SK2 guarantees communication between the devices and authority nodes. The requester sends its identity ID Re and access number ID, as well as its signature Sig {ID|| ID Re ) }prik Re, signed by the requester, to the target: En { ID, ID Re, Sig {ID|| ID Re ) } prik Re } SK1. 2.
The target decrypts the packet and verifies the signature, generates a random number N, chooses the access policy P, and calculates the hash of all the required information as shown in Equation (3). Then, the target builds the packet and send it to the AN: En { N, P, ID Re , ID, ID Target , Hash(N, P, ID Re , ID, ID Target )} SK 2. 3.
The AN decrypts the packet and verifies the hash. Then, the chaincode deployed in the AN will be invoked. The access history forwarded by the target will be recorded temporarily, except for the result. As is known to us, the information stored in the blockchain ledger is tamper-proof and distributed. Thus, the access history can be trustfully and reliably queried by each AN, which will be used in Step 5 later. Moreover, the random number N should be a unique index in the Access Database in the blockchain ledger. A new random N needs to be generated by the target until the access information can be successfully recorded. After finishing these computational tasks, the AN then transmits the packet in Equation (4)  If Algorithm 1 returns TRUE, the AN will continue calculating Algorithm 2 to make the access control decision. The input of Algorithm 2 includes the attribute list L Re and the policy P Target obtained above. In Operation 1, the access policy described by a string is then transformed into an access tree, as explained in Section 2. The data structure of the node and the tree is shown in Figure 4. Then, Operation 2 in algorithm computes the Satisfy function also described in Section 2.1 and judges whether the attribute list can satisfy the access tree. Finally, the AN will invoke the chaincode to record the authorization result to its history in the blockchain. If Algorithm 1 returns FALSE, the access request will be denied.

Algorithm 2 Make the authorization decision.
Input: The attribute list L Re , a policy of string P Target Output: The result of the authorization Ares 1: Transform string P to the access tree from the leaf nodes to the root node and construct each node according to Figure 4a. 2: Calculate the function Satisfy (root, L Re ) recursively, starting from the root node to the leaf node, and finally obtain the root 3: Ares = root.isSatisfiable (one field in the data structure of the node) However, if Algorithm 2 returns FALSE, S Re does not have enough attributes and has no right to access S Target individually. Therefore, we designed an efficient collaboration mechanism to help S Re apply for extra authorization.

Collaboration Phase
In this phase, we mainly introduce a mechanism that makes contributions to detect malicious collaboration and restrict behaviors to a certain group. When the access request is denied by the aforementioned authorization phase, our scheme comes to the collaboration phase that requires a trustworthy collaboration. Hence, a verifiable and controlled collaboration mechanism is proposed, as presented in Figure 6. The entire mechanism consists of four steps:

1.
When Algorithm 2 in the authorization phase returns false, a collaboration request is applied. The AN will reconstruct another access tree by removing the collaborative nodes from the leaf nodes. Afterward, the threshold k and the number n in the non-leaf node should be altered accordingly, as demonstrated in Figure 4c. This means that the only collaborative attributes needed by the requester are located in the removed collaboration nodes, so malicious collaboration can be detected easily. The reconstruction mechanism is explained in Section 3.5. Then, Algorithm 2 is utilized to make the decision again, and AN sends the result {res, L co } to S Target , while L Co is a list composed of the attributes needed during collaboration: En { ID, N, {res, L Co }, Hash(ID||N||{res, L Co }) } SK2. 2.
If the result of the collaboration request is TRUE, the requester will use the attributes received to find the collaborator and perform the AKA process to establish session keys. Or else, the request is denied as well as the access request. Then, the requester transmits the packet in Equation (7) to the collaborator. The L Co is the attribute list that should be provided by the collaborator and N used to label the access request remains unchanged: En {ID, N, L Co , Hash(ID||N||L Co ,)} SK1. 3.
The collaborator obtains the L Co and generates the attribute map M Co {ID Co , L Co }. More importantly, the collaborator will set its groupId for each attribute in L Co . Because the collaboration should be allowed in an assigned group. Then, the collaborator computes the signature Sig{N||Hash(M Co )}priK Co and sends the packet to the AN:

4.
The AN decrypts and obtains the N, M Co, and the signature. Then, the collaborator's credentials {L Co ' ' , groupId Co } are collected from the Device Database in the blockchain. We explain the operation in Algorithm 3. After initialization in Operation 1, the Operation 2 in Algorithm 3 traverses the attribute list L Co received from the collaborator. For each attribute, we verify whether it belongs to the attribute list L Co ' stored in the blockchain. Moreover, the groupId in each attribute should equal to groupId Co . Then, in Operation 3 and 4, the validity of N and M co is verified in the same way it was in Operation 2 and 3 in Algorithm 1. In Operation 6, we combine the attribute list L Re with L Co and construct the new list L Re + Co based on the data structure of Attribute in Figure 4a. Finally, we use the Satisfy function again and input the root node as well as the new list L Re + Co to get the authorization result.
needed by the requester are located in the removed collaboration nodes, so malicious collaboration can be detected easily. The reconstruction mechanism is explained in Section 3.5. Then, Algorithm 2 is utilized to make the decision again, and AN sends the result {res, Lco} to STarget, while LCo is a list composed of the attributes needed during collaboration: En { ID, N, {res, LCo}, Hash(ID||N||{res, LCo}) } SK2.
If the result of the collaboration request is TRUE, the requester will use the attributes received to find the collaborator and perform the AKA process to establish session keys. Or else, the request is denied as well as the access request. Then, the requester transmits the packet in Equation (7) to the collaborator. The LCo is the attribute list that should be provided by the collaborator and N used to label the access request remains unchanged: En {ID, N, LCo, Hash(ID||N||LCo,)} SK1.
IoT Device  The collaborator obtains the LCo and generates the attribute map MCo {IDCo, LCo}. More importantly, the collaborator will set its groupId for each attribute in LCo. Because the The collaboration mechanism returns the result of the collaboration phase. The result will be recorded in the blokchain and update the Access database accordingly.

Security Analysis
After explaining the whole process of our proposed scheme, a security analysis is made in this section. We theoretically analyze how our scheme can efficiently resist the attacks proposed by the thread model in Section 3.6.1 based on the security model in Section 3.6.2. Since the main goal of an attacker is to gain the authorization to access a target, four kinds of attacks that can be efficiently resisted are detailed in this section.

Collusion Resistant
The access control scheme should be protected from the collusion access request. We record each device's attributes in the blockchain and ensure that these digital credentials are credible. The requester cannot use other devices' attributes (attributes that help satisfy the access tree to obtain real-time access authorization). For example, S i utilizes S j 's attributes to construct the attributes map {ID Si : (att_i) i∈Si , (att_j) j S }. The AN will then use ID Si to compute the device's address and query the account in the blockchain to obtain S i 's registered attributes. In this way, collusion can be easily detected.

Verifiable and Controlled Collaboration
Our access control scheme can also resist malicious collaboration requests. On one hand, collaborative devices should be in the pre-defined group. These devices provide attributes signed by their private keys to help authorization. Thus, devices in other groups are unable to provide a valid signature. On the other hand, during the collaboration phase, the AN will reconstruct the access tree to verify whether the collaboration requester is malicious. We use the example in the introduction section to explain this process. The device {Security Department. Surveillance, Enterprise B} can collaborate with the attributes {Manager, Enterprise A} to gain permission according to the collaboration policy in Figure 1. However, this should be considered malicious behavior from the viewpoint of device security. Therefore, we propose a verifiable mechanism to reconstruct the access tree and remove the collaborative node {Manager} from the tree and modify the threshold value from (2, 3) to (1,2). Obviously, the device cannot satisfy the new access tree and is not allowed to request collaboration.

Reply Attack Resistant
Our scheme can defend the relay attack effectively. With the purpose of acquiring authorization, the attacker will try to reply to the signature and attributes obtained in Step 4. However, when preparing the attributes in Step 4, each requester has to use a private key to compute the signature Sig{ N||Hash(M Re )}prik Re . A random number N is unique and generated for each request by the target. Thus, the attacker should calculate Sig{ N' || Hash(M Re ) }prik Re to pass Algorithm 2, with N' denoted as the ID of the access sent by the attacker. Due to the fact that the attacker does not have the private key to obtain the required information, the attack is resisted.

Message Substitution Attack Resistant
Our scheme will not be threatened by the message substitution attack. If a message substitution attack is performed, it is highly possible that that the attacker will intercept the valid message sent by the target in Step 2 and substitute access policy P and the hash result. However, the AN can easily verify the correctness of the policy by querying the chaincode in Algorithm 1 and detect if the altered policy does not belong to the target.

Supervision and Revocation
The functions of supervision and revocation are also available. For supervision, the AN will send transactions to record the access history in the ledger and update the target's account. In this way, effective actions can be taken instantly to find the attackers and punish them by analyzing this information. Moreover, depriving a user of access rights can be seen as the revocation of attributes. The AN will validate the revocation request and send transactions to update the devices' accounts.

Performance Analysis
We implemented a proof-of-concept prototype, conducted an experiment, and evaluated the performance of the proposed scheme. Based on the access policy shown in Figure 4, we chose four cases, which were also utilized by [13], to perform our scheme. Case 1: There is no need to collaborate and the requester's attributes can satisfy the tree. The conditions are the same as those in Figure 4a. Case 2: The target modifies the access policy shown in Figure 4b. Thus, the collaboration node appears in B1. Case 3: The target continues to transform the A1, and the number of collaboration nodes increases to 2. Case 4: The number of the collaboration nodes increases to 3, and these nodes appear in A22, A1, and B1. Following these four different cases, we finished our experiment and obtained the performance results of our proposed scheme.
We first introduce the configuration of our experiments. Then, we evaluate the storage and computation overhead of IoT devices to show that our scheme accommodates IoT scenarios well. Last, the comprehensive analysis of our scheme, including the time cost of our scheme and the performance of the chaincode, is demonstrated to prove the proposed scheme is efficient and scalable.

Experiment Configuration
The configuration of the experiment is presented in this part. It is necessary to demonstrate how we set up the prototype. We constructed the blockchain network using Hyperledger Fabric v1.1. The network of the prototype is composed of one order node, one CA node, four peer nodes, and one channel. The chaincode that maintains the device accounts was installed and instantiated in all peer nodes. We implemented it on a CentOS 7 virtual machine with 2 GB RAM, which was built from a desktop with an Intel core i7-4510U at 2.80 GHz. In our experiment, we deployed a blockchain client on an authority node using a Java-sdk, and the client connecting the peer node was utilized to query or invoke the chaincode. The chaincode was implemented by Golang and deployed on all peers. The other functions provided by the AN were realized in Java 1.8. According to the system model described in Section 3, the AN should be one of the peer nodes in the blockchain. However, we did not build the AN as a peer node in the blockchain for testing purposes. The AN was implemented on an ASUS laptop with 8 GB RAM and an Intel Core i5-7200U at 2.71 GHz. We used three Raspberry Pi 3B+ units with 1GB RAM and CPU at 1.4GHz to serve as IoT devices, and all their functions were also implemented in Java 1.8. The network configuration of our experiment is presented in Table 1. The devices in our experiment were deployed in the same group and were managed by the same gateway, which has an IP address of 192.168.1.1. Communication across a network segment can be supported by constructing IP tables in the ANs.
In our experiment, various cryptographic algorithms and blockchain operations were performed by ANs and Raspberry Pis. For the evaluation, we used a string of 1082 bytes to build a standard for each algorithm in the experiment. Table 2 presents the time consumptions for each computational task.

Device Evaluation
The overhead of IoT devices is evaluated in this section. As noted earlier, the majority of the IoT devices are resource-constrained. Thus, our scheme is designed to be light-weight in storage and computation in order to accommodate IoT scenarios. We compute the storage overhead of the initial configuration file as well as attributes and session keys required during the authorization process in this part. Each device should store a configuration file that contains an access policy, ID, IP address, groupId, and a pair of ECC keys. A configuration file containing a fixed access policy with 12 nodes is only 1082 bytes. The storage of attributes is presented in Figure 7a. Even if the number of attributes (encoded by UTF-8) reaches 30, the attributes list is only 1616 bytes.

Device Evaluation
The overhead of IoT devices is evaluated in this section. As noted earlier, the majority of the IoT devices are resource-constrained. Thus, our scheme is designed to be light-weight in storage and computation in order to accommodate IoT scenarios.

Storage Overhead
We compute the storage overhead of the initial configuration file as well as attributes and session keys required during the authorization process in this part. Each device should store a configuration file that contains an access policy, ID, IP address, groupId, and a pair of ECC keys. A configuration file containing a fixed access policy with 12 nodes is only 1082 bytes. The storage of attributes is presented in Figure 7a. Even if the number of attributes (encoded by UTF-8) reaches 30, the attributes list is only 1616 bytes.
In our scheme, the target device has to store two AES-128 keys for each access from the requester. When the number of requesters grows, the storage overhead will also increase, as shown in Figure  7b. It takes about 1104 bytes to store session keys when there are 10 requesters. In general, the storage overhead of our scheme for IoT devices is reasonable.

Computation Overhead
The computation overhead of IoT devices is also evaluated in this part. We evaluate the computation overhead in IoT devices by comparing our scheme with that of Ding et al. [21]. Since the work in [21] proved applicable to IoT scenarios and was implemented on the embedded system, the result of the comparison is convincing to demonstrate whether the computation overhead of IoT devices in our scheme is reasonable. Therefore, we translated their scheme into our prototype and only evaluate the computation cost generated by cryptographic algorithms. All the cryptographic algorithms used in these two schemes are denoted with the following symbols: Tsig represents the cost to calculate the ECDSA sign, Tverify represents the cost to calculate the ECDSA verification, Thash represents the cost to calculate the hash function, Taes t represents the cost to calculate the AES-128 encryption and decryption, Taka represents the cost to perform the AKA process, and Tquery represents In our scheme, the target device has to store two AES-128 keys for each access from the requester. When the number of requesters grows, the storage overhead will also increase, as shown in Figure 7b. It takes about 1104 bytes to store session keys when there are 10 requesters. In general, the storage overhead of our scheme for IoT devices is reasonable.

Computation Overhead
The computation overhead of IoT devices is also evaluated in this part. We evaluate the computation overhead in IoT devices by comparing our scheme with that of Ding et al. [21]. Since the work in [21] proved applicable to IoT scenarios and was implemented on the embedded system, the result of the comparison is convincing to demonstrate whether the computation overhead of IoT devices in our scheme is reasonable. Therefore, we translated their scheme into our prototype and only evaluate the computation cost generated by cryptographic algorithms. All the cryptographic algorithms used in these two schemes are denoted with the following symbols: T sig represents the cost to calculate the ECDSA sign, T verify represents the cost to calculate the ECDSA verification, T hash represents the cost to calculate the hash function, T aes t represents the cost to calculate the AES-128 encryption and decryption, T aka represents the cost to perform the AKA process, and T query represents the cost to query the chaincode. T aka in our scheme takes about 77.36 ms, and the other symbols can be found in Table 1.
Thus, it is convenient to calculate each device's computational overhead separately and obtain the total rough time. Table 3 presents a comparison, and we can see that the time costs in [24] is linear to the number of attributes, while the total rough time is (88.12 + 19.2 n) ms, with n indicating the number of attributes. Without collaboration, the computation cost in our proposed scheme takes about 81.53 ms. The scheme is obviously more efficient because we reduce the number of the ECDSA signing and verifying operation to a constant. When collaboration is required, if the number of attributes increases to more than six, the total computation cost in three devices in our scheme will less than the cost in their scheme. In general, the comparison indeed proves that our scheme is efficient and applicable to IoT devices.

Time Consumption of Our Access Control Scheme
Next, we will evaluate the performance of our proposed access control scheme. The following experiments are composed of four cases, as described in Section 6.1, and the results are shown in Figure 8. As can be seen in Figure 8b, the time cost of the AKA process, in all four cases, remains approximately 310 ms. Moreover, in Figure 8c, the time of the decision-making (Algorithm 2) process and verification (Algorithm 2) process remains steady at 25 and 31 ms, respectively. This is because the number of attributes the requester submits to AN is the same in all four cases. In addition, the time of the co-decision (Algorithm 3) process increases with a change in the collaborative nodes from 1 to 3, caused by the fact that the AN receives more attributes from the collaborator and needs more time to make a decision. Therefore, all the algorithms proposed in our scheme are efficient and valid.
Without collaboration, the authorization time is minimal and reaches only 727.6 ms. The co-addition that records the additional time needed for collaboration increases from 487.5 to 542.2 ms as the number of the collaborative nodes grows. This growth rate is slow, and the time consumption is relatively small. If there are three collaboration nodes, the maximum time to permit authorization is about 1448.1 ms. Relatively, the additional time is only 542.2 ms. In general, this minor delay is worthwhile for collaborative authorization, and our scheme is, therefore, efficient. approximately 310 ms. Moreover, in Figure 8c, the time of the decision-making (Algorithm 2) process and verification (Algorithm 2) process remains steady at 25 and 31 ms, respectively. This is because the number of attributes the requester submits to AN is the same in all four cases. In addition, the time of the co-decision (Algorithm 3) process increases with a change in the collaborative nodes from 1 to 3, caused by the fact that the AN receives more attributes from the collaborator and needs more time to make a decision. Therefore, all the algorithms proposed in our scheme are efficient and valid.

Performance of the Chaincode
In this section, we evaluate and test our chaincode in a blockchain network, which influences the scalability of our access control scheme. Hyperledger Caliper [36], an open-source benchmark tool that supports measuring the performance of a blockchain network, is utilized in this evaluation. Theoretically, the throughput of Hyperledger fabric can reach 3500 TPS (transactions per second) [18]. However, restricted by our testing environments, we only introduce one order node in our prototype and execute the Solo consensus algorithm. Thus, the throughput of our system only reaches 100 TPS. Once deployed in an industrial environment, the throughput will be largely improved, and the performance of our system will exceed the results we obtained in our prototype.
To test the performance of the chaincode in our experiment, we use variable transaction sending rates, ranging from 50 to 300 TPS, with a fixed block size of 10. The results of the average latency of each transaction and throughput are presented in Table 4. We sent 1000 transactions to test both the query and invoke functions. When the actual send rate reaches 143 and 97 TPS, the throughput is highest, reaching 67 and 62 TPS. From the perspective of the time, the average latency of the query and invoke operations grow gradually, as can be seen in Figure 9. When the send rate increases, the system cannot deal with the transactions, and a delay occurs.
The collaboration process requires four query operations and two invoke operations. Accordingly, we can approximately calculate the number of concurrent requests. If the throughput is 3500, the system is theoretically capable of handling, at most, 583 collaboration access requests per second. This proves that our scheme is scalable and has the potential to meet high concurrent requirements. (a) (b) Figure 9. The result of two functions in the chaincode representing latency versus transaction rate: (a) query the chaincode to get information; (b) invoke the chaincode to record information.

Conclusions
In this paper, we proposed an attribute-based access control scheme to deal with the problem of unauthorized access, especially for IoT devices. Blockchain technology was utilized to provide credible credentials and transmit the access information trustfully. Furthermore, a verifiable and controlled collaboration mechanism was utilized to detect malicious behaviors and restrict the extra authorization for a certain group. To make our scheme fit IoT devices well, ANs were constructed for computation tasks and to query or invoke the chaincode.
The security analysis shows that our access control scheme can efficiently guarantee authorized access by resisting various attacks and providing a revocation and supervision function. The performance evaluation shows that our scheme is light-weight and appropriate for IoT devices because the storage overhead is acceptable, and the computation overhead was shown to be reasonable after the comparison. Moreover, our proposed access control is efficient and usually only costs 757.6 ms. The extra time generated by the collaboration is only slightly more than 500 ms. This minor delay is worthwhile to satisfy the need for collaborative authorization. The chaincode test further indicates that our scheme is scalable enough to meet high concurrent requirements.

Conclusions
In this paper, we proposed an attribute-based access control scheme to deal with the problem of unauthorized access, especially for IoT devices. Blockchain technology was utilized to provide credible credentials and transmit the access information trustfully. Furthermore, a verifiable and controlled collaboration mechanism was utilized to detect malicious behaviors and restrict the extra authorization for a certain group. To make our scheme fit IoT devices well, ANs were constructed for computation tasks and to query or invoke the chaincode.
The security analysis shows that our access control scheme can efficiently guarantee authorized access by resisting various attacks and providing a revocation and supervision function. The performance evaluation shows that our scheme is light-weight and appropriate for IoT devices because the storage overhead is acceptable, and the computation overhead was shown to be reasonable after the comparison. Moreover, our proposed access control is efficient and usually only costs 757.6 ms. The extra time generated by the collaboration is only slightly more than 500 ms. This minor delay is worthwhile to satisfy the need for collaborative authorization. The chaincode test further indicates that our scheme is scalable enough to meet high concurrent requirements.