Hash functions in the Blockchain world
Because they are fast, efficient, computationally economical, and unique, hash functions are widely used in blockchain technology. When Satoshi Nakamoto published his whitepaper de Bitcoin, explained why and how to use SHA-256 and RIPEMD-160 in Bitcoin. Since then, blockchain technology has evolved a lot, but the bases remain the same. Use cryptography Strong and hashes to make the technology very secure, private and even anonymous.
Of all the uses of hash functions in blockchain, the following cases can be highlighted:
Address creation (Address Wallet)
Cryptocurrency wallet addresses are a secure representation of the wallet's public keys. The public keysThey are generally very long and complex. It is for this reason; that blockchains use hashing functions to derive a shorter address. This process is used repeatedly to shorten the address and add an extra layer of security.
In Bitcoin, the process of creating a wallet address uses hash functions RIPEMD-160 y SHA-256. Both are used to improve process security and make them unique and unrepeatable.
The marketing process includesseveral phases that are reflected below: mining is., is another important stage of blockchain technology where hash functions are used. In Bitcoin, mining makes intensive use of hash calculation SHA-256 distributed in each of its nodes. Miners are responsible for calculating millions of hashes to create new Bitcoin blocks. The process is also used to verify the transactions that are made in the network.
Although the process of calculating hashes is very fast, its intensive use makes the process drastically difficult. This leads miners to use high computing power to solve Bitcoin puzzles. By solving them, the miners are rewarded with 6,25 BTC per block. This is a value close to $ 96.875 (November 2020). This economic incentive is what maintains the operation and security of the entire Bitcoin network.
This is another area where hash functions are heavily used. Blockchains like Bitcoin, Ethereum, NEO o TRON make use of smart contracts to promote different applications. These applications are managed by a public contract between parties. Nevertheless, much of this data is very sensitive, or it is simply too much information to be stored on a blockchain. So the best way to solve these scenarios is through hash functions. In this way, the entire contract is public but information linked or that you want to keep private is not published. This data may include names, addresses, wallet addresses, data of third party participants. That is to say; privileged information and only of interest between parties.
The hashes too They are used to version contracts. That is, A public contract has a unique hash that is given by what the contract says. If the contract is modified, the old contract is terminated and a new one is generated with a new hash. In this way, the hash determines the correct contract to use within a decentralized application, facilitating its control. Another use of hashes in smart contracts is; to mark the validity and authenticity of it. An example may be; a contract made for the sale of a house with a payment made in cryptocurrencies. The completion of the contract and its hash will be unalterable witnesses of the sale made between the parties.