# A Survey on Cybersecurity in IoT
## 3 Data Integrity and Privacy
### Advanced Cryptographic Techniques for Data Integrity
#### 3.1.1 Homomorphic Encryption: Technical Depth and Mathematical Framework  
Emerging research has also explored the use of homomorphic encryption, which is a cryptographic technique that allows computations to be carried out directly on encrypted data, producing results that, when decrypted, correspond to those obtained by performing the same operations on the plaintext. This property ensures that data remain confidential during computation, a critical requirement in secure data processing [93; 94]. The mathematical foundation of homomorphic encryption can be described as follows. Let \(\mathcal{E}\) be the encryption function, \(\mathcal{D}\) the decryption function, and \(\oplus\) and \(\otimes\) the addition and multiplication operations, respectively. For a plaintext space \(\mathcal{P}\) and ciphertext space \(\mathcal{C}\), homomorphic encryption satisfies the following properties. For addition, the scheme ensures \(\mathcal{E}(m_{1})\oplus\mathcal{E}(m_{2})=\mathcal{E}(m_{1}+m_{2})\), where \(m_{1},m_{2}\in\mathcal{P}\). For multiplication, it guarantees \(\mathcal{E}(m_{1})\otimes\mathcal{E}(m_{2})=\mathcal{E}(m_{1}\cdot m_{2})\). The decryption of the resulting ciphertext yields the corresponding operation performed on the plaintext, such that \(\mathcal{D}(\mathcal{E}(m_{1})\oplus\mathcal{E}(m_{2}))=m_{1}+m_{2}\) and \(\mathcal{D}(\mathcal{E}(m_{1})\otimes\mathcal{E}(m_{2}))=m_{1}\cdot m_{2}\). Homomorphic encryption can be categorized into three main types based on the extent of operations it supports. Partially homomorphic encryption allows either addition or multiplication but not both. For example, RSA (Rivest-Shamir-Adleman) is a partially homomorphic encryption scheme supporting multiplication. In RSA, encryption is performed as \(\mathcal{E}(m)=m^{e}\mod N\), where \(e\) is the public exponent and \(N\) is the modulus. For two plaintexts \(m_{1}\) and \(m_{2}\), the multiplicative homomorphic property ensures \(\mathcal{E}(m_{1})\cdot\mathcal{E}(m_{2})\mod N=(m_{1}\cdot m_{2})^{e}\mod N\), preserving the multiplication under encryption [95]. Somewhat homomorphic encryption extends partially homomorphic encryption by supporting a limited number of additions and multiplications. This approach is exemplified by schemes such as Brakerski-Gentry-Vaikuntanathan, which use polynomial rings and modular arithmetic to enable operations while controlling computational complexity [96]. Fully homomorphic encryption represents the most powerful form of homomorphic encryption, allowing an arbitrary number of additions and multiplications on ciphertexts. A foundational fully homomorphic encryption scheme, such as [PERSON]'s construction, builds upon the learning-with-errors problem, a lattice-based cryptographic challenge believed to be resistant to quantum attacks. The key generation process involves selecting a secret key \(\mathbf{s}\in\mathbb{Z}_{q}^{n}\), a public key matrix \(\mathbf{A}\in\mathbb{Z}_{q}^{m\times n}\), and a noise vector \(\mathbf{e}\in\mathbb{Z}_{q}^{m}\). The ciphertext is formed as \(\mathbf{b}=\mathbf{A}\mathbf{s}+\mathbf{e}\mod q\). Encryption in fully homomorphic encryption involves encoding the plaintext \(m\in\{0,1\}\) by adding it to the ciphertext modulus \(q\) scaled by \(\lfloor q/2\rfloor\). Thus, the ciphertext is expressed as \(\mathcal{E}(m)=(\mathbf{A},\mathbf{b}+m\cdot\lfloor q/2\rfloor\mod q)\). Decryption is achieved by recovering \(m\) through modular arithmetic using the secret key \(\mathbf{s}\). Specifically, the plaintext is obtained as \(m=\lceil(\mathbf{b}-\mathbf{A}\mathbf{s})/\lfloor q/2\rfloor\rceil\mod 2\). The evaluation of operations on ciphertexts is performed using modular arithmetic. The addition and multiplication of encrypted values increase the noise inherent in ciphertexts. Fully homomorphic encryption schemes address this by periodically reducing noise through bootstrapping, which involves refreshing ciphertexts to enable continued operations.