Network Working Group R. Housley
Request for Comments: 3874 Vigil Security
Category: Informational September 2004
A 224-bit One-way Hash Function: SHA-224
1. Introduction
This document specifies a 224-bit one-way hash function, called SHA-224. The National Institute of Standards and Technology (NIST) announced the FIPS 180-2 Change Notice on February 28, 2004 which specifies the SHA-224 one-way hash function. One-way hash functions are also known as message digests. SHA-224 is based on SHA-256, the 256-bit one-way hash function already specified by NIST [SHA2]. Computation of a SHA-224 hash value is two steps. First, the SHA-256 hash value is computed, except that a different initial value is used. Second, the resulting 256-bit hash value is truncated to 224 bits.
Housley Informational [Page 1]
RFC 3874 A 224-bit One-way Hash Function: SHA-224 September 2004 1.1. Usage ConsiderationsSince SHA-224 is based on SHA-256, roughly the same amount of effort is consumed to compute a SHA-224 or a SHA-256 digest message digest value. Even though SHA-224 and SHA-256 have roughly equivalent computational complexity, SHA-224 is an appropriate choice for a one-way hash function that provides 112 bits of security. The use of a different initial value ensures that a truncated SHA-256 message digest value cannot be mistaken for a SHA-224 message digest value computed on the same data.
1.2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [STDWORDS].
2. SHA-224 Description
SHA-224 may be used to compute a one-way hash value on a message whose length less than 2^64 bits.
Housley Informational [Page 2]
RFC 3874 A 224-bit One-way Hash Function: SHA-224 September 2004
Second, SHA-224 simply makes use of the first seven 32-bit words in the SHA-256 result, discarding the remaining 32-bit words in
the SHA-256 result. That is, the final value of H is used as
follows, where || denotes concatenation:
H_0 || H_1 || H_2 || H_3 || H_4 || H_5 || H_6
3. Test Vectors
This section includes three test vectors. These test vectors can be used to test implementations of SHA-224.
3.1. Test Vector #1
Let the message to be hashed be the 24-bit ASCII string "abc", which is equivalent to the following binary string:
3.2. Test Vector #2
Let the message to be hashed be the 448-bit ASCII string "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".
3.3. Test Vector #3
Let the message to be hashed be the binary-coded form of the ASCII string which consists of 1,000,000 repetitions of the character "a".
Housley Informational [Page 3]
RFC 3874 A 224-bit One-way Hash Function: SHA-224 September 2004 4. Object IdentifierNIST has assigned an ASN.1 [X.208-88, X.209-88] object identifier for SHA-224. Some protocols use object identifiers to name one-way hash functions. One example is CMS [CMS]. Implementations of such protocols that make use of SHA-224 MUST use the following object identifier.
5. Security Considerations
One-way hash functions are typically used with other cryptographic algorithms, such as digital signature algorithms and keyed-hash message authentication codes, or in the generation of random values. When a one-way hash function is used in conjunction with another algorithm, there may be requirements specified elsewhere that require the use of a one-way hash function with a certain number of bits of security. For example, if a message is being signed with a digital signature algorithm that provides 128 bits of security, then that signature algorithm may require the use of a one-way hash algorithm that also provides the same number of bits of security. SHA-224 is intended to provide 112 bits of security, which is the generally accepted strength of Triple-DES [3DES].6. References 6.1. Normative References[SHA2] Federal Information Processing Standards Publication
Housley Informational [Page 4]
RFC 3874 A 224-bit One-way Hash Function: SHA-224 September 2004 6.2. Informative References[3DES] American National Standards Institute. ANSI X9.52-1998,
7. Acknowledgments
Many thanks to Jim Schaad for generating the test vectors. A second implementation by Brian Gladman was used to confirm that the test vectors are correct.
8. Author's Address
Russell Housley Vigil Security, LLC 918 Spring Knoll Drive Herndon, VA 20170 USA
Housley Informational [Page 5]
RFC 3874 A 224-bit One-way Hash Function: SHA-224 September 2004 9. Full Copyright StatementCopyright (C) The Internet Society (2004).