Abstract
With the widespread use of fog-to-cloud computing–based Internet of things devices, how to ensure the integrity of the data uploaded to the cloud has become one of the most important security issues. This article proposes an efficient and secure data auditing scheme based on fog-to-cloud computing for Internet of things scenarios, which can better meet performance and security requirements. The proposed scheme realizes data sharing under the condition of protecting privacy by encrypting sensitive information. Using the private key separation method, the private key is divided into two parts using identity information generation and random selection which are, respectively, held by the user and the fog center. Then, using the two-time signature method, the Internet of things and fog computing center use two parts of the private key to generate the original signature and final signature in two separate times. Since the fog computing center only has a part of the private key generated using the identity information, the security of the system will not be damaged due to the leakage of part of the private key held by the fog center, and the fog center significantly participates in the signature generation process, which significantly reduces the computation and communication overhead of the Internet of things device. Security analysis and performance evaluation show that the proposed scheme is safe and efficient.
Introduction
With the introduction and widely used of Internet of things (IoT) devices in our life and industrial production, Cisco first proposed fog computing in 2012 1 is also widely considered as a new paradigm that can effectively support for distributed, delay sensitive, and quality of service (QoS)-aware. As an intermediate device between the IoT device and the cloud, the fog computing center contains multiple fog nodes. The fog node has basic computing power, storage capabilities, and network resources to meet the data preprocessing and transmission requirements. 2 Therefore, the fog computing is an effective and practical solution from the perspective of delay constraints and resource constraints. It is estimated that the data currently generated by IoT devices have exceeded half of the total data. 3 In 2019, the data generated by IoT devices will reach 500 ZB, which will be preprocessed by fog and then outsourced to the cloud for further analysis and storage. As an emerging technology, fog-to-cloud computing still faces many security challenges. 4 One of the most concerned issues is how to ensure the integrity and correctness of important data uploaded to the cloud. Like traditional cloud storage, the cloud service provider (CSP) also tries to hide the fact that data are corrupted because of its own benefits or reputation, 5 and even deletes some data that users rarely access to save storage space. 6 To this end, it is important to design an efficient and secure cloud data auditing scheme. At present, many cloud data auditing schemes have been proposed.7–11 However, these schemes cannot be directly applied to IoT devices based on fog-to-cloud computing. 12 The reasons are as follows: (1) the signature generation overhead in traditional auditing scheme for cloud storage is too high, and it is difficult to apply to IoT devices with low computing power and (2) the traditional auditing scheme for cloud storage does not involve fog nodes, but the fog node plays a very important role in the fog-to-cloud computing, which can help IoT devices to efficiently process and transmit data.
There are many successful applications for IoT based on fog-to-cloud computing. One of the most common situations is users use sensors to collect the required data, such as related environmental data. Of course, users can also set multiple sensors to collect different areas or different types of data and transmit them to the fog node. Each fog node is a small service device provided by a service provider that can simply process and analyze data. Multiple fog nodes form a fog computing center and a management node is set up to manage all fog nodes. Finally, all data are outsourced to the cloud for cost-effective storage and other future uses. 13 In order to ensure the integrity of the data, the sensor should create verifiable metadata before sending the collected data to the fog node; for the received data, the fog node must first verify its correctness, and then perform local analysis and processing, and for the processed data, fog nodes should create new verifiable metadata. Finally, all data and its verifiable metadata are transferred to the cloud for long-term storage. The data owner or any other authorized party should be able to verify the integrity of the data anytime, anywhere, that is, remotely audit the correctness of the data. It is the very purpose of this work to design a secure and efficient auditing scheme for data storage based on fog-to-cloud computing for IoT scenarios.
Compared with the existing scheme, the proposed scheme reduces the user’s computation overhead through the two-time signature and private key separation method, so that the proposed scheme can be better used for IoT devices with low computing capabilities. At the same time, the proposed scheme will verify the system parameters and the file tag during the signature generation and the proof generation to ensure the security of the scheme.
Our contributions
In this article, we proposed an efficient and secure data auditing scheme based on fog-to-cloud computing for IoT scenarios (DAFCI). Contributions can be summarized as follows:
We use the method of separating the private key, which divides the private key into two parts, and part of the private key
We then propose the two-time signature method, which divided the signature process into two phases: original signature and final signature. The first is that the sensor uses
We formally prove the security of the proposed scheme, and evaluate its performance by theoretical analysis and experimental comparisons with other schemes. The results show that the proposed scheme can effectively achieve secure auditing in fog-to-cloud computing, and outperforms the others in computation complexity and energy consumption.
Organization
The rest of this article is organized as follows. In section “Related work,” we review the related work on cloud data auditing, especially the public auditing schemes. In section “Symbols and preliminary knowledge,” we present notations and preliminaries. In section “System model and security model,” the system model and security model are presented. In section “The proposed scheme,” we introduced the proposed scheme. In section “security analysis” and section “performance evaluation,” the security analysis and the performance evaluation are given, respectively. Finally, in section “Conclusion,” we conclude our article.
Related work
With the increasing popularity and importance of IoT, the security and privacy issues of IoT have attracted widespread attention from industry and academia. 14 Many fruitful and relevant studies have been carried out, such as how to implement secure communication between IoT nodes, 15 how to preprocess service privacy while providing users with secure data services in IoT applications, 16 and how to ensure the integrity of the message moves the entire IoT infrastructure. 17
In most applications, the sensor device collects the data and generates verifiable metadata, and then uploads the metadata to the fog node. After receiving the metadata, the fog node will first verify the metadata. If the result is true, the metadata will be further processed, then upload it and the data to the cloud for long-term storage. Data owners can verify at anytime to ensure the correctness and integrity of the data stored in the cloud, that is, the data owner can perform remote integrity auditing of the data. The auditing model is divided into private auditing and public auditing. The verification operation of the private auditing is only carried out between the CSP and the user, without the intervention of a third party, 18 and the public auditing in which the verification operation is customarily done by an authorized third-party auditor (TPA). 19 Public auditing is generally considered to be a more effective approach because it provides more convincing results while significantly reducing the user’s computation and communication overhead. At present, data integrity auditing based on IoT devices has received more and more attention. Aazam et al. 20 believed that IoT devices use the cloud to process and store data. There are still some problems that must be solved, because the cloud is not trusted, so users cannot ensure that the cloud correctly stores the data uploaded by IoT. For data stored on the cloud server, the provable data possession (PDP) scheme 21 can effectively verify the integrity of the cloud data and achieve blockless verification, that is, without downloading the original data. Integrity verification ensures storage security, but the computational and communication overhead of this scheme is too large to be applied to IoT devices. Xu et al. 22 proposed a distributed fully homomorphic encryption-based Merkle Tree (FHMT) scheme, which effectively solves the cloud credibility problem using blockchain technology, but their scheme does not implement public auditing. Yu et al. 23 proposed an identity-based private key generation auditing scheme, which reduces the overhead of certificate management, but the overhead of signature generation and auditing proof verification is still large to the IoT device. Zhu et al. 24 proposed a short signature-based data auditing scheme, which reduced the computational overhead of signature generation. However, their proposed scheme is not based on fog-to-cloud computing. The communication and computation overhead of IoT devices is still very high. Tian et al. 25 reduced the overhead of signature generation by introducing fog nodes, but in their scheme, fog nodes are considered to be credible, but in reality, the fog node used by most users is not a trustworthy entity, the same as the cloud. Huang et al. 26 proposed the Efficient Versatile Auditing Scheme for IoT-Based Datamarket in Jointcloud to solve the single-point-of-failure (SPoF) of cloud server using the blockchain to record the data flow, but it still does not solve the problem that the signature generation overhead of the cloud auditing scheme is too high, so it cannot be directly applied to low computing IoT devices.
Li and Yu 27 proposed a cloud auditing scheme based on threshold secret sharing, but compared to this, the two-time signature method has two advantages as follows:
One of the characteristics of threshold secret sharing scheme is that when the number of people who want to unlock the secret reaches a predetermined value, it can be decrypted even without other parts of private key. But this method is difficult to apply directly to the IoT scenarios, because if the private key is assigned to sensors, when the parts of private key held by some sensors are leaked, the adversary can forge a signature based on some of the private keys to access sensitive data.
The above-mentioned schemes and other existing schemes cannot well meet the requirements of low computing overhead and high security of IoT devices, so we try to propose a cloud auditing scheme that can better meet the requirements of the IoT environment.
In the secret sharing scheme with the threshold, parts of private key are different. However, in the proposed scheme, the part of private key held by all sensors in the same system is the same, which enables even different types of sensors can generate the same signature, ensuring the consistency of the signature and facilitating verification.
In the proposed scheme, the fog-to-cloud computing is introduced, but the fog is designed as an untrusted entity. The method of private key separation and two-time signature avoids the situation that the private key is directly leaked by the fog node, and the security is destroyed due to the leakage of the private key, improving efficiency and security.
Symbols and preliminary knowledge
Notions
The symbols and corresponding descriptions appearing in the DAFCI scheme can be seen in Table 1.
Notations.
PKG: private key generator; FCC: fog computing center.
Preliminary
Bilinear map: let
(a) Bilinearity: for all
(b) Computability: there exists an efficiently computable algorithm for computing map e.
(c) Non-degeneracy:
2. Computational Diffie–Hellman (CDH) problem: for unknown
3. Discrete logarithm (DL) problem: for unknown
System model and security model
System model
The system model of the DAFCI scheme is shown in Figure 1. The model mainly includes five different entities: CSP, sensor, PKG, fog computing center (FCC), and TPA, as follows:
CSP: CSP provides enormous data storage and data processing service to the users.
Sensor: the sensor device is responsible for collecting data, then hiding the sensitive information and generating the original signature, and uploading it to FCC. A system can contain multiple sensor devices. Multiple sensors belonging to the same system can be of different types, collecting different data separately, but they have the same private key.
FCC: the FCC consists of several fog nodes, each of which is responsible for generating a final signature for the sensors in the area to reduce the computational overhead of the sensor.
PKG: PKG is responsible for generating part of the private key
TPA: TPA is a third-party auditor. It helps sensors audit the integrity of the data stored in the cloud.

System model.
After the sensor collects the data, the sensitive information is blinded. Since the proportion of this part of the data is small, the process overhead is very low. The original signature is then generated based on a portion of the private key and sent to the FCC. After receiving the original signature, the FCC uses its holds partial private key to generate the final signature and upload it to the CSP.
When the sensor wants to verify the cloud data, it sends an audit request to the TPA. After receiving the request, the TPA selects challenge blocks according to the block number contained in the instruction and initiates an audit challenge to the CSP. The CSP then sends the data auditing proof back to the TPA. Finally, the TPA will verify the proof and inform the result to the sensor.
Design goals
In order to effectively ensure the secure storage of sensor data in the cloud, the DAFCI is designed to achieve the following goals.
The detectability
The scheme should have a high enough probability to detect damage of the cloud data. When the proportion of damaged blocks is
The correctness
The correctness includes the correctness of the private key and the correctness of the auditing:
The correctness of the private key: verify the partial private key
The correctness of auditing: TPA verifies the auditing proof generated by CSP to ensure the integrity of sensor data.
The soundness
The soundness requires that any false proof pass verification probability is negligible. In other words, only the CSP that correctly stores the data can generate the correct auditing proof.
Definition
Definition 1
The DAFCI scheme consists of six algorithms: Setup, Extract, SigGenU, SigGenF, ProofGen, and ProofVerify. These algorithms are described as follows:
Security model
In the DAFCI scheme, the PKG may be untrusted because the PKG only generates a partial private key
Setup phase: the challenger C runs the Setup algorithm to get the private key sk and public parameters pp, and then sends the public parameters pp to the adversary A.
Query phase: at this stage, adversary A will make the following two queries to the challenger C.
Extract queries: the adversary A sends the identity information ID to challenger C. The challenger executes the Extract algorithm to get the private key
SigGen queries: the adversary asks for the corresponding signature of file F. The challenger executes the Extract algorithm to obtain the private key. Challenger C then runs the SigGen algorithm to calculate the signature corresponding to file F and sends it to adversary A.
Challenge phase: at this stage, the adversary will act as a prover and the challenger will act as a verifier. The challenger C sends the challenge block
ProofGen phase: after receiving the challenge of challenger C, the adversary A generates a corresponding proof P of the chal block and sends it to the challenger C. If it is proved that P can pass the verification with a non-negligible probability, it can be considered that the adversary A has won the game.
For the above security model, it is necessary to prove that if the adversary cannot have all the challenge blocks required by the challenger, it cannot generate the correct proof P, which means that the proof of the adversary’s forgery cannot be verified. The purpose of the adversary A is to correctly generate the corresponding signature of the challenge chal without holding the data blocks.
Definition 2
We consider a remote data integrity auditing scheme is secure if the following condition holds: whenever the adversary A in the aforementioned game is able to generate a valid proof P to pass the challenge of the challenger C with a non-negligible probability, there is a knowledge extractor that can capture the challenged data block, but the probability can be neglected.
Definition 3
If only the data owner can view the sensitive information in the file, the CSP and other shared sensors can only view the non-sensitive information, then the sensitive information in the file is safe.
The proposed scheme
An overview
The sensor has lower computing power and shorter battery life. In order to minimize the energy consumption of the sensor device, the DAFCI scheme uses the blockless verification technology to enable the sensor to complete the integrity verification without downloading the blocks stored in the cloud. The private key separation method and the two-time signature method are used to further reduce the computation overhead of the sensor. The private key separation method refers to dividing the private key sk into two parts to calculate and generate, that is,
In the DAFCI scheme, PKG uses the identity information received from the sensor to generate the partial private key
In addition, the proposed scheme can be further applied with edge-cloud computing. A large amount of data are collected by the sensors set in the system and analyzed and processed by the edge end close to the user, while being scalable. Users get real-time insights and experiences with responsive and context-aware applications.
Description of the proposed scheme
In the DAFCI scheme, the original file F is divided into n blocks

The process of two-time signature.
Since the DAFCI scheme divides the private key into two parts, which are generated by PKG and sensor, respectively, the FCC only has the part calculated by PKG, so even if the FCC leaks part of the private key it owns, it is still difficult to forge the correct signature.
The following is a detailed description of the DAFCI program:
The PKG chooses two multiplicative cyclic groups The PKG randomly chooses an element The PKG publishes the system parameters
The sensor sends the identity information After the sensor receives
If the above equation does not hold, the sensor refuses to accept it; if the equation (1) holds, the sensor will calculate another partial private key
The sensor will first blind the file, and the sensitive information blind method here draws on the scheme of Shen et al.
28
The sensor randomly selects a seed In order to protect sensitive information, the sensor should blind data blocks corresponding to the sensitive information of the original file F before sending it to the FCC. The index of these data blocks is in set After generating the blind file The sensor computes
The FCC first checks whether the signature The FCC further verifies the correctness of the original signature
If the above equation holds, then FCC considers that the original signature The FCC is responsible for computing the final signature
The sensor or the TPA is authorized to challenge the CSP from time to time. The TPA checks whether the file tag (a) TPA randomly selects c elements from the data block index set to form set I. Set (b) For each element in the set I choose a random number (c) Send the auditing challenge (d) After receiving the auditing challenge from the TPA, the CSP generates a proof of data possession for this challenge as follows: computes the aggregated signature
The TPA will verify the correctness of the auditing proof as follows
If equation (3) holds, the data stored in the CSP are intact, otherwise, it is not.

The process of two-time signature.
Security analysis
In this section, we prove the DAFCI is secure in terms of correctness, soundness, and detectability.
Theorem 1 (the correctness)
Private key correctness: when PKG sends a correct partial private key to the sensor, this partial private key can pass the verification of the sensor.
Original signature correctness: when the FCC receives the original signature, it will verify it to ensure that the original signature is correct.
Auditing correctness: if the CSP correctly stores the data uploaded by the sensor, then it can pass the TPA verification.
Proof
If the partial private key given by PKG is correct, then it can be verified by the Extract algorithm equation (1). Based on the properties of the bilinear pairing equation, the following is a proof that starts from the left equation and finally introduces the right equation
If the original signature
If the original signature
Theorem 2 (the soundness)
Privacy of private key: in our scheme, the FCC is considered to be an incompletely trusted entity, and it may leak the partial private key. The solution needs to consider that in the case that some of the private keys held by the FCC are leaked, it can still be guaranteed that the private keys held only by the sensor cannot be known through other information calculations.
Anti-replace attack: during the TPA verification process, replace attacks would never be effective. In other words, if the CSP does not store data blocks or signature correctly, it is impossible for the CSP to succeed in replacing such a data block with another block to respond to the challenge to maintain this reputation.
Anti-reply attack: during the TPA verification process, reply attack would never be effective. In other words, a malicious CSP could not pass the verification using the signature generated by previous auditing.
Proof
The private key consists of two parts, namely,
The TPA selects some random blocks for auditing, and sends some challenge blocks
If equation (4) holds, the replacement attack is successful. The received proof is
In order for equation (4) to be true, there is
If equation (5) holds, there are
Due to the privacy of the private key, even if
3. The replay attack game is similar to the replacement attacks mentioned above. The sensor also authorizes TPA to auditing. After receiving the auditing request, the TPA randomly selects several data blocks in the indicated file and generates the challenge
Theorem 3 (the detectability)
Assume that the original file F is divided into n blocks and encrypted to generate a blind file
X is the intersection of the damaged block and the challenge block. Then, there are
From the above equation, we can know that
because
Theorem 4 (sensitive information hiding)
Sensitive information cannot be accessed by any entity except the data owner, including FCC, TPA, CSP, and shared sensors.
Proof
This part borrows from the encryption scheme of Shen et al., 29 but considering the performance of the sensor device, it is lightweight. Before the sensor has hashed the file block, the file has been blinded first, so under the random oracle model, only the sensor can access sensitive information.
Performance evaluation
In this section, the functional comparison of the DAFCI scheme and some other related schemes will be performed first, and then the computation overhead will be compared. Then, the communication overhead and computational complexity of the DAFCI scheme will be discussed. Finally, the specific performance of the DAFCI scheme is demonstrated through experiments.
Functionality comparison
As shown in Table 2, the functionality of the DAFCI scheme and other related schemes25,29,30,31,32 is compared. As can be seen from the table, the DAFCI solution is the only one that meets all the following properties: public verification, certificateless management, data sharing, sensitive information hiding, and suitable for lightweight device supporting.
Functionality comparison with existing related schemes.
Performance analysis and comparison
First define H for a hash operation, Mul for a multiplication operation, Add for an addition operation, P for a bilinear pairing operation, and
As shown in Table 3, compared with the related schemes, the computation overhead of the DAFCI scheme is lower. On the sensor side, that is, the overhead reduction is more obvious. Compared with the scheme that also introduces FCC, the computation overhead of the fog node is slightly higher, but it is not obvious. The generated overhead is consistent with scheme B of Tian et al., 25 but smaller than scheme A of Tian et al. And scheme of Shen et al.’s 29 TPA verification overhead is less than related schemes.
The computation overhead of our scheme and related schemes.
The communication overhead of the proposed scheme.
TPA: third-party auditor; CSP: cloud service provider.
The computation complexity of different entities in different phases.
FCC: fog computing center; TPA: third-party auditor; CSP: cloud service provider.
Performance evaluation
In this section, we evaluate the performance of the proposed scheme by several experiments. The experiment was implemented using the Ubuntu 16.04 operating system with an Intel Core i5 3.0 GHz processor and an 8 GB memory. The programmer is written in C program, and it uses the library functions in the pairing-based cryptography (PBC) library to simulate the cryptographic operations, where the benchmark threshold is 512 bits, the size of the element is
The experimental results are the averages of the 10 experiments.

Performance of difference of different processes.

The computation overhead in the process of signature generation.

The computation overhead in the process of signature generation.

The computation overhead in the process of signature generation.
Conclusion
This article proposed an efficient and secure public cloud data auditing scheme based on IoT scenarios. Through the encryption of sensitive information, the separation of private key method, and the two-time signature method, data sharing under privacy protection is realized, which reduce the computation and communication overhead of IoT devices, while ensured security. The security analysis shows that the DAFCI scheme is safe under the random oracle model. Performance analysis shows that compared with traditional cloud data auditing schemes and other schemes using fog-to-cloud computing, the DAFCI scheme is more efficient and has certain advantages, which can be better applied to low power IoT devices. However, considering the rapid development and widespread application of IoT technology, further reducing the overhead of computation and communication under the condition of ensuring the security of the solution will still be the focus of work in the future for a long time.
Footnotes
Handling Editor: Yan Huang
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, in part, by the National Natural Science Foundation of China (grant no. 61802106) and the Natural Science Foundation of Hebei Province (grant no. F2016201244).
