SHA256: Difference between revisions

From Computer Science Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[file:computation.png|right|frame|Advanced programming<ref>http://www.flaticon.com/</ref>]]
[[file:computation.png|right|frame|Advanced programming<ref>http://www.flaticon.com/</ref>]]


SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001.<ref>https://en.wikipedia.org/wiki/SHA-2</ref>
SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001.<ref>https://en.wikipedia.org/wiki/SHA-2</ref>. It would be really helpful if you understood [[hashing]] and [[Cryptographic hash|cryptographic hashing]] to appreciate this topic.




Line 19: Line 19:
0x 619cba8e8e05826e9b8c519c0a5c68f4fb653e8a3d8aa04bb2c8cd4c
0x 619cba8e8e05826e9b8c519c0a5c68f4fb653e8a3d8aa04bb2c8cd4c
</syntaxhighlight>
</syntaxhighlight>
Feel free to use this resource to see how SHA256 hashes change with just one space or character:
https://emn178.github.io/online-tools/sha256.html


== References ==
== References ==

Latest revision as of 17:41, 8 March 2020

Advanced programming[1]

SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001.[2]. It would be really helpful if you understood hashing and cryptographic hashing to appreciate this topic.


SHA256 is complex. Watch this video for an appreciation:


Even a small change in the message will (with overwhelming probability) result in a mostly different hash, due to the avalanche effect. For example, adding a period to the end of the following sentence changes almost half (111 out of 224) of the bits in the hash:

SHA224("The quick brown fox jumps over the lazy dog")
0x 730e109bd7a8a32b1cb9d9a09aa2325d2430587ddbc0c38bad911525
SHA224("The quick brown fox jumps over the lazy dog.")
0x 619cba8e8e05826e9b8c519c0a5c68f4fb653e8a3d8aa04bb2c8cd4c

Feel free to use this resource to see how SHA256 hashes change with just one space or character:

https://emn178.github.io/online-tools/sha256.html

References