# Policy-Based Smart Contracts Management for IoT Privacy Preservation
## 3 Proposed Method: Policy-Based Smart Contract Management for IoT Privacy Preservation  
We propose a policy-based smart contract management model to improve the privacy of IoT devices by embracing blockchain and smart contracts. The objective of designing this model is to ensure privacy by giving users more control over their data, allowing them to determine the sensitivity of their data, and preserving privacy while data are stored and processed between multiple entities. The proposed model was designed to use an existing blockchain platform without adding an extra cryptographic layer while enabling users to manage their privacy before triggering smart contracts. We aimed to deploy the Hyperledger Fabric network and benefit from the secure channel it provides to satisfy users' preferences. Figure 1 presents the proposed model and its main ingredients. The proposed model ensures data privacy and security during all data states. On the user side, we deployed security controls such as an Intrusion Prevention System, anti-virus, and firewalls to protect user data and systems. The IoT devices are owned by the user and communicate with the user app through a secure internet connection. Policies are \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Papers** & **Year** & **Type** & **Platform** & **Consensus** & **Contributions** & **Domain** \\ \hline
[1] & 2021 & Public & Ethereum & PoW & Annonymization based on person address not their PII. & Smart vehicles \\
[20] & 2021 & Private & Ethereum & PoW & Smart contract to detect privacy vulnerabilities & Multiple \\
[21] & 2020 & Public & Ethereum & PoW & Ring signature & Healthcare \\
[22] & 2017 & Public & Private code & PoS & Data encryption & Multiple \\
[23] & 2022 & Private & Hyperledger Fabric & No & Smart contracts and encryption & Surveillance cameras \\
[24] & 2022 & Private & Ethereum & No & OSCAR Encryption & Smart city \\
[25] & 2022 & Private & Hyperledger Fabric & No & Homomprophic encryption & Healthcare \\
[26] & 2021 & Private & Hyperledger Fabric and & No & Smart contracts & Healthcare \\  & & Ethereum & & & & \\
[27] & 2020 & Private & Python blockchain package provided by [PERSON] & No & Bridge between IoT devices and blockchain network & Financial transactions for IoT platforms \\
[28] & 2021 & Private & - & PoS & Paillier cryptosystem & Vehicular IoT \\
[29] & 2021 & Private & Ethereum & No & Authentication scheme and differential privacy & Smart home \\
[30] & 2020 & Public & Ethereum & PoW & Elliptical Curve Cryptography (ECC) & Healthcare \\
[31] & 2018 & Private & Private implementation & No & Attribute-based access and time-bound key management & Simulation \\
[32] & 2021 & Public & Private implementation & PoA & User-defined privacy policies & Healthcare \\
[34] & 2018 & Public & Monero source codes & PoW & Access right defined by IoT owners; cryptographic technique to hide users’ sensitive data & Smart home \\
[35] & 2022 & Indifferent & Any platform & - & Secure Hash Function Key Derivation & Multiple \\
[39] & 2022 & Private & Hyperledger Fabric & PoC & Smart contracts & Smart vehicles \\
[36] & 2022 & Indifferent & Any platform & PoS & Encryption, machine learning to detect intrusions & Smart cities \\
[37] & 2019 & Indifferent & Any platform & No & Homomorphic encryption & Multiple \\
[38] & 2022 & Private & Ethereum & PoW & Smart contracts; access control table & Healthcare \\ This & - & Private & Hyperledger Fabric & PoC & A policy-based system that allows users to trigger the appropriate smart contracts according to their privacy preferences & Healthcare \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Features of existing efforts. used to give the user more control over their data and enable them to determine and configure privacy settings before transmitting smart contracts. During data transmission, the model enables secure communication between the user and the SP through the use of TLS/SSL protocol since the communication is enabled via an internet connection.