# Utilizing Blockchain for IoT Privacy through Enhanced ECIES with Secure Hash Function
## 3 Modified ECIES with Secure Hash Function  
The proposed scheme is intended to protect the integrity of transmitted messages while obtaining necessary consents for data transmission in IoT. Moreover, it provides resistance against different attacks and ensures reliable auditing of the user data access policy. To provide confidentiality and authentication of the transmitted data, both the request transaction and response data are authenticated once they are encrypted. We have chosen the proposed method in [PERSON] et al. [14] as the basis for our designed solution. The mutual authentication system shows the access request transaction and response data while obtaining necessary consents. It protects against any data leakage and data loss, ensures reliable behavior auditing and protects the user access policy, preventing any malicious attack and possibility of consents versioning. The request transaction data are encrypted using ECIES and authenticated using message authentication code. The access request transaction and response data are firmly secured and authenticated, providing enhanced security while managing user data access policy and consents [18]. The use of an SHF to generate private and public keys prevents an attacker from detecting the actual values of the keys from which it is derived, even in the case where the hash function is known. This feature enhances the privacy preservation in IoT, providing resistance to detect the actual value of the key is used to encrypt the message. A detailed flow diagram of the proposed scheme is shown in Figure 1. In the following, we detail the major stages involved in our proposed scheme. **System Setup--**The setup and enroll algorithm is invoked in this step to obtain keys for signing and verifying the transaction. After taking in the security parameters, \(\lambda^{n}\), to obtain the public parameters, \(\sigma^{n}\), we first generate a hash to ensure the security of the derived key, since the generated hash function is used to compute the private and public keys, denoted by \(\delta_{R}\) and \(\delta_{P}\), respectively. The unique hash generation, corresponding to message \(m\), is denoted as:  
\[h(m)=\psi(m)\quad|\quad\psi:\{0,1\}^{*}\rightarrow\{0,1\}^{256},\]  
where \(\psi\) is the unique hash generation function [30; 36], and we have used SHA-256. In some works, for example, [14], the private and public key is calculated from publicly exposed points on the elliptic curve that can be easily detected by the attacker, and user privacy can be compromised. The security strength of the key ensures the confidentiality and authenticity of the transmitted message for obtaining the user consents before processing the user data. The security strength of the key ensures the confidentiality and authenticity of the transmitted message for obtaining the user consents before processing user data in IoT. Figure 1: Flow Diagram of the Proposed Scheme—Modified ECIES with Secure Hash Function. Thus, if SHF is used to determine the value for the key rather than choosing publicly exposed points on the elliptic curve, the transmitted message will be highly protected. The secure hash value is used to generate the private key rather than randomly choosing a publicly exposed point on the elliptic curve as a private key and computing public key from the chosen private key. The private key \(\delta_{R}\) is generated based on the hash function using the key generator function \(\Gamma(\cdot)\), given as:  
\[\delta_{R}=\Gamma(h)\quad|\quad\Gamma:\{0,1\}^{*}\rightarrow\{0,1\}^{x},\]  
where \(\kappa\) is the designated key size [30; 36]. After the generation of private key \(\delta_{R}\) from the hash \(h(m)\), corresponding to message \(m\), the public key \(\delta_{P}\) is calculated based on:  
\[\delta_{P}=\delta_{R}*(E_{x},E_{y}),\]  
where \((E_{x},E_{y})\) corresponds to the \(x\) and \(y\) coordinates of the point \(P\) on the elliptic curve \(E\) of finite field and \(P\) has the order of large prime number \(q\)[30].