# A Survey on Cybersecurity in IoT
## 3 Data Integrity and Privacy
### Data Integrity in Distributed Architectures  
IoT systems often rely on distributed architectures, such as edge computing, where data processing occurs at the edge of the network, closer to the data source. In such architectures, ensuring data integrity requires secure communication channels, resilient storage mechanisms, and robust synchronization protocols between edge devices and the central cloud [103; 104]. Techniques such as secure multiparty computation (SMPC) and threshold cryptography have been explored to enable secure data aggregation and processing across distributed nodes, ensuring that even if some nodes are compromised, the overall integrity of the data is maintained [105; 106; 107; 108]. Blockchain technology has also been proposed as a means to enhance data integrity in distributed IoT systems. By creating an immutable and distributed ledger of transactions, blockchain can ensure that data records are tamper-proof and verifiable by all participants in the network. However, the integration of blockchain into IoT presents significant challenges, particularly in terms of scalability and energy efficiency. The high computational cost and latency associated with consensus mechanisms like proof of work make blockchain less suited for real-time IoT applications, driving the need for alternative consensus algorithms, such as proof-of-stake or directed acyclic graphs (DAGs), which are more resource-efficient [109; 110; 111; 112; 113; 114]. Secure Multiparty Computation and Threshold Cryptography  
SMPC and threshold cryptography are advanced cryptographic techniques designed to enhance the security and privacy of distributed systems. These methods are particularly relevant in scenarios involving sensitive data processing across multiple entities, such as in IoT environments, where devices often interact within decentralized and untrusted networks. SMPC enables a group of parties to jointly compute a function over their inputs while keeping those inputs private. This ensures that no individual party learns the inputs of the others beyond what is revealed by the function's output. Formally, consider \(n\) parties, each with a private input \(x_{i}\), and a function \(f(x_{1},x_{2},\ldots,x_{n})\) to be computed collaboratively. SMPC ensures that the parties compute the function correctly while preserving the privacy of \(x_{i}\) for all \(i\). The mathematical framework of SMPC typically relies on secret sharing schemes [115]. In [PERSON]'s secret sharing, for instance, a secret \(s\) is divided into \(n\) shares \((s_{1},s_{2},\ldots,s_{n})\) such that any subset of \(t\) or more shares can reconstruct the secret, while fewer than \(t\) shares reveal no information about \(s\)[116]. This is achieved using polynomial interpolation. The secret \(s\) is represented as the constant term of a randomly chosen polynomial \(P(x)\) of degree \(t-1\) over a finite field \(\mathbb{F}_{q}\):  
\[P(x)=s+a_{1}x+a_{2}x^{2}+\cdots+a_{t-1}x^{t-1},\]  
where \(a_{1},a_{2},\ldots,a_{t-1}\) are random coefficients. Each party is given a share \(s_{i}=P(x_{i})\), where \(x_{i}\) is a unique identifier for that party. The privacy and correctness of SMPC are ensured through protocols such as the GMW (Goldreich-Micali-Wigderson) and BGW (Ben-Or-Goldwasser-Wigderson) protocols. These protocols allow secure computation of any function represented as a Boolean or arithmetic circuit by ensuring that intermediate values during computation remain secret [117]. Threshold cryptography extends the principles of secret sharing to cryptographic operations, enabling secure key management and distributed trust [118]. In a \((t,n)\)-threshold scheme, a private cryptographic key \(k\) is divided into \(n\) shares, such that any \(t\) or more shares can reconstruct \(k\), but fewer than \(t\) shares reveal no information about the key. Threshold cryptography is particularly useful in distributed systems for tasks such as digital signing, decryption, and key generation.