![見出し画像](https://assets.st-note.com/production/uploads/images/94777684/rectangle_large_type_2_57c9e5f90cbdb0b733f1a313ad14d6de.jpeg?width=1200)
Key Technologies in Blockchain
Blockchain is a peer-to-peer distributed ledger that tracks various transactions. To reap the full benefits of cutting-edge tech like blockchain technology, it is essential to understand how they work and be aware of the pros and cons. In this post, we will delve into the major components of the blockchain network, such as:
Digital Signatures
Hash
Hash Pointer
Merkle Tree
Hash Cash
TCP/IP and Peer to Peer Network
Digital Signatures
Payment via a bank cheque requires authorization from the account holder in the form of a signature. After this, the cheque is handed to the payee and cleared at the bank. The digital signature is a similar concept but in a digital form. Formally, a digital signature is a mathematical scheme for verifying the validity of a digital message or document, just as a physical signature is used to verify a cheque.
There are two types of digital signatures: Symmetric and Asymmetric Digital Signatures. Each type works differently, providing different levels of security for digital documents.
Symmetric Digital Signatures
A symmetric digital signature is a security measure used to encrypt messages. It utilizes a single key to protect the data, which the sender uses to encrypt the content, and the receiver must use the same key to decrypt it. This type of signature has not been widely adopted due to the need to securely transmit the key along with the message, creating a vulnerability as unauthorized users may decrypt it during its transmission over a network. To avoid this, alternative methods of sending the key are needed.
Asymmetric Digital Signatures
Asymmetric digital signatures are generally accepted more than symmetric digital signatures. Unlike symmetric digital signatures, where a single key is used, two keys - a public key and a private key - are used for asymmetric digital signatures. The message encrypted with the public key can only be unlocked by the corresponding private key and vice versa. The public key of each user is distributed across the network and the private key is only known to the user. To use digital signatures, individuals or participants who wish to join the blockchain network are assigned a digital identity.
Hash Function in Blockchain
The hash function is a form of mathematical procedure that is able to take any length of input data and convert it into a fixed output length. The feature set of this function is quite remarkable, as listed below:
The hash value created is unique for each data set.
Using blockchain, the input data (e.g., text) is converted into a string of bytes, and no matter the original length or composition, the hash function will convert it into a string of a fixed length and composition. This resulting output is known as a “hash value” or “checksum.” There are a variety of hashing algorithms, and each one produces a hash of a predetermined length. Furthermore, this is a one-way process; the transformation can only be done one way, and there is no way to reverse it.
The smallest variation in data will create an entirely different hash.
No matter the size or type of data, each hashing algorithm will always produce the same length of hash.
It is impossible to recover the original data from the hashed version.
There are a variety of hash functions used in blockchain networks, such as Secure Hashing Algorithm (SHA-2 and SHA-3), RACE Integrity Primitives Evaluation Message Digest (RIPEMD), Message Digest Algorithm 5 (MD5), and BLAKE2.
In short, hashing is used in blockchain networks primarily for the privacy and security of data.
Hash Pointer
Hash Pointers are data structures that provide a means of ensuring security and data immutability in blockchain. They are composed of two parts- an address of the data and a hash of the data. This hash is then checked against the hash of the stored data to verify that it has not been tampered with.
In the Blockchain, Hash Pointers are used to connect data blocks, guaranteeing that the data is immutable and secure. Thus, Hash Pointers provide an essential security feature for the Blockchain, ensuring that data remains unchanged and secure.
Merkle Tree
The Merkle Tree is the technology that is used in the Blockchain to store the data in a safe way. Rather than just attaching the data points by a simple concatenation method and creating a hash, it was later proposed to create a Merkle Tree.
The Merkle Tree has an advantage in the recovery process in comparison to the traditional method. To verify the data or transaction in the Merkle Tree, we don't need to access all of the data points.
To obtain the Merkle root of the "n" number of elements, we need to follow these steps:
· Calculate the individual hashes of each element.
· Form strings with this set of hashes by linking every two subsequent hashes. For instance, if there is no next hash for the last hash, then the hash of the last data point should be linked to itself.
· Calculate the individual hashes of the created strings.
· If the number of hashes obtained is more than one, we need to go back to step 2 and repeat steps 2 and 3 until one single hash is obtained.
It is important to keep in mind that even a tiny change in any data point will alter its hash; thus, the root hash will also be altered. The root hash is the fingerprint that represents all the data points.
Hash Cash
Hash cash is a technique that uses incentives and penalties to promote desired behavior and discourage undesirable behavior. This innovation was originally used to identify spam emails in the early days. To utilize hash cash, the sender must calculate the hash cash and attach it to the email along with the recipient's address, cc, body, etc. Doing this serves as proof of work for the sender before sending their email.
This technique limits the number of spam emails sent since performing the necessary calculations for hash cash takes a significant amount of time and computer resources. This same concept is being used in blockchain technology as a consensus mechanism for mining the blocks.
この記事が気に入ったらサポートをしてみませんか?