Skip to main content

Optimizing SHA256 in Bitcoin Mining

  • Conference paper
Cryptography and Security Systems (CSS 2014)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 448))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aumasson, J.-P., Khovratovich, D.: First Analysis of Keccak (2009), http://131002.net/data/papers/AK09.pdf

  2. Barber, S., Boyen, X., Shi, E., Uzun, E.: Bitter to Better — How to Make Bitcoin a Better Currency. In: Keromytis, A.D. (ed.) FC 2012. LNCS, vol. 7397, pp. 399–414. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  3. Nakamoto, S., et al.: Bitcoin QT: http://bitcoin.org/en/download

  4. Boyar, J., Matthews, P., Peralta, R.: Logic Minimization Techniques with Applications to Cryptology. Journal of Cryptology 26, 280–312 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  5. Chaves, R., Kuzmanov, G., Sousa, L., Vassiliadis, S.: Improving SHA-2 hardware implementations. In: Goubin, L., Matsui, M. (eds.) CHES 2006. LNCS, vol. 4249, pp. 298–310. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  6. Courtois, N.T., Hulme, D., Mourouzis, T.: Solving Circuit Optimisation Problems in Cryptography and Cryptanalysis. In: Proceedings of SHARCS 2012 Workshop, UK, pp. 179–191 (2011)

    Google Scholar 

  7. Courtois, N.T., Hulme, D., Mourouzis, T.: Multiplicative Complexity and Solving Generalized Brent Equations With SAT Solvers. In: COMPUTATION TOOLS 2012, The Third International Conference on Computational Logics, Algebras, Programming, Tools, and Benchmarking. ARIA, Nice (2012)

    Google Scholar 

  8. Courtois, N.T., Grajek, M., Naik, R.: The Unreasonable Fundamental Incertitudes Behind Bitcoin Mining (2013), http://arxiv.org/abs/1310.7935

  9. Courtois, N.T., Bahack, L.: On Subversive Miner Strategies and Block Withholding Attack in Bitcoin Digital Currency (2014), http://arxiv.org/abs/1402.1718

  10. Courtois, N.T., Bard, G.V.: Algebraic Cryptanalysis of the Data Encryption Standard. In: Galbraith, S.D. (ed.) Cryptography and Coding 2007. LNCS, vol. 4887, pp. 152–169. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Courtois, N.T., Mourouzis, T.: Black-Box Collision Attacks on the Compression Function of the GOST Hash Function. In: Proceedings of 6th International Conference on Security and Cryptography SECRYPT, Spain (2011)

    Google Scholar 

  12. Dadda, L., Macchetti, M., Jeff Owen, J.: An ASIC design for a high speed implementation of the hash function SHA-256 384, 512. In: ACM Great Lakes Symposium on VLSI, pp. 421–425. ACM (2004)

    Google Scholar 

  13. Dadda, L., Macchetti, M., Owen, J.: The Design of a High Speed ASIC Unit for the Hash Function SHA-256 (384, 512). In: DATE 2004, pp. 70–75. IEEE (2004)

    Google Scholar 

  14. Virtual currencies: Mining digital gold, From the print edition: Finance and economics, The Economist (2013)

    Google Scholar 

  15. National Institute of Standards and Technology (NIST). FIPS PUB 180-2, SHA256 Standard (2002), http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf

  16. Feldhofer, M., Rechberger, C.: A Case Against Currently Used Hash Functions in RFID Protocols. In: Meersman, R., Tari, Z., Herrero, P. (eds.) OTM 2006 Workshops. LNCS, vol. 4277, pp. 372–381. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  17. Knezevic, M.: Efficient Hardware Implementations of Cryptographic Primitives. PhD thesis, Katholieke Universiteit Leuven (2011)

    Google Scholar 

  18. Lee, Y.K., Chan, H., Verbauwhede, I.: Iteration bound analysis and throughput optimum architecture of SHA-256 (384,512) for hardware implementations. In: Kim, S., Yung, M., Lee, H.-W. (eds.) WISA 2007. LNCS, vol. 4867, pp. 102–114. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  19. Macchetti, M., Dadda, L.: Quasi-Pipelined Hash Circuits. In: IEEE Symposium on Computer Arithmetic, pp. 222–229 (2005)

    Google Scholar 

  20. Michail, H.E., Athanasiou, G., Kritikakou, A., Goutis, C.E., Gregoriades, A., Papadopoulou, V.G.: Ultra High Speed SHA-256 Hashing Cryptographic Module for IPSec Hardware/Software Codesign. In: SECRYPT, pp. 309–313 (2010)

    Google Scholar 

  21. Michail, H.E., Athanasiou, G., Gregoriades, A., Panagiotou, C.L., Goutis, C.E.: High Throughput Hardware/Software Co-design Approach SHA-256 Hashing Cryptographic Module. Global Journal of Computer Science and Technology 10, 15 (2010)

    Google Scholar 

  22. Guo, J., Matusiewicz, K.: Preimages for Step-Reduced SHA-2 (2008), http://eprint.iacr.org/2009/477.pdf

  23. Heusser, J.: SAT solving - An alternative to brute force bitcoin mining (2013), http://jheusser.github.io/2013/02/03/satcoin.html

  24. Huang, J., Lai, X.: What is the Effective Key Length for a Block Cipher: an Attack on Every Block Cipher (2012), http://eprint.iacr.org/2012/677

  25. Kim, M., Ryou, J., Jun, S.: Efficient Hardware Architecture of SHA-256 Algorithm for Trusted Mobile Computing. In: Yung, M., Liu, P., Lin, D. (eds.) Inscrypt 2008. LNCS, vol. 5487, pp. 240–252. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  26. Matusiewicz, K., Pieprzyk, J., Pramstaller, N.: Rechberger, Ch., Rijmen, V.: Analysis of simplified variants of SHA-256: http://www2.mat.dtu.dk/people/K.Matusiewicz/papers/SimplifiedSHA256.pdf

  27. Nakamoto, S.: Bitcoin: A Peer-to-Peer Electronic Cash System: http://bitcoin.org/bitcoin.pdf

  28. Raddum, H., Semaev, I.: New Technique for Solving Sparse Equation Systems. In: ECRYPT STVL (2006), http://eprint.iacr.org/2006/475/

  29. Sklavos, N., Koufopavlou, O.G.: On the hardware implementations of the SHA-2 (256, 384, 512) hash functions. ISCAS 5, 153–156 (2003)

    Google Scholar 

  30. Tillich, S., Feldhofer, M., Kirschbaum, M., Plos, T., Schmidt, J.-M., Alexander Szekely, A.: Uniform Evaluation of Hardware Implementations of the Round-Two SHA-3 Candidates. In: Second SHA-3 Conference (2010), http://csrc.nist.gov/groups/ST/hash/sha-3/Round2/Aug2010/documents/papers/TILLICH_sha3hw.pdf

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Courtois, N.T., Grajek, M., Naik, R. (2014). Optimizing SHA256 in Bitcoin Mining. In: Kotulski, Z., Księżopolski, B., Mazur, K. (eds) Cryptography and Security Systems. CSS 2014. Communications in Computer and Information Science, vol 448. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-44893-9_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-44893-9_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-44892-2

  • Online ISBN: 978-3-662-44893-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics