Each cryptocurrency uses its specific encryption algorithm. It is it that the mining equipment decrypts, ensuring the functioning of the blockchain, processing transactions, and receiving rewards in the form of coins of a particular cryptocurrency. Without further ado, let’s dive into the world of crypto hash functions.
What Does Hashing Algorithm Means
Cryptocurrency algorithms are a set of specific cryptographic mechanisms and rules that encrypt a digital currency. Miners using special equipment decrypt the algorithm of a particular cryptocurrency. This process consists of finding a hash.
As soon as the correct hash is found, a new block is generated in the blockchain, which stores information about transactions, the hash of the previous block, the amount received by the miner, etc.
The process of decryption (or coin mining) turns a set of random data into ordered systematic information, subsequently recorded in the blockchain. Today, there are several dozen cryptocurrency algorithms.
Some algorithms are more popular and are used for several different cryptocurrencies (blockchains). For instance, the most common algorithms are SHA-256, Scrypt, Ethash, X11, Lyra2Z, Equihash, and RandomX. We’ll explain each of these below.
SHA-256 is a secure encryption algorithm that has gained popularity due to the Bitcoin code. The abbreviation SHA is the Secure Hash Algorithm, and 256 means that the cryptocurrency algorithm generates a 256-bit hash, i.e., a string of 256 bits. The hash rate for SHA-256-based cryptocurrencies is calculated in units of Gigahash per second (GH/s). It takes six to ten minutes to create a block.
The US National Security Agency invented the SHA-256 algorithm in 2001. It is part of the SHA family of algorithms. Now, it is the only cryptocurrency algorithm from this family that has passed the test for resistance to such types of attacks as collision detection and inverse image detection, which has a decisive solution for the security of cryptocurrencies based on this algorithm.
In addition to cryptocurrencies, SHA-256 is also widely used in some other technologies. For example, the operation of security protocols such as TLS, SSL, PGP, SSH, built on SHA-256.
In 2009, when Bitcoin was known only to a few people, ordinary computers were used for mining, which performed calculations using a central processor. Later they began to use more powerful graphics processors. However, now the popularity of Bitcoin is enormous. The use of ASIC miners, special devices with high computing power, has become economically profitable.
Bitcoin is used on the SHA-256 algorithm, as well as some other cryptocurrencies, mainly forks of Bitcoin.
Cryptocurrencies of the SHA-256 algorithm:
Scrypt is a cryptocurrency mining algorithm. The speed of creating blocks in a Scrypt-based blockchain is about 30 seconds. The hashrate is measured in Megahash per second (MH/s). Scrypt became popular because of Litecoin cryptocurrency.
When the Scrypt algorithm emerged, it soon became clear that bitcoin mining is very easy to monopolize, because the simplicity of the SHA-256 function allows you to automate the mining process. Therefore, the main aim of creating Scrypt was to complicate the mechanism for generating blocks due to increased requirements for resources used for computing operations.
In particular, the amount of RAM is crucial, while the requirements for power consumption and processing power are much lower than in the case of SHA-256. Initially, central and graphic processors were used to extract cryptocurrencies based on Scrypt. However, the algorithm could not resist mining corporations and in 2014 the first ASIC for Scrypt coins was created.
The mining algorithm Scrypt is the basis for the following cryptocurrencies:
Equihash is an anonymous cryptocurrency algorithm released in 2016. The first cryptocurrency that used Equihash as its base was Zcash. The creating of blocks takes 150 seconds, and hash is measured in Megahash per second (MH/s).
The basis of this algorithm is a hash function, which is built on the principle of the birthday problem. It is a mathematical regularity that is used to calculate probability. The rule says:
If there are 23 people in a room, then the probability that at least two of them have a birthday on the same day is 50%. Based on this pattern, the probability of finding the nonce number in the mining process is 2, ascended to the power of N, and divided by 2.
This cryptocurrency algorithm was developed by Alex Biryukov and Dmitry Khovratovich, scientists at the University of Luxembourg, who are part of the CryptoLUX research group. In 2016, the development was presented to a full circle.
Equihash needs the amount of RAM and not the speed of processing mathematical calculations. This makes mining ASIC-resistant and the network more decentralized.
For mining cryptocurrencies running on Equihash, video cards with a minimum memory capacity of 2 GB are used. The most suitable GPU is NVidia.
However, ASIC devices have also been developed for mining Equihash. Today, the most popular are the Antminer Z9 Mini from Bitmain and the A9 ZMaster from Innosilicon.
The most popular cryptocurrencies running on the Equihash algorithm:
Ethash (Dagger Hashimoto) is a cryptocurrency algorithm explicitly developed for Ethereum mining. This hashing algorithm is based on two different algorithms: Dagger, created by Vitalik Buterin, and Hashimoto (the name consists of the words hash, shift, and modulo), developed by the programmer Thaddeus Dryja. The Ethash algorithm hashrate is measured in Megahash per second (MH/s).
Dagger is a cryptocurrency algorithm that needs a video card memory. The principle of its operation is similar to Scrypt, but its performance is higher. This is especially noticeable in conditions of increasing network complexity. However, Dagger has some vulnerabilities, so it is only effective when paired with Hashimoto.
The Hashimoto algorithm works with I/O operations in a special mode. In particular, it limits the speed of production, because the amount of memory for writing and reading information is not infinite. Hashimoto is a cryptocurrency algorithm that requires a large amount of memory, due to which it is not possible to perform a large number of input/output operations, i.e. for decryption, it will not work to use the method of an infinite selection of random values. This was the main reason why ASIC devices were not suitable for Ethereum mining.
GPU processors are suitable for Ethahs coins mining. The most effective video cards are AMD. However, the use of Nvidia 10-series video cards brings good profit to miners. The main requirement is a high indicator of RAM, which is constantly increasing due to the increasing complexity of the network.
As we said above, ASIC devices were not suitable for the extraction of coins based on Ethash. However, everything changed in the summer of 2018, when the largest Chinese miner manufacturer Bitmain launched the Innosilicon A10 ETHMaster model, i.e., ASIC for Ethereum.
Ethash was created for Ethereum. However, other coins also began to use this algorithm. The following cryptocurrencies use the Ethash:
X11 encryption algorithm was developed by Evan Duffield, the creator of one of the top cryptocurrencies Dash. It all started with the fact that he wanted to improve the anonymity and interchangeability of Bitcoin, but the community did not approve of his idea. Then Evan had no choice but to create his own cryptocurrency.
According to Duffield, the development took only one weekend. The advantage of X11 is that mining cryptocurrencies created on its basis is very economical in terms of energy consumption. Energy efficiency is just a nice bonus since Evan did not set out to create an algorithm that would not require large energy costs.
The experiments showed that mining Dash on video cards consumes 30-50% less electricity than mining Bitcoin on ASIC devices. To mine coins that work based on the X11 algorithm, you can use not only the GPU but also the CPU. This is one of the few algorithms today that allows mining of processors, making it attractive for single miners and small companies.
ASICs for mining cryptocurrencies based on the X11 algorithm also exist. As the creator of X11 himself admitted, he did not try to create an ASIC-resistant algorithm, but he did everything possible so that the manufacturers had to work hard.
At the moment, X11 is not the only one of its kind that uses more than one hash function. Following his example, other algorithms were created that are also built on the integration of several hash functions: X12, X13, X14, X14, X15, X16, and even X17. However, X11 is still the most popular.
The following coins are created on the X11 cryptocurrency algorithm:
- Dash (DASH)
- Pura (PURA)
- Tao (XTO)
- Synergy (SNRG)
- Enigma (ENG)
- CannabisCoin (CANN).
RandomX is a Proof-of-Work algorithm optimized for general purpose graphics cards (GPUs) and general-purpose processors (CPUs). The main feature of the innovation is the execution of different code parts in random order and loading the device memory.
RandomX uses a virtual machine that runs programs in a special instruction set. These programs can be converted to processor code on the fly. As a result, the executed programs’ output is combined into a 256-bit result using the Blake2b cryptographic hash function.
Random X supports mining with both CPU and GPU (AMD and Nvidia). Most CPU models from Intel and AMD from 2011 should be quite efficient on RandomX, as well as video cards with at least 2 GB of memory.
Regular FPGAs cannot work on RandomX because they do not have time to dynamically reconfigure their circuits. More efficient models can mine on this algorithm by emulating the processor. However, FPGAs will be much less efficient than the same CPUs.
Cryptocurrencies that uses RandomX:
Lyra2Z and Lyra2REv2 are algorithms that use Blake256 and Lyra2 functions successively changing each other. They are optimized for reduced power consumption when mining on video cards.
Lyra2Z/Lyra2REv2 algorithms are very popular for mining cryptocurrencies on Nvidia video cards, including:
To sum up all the statements above, all cryptocurrencies use different hashing algorithms responsible for the operation of the blockchain. With their help, decryption succeeds, and thanks to them, the reliability of the data is guaranteed.
The cryptocurrency industry is still at the very beginning of its development. Every day new types of consensus-building on the blockchain appear. Cryptocurrency algorithms change and improve. Such events are fascinating to observe on the market.
Changelly is a secure instant crypto exchange that has 150+ cryptocurrencies available to be swapped and bought at market-best rates. Operating since 2015, the platform and its mobile application attract over a million visitors monthly, who all enjoy quick and simple exchanges, low transparent fees, and 24/7 live support.