Skip to main content

New Records of Pre-image Search of Reduced SHA-1 Using SAT Solvers

  • Conference paper
  • First Online:
Proceedings of the Seventh International Conference on Mathematics and Computing

Abstract

Although the first SHA-1 collision attack has been carried out in 2017, the cryptographic hash function seems still robust against pre-image attacks. The aim of this work is to measure how many rounds of SHA-1 can be inverted in practice using SAT solvers. To do so, we have first modeled the problem of finding a pre-image of SHA-1 as a system of Boolean formulas, explicitly describing the procedure to obtain such model. Then, we configured the model based on different combinations of number of rounds and number of free bits in our target pre-image. Finally, to find a solution of the model, we used a SAT solver on our server, testing several combinations of restart policies and polarity modes. We analyze and report the number and positions of the pre-image bits that can be fixed to influence the ability of the SAT solver to find the remaining free bits of the pre-image in a shorter time. In particular, we execute partial pre-image attacks on 64-, 80- 96-, 112- and 128-bit messages, outperforming the current state-of-the-art records.

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 189.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 249.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

References

  1. Dang Q (2015) FIPS PUB 180–4, Secure Hash Standard (SHS). US Department of Commerce, NIST

    Google Scholar 

  2. Dang Q (2012) NIST SP 800–107 Rev 1, Recommendation for applications using approved hash algorithms. US Department of Commerce, NIST

    Google Scholar 

  3. Wang X, Yin YL, Yu H (2005) Finding collisions in the full SHA-1. In: Proceedings of EUROCRYPT 2005. Springer

    Google Scholar 

  4. Kelsey J, Schneier B (2005) Second preimages on \(n\)-bit hash functions for much less than \(2^n\) work. In: Proceedings of EUROCRYPT 2005. Springer

    Google Scholar 

  5. Bellare M, Canetti R, Krawczyk H (1996) Keying hash functions for message authentication. In: Proceedings of CRYPTO 1996. Springer

    Google Scholar 

  6. Nejati S, Liang JH, Gebotys C, Czarnecki K, Ganesh V (2017) Adaptive restart and CEGAR-based solver for inverting cryptographic hash functions. In: Proceedings of VSTTE 2017. Springer

    Google Scholar 

  7. Leurent G, Peyrin T (2019) From collisions to chosen-prefix collisions application to full SHA-1. In: Proceedings of EUROCRYPT 2019. Springer

    Google Scholar 

  8. Stevens M, Bursztein E, Karpman P, Albertini A, Markov Y (2017) The first collision for full SHA-1. In: Proceedings of CRYPTO2017. Springer

    Google Scholar 

  9. De Cannière C, Rechberger C (2008) Preimages for reduced SHA-0 and SHA-1. In: Proceedings of CRYPTO 2008. Springer

    Google Scholar 

  10. Aoki K, Sasaki Y (2009) Meet-in-the-middle preimage attacks against reduced SHA-0 and SHA-1. In: Proceedings of CRYPTO 2009. Springer

    Google Scholar 

  11. Espitau T, Fouque PA, Karpman P (2015) Higher-order differential meet-in-the-middle preimage attacks on SHA-1 and BLAKE. In: Proceedings of CRYPTO 2015. Springer

    Google Scholar 

  12. The New RSA Factoring Challenge. http://tiny.cc/osbbtz, Last accessed Dec 2020

  13. Decodingchallenge.org. http://decodingchallenge.org, Last accessed Dec 2020

  14. Ganesh V (2017) Adaptive restart and cegar-based solver for inverting cryptographic hash functions. In: Proceedings of VSTTE 2017. Springer

    Google Scholar 

  15. Legendre F, Dequen G, Krajecki M (2012) Encoding hash functions as a sat problem. In: 24th international conference on tools with artificial intelligence. IEEE

    Google Scholar 

  16. Legendre F, Dequen G, Krajecki M (2014) Logical reasoning to detect weaknesses about sha-1 and md4/5. IACR Cryptol. ePrint Arch. 2014:239

    Google Scholar 

  17. Nossum V (2012) SAT-based preimage attacks on SHA-1. Master’s thesis, University of Oslo

    Google Scholar 

  18. Merkle R (1979) Secrecy, authentication, and public key systems. PhD Thesis, Stanford University

    Google Scholar 

  19. Visconti A, Gorla F (2020) Exploiting an HMAC-SHA-1 optimization to speed up PBKDF2. IEEE Trans Dependable Secur Comput 17(4)

    Google Scholar 

  20. Van Harmelen F, Lifschitz V, Porter B (2007) Handbook of knowledge representation. Elsevier Science

    Google Scholar 

  21. Walsh T (1999) Search in a small world. In: Proceedings of IJCAI 1999. Morgan Kaufmann Publishers Inc

    Google Scholar 

  22. Gomes CP, Selman B, Kautz H (1998) Boosting combinatorial search through randomization. AAAI/IAAI 98

    Google Scholar 

  23. Luby M, Sinclair A, Zuckerman D (1993) Optimal speedup of las vegas algorithms. Inf Process Lett 47(4)

    Google Scholar 

  24. Visconti A, Schiavo CV, Peralta R (2018) Improved upper bounds for the expected circuit complexity of dense systems of linear equations over GF(2). Inf Process Lett 137

    Google Scholar 

  25. Iuorio AF, Visconti A (2019) Understanding optimizations and measuring performances of PBKDF2. In: Proceedings of WIDECOM 2019. Springer

    Google Scholar 

  26. Steube J (2013) Optimising computation of hash-algorithms as an attacker. http://hashcat.net/events/p13/js-ocohaaaa.pdf

  27. Shanatomy. https://github.com/Crypto-TII/shanatomy, Last accessed Jan 2021

  28. Soos M, Nohl K, Castelluccia C (2009) Extending SAT solvers to cryptographic problems. In: Proceedings of SAT 2009. Springer

    Google Scholar 

  29. Eén N, Sörensson N (2004) An extensible sat-solver. In: Proceedings of SAT 2004. Springer

    Google Scholar 

  30. Cimatti A, Griggio A, Schaafsma B, Sebastiani R (2013) The MathSAT5 SMT solver. In: Proceedings of TACAS 2013. Springer

    Google Scholar 

  31. Dutertre B (2014) Yices 2.2. In: Proceedings of CAV 2014. Springer

    Google Scholar 

Download references

Acknowledgements

UniMi’s researchers thank (a) TII that supported this research and provided insight and expertise; (b) the CINECA award under the ISCRA initiative, for the availability of high performance computing resources and support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andrea Visconti .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Bellini, E., De Piccoli, A., Makarim, R., Polese, S., Riva, L., Visconti, A. (2022). New Records of Pre-image Search of Reduced SHA-1 Using SAT Solvers. In: Giri, D., Raymond Choo, KK., Ponnusamy, S., Meng, W., Akleylek, S., Prasad Maity, S. (eds) Proceedings of the Seventh International Conference on Mathematics and Computing . Advances in Intelligent Systems and Computing, vol 1412. Springer, Singapore. https://doi.org/10.1007/978-981-16-6890-6_11

Download citation

Publish with us

Policies and ethics