**2.3 Blockchain technology**

Blockchain is a distributed ledger (register) technology that achieves immutability, traceability, anonymity, security, transparency, and decentralization through the use of consensus algorithms and cryptographic methods. All nodes on the blockchain verify and record confirmed transactions with a timestamp. The distribution of the ledger among the blockchain network's members provides transparency. Security of the information kept in the record is ensured and cannot be obstructed. One of the most important aspects of blockchain is the smart contract. It is a short piece of code that is part of the blockchain and can be executed automatically if the conditions are met. Blockchain is known to be of three types: These include consortium, public, and private blockchains. A private blockchain is more trusted by participants because it is managed by a single organization and governs its activities, such as who can participate in the blockchain. Any entity can participate in a public blockchain, which does not require permission. Privacy, security, and performance are among its drawbacks due to its highly decentralized nature. A permissioned blockchain created by a group of different businesses is known as a consortium blockchain. Nodes are the entities in this kind of blockchain. Which organizations or entities participate in the blockchain is controlled by the consortium [4].

The Internet of Things (IoT) has been the primary beneficiary of blockchain technology's features, such as the decentralized characteristics that enable devices to connect and share sensitive data securely in an IoT environment. These applications include auctions, mutual authentication, and blockchain technology. Blockchain is able to provide authentication systems with a dependable computational platform and secure storage thanks to these characteristics. A consensus algorithm helps the devices in a blockchain network establish trust. This makes it possible for devices to keep cryptographic keys (both private and public keys) and a digital signature. This makes it easier for devices in the network to communicate and transact. These transactions are tamper-proof on the blockchain network because they cannot be changed [4].

*A Simulation Model of a Blockchain-Based Decentralized Patient Information Exchange… DOI: http://dx.doi.org/10.5772/intechopen.109591*

A blockchain is designed to resist data modification. It is "an open, distributed ledger that can efficiently and permanently record transactions between two parties." A blockchain is typically managed by a peer-to-peer network that collectively adheres to a protocol for inter-node communication and block validation in order to function as a distributed ledger. The data in any given block cannot be changed after it has been recorded without changing all subsequent blocks, which requires the majority of the network. Blockchains may be considered as secure by design and represent a distributed computing system with high Byzantine fault tolerance (any fault presenting different symptoms to different observers), despite the fact that their records can be changed. As a result, a blockchain has been advertised as providing decentralized consensus [6]. **Figure 2** represents the functional diagram of Blockchain.
