# Policy-Based Smart Contracts Management for IoT Privacy Preservation
### Key Contributions  
In this paper, we treat the case of a set of IoT devices owned by the user and the data collected from them are processed by an external service provider (SP). We do not want the SP to gather private data that are not required to accomplish the service. This case is very common, especially with the migration to smart homes and smart healthcare. We adopt a policy-based approach to manage user privacy preferences and the Hyperledger Fabric private network to maintain privacy within the IoT ecosystem. Policies enable dynamism (i.e., in our case, policies are applied for a single user which enables their easy management (configure, addition, remove, and update) according to the user preferences), diversity (i.e., policies may represent various types of contracts depending on the user preferences), and enhances user productivity (i.e., policies may automatically trigger different smart contracts without the need for the user to trigger them). The key contributions of our proposed solution are as follows:  
* A new model that enables the interaction between IoT devices, users, and organizations through blockchain networks using existing blockchain platforms to facilitate its deployment and minimize the implementation cost. Blockchains leverage high transparency, immutability, accountability, and data security required to preserve privacy. Our contribution lies in the design of a network that connects healthcare services, IoT devices, and users, leveraging existing blockchain platforms.
* Policy-based smart contracts enable users to define their privacy preferences and purposes. The model defines multiple smart contracts according to their purpose and triggers them according to the predefined policies. The aim of defining multiple smart contracts is to enable more privacy by creating a private channel to communicate between the user and the blockchain network. Instead of introducing new cryptographic methods, we leverage the existing cryptosystem provided by blockchain platforms and focus on defining user smart contracts to prevent privacy leaks.
* Reuse of existing blockchain platforms without adding an extra cryptographic layer to facilitate their integration at low cost without increasing the processing capacity and time. Reusing existing blockchain platforms without modifications can enhance scalability and integration with other organizational infrastructure, minimizing the risk of disrupting operations. Our approach is more adaptable for organizations, as it avoids modifying the blockchain platforms. Additionally, reusing reputable and well-tested code or platforms is recommended from a security standpoint due to their extensive testing and use by multiple users. We simply defined new policies for managing smart contracts, which could be easily deployed within the blockchain network without significant overhead, as we reused the blockchain platform without modifying it.  
The remainder of this paper is structured as follows. Section 2 reviews and discusses the significant recent efforts for IoT privacy preservation using blockchain approaches. In Section 3, we outline the proposed policy-based smart contract management system using blockchain to protect user privacy. In Section 4, we discuss the implementation of the proposed architecture using Hyperledger Fabric, and study its performance. Finally, Section 5 concludes the paper.