S/MIME WG S. Turner Internet Draft IECA, Inc. Intended Status: Standard Track May 20, 2007 Expires: November 20, 2007 Using SHA2 Algorithms with Cryptographic Message Syntax draft-ietf-smime-sha2-00.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html This Internet-Draft will expire on November 20, 2007. Copyright Notice Copyright (C) The IETF Trust (2007). Abstract This document describes the conventions for using the message digest algorithms SHA-224, as defined in [RFC3874], and SHA-256, SHA-384, SHA-512, as defined in [SHA2], with the Cryptographic Message Syntax (CMS) [RFC3852]. Turner Expires November 20, 2007 [Page 1] Internet-Draft Using SHA2 Algorithms with CMS May 2007 Conventions used in this document 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 [RFC2119]. Table of Contents 1. Introduction...................................................2 2. SHA2 Message Digest Algorithms.................................2 2.1. SHA-224...................................................3 2.2. SHA-256...................................................4 2.3. SHA-384...................................................4 2.4. SHA-512...................................................4 3. Security Considerations........................................4 4. IANA Considerations............................................4 5. References.....................................................5 5.1. Normative References......................................5 5.2. Informative References....................................5 1. Introduction This document specifies the algorithm identifiers and specifies parameters for the message digest algorithms SHA-224, SHA-256, SHA- 384, and SHA-512 for use with the Cryptographic Message Syntax (CMS) [RFC3852]. The message digest algorithms are defined in [RFC3874] and [SHA2]. If an implementation chooses to support one of the algorithms discussed in this document, then the implementation MUST do so as described in this document. This document does not define new identifiers; they are taken from [RFC3874] and [RFC4055]. Additionally, the parameters follow the conventions specified therein. Therefore, there is no ASN.1 module included in this document. Note that [RFC4231] specifies the conventions for use of for the message authentication code (MAC) algorithms: HMAC with SHA-224, HMAC with SHA-256, HMAC with SHA-384, and HMAC with SHA-512. 2. SHA2 Message Digest Algorithms Digest algorithm identifiers are located in the SignedData digestAlgorithms field, the SignerInfo digestAlgorithm field, the DigestedData digestAlgorithm field, and the AuthenticatedData digestAlgorithm field. Turner Expires November 20, 2007 [Page 2] Internet-Draft Using SHA2 Algorithms with CMS May 2007 Digest values are located in the DigestedData digest field and the Message Digest authenticated attribute. In addition, digest values are input to signature algorithms. In CMS, the digest algorithm identifiers use the AlgorithmIdentifier syntax, which is included here for convenience: AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } The algorithm field is discussed in Sections 2.1-2.4 for each message digest algorithm. The following addresses the parameters field: There are two possible encodings for the SHA AlgorithmIdentifier parameters field. The two alternatives arise from the fact that when the 1988 syntax for AlgorithmIdentifier was translated into the 1997 syntax, the OPTIONAL associated with the AlgorithmIdentifier parameters got lost. Later the OPTIONAL was recovered via a defect report, but by then many people thought that algorithm parameters were mandatory. Because of this history some implementations encode parameters as a NULL element and others omit them entirely. The correct encoding is to omit the parameters field; however, implementations MUST also handle a SHA AlgorithmIdentifier parameters field which contains a NULL. The AlgorithmIdentifier parameters field is OPTIONAL. If present, the parameters field MUST contain a NULL. Implementations MUST accept SHA2 AlgorithmIdentifiers with absent parameters. Implementations MUST accept SHA2 AlgorithmIdentifiers with NULL parameters. Implementations SHOULD generate SHA2 AlgorithmIdentifiers with absent parameters. 2.1. SHA-224 The SHA-224 message digest algorithm is defined in [RFC3874]. The algorithm identifier for SHA-224 is: id-sha224 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 4 } The parameters are as specified in Section 2. Turner Expires November 20, 2007 [Page 3] Internet-Draft Using SHA2 Algorithms with CMS May 2007 2.2. SHA-256 The SHA-256 message digest algorithm is defined in [SHA2]. The algorithm identifier for SHA-256 is: id-sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 1 } The parameters are as specified in Section 2. 2.3. SHA-384 The SHA-384 message digest algorithm is defined in [SHA2]. The algorithm identifier for SHA-384 is: id-sha384 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 2 } The parameters are as specified in Section 2. 2.4. SHA-512 The SHA-256 message digest algorithm is defined in [SHA2]. The algorithm identifier for SHA-512 is: id-sha512 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 3 } The parameters are as specified in Section 2. 3. Security Considerations No new security considerations are added to those already documented in [RFC3370], [RFC3874], and [RFC4055]. 4. IANA Considerations None: All identifiers are already registered. Please remove this section prior to publication as an RFC. Turner Expires November 20, 2007 [Page 4] Internet-Draft Using SHA2 Algorithms with CMS May 2007 5. References 5.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119. March 1997. [RFC3852] Housley, R., "The Cryptographic Message Syntax (CMS)", RFC 3852. July 2004. [RFC3874] Housley, R., "A 224-bit One Way Hash Function: SHA-224", RFC 3874. September 2004. [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional Algorithms and Identifiers for RSA Cryptography for use in the Internet Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 4055. June 2005. [SHA2] National Institute of Standards and Technology (NIST), FIPS Publication 180-2: Secure Hash Standard, 1 August 2002. 5.2. Informative References [RFC4231] Nystrom, A. "Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512", RFC4231. December 2005. Author's Addresses Sean Turner IECA, Inc. Email: turners@ieca.com Turner Expires November 20, 2007 [Page 5] Internet-Draft Using SHA2 Algorithms with CMS May 2007 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The IETF Trust (2007). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Turner Expires November 20, 2007 [Page 6]