{'fraction_non_alphanumeric': 0.04058131955676798, 'fraction_numerical': 0.005866306158414407, 'mean_word_length': 4.19358074222668, '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': 27, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Assured Data Deletion with Fine-grained Access Control for Fog-based Industrial Applications

The advances of cloud computing, fog computing and Internet of Things (IoT) make the industries more prosperous than ever. A wide range of industrial systems such as transportation systems and manufacturing systems have been developed by integrating cloud computing, fog computing and IoT successfully. Security and privacy issues are a major concern that hinders the wide adoptions of these novel techniques. In this paper, we focus on assured data deletion, an issue which is important but received less attention in academia and industry. We firstly propose a framework to integrate the cloud, the fog and the things together to manage the stored data from industries or individuals. We then focus on secure data deletion in this framework by proposing an assured data deletion scheme which fulfills fine-grained access control over sensitive data and verifiable data deletion. Only the data owners and the fog devices are involved when deleting a data key and validating the data deletion, which makes the protocol practical due to the features of low latency and real-time interaction of fog computing. The proposed protocol takes advantage of attribute-based encryption and is provably secure under the standard model. The theoretical analysis shows the good performance and functionality requirements while the implementation results demonstrate the feasibility of our proposal.


I. INTRODUCTION
C Loud computing [1], a type of novel computing paradigm which provides shared processing resources and data to computational devices on demand, has made our lives more convenient and easier. For example, the cloud can turn a resource-constrained mobile device into a supercomputer, which means that we can get super computational power to analyse virtually any type of information wherever we are, from the cloud. As a result, people can benefit a lot by employing cloud computing services. We take software as a service as an instance. Currently, people are enjoying the convenient services provided by Google map, Facebook, Youtube and so on. Cloud computing has a number of benefits such as savings in the cost of upgrades, easy scalability, flexibility in data access, regular backups and disaster recovery. However, there exist two drawbacks namely security and centralization in cloud computing [2].
Cloud computing clearly creates effective economies of scale by using simple centralized architectures. However, traditional cloud computing centralization [3], [4], [5], including centralized data storage and data processing, may lead to some limitations. The first limitation is the loss of privacy [6] due to outsourcing data to a centralized server and the second one is centralization which may cause unreliable latency, lack of mobility support and location-awareness. These inherent problems of cloud computing might hamper human-centered designs, which allow blurring the boundaries between human and machines to emerge more interesting applications.
Amounts of data are produced at the edge of the network, thus, it is more efficient to do computations on the data at the edge of the network. Several emerging techniques such as cloudlet and fog computing [7] have been developed since cloud computing is not always efficient enough for data processing when data is generated at the edge of the network. Fog computing has emerged as a promising technology that can push the frontier of computing applications, data processing, and services out of the centralized data centers and down to the logical periphery of the network. This is extremely beneficial when considering the decreased pressure on network bandwidth and communication latency.
Internet has provided so much convenience to our modern society. People in today's generation are relying on the internet for many different tasks, e.g., work, entertainment, shopping. It has been a common trend that electronic devices are equipped with Internet connection. Internet of things (IoT) [8] is a collection of "things" embedded with electronics, software, sensors, actuators, and connected via the Internet to collect and exchange data with each other. The applications and services running on IoT devices [9] [10] are connected to the Internet and may need to send their collected data to powerful servers for processing or analytics. If these aggregated data are in huge volume and the processing task is time-sensitive, the traditional centralized processing would cause a heavy burden on network bandwidth and also may fail the realtime requirement considering the distance between the central data center and the requestor. Fog computing, instead, shifts the workloads away from the centralized data centers and clouds (i.e., "core" nodes) to the decentralized fog nodes deployed geographically near the IoT devices that requested for resources.
Fog computing is a highly virtualized platform that provides storage, computing and networking services between the end devices and cloud centers [11]. The advantages of fog computing such as location awareness, low latency, support for mobility and predominance of wireless access make it a suitable platform for applications in many domains, such as IoT, software defined networks, wireless sensors and actuators networks. In the framework of fog computing [7], each smart thing is attached to one of fog devices. Fog devices can be interconnected and each of them is linked to the cloud. There is a fruitful interplay between the cloud and fog, especially when it comes to data management and analytics.
Fog computing offers a promising opportunity to build powerful industrial systems by taking advantage of the growing ubiquity of smart things of IoT [12] [13]. For example, IoT has been adopted in the healthcare service industry to improve healthcare service quality. In healthcare scenario, medical sensors carried by patients monitor the parameters such as blood pressure, breathing activity that can be processed and provide guidance to the healthcare staff. Data privacy here is major concern that hinders the general adoption of fog computing. For example, the data should be accessible only to authorized users for the reason that obtaining inaccurate and wrong medical data may lead to wrong treatments and it will cause privacy violation if everyone can access the data. Broadcast encryption [14], [15], [16], [17] is a choice to achieve the goal that an encrypted data can be decrypted by a number of different authorized users, but it requires an encryptor to have the prior knowledge of every prospective receiver as well as the authorization information associated with each receiver. Attribute-based encryption [18], [19] is a highly promising cryptographic primitive to achieve finegrained access control [20], [21], [22], [23], by which only the users whose attributes satisfy the access structure embedded in the ciphertext can decrypt the ciphertext.
Besides fine-grained access control, data security is another concern in fog computing since a user will lose control over their outsourced data. Prior research mainly focuses on the existence of the data, i.e., data integrity, which has been well resolved. We investigate a complementary problem, that is, when a patient wants to delete his sensitive medical data from an outsourced storage, how can he guarantee that the deleted data will never resurface if he does not delete the data by himself? This is a well-recognized issue but received less attention than data integrity. A privacy-focused service may wish to promptly and securely delete the data once they have served their purpose. Network services may also need secure data deletion simply to comply with regulations regarding their users' sensitive data. In 2014, the European Union's right to be forgotten forces companies to store users' data in a manner that supports secure data deletion upon request. Meanwhile, California's legislation enforces similar requirements. Assured data deletion is a natural and necessary requirement in Fog computing especially for the confidential data. However, secure data deletion is challenging since it is much harder to prove non-existence of outsourced data than to prove the existence of the data. The goal of assured data deletion [24] is deleting data from a storage medium, so as to make the data irrecoverable and prevent the adversary from gaining access to them.
In the physical world, secure deletion can be realized easily: confidential documents are shredded, sensitive information of a file is selectively redacted. In the digital world, however, assured data deletion seems simple but there are many tough issues under the surface. Medium's physical destruction such as incineration or pulverization is an accepted approach if the storage medium does not need to be reused. However, secure deletion is not one-off event which deletes the all stored data. Instead, it is common that secure deletion needs to be implemented at a fine granularity and the system needs to continue functioning normally. In fog computing, it needs the trust to the platform since there is no technical proof, and the infrastructure being out of users' control makes them difficult to verify the deletion of data. Now, file systems may implement deletion simply by unlinking the files due to it can be done by changing even only one bit. But this will result in the full contents remain available. Deleted data can be regained by means of data recovery technique, thus cannot achieve the assured data deletion.
The cryptography-based approaches are encrypting data before storage, thus, the data deletion problem is converted to secure erasure of the related secret key. Perman [25] proposed the first assured data deletion file system where each file is created with an expiration time. In [25], the file is securely deleted by removing the ephemeral keys corresponding to the expiration time. However, it needs to determine the expiration time of the key in advance. Moreover, the deletion of data totally depends on the trusted Ephemerizer servers, which may lead to single point failures. Geambasu et al. [26] presented the Vanish, which is designed for the secure deletion of communication over the Internet. In Vanish system, each message is encrypted with a key, and the key is divided into shares and stored in the Distributes Hash Table (DHT) network. Nodes in the DHT remove the key shares that reside in their caches for a fixed time, which leads to the message inaccessible. However, in Vanish system, the deletion is constrained by the node's update cycle, and Vanish cannot resist the Hopping attack and Sniffing attack. The Hopping adversary can change the port number from time to time to join the network to replicate the associated key components (usually 16-51 bytes). By sniffing, the components of a key in transit can be easily captured by the adversary. In 2012, Tang et al. [27] generalized the time-based deletion to policy-based deletion. In their scheme, each file is associated with a boolean combination of atomic policies. A file is encrypted with a data key, and the data key is further encrypted with the control keys which are associated with policies. By revoking the policy, the corresponding control key is deleted from the key manager [28], who is responsible for key management [29], [30], [31]. The flaw of the FADE is that the key managers need to perform complex decryption operations for each message, so it is not suitable for large, dynamic user scenarios. Perito and TSudik designed an assured deletion scheme [32] for embedded devices with limited memory. It makes use of secure code update which securely erase all data on the device and then download the new code, but it fails to achieve finegrained, flexible deletion. Mo [33] proposed a fine-grained assured deletion scheme by using key modulation function. In the scheme, all data keys are derived from master key. When a data key k needs to be deleted, the master key is changed so that the k is unrecoverable, while other keys are attainable from the master key via running the modulator adjustment algorithm. Readon et al. [34] used B tree to organize, access and securely delete data. Both the data and B-Tree are stored on the persistent storage medium in their scheme, and by introducing a shadowing graph mutation, they prove that it achieves secure deletion of data. But it needs to create the arborescent structure for the data.
Our Contributions. To meet the requirements of finegrained access control and secure data deletion, in this paper, we propose a ciphertext-policy based assured deletion (CPAD) scheme. Smart objects are usually deployed for specific applications, which can be utilized to describe data accessibility by encrypting the data with attributes owned by potential users. The access structure in the ciphertext can be sophisticated logic expressions on the attributes. In our protocol, considering that the smart objects are usually resource-limited and expensive cryptographic primitives cannot be directly employed, thus data are encrypted via symmetric encryption algorithm such as AES. We call the key used in the symmetric encryption the data key. Data key is then encrypted with an access structure. The ciphertext of the data key and encrypted data are uploaded to the closest fog device. The fog device then stores the ciphertext of data key but uploads the ciphertext of data to the cloud. We can realize the assured data deletion by attribute revocation such that no user satisfies the access structure in the ciphertext. Moreover, the fog device can respond a proof by which the smart object can verify that the data are deleted indeed. In summary, the contributions of this paper are threefolds.
• The proposed protocol achieves fine-grained access control and assured deletion for data generated by smart objects. Users are assigned a series of attributes. A ciphertext is associated with an access structure, which supports any linear secret sharing schemes. A ciphertext can be decrypted only if the user's attributes meet the access structure in the ciphertext. Assured data deletion is achieved by revoking an attribute in the ciphertext. The fog device can return a proof, and the smart object is convinced that the data are deleted if the received proof is valid. • The proposed protocol is provably secure under the Decisional q-Parallel BDHE assumption. It is resistant against unauthorized users' collusion attack, that is, the collusion of unauthorized users cannot lead to the disclosure of data. Moreover, we remove the centralized trusted service, i.e., key manager, in our protocol. • We empirically evaluate the performance overhead of the proposed protocol, which demonstrates CPAD is efficient in terms of computation and communication overhead.
The implementation of the protocol shows the practicability of CPAD in the real-world applications.
Organization: The remainder of the paper is organized as follows. In section II, we review some preliminaries used in our construction. In section III, we describe the system model, adversary model and security requirements of our assured data deletion protocol. We present our concrete construction in section IV, followed by the security analysis of our scheme in section V. Performance evaluation and implementation results are given in section VI. We conclude this paper in section VII.

II. PRELIMINARIES
In this section, we review some fundamental backgrounds used in the protocol, including bilinear pairings, Decisional Parallel BDHE assumption, access structure, linear secret sharing schemes and attribute-based encryption.

A. Bilinear Pairing and Complexity Assumptions
Definition 1. (Bilinear Pairing). A bilinear pairing [36] is a map e : G × G → G T , where G, G T are two multiplicative cyclic bilinear groups of prime order p. The map has the following properties. Bilinearity.
Non-Degeneracy. e(g, g) / ∈ 1,where g is a generator of G. Efficient Computation. There exists an efficiently computable algorithm to compute e(h 1 , h 2 ) for all h 1 , h 2 ∈ G. Definition 2. (Decisional q-Parallel Bilinear Diffie-Hellman Exponent assumption [37]). Choose a group G of prime order p. Let g be the generator of G and a, s, b 1 , . . . b q be chosen randomly from Z p . If an adversary is given y = g, g s , g a , · · · , g a q , , g a q+2 , · · · , g a 2q ∀1 ≤ j ≤ q, g s·bj , g a/bj , · · · , g a q /bj , , g a q+2 /bj , · · · , g a 2q /bj ∀1 ≤ k, j ≤ q, k = j, g a·s·b k /bj , · · · , g a q ·s·b k /bj it is hard to distinguish the e(g, g) a q+1 s from a random element R in G T . We say an algorithm B that outputs z ∈ {0, 1} has advantage in solving Decisional q-P arallel BDHE problem if The Decisional q-P arallel BDHE assumption holds if no adversary has a non-negligible advantage in solving the Decisional q-P arallel BDHE problem. The proof that the assumption generally holds is in [37].

B. Access Structures
An access structure (respectively, monotone access structure) is a collection (respectively, monotone collection) A of non-empty subsets of {P 1 , P 2 , . . . P n }, i.e. , A ⊆ 2 {P1,P2,...Pn} \{∅}. The sets in A are called the authorized sets, and the sets not in A are called the unauthorized sets.
In our protocol, the parties are identified by the attributes. Thus the access structure A contains the authorized sets of attributes.
C. Linear Secret Sharing Schemes Definition 4. (Linear Secret Sharing Schemes (LSSS) [38]). We recall the definitions of LSSS given in [38] as follows. A secret sharing scheme Π over a set of parties P is linear if • The shares for each party form a vector over Z p . • There exists a matrix M with l rows and n columns called the share-generating matrix for Π. For i =1, . . . , l, ρ(i) is a function, which defines the party labeling row i. For the column vector v = (s, r 2 , . . . , r n ), where s ∈ Z p is the secret to be shared, and r 2 , . . . , r n ∈ Z p are chosen randomly, M v is the vector of l shares of the secret s according to Π. The share M v i belongs to party ρ(i). Linear secret sharing scheme enjoys the linear reconstruction property: Suppose that Π is an LSSS for the access structure A and S ∈ A is any authorized set. Let I ⊂ {1, 2, . . . l} be the set that I = {i : ρ(i) ∈ S}. Then, if {λ i } i∈I are valid shares of secret s according to Π, there exist constants {ω i ∈ Z p } i∈I such that i∈I ω i λ i = s. And these constants {ω i ∈ Z p } i∈I can be found out in time polynomial in the size of share-generating matrix M .
Note: Using standard techniques [38], one can convert any monotonic boolean formula (including access formulas in terms of binary trees) into an LSSS representation. In our protocol, we use the vector (1, 0, 0 . . . , 0) as the target vector for linear secret sharing schemes. For any satisfying set of rows I of M , the target vector is in the span of I. For any unauthorized set of rows I of M , the target vector is not in the span of I. Moreover, there exists a vector ω such that ω · (1, 0, 0 . . . , 0) = −1 and ω · M i = 0 for all i ∈ I, where M i is the i-th row of the matrix M .

D. Attribute-based encryption
The first attribute-based encryption scheme [39] was proposed by Sahai and Waters. In attribute-based encryption schemes, attributes have been exploited to generate Public/Private key pairs for users, and have been used as an access policy to control users' access. Depending on the access policy, attribute-based encryption schemes can be roughly categorized as key-policy attribute-based encryption (KP-ABE) and ciphertext policy attribute-based encryption (CP-ABE) schemes.
The CP-ABE builds the access structure in the ciphertext which can choose the corresponding user's private key to decipher encrypted data. It improves the disadvantages of KP-ABE that the data owner cannot choose who can decrypt the ciphertext. Moreover, a users' private key corresponding to a set of attributes, so the user can decrypt the ciphertext whith the attributes, which satisfies the access structure. Thus, CP-ABE is very close to traditional access control and can be applied in a number of real-world applications.
In 2007, Bethencourt et al. [19] proposed the first ciphertextpolicy attribute-based encryption scheme, which consists of four algorithms described below.
Setup(λ): This algorithm takes a security parameter λ as input. It outputs the public parameters P P and a master key M K.
Encrypt(P K, M, A): This algorithm takes as input the public parameter P K, a message M and an access structure A.
The message is encrypted with the access structure A. This algorithm outputs the ciphertext CT of M .
KeyGen(M K, S): This algorithm takes as input the master key M K and a set of attributes S and outputs the private key SK.
Decrypt(CT, P K, SK): This algorithm takes as input the ciphertext CT which implicitly contains an access structure A, public parameters P P and a private key SK, which is a private key for a set of attributes S. If the set of attributes satisfy the access structure A, then this algorithm decrypts the ciphertext and outputs the message M .

III. MODELS AND REQUIREMENTS
In this section, we describe the system model, security requirements and security model in fog based assured data deletion.

A. System Model
We consider the scenario where there are many smart objects generating or collecting data. Each smart thing is connected to one of fog devices by a wireless access. Fog devices could be interconnected and each of them is linked to the cloud as shown in Fig. 1. There is an Attribute Authority (AA), who is responsible for the system initialization and attributes management in the system. AA publishes the system parameters which are needed in encryption and assigns private keys to the users. The cloud, which has powerful computing and storage resources, provides data storage, access control and data processing services for users. The fog devices allow applications to run as close as possible to sensed, actionable and massive data. It provides compute, storage and networking services between end devices and traditional cloud servers. We assume fog nodes are honest but curious, which means it honestly executes the tasks assigned by legitimate parties in the system. However, it would like to learn information of the data in the cloud as much as possible. Smart objects, such as sensors or embedded devices in IoT, generate data and upload encrypted data to the fog devices and the cloud. Smart objects cannot afford expensive computational operations due to limited computing and storage capacity. Users, whose attributes satisfy the access structure in the ciphertext, can recover the data.

B. Security Requirements
We consider adversaries whose main goal is to obtain the data which they are not authorized to access. The attackers can eavesdrop all the communications in the system, and unauthorized users may collude to compromise the encrytped data. After the data are deleted, adversaries try to recover the deleted data. The adversaries here include both authorized users and unauthorized users. We assume fog devices are honest, hence we do not consider attacks in which users collude with fog devices.
For secure data storage and access, some common security properties such as data confidentiality and integrity, should be guaranteed. Here, we focus on two specific goals that  Fig. 1: System model CPAD seeks to achieve: secure fine-grained access control and assured deletion of data. Secure fine-grained access control: As mentioned previously, fine-grained data access control is always desirable in many applications. The proper scheme should be able to precisely specify the capability of different kinds of users to access the data at different security levels. A user can decrypt the ciphertext only when the attributes of the user satisfy the access structure. Unauthorized users can not get access to the sensitive data even they collude with each other.
Assured data deletion: The data should be permanently inaccessible to users after data deletion. An adversary cannot get any knowledge of the data even it can access the data previously. The fog devices should return a deletion proof with which the smart object can validate that the data have been indeed deleted.

C. Security model
In the security model of assured deletion, the adversary chooses an access structure A * at the beginning of the game, such that the data key encrypted under the access structure A * is deleted in the end. The adversary can also query any secret keys corresponding to the set of attribute S, such that S does not satisfy A * .
The security of the ciphertext-policy based assured data deletion scheme is defined using the following game in which an adversary and a challenger are involved. Init: The adversary outputs an access structure A * in which the dummy attribute is revoked, meaning the data key encrypted under the access structure A * is deleted. Setup: The challenger runs the Setup algorithm and give the adversary public parameters P K. Phase 1: The adversary makes a number of private key queries corresponding to sets of attributes S 1 , . . . , S q1 . The restriction for each query is that none of the attribute set S i satisfies A * . Since the attribute "dummy" is revoked, the set of attribute S i does not contain the attribute "dummy".
Challenge: The adversary outputs two equal length messages M 0 , M 1 and sends them to the challenger. The challenger picks a random bit b ∈ {0, 1} and encrypts the message M b under A * . Then the ciphertext CT * is forward to the adversary. Phase 2: The adversary issues additional private key queries corresponding to the sets of attributes S q1+1 , . . . , S q with the same restrictions as in Phase 1. Guess: The adversary outputs a guess b ∈ {0, 1} and wins if b = b .
The advantage of the adversary in attacking the game is defined as Adv A ciphertext-policy based assured data deletion scheme is secure if no polynomial time adversary has a non-negligible success advantage in the aforementioned game.
IV. OUR CONSTRUCTION In this section, we describe a concrete construction that fulfills the properties of assured data deletion and fine-grained data access. In our protocol, we make use of the ciphertextpolicy attribute-based encryption. Attribute authority (AA) initializes the system and publishes system parameters. We denote the universe of all the attributes in the system by a symbol U . There is an attribute "dummy", which is included in the set of attributes for each user and is an indispensable attribute in the access formula. Each smart object is preloaded the public parameter P P as well as a LSSS access matrix M . The data generated by the smart object are encrypted using a symmetric encryption algorithm. The data key is encrypted with the ciphertext-policy attribute-based encryption. The smart object uploads the ciphertext of data and encrypted data key to a fog device, and deletes the local file. The fog device keeps the ciphertext of the data key, and transfers the ciphertext of data to the cloud. When the data generated by the smart objects need to be deleted, the smart object sends a deletion request to the fog device. The smart object and the fog device can agree a secret deletion key via a key exchange protocol. By utilizing the deletion key, the fog device changes the ciphertext related to the attribute "dummy", such that users who can access the data previously cannot decrypt the ciphertext. The fog device then sends a deletion request to the cloud for deleting the ciphertext. It is fair to assume the smart object can decrypt the data generated by itself. The smart object can verify the deletion with the deletion key. Our protocol is based on the Waters' ABE construction [37], and AA is not involved in the data deletion process.
Setup(1 λ ). AA chooses two multiplicative cyclic groups G and G T of prime order p and a bilinear map e : G × G → G T . Let g be a generator of G. AA picks random exponents α, a ∈ Z p , and chooses a hash function h : {0, 1} * → Z p . AA chooses |U | random group elements h 1 , . . . , h |U | ∈ G that are associated with the |U | attributes in the system. The public parameter is published as P P = {g, e(g, g) α , g a , h 1 , . . . , h |U | , h}. AA sets M SK = g α as the master secret key.
KeyGen(M SK, S): AA takes as input the master secret key M SK and a set of the attributes S of a user, randomly picks t ∈ Z p , and computes the private key of the user as follows.
The private key of the user is SK = {K, L, ∀x ∈ S, K x }.
The smart object generates a signing public-secret key pair {spk, ssk}. The fog device also generates a signing key pair {f pk, f sk}. The signing algorithm can use short signature where a user or a fog device picks a random sec ∈ Z * p , and compute v = g sec . It also chooses a hash function h 1 : {0, 1} * → G\{1}. The spk is {v, h 1 }, and ssk is sec.
Encrypt(P P, (M, ρ), m, k). The smart object takes as input the public parameter P P , data m to be encrypted, an LSSS access structure AS = (M, ρ), and symmetric key k. M is an l * n matrix, and M i denotes the vector corresponding to the ith row of M . The function ρ maps each row of M to different attributes. The smart object picks a file name f name ∈ Z p for the data randomly and the data are encrypted with a symmetric encryption such as AES. {D} k represents the ciphertext in which k is the symmetric data key. To encrypt the data key, the smart object chooses random values r 1 , · · · , r l ∈ Z p and a random vector v = (s, y 2 , . . . , y n ) ∈ Z n p , which is for generating the shares of the encryption exponent s. Decrypt(CT, {D} k , SK): A user first obtains the ciphertext CT from the fog device and {D} k from the cloud. Suppose the set of attributes S satisfies the access structure AS in the ciphertext, and let I ⊂ {1, 2, . . . , l}, I = {i : ρ(i) ∈ S}, then {ω i ∈ Z p } i∈I can be calculated where {ω i } i∈I are constants such that if {λ i } i∈I are valid shares of secret s, then i∈I ω i λ i = s. The decryption process is as follows, e(C , K) i∈I (e(C i , L)e(D i , K ρi )) ωi = e(g, g) αs e(g, g) ast i∈I e(g, g) taλiωi = e(g, g) αs The user computes k as k = C e(g,g) αs , and decrypts the data with k.
DelRequest(f name, x): x denotes the attribute "dummy". When the smart object wants to delete the file named f name on the fog device, it first chooses two random numbers q, u ∈ Z p , and computes θ = q u mod p. Then the smart object sends the deletion request DR = {delete||f name||x||q||θ, sign ssk (h(delete||f name||x||q||θ))} to the fog device.
ReEncrypt(CT, DR): Upon receiving the deletion request, the fog device verifies the signature in DR. If the signature is valid, the fog device transmits the deletion request DR to the cloud. The cloud validates DR again. If the signature in DR is valid, the cloud deletes {D} k . The fog device picks a random v ∈ Z p , and computes η = q v (mod p), γ = θ v (mod p).
Then the fog device updates the ciphertext D i in CT for the index i that ρ (i) = x, where x denotes the attribute dummy, x and sends Resp = {η, sign f sk (η)} to the smart object.
Verify(Resp, CT ): Upon receiving the response Resp from the fog device, the smart object first verifies the correctness of the signature. If it is valid, the smart object computes γ = η u mod p, K x = K γ x , and retrieve the updated ciphertext of k which is CT = {C, C , {C i , D i } 1≤i≤l } from the fog device. The smart object verifies the deletion as follows.
The smart object computes A = i∈I B i = e(g, g) ats and k = CȦ e(C ,K) . Finally, it calculates τ = h(f name||k ) and compares it with τ . If τ = τ holds, the smart object is convinced that the ciphertext has been changed and the data is inaccessible.

V. SECURITY ANALYSIS
We evaluate the security of the proposed protocol by showing it satisfies all the security requirements described in section III.

A. Secure Fine-grained Data Access Control
Secure fine-grained data access control ensures that only users whose attributes satisfy the access structure in the ciphertext can decrypt the ciphertext correctly. Even the unauthorized users collude, they cannot learn any information from the ciphertext. In our protocol, data are encrypted with a symmetric encryption algorithm. The security of the data can be guaranteed by choosing a secure symmetric encryption algorithm such as AES, which means without the data key, the data is IND-secure. Our encryption of the data key is provably secure under the q-parallel BDHE assumption. The proof is similar to that of Waters' scheme [37] and so we omit it here. This turns out that the adversary is unable to decrypt the data key unless it owns the intended attributes. Therefore, our protocol can make sure that only authorized users can access the data.

B. Assured data deletion
Assured data deletion ensures the irrecoverability of the data when the data are deleted. Since data key is encrypted with an access structure and the ciphertext of the data key is reencrypted, the new ciphertext can not be decrypted correctly by the user's private key, thus, the data is irrecoverable.
When the data are deleted, the security of data key can be proved as follows.
Theorem 1. Suppose the decisional q-parallel BDHE assumption holds in G and G T , there is no polynomial time adversary A can break the security of our protocol with a non-negligible advantage.
Proof : The adversary A claims a challenge matrix M * , and the size of M * is l * * n * , where l * , n * ≤ q. Suppose the adversary has a non-negligible in the selective security game against our protocol, then we can construct a simulator B that can solve an instance of q-parallel BDHE problem with a non-negligible advantage.
B chooses groups G and G T with an efficient bilinear map e and a generator g. The challenger flips a fair coin µ. If µ = 0, the challenger sets the ( y, T ) = ( y, e(g, g) a q+1 s ); Otherwise it sets ( y, T ) = ( y, R) with a random R. Init: A outputs the challenge access structure (M * , ρ * ) in which M * has n * columns. The data key encrypted under the access structure is deleted in the end. Setup: B chooses a random α ∈ Z p , and sets e(g, g) α = e(g a , g a q )e(g, g) α which implicitly sets α = α + a q+1 .
For each attribute x, B chooses a random value z x . Let X denote the set of indices i, such that ρ * (i) = x, which means that the ρ function may be not injective. Then B programs h x as follows: If X = ∅, h x = g zx ; else, h x = g zx i∈X g aM * i,1 /bi · g a 2 M * i,2 /bi · · · g a n * M * i,n * /bi . Note that the outputs of the oracle are distributed randomly due to the randomness of g zx . Phase 1: A adaptively makes requests for the keys. Assume B is given a private key query for a set of attributes S which does not satisfy M * . The attribute "dummy" is not included in the set of attributes S for the reason that the data have been deleted, the ciphertext corresponding to the attribute "dummy" is re-encrypted, which leads to the key relevant to the attribute "dummy" is invalid. Hence, in the adversary's view, it has no knowledge about the corresponding key.
Then B sets L as Since g α is unknown, it seems hard to calculate K. However, by the definition of t and ω 1 = −1, g at contains a term g −a q+1 which can cancel out g α when calculating K. B computes K as For {K x } x∈S , if there is no i such that ρ * (i) = x, B can simply set K x = L zx . For the x which is used in access structure, the terms of the form g a q+1 /b i are hard to simulate. However, we have M * i · ω = 0, all these terms can be canceled. B computes K x as follows. B flips a coin β. It computes C = M β T · e(g s , g α ) and C = g s .
The components C i contains terms g a j s that B can't calculate. However, B can choose the secret splitting, which makes these terms be canceled out. B chooses random y 2 , · · · , y n * and the vector v = (s, sa + y 2 , sa 2 + y 3 , . . . sa n−1 + y n * ) ∈ Z n * p . Then B chooses a random key η and random values r 1 , . . . , r l . For the index i that ρ(i) = x, where x denotes the attribute "dummy", B sets D i = (g −r i g −sbi ) 1 η , otherwise, D i = g −r i g −sbi . Denote R i as the set of all k = i, i = 1, . . . , n * such that ρ * (i) = ρ * (k), which indicates the set of all other row indices which map to same attributes as row i. C i is generated as as the challenge ciphertext. Phase 2: Same as phase 1.
Guess: Finally, A outputs a guess β of β. If β = β, B outputs 0 indicating that T = e(g, g) a q+1 s . Otherwise B outputs 1, which means T is a random elements.
Therefore, the overall advantage of B in the q-parallel BDHE game is 2 , which is non-negligible.
Since that the decisional q-parallel BDHE assumption holds in G and G T , the probability that the adversary breaks the security of our protocol is negligible.

VI. PERFORMANCE EVALUATION
In this section, we first discuss the numeric results in terms of computation and communication overheads, and then report the implementation results.

A. Numeric Analysis
Computation cost: In our protocol, AA generates users' private keys according to their attributes. Data are generated and encrypted by the smart object, and decrypted by the users. Data deletion is done by the fog devices. We present the computation cost from the viewpoint of the AA, the fog device, the smart object and the user. For simplicity, M G and E G denotes the multiplication and exponentiation in group G and use M G T , E G T to denote the multiplication and exponentiation in group G T . Denote P the pairing computation. We ignore the computation cost of the hash functions since it is negligible compared with other expensive operations.
AA is responsible for generating public parameters and private keys for users. Assume a user owns s attributes, the computation cost of AA is (s + 2)E G + 1M G . For the smart object, the primary computation is generating the ciphertext of For a share-generating matrix M with l rows, the dominated cost of the smart object is 3lE G +lM G +1P +1M G T . The main computation of users is decrypting the encrypted data key. Suppose that the rows in M corresponding to the attributes satisfying the access structure is i, the computation cost of the user is (2P Regarding data deletion, the computation cost of the fog device is 2 exponentiations in Z p and 1 exponentiation in G. When validating a deletion proof, the cost of the smart object is (2P + 1M G T + 1E G T )i + 2M G T + 1E G , where i denotes the number of the rows in M that corresponds to the attributes of the smart object.
Communication cost: After encryption, the smart object uploads the {f name, spk, CT, {D} k , (M, ρ)} to the fog device. The size of {D} k is related to the data since data are encrypted with symmetric encryption. The ciphertext size of the data key is O(l), where l is the size of an access formula. During the deletion process, the deletion request contains 4 group elements in Z p . The deletion proof returned from the fog device includes two group elements in Z p . In the verification phase, the smart object needs to retrieve the ciphertext of the data key whose size is O(l), where l denotes the size of the access formula in the ciphertext.

B. Implementation
In our implementation, we use SHA-1 as the one-way hash function and AES as the data encryption algorithm. The experiments were conducted with Miracl library [40] on Intel i5-2450 MQ CPU @ 2.50 GHz. The size of AES keys is 128 bits and the security parameter is 80, which satisfies the security requirements.
Since the dominated computation of the smart object is encrypting the data key, we increase the size of the access formula embedded in the ciphertext to assess the encryption cost on the smart object side. In our experiments, we increase the parameters of the share-generating matrix, l and n, simultaneously from 10 to 50 with an increment of 10 for each test. We observe that the time cost of the encryption grows as During the data deletion process, the time to generate the deletion request for the smart object is small since there are only one exponentiation computation. On the fog device side, the time cost of producing a proof is small as well, because only three exponentiation is needed. The main cost of the smart object is to verify the proof returned from the fog device, which is almost the same as the decryption cost. Fortunately, it is a one time computation for a unique file. As shown in Fig.  4, it consumes about 115 ms, 144 ms, 180 ms respectively if the smart object has 6, 8, 10 attributes, which is bearable to the smart object.

VII. CONCLUSION
In this paper, we investigated an essential but challenging issue of fine-grained data access and assured data deletion in fog-based industrial applications. To solve the problem, we proposed a new protocol called CPAD, in which smart objects encrypt the data with an access structure and only the users with intended attributes can decrypt it correctly. When the data needs to be deleted, the fog device can do the operations such that none of the users can recover the data key, which makes data irrecoverable. Moreover, CPAD is resilient against unauthorized user colluding attack. The implementations show our protocol can be adopted in real-world applications.