Optimizing SHA256 in Bitcoin Mining

Bitcoin is a “crypto currency”, a decentralized electronic payment scheme based on cryptography. It implements a particular type of peer-to-peer payment system. Bitcoin depends on well-known cryptographic standards such as SHA-256. In this paper we revisit the cryptographic process which allows one to make money by producing new bitcoins. We reformulate this problem as a specific sort of Constrained Input Small Output (CISO) hashing problem and reduce the problem to a pure block cipher problem, cf. Fig. 1. We estimate the speed of this process and we show that the amortized cost of this process is less than it seems and it depends on a certain cryptographic constant which is estimated to be at most 1.89. These optimizations enable bitcoin miners to save countless millions of dollars per year in electricity bills.

[1]  Colin Boyd,et al.  Cryptography and Coding , 1995, Lecture Notes in Computer Science.

[2]  Odysseas G. Koufopavlou,et al.  On the hardware implementations of the SHA-2 (256, 384, 512) hash functions , 2003, Proceedings of the 2003 International Symposium on Circuits and Systems, 2003. ISCAS '03..

[3]  Luigi Dadda,et al.  An ASIC design for a high speed implementation of the hash function SHA-256 (384, 512) , 2004, GLSVLSI '04.

[4]  María Bárbara Álvarez Torres,et al.  On the Move to Meaningful Internet Systems 2004: OTM 2004 Workshops , 2004, Lecture Notes in Computer Science.

[5]  Luigi Dadda,et al.  The design of a high speed ASIC unit for the hash function SHA-256 (384, 512) , 2004, Proceedings Design, Automation and Test in Europe Conference and Exhibition.

[6]  Luigi Dadda,et al.  Quasi-pipelined hash circuits , 2005, 17th IEEE Symposium on Computer Arithmetic (ARITH'05).

[7]  Stamatis Vassiliadis,et al.  Improving SHA-2 Hardware Implementations , 2006, CHES.

[8]  Martin Feldhofer,et al.  A Case Against Currently Used Hash Functions in RFID Protocols , 2006, OTM Workshops.

[9]  Mitsuru Matsui,et al.  Cryptographic Hardware and Embedded Systems - CHES 2006, 8th International Workshop, Yokohama, Japan, October 10-13, 2006, Proceedings , 2006, CHES.

[10]  Igor A. Semaev,et al.  New Technique for Solving Sparse Equation Systems , 2006, IACR Cryptology ePrint Archive.

[11]  Ingrid Verbauwhede,et al.  Iteration Bound Analysis and Throughput Optimum Architecture of SHA-256 (384, 512) for Hardware Implementations , 2007, WISA.

[12]  Gregory V. Bard,et al.  Algebraic Cryptanalysis of the Data Encryption Standard , 2007, IMACC.

[13]  Jaecheol Ryou,et al.  Efficient Hardware Architecture of SHA-256 Algorithm for Trusted Mobile Computing , 2009, Inscrypt.

[14]  Jian Guo,et al.  Preimages for Step-Reduced SHA-2 , 2009, IACR Cryptol. ePrint Arch..

[15]  Harris E. Michail,et al.  High Throughput Hardware/Software Co-Design Approach for SHA-256 Hashing Cryptographic Module In IPSec/IPv6 , 2010 .

[16]  Joseph Bonneau,et al.  What's in a Name? , 2020, Financial Cryptography.

[17]  George Athanasiou,et al.  Ultra high speed SHA-256 hashing cryptographic module for IPSec hardware/software codesign , 2010, 2010 International Conference on Security and Cryptography (SECRYPT).

[18]  Martin Feldhofer,et al.  Uniform Evaluation of Hardware Implementations of the Round-Two SHA-3 Candidates , 2010 .

[19]  Theodosis Mourouzis,et al.  Black-box collision attacks on the compression function of the GOST Hash function , 2011, Proceedings of the International Conference on Security and Cryptography.

[20]  Theodosis Mourouzis,et al.  Solving Circuit Optimisation Problems in Cryptography and Cryptanalysis , 2011, IACR Cryptol. ePrint Arch..

[21]  Xuejia Lai,et al.  What is the Effective Key Length for a Block Cipher: an Attack on Every Block Cipher , 2012, IACR Cryptol. ePrint Arch..

[22]  Elaine Shi,et al.  Bitter to Better - How to Make Bitcoin a Better Currency , 2012, Financial Cryptography.

[23]  N. Courtois,et al.  Multiplicative Complexity and Solving Generalized Brent Equations With SAT Solvers , 2012 .

[24]  Joan Boyar,et al.  Logic Minimization Techniques with Applications to Cryptology , 2013, Journal of Cryptology.

[25]  Nicolas Courtois,et al.  The Unreasonable Fundamental Incertitudes Behind Bitcoin Mining , 2013, ArXiv.

[26]  Nicolas Courtois,et al.  On Subversive Miner Strategies and Block Withholding Attack in Bitcoin Digital Currency , 2014, ArXiv.