SHA256: Difference between revisions
Mr. MacKenty (talk | contribs) (Created page with "<center> <blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;"> File:Exclamation.png This is student work which has not yet been approve...") |
Mr. MacKenty (talk | contribs) No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[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>. It would be really helpful if you understood [[hashing]] and [[Cryptographic hash|cryptographic hashing]] to appreciate this topic. | |||
SHA256 is complex. Watch this video for an appreciation: | |||
<html> | |||
<iframe width="560" height="315" src="https://www.youtube.com/embed/S9JGmA5_unY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |||
</html> | |||
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: | |||
<syntaxhighlight> | |||
SHA224("The quick brown fox jumps over the lazy dog") | |||
0x 730e109bd7a8a32b1cb9d9a09aa2325d2430587ddbc0c38bad911525 | |||
SHA224("The quick brown fox jumps over the lazy dog.") | |||
0x 619cba8e8e05826e9b8c519c0a5c68f4fb653e8a3d8aa04bb2c8cd4c | |||
</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 == | ||
<references /> | <references /> | ||
[[Category: | [[Category:programming]] | ||
Latest revision as of 17:41, 8 March 2020
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