Ciphertext-Policy Attribute-Based Encryption for Cloud Storage: Toward Data Privacy and Authentication in AI-Enabled IoT System

: People can store their data on servers in cloud computing and allow public users to access data via data centers. One of the most difﬁcult tasks is to provide security for the access policy of data, which is also needed to be stored at cloud servers. The access structure (policy) itself may reveal partial information about what the ciphertext contains. To provide security for the access policy of data, a number of encryption schemes are available. Among these, CP-ABE (Ciphertext-Policy Attribute-Based Encryption) scheme is very signiﬁcant because it helps to protect, broadcast, and control the access of information. The access policy that is sent as plaintext in the existing CP-ABE scheme along with a ciphertext may leak user privacy and data privacy. To resolve this problem, we hereby introduce a new technique, which hides the access policy using a hashing algorithm and provides security against insider attack using a signature veriﬁcation scheme. The proposed system is compared with existing CP-ABE schemes in terms of computation and expressive policies. In addition, we can test the functioning of any access control that could be implemented in the Internet of Things (IoT). Additionally, security against indistinguishable adaptive chosen ciphertext attacks is also analyzed for the proposed work.


Introduction
The Internet of Things (IoT) offers a new framework for the creation of heterogeneous and distributed networks and has become an increasingly ubiquitous forum for computing services. Over the last decade, several IoT applications have been introduced over various areas, including building and home automation, infrastructure and health care, transportation, manufacturing, and environmental monitoring [1][2][3]. Nonetheless, due to the lack of adequate computing and storage resources for processing and storing large volumes of IoT data, it appears to follow a cloud-based architecture to address the security and resource sharing problems. Therefore, the entire implementation infrastructure must be secured from attacks that can obstruct IoT services and pose a threat to data privacy, credibility, or confidentiality.
The most widely used method for maintaining users' confidentiality in the cloud environment is encryption. However, security problems dominate IoT-based applications [3], prompting a major overhaul of established security choices leading many researchers to the evolution of modern techniques. Some of the leading security issues are user access control

Contributions
Based on the foregoing observations, the following are the key contributions of this article: (i) We propose a new strategy CP-ABE scheme to enhance the security of user data and privacy of the user by hiding the access policy. (ii) The storage overhead of this scheme is reduced by generating constant size ciphertext. (iii) The identification and prevention from insider attack is achieved by utilizing the short signature scheme. (iv) An enhancement to the IoT architecture has been designed in addition to making it a secure fine-grained access control system that also prevents insider attacks. (v) A comparison study was conducted to describe the key components of ABE schemes that hide access policies, along with computational overhead analysis, security, and operational attributes of various access control schemes.

Paper Organization
Rest of the paper is structured as follows. Section 2 describes the merits and demerits of the existing access control mechanism while Section 3 discusses the proposed method's mathematical background. Section 4 describes the proposed scheme's system model and Section 5 discusses the explanation of the proposed method. Section 6 deals with the implementation and performance assessment of the proposed method. Section 7 discusses the proposed method's security analysis and the conclusion is finally stated in Section 8.

Related Works
As related works, we hereby mention works on Attribute-Based Encryption(ABE), Predicate Encryption (PE), Ciphertext-Policy Attribute-Based Encryption (CP-ABE) and CP-ABE with hidden access structure.
As an option to attain privacy and fine-grained access control, Attribute-Based Encryption (ABE) [16] has been presented by Sahai and Waters [13] where the encryption is based on both access policy and private keys. They made ciphertext to be associated with set of attributes. In these methods, the ciphertext size, encryption and decryption times vary linearly with respect to the complexity of access formula.
The inner product Predicate Encryption (IPE) is the basis of CP-ABE since the security mechanisms correlate to predicates in PE and attributes is correlated for ciphertext and Katz et al. [17] implemented it. Pallavi [18] et al. presented a new CP-ABE method which supports hidden access policy. They used inner product encryption along with attribute hiding to provide unlinkability as well as to improve the patient data privacy. TVX Phuong [19] et al. presented a unique CP-ABE scheme based on two different processes. The first one is used to achieve only the constant ciphertext size. The second process is used to hide the access policy using Inner Product Encryption (IPE). However, the size of the ciphertext is dynamically changed. K. Frikken [20] et al. introduced new protocols to preserve sensitive credentials as well as sensitive policies. They used three different protocols to hide the credential information from intruder. X Yao [21] et al. introduced an anonymous based access control for the clouds. This method is not applicable for other applications because it is designed only for ciphertext. The cost of this scheme is high on user side.
Bethencourt [22] et al. initiated the CP-ABE scheme that provided security against collusion attacks. Subsequently, Doshi and Jinwala [23] et al. offered a novel CP-ABE scheme considered to be fully secure under attacks by Chosen Plaintext Attack (CPA) and Chosen Ciphertext Attack (CCA). The multi-authority ABE scheme has recently been studied in [24,25].
Helil [26] et al. presented an innovative CP-ABE scheme with hidden attributes. This is the novel scheme to define the sensitive data sets (SDS) constraint. Here, they used Chinese wall security policy to construct the SDS constraint. Compared to existing methods, this method takes extra communication cost due to SDS constraint. The access control policy and the restriction set are divided and partial information is fed to the proxy server and SDS monitor to prevent commercial errors. Sabitha [27] et al. introduced a new approach that preserves privacy through secure cloud hidden access policies for data sharing. Among these two [26,27] methods, first method is used to improve the privacy of user data and second one to prevent the insider attack. Compared to other attribute-based methods, this method has higher space complexity. Lixian Liu [28] et al. adopted partially hidden access structure in their proposal. This method was mainly used to improve the privacy of electronic medical record system. Here also, since the ciphertext size is linear, space complexity is high. Balu [29] et al. submitted a hidden access policy CP-ABE scheme by providing security using the assumption of Decisional Diffie-Hellman (DDH). Yadav [30] et al. introduced a novel scheme which hides the access policy in ABE. Hiding the access policy is a significant contribution of certain applications like Medical, Military communications etc. The partial information of ciphertext is mainly hidden from user in order to improve the privacy. Zhong [31] et al. introduced a decentralized multi-authority CP-ABE schemeagain using hidden access policy. The communication and computation cost of this scheme is low. Yang [32] et al. presented a mechanism for fine-grained data access control with privacy conservation. The murmushash [33] mehtod is used to improve the policy privacy but with higher communication overhead.
Zhang et al. [34] introduced a new technique known match-then-re-encryption where prior to re-encryption, a matching phase was introduced. In addition, they anonumously checked whether or not the proxy could achieve a proxy re-encryption using separate re-encryption key and ciphertext components. This method was implemented using CP-ABPRE scheme based on Pairing-Based Crypto Library.
Zhang et al. [35] introduced a Privacy-Aware S-Health (PASH) access control system, in which they used CP-ABE scheme with partially hiding the access policy. In this method, they have hidden the attribute value of access policies in SHR. The performance of this method is better compared to other methods in terms of access policy complexity, enciphering and deciphering time. Only problem here is they hidden the partial information.
Chen et al. [36] proposed a new scheme named as match-then-decrypt in which the matching phase is introduced before decryption process. This scheme is performed by calculating a distinctive constituent in a ciphertext, the constituents were used to validate that if the secret key matches ciphertext-free hidden access policy. In terms of computation time, public key size, matching phase and decryption phase, this scheme is equated with the existing CP ABE scheme. They focus on decrpytion alone, not a phase of encryption.
The detailed comparison of various CP-ABE schemes with each and every methods techniques, features, security functionalities, computational cost is presented in Table 1. From this debate, it appears that we will have issues with access policy privacy, user security, insider attack protection, and IoT interoperability. It is noted from this literature survey that the ciphertext size and number of pairing operations vary with regard to the number of attributes in existing ABE methods. This may reduce CP-ABE methods' efficiency. The proposed CP-ABE method is novel in terms of

1.
Offering encryption at first level of privacy using Ciphertext policy attribute based encryption; 2.
Verifying the data owner authentication using BLS signature methods and thereby reducing the potential for insider attack and also; 4.
Solving storage overhead problems by generating constant ciphertext size along with; 5.
An enhanced IoT architecture has been designed which offers secured access control.

Preliminary
We present some facts related to groups with bilinear maps that are efficiently computable. The notations of the proposed method is mentioned in Table 2.

Basic Concepts of Bilinear Map
The bilinear map is the tool based on pairing-based cryptography. To define the bilinear map, the following notations are used.

•
Let G 1 and G 2 be two multiplicative cyclic symmetric groups of the prime numbers R. • y is the generator of G 1 .

•
The bilinear map e is defined as e: G 1 * G 1 → G 2 . The properties of bilinear map are as listed below 1.

Access Structure
Definition of Attribute Access Structure: Considering A 1 , A 2 , . . . , A n as set of user attributes, the collection A ⊆ 2 A 1 ,A 2 ,...A n is monotone if ∀ B, C such that if B ∈ A and B ⊆ C, then C ∈ A. An access structure is a collection A of non-empty subsets of A 1 , A 2 , . . . , A n . The sets present in A are known as authorized sets, otherwise unauthorized sets.

Boneh-Lynn-Shacham (BLS) Signature
The Boneh, Lynn and Shacham (BLS) [42] introduced a simple and deterministic signature scheme. The outcome of the BLS scheme is often referred as short signatures. Although multiple signatures are adopted for cloud computing, it is not possible to verify the authentication of the data owner. We adopt BLS signature scheme for this proposed method to solve this issue. The main task of this BLS scheme is to verify the authenticity of the signer as valid or not. The short signature scheme has three different functions.

1.
Key Generation: Randomly choose a number x from the interval of 0 to R − 1. The output of this function is the private key (x) and public verification key (k = y x ).

2.
Signing: Given a message (m) and output of the key generation function, calculate σ = h x (i.e., h = H (m)).

3.
Verification: Given a message signature (h, σ) and the public key (k), verify that (σ, y, h) is valid or not [i.e., k = y x ].

CP-ABE Definition
An encryption scheme based on a ciphertext-policy attribute consists of four sub basic algorithms: setup, encryption, keygen, and decryption.

1.
CP-ABE-Setup (1 λ ): It produces a public key (PK) and a master secret key (MSK) for the given security parameter λ.

2.
CP-ABE-Keygen (PK, MSK, S): It produces secret key (SKS) corresponding to a set of user attributes for the given public key (PK), master secret key (MSK). 3.
CP-ABE-Decryption (PK, SK S , c): It produces by the original message m for the given public key (PK), secret key (SKS) and ciphertext (c).

Threat Model and Goals
The proposed model addresses threats that are raised in following two levels.
1. Data Threat Level: It defines an entity which can perform data operations without proper data owner authentication, risking the confidentiality and privacy of the data received by a user.

2.
Data and Access Policy Integrity Threat Level: It defines a malicious user/insider whose intent is to access the data and abuse the access rights while altering a data owner's access policy.
We aim to achieve following security objectives in order to to make the system to be resistant against above mentioned threats 1.
Fine-Grained Access Control: Access policy of the proposed system is embedded in ciphertext to deliver access control. The access policy could be defined depending on user attributes. No one can easily change or recreate the key which is often used for offering an access control because the CP-ABE scheme is implemented from bilinear pairing.

2.
Data Confidentiality: The user can produce the public/secret key pairs based on bilinear pairing. Hence, only the authorized user gets information about the outsourced document. Therefore, no one can violate data confidentiality.

3.
Authenticity and Integrity: BLS verification verifies the authentication and integrity of the data outsourced by the data owner.

4.
Privacy Preserving: In our system, the encryption method offers first level of privacy and policy anonymization scheme (SHA1) offers second level. Hence, users will not know about other users making the proposed method as fully privacy preserving. Figure 3 demonstrates the architecture of the proposed hidden access control scheme that guarantees to deliver fine-grained access control along with security against insiders attack using BLS signature. The proposed system consists of four different entities.

1.
Data Owner: In fact, it is the data owner's responsibility to encrypt all data using access policy before outsourcing to the cloud. The data owner also uses a hashing algorithm to hide the access policy and submit it together with the ciphertext. 2.
Cloud Server: The task of a cloud server is to store the data owner's files as well as to allow the licensed users to access data. In a real-world scenario, a cloud server is honest but curious so we should hide the access policy from the cloud server.

3.
User: The key generation center is responsible for creating a secret key for an individual cloud user. Only the legitimate user whose secret key satisfies the access policy can decrypt the data.

4.
Key Generation Centre (KGC): The key generation center generates and distributes secret key to legitimate cloud user.
As shown in Figure 3, initially the KGC generates a public key (PK) and a master secret key (MSK) in step 1. In step 2, KGC sends a public key (PK) to the data owner. The data owner encrypts their data at step 3 and uses SHA1 to anonymize the access policy. Data owner outsources encrypted data to the cloud server at step 4 along with anonymous access policy. In step 5, an user sends a request for data to the cloud server. The cloud server sends a ciphertext (CT) to data user in step 6. After that, the data user request a secret key for received ciphertext (CT) at step 7. In step 8, the KGC responds to the data user with a secret key. Finally, the data user decrypts ciphertext in step 9 and checks whether the signature is authentic or not.

Process of Proposed Scheme
CP-ABE is one of the ABE most functional and effective version. The important feature of this scheme ensures security and fine-grained access control of outsourced data. However, in an earlier version of CP-ABE, together with the ciphertext, the access policy is provided as plaintext. This may reveal the attributes of user and lead to loss of user's privacy. In the existing CP-ABE scheme, the authentication of the data owner and the integrity of outsourced data cannot be verified. To do this, we are introducing a new idea to check the data owner's authentication and check the integrity of outsourced data through BLS short signature scheme. The proposed scheme offers protection against the insider data theft.
In order to improve access policy privacy, we applied policy anonymization scheme in the proposed system. For policy anonymization, as described in Algorithm 1, we used SHA1 hashing algorithm. Throughout an ABE scheme, all insiders are considered legitimate users to obtain the original message. Therefore, it may be possible to encode the generated plaintext again using a similar or dissimilar policy of access. The short signature method is used to identify the insider theft in order to avoid this situation. The two important tasks of the short signature method are to check data owner authentication and validate the reliability of shared data. Under an adaptive message attack, this method is proven secure. 1 Setup Algorithm • Setup(λ) → (PK, MSK) It is the responsibility of the key generation center to run this algorithm. The KGC selects two finite prime order R random cyclic symmetric groups G 1 and G 2 with y generator. Considering λ as a public security parameter, the bilinear map is defined as e: G 1 * G 1 → G 2 . Randomly, KGC chooses two exponents namely ψ, γ ∈ Z R .
The public key PK and a master secret key MSK are generated on the basis of security parameter (λ) and two exponents (ψ, γ ∈ Z R ).
Public key, PK = (G 1 , y, h = y γ , f = y 1/γ , e (y, y) ψ ); Master Secret Key MSK = (γ, y ψ ) 2 Key Generation • KeyGen (PK, MSK, A) → SK This procedure runs the public key (PK), master secret key (MSK) and set of attributes (SA) as input, producing a secret key for the legitimate user (U t ). Based on two different random numbers M t , M j ∈ Z R the secret key is generated.
Signing the Keygen • SignKey (sk) → pk Data owner randomly chooses a number x from the interval, 0 to R − 1. The output of this function is the private key (x) and public verification key (k = y x ), where y is the generator of G 1 4 Encryption and Signing • EncipherSign (PK, P, AP) → σ, CT The access policy is inserted into the ciphertext in our proposed system to provide access control. The access policy is expressed as an access structure as in Figure 4. The threshold gates are defined in interior nodes and user credentials/attributes are defined in leaf nodes. The access policy has been anonymized by utilizing Algorithm 1. Before starting the process, the message P is encrypted that use the public key. The proposed encryption and signature scheme is explained in Algorithm 2 with collection of leaf nodes (L).

Algorithm 2: Algorithm for data encryption
Function(EncipherSign (PK, P, AP)) Anonymization (AP) if node = = root then for root node W, do set q W (0) = A end end C = P · e(y, y) ψA ; C = h A if node = = leaf then for all leaf nodes l ∈ L do C l = y q l (0) ; C l = H(att(l)) q l (0) end end Signing (P, x) The output of this function can be expressed as Ciphertext, CT = [Anon (AP), Sign = h (P) x , C = P · e(y, y) ψA ; C = h A , [C l = y q l (0) ; C l = H(att(l)) q l (0) ,∀ l ∈ L ] The signature signing is done by BLS [15] signature scheme. Let y be the generator of gap group G 1 with the finite prime order of R and a hash function (h). Using the hash function, the short signature can be calculated and attached with the shared ciphertext (Algorithm 3).

Algorithm 3: Algorithm to generate a signature
Function (Function Signing (P, x)) Compute hash(P) Assign signature σ = h(P x ) Figure 5 illustrates the outsourced file structure in the cloud. The first column represents the unique identity of shared data, the second column represents the signature (P) and final column represents the ciphertext (CT).  Decryption and Verification • DecipherVerify (PK, SK u t , CT, σ, pk) → P, Success/Failure The decryption operation is successful whenever the attributes of access policy, which is embedded inside the ciphertext is matched with the attribute of the cloud user. If it is not, then the cloud user cannot decrypt the ciphertext. The BLS short signature is used to check whether the data owner is authentic or not, in order to avoid the insider attack. The decryption process of our proposed method is shown in Algorithms 4 and 5.

Algorithm 5: Algorithm for Node Decryption
Function (DecipherNode (CT, SK, l)) for each leaf node l do assign j = attr(l) if j ∈ A then DecipherNode = e (D j , C x ) / e (D' j , C' x ) return (e (y, y) Mq l (0)) end else return null end end Suppose leaf node l is not in L, access structure (SA) is satisfied by access tree. Now, decipher function will repeatedly compute and return e (y, y) Mq l (0)) = e(y, y) MA . After that, the plaintext (P) can be easily calculated from the ciphertext (CT). 6 Signature Verification This algorithm takes a message (P), computed hash (σ) and the public key of users (pk) and verifies the signature as shown in Algorithm 6 Verify (P, σ, pk) = e (σ, y) = e (h (P), y x ) e (h (P x ), y) = e (h(P), y x ) Algorithm 6: Algorithm to Verify the Signature Function(Verify (P, σ, pk)) if e (σ, y) = e (h(P), y x ) then return Success else return Failure end end C /e (D, C)/A = P · e (y, y) ψA /e (y, y) ψA Figure 6 illustrates the scenario of Hospital Information System when data is shared between users (Patients, Insurance Companies, Government bodies etc.) and Smart Devices (Data Owners). The example scenario work flow gets started by key generation authorities to generate the Public key and Master Secret Key (MSK). Then, each smart device registers with key generation authorities by sending their attributes. After registration, KGC sends Public Key (PK) to the concerned smart device. With this key, the smart device can encrypt its data using Ciphertext Policy Attribute Based Encryption and also can hide the access policy using policy anonymization method. To verify the authenticity of smart devices, short signature scheme (BLS) is used. The encoded files, anonymized policy, signature is uploaded to the hospital service provider (HIS). At that point, the patients or smart devices send requests to HIS and in turn, HIS sends encrypted data, anonymized policy, and signature to the patients or smart devices. In order to view the encoded data, patients or smart devices need to complete the decoding process. During decoding, the order is matching of policy, matching of the data owner attributes and finally verifying the data owner signature. If anyone of these three matching is not satisfied, the opponents or users will not be able to view the original information of the data owner.

Implementations and Performance Evaluation
All the operations of the proposed technique have been experimented on Intel Core i5-4440 CPU @ 3.10GHz processor with 8GB RAM running on Microsoft Windows-10 64-bit operating systems. We also used an Android 7.0.1 Honor mobile with Octa-core processor and 3GB RAM as the IoT device. Typically, the java based CP-ABE toolkit [43,44] using jPBC library (version 2.0.0) [45] is utilized to implement the proposed system. In the access policy, the number of user attributes varies from 10 to 100 [46].

Performance Evaluation
In terms of encryption, decryption and memory analysis, we evaluate the performance of the proposed method and compare it other existing CP-ABE scheme such as [35,47,48].

Time Comparison of Proposed Method with CP-ABE
The proposed technique uses policy anonymization, improves the privacy policy and signature verification of the data owner and identifies the insider attack. In order to achieve this policy anonymization, Secure Hashing Algorithm (SHA1) was used. However, this hashing method introduces a negligible overhead at the data user part.
As shown in Figure 7, existing CP-ABE methods with policy hiding [26,27,47,48] consumed 0.078, 0.18, 0.21 and 0.18 s to generate a key of 10 attributes, whereas the proposed method took only 0.1 s. Similarly, for 100 attributes, the key generation times were 0.545, 0.792, 0.82 and 0.795 s, respectively. The proposed method, however, took 0.57 s, which is lesser compared to the existing methods is shown in Table 3. Further, the proposed method also hides the access policy.    Table 4. The proposed method, however, took 1.541 s, which is lesser compared to the existing methods. Further, the proposed method also hid the access policy. Hence, the proposed method has been proved to have provided better security and privacy compared to existing methods.
As shown in Figure 9, existing CP-ABE methods [26,27,47,48] took 0.015, 0.021, 0.025, and 0.028 s to decipher 10 attributes, whereas the proposed method took only 0.031 s. Similarly, for 100 attributes, the decryption time were 0.054, 0.0821, 0.083 and 0.083 s, respectively. However, the proposed method took 0.114 s, which is higher than the existing methods due to the adaptation of policy anonymization is shown in Table 5. However, the proposed method increased the privacy of access policy as well as shared data by hiding the access policy. Further, the proposed method offered a unique feature to prevent this insider attack by utilizing a short signature scheme.    The overhead of the proposed method is measured at both owner and cloud server part. Figures 10 and 11 showed that the proposed method occupy the constant memory to store the secret key and encrypted file. However, in [27], both secret key and encrypted file size increase linearly with respect to number of user attributes. Therefore, considering the number of secret key attributes (e.g., a value is three), the length of the secret key will increase quadratically with the number of N attributes as shown in Figure 10. The ciphertext stored in the cloud consists of the UUID, the signature, and the hidden access policy ciphertext of data. The EncryptSign algorithm's result includes policy anonymization, signature, and ciphertext, so it had three attributes entirely. The Table in Section 6.3 shows that the ciphertext size increases with respect to the number of attributes in existing schemes. The proposed method is efficient in terms of memory consumption, security and time analysis compared to the existing scheme. Figure 11. Encrypted file size in the cloud server.

AI enabled IoT Usecase Performance Evaluation
The current study utilized the core C implementation of CP-ABE proposed in [49] in order to implement this use case. The C code is accessed on 24 February 2020 at http://spritz.math.unipd.it/projects/andraben. The number of records, throughout the dataset [49], lies in the range of 10 to 50. The tests are carried out for 10 times to ensure that the findings are accurate and consistent enough to compare it with the existing methods. The proposed study was contrasted against the scheme developed by Odelu et al. [48] and Dmitrienko et al. [49] in terms of key generation time and encoding and decoding time.

Key Generation Time
As shown in Figure 12, the existing method by Odelu et al. [48] and Dmitrienko et al. [49] took 5.5 and 5.7 s to generate a key of 10 records, whereas the proposed method consumed 6.1 s. Similarly, for 50 records, the key generation time was 7.8 and 8.2 s for the existing method. However, the proposed method took 8.8 s, which is, to some extent, higher than the existing method is clearly mentioned in Table 6. This additional time is due to the adaptation of the policy anonymization technique to enhance the privacy of the user.   Figure 13 shows the encoding comparison of IoT-based architecture. The existing method by Odelu et al. [48] and Dmitrienko et al. [49] took 0.16 and 0.2 s to encode 10 records, whereas the proposed method consumed 0.31 s. Similarly, for 50 records, the encoding time was 0.88 and 0.931 s for the existing method. However, the proposed method consumed 1.1 s. The additional time, consumed by the proposed method, improves the confidentiality of user data by hiding both access policy as well as CP-ABE encryption is shown in Table 7.   Figure 14 shows the decoding time on the user side. The existing method of Odelu et al. [48] and Dmitrienko et al. [49] consumed 0.28 and 0.36 s to decode 10 records, whereas the proposed method took 0.52 s. Similarly, for 50 records, the decoding time was 0.984 and 1.25 s in the case of the existing method. The proposed method, however, consumed 1.54 s. The additional time required by the proposed method is due to policy anonymization and BLS scheme. Moreover, the security of the proposed method is high compared to the existing methods since three important security measures have been incorporated in the proposed method, such as data owner verification, policy anonymization, and access control. The Table 8 shown the detailed comparison of existing methods and proposed method.  Figure 15 shows the time taken by an intruder to collapse the existing as well as the proposed system. For this validation, one of the patient roles was considered as an intruder, as discussed under Section 7.3. The existing method, by Odelu et al. [48] and Dmitrienko et al. [49], got compromised in 0.68 and 1.25 s to crack a case of 10 attributes, whereas the proposed method consumed 1.78 s to get compromised. When the attributes increase, the resistance time of the proposed method becomes highly notable. Considering 50 attributes, the interrupt time was 2.67 and 4.27 s for the existing method and 6.21 s for the proposed method is shown in Table 9. This result clearly indicates that the proposed method offers an enhanced level of security, compared to the existing methods, in the IoT scenario.

Comparative Analysis
From Table 10, we can see that in most of the CP-ABE schemes, the ciphertext size is not constant and hence the memory consumption still remains as a problem. Although the scheme offered a selective secure without random oracles in [14,22,[26][27][28]47,48], it did not generate a constant ciphertext size, whereas the proposed CP-ABE scheme is selectively secure but has a constant ciphertext size without random oracles. Here, n refers the number of attributes, G T refers the prime order groups.

Computation Cost Analysis
We can see from Table 11 that the proposed scheme takes slightly longer to encrypt and decrypt than other strategies for CP ABE with hidden access policies in [26,27,47,48], because there are only three or four multiplications activities in encrypting and two or one bilinear pairing procedures in decoding. The amount of attributes in the access policy has no bearing on the exponential and bilinear pairing processes. However, our solution is more secure than the others, especially in terms of preventing insider assaults.

Scheme
Encoding Cost ** Decoding Cost ** CP-ABE + Hidden Access policy [26] 3T e 3T b CP-ABE + Hidden Access policy [27] 4T e 3T b CP-ABE + Partially Hidden Access policy [28] 4T e 3T b + T e CP-ABE + Hidden Access policy [48] 3T e 3T b + T e CP-ABE + Hidden Access policy [47] 3T e 2T b + T e Proposed Method 3T e 2T b + 2T e ** where T e represents the time for one exponential operations, T b represents the time for one bilinear operations.

Security Evaluation
We analyze the impact of indistinguishable adaptive chosen-ciphertext attacks for our proposed method using a two-player game.

Indistinguishable Adaptive Chosen-Ciphertext Attack (IND-CCA2)
The security model of the proposed CP-ABE method against an indistinguishable adaptive chosen ciphertext attack (IND-CCA2) is explained by an activity between an adversary (AD) and a challenger (CHR), as below: 1.
Init: The dare access structure, CAS*, is declared by an adversary (AD).

2.
Setup: A challenger (CHR) selects a public security parameter, λ, processes the setup algorithm, distributes a public key (PK) to the adversary (AD), and secretly saves the master secret key (MSK). Two random exponents, ψ, γ ∈ Z R are selected. 3.
Phase 1: The adversary (AD) creates a polynomial time request and the challenger (CHR) provides consistent answers.
(a) Secret Key Request: The adversary (AD) creates a continuous request to produce a secret key, SK u t , with a set of user attributes, W 1 , W 2 ,. . . ,W n ∈ A. The challenger (CHR) replies with the secret key, SK u t , by running the KeyGen algorithm. A number, r j , is randomly chosen and matched to every attribute of j ∈ A. The secret key can be calculated as D j = y r j * H W (j) r j , D' (j) = y r j and distributed to the adversary (AD).
Decipher Request: The adversary (AD) selects a ciphertext randomly decrypted by the access structure (CAS*). The challenger (CHR) then runs the Deci-pherVerify algorithm to decipher the ciphertext using the SK u t The resultant plaintext is sent to the adversary (AD).

4.
Challenge: The adversary (AD) submits two messages of equal length, P 0 , P 1 , to the challenger (CHR). The CHR chooses a random number, α ∈ 0, 1, and encrypts the message, P α , using the challenge access structure, CAS*. The resultant ciphertext (CT*) is sent to the AD.

5.
Phase 2: Similar to Phase 1, the restriction here is that the submitted ciphertext, CT, is not identical to the generated ciphertext, CT*. 6.
At the end of this game, we say that an adversary has succeeded if α == α. The advantage of this game is defined as From this two-player game, we conclude that the proposed system offers security against an indistinguishable adaptive chosen-ciphertext attack (IND-CCA2).

Security against Secure Signatures
Definition 1 (Security of Signatures). A counterfeiter (CF) [50] may be expected to (t, Q H , Q sig , φ) break the BLS scheme σ { Keygen, Sign, Verify} using an adaptive chosen message attack if, after several Q H enquiries to the hash model with t processing time, it produces an output as a valid counterfeiter with the probability of a minimum φ.
A signature method σ(t, Q H , Q sig , φ) is said to be secure if no counterfeiter can break the (t, Q H , Q sig , φ) scheme.
Proof. In the short signature method, we need to make a hash query (Q H ) before signing the message, P.
Suppose a counterfeiter (CF) (t, Q H , Q sig , φ) breaks the BLS method by means of an adaptive chosen message attack. This can be explained by a two-player game against an adversary (AD) and thecounterfeiter (CF).

1.
Step 1: The counterfeiter (CF) runs a SignKey algorithm and produces a public key (pk) and a secret key (sk). The public key is forwarded to the adversary (AD).

2.
Step 2: The adversary (AD) makes a continuous polynomial time request (t) and the counterfeiter (CF) answers hash and signature enquiries.
(a) Hash enquiries (Q H ): The adversary makes a request on a hash oracle model on messages P k for 1 ≤ k ≤ Q H . The counterfeiter (CF) responds with responses already prepared for hash queries (X 1 , X 2 ,. . . , X QH ) on P k . (b) Signature Enquiries (Q sig ): The adversary (AD) makes a request on a signature oracle model for the given messages, P k = (p 1 , p 2 ,. . . , p Qsig ) ∈ 0, 1*, using the public key (pk). The counterfeiter (CF) responds with a signature (σ k → Signing (P k , sk) to the adversary (AD).
It is evident from the two-player game that any advantage an adversary has is small. Therefore, the proposed CP-ABE method has shown itself secure against the adaptive chosen message attack, since no counterfeiter (CF) (t, Q H , Q sig , φ) can break the system for signature (Q sig ) enquiries. In case the counterfeiter (CF) does manage to break the system, the adversary still has a φ advantage. In this scenario, the patient acts as intruder trying to access the encrypted information of medical data. The intruder may pass all the intermediate levels except attribute authorization process from KGC. However, KGC gives authorization only to the attribute matched user. Otherwise, proposed system denies the access for intruder is shown in Figure 16. In Figure 17, we depict the scenario where the intruder may overcome the attribute checking process but fail to match the hash value of the access policy. This is possible due to the policy anonymization method which helps to achieve two important security properties such as confidentiality and authentication.  Figure 18 setup explains verifying the authenticity of the data owner or AI enabled IoT devices. Let us consider the scenario in which intruder has cracked the hash value and access policy matching of our proposed system. To handle such a case, we have further imposed additional security mechanism to verify the authenticity of the data owner using the BLS short signature scheme. This permits only the authorized user to run the verification function of BLS scheme and hence ensures privacy of the data owner.

Conclusions
The encryption based on attributes provides security for outsourced data as well as fine-grained control of access. In addition, the proposed scheme provides privacy protection for outsourced cloud data and verifies the integrity of shared data and insider attack security. The proposed scheme prevents masquerading, repudiation, and shows additional privacy preserving features by policy anonymization method. The efficiency of our method is better compared to existing policy-hidden methods because of constant ciphertext size. Then, we proved the proposed scheme's security against chosen ciphertext attack and insider attack using secured signature. In the future, we plan to apply this proposed method with the multi-authorities attribute set in the small healthcare sector.