# A Survey of Blockchain Applications for Management in Agriculture and Livestock Internet of Things
## 4 Applications of Blockchain in Agricultural and Animal Husbandry IoT
### Ensuring System Security and Privacy
Blockchain technology's distributed ledger offers a decentralized, secure, and transparent approach to managing data within IoT systems. It secures all data gathered and transmitted by IoT devices, making it resistant to tampering. This security is achieved through data encryption and its storage on a distributed ledger, with each block of data interconnected with the preceding one. Additionally, blockchain provides robust mechanisms for authentication and access control, ensuring that only verified users and devices have the ability to access and control the system, facilitated by smart contracts. The decentralized framework of blockchain also enhances the reliability of IoT systems by reducing reliance on any single server or storage location, thereby diminishing the risk of single-point failures. This approach effectively overcomes the security management challenges faced by IoT, making it particularly beneficial for sectors like agricultural irrigation. In the field of unmanned aerial vehicles (UAVs) in the agricultural and pastoral IoT, paper [125] proposes an innovative framework named SP2F, which utilizes blockchain and deep learning technologies. This approach aims to overcome the vulnerabilities inherent in traditional centralized security systems, such as single-point failures and scalability issues. The SP2F framework enhances security and privacy through a dual-layer privacy engine that integrates blockchain with smart contracts and an enhanced Proof of Work (ePoW) mechanism, effectively mitigating the risk of data contamination. Additionally, it employs a Sparse Autoencoder (SAE) to transform sensitive data into a secure encoding format, offering protection against inference attacks. To enhance the framework's effectiveness, a Stacked Long Short-Term Memory (SLSTM)-based system is employed for training and evaluating the performance of the dual-layer privacy engine. This comprehensive solution not only addresses the existing limitations of conventional security measures but also introduces a new strategy for safeguarding IoT applications within the realm of agriculture. The field of IoT faces major attacks, including various threats during the data sensing and collection process. For instance, in jamming attacks, attackers interfere with the original signal's data by sending noise signals, which may lead to IoT devices obtaining incorrect sensing data. Side-channel attacks entail acquiring sensitive data from IoT devices via indirect means like power usage, electromagnetic emissions, timing, and heat properties. Malicious code injection involves embedding harmful code into physical devices, leading to irregular device behavior. Furthermore, malicious node injection attacks consist of incorporating bogus nodes into the network to interfere with the data exchange among legitimate nodes or to capture their data. These attack methods indicate that protecting IoT devices from compromise is an important and complex challenge. To address these issues, some papers [126; 127] recommend the adoption of blockchain as a method to improve IoT device security, highlighting its distributed ledger and peer-to-peer network features, offers a resource-intensive but effective method to strengthen security, although integrating it directly with IoT devices presents challenges. Therefore, specific architectures need to be designed to achieve this goal, balancing resource limitations. In these studies, the concept of blockchain-enhanced IoT security and its experimental results have been implemented and verified. In the IoT field, Distributed Denial of Service (DDoS) attacks are a significant and persistent threat. DDoS attacks are a common cyber-attack method where a multitude of manipulated devices simultaneously send requests to a designated target, overwhelming the target's service or network capacity and preventing it from providing normal services. Given the large number of devices and their lower security levels, these devices in the IoT environment become prime targets for attackers.