Abstract
It is the most important and challenging problem to share the data safely in cloud computing. Some so-called trusted third parties may also infringe users’ data privacy. It is an urgent problem for data owners to share data safely with the designated users rather than the third party or other users. Traditional encryption schemes utilize different keys to produce multiple encrypted copies of the same data for users. It is no longer applicable for cloud data sharing security. Attribute-based encryption can solve above problems, but it needs to rely on trusted third parties to protect the users’ privacy. In this article, in order to address the above problems, we propose a blockchain-based ciphertext-policy attribute-based encryption scheme for cloud data secure sharing without relying on any trusted third parties. Blockchain-based ciphertext-policy attribute-based encryption scheme can protect the rights and security of data owner. Compared with existing cloud security schemes, the proposed scheme has more advantages in terms of the six aspects: (1) data owners have the authority to decide who can decrypt the data; (2) the operations of users are retained permanently, and all records are tamper-proof; (3) our proposed scheme has the characteristic of “one-to-many” encryption, and data is encrypted only once; (4) our scheme does not rely on any trusted third party; (5) in terms of the discrete logarithm problem and decisional q parallel-bilinear Diffie–Hellman exponent problem, we prove that our proposed scheme is secure; and (6) experiment shows that our proposed scheme is more efficient than the comparative scheme.
Introduction
Cloud computing1,2 provides cost-effective and powerful data storage and management service on the Internet. The data sharing of this model is more flexible and convenient than that of the traditional storage ones. However, there are many challenges that have not yet been satisfactorily addressed in cloud storage security,3–5 such as user authentication, identity management, and data security sharing and storage. At present, the data of most users are uploaded to the open cloud, which is easy to be retrieved or even attacked by others. Currently, most cloud data storage relies on the so-called “trusted third party,” but ordinary users cannot trust verification on the third party. In order to ensure our legal identity, the third party needs us to provide personal identity information. We cannot guarantee that the third-party platform will not damage our identity and data privacy. For trusted third parties, users have no privacy. Users cannot monitor the behavior of the trusted third party. In addition, users cannot know whether the so-called trusted third party will illegally obtain our information and data. It is also impossible for users to verify whether the trusted third party is really trusted. When using the third-party platform, we only passively choose to accept the agreements of the third party. Therefore, it is an urgent problem to be solved how to realize the trusted and secure cloud data sharing without the third party.
We use cryptography to solve most security problems in cloud computing. Key management6–8 is a very important part of cloud computing. There are many challenges in terms of generating, managing, and distributing keys. In most cases, the key and its encryption and decryption mechanism 9 in cloud storage services are provided by the cloud service providers. It is difficult for users to learn the real security of the system, and there are many hidden dangers in the security of users’ data. Many scholars have proposed a variety of encryption schemes for cloud storage. The attribute-based encryption (ABE) scheme was first proposed by Sahai and Waters. 10 ABE is suitable for cloud storage systems, which has the characteristic of “one-to-many” encryption. What’s more, ABE is better suitable for cloud data sharing. Ciphertext-policy attribute-based encryption (CP-ABE) 11 is one of the categories of ABE. In the CP-ABE scheme, ciphertext is associated with an access policy, while the user’s decryption key is identified by a set of descriptive attributes. In the CP-ABE scheme, an attribute authority manages attribute sets and is responsible for issuing keys to users based on the attributes. The data owner (DO) defines the access policy and encrypts the data. The user can decrypt the ciphertext if and only if the attributes associated with its secret key satisfy the access policy in the ciphertext. CP-ABE is a very promising encryption technique for secure data sharing in the context of cloud computing environment. DOs are allowed to fully control the access policy associated with their data which to be shared. A CP-ABE scheme consists of four algorithms: Setup, Encrypt, KeyGen, and Decrypt.
Setup
Encrypt
KeyGen
Decrypt
Blockchain originates from bitcoin 12 which is a digital crypto-currency system proposed by S Nakamoto. 13 It is essentially an open and distributed decentralized database. The database based on cryptography and P2P network connects each block through a hash function. The database stores specific transactions in the block by utilizing the Merkle tree structure which links all transactions together. Once a transaction has been tampered, it will lead to change the root of Merkle tree hash, resulting in changing the hash of the block. If we find that the hash of a block cannot correspond to the hash of the whole network, we can request the other relevant blocks or transaction information to forward trace the relevant transactions and determine which transaction has been tampered, so as to achieve the unforgeability, non-tamperability, and traceability. 14 If a malicious user wants to tamper with a transaction, but he or she cannot obtain 51% of the computing power in the whole network. He or she also cannot get the recognition of other nodes in the whole network according to the consensus mechanism. In addition, he or she will not get the recognition of the blockchain. All transactions will be published in the whole network, and operate automatically employing the workload proof mechanism. All transactions will not be controlled by a third party. Consequently, the blockchain technology has the characteristics of open, autonomous and independent of a trusted third party. Blockchain uses cryptography technology to ensure anonymity, which makes the blockchain-based system more secure than traditional data storage systems.
The fusion of blockchain technology and cloud computing technology has a great prospect. 15 A lot of literatures applied blockchain technology to solve the problems of cloud security. At present, the blockchain technology is used to protect cloud data security. 16
Related work
Cloud computing provides the facility to store and share data and avail software, platform, and infrastructure as services. However, the security problem of cloud computing,17–19 especially the security problem of cloud data and cloud storage,20,21 has become an urgent problem to be solved, and many solutions have been put forward successively.
Most schemes use cryptography to secure cloud data, this requires the DO to encrypts the data before uploading it, so an important part of this is key management. Now, the question arises whether the keys are to be stored with DO or any other third party. In some schemes,22–24 the data which are stored in the cloud are to be shared among multiple members of the particular members using group key.
In the research work, Kumar et al. 25 introduce a public key infrastructure certificate scheme to secure the cloud application program to encrypt the key, which also binds the key with files based on File-Id attributes for personal storage. It is easy to maintain and manage the keys to update, but it is required to update the user credentials regularly. Suppose if the user credentials are weak, then the security of file cannot be assured. Here, the author encrypts the stored cloud data using an elliptic curve.
Cryptographic Key Management System 26 (CKMS) provides encryption, decryption, identity authentication, integrity, and digital signatures with the help of certificate authority (CA). The owner of the data, which is to be uploaded in the cloud environment, has to register with CKMS by creating an account with login credentials. The same login credentials can be used even to upload the list of users and their permissions with whom the uploaded file can be shared. CKMS uses asymmetric encryption to generate both public and private key pair; the private key is used to encrypt the data and the public key is divided into two parts by CKMS: one part of it is transmitted to the owner, and the rest is kept with CKMS. To a certain extent, CKMS system supports “one-to-many” encryption, but it does not support fine-grained access control. However, key management relies on CA and secure channel. Once the public key is obtained in the insecure channel transmission, or CA is not trusted, the security will be destroyed. The scheme does not consider data integrity verification.
Wei et al. 27 proposed a blockchain data-based cloud data integrity protection mechanism. In this article, the distributed agent model is deployed in the cloud using the mobile agent technology. The virtual machine agent permits multi-tenants to cooperate with each other to ensure data trust verification, and complete the tasks of reliable data storage, monitoring, and verification through the virtual machine agent mechanism. The unique hash value corresponding to the file generated by the Merkel hash tree is used to verify data integrity on the blockchain; the scheme does not rely on trusted third party. However, the encryption and security of data are not mentioned in this scheme. This scheme does not support “one-to-many” encryption and fine-grained access control.
Block-Secure scheme 28 proposes a blockchain-based distributed cloud storage architecture, dividing users’ files into several blocks of the same size, encrypting these file blocks, and signing them through a Digital Signature Algorithm (DSA). Blockchain technology is applied to trading mechanism, the architecture chooses a random file replica placement strategy in this architecture so that users can retrieve their files quickly from the cloud, which alleviates the burden of the P2P network. File integrity verification will be ensured using the Merkle Hash Tree as a validation method. Block-Secure scheme customizes a genetic algorithm to solve the file block replica placement problem between multiple users and multiple data centers in the distributed cloud storage environment. This scheme can reduce the data upload time and solve the data integrity verification. However, cloud data security sharing is limited because it is unable to support the fine-grained access control.
In order to ensure the security of cloud storage, many ABE schemes have been proposed to improve the efficiency, security, and expressiveness. ABE introduced by Goyal et al. 29 is a suitable solution for fine-grained access control in cloud storage systems. Generally, ABE can be classified into two main types: (1) Key-policy Attribute-based Encryption (KP-ABE): a user’s secret key is related to an access policy, while a ciphertext is labeled by a set of attributes and (2) Ciphertext-policy Attribute-based Encryption (CP-ABE): a ciphertext is associated with an access policy, while the user’s decryption key is identified by a set of descriptive attributes.
The tuCP-ABE Scheme 30 belongs to the CP-ABE scheme. Aiming at the existing security problems of cloud computing, the tuCP-ABE Scheme provides a secure encryption strategy. The key is generated and managed by two authorities central authority (CA) and outsourcing authority (OA). If users want to obtain data, they need to cooperate with two authorities CA and OA to generate the decryption key. As the user can access the data after the identity authentication, the tuCP-ABE Scheme has high security. A single CA or OA can neither get the decryption key, nor decrypt the data. To some extent, it is difficult to collude. The tuCP-ABE Scheme is a solution suitable for fine-grained access control in cloud storage systems, and it has high security. However, this scheme does not involve the user who provides the data and the user who is responsible for the data encryption. Key negotiation only involves two authorities and the user who requests the data. The user who provides the data cannot control the data provided by himself. If the user who provides the data cannot control who can access the data, the security is meaningless. In a real environment, to decrypt a small amount of data, two authorities are needed to generate the key, which is a waste of resources. In other words, the scheme relies on a trusted third party and the efficiency of key generation is low. Data integrity is an important part of data security and privacy, including key integrity, ciphertext integrity, and message integrity.
Blockchain-based ciphertext-policy attribute-based encryption scheme (BCAS) stores the hash of the key, the hash of the ciphertext, and the hash of the decrypted data in the blockchain. On one hand, the malicious user cannot obtain the ciphertext, the key, and the initial data through the hash. On the other hand, it can be used for data integrity verification. When the DO uploads the encrypted data to the cloud storage, he or she needs to upload the hash of the ciphertext and the hash of the initial data to the blockchain. The system will verify the ciphertext and the hash of ciphertext, and the data can be uploaded successfully only after the data verification is passed. After DR requests the data through the data label, it verifies whether the encrypted data are damaged. Then, the key needs to be generated by DO and DR. Then, each party uploads its own hash of the key, and both parties confirm the key in the blockchain. After the key generation, DR decrypts the encrypted data and then submits the hash of the decrypted data to compare with the initial data hash to verify the integrity of the decrypted data.
tuCP-ABE scheme verifies the integrity of the key, Wei et al. 27 , and Block-Secure scheme verifies the integrity of the encrypted data, in which Block-Secure scheme divides the data into blocks and provides a better replacement strategy for the file copy. CKMS system does not talk about integrity verification.
The results of comparison are shown in Table 1. FGAC means that it supports fine-grained access control, and O2M means that it supports “one-to-many” encryption, one user to encrypt and upload data, and multiple users to decrypt with their own independent key. TTP-free means that it does not rely on the trusted third party, SKIV is short for Secret Key Integrity Verification, CTIV is short for Ciphertext Integrity Verification, and MIV is short for Message Integrity Verification.
Comparison of schemes.
BCAS: blockchain-based ciphertext-policy attribute-based encryption scheme.
Our contributions
This article is distinct from other research works in related fields. We combine the advantages of blockchain and ABE and propose a BCAS. The main contributions of this article are as follows:
We have defined the concept of cloud data security sharing and its important indicators clearly. On this basis, we propose a BCAS scheme for cloud data security sharing.
In our scheme, DOs have the authority to decide who can decrypt the data. DOs encrypt the data and upload the encrypted data to the cloud environment through the blockchain system (BCS). Data requesters (DRs) must negotiate the key through the BCS that can be used to decrypt data with the DO.
In our scheme, all operations of users need to be conducted in the BCS. The operations are retained in the blockchain permanently, and all records are tamper-proof.
Our proposed scheme has the characteristic of “one-to-many” encryption. Data are only encrypted once. Users who meet the attribute requirements can negotiate the key with the DO.
In our scheme, the global public parameters are initialized by the setup mechanism in the BCS, and the users negotiate the key in the BCS without relying on the trusted third party.
We prove that our proposed scheme is secure based on Discrete Logarithm (DL) assumption and decisional q parallel-bilinear Diffie–Hellman exponent (BDHE) assumption.
We compare and analyze our scheme with the other four schemes in terms of “one-to-many” encryption, integrity verification, and so on. According to the comparison, we find that our scheme is superior to other schemes.
We compared our scheme with the tuCP-ABE scheme 30 through four experiments. When the number of the messages is the same, with the increase in attributes, the time and storage of the whole process in our scheme are obviously less than those in tuCP-ABE scheme. For different processes with the same attribute, the time and storage of party key generation step and decryption key generation step are obviously better than those of tuCP-ABE scheme. What’s more, DOs in our scheme have the right to decide who can decrypt the data, which would achieve the real security.
Organization
The rest of this article is organized as follows. In section “Background,” we introduce the definition of cloud data security sharing and related assumptions of our scheme including DL assumption and decisional q parallel-BDHE assumption. Then, we propose the BCAS and introduce transaction structure and process in section “Architecture design.” We introduce a specific encryption and decryption scheme for BCAS in section “Our construction of BCAS scheme.” In section “Security and performance analysis,” we proof the security of our scheme, and present the performance analysis by experiment. Finally, we conclude this article in section “Conclusion.”
Background
Definition 1: cloud data security sharing
Cloud data security sharing focuses on data security storage and sharing in the cloud storage platform (CSP). DO can upload the encrypted data. Other users who want to decrypt the data need to obtain a unique decryption key with the consent of the DO. In other words, the data only need to be encrypted once, and the users who meet the requirements have their own unique key to decrypt. DO has its own absolute control over the uploaded data and is also responsible for its own uploaded data. All the actions of users will remain unchanged and cannot be tampered with. Users cannot deny their actions. In general, to realize cloud security sharing, we need to achieve the following:
Support Fine-grained Access Control: support fine-grained access control policy, DO encrypts the data, and other users can negotiate with the DO to generate a unique decryption key after meeting the attribute requirements.
TTP-free: the operation of key management and data storage does not depend on the third party. The third party cannot interfere with the generation of key and data encryption of the DO.
Integrity: the key, ciphertext, and plaintext should have integrity. Once one integrity is destroyed, the user cannot get the correct decrypted data.
DO Authority: DO have control over their uploaded data. The cloud platform is an open platform, and everyone may access the encrypted uploaded data. However, if users want to decrypt the data, users must negotiate the key that can be used to decrypt data with the DO. Otherwise, users cannot decrypt the data.
Behavior Record: whether it is DOs or DRs, all operations need to be preserved, and the operations cannot be tampered with or forged. Users cannot deny their actions. Prevent users from performing malicious operations.
Definition 2: bilinear maps
Bilinearity:
Non-degeneracy:
Computability:
Definition 3: DL problem
Inputting
Assumption 1: DL assumption
The advantage of an algorithm A in solving the DL problem is defined to be
We say that
Definition 4: decisional q parallel-BDHE problem
Inputting
the decisional q parallel-BDHE problem is to distinguish
Assumption 2: decisional q parallel-BDHE assumption
The advantage of an algorithm
We say that
Architecture design
We proposed a new cloud secure storage and sharing scheme for a series of security problems in cloud computing, namely, BCAS. Compared with the existing cloud security schemes, the proposed scheme is more advantages:
Authority of DO: DOs have the authority to decide who can decrypt the data.
Tamper-Proof: operations of users will be retained permanently in the blockchain.
Fine-grained Access Control: we have developed the CP-ABE scheme to achieve the secure data sharing.
“One-to-Many” Encryption: the data are encrypted by DO only once.
TTP-free: the scheme does not use any TTP throughout the execution of the scheme.
Architecture
In this section, we present an architecture for cloud storage and sharing called BCAS. As it is shown in Figure 1, the architecture consists of four entities like CSP, BCS, DO, and DR.

BCAS architecture.
DO and DR are different identities merely for different options on cloud. A user is a DO when uploading data and a DR when requesting to download data. When the user is used for different identity, the corresponding ID is different:
DO is an identity of the user which encrypts and uploads the data into the CSP and has full control over it.
DR is an identity of the user which would like to accesses and decrypts data stored in CSP.
BCS is a data and user management system based on blockchain. Each operation of the user will be stored in the blockchain as a transaction. Ensure the integrity and credibility of transactions using the tamper-proof of blockchain. BCS plays an important role in our architecture, which provides confidentiality (encryption and decryption), authentication of an identity, data authentication, integrity, User authority control, key management, and storage of user operation records. BCS will reduce the malicious operation of users, malicious operation will remain in BCS permanently, and users will be punished accordingly. Blockchain is a distributed database which structure as shown in Figure 2, Ti (
CSP is an open storage platform, which is only used to store encrypted data. Other operations are managed through BCS.

Blockchain structure.
The whole process that DR requests the encrypted data uploaded to DO through BCS and obtains the decryption key to decrypt the data successfully is called transaction in our architecture. A complete transaction includes the following contents:
First, users who want to upload or download data in the cloud environment must provide identity certificate information to register identity with BCS, which generates independent data upload identity and data download identity for users. Then, when DO needs to submit its own data upload identity to upload data. After passing the BCS verification, DO needs to submit the data encrypted by ABE technology and relevant information. After passing the BCS verification information, BCS will save the relevant information and user’s operations in the blockchain and upload the encrypted data to the cloud. Finally, if DR wants to access the data in the cloud, it needs to provide the data download identity. After BCS verifies the information is legal and the DO agrees the request of DR, DO and DR negotiates the key, which is used for DR to decrypt the data. After BCS verification, DR can applies for the data to the BCS, and then DR uses the key to decrypt the data.
A specific transaction is all or part of a complete transaction. BCS will store the contents of the transaction and its timestamp on the blockchain. If DR determines that the data uploaded by the DO are illegal, the blockchain can provide relevant evidence to prove that, if a user accesses the data in the cloud storage space maliciously, it will also be recorded in the blockchain. For users who often maliciously operate, the blockchain will store the user’s data If Id is added to blacklist, the user’s operation permission in cloud storage will be restricted or even punished.
Transaction structure
A complete transaction shall include the identity of both parties, data-related information, key, operation, and corresponding timestamp. The structure of the transaction is shown in Figure 3.

Transaction structure.
It should include the following:
IDInfo
“IDInfo”: { “data owner”: “IDInfo of data owner”, “data requester”: “IDInfo of data requester” },
Data
Data include the hash, address, and label of the encrypted data. The encrypted data are uploaded to the cloud storage. The hash value and label of the data ciphertext are stored in the blockchain. The label is used by the user to find the data. The address is the storage address of the encrypted data in the cloud storage. The data are downloaded from the cloud storage to the system. The hash is used to verify whether the corresponding data of the label are complete. The format of data is as follows: “data”: { “data Hash”: “Hash of raw data”, “ciphertext hash”: “Hash of encrypted data”, “address”: “the address of encrypted data in cloud storage”, “label”: [ ] },
Key
The key stores the public key of both parties and the hash value of the final key. The final key hash is used to ensure the integrity of the key. If the hash values obtained by both parties are different, the final key needs to be discussed again; otherwise, the data cannot be decrypted: “key”: { “pk_DO”: “the public key of DO”, “pk_DR”: “the public key of DR”, “DO_SK_DRS_hash”: “the hash value of SK_DRS provided by DO”, “DR_SK_DRS_hash”: “the hash value of SK_DRS provided by DR” },
Operations and timestamps
Operations and timestamps include all operations of users in the blockchain, including user identity registration, key upload, data request, key negotiation, and so on. All operations in a transaction are listed in the order of timestamps: “Operations & timestamps”: { “ts1”: “op1”, “ts2”: “op2”, “ts3”: “op3”, “ts4”: “op4”, …… }
Transaction process
Global setup
GlobalSetup
Identity register
IDRegister
User key generation
UKeyGen
Encryption and upload
Encrypt
In the upload process, the blockchain will record the DO’s upload data application and operation. DO provides their own
Decryption key generation
DecryptKeyGen
Decryption
Decrypt
Our construction of BCAS scheme
According to the structure and specific process we proposed, we designed a detailed BCAS Scheme.
Global parameter setup
BCS chooses the security parameter
The global public parameter
Identity register
Users register their personal identity in BCS, and submit their identity information to BCS. Users get two identities
User key generation
User randomly selects elements
The process of user identity registration and key generation is shown in Figure 4.

User registration and key generation.
Encryption and upload
Given the message
Figure 5 shows the data encryption and upload operation. After the message

Data encryption and upload.
Decryption key generation
DR needs to do the following to access the data uploaded by DO:
First, DR needs to submit the identity information
Then, DR selects a one-time random number
DO verifies the correctness of L with
The key
DO chooses
DO sends
After the calculation is done, DO and DR will upload the hash value of the key, respectively, to verify the correctness of the key.
The process of DO and DR negotiating to generate the DR decryption key is shown in Figure 6.

Decryption key generation.
Decryption
DR requests and obtains encrypted data
Security and performance analysis
The proof of security
The confidentiality (IND-CPA security) of the proposed scheme can be proved directly based on the decision q parallel-BDHE assumption. We denote the CP-ABE scheme by Waters 10 as WCP-ABE. For simplicity, we will reduce the security of the proposed scheme to that of WCP-ABE scheme.
Lemma 1
We say the WCP-ABE scheme is IND-CPA secure if the (decision) q parallel-BDHE assumption holds.
Proof
The details of proof are referred to Waters. 9
Lemma 2
If DO is a trusted data provider, the confidentiality of the proposed BCAS scheme can be reduced to that of the WCP-ABE scheme.
Proof
If DO is a trusted data provider, DR and DO run the Decryption Key Generation algorithm. The Decryption Key Generation algorithm is as follows:
DR selects a one-time random
DO verifies the correctness of L by
DO sends
If there is an adversary
Setup
Phase 1
and returns
Challenge
A submits two messages
Phase 2
Same with Phase 1.
Guess
From the above simulation, the distributions of the public parameter, decryption keys, and challenge ciphertext are indistinguishable from the real scheme, we have
Lemma 3
A curious-but-honest illegal user cannot decrypt any ciphertext.
Proof
Here, we give a heuristic analysis. A curious-but-honest illegal user needs to get
However, it is related to DL to compute
Theorem 1
If the (decision) q parallel-BDHE assumption holds, then the proposed blockchain-based CP-ABE scheme is IND-CPA secure.
Proof
It follows from Lemmas 1–3.
Comparison and analysis
We make a deeper comparison between our scheme with tuCP-ABE scheme.
Efficiency
We compare the efficiency of our scheme with that of tuCP-ABE scheme. The main difference between the two schemes lies in the key generation process. In order to guarantee the security, tuCP-ABE scheme choose two third parties CA and OA to assist users in generating encryption and decryption keys. CA and OA will not collude with each other to ensure the security of the keys. The interaction process is shown in Figure 7.

Process for tuCP-ABE scheme.
Our BCAS scheme uses blockchain instead of two authorities, which can simplify the interaction process and improve the efficiency of key generation. To facilitate the comparison, we build Table 2 to compare the process of key generation between the two parties.
Comparison between BCAS and tuCP-ABE.
BCAS: blockchain-based ciphertext-policy attribute-based encryption scheme.
In the actual application scenario, the encryption data are uploaded to the cloud first. If DR finds the file and wants to access the file, DR can negotiate the key with DO to decrypt the data. Therefore, in our scheme, we first encrypt and upload the data, and then negotiate the key. However, in tuCP-ABE scheme, the key is negotiated before the encryption of data. In order to facilitate the comparison, we exchange the order of our encryption and key generation, which has no impact on our specific comparison results:
Step 1: GlobalSetup. Generate global public parameters. The two schemes use similar GPP. In the first step, the efficiency of the two schemes is similar.
Step 2: IDReg. User identity registration, the tuCP-ABE scheme does not mention how to generate the ID. Compared with the following key generation processes, the ID generation process is relatively simple. We think the efficiency of the two schemes is similar.
Step 3: ParKeyGen. The key generation phase of the participants. In BCAS scheme, users generate their own public key/private key pair. This process is equivalent to that in tuCP-ABE, CA and users generate their own public key/private key pair, respectively. In this step, the efficiency of the two schemes is similar.
Step 4: DecKeyGen. Generate decrypt key. In BCAS scheme, DO and DR generate the decryption key. The operation of DO is equivalent to the operation of CA in tuCP-ABE scheme, and the operation of DR is equivalent to the operation of U in tuCP-ABE scheme. Compared with tuCP-ABE scheme, BCAS scheme saves the negotiation between CA and OA, and directly calculates the final key. In addition, BCAS scheme has less calculate
Step 5: Encrypt. In this step, both BCAS scheme and tuCP-ABE scheme are encrypted, but the ciphertext generation process and the ciphertext are different. BCAS scheme has a smaller amount of calculation than tuCP-ABE scheme, BCAS scheme does not need to calculate
Step 6: Decrypt. In this step, both BCAS scheme and tuCP-ABE scheme are decrypted. The decryption process of BCAS scheme is relatively simpler, mainly because BCAS scheme reduces bilinear pairing operation. It has higher efficiency.
In addition to the efficiency difference in the above steps, there are four secret transmissions between users and third parties in tuCP-ABE scheme. In our scheme, it only takes two times. With the decrease in secret transmissions, the security dependence of the transmission channel decreases. In the process of key generation, tuCP-ABE scheme needs CA to calculate the parameters involved in generating intermediate key and ciphertext. As it is faster in the process of encryption and decryption, our scheme is more efficient in actual use.
Storage
To ensure the security, tuCP-ABE scheme uses two trusted third parties CA and OA to help users in generating the key and generates multiple intermediate keys in the process of generating the final decryption key. Compared with BCAS scheme, the final key generated by tuCP-ABE scheme has more parameters, longer key length, longer ciphertext, and larger storage space. BCAS scheme simplifies the process and parameters, so the final key and ciphertext take up less memory.
In our BCAS scheme, the decryption key obtained by DR is
while the user’s key in tuCP-ABE scheme is
our key is more compact and occupies less memory space.
In our BCAS scheme, the ciphertext of DO encryption is:
The encrypted ciphertext in tuCP-ABE scheme is:
When the same plaintext
DO authority
In tuCP-ABE scheme, DO is not mentioned. In the process of key generation, DR negotiates key with CA and OA. To a certain extent, the DO has no controlling authority over the data, and the control authority over the data is in CA and OA. Although the security of the tuCP-ABE scheme is high, this data security can only ensure that malicious users cannot obtain the key for data decryption, but the DO may not have the authority to manage the access authority of other users. Even if CA and OA audit the DR with the authorization of the DO, but the DO cannot control the decryption key, it may lose the control of the data to some extent. In this way, data security will lose its most fundamental significance: only when the DO has the right to authorize other users to access the data, without the authorization of the DO, it is safe to access the plaintext.
In our scheme, first, the user’s identity is authenticated through the BCS. In the key negotiation process, DO and DR negotiate the key. DO has legal control over own data. DO can not only know who will access the data but also control who can decrypt the data. Only the DR who is authenticated by the DO. Only in this way can we negotiate with the DO to obtain the decryption key and decrypt the data. That is, our scheme realizes the DO’s control authority to the data provided by himself on the premise of ensuring security.
Experimental results
To evaluate the difference of performance between the proposed BCAS scheme and tuCP-ABE scheme, we implement the BCAS scheme and the tuCP-ABE scheme in C with the PBC library Microsoft Visual C++ 6.0. We run the experiments on a Windows 10 system which is equipped with a quad-core Intel CPU and 8 GB RAM.
Figure 8(a) and (b) shows the comparison of performance between two schemes of the same M, attributes, and access structure in different steps. Figure 8(a) shows that BCAS scheme takes less time than tuCP-ABE scheme, and Figure 8(b) shows that BCAS scheme consumes less storage space than tuCP-ABE scheme, especially in Step 3 (ParKeyGen) and Step 4 (DecKeyGen). BCAS scheme has better performance than tuCP-ABE scheme by reducing the interaction and computation of the third party.

Comparison of performance between two schemes in different steps: (a) runtime of each step and (b) storage space of each step.
Figure 9(a) and (b) shows the comparison of performance between two schemes of the same M in different attributes. Figure 9(a) shows that with the increase in attributes, the runtime of whole process in tuCP-ABE scheme is longer than that in BCAS scheme, and Figure 9(b) shows that with the increase in attributes, the storage space of whole process in tuCP-ABE scheme is larger than that in BCAS scheme.

Comparison of performance between two schemes in different attributes: (a) runtime of whole process and (b) storage space of the whole process.
Conclusion
In this article, we propose the BCAS cloud data sharing security scheme without any trusted third party. Using blockchain to authenticate users’ identities and control their access authority, we achieve the cloud security sharing without a trusted third party. Users need to register their identity to access, upload, and download the data in CSP. In our architecture, blockchain plays an important role. It guarantees the traceability of user’s operations and the verification of data integrity through its own characteristics. In this scheme, the data in the CSP will not be accessed by illegal visitors unless the user is authenticated. In addition, our scheme combines the CP-ABE scheme to protect the data security in the CSP and enables the DOs to control their own data. Finally, we also prove the security of the scheme and analyze the security of the model. The experimental results show that our scheme has better performance than the contrast scheme. The BCAS can protect the user’s private key and support fine-grained access control policy. Compared with the previous methods, BCAS scheme does not rely on the cloud service providers or the trusted third parties. It can protect the authority of the DO and achieve the secure data sharing. All the operations are not be tampered and the security is better guaranteed.
Footnotes
Handling Editor: Yanjiao Chen
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Key-Area Research and Development Program of Guangdong Province (grant no. 2019B010137002) and the Natural Science Foundation of Fujian, China (grant no. 2020J01171).
