What is Hashcash and how is it connected to Bitcoin?
Hashcash is an important part of what is today known as Bitcoin mining. But what does that term mean?
What is Hashcash?
Hashcash refers to a proof-of-work system that was created by Adam Back in 1997. His creation was initially meant to limit email spamming and DDoS attacks.
In more recent times, however, the system became popular for its involvement with Bitcoin and other cryptocurrencies, as an essential piece of the mining algorithm.
The connection between Bitcoin and Hashcash
Satoshi Nakamoto referred to the term in the Bitcoin whitepaper. He mentioned that Back’s algorithm acted as an inspiration to create the mining function which is found in the distributed ledger of Bitcoin.
According to his words in the Bitcoin whitepaper: “To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-of-work system similar to Adam Back’s Hashcash, rather than newspaper or Usenet posts.
The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash.”
Hash cash in Bitcoin mining
The Bitcoin network, as mentioned above, utilizes a proof-of-work system to enable the ability to mine Bitcoin. But let’s explain this in a little more detail.
The mining hardware runs a particular software that groups unconfirmed transactions from investors and solves them to receive a reward.
For that to happen – for a miner to “create” a transaction block – he will have to discover a nonce with a sufficient number of zero bits to meet the target of the network’s difficulty.
The blocks that are accepted are “stacked” upon one another and form what we know as the blockchain.
So what about SHA 256? Well, this one is specific to Bitcoin. While hashcash typically uses SHA-1 hash (primary 20 of 160 hash bits need to be zero), Bitcoin’s proof of work is different.
It utilizes two continuous SHA-256 hashes, which limits the average rate of 6 new transaction blocks per hour.
This limitation, coupled with the increased popularity of Bitcoin mining, increases the mining difficulty.
A word on decentralization
We know that SCRYPT and SHA256 are used for Bitcoin mining. But which model is less vulnerable to the centralization of mining power? In other words, which of the two has a more “democratic” approach to mining?
The answer is not very clear is one-sided. This is mainly because there are counter-arguments.
- On the one hand, SHA256 hashcash is very easy to implement. Any person with a modest amount of savings could design his own ASIC miner by contacting a chip-fabricator. This makes SHA256 mining more available for a diverse range of people.
- On the other hand, it is harder to create a SCRYPT-based ASIC miner. This means that, in the short-term, centralization of hashing power could be an issue, especially if a private organization decides to develop and utilize a large amount of them.
- It’s also important to remember that SCRYPT hashcash offers a lower hash rate with an ASIC miner compared with a GPU that runs SHA256. This is because each SCRYPT requires 128 kb or RAM space, which reduces the number of SCRYPT cores that can fit on a single chip.
- The counter-argument here is that SCRYPT has the ability to reduce memory space requirement due to time-memory tradeoffs. It is, therefore, possible to implement SCRYPT with minimum memory requirements.
- SCRYPT hashcash also has a drawback compared to SHA256 hashcash. It verifies transactions slower than the latest, as the computation cost of one SCRYPT iteration is higher than two SHA256 hashes. This, as a result, makes SCRYPT blockchains more intensive when it comes to their CPU and memory.
If you are not very technically-oriented, the answer as to which model is less centralized tends to go more in favor of SHA256.