**6. Blockchain technology for digital farming**

We mean by Blockchain a digital and distributed ledger that protects the history of any digital asset from any alteration or unauthorized modification, this protection results from the use of hashing, cryptographic techniques, public-private key

functions, distributed databases, and processing, as well as consensus algorithms. Blockchain is historically conceived in the creation of Bitcoin [68] by "*Satoshi Nakamoto*" in 2008 as a novel cryptocurrency purely digitalized. Although this technology is still in its early stage, it recently creates a technological revolution, thanks to its brought advantages, such as guaranteeing transparency, auditability, anonymity, decentralization [69], and independency, as well as reducing the risk of frauds in transactions between machines in a P2P (Peer to Peer) network. In the food and farming context, the combination between Blockchain and IoT is a promising contribution that immerged to improve the traditional methods of farming management. Blockchain technology can provide farmers with new solutions to smartly manage and monitor soil, engines, warehouses, livestock, logistics, and supply chain. It was expected in Ref. [70] that the utilization of this technology in the supply chain market will reach \$ 429.7 million by 2023. The need to build trust between the food producers and the consumers in the agri-food sector is a big concern that can call Blockchain technology to provide transparency, efficiency, and sustainability in the agri-food chain. Moreover, the more quantity and diversity of food is produced, the more compliances and audits are required, the information resulting from the audits is still managed with traditional paper or stored in a centralized database, this approach of management is susceptible to suffer from many issues such as error, lack of integrity, and data consistency, as well as fraud and corruption in the case of paper-based information [71].

The following sub-sections discuss the possible solutions on how Blockchain technology can be used in digital farming and smart agriculture. Each section discusses some of the most relevant platforms adopted in Blockchain use cases upon which IoTbased intelligent farming applications are based. After consulting this sub-section, the reader will discover an obvious complementarity between the use cases, it is up to the implementer of the Blockchain-based application to decide either to combine many use cases in one system or to focus on one use case in its contribution. **Figure 4** illustrates the possible seven use cases of Blockchain in IF.

#### **6.1 IoT security optimization**

It is difficult for the traditional vision of networks to provide the requirements of IoT-based IF systems notably latency, bandwidth, security, and reliability. A Blockchain-based security architecture proposed to monitor the integrity of IoT collected data by checking and preventing unhallowed alteration that can be caused by DDoS (Distributed Denial of Service) attacks on delivered data [72]. The Blockchainbased solutions for improvement of IoT security in green agriculture cover many areas [73] such as public key infrastructure support [74], machine learning-based systems [75], access control improvement [76, 77], reputation and trust use case [78, 79], amelioration of authentication and identification of IoT objects thanks to the bubble of trust system [80]. The bubble of trust is analogically a private VLAN (Virtual Local Area Network) of sensors, communication between sensors in the same bubble is fully private and secured because it must be validated by the Blockchain network, furthermore, no communication out of this bubble is authorized. **Figure 5** shows a proposed scenario on how can Blockchain be applied to secure transactions in an IoT system. When the positioning system collects the location of the smart tractor, a transaction is occurred and is inserted in a new block, the generated block is sent to the other miners for checking the solution used in the mining process. Once the

*Digital Agriculture and Intelligent Farming Business Using Information and Communication… DOI: http://dx.doi.org/10.5772/intechopen.102400*

**Figure 4.**

*The possible use cases of Blockchain in intelligent farming.*

#### **Figure 5.**

*A proposed scenario of a Blockchain-based IoT security optimization application.*

mining solution is validated, the block is addressed to the Blockchain nodes for validation, and stored in the Blockchain once it is verified. This process is fully decentralized and uses cryptography techniques and hashing.
