To start BTCManager’s ‘History of Bitcoin’ series, we will look at the proof-of-work algorithm Hashcash. This algorithm was used as the basis upon which a number of cryptocurrencies, most notably bitcoin, create their mining protocols.
The Origin of Hashcash
In 1992, researchers Cynthia Dwork and Moni Naor presented their paper titled: “Pricing via Processing or Combatting Junk Mail” at the Annual International Cryptology Conference in Santa Barbara, California.
The paper detailed a system through which spam mail could be reduced through the introduction of a protocol known as a pricing function. Through the use of the function, users would be required to engage their processing power to compute a function after which they would be able to access the system, in this case, the email service. “The main idea is to require a user to compute a moderately hard, but not intractable, function in order to gain access to the resource, thus preventing frivolous use.”
Five years later British cryptographer Adam Back proposed a function similar to the one submitted by Dwork and Naor. He called his iteration Hashcash. Hashcash was originally meant to be a mechanism through which it would be possible to control and reduce the systematic abuse of shared, and available to all, internet resources such as email as well as anonymous remailers.
Back published a paper detailing his protocol in 2002, named: ‘Hashcash – A Denial of Service Counter-Measure.’ Through his paper, Back explained how Hashcash used a cost function as an anti-DOS mechanism as it required malicious parties to use the processing power of their devices as a proof-of-work.
For regular email users, this would not present a challenge. However, for malicious users, it would be a great deterrent. Back stated: “To you as a normal user, with an entry-level desktop or laptop class machine the CPU overhead per mail is negligible because you don’t send that many mails; at worst your mail is delayed a few seconds before being sent on slow old hardware. However, to spammers, this is a show-stopper: they want to send 10,000+ emails per minute down a DSL line bought with a stolen credit card quick before the account gets canceled.” Hashcash could be added to emails through a plugin.
Hashcash used the cryptographic hash function SHA-1 (Secure Hash Algorithm 1) to create a stamp that would help in verifying to the recipient that the email was not spam. “The sender can compute something related to the recipient’s email address (the square-root of it in the analogy), and the recipient can verify it (by squaring it in the analogy). The recipient knows the sender created this stamp just for him (not for someone else) because the answer (the square root) is of the recipient’s address.”
Hashcash was utilized by a number of organizations in an effort to combat spam and remailers. Notable among these is the spam filter service Spam Assassin, and email client Mozilla Thunderbird. The technological giant Microsoft also temporarily used a version of Hashcash in an email postmark as part of its efforts to reduce spam for its customers. The postmark is now deprecated.
The Connection Between Bitcoin And Hashcash
In the Bitcoin whitepaper, its creator Satoshi Nakamoto alluded to the fact that Back’s Hashcash served as the inspiration for the mining function used within the Bitcoin distributed ledger. “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.”
In fact, Hashcash is what lead Satoshi to Wei Dai and his proposal of b-money, where the two exchanged emails in 2008 leading up to the release of the Bitcoin whitepaper:
“I was very interested to read your b-money page. I’m getting ready to release a paper that expands on your ideas into a complete working system. Adam Back (hashcash.org) noticed the similarities and pointed me to your site.”
While they are similar, the algorithms used within Hashcash and Bitcoin have a number of differences. First, Hashcash uses SHA1 while bitcoin uses SHA256. SHA1 is a 160-bit hash while the SHA256 has 256 bits.
Moreover, in contrast to Hashcash, Satoshi specified that the hash in the Bitcoin network should be run twice, which was designed in an effort to increase the security of the algorithm as it would be less likely to be cracked or otherwise compromised.
Lastly, in Hashcash, the difficulty of the algorithm was designed to increase or decrease in halves. However, within the Bitcoin network, it is designed to respond to the conditions present dynamically. This is because the network is preset to keep the average rate of block creation at six per hour. Therefore, to ensure the rate of block creation stays the same despite the creation of powerful mining equipment such as ASICs, the network periodically increases difficulty.
The Hashcash function needs the first 20 characters of 160 hash bits to be zero. Opposite to Hashcash, Bitcoin’s function initially demanded the first 32 of 256 hash bits to be zero, but the difficulty has since increased and is now calls for the first 72 characters to be zero.
The Controversy Surrounding Adam Back
Adam Back credits himself as the creator of the Hashcash algorithm. However, some within the crypt community believe he only reworded prior work, most notably that of Dwork and Naor because the proof-of-work function had already been proposed and published by them.
Moreover, he publicly states that bitcoin uses Hashcash as its PoW algorithm. However, this is not entirely true because as explained, the Bitcoin network uses a similar version of the algorithm, but not the same one.
Furthermore, Back has been quoted saying “Bitcoin is Hashcash with better inflation control” which has garnered criticism from some among the crypto-community as they feel trivializes the ingenuity of the myriad technological innovations created by Satoshi.
Nevertheless, Hashcash and its predecessors formed the foundation for Hal Finney’s Reusable Proofs of Work (RPOW). Unlike Nick Szabo’s Bit Gold and Wei Dai’s b-money, RPOW was at the time the only digital collectible to ever function as a piece of software. In the next installments of ‘The History of Bitcoin,’ we will look at BitTorrent, Bit Gold, and b-money.
You can read the entire History of Bitcoin series here.