====== Blockchain Network Structures and Technologies ====== **Transactions** Blockchain technology uses two main types of cryptographic keys to provide the security of transactions and data: public keys and private keys. These keys work together to protect the integrity of the blockchain, enabling secure exchanges of digital records and protecting user identities. Consider the example of a mailbox. The public key is your email ID, which everyone knows about and can send you messages. The private key, on the other hand, is like the password to that mailbox. Only you own it, and you can read the messages inside. A public key is a cryptographic code that others share and use to interact with your blockchain account. It's generated from your private key using a specific mathematical process. Public keys are used to verify digital signatures and to encrypt data that only the private key can decrypt. This ensures that messages or transactions are intended for the correct recipient. A private key is a secret cryptographic code that grants access to your blockchain records. It must be kept confidential because anyone accessing the private key can control the records associated with the corresponding public key. This key is used to authorise transactions on the blockchain. When it is necessary to transfer information (make a transaction), you use your private key to create a digital signature that proves you are the owner of those transactions. Public and private keys work together to secure blockchain operations: * Encryption and Decryption: Only the corresponding private key can decrypt data when it is encrypted using a public key. This mechanism ensures that even if the data is intercepted, it cannot be read without the private key. * Digital Signatures: When a transaction is signed with a private key, the signature can be verified by others using the public key. This verification process confirms that the transaction is authentic and has not been tampered with. * Secure Transactions: Blockchain transactions rely on the interplay between public and private keys. The public key directs the transaction to the correct recipient, while the private key authorises the movement of transactions. **Categories of blockchain.** There are three categories of blockchain: __Public blockchains__, anyone can access the database, store a copy and make changes subject to consensus in the public blockchain. Bitcoin is a classic public blockchain. The key characteristic of public blockchains is that they are entirely decentralised. The network is open to any new participants. All participants, having equal rights, can be involved in validating the blocks and accessing the data contained in the blocks. Public blockchains process transactions more slowly because they are decentralised; as a result, each node should agree on each transaction. This requires time-consuming consensus methods like Proof of Work and prioritising security over speed. __Private blockchains__ (sometimes referred to as managed blockchains) are closed networks accessible only to authorised or select verified users. They are often owned by companies or organisations which use them to manage sensitive data and internal information. Private blockchain is very similar to existing databases regarding access restrictions but is implemented with blockchain technology. As a result, such networks are not aligned with the principle of decentralisation. Since it is accessible only by certain people, there is no requirement for mining blocks (validating). As a result, such networks are faster than other types because they do not have the necessary mining, consensus, etc. __Hybrid or consortium blockchains__ are permission-based blockchains, but in comparison to private blockchains, control is provided by a group of organisations rather than one coordinator. Such blockchains have more restrictions than public ones but are less restrictive than private ones. For this reason, they are also known as hybrid blockchains. New nodes are accepted based on a consensus with the consortium. Blocks are validated according to predefined rules defined by the consortium. Access rights can be public or limited to certain nodes. User rights might differ from user to user. Hybrid blockchains are partly decentralised. **Blockchain type selection** When choosing the right type of blockchain for a project, it's important to consider how it will be used, who will use it, and how it needs to perform. There are three main types of blockchains, each suited for different situations: //Private Blockchain:// When to Use: A private blockchain is the best option if the blockchain is to be used only within a single organisation by a specific group of people. Advantages: It gives the organisation more control over who can join and see the data. It's suitable for internal processes like keeping track of company records or managing internal operations. Performance: Since only a few trusted users are involved, the system can run faster and more efficiently because it doesn't need complex methods to agree on things. Examples: Hyperledger Fabric, Corda. //Consortium Blockchain:// When to Use: A consortium blockchain is the right choice if the blockchain will be shared by a group of companies or organisations working together. Advantages: It allows several organisations to work together while controlling who can access the blockchain. This is great for industries where businesses need to collaborate and share data securely. Performance: Since only trusted groups are involved, it works faster and more efficiently than a public blockchain. Examples: R3, Quorum. //Public Blockchain:// When to Use: A public blockchain is the best fit if the goal is to create a completely open and decentralised system that anyone can join, such as for cryptocurrencies. Advantages: It allows anyone to participate and offers complete transparency. This is perfect for digital currencies, where trust needs to be spread across everyone using them. Performance: Public blockchains can be slower and use more energy because they require complex processes to ensure everyone agrees. However, they are highly secure and trustworthy. Examples: Bitcoin, Ethereum. __To summarise__ – If, in your project, the blockchain is only for internal use, go with a private blockchain. Choose a consortium blockchain if it's for a group of related businesses. And if it needs to be open to everyone, a public blockchain is the way to go.