 1/draftietfsmimesha202.txt 20080130 19:12:12.000000000 +0100
+++ 2/draftietfsmimesha203.txt 20080130 19:12:12.000000000 +0100
@@ 1,17 +1,17 @@
S/MIME WG Sean Turner, IECA
Intended Status: Standard Track
Expires: July 28, 2008
+Expires: July 30, 2008
Using SHA2 Algorithms with Cryptographic Message Syntax
 draftietfsmimesha202.txt
+ draftietfsmimesha203.txt
Status of this Memo
By submitting this InternetDraft, 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.
InternetDrafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
@@ 22,101 +22,104 @@
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use InternetDrafts as reference
material or to cite them other than as "work in progress."
The list of current InternetDrafts can be accessed at
http://www.ietf.org/ietf/1idabstracts.txt
The list of InternetDraft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html
 This InternetDraft will expire on June 28, 2008.
+ This InternetDraft will expire on July 30, 2008.
Copyright Notice
Copyright (C) The IETF Trust (2008).
Abstract
This document describes the conventions for using the message digest
 algorithms SHA224, as defined in [RFC3874], and SHA256, SHA384,
 SHA512, as defined in [SHA2], with the Cryptographic Message Syntax
 (CMS) [RFC3852]. It also describes the conventions for using these
 algorithms with CMS and the DSA, RSA, and ECDSA signature algorithms.
+ algorithms SHA224, SHA256, SHA384, SHA512, as defined in FIPS
+ 1803, with the Cryptographic Message Syntax (CMS). It also describes
+ the conventions for using these algorithms with CMS and the DSA, RSA,
+ and ECDSA signature algorithms.
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. Message Digest Algorithms......................................3
2.1. SHA224...................................................4
2.2. SHA256...................................................4
2.3. SHA384...................................................4
2.4. SHA512...................................................4
3. Signature Algorithms...........................................5
3.1. DSA.......................................................5
 3.2. RSA.......................................................5
+ 3.2. RSA.......................................................6
3.3. ECDSA.....................................................6
4. Security Considerations........................................7
5. IANA Considerations............................................7
6. References.....................................................7
6.1. Normative References......................................7
6.2. Informative References....................................8
1. Introduction
This document specifies the algorithm identifiers and specifies
parameters for the message digest algorithms SHA224, SHA256, SHA
384, and SHA512 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.
+ [RFC3852]. The message digest algorithms are defined in and [SHS].
+ 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 also specifies the algorithm identifier and parameters
+ This document also specifies the algorithm identifiers and parameters
for use of SHA224, SHA256, SHA384, and SHA512 with DSA, RSA, and
ECDSA. 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], [RFC4055], [ECCADD], [RFC3278], and [RFC3370].
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 SHA224, HMAC
with SHA256, HMAC with SHA384, and HMAC with SHA512.
+ In CMS, the various algorithm identifiers use the AlgorithmIdentifier
+ syntax, which is included here for convenience:
+
+ AlgorithmIdentifier ::= SEQUENCE {
+ algorithm OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY algorithm OPTIONAL }
+
2. 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.
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 digest algorithm identifiers use the AlgorithmIdentifier syntax
+ elaborated upon in Section 1.
The algorithm field is discussed in Sections 2.12.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
@@ 130,109 +133,112 @@
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. SHA224
 The SHA224 message digest algorithm is defined in [RFC3874]. The
+ The SHA224 message digest algorithm is defined in [SHS]. The
algorithm identifier for SHA224 is:
idsha224 OBJECT IDENTIFIER ::= {
jointisoitut(2) country(16) us(840) organization(1) gov(101)
csor(3) nistalgorithm(4) hashalgs(2) 4 }
The parameters are as specified in Section 2.
2.2. SHA256
 The SHA256 message digest algorithm is defined in [SHA2]. The
+ The SHA256 message digest algorithm is defined in [SHS]. The
algorithm identifier for SHA256 is:
idsha256 OBJECT IDENTIFIER ::= {
jointisoitut(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. SHA384
 The SHA384 message digest algorithm is defined in [SHA2]. The
+ The SHA384 message digest algorithm is defined in [SHS]. The
algorithm identifier for SHA384 is:
idsha384 OBJECT IDENTIFIER ::= {
jointisoitut(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. SHA512
 The SHA256 message digest algorithm is defined in [SHA2]. The
+ The SHA256 message digest algorithm is defined in [SHS]. The
algorithm identifier for SHA512 is:
idsha512 OBJECT IDENTIFIER ::= {
jointisoitut(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. Signature Algorithms
This section specifies the conventions employed by CMS
 implementations that support DSA [FIPS1863], ECDSA [X9.62], and RSA
+ implementations that support DSA [DSS], ECDSA [X9.62], and RSA
[RFC2313] with SHA2 algorithms.
Signature algorithm identifiers are located in the SignerInfo
signatureAlgorithm field of SignedData. Also, signature algorithm
identifiers are located in the SignerInfo signatureAlgorithm field of
countersignature attributes.
Signature values are located in the SignerInfo signature field of
SignedData. Also, signature values are located in the SignerInfo
signature field of countersignature attributes.
3.1. DSA
+ NOTE [to be removed upon publication as an RFC]: NIST has not yet
+ finalized FIPS 1863 and there is a chance that the draft may be
+ changed. This may result in differences between what is documented
+ in the current version of this document and what is in the FIPS. It
+ is intended to synchronize the final version of this draft with the
+ FIPS before publication as an RFC.
 NOTE: NIST has not finalized FIPS 1863 and there is a chance that
 the draft may be changed. This may result in differences between
 what is documented here and what is in the FIPS.
+3.1. DSA
[RFC3370] section 3.1 specifies the conventions for DSA with SHA1
public key algorithm identifiers, parameters, public keys, and
 signature values. DSA with SHA2 algorithms use the same conventions
+ signature values. DSA with SHA2 algorithms uses the same conventions
for these public key algorithm identifiers, parameters, public keys,
and signature values. DSA MAY be used with SHA224 and SHA256.
The algorithm identifier for DSA with SHA224 signature values is:
iddsawithsha224 OBJECT IDENTIFIER ::= { jointisoccitt(2)
country(16) us(840) organization(1) gov(101) csor(3)
algorithms(4) iddsawithsha2(3) 1 }
The algorithm identifier for DSA with SHA224 signature values is:
iddsawithsha256 OBJECT IDENTIFIER ::= { jointisoccitt(2)
country(16) us(840) organization(1) gov(101) csor(3)
algorithms(4) iddsawithsha2(3) 2 }
 When either of these algorithm identifiers are used, the
+ When either of these algorithm identifiers is used, the
AlgorithmIdentifier parameters field MUST be absent.
3.2. RSA
[RFC3370] section 3.2 specifies the conventions for RSA with SHA1
(PKCS #1 v1.5) public key algorithm identifiers, parameters, public
 keys, and signature values. RSA with SHA2 algorithms use the same
+ keys, and signature values. RSA with SHA2 algorithms uses the same
conventions for these public key algorithm identifiers, parameters,
public keys, and signature values. RSA (PKCS #1 v1.5) MAY be used
with SHA224, SHA256, SHA384, or SHA512.
The object identifier for RSA with SHA224 signature values is:
sha224WithRSAEncryption OBJECT IDENTIFIER ::= { iso(1)
memberbody(2) us(840) rsadsi(113549) pkcs(1) pkcs1(1) 14 }
The object identifier for RSA with SHA256 signature values is:
@@ 251,31 +257,32 @@
memberbody(2) us(840) rsadsi(113549) pkcs(1) pkcs1(1) 13 }
When any of these four object identifiers appears within an
AlgorithmIdentifier, the parameters MUST be NULL. Implementations
MUST accept the parameters being absent as well as present.
3.3. ECDSA
[RFC3278] section 2.1 specifies the conventions for ECDSA with SHA1
public key algorithm identifiers, parameters, public keys, and
 signature values. ECDSA with SHA2 algorithms use the same conventions
 for these public key algorithm identifiers, parameters, public keys,
 and signature values, except that the digestAlgorithm MUST include
 the corresponding message digest algorithm identifier not sha1
 object identifier. ECDSA MAY be used with SHA224, SHA256, SHA384,
 or SHA512.
+ signature values. ECDSA with SHA2 algorithms uses the same
+ conventions for these public key algorithm identifiers, parameters,
+ public keys, and signature values, except that the digestAlgorithm
+ MUST include the corresponding message digest algorithm identifier,
+ and not sha1 object identifier. ECDSA MAY be used with SHA224,
+ SHA256, SHA384, or SHA512.
The algorithm identifier for ECDSA with SHA224 signature values is:
ecdsawithSHA224 OBJECT IDENTIFIER ::= { iso(1) memberbody(2)
us(840) ansiX962(10045) signatures(4) ecdsawithSHA2(3) 1 }
+
The algorithm identifier for ECDSA with SHA256 signature values is:
ecdsawithSHA256 OBJECT IDENTIFIER ::= { iso(1) memberbody(2)
us(840)ansiX962(10045) signatures(4) ecdsawithSHA2(3) 2 }
The algorithm identifier for ECDSA with SHA384 signature values is:
ecdsawithSHA384 OBJECT IDENTIFIER ::= { iso(1) memberbody(2)
us(840) ansiX962(10045) signatures(4) ecdsawithSHA2(3) 3 }
@@ 300,22 +307,22 @@
6. References
6.1. Normative References
[ECCADD] Dang, S., Santesson, S., Moriarty, K., and Brown,
"Internet X.509 Public Key Infrastructure: Additional
Algorithms and Identifiers for DSA and ECDSA", workin
progress.
 [FIPS1863] Federal Information Processing Standards Publication
 (FIPS PUB) 1803, Secure Hash Standard (SHS), July 2007.
+ [DSS] Federal Information Processing Standards Publication
+ (FIPS PUB) 1863, Secure Hash Standard (SHS), July 2007.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119. March 1997.
[RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC
2313, March 1998.
[RFC3278] BlakeWilson, S., Brown, D., and P. Lambert, "Use of
Elliptic Curve Cryptography (ECC) Algorithms in
Cryptographic Message Syntax (CMS)", RFC 3278, April
@@ 332,23 +339,22 @@
[RFC3874] Housley, R., "A 224bit One Way Hash Function: SHA224",
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 1802: Secure Hash Standard, 1 August
 2002.
+ [SHS] National Institute of Standards and Technology (NIST),
+ FIPS Publication 1803: Secure Hash Standard, June 2007.
[X9.62] X9.622005, "Public Key Cryptography for the Financial
Services Industry: The Elliptic Curve Digital Signature
Standard (ECDSA)", November, 2005.
6.2. Informative References
[RFC4231] Nystrom, A. "Identifiers and Test Vectors for HMACSHA
224, HMACSHA256, HMACSHA384, and HMACSHA512",
RFC4231. December 2005.