Strict Avalanche Criterion of SHA-256 and Sub-Function-Removed Variants
Abstract
:1. Introduction
1.1. The Strict Avalanche Criterion (SAC)
1.2. Related Works
1.3. Our Contribution
2. SHA256
2.1. Message Scheduler
Sigma Functions ( and )
2.2. Compression Function
2.2.1. MAJORITY and CHOOSE
2.2.2. Sigma Functions ( and )
2.2.3. Integer Addition (+)
2.2.4. K Constants
3. Methods
3.1. SAC Concerns
3.2. SHA256 Implementation
4. Results
4.1. SAC of Compression Rounds with Message Scheduler
4.2. SAC of Compression Rounds without Message Scheduler
4.3. SAC of Compression Function with Sub-Function-Removed Variants
5. Discussion and Future Works
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- NIST:180-2; FIPS pub 180-2 Secure Hash Standard. National Institute of Standards and Technology: Gaithersburg, MD, USA, 2002.
- NIST:180-4; FIPS pub 180-4 Secure Hash Standard. National Institute of Standards and Technology: Gaithersburg, MD, USA, 2015.
- Rescorla, E. The Transport Layer Security (TLS) Protocol Version 1.3; RFC Editor: Marina del Rey, CA, USA, 2018. [Google Scholar] [CrossRef]
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 7 September 2024).
- Handschuh, H.; Gilbert, H. The Evaluation Report of SHA-256 Crypt Analysis Hash Function. In Proceedings of the 2009 International Conference on Communication Software and Networks, Chengdu, China, 27–28 February 2009; pp. 588–592. [Google Scholar] [CrossRef]
- Shannon, C.E. Communication theory of secrecy systems. Bell Syst. Tech. J. 1949, 28, 656–715. [Google Scholar] [CrossRef]
- Feistel, H. Cryptography and Computer Privacy. Sci. Am. 1973, 228, 15–23. [Google Scholar] [CrossRef]
- Webster, A.F.; Tavares, S.E. On the design of S-Boxes. LNCS 1985, 218, 523–534. [Google Scholar] [CrossRef]
- Castro, J.C.H.; Sierra, J.M.; Seznec, A.; Izquierdo, A.; Ribagorda, A. The strict avalanche criterion randomness test. Math. Comput. Simul. 2005, 68, 1–7. [Google Scholar] [CrossRef]
- Gilbert, H.; Handschuh, H. Security Analysis of SHA-256 and Sisters*. LNCS 2004, 3006, 175–193. [Google Scholar] [CrossRef]
- Upadhyay, D.; Gaikwad, N.; Zaman, M.; Sampalli, S. Investigating the Avalanche Effect of Various Cryptographically Secure Hash Functions and Hash-Based Applications. EEE Access 2022, 10, 112472–112486. [Google Scholar] [CrossRef]
- Yoshida, H.; Biryukov, A. Analysis of a SHA-256 Variant. In Selected Areas in Cryptography. SAC 2005. Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3897. [Google Scholar] [CrossRef]
- Sanadhya, S.K.; Sarkar, P. New Collision attacks Against Up To 24-step SHA-2. LNSC 2008, 5365, 91–103. [Google Scholar] [CrossRef]
- Lamberger, M.; Mendel, F. Higher-Order Differential Attack on Reduced SHA-256. 2011. Available online: https://eprint.iacr.org/2011/037 (accessed on 7 September 2024).
- Li, Y.; Liu, F.; Wang, G. New Records in Collision Attacks on SHA-2. Cryptol. ePrint Arch. 2024, Paper 2024/349. Available online: https://eprint.iacr.org/2024/349 (accessed on 7 September 2024).
- Damgard, I.B. A Design Principle for Hash Functions. In Advances in Cryptology — CRYPTO’ 89 Proceedings; Springer: New York, NY, USA, 1989. [Google Scholar] [CrossRef]
- Liu, Y.; Rijmen, V.; Leander, G. Nonlinear Diffusion Layers. Des. Codes Cryptogr. 2018, 86, 2469–2484. [Google Scholar] [CrossRef]
- Random GO Standard Library. 2024. Available online: https://pkg.go.dev/math/rand (accessed on 7 September 2024).
- SHA-256 GO Standard Library. 2024. Available online: https://pkg.go.dev/crypto/sha256 (accessed on 7 September 2024).
- Vaughn, R. 2024. Available online: https://github.com/RileyVaughn/Sha256-SAC (accessed on 7 September 2024).
- National Institute of Standards and Technology. The Secure Hash Algorithm Validation System (SHAVS). 2014. Available online: https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/SHAVS.pdf (accessed on 7 September 2024).
Variant | Round | Min Value (%) | Min ± (%) | Max Value (%) | Max ± (%) |
---|---|---|---|---|---|
Unmodified | 23 | 49.7845 | 0.0289 | 50.2024 | 0.0411 |
CR | 24 | 49.7740 | 0.0232 | 50.2066 | 0.0290 |
KR | 23 | 49.7792 | 0.0153 | 50.2073 | 0.0428 |
MR | 23 | 49.7685 | 0.0309 | 50.2247 | 0.0252 |
MSR | 23 | 49.7122 | 0.0874 | 50.2261 | 0.0307 |
S0R | 23 | 49.7931 | 0.0427 | 50.2228 | 0.0270 |
S1R | 27 | 49.768 | 0.0309 | 50.2057 | 0.0368 |
AR | 25 | 49.774 | 0.0418 | 50.2103 | 0.0409 |
Variant | Round | Mean Value (%) | CI Low (%) | CI High (%) | Mean R64 (%) |
---|---|---|---|---|---|
Unmodified | 21 | 49.9682 | 49.8394 | 50.0970 | 49.999970 |
CR | 21 | 49.9206 | 49.7918 | 50.0494 | 49.999842 |
KR | 21 | 49.9680 | 49.8392 | 50.0968 | 49.999975 |
MR | 21 | 49.9674 | 49.8386 | 50.0962 | 50.000073 |
MSR | 21 | 49.9638 | 49.8350 | 50.0926 | 49.999996 |
S0R | 21 | 49.9407 | 49.8119 | 50.0695 | 49.999956 |
S1R | 24 | 49.9468 | 49.8180 | 50.0756 | 49.000091 |
AR | 22 | 49.8719 | 49.7431 | 50.0007 | 49.000123 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Vaughn, R.; Borowczak, M. Strict Avalanche Criterion of SHA-256 and Sub-Function-Removed Variants. Cryptography 2024, 8, 40. https://doi.org/10.3390/cryptography8030040
Vaughn R, Borowczak M. Strict Avalanche Criterion of SHA-256 and Sub-Function-Removed Variants. Cryptography. 2024; 8(3):40. https://doi.org/10.3390/cryptography8030040
Chicago/Turabian StyleVaughn, Riley, and Mike Borowczak. 2024. "Strict Avalanche Criterion of SHA-256 and Sub-Function-Removed Variants" Cryptography 8, no. 3: 40. https://doi.org/10.3390/cryptography8030040
APA StyleVaughn, R., & Borowczak, M. (2024). Strict Avalanche Criterion of SHA-256 and Sub-Function-Removed Variants. Cryptography, 8(3), 40. https://doi.org/10.3390/cryptography8030040