# Policy-Based Smart Contracts Management for IoT Privacy Preservation
## 2 Related Works
### Research Works
The authors deployed blockchain technology to share data files and keep their privacy by encrypting them using Elliptical Curve Cryptography (ECC). In [31], the blockchain technology was used to coordinate the exchange of IoT data and information between many organizations. To provide users with granular access to data depending on their roles and attributes, attribute-based encryption was considered. The authors employed a time-bound key management system to provide automated revocation of user attributes and keys, preventing users from decrypting data using expired keys. [PERSON] et al. [32] presented a user-centric design that allows the user to specify the access permissions they would want to have for their privacy-sensitive healthcare data. Patients have full control of their data, since they may stop it from spreading and set access control rules for it. The suggested blockchain has two chains: one for storing access policies and the other for storing data. Similarly, in [33], the authors proposed a three-layer approach to enable business owners to define trust criteria before deploying smart contracts. In [34], blockchain technology was deployed to manage access rights of IoT devices between users. The authors considered each access right as an asset called capability and managed the capability transfer and assignment to users through the blockchain. Capabilities are defined by the IoT device owner and have an expiration date to enable auto-revocation. They applied cryptographic techniques to hide users' sensitive information. [PERSON] et al. [35] focused on protecting users' content authenticity and confidentiality during data transmission in IoT systems. In order to prevent an attacker from determining the true key value, a Secure Hash Function (SHF) was used to generate both private and public keys. Then, a Key Derivation Function (KDF) enabled the generation of numerous keys. [PERSON] et al. [36] combined machine learning techniques to detect intrusions and blockchain to secure data transmission within smart cities. Their goal was to preserve privacy by detecting intrusions and attacks targeting the blockchain network that connects IoT devices and users. In [37], the authors use homomorphic encryption to store IoT data within a blockchain block. Then, they used SVM to outsource data from the blockchain without leaking users' privacy. [PERSON] et al. [38] proposed a fusion between access control techniques and blockchain to control access to patient data.Smart contracts were used to implement different access control policies. Smart contracts were also used to enforce access control policies in [39]. The paper proposes an architecture based on three components: an Edge Blockchain Manager, an Aggregated Edge Blockchain Manager, and a Cloud Consortium Blockchain Manager to ensure that only authenticated devices and authorized users access the network. In [40], the authors presented a blockchain-based framework to address privacy concerns in the Nigerian healthcare sector. Their proposed framework includes a policy formulation step to guide the implementation of a blockchain-based healthcare system. Table 1 summarizes the different approaches introduced above and depicts their main features. According to Table 1, existing efforts could be classified into three categories based on the technology used to preserve user privacy within the blockchain network. A first category is mainly based on cryptosystem techniques such as homomorphic, and elliptic curve encryption to encrypt the user's data or encrypt only sensitive information. The second relies on the use of blockchain smart contracts to define access controls to the user's information based on cryptographic techniques. The third consists of the enforcement of users' defined privacy policies to control access to their data; thus, sensitive data are encrypted. It is clearly shown in Table 1 that most of the proposed solutions consider adding a cryptographic layer to maintain privacy within a blockchain network.