Optimising the SHA256 Hashing Algorithm for Faster and More Efficient Bitcoin Mining 1
Rahul Naik · 2013
Since its inception in early 2009, Bitcoin has attracted a substantial amount of users and the popularity of this decentralised virtual currency is rapidly increasing day by day. Over the years, an arms race for mining hardware has resulted with miners requiring more and more hashing power in order to remain alive in the Bitcoin mining arena. The hashing rate and the energy consumption of the mining devices used are of utmost importance for the profit margin in Bitcoin mining. As Bitcoin mining is fundamentally all about computing the double SHA256 hash of a certain stream of inputs many times, a lot of research has been aimed towards hardware optimisations of the SHA256 Hash Standard implementations. However, no effort has been made in order to optimise the SHA256 algorithm specific to Bitcoin mining. This thesis covers the broad field of Bitcoin, Bitcoin mining and the SHA256 hashing algorithm. Rather than hardware based optimisations, the main focus of this thesis is targeted towards optimising the SHA256 hashing algorithm specific to the Bitcoin mining protocol so that mining can be performed faster and in a more efficient manner. These optimisations take advantage of the fixed or predictable nature of the input stream of data in Bitcoin mining and various shortcuts are discussed to calculate particular rounds or message schedules that achieve the same computational results as off-the-shelf SHA256. Although these algorithm based optimisations can no longer allow generic SHA256 hashing, they are meant to radically optimise the process of Bitcoin mining. It has been claimed that if these improvements are to be implemented in mining devices, the double SHA256 computation reduces to a 1.8624 SHA256 computation which essentially means a faster hashing rate and lots of energy savings.