Array ( [0] => {{Short description|Set of cryptographic hash functions designed by the NSA}} [1] => {{SHA-box}} [2] => {{Infobox cryptographic hash function [3] => | name = SHA-2 [4] => | image = [5] => | caption = [6] => [7] => | designers = [[National Security Agency]] [8] => | publish date = {{Start date and age|2001}} [9] => | series = ([[SHA-0]]), [[SHA-1]], SHA-2, [[SHA-3]] [10] => | derived from = [11] => | derived to = [12] => | related to = [13] => | certification = [[Federal Information Processing Standard|FIPS]] PUB 180-4, [[CRYPTREC]], [[NESSIE]] [14] => [15] => | digest size = 224, 256, 384, or 512 bits [16] => | structure = [[Merkle–Damgård construction]] with [[One-way compression function#Davies–Meyer|Davies–Meyer compression function]] [17] => | rounds = 64 or 80 [18] => | cryptanalysis = A 2011 attack breaks [[preimage resistance]] for 57 out of 80 rounds of SHA-512, and 52 out of 64 rounds for SHA-256. [19] => Pseudo-collision attack against up to 46 rounds of SHA-256. [20] => SHA-256 and SHA-512 are prone to [[length extension attack]]s. By guessing the hidden part of the state, length extension attacks on SHA-224 and SHA-384 succeed with probability 2−(256−224) = 2−32 > 2−224 and 2−(512−384) = 2−128 > 2−384 respectively. [21] => }} [22] => '''SHA-2''' ('''[[Secure Hash Algorithms|Secure Hash Algorithm]] 2''') is a set of [[cryptographic hash function]]s designed by the United States [[National Security Agency]] (NSA) and first published in 2001.{{cite web |last1=Penard |first1=Wouter |last2=van Werkhoven |first2=Tim |title=On the Secure Hash Algorithm family |url=https://www.staff.science.uu.nl/~werkh108/docs/study/Y5_07_08/infocry/project/Cryp08.pdf |url-status=dead |archive-url=https://web.archive.org/web/20160330153520/https://www.staff.science.uu.nl/~werkh108/docs/study/Y5_07_08/infocry/project/Cryp08.pdf |archive-date=2016-03-30 |website=staff.science.uu.nl}} They are built using the [[Merkle–Damgård construction]], from a one-way compression function itself built using the [[One-way compression function#Davies–Meyer|Davies–Meyer structure]] from a specialized block cipher. [23] => [24] => SHA-2 includes significant changes from its predecessor, [[SHA-1]]. The SHA-2 family consists of six hash functions with digests (hash values) that are 224, 256, 384 or 512 bits:{{cite web |title=IPR Details: The United States of America as represented by the National Security Agency's general license statement |url=https://datatracker.ietf.org/ipr/858/ |website=IETF Datatracker|access-date=2008-02-17 |id=858}} '''SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256'''. SHA-256 and SHA-512 are novel hash functions computed with eight 32-bit and 64-bit words, respectively. They use different shift amounts and additive constants, but their structures are otherwise virtually identical, differing only in the number of rounds. SHA-224 and SHA-384 are truncated versions of SHA-256 and SHA-512 respectively, computed with different initial values. SHA-512/224 and SHA-512/256 are also truncated versions of SHA-512, but the initial values are generated using the method described in [[Federal Information Processing Standards]] (FIPS) PUB 180-4. [25] => [26] => SHA-2 was first published by the [[National Institute of Standards and Technology]] (NIST) as a U.S. federal standard. The SHA-2 family of algorithms are patented in the U.S.{{cite patent|country=US|number=6829355|pubdate=2004-12-07|title=Device for and method of one-way cryptographic hashing|assign1=[[National Security Agency]]|inventor1-last=Lilly|inventor1-first=Glenn M.}} The United States has released the patent under a [[royalty-free]] license. [27] => [28] => As of 2011, the best public attacks break [[preimage attack|preimage resistance]] for 52 out of 64 rounds of SHA-256 or 57 out of 80 rounds of SHA-512, and [[collision attack|collision resistance]] for 46 out of 64 rounds of SHA-256. [29] => [30] => ==Hash standard== [31] => [[File:SHA-2.svg|thumbnail|right|upright=1.8|One iteration in a SHA-2 family compression function. [32] => The blue components perform the following operations:
[33] =>     \operatorname{Ch}(E,F,G) = (E \land F) \oplus (\neg E \land G)
[34] =>     \operatorname{Ma}(A,B,C) = (A \land B) \oplus (A \land C) \oplus (B \land C)
[35] =>     \Sigma_0(A) = (A\!\ggg\!2) \oplus (A\!\ggg\!13) \oplus (A\!\ggg\!22)
[36] =>     \Sigma_1(E) = (E\!\ggg\!6) \oplus (E\!\ggg\!11) \oplus (E\!\ggg\!25)
[37] => The bitwise rotation uses different constants for SHA-512. The given numbers are for SHA-256.
[38] => The red \color{red}\boxplus is addition modulo 232 for SHA-256, or 264 for SHA-512. [39] => ]] [40] => [41] => With the publication of FIPS PUB 180-2, NIST added three additional hash functions in the SHA family. The algorithms are collectively known as SHA-2, named after their digest lengths (in bits): SHA-256, SHA-384, and SHA-512. [42] => [43] => The algorithms were first published in 2001 in the draft FIPS PUB 180-2, at which time public review and comments were accepted. In August 2002, FIPS PUB 180-2 became the new [[Secure Hash Standard]], replacing FIPS PUB 180-1, which was released in April 1995. The updated standard included the original SHA-1 algorithm, with updated technical notation consistent with that describing the inner workings of the SHA-2 family.Federal Register Notice 02-21599, [https://federalregister.gov/a/02-21599 Announcing Approval of FIPS Publication 180-2] [44] => [45] => In February 2004, a change notice was published for FIPS PUB 180-2, specifying an additional variant, SHA-224, defined to match the key length of two-key [[Triple DES]].{{cite web|url=https://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf |title=FIPS 180-2 with Change Notice 1|website=csrc.nist.gov}} In October 2008, the standard was updated in FIPS PUB 180-3, including SHA-224 from the change notice, but otherwise making no fundamental changes to the standard. The primary motivation for updating the standard was relocating security information about the hash algorithms and recommendations for their use to Special Publications 800-107 and 800-57.Federal Register Notice E8-24743, [https://federalregister.gov/a/E8-24743 Announcing Approval of FIPS Publication 180-3]{{Cite report |url=https://csrc.nist.gov/Pubs/sp/800/107/r1/Final |title=Recommendation for Applications Using Approved Hash Algorithms |last=Dang |first=Quynh |date=2012-08-24 |publisher=National Institute of Standards and Technology |issue=NIST Special Publication (SP) 800-107 Rev. 1 |language=en}}{{Cite report |url=https://csrc.nist.gov/Pubs/sp/800/57/pt1/r3/Final |title=Recommendation for Key Management, Part 1: General (Revision 3) |last1=Barker |first1=Elaine |last2=Barker |first2=William |date=2012-07-10 |publisher=National Institute of Standards and Technology |issue=NIST Special Publication (SP) 800-57 Part 1 Rev. 3 (Withdrawn) |language=en |last3=Burr |first3=William |last4=Polk |first4=W. |last5=Smid |first5=Miles}} Detailed test data and example message digests were also removed from the standard, and provided as separate documents.{{cite web |url=https://csrc.nist.gov/groups/ST/toolkit/examples.html#aHashing| title=NIST.gov – Computer Security Division – Computer Security Resource Center| date=29 December 2016}} [46] => [47] => In January 2011, NIST published SP800-131A, which specified a move from the then-current minimum of 80-bit security (provided by SHA-1) allowable for federal government use until the end of 2013, to 112-bit security (provided by SHA-2) being both the minimum requirement (starting in 2014) and the recommended [[Security level management|security level]] (starting from the publication date in 2011).{{Cite report |url=https://csrc.nist.gov/Pubs/sp/800/131/a/Final |title=Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths |last1=Barker |first1=Elaine |last2=Roginsky |first2=Allen |date=2011-01-13 |publisher=National Institute of Standards and Technology |issue=NIST Special Publication (SP) 800-131A (Withdrawn) |language=en}} [48] => [49] => In March 2012, the standard was updated in FIPS PUB 180-4, adding the hash functions SHA-512/224 and SHA-512/256, and describing a method for generating initial values for truncated versions of SHA-512. Additionally, a restriction on [[Padding (cryptography)|padding]] the input data prior to hash calculation was removed, allowing hash data to be calculated simultaneously with content generation, such as a real-time video or audio feed. Padding the final data block must still occur prior to hash output.Federal Register Notice 2012-5400, [https://federalregister.gov/a/2012-5400 Announcing Approval of FIPS Publication 180-4] [50] => [51] => In July 2012, NIST revised SP800-57, which provides guidance for cryptographic key management. The publication disallowed creation of digital signatures with a hash security lower than 112 bits after 2013. The previous revision from 2007 specified the cutoff to be the end of 2010. In August 2012, NIST revised SP800-107 in the same manner. [52] => [53] => The [[NIST hash function competition]] selected a new hash function, [[SHA-3]], in 2012.{{cite journal |url=https://www.nist.gov/itl/csd/sha-100212.cfm| title=NIST Selects Winner of Secure Hash Algorithm (SHA-3) Competition| journal=NIST| date=2 October 2012|access-date=24 February 2015}} The SHA-3 algorithm is not derived from SHA-2. [54] => [55] => ==Applications== [56] => {{Further|Cryptographic hash function#Applications}} [57] => The SHA-2 hash function is implemented in some widely used security applications and protocols, including [[Transport Layer Security|TLS]] and [[Secure Sockets Layer|SSL]], [[Pretty Good Privacy|PGP]], [[Secure Shell|SSH]], [[S/MIME]], and [[IPsec]]. The inherent computational demand of SHA-2 algorithms has driven the proposal of more efficient solutions, such as those based on application-specific integrated circuits (ASICs) hardware accelerators.{{cite journal|author1=Lucas Daudt Franck |author2=Gabriel Augusto Ginja |author3=João Paulo Carmo |author4=Jose A. Afonso |author5=Maximiliam Luppe |title=Custom ASIC Design for SHA-256 Using Open-Source Tools |journal=Computers |volume=13 |issue=1 |pages=9 |year=2024 |doi=10.3390/computers13010009 |doi-access=free }} [58] => [59] => SHA-256 is used for authenticating [[Debian]] software packages{{cite web|url=https://www.debian.org/CD/verify |title=Verifying authenticity of Debian images |access-date=2024-02-19 }} and in the [[DKIM]] message signing standard; SHA-512 is part of a system to authenticate archival video from the [[International Criminal Tribunal for Rwanda|International Criminal Tribunal of the Rwandan genocide]].{{Cite news |last=Markoff |first=John |date=2009-01-27 |title=A Tool to Verify Digital Records, Even as Technology Shifts |language=en-US |work=The New York Times |url=https://www.nytimes.com/2009/01/27/science/27arch.html |access-date=2023-08-27 |issn=0362-4331}} SHA-256 and SHA-512 are proposed for use in [[DNSSEC]].RFC 5702,[https://www.rfc-editor.org/rfc/rfc5702.txt RFC-Editor.org] Unix and Linux vendors are moving to using 256- and 512-bit SHA-2 for secure password hashing.{{Cite web |title=Unix crypt with SHA-256/512 |url=https://akkadia.org/drepper/sha-crypt.html |access-date=2023-08-27 |website=akkadia.org}} [60] => [61] => Several [[cryptocurrency|cryptocurrencies]], including [[Bitcoin]], use SHA-256 for verifying transactions and calculating [[proof of work]]{{Cite web|url=https://surplusbitcoin.com/|title=Bitcoin Does Not Waste Energy|last=Bitcoin|first=Surplus|website=Surplus Bitcoin|language=en-US|access-date=2020-04-20|archive-date=2022-05-28|archive-url=https://web.archive.org/web/20220528202245/https://surplusbitcoin.com/|url-status=dead}} or [[proof of stake]].{{Cite news|url=https://www.mycryptopedia.com/sha-256-related-bitcoin/|title=What Is SHA-256 And How Is It Related to Bitcoin? - Mycryptopedia|date=2017-09-21|work=Mycryptopedia|access-date=2018-09-17|language=en-US}} The rise of [[ASIC]] SHA-2 accelerator chips has led to the use of [[scrypt]]-based proof-of-work schemes. [62] => [63] => SHA-1 and SHA-2 are the [[Secure Hash Algorithms]] required by law for use in certain [[Federal government of the United States|U.S. Government]] applications, including use within other cryptographic algorithms and protocols, for the protection of sensitive unclassified information. FIPS PUB 180-1 also encouraged adoption and use of SHA-1 by private and commercial organizations. SHA-1 is being retired for most government uses; the U.S. National Institute of Standards and Technology says, "Federal agencies '''''should''''' stop using SHA-1 for...applications that require collision resistance as soon as practical, and must use the SHA-2 family of hash functions for these applications after 2010" (emphasis in original).{{Cite web |last=Computer Security Division |first=Information Technology Laboratory |date=2017-01-04 |title=NIST Policy on Hash Functions – Hash Functions {{!}} CSRC {{!}} CSRC |url=https://csrc.nist.gov/projects/hash-functions/nist-policy-on-hash-functions |access-date=2023-08-27 |website=CSRC {{!}} NIST |language=EN-US}} NIST's directive that U.S. government agencies ought to, but not explicitly must, stop uses of SHA-1 after 2010{{cite web| url=https://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html| title=Secure Hashing| work=[[NIST]]| access-date=2010-11-25| archive-url=https://web.archive.org/web/20110625054822/https://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html| archive-date=2011-06-25| url-status=dead}} was hoped to accelerate migration away from SHA-1. [64] => [65] => The SHA-2 functions were not quickly adopted initially, despite better security than SHA-1. Reasons might include lack of support for SHA-2 on systems running Windows XP SP2 or older{{cite web |url=https://download.microsoft.com/download/6/8/7/687484ed-8174-496d-8db9-f02b40c12982/Overview%20of%20Windows%20XP%20Service%20Pack%203.pdf |title=Overview of Windows XP Service Pack 3 |publisher=Microsoft Corporation |archive-url=https://web.archive.org/web/20080530175317/https://download.microsoft.com/download/6/8/7/687484ed-8174-496d-8db9-f02b40c12982/Overview%20of%20Windows%20XP%20Service%20Pack%203.pdf |archive-date=May 30, 2008 |url-status=dead |df=mdy-all }} and a lack of perceived urgency since SHA-1 collisions had not yet been found. The [[Google Chrome]] team announced a plan to make their web browser gradually stop honoring SHA-1-dependent TLS certificates over a period from late 2014 and early 2015.{{Cite web |title=Gradually Sunsetting SHA-1 |url=https://blog.chromium.org/2014/09/gradually-sunsetting-sha-1.html |access-date=2023-08-27 |website=Chromium Blog |language=en}}{{cite web|url=https://shaaaaaaaaaaaaa.com/|title=SHAAAAAAAAAAAAA|author=Eric Mill|work=SHAAAAAAAAAAAAA.com}}{{Cite web |date=2015-04-08 |title=The unofficial Chrome SHA1 deprecation FAQ |url=https://words.filippo.io/the-unofficial-chrome-sha1-faq/ |access-date=2023-08-27 |website=Filippo Valsorda}} Similarly, Microsoft announced{{Cite web|url=https://blogs.windows.com/msedgedev/2016/04/29/sha1-deprecation-roadmap|title=An update to our SHA-1 deprecation roadmap – Microsoft Edge Dev BlogMicrosoft Edge Dev Blog|website=blogs.windows.com|date=29 April 2016|access-date=2016-11-28}} that [[Internet Explorer]] and [[Microsoft Edge|Edge]] would stop honoring public SHA-1-signed TLS certificates from February 2017. [[Mozilla]] disabled SHA-1 in early January 2016, but had to re-enable it temporarily via a [[Firefox]] update, after problems with web-based user interfaces of some router models and [[security appliance]]s.{{Cite web |last=online |first=heise |date=2016-01-08 |title=Firefox: Mozilla schaltet SHA-1 ab … und direkt wieder an |url=https://www.heise.de/news/Firefox-Mozilla-schaltet-SHA-1-ab-und-direkt-wieder-an-3066832.html |access-date=2023-08-27 |website=Security |language=de}} [66] => [67] => ==Cryptanalysis and validation== [68] => For a hash function for which ''L'' is the number of [[bit]]s in the [[message digest]], finding a message that corresponds to a given message digest can always be done using a [[Brute-force attack|brute force]] search in 2''L'' evaluations. This is called a [[preimage attack]] and may or may not be practical depending on ''L'' and the particular computing environment. The second criterion, finding two different messages that produce the same message digest, known as a [[hash collision|collision]], requires on average only 2''L''/2 evaluations using a [[birthday attack]]. [69] => [70] => Some of the applications that use cryptographic hashes, such as password storage, are only minimally affected by a [[collision attack]]. Constructing a password that works for a given account requires a preimage attack, as well as access to the hash of the original password (typically in the [[Shadow password|shadow]] file) which may or may not be trivial. Reversing password encryption (e.g., to obtain a password to try against a user's account elsewhere) is not made possible by the attacks. (However, even a secure password hash cannot prevent brute-force attacks on [[password strength|weak passwords]].) [71] => [72] => In the case of document signing, an attacker could not simply fake a signature from an existing document—the attacker would have to produce a pair of documents, one innocuous and one damaging, and get the private key holder to sign the innocuous document. There are practical circumstances in which this is possible; until the end of 2008, it was possible to create forged [[Transport Layer Security|SSL]] certificates using an [[MD5]] collision which would be accepted by widely used web browsers.Alexander Sotirov, Marc Stevens, Jacob Appelbaum, Arjen Lenstra, David Molnar, Dag Arne Osvik, Benne de Weger, [https://www.win.tue.nl/hashclash/rogue-ca/ MD5 considered harmful today: Creating a rogue CA certificate], accessed March 29, 2009. [73] => [74] => Increased interest in cryptographic hash analysis during the SHA-3 competition produced several new attacks on the SHA-2 family, the best of which are given in the table below. Only the collision attacks are of practical complexity; none of the attacks extend to the full round hash function. [75] => [76] => At [[Fast Software Encryption|FSE]] 2012, researchers at [[Sony]] gave a presentation suggesting pseudo-collision attacks could be extended to 52 rounds on SHA-256 and 57 rounds on SHA-512 by building upon the [[biclique attack|biclique]] pseudo-preimage attack.Ji Li, Takanori Isobe and Kyoji Shibutani, Sony China Research Laboratory and Sony Corporation, [https://fse2012.inria.fr/SLIDES/67.pdf Converting Meet-in-the-Middle Preimage Attack into Pseudo Collision Attack: Application to SHA-2 ] [77] => [78] => {| class="wikitable" [79] => |- [80] => ! Published in [81] => ! Year [82] => ! Attack method [83] => ! Attack [84] => ! Variant [85] => ! Rounds [86] => ! Complexity [87] => [88] => |- [89] => | rowspan="2" | ''New Collision Attacks Against Up To 24-step SHA-2''{{citation|last1=Sanadhya|first1=Somitra Kumar|last2=Sarkar|first2=Palash|title=New collision attacks against up to 24-step SHA-2|publisher=Springer-Verlag|series=Lecture Notes in Computer Science|volume=5365|year=2008|pages=91-103|url=https://link.springer.com/chapter/10.1007/978-3-540-89754-5_8|doi=10.1007/978-3-540-89754-5_8|ISBN=978-3-540-89753-8}}{{cite journal|last1=Sanadhya|first1=Somitra Kumar|last2=Sarkar|first2=Palash|title=A combinatorial analysis of recent attacks on step reduced SHA-2 family|journal=Cryptography and Communications| [90] => year=2009|url=https://link.springer.com/article/10.1007/s12095-009-0011-5|doi=10.1007/s12095-009-0011-5}} || rowspan="2" | 2008 || rowspan="2" | Differential || rowspan="2" | Collision || SHA-256 || 24/64 || 215.5 [91] => |- [92] => | SHA-512 || 24/80 || 222.5 [93] => [94] => |- [95] => | rowspan="4" | ''Preimages for step-reduced SHA-2''{{Cite book |author1=Kazumaro Aoki |author2=Jian Guo |author3=Krystian Matusiewicz |author4=Yu Sasaki |author5=Lei Wang |title=Advances in Cryptology – ASIACRYPT 2009 |chapter=Preimages for Step-Reduced SHA-2 |name-list-style=amp | year=2009 | series=Lecture Notes in Computer Science | volume=5912 | pages=578–597 | publisher=Springer Berlin Heidelberg | doi=10.1007/978-3-642-10366-7_34 | isbn=978-3-642-10366-7 | issn=0302-9743 }} || rowspan="4" | 2009 || rowspan="4" | [[Meet-in-the-middle attack|Meet-in-the-middle]] || rowspan="4" | Preimage || rowspan="2" | SHA-256 || 42/64 || 2251.7 [96] => |- [97] => | 43/64 || 2254.9 [98] => |- [99] => | rowspan="2" | SHA-512 || 42/80 || 2502.3 [100] => |- [101] => | 46/80 || 2511.5 [102] => [103] => |- [104] => | rowspan="2" | ''Advanced meet-in-the-middle preimage attacks''{{Cite book |author1=Jian Guo |author2=San Ling |author3=Christian Rechberger |author4=Huaxiong Wang |title=Advances in Cryptology - ASIACRYPT 2010 |chapter=Advanced Meet-in-the-Middle Preimage Attacks: First Results on Full Tiger, and Improved Results on MD4 and SHA-2 |name-list-style=amp | year=2010 | series=Lecture Notes in Computer Science | volume=6477 | pages=56–75 | publisher=Springer Berlin Heidelberg | doi=10.1007/978-3-642-17373-8_4 | isbn=978-3-642-17373-8 | issn=0302-9743 | url=https://eprint.iacr.org/2010/016.pdf}} || rowspan="2" | 2010 || rowspan="2" | Meet-in-the-middle || rowspan="2" | Preimage || SHA-256 || 42/64 || 2248.4 [105] => |- [106] => | SHA-512 || 42/80 || 2494.6 [107] => [108] => |- [109] => | rowspan="2" | ''Higher-Order Differential Attack on Reduced SHA-256''{{Cite journal |author1=Mario Lamberger |author2=Florian Mendel |name-list-style=amp | title=Higher-Order Differential Attack on Reduced SHA-256 | year=2011 | journal=IACR Cryptology ePrint Archive | volume=2011 |issue=37 | url=https://eprint.iacr.org/2011/037.pdf}} || rowspan="2" | 2011 || rowspan="2" | [[Differential cryptanalysis|Differential]] || rowspan="2" | Pseudo-collision || rowspan="2" | SHA-256 || 46/64 || 2178 [110] => |- [111] => | 33/64 || 246 [112] => [113] => |- [114] => | rowspan="4" | ''Bicliques for Preimages: Attacks on Skein-512 and the SHA-2 family''{{Cite journal |author1=Dmitry Khovratovich, Christian Rechberger |author2=Alexandra Savelieva |name-list-style=amp | title=Bicliques for Preimages: Attacks on Skein-512 and the SHA-2 family | year=2011 | journal=IACR Cryptology ePrint Archive | volume=2011 |issue=286 | url=https://eprint.iacr.org/2011/286.pdf}} || rowspan="4" | 2011 || rowspan="4" | [[Biclique attack|Biclique]] || rowspan="2" | Preimage || SHA-256 || 45/64 || 2255.5 [115] => |- [116] => | SHA-512 || 50/80 || 2511.5 [117] => |- [118] => | rowspan="2" | Pseudo-preimage || SHA-256 || 52/64 || 2255 [119] => |- [120] => | SHA-512 || 57/80 || 2511 [121] => [122] => |- [123] => | rowspan="2" | ''Improving Local Collisions: New Attacks on Reduced SHA-256''{{Cite book |author1=Florian Mendel |author2=Tomislav Nad |author3=Martin Schläffer |title=Advances in Cryptology – EUROCRYPT 2013 |chapter=Improving Local Collisions: New Attacks on Reduced SHA-256 | year=2013 | series=Lecture Notes in Computer Science | volume=7881 | pages=262–278 | publisher=Springer Berlin Heidelberg | doi=10.1007/978-3-642-38348-9_16 | isbn=978-3-642-38348-9 | issn=0302-9743 | url=https://online.tugraz.at/tug_online/voe_main2.getvolltext?pCurrPk=69018}} || rowspan="2" | 2013 || rowspan="2" | Differential || Collision || SHA-256 || 31/64 || 265.5 [124] => |- [125] => | Pseudo-collision || SHA-256 || 38/64 || 237 [126] => [127] => |- [128] => | rowspan="1" | ''Branching Heuristics in Differential Collision Search with Applications to SHA-512''{{Cite journal | author=Maria Eichlseder and Florian Mendel and Martin Schläffer | title=Branching Heuristics in Differential Collision Search with Applications to SHA-512 | year=2014 | journal=IACR Cryptology ePrint Archive | volume=2014 | issue=302 | url=https://eprint.iacr.org/2014/302.pdf}} || 2014 || Heuristic differential || Pseudo-collision || SHA-512 || 38/80 || 240.5 [129] => [130] => |- [131] => | rowspan="3" | ''Analysis of SHA-512/224 and SHA-512/256''{{Cite web |author1=Christoph Dobraunig |author2=Maria Eichlseder |author3=Florian Mendel |name-list-style=amp | title=Analysis of SHA-512/224 and SHA-512/256 |website=International Association for Cryptologic Research | year=2016 | url=https://eprint.iacr.org/2016/374.pdf}} || rowspan="3" | 2016 || rowspan="3" | Differential || rowspan="2" | Collision || SHA-256 || 28/64 || practical [132] => |- [133] => | SHA-512 || 27/80 || practical [134] => |- [135] => | Pseudo-collision || SHA-512 || 39/80 || practical [136] => [137] => |- [138] => | rowspan="3" | ''New Records in Collision Attacks on SHA-2''{{cite journal | last=Li | first=Yingxin | last2=Liu | first2=Fukang | last3=Wang | first3=Gaoli | title=New Records in Collision Attacks on SHA-2 | journal=Cryptology ePrint Archive | date=2024 | url=https://eprint.iacr.org/2024/349 | access-date=2024-03-02 | page=}} || rowspan="3" | 2023 || rowspan="3" | Differential || rowspan="2" | Collision || SHA-256 || 31/64 || 249.8 [139] => |- [140] => | SHA-512 || 31/80 || 2115.6 [141] => |- [142] => | Pseudo-collision || SHA-256 || 39/64 || practical [143] => |} [144] => [145] => ===Official validation=== [146] => {{Main|Cryptographic Module Validation Program}} [147] => Implementations of all FIPS-approved security functions can be officially validated through the [[Cryptographic Module Validation Program|CMVP program]], jointly run by the [[National Institute of Standards and Technology]] (NIST) and the [[Communications Security Establishment]] (CSE). For informal verification, a package to generate a high number of test vectors is made available for download on the NIST site; the resulting verification, however, does not replace the formal CMVP validation, which is required by law{{citation-needed|date=September 2021}} for certain applications. [148] => [149] => {{As of|2013|alt=As of December 2013}}, there are over 1300 validated implementations of SHA-256 and over 900 of SHA-512, with only 5 of them being capable of handling messages with a length in bits not a multiple of eight while supporting both variants.{{cite web|title=SHS Validation List|url=https://csrc.nist.gov/groups/STM/cavp/documents/shs/shaval.html|website=NIST|archive-url=https://web.archive.org/web/20170617035122/https://csrc.nist.gov/groups/STM/cavp/documents/shs/shaval.html|archive-date=2017-06-17|date=2017-06-16}} [150] => [151] => ==Test vectors== [152] => Hash values of an empty string (i.e., a zero-length input text). [153] => {{color|green|SHA224("")}} [154] => 0x d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f [155] => {{color|green|SHA256("")}} [156] => 0x e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 [157] => {{color|green|SHA384("")}} [158] => 0x 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b [159] => {{color|green|SHA512("")}} [160] => 0x cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e [161] => {{color|green|SHA512/224("")}} [162] => 0x 6ed0dd02806fa89e25de060c19d3ac86cabb87d6a0ddd05c333b84f4 [163] => {{color|green|SHA512/256("")}} [164] => 0x c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a [165] => [166] => Even a small change in the message will (with overwhelming probability) result in a different hash, due to the [[avalanche effect]]. For example, adding a period to the end of the following sentence changes approximately half (111 out of 224) of the bits in the hash, equivalent to picking a new hash at random: [167] => {{color|green|SHA224("[[The quick brown fox jumps over the lazy dog]]")}} [168] => 0x 730e109bd7a8a32b1cb9d9a09aa2325d2430587ddbc0c38bad911525 [169] => {{color|green|SHA224("[[The quick brown fox jumps over the lazy dog]]{{highlight|.}}")}} [170] => 0x 619cba8e8e05826e9b8c519c0a5c68f4fb653e8a3d8aa04bb2c8cd4c [171] => [172] => ==Pseudocode== [173] => [[Pseudocode]] for the SHA-256 algorithm follows. Note the great increase in mixing between bits of the w[16..63] words compared to SHA-1. [174] => [175] => {{color|green|''Note 1: All variables are 32 bit unsigned integers and addition is calculated modulo 232''}} [176] => {{color|green|''Note 2: For each round, there is one round constant k[i] and one entry in the message schedule array w[i], 0 ≤ i ≤ 63''}} [177] => {{color|green|''Note 3: The compression function uses 8 working variables, a through h''}} [178] => {{color|green|''Note 4: Big-endian convention is used when expressing the constants in this pseudocode,''}} [179] => {{color|green|''and when parsing message block data from bytes to words, for example,''}} [180] => {{color|green|''the first word of the input message "abc" after padding is 0x61626380''}} [181] => [182] => {{color|green|''Initialize hash values:''}} [183] => {{color|green|(first 32 bits of the ''fractional parts'' of the square roots of the first 8 primes 2..19):}} [184] => h0 := 0x6a09e667 [185] => h1 := 0xbb67ae85 [186] => h2 := 0x3c6ef372 [187] => h3 := 0xa54ff53a [188] => h4 := 0x510e527f [189] => h5 := 0x9b05688c [190] => h6 := 0x1f83d9ab [191] => h7 := 0x5be0cd19 [192] => [193] => {{color|green|''Initialize array of round constants:''}} [194] => {{color|green|(first 32 bits of the ''fractional parts'' of the cube roots of the first 64 primes 2..311):}} [195] => k[0..63] := [196] => 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, [197] => 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, [198] => 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, [199] => 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, [200] => 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, [201] => 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, [202] => 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, [203] => 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 [204] => [205] => {{color|green|''Pre-processing (Padding):''}} [206] => begin with the original message of length L bits [207] => append a single '1' bit [208] => append K '0' bits, where K is the minimum number >= 0 such that (L + 1 + K + 64) is a multiple of 512 [209] => append L as a 64-bit big-endian integer, making the total post-processed length a multiple of 512 bits [210] => such that the bits in the message are: 1 , (the number of bits will be a multiple of 512) [211] => [212] => {{color|green|''Process the message in successive 512-bit chunks:''}} [213] => break message into 512-bit chunks [214] => '''for''' each chunk [215] => create a 64-entry message schedule array w[0..63] of 32-bit words [216] => {{color|green|''(The initial values in w[0..63] don't matter, so many implementations zero them here)''}} [217] => copy chunk into first 16 words w[0..15] of the message schedule array [218] => [219] => {{color|green|''Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array:''}} [220] => '''for''' i '''from''' 16 to 63 [221] => s0 := (w[i-15] '''rightrotate''' 7) '''xor''' (w[i-15] '''rightrotate''' 18) '''xor''' (w[i-15] '''rightshift''' 3) [222] => s1 := (w[i-2] '''rightrotate''' 17) '''xor''' (w[i-2] '''rightrotate''' 19) '''xor''' (w[i-2] '''rightshift''' 10) [223] => w[i] := w[i-16] '''+''' s0 '''+''' w[i-7] '''+''' s1 [224] => [225] => {{color|green|''Initialize working variables to current hash value:''}} [226] => a := h0 [227] => b := h1 [228] => c := h2 [229] => d := h3 [230] => e := h4 [231] => f := h5 [232] => g := h6 [233] => h := h7 [234] => [235] => {{color|green|''Compression function main loop:''}} [236] => '''for''' i '''from''' 0 to 63 [237] => S1 := (e '''rightrotate''' 6) '''xor''' (e '''rightrotate''' 11) '''xor''' (e '''rightrotate''' 25) [238] => ch := (e '''and''' f) '''xor''' (('''not''' e) '''and''' g) [239] => temp1 := h '''+''' S1 '''+''' ch '''+''' k[i] '''+''' w[i] [240] => S0 := (a '''rightrotate''' 2) '''xor''' (a '''rightrotate''' 13) '''xor''' (a '''rightrotate''' 22) [241] => maj := (a '''and''' b) '''xor''' (a '''and''' c) '''xor''' (b '''and''' c) [242] => temp2 := S0 '''+''' maj [243] => [244] => h := g [245] => g := f [246] => f := e [247] => e := d '''+''' temp1 [248] => d := c [249] => c := b [250] => b := a [251] => {{not a typo|a}} := temp1 '''+''' temp2 [252] => [253] => {{color|green|''Add the compressed chunk to the current hash value:''}} [254] => h0 := h0 '''+''' a [255] => h1 := h1 '''+''' b [256] => h2 := h2 '''+''' c [257] => h3 := h3 '''+''' d [258] => h4 := h4 '''+''' e [259] => h5 := h5 '''+''' f [260] => h6 := h6 '''+''' g [261] => h7 := h7 '''+''' h [262] => [263] => {{color|green|''Produce the final hash value (big-endian):''}} [264] => digest := hash := h0 '''append''' h1 '''append''' h2 '''append''' h3 '''append''' h4 '''append''' h5 '''append''' h6 '''append''' h7 [265] => [266] => The computation of the ch and maj values can be optimized the same way [[SHA-1#SHA-1 pseudocode|as described for SHA-1]]. [267] => [268] => SHA-224 is identical to SHA-256, except that: [269] => * the initial hash values h0 through h7 are different, and [270] => * the output is constructed by omitting h7. [271] => {{color|green|SHA-224 initial hash values (in big endian):}} [272] => {{color|green|(The second 32 bits of the fractional parts of the square roots of the 9th through 16th primes 23..53)}} [273] => h[0..7] := [274] => 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 [275] => [276] => SHA-512 is identical in structure to SHA-256, but: [277] => * the message is broken into 1024-bit chunks, [278] => * the initial hash values and round constants are extended to 64 bits, [279] => * there are 80 rounds instead of 64, [280] => * the message schedule array w has 80 64-bit words instead of 64 32-bit words, [281] => * to extend the message schedule array w, the loop is from 16 to 79 instead of from 16 to 63, [282] => * the round constants are based on the first 80 primes 2..409, [283] => * the word size used for calculations is 64 bits long, [284] => * the appended length of the message (before pre-processing), in ''bits'', is a 128-bit big-endian integer, and [285] => * the shift and rotate amounts used are different. [286] => [287] => {{color|green|SHA-512 initial hash values (in big-endian):}} [288] => {{color|green|}} [289] => h[0..7] := 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, [290] => 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179 [291] => [292] => {{color|green|SHA-512 round constants:}} [293] => {{color|green|}} [294] => k[0..79] := 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538, [295] => 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe, [296] => 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, [297] => 0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, [298] => 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab, [299] => 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725, [300] => 0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, [301] => 0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, [302] => 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218, [303] => 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, [304] => 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, [305] => 0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, [306] => 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c, [307] => 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6, [308] => 0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, [309] => 0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 [310] => [311] => {{color|green|SHA-512 Sum & Sigma:}} [312] => {{color|green|}} [313] => S0 := (a '''rightrotate''' 28) '''xor''' (a '''rightrotate''' 34) '''xor''' (a '''rightrotate''' 39) [314] => S1 := (e '''rightrotate''' 14) '''xor''' (e '''rightrotate''' 18) '''xor''' (e '''rightrotate''' 41) [315] => {{color|green|}} [316] => s0 := (w[i-15] '''rightrotate''' 1) '''xor''' (w[i-15] '''rightrotate''' 8) '''xor''' (w[i-15] '''rightshift''' 7) [317] => s1 := (w[i-2] '''rightrotate''' 19) '''xor''' (w[i-2] '''rightrotate''' 61) '''xor''' (w[i-2] '''rightshift''' 6) [318] => [319] => SHA-384 is identical to SHA-512, except that: [320] => * the initial hash values h0 through h7 are different (taken from the 9th through 16th primes), and [321] => * the output is constructed by omitting h6 and h7. [322] => {{color|green|SHA-384 initial hash values (in big-endian):}} [323] => {{color|green|}} [324] => h[0..7] := 0xcbbb9d5dc1059ed8, 0x629a292a367cd507, 0x9159015a3070dd17, 0x152fecd8f70e5939, [325] => 0x67332667ffc00b31, 0x8eb44a8768581511, 0xdb0c2e0d64f98fa7, 0x47b5481dbefa4fa4 [326] => [327] => SHA-512/t is identical to SHA-512 except that: [328] => * the initial hash values h0 through h7 are given by the ''SHA-512/t IV generation function'', [329] => * the output is constructed by truncating the concatenation of h0 through h7 at ''t'' bits, [330] => * ''t'' equal to 384 is not allowed, instead SHA-384 should be used as specified, and [331] => * ''t'' values 224 and 256 are especially mentioned as approved. [332] => [333] => The ''SHA-512/t IV generation function'' evaluates a ''modified SHA-512'' on the ASCII string "SHA-512/''t''", substituted with the decimal representation of ''t''. The ''modified SHA-512'' is the same as SHA-512 except its initial values h0 through h7 have each been [[XORed]] with the hexadecimal constant 0xa5a5a5a5a5a5a5a5. [334] => [335] => Sample C implementation for SHA-2 family of hash functions can be found in RFC 6234. [336] => [337] => ==Comparison of SHA functions== [338] => In the table below, ''internal state'' means the "internal hash sum" after each compression of a data block. [339] => {{Further|Merkle–Damgård construction}} [340] => [341] => {{Comparison of SHA functions}} [342] => [343] => In the bitwise operations column, "Rot" stands for [[Bitwise operation#Rotate|rotate no carry]], and "Shr" stands for [[Bitwise operation#Logical shift|right logical shift]]. All of these algorithms employ [[Modular arithmetic#Other operations|modular addition]] in some fashion except for SHA-3. [344] => [345] => More detailed performance measurements on modern processor architectures are given in the table below. [346] => [347] => {| class="wikitable" [348] => |- [349] => ! CPU architecture [350] => ! Frequency [351] => ! Algorithm [352] => ! Word size (bits) [353] => ! Cycles/byte [[x86]] [354] => ! MiB/s x86 [355] => ! Cycles/byte [[x86-64]] [356] => ! MiB/s x86-64 [357] => |- style="text-align:center;" [358] => | rowspan="2" | [[Ivy Bridge (microarchitecture)|Intel Ivy Bridge]] ||- rowspan="2" | 3.5 GHz || SHA-256 || 32 || 16.80 || 199 || 13.05 || 256 [359] => |- style="text-align:center;" [360] => | SHA-512 || 64 || 43.66 || 76 || 8.48 || 394 [361] => |- style="text-align:center;" [362] => | rowspan="2" | [[Piledriver (microarchitecture)|AMD Piledriver]] APU ||- rowspan="2" | 3.8 GHz || SHA-256 || 32 || 22.87 || 158 || 18.47 || 196 [363] => |- style="text-align:center;" [364] => | SHA-512 || 64 || 88.36 || 41 || 12.43 || 292 [365] => |} [366] => [367] => The performance numbers labeled 'x86' were running using 32-bit code on 64-bit processors, whereas the 'x86-64' numbers are native 64-bit code. While SHA-256 is designed for 32-bit calculations, it does benefit from code optimized for 64-bit processors on the x86 architecture. 32-bit implementations of SHA-512 are significantly slower than their 64-bit counterparts. Variants of both algorithms with different output sizes will perform similarly, since the message expansion and compression functions are identical, and only the initial hash values and output sizes are different. The best implementations of MD5 and SHA-1 perform between 4.5 and 6 cycles per byte on modern processors. [368] => [369] => Testing was performed by the [[University of Illinois at Chicago]] on their hydra8 system running an Intel Xeon E3-1275 V2 at a clock speed of 3.5 GHz, and on their hydra9 system running an AMD A10-5800K APU at a clock speed of 3.8 GHz.SUPERCOP Benchmarks [https://bench.cr.yp.to/results-hash.html Measurements of hash functions, indexed by machine] The referenced cycles per byte speeds above are the median performance of an algorithm digesting a 4,096 byte message using the SUPERCOP cryptographic benchmarking software.{{cite web|url=https://bench.cr.yp.to/supercop.html|title=SUPERCOP|access-date=24 February 2015}} The MiB/s performance is extrapolated from the CPU clockspeed on a single core; real-world performance will vary due to a variety of factors. [370] => [371] => == Implementations == [372] => Below is a list of cryptography libraries that support SHA-2: [373] => [374] => * [[Botan (programming library)|Botan]] [375] => * [[Bouncy Castle (cryptography)|Bouncy Castle]] [376] => * [[Cryptlib]] [377] => * [[Crypto++]] [378] => * [[Libgcrypt]] [379] => * [[Mbed TLS]][https://tls.mbed.org/supported-ssl-ciphersuites ''Supported SSL / TLS ciphersuites''][https://github.com/ARMmbed/mbedtls/blob/master/ChangeLog ''Mbed TLS Changelog'', 7 July 2007] [380] => * [[NaCl (software)|libsodium]] [381] => * [[Nettle (cryptographic library)|Nettle]] [382] => * [[LibreSSL]] [383] => * [[OpenSSL]] [384] => * [[GnuTLS]] [385] => * [[wolfSSL]] [386] => [387] => Hardware acceleration is provided by the following processor extensions: [388] => [389] => * [[Intel SHA extensions]]: Available on some Intel and AMD x86 processors. [390] => * [[VIA PadLock]] [391] => * ARMv8 Cryptography Extensions{{cite web |title=ARM Cortex-A53 MPCore Processor Technical Reference Manual Cryptography Extension |url=https://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500e/CJHDEBAF.html}} [392] => * IBM [[z/Architecture]]: Available since 2005 as part of the Message-Security-Assist Extensions 1 (SHA-256) and 2 (SHA-512)IBM z/Architecture Principles of Operation, publication number SA22-7832. See KIMD and KLMD instructions in Chapter 7. [393] => * IBM [[Power_ISA#Power_ISA_v.2.07|Power ISA]] since v.2.07 [394] => [395] => ==See also== [396] => [397] => * [[Comparison of cryptographic hash functions]] [398] => * [[Comparison of cryptography libraries]] [399] => * [[Hash function security summary]] [400] => * [[Hashcash]] [401] => * [[HMAC]] [402] => * [[International Association for Cryptologic Research]] (IACR) [403] => * [[Trusted timestamping]] [404] => [405] => ==References== [406] => {{Reflist|colwidth=30em}} [407] => [408] => ==Further reading== [409] => {{Refbegin}} [410] => * Henri Gilbert, Helena Handschuh: Security Analysis of SHA-256 and Sisters. [[Selected Areas in Cryptography]] 2003: pp175–193 [411] => * {{cite journal|title=Proposed Revision of Federal Information Processing Standard (FIPS) 180, Secure Hash Standard|journal=Federal Register|date=1994-07-11|volume=59|issue=131|pages=35317–35318|url=https://www.federalregister.gov/documents/1994/07/11/94-16666/proposed-revision-of-federal-information-processing-standard-fips-180-secure-hash-standard|access-date=2007-04-26}} [412] => {{Refend}} [413] => [414] => ==External links== [415] => [416] => * [https://web.archive.org/web/20130526224224/https://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf Descriptions of SHA-256, SHA-384, and SHA-512] from [[National Institute of Standards and Technology|NIST]] [417] => * [https://shachecker.com SHA-2 Checker] – SHAChecker to check one's SSL compatibility for SHA-2 [418] => * [https://fe-tool.com/en-us/hash/sha256 SHA-256 Calculator] – SHA-256 Calculator [419] => * [https://owuk.com/sha256.html SHA-256 Hash Generator] – SHA256 Generator – Also serves other critical secure hash algorithms [420] => * [https://web.archive.org/web/20141008212020/https://w2.eff.org/Privacy/Digital_signature/?f=fips_sha_shs.standard.txt Specifications for a Secure Hash Standard (SHS)] – Draft for proposed SHS (SHA-0) [421] => * [https://web.archive.org/web/20141008212429/https://w2.eff.org/Privacy/Digital_signature/?f=fips_sha_shs.info.txt Secure Hash Standard (SHS)] – Proposed SHS (SHA-0) [422] => * [https://web.archive.org/web/20110625054822/https://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html CSRC Cryptographic Toolkit] – Official [[National Institute of Standards and Technology|NIST]] site for the Secure Hash Standard [423] => * [https://web.archive.org/web/20161126003357/https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf FIPS PUB 180-4: Secure Hash Standard (SHS)] ([[Portable Document Format|PDF]], 834 KB) – Current version of the Secure Hash Standard (SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512), August 2015 [424] => * [https://www.cosic.esat.kuleuven.be/nessie/testvectors/hash/sha/index.html Test vectors for SHA-256/384/512] from the [[NESSIE]] project [425] => * [https://csrc.nist.gov/groups/STM/cavp/index.html#03 Test vectors for SHA-1, SHA-2] from [[National Institute of Standards and Technology|NIST]] site [426] => * [https://web.archive.org/web/20100505162618/https://csrc.nist.gov/groups/ST/hash/index.html NIST Cryptographic Hash Project] – SHA-3 competition [427] => * {{IETF RFC|3874|link=no}}: "A 224-bit One-way Hash Function: SHA-224" [428] => * {{IETF RFC|6234|link=no}}: "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)"; contains sample C implementation [429] => * [https://sha256algorithm.com/ SHA-256 algorithm demonstration] [430] => [431] => {{Cryptography navbox | hash}} [432] => {{Cryptocurrencies}} [433] => {{Bitcoin}} [434] => [435] => {{DEFAULTSORT:Sha-2}} [436] => [[Category:Cryptographic hash functions]] [437] => [[Category:Articles with example pseudocode]] [438] => [[Category:Checksum algorithms]] [439] => [[Category:National Security Agency cryptography]] [] => )
good wiki

SHA-2

SHA-2 (Secure Hash Algorithm 2) is a cryptographic hash function designed by the National Security Agency (NSA) and published by the National Institute of Standards and Technology (NIST) as a successor to SHA-1. It is widely used in various cryptographic applications and protocols to ensure message integrity and security.

More about us

About

It is widely used in various cryptographic applications and protocols to ensure message integrity and security. SHA-2 includes six hash functions, known as SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256, each producing a different hash length. The primary motivation behind developing SHA-2 was the vulnerability of SHA-1 to collision attacks, which were demonstrated in the mid-2000s. SHA-2 is considered secure and is commonly used in secure communications, digital signatures, password hashing, certificate authorities, and various other security applications.

Expert Team

Vivamus eget neque lacus. Pellentesque egauris ex.

Award winning agency

Lorem ipsum, dolor sit amet consectetur elitorceat .

10 Year Exp.

Pellen tesque eget, mauris lorem iupsum neque lacus.