# Lightweight Integrity Preserving Scheme for Secure Data Exchange in Cloud-Based IoT Systems
## 4 Proposed Scheme
### Proposed Scheme Details
#### 4.2.4 Support for Continuous Integrity Checking  
The prior section only explored one repetition of an audit. Once an audit has occurred, the IoT-cloud system possesses two keys (\(Ck\) and \(Ak\)) and, most importantly, \(Ak\). The IoT-cloud system then removes a file to retain \(Ak\). Then, when the semi-trust server submits a different appeal for an audit, the IoT-cloud system sends \(Ak\) and does complete new calculations. A key chain method is incorporated into the suggested system to address this issue. Our scheme generates fewer parameters, unlike traditional schemes. Within the key chain, the keys \(Ck\) and \(Vk\) are transfigured through the below equation.  
The semi-trust server, for a single file, broadens both keys \(Ck\) and \(Vk\) to transform them into n keys (\(0\leq j\leq n\)) through the following equations:  
\[\text{If }j=0,\,Ck_{0}=H(W\,k\,|\,\,|\,c)\]\[V\,k_{i0}=H(W\,k\,|\,|\,|\,|\,|\,|\,F\,\,ILEID)\]  
If \(j>0\), \(Ck_{j}=H(W\,k\,|\,|\,|\,|\,|Ck_{j-1})\)  
\[V\,k_{ij}=H(W\,k\,|\,|\,|\,|\,F\,\,ILEID\,|\,|\,|Vk_{i(j-1)})\qquad 0\leq j\leq n\]  
The semi-trust server repeatedly executes the upload phase by employing the below key chain method. \(Ch_{j}\) is identified from \(F\) and \(Ck_{j}\) through the following equation:  
\[Chj=H(F\,|\,|\,Ckj) \tag{10}\]  
The metadata files are then calculated through the \(XOR\) function:  
\[\sigma_{j}=Ch_{j}\,XOR\,V\,k_{ij} \tag{11}\]  
By this stage, the semi-trust server has obtained the \(n\) metadata \(\varphi=\{\sigma\}\), \(0\leq j\leq n\) for one file at one-time and transmits \(\varphi\) and \(F\) to the IoT-cloud system.  
Throughout the integrity checking process, the semi-trust server unsystematically selects a single \(Ck_{j}\) and transmits this value to the IoT-cloud system, which the IoT-cloud system uses to calculate \(Cf_{j}\) through the below equation:  
\[Cf_{j}=H(F\,|\,|\,Ck_{j}) \tag{12}\]  
The IoT-cloud system then creates the audit key \(Ak_{j}\) with the below equation:  
\[Ak_{j}=\sigma_{j}\,XOR\,Cf_{j} \tag{13}\]  
The IoT-cloud system then transmits the audit key \(Ak_{j}\) to the semi-trust server, and the semi-trust server keeps this key and contrasts it to \(Vk_{ij}\) to guarantee that the file has been stored accurately. Theorem 3.2.2.2.2.2.3.2.3.  
validity. In order to correct this error, this paper's proposed system incorporates F into _GenProof_.
* Within [PERSON] and [PERSON] proposed security scheme, the challenge is incorporated into the _GenProof_ and _VerifyProof_, which allows the IoT-cloud system to erase \(F\) and uses \(\sigma\) to maintain _proof_ (\(P\)) once the audit has been effectively completed. Therefore, when the semi-trust server requests conducting another audit on the file, the IoT-cloud system only provides the semi-trust server with \(P\). In order to correct this error, in our proposed scheme, \(Ck\) is changed every time; consequently, \(P\) is also changed every time. The scheme of [PERSON] and [PERSON] [11] was not designed for IoT, especially for smart devices with a minimal size; meanwhile, the proposed system was customized to be compatible with the IoT-cloud system and smart devices. The experimental results' proficiency evaluation section proves the compatibility of our work for smart devices in terms of consuming time and communication cost.