{'fraction_non_alphanumeric': 0.03613989637305699, 'fraction_numerical': 0.0045336787564766836, 'mean_word_length': 4.740520446096654, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A revocable attribute-based access control system using blockchain

Attribute-based access control is an effective cryptographic mechanism that allows a data owner to perform attribute-level access control over users’ access capabilities. In the application background of blockchain, it is urgent to use attribute-based access control to solve a series of security problems. Although there exist several similar schemes, they do not consider attribute revocation. By adopting the attribute revocation technique based on binary trees, we extended Waters’ ciphertext policy attribute-based encryption (CP-ABE) scheme into a revocable CP-ABE (RCP-ABE) scheme. By combining our RCP-ABE with blockchain, we constructed a revocable attribute-based access control system. The new system supports expressive access control policies and allows the attribute authority to revoke users’ attributes or part of their attributes. The security analysis shows that the new system satisfies several ideal properties, i.e., forward security, backward security, confidentiality, and integrity.


Introduction
Cloud storage service is a typical application of cloud computing technology, which allows governments, enterprises, and individuals to outsource their business data to cloud service providers, thus significantly reducing the cost of data management and maintenance. Attribute-based access control [1,2] is a promising cryptography mechanism, which aims to use attribute-based encryption (ABE) to solve a series of security issues in the field of cloud storage services. In other words, data owners can use attribute-based access control systems to tackle the following main problems: (1) How to prevent cloud service providers and unauthorized users' access to sensitive data. (2) How to use attribute-based policies to constrain the access rights of legitimate users.
Blockchain is a distributed chained storage structure constructed by cryptographic hash functions. It realizes the immutability and traceability of on-chain data through collision-resistant hash functions. At the same time, it introduces consensus mechanisms to ensure the consistency of on-chain data [3]. With the popularity of blockchain applications, more and more data are stored in the blockchain. Therefore, when data owners use blockchain to achieve data sharing, the issue of fine-grained access control on data in the blockchain also needs to be solved. Recently, several blockchain-oriented data access control systems have been proposed. In [3], Wang et al. put forward a secure electronic health record system by combining ABE with blockchain and provided the application of their system in the field of insurance claims. In [4], Wang et al. proposed a distributed data access control system that used a consensus mechanism to select some nodes from the blockchain nodes to act as attribute authorities. In [5], Lu et al. proposed a data access control framework based on ABE and blockchain. Moreover, they provided performance analysis in the consortium chain environment based on Hyperledger Fabric. In [6], Qiu et al proposed an access control scheme based on blockchain. Their scheme was obtained by extending the Fabric-CA module in the super ledger. However, a main disadvantage of the above schemes is that they do not consider the issue of attribute revocation, i.e., it should allow the attribute authority to revoke all or part of a malicious user's attributes while ensuring that the access rights of other users who share the same attributes with the malicious user are not affected.

Our contribution
By extending Waters' ciphertext policy ABE (CP-ABE), we put forward a revokable CP-ABE (RCP-ABE). Then, we constructed an attribute-based access control system based on the new RCP-ABE scheme and blockchain. Compared with existing similar systems, our system has the following advantages: (1) It supports the flexible LSSS (Linear Secret Sharing Scheme) type access policy. (2) It allows the attribute authority to revoke all or part of users' attributes and meet the ideal forward security and backward security. (3) It inherits the unique decentralization, immutability, and traceability of blockchain.

Organization
In Section 2, we introduced the key techniques used in this article. In section 3, we propose a new RCP-ABE scheme that supports attribute revocation. In section 4, we constructed a new attributebased access control system based on our RCP-ABE and blockchain. In section 5, we provide the security analysis and performance analysis. Finally, we summarize in section 6.

Attribute-based encryption
Attribute-based encryption [7] is a kind of 1-to-many public key encryption. In such a scheme, the attribute authority generates attribute decryption keys for users based on their attributes. A data owner can define an attribute-based access policy and use it to encrypt sensitive data that they want to share. A user can decrypt successfully if he owns a set of attributes that meet the access policy defined by the data owner.

Attribute revocation technique based on binary trees
In [8], Hur et al. proposed an attribute revocation technique based on binary trees. To implement attribute revocation, a specific revocation authority RA needs to be introduced. RA forms attribute groups based on attributes (for example, all users with attribute  form group   ). Meanwhile, RA selects the group key GK  for   . GK  will be used to blind the elements (corresponding to the attribute  ) in users' attribute decryption key and ciphertext so that users can successfully execute decryption only if they own GK  . For each user t U in   , RA distributes GK  in the following steps: (1) Build a binary tree called key encrypting key (KEK) tree so that each user corresponds to a different leaf node. (2) Select a KEK for each node. (3) Select the minimum cover set of   (i.e., the nearest common ancestors of all user nodes in   ), and set the KEK of these nodes as the KEK of   , denoted as

Blockchain and inter planetary file system
Blockchain is essentially a chained storage structure, which makes use of a redundancy mechanism to make multiple blocks store the same data [4]. At the same time, blockchain adopts the mechanism of "the minority is subordinate to the majority" to ensure the consistency of data, i.e., to resist the 51% attack [9]. Since this kind of attack is almost impossible to succeed in a distributed blockchain structure, users' data in blockchain can be considered secure. Inter planetary file system (IPFS) is a peer-to-peer distributed file system, which can make up for the disadvantage that blockchain is not suitable for storing large volumes of business data. When data owners store their files in the IPFS system, they can get a storage address returned by the system. Thereafter, they encrypt the address by using CP-ABE and the resulting ciphertexts can be published in blockchain.

A new revocable CP-ABE scheme
We assume that the scheme in this section is constructed on the group pair 1 ( , ) T   , and there exists a bilinear mappingê , s.t., 1 1 :  and T  are prime cyclic groups of order p. In addition to RA and users, there are two types of participants, where AA represents an attribute authority and DO represents a data owner.

Setup
AA performs the following steps: (1) Define the attributes universe

Key generation Phase 1: Decryption key generation
In this phase, AA generates the decryption key SK S for user t U who owns an attribute set S. The specific steps are as follows: (1) t U provides S to AA.
(4) Generate a header message

Data decryption
Assume that a user t U has the decryption key (2) For each attribute  in Hdr, find the ciphertext