draft-ietf-smime-pss-03.txt   rfc4056.txt 
S/MIME Working Group J Schaad Network Working Group J. Schaad
Internet Draft Soaring Hawk Consulting Request for Comments: 4056 Soaring Hawk Consulting
Document: draft-ietf-smime-pss-03.txt December 2003 Category: Standards Track June 2005
Category: Standards
Use of the RSA PSS Signature Algorithm in CMS
Status of this Memo
This document is an Internet-Draft and is in full conformance with Use of the RSASSA-PSS Signature Algorithm
all provisions of Section 10 of RFC2026 [1]. in Cryptographic Message Syntax (CMS)
Internet-Drafts are working documents of the Internet Engineering Status of This Memo
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 This document specifies an Internet standards track protocol for the
http://www.ietf.org/ietf/1id-abstracts.txt Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
The list of Internet-Draft Shadow Directories can be accessed at Copyright Notice
http://www.ietf.org/shadow.html.
Comments or suggestions for improvement may be made on the "ietf- Copyright (C) The Internet Society (2005).
smime" mailing list, or directly to the author.
Abstract Abstract
This document specifies the conventions for using the RSA
Probabilistic Signature Scheme (RSASSA-PSS) digital signature
algorithm with the Cryptographic Message Syntax (CMS).
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 RFC 2119
[STDWORDS].
1. Overview
This document specifies the conventions for using the RSASSA-PSS (RSA This document specifies the conventions for using the RSASSA-PSS (RSA
Probabilistic Signature Scheme) digital signature algorithm with the
Cryptographic Message Syntax (CMS).
Signature Scheme with Appendix - Probabilistic Signature Scheme) 1. Overview
[P1v2.1] digital signature algorithm with the Cryptographic Message
Syntax [CMS] signed-data content type.
Schaad Standards - Exp: August 2004 1 This document specifies the conventions for using the RSA
CMS and PSS Signature December 2003 Probabilistic Signature Scheme (RSASSA-PSS) [P1v2.1] digital
signature algorithm with the Cryptographic Message Syntax [CMS]
signed-data content type.
CMS values are generated using ASN.1 [X.208-88], using the Basic CMS values are generated using ASN.1 [X.208-88], using the Basic
Encoding Rules (BER) [X.209-88] and the Distinguished Encoding Rules Encoding Rules (BER) [X.209-88] and the Distinguished Encoding Rules
(DER) [X.509-88]. (DER) [X.509-88].
This document is written to be used in conjunction with RFC XXX [RSA- This document is written to be used in conjunction with RFC 4055
ALGS]. All of the ASN.1 structures referenced in this document are [RSA-ALGS]. All of the ASN.1 structures referenced in this document
defined in RFC XXX. are defined in RFC 4055.
1.1 PSS Algorithm 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 RFC 2119 [STDWORDS].
1.1. PSS Algorithm
Although there are no known defects with the PKCS #1 v1.5 [P1v1.5] Although there are no known defects with the PKCS #1 v1.5 [P1v1.5]
signature algorithm, RSASSA-PSS [P1v2.1] was developed in an effort signature algorithm, RSASSA-PSS [P1v2.1] was developed in an effort
to have more mathematically provable security. PKCS #1 v1.5 to have more mathematically provable security. PKCS #1 v1.5
signatures were developed in an ad hoc manner, RSASSA-PSS was signatures were developed in an ad hoc manner; RSASSA-PSS was
developed based on mathematical foundations. developed based on mathematical foundations.
2. Algorithm Identifiers and Parameters 2. Algorithm Identifiers and Parameters
2.1 Certificate Identifiers 2.1. Certificate Identifiers
The RSASSA-PSS signature algorithm is defined in RFC 3447 [P1v2.1]. The RSASSA-PSS signature algorithm is defined in RFC 3447 [P1v2.1].
Conventions for encoding the public key are defined in RFC XXX [RSA- Conventions for encoding the public key are defined in RFC 4055
ALGS]. [RSA-ALGS].
Two algorithm identifiers for RSA subject public keys in Two algorithm identifiers for RSA subject public keys in certificates
certificates are used. These are: are used. These are:
rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }
and and
id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 }
When the rsaEncryption algorithm identifier is used for a public When the rsaEncryption algorithm identifier is used for a public key,
key, the AlgorithmIdentifier parameters field MUST contain NULL. the AlgorithmIdentifier parameters field MUST contain NULL. Complete
Complete details can be found in [RSA-ALGS]. details can be found in [RSA-ALGS].
When the id-RSASSA-PSS algorithm identifier is used for a public When the id-RSASSA-PSS algorithm identifier is used for a public key,
key, the AlgorithmIdentifier parameters field MUST either be absent the AlgorithmIdentifier parameters field MUST either be absent or
or contain RSASSA-PSS-params. Again, complete details can be found contain RSASSA-PSS-params. Again, complete details can be found in
in [RSA-ALGS]. [RSA-ALGS].
In both cases, the RSA public key, which is composed of a modulus In both cases, the RSA public key, which is composed of a modulus and
and a public exponent, MUST be encoded using the RSAPublicKey type. a public exponent, MUST be encoded using the RSAPublicKey type. The
The output of this encoding is carried in the certificate subject output of this encoding is carried in the certificate subject public
public key. key.
RSAPublicKey ::= SEQUENCE { RSAPublicKey ::= SEQUENCE {
modulus INTEGER, -- n modulus INTEGER, -- n
publicExponent INTEGER } -- e publicExponent INTEGER } -- e
2.2 Signature Identifiers 2.2. Signature Identifiers
Schaad Standards - Exp: August 2004 2
CMS and PSS Signature December 2003
The algorithm identifier for RSASAA-PSS signatures is: The algorithm identifier for RSASAA-PSS signatures is:
id-RSASSA-PSS OBJECT IDENTIFER ::= {pkcs-1 10 } id-RSASSA-PSS OBJECT IDENTIFIER ::= {pkcs-1 10 }
When the id-RSASSA-PSS algorithm identifier is used for a signature, When the id-RSASSA-PSS algorithm identifier is used for a signature,
the AlgorithmIdentifier parameters field MUST contain RSASSA-PSS- the AlgorithmIdentifier parameters field MUST contain RSASSA-PSS-
params. Information about RSASSA-PSS-params can be found in [RSA- params. Information about RSASSA-PSS-params can be found in [RSA-
ALGS]. ALGS].
When signing, the RSA algorithm generates a single value, and that When signing, the RSA algorithm generates a single value, and that
value is used directly as the signature value. value is used directly as the signature value.
3. Signed-data Conventions 3. Signed-data Conventions
digestAlgorithms SHOULD contain the one-way hash function used to digestAlgorithms SHOULD contain the one-way hash function used to
compute the message digest on the eContent value. compute the message digest on the eContent value.
The same one-way hash function SHOULD be used for computing the The same one-way hash function SHOULD be used for computing the
message digest on both the eContent and the signedAttributes value message digest on both the eContent and the signedAttributes value if
if signedAttributes exist. signedAttributes exist.
The same one-way hash function MUST be used for computing the The same one-way hash function MUST be used for computing the message
message digest on the signedAttributes and as the hashAlgorithm in digest on the signedAttributes and as the hashAlgorithm in the RSA-
the RSA-PSS-params structure. PSS-params structure.
signatureAlgorithm MUST contain id-RSASSA-PSS. The algorithm signatureAlgorithm MUST contain id-RSASSA-PSS. The algorithm
parameters field MUST contain RSASSA-PSS-params. parameters field MUST contain RSASSA-PSS-params.
signature contains the single value resulting from the signing signature contains the single value resulting from the signing
operation. operation.
If the subjectPublicKeyInfo algorithm identifier for the public key If the subjectPublicKeyInfo algorithm identifier for the public key
in the certificate is id-RSASSA-PSS and the parameters field is in the certificate is id-RSASSA-PSS and the parameters field is
present, the following additional steps MUST be done as part of present, the following additional steps MUST be done as part of
skipping to change at line 151 skipping to change at page 3, line 46
operation. operation.
If the subjectPublicKeyInfo algorithm identifier for the public key If the subjectPublicKeyInfo algorithm identifier for the public key
in the certificate is id-RSASSA-PSS and the parameters field is in the certificate is id-RSASSA-PSS and the parameters field is
present, the following additional steps MUST be done as part of present, the following additional steps MUST be done as part of
signature validation: signature validation:
1. The hashAlgorithm field in the certificate 1. The hashAlgorithm field in the certificate
subjectPublicKey.algorithm parameters and the signatureAlgorithm subjectPublicKey.algorithm parameters and the signatureAlgorithm
parameters MUST be the same. parameters MUST be the same.
2. The maskGenAlgorithm field in the certificate 2. The maskGenAlgorithm field in the certificate
subjectPublicKey.algorithm parameters and the signatureAlgorithm subjectPublicKey.algorithm parameters and the signatureAlgorithm
parameters MUST be the same. parameters MUST be the same.
3. The saltLength in the signatureAlgorithm parameters MUST be 3. The saltLength in the signatureAlgorithm parameters MUST be
greater or equal to the saltLength in the certificate greater or equal to the saltLength in the certificate
subjectPublicKey.algorithm parameters. subjectPublicKey.algorithm parameters.
4. The trailerField in the certificate subjectPublicKey.algorithm 4. The trailerField in the certificate subjectPublicKey.algorithm
parameters and signatureAlgorithm parameters MUST be the same. parameters and signatureAlgorithm parameters MUST be the same.
In doing the above comparisons, default values are considered to be In doing the above comparisons, default values are considered to be
the same as extant values. If any of the above four steps is not the same as extant values. If any of the above four steps is not
true, the signature checking algorithm MUST fail validation. true, the signature checking algorithm MUST fail validation.
Schaad Standards - Exp: August 2004 3
CMS and PSS Signature December 2003
4. Security Considerations 4. Security Considerations
Implementations must protect the RSA private key. Compromise of the Implementations must protect the RSA private key. Compromise of the
RSA private key may result in the ability to forge signatures. RSA private key may result in the ability to forge signatures.
The generation of RSA private key relies on random numbers. The use The generation of RSA private key relies on random numbers. The use
of inadequate pseudo-random number generators (PRNGs) to generate of inadequate pseudo-random number generators (PRNGs) to generate
these values can result in little or no security. An attacker may these values can result in little or no security. An attacker may
find it much easier to reproduce the PRNG environment that produced find it much easier to reproduce the PRNG environment that produced
the keys, searching the resulting small set of possibilities, rather the keys, searching the resulting small set of possibilities, rather
skipping to change at line 196 skipping to change at page 4, line 43
#1 v1.5 and RSASSA-PSS signature algorithms. #1 v1.5 and RSASSA-PSS signature algorithms.
When computing signatures, the same hash function should be used for When computing signatures, the same hash function should be used for
all operations. This reduces the number of failure points in the all operations. This reduces the number of failure points in the
signature process. signature process.
The parameter checking procedures outlined in section 3 are of The parameter checking procedures outlined in section 3 are of
special importance. It is possible to forge signatures by changing special importance. It is possible to forge signatures by changing
(especially to weaker values) these parameter values. Signers using (especially to weaker values) these parameter values. Signers using
this algorithm should take care that only one set of parameter values this algorithm should take care that only one set of parameter values
is used as this decreases the possibility of leaking information. is used as this decreases the possibility of leaking information.
5. Normative References 5. Normative References
CMS Housley, R, "Cryptographic Message Syntax", [CMS] Housley, R., "Cryptographic Message Syntax (CMS)", RFC
RFC 3369, August 2002. 3852, July 2004.
P1v2.1 Jonsson, J., and B. Kaliski, "PKCS #1: RSA
Cryptography Specification Version 2.1",
RFC 3447, February 2003.
RSA-ALGS Schaad, J., B. Kaliski and R Housley, "Additional
Algorithms and Identifiers for RSA Cryptography
for use in the Internet X.509 Public Key
Infrastructure Certificate and Certificate
Revocation List (CRL) Profile",
draft-ietf-pkix-rsa-pkalgs-01.txt,
November 2003.
STDWORDS S. Bradner, "Key Words for Use in RFCs to [P1v2.1] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Indicate Requirement Levels", RFC 2119, March Standards (PKCS) #1: RSA Cryptography Specifications
1997. Version 2.1", RFC 3447, February 2003.
X.208-88 CCITT Recommendation X.208: Specification of [RSA-ALGS] Schaad, J., Kaliski, B., and R. Housley, "Additional
Abstract Syntax Notation One (ASN.1), 1998. Algorithms and Identifiers for RSA Cryptography for use
in the Internet X.509 Public Key Infrastructure
Certificate and Certificate Revocation List (CRL)
Profile", RFC 4055, June 2005.
Schaad Standards - Exp: August 2004 4 [STDWORDS] Bradner, S., "Key words for use in RFCs to Indicate
CMS and PSS Signature December 2003 Requirement Levels", BCP 14, RFC 2119, March 1997.
X.209-88 CCITT Recommendation X.209: Specification of [X.208-88] CCITT Recommendation X.208: Specification of Abstract
Basic Encoding Rules for Abstract Syntax Syntax Notation One (ASN.1), 1998.
Notation One (ASN.1), 1988.
X.509-88 CCITT Recommendation X.509: The Directory [X.209-88] CCITT Recommendation X.209: Specification of Basic
Authentication Framework, 1988. Encoding Rules for Abstract Syntax Notation One (ASN.1),
1988.
6. Informational References [X.509-88] CCITT Recommendation X.509: The Directory Authentication
Framework, 1988.
P1v1.5 Kaliski, B. and J. Staddon, "PKCS #1: RSA Encryption, 6. Informative References
Version 2.0, RFC 2437, October 1998.
PKALGS Polk, W, R Housley, L. Bassham, "Algorithms and Identifiers [P1v1.5] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC
for the Internet X.509 Public Key Infrastructure 2313, March 1998.
Certificate and Certificate Revocation List (CRL) Profile",
RFC 3279, April 2002.
RANDOM Eastlake, D., S. Crocker and J. Schiller [RANDOM] Eastlake 3rd, D., Crocker, S., and J. Schiller,
"Randomness Recommendations for Security", "Randomness Recommendations for Security", RFC 1750,
RFC 1750, December 1994. December 1994.
7. Author's Address Author' Address
Jim Schaad Jim Schaad
Soaring Hawk Consulting Soaring Hawk Consulting
PO Box 675 PO Box 675
Gold Bar, WA 98251 Gold Bar, WA 98251
Email: jimsch@exmsft.com EMail: jimsch@exmsft.com
Full Copyright Statement Full Copyright Statement
"Copyright (C) The Internet Society (2003). All Rights Reserved. Copyright (C) The Internet Society (2005).
This document and translations of it may be copied and furnished to This document is subject to the rights, licenses and restrictions
others, and derivative works that comment on or otherwise explain it contained in BCP 78, and except as set forth therein, the authors
or assist in its implementation may be prepared, copied, published retain all their rights.
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph
are included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be This document and the information contained herein are provided on an
revoked by the Internet Society or its successors or assigns. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY 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.
Schaad Standards - Exp: August 2004 5 Intellectual Property
CMS and PSS Signature December 2003
Schaad Standards - Exp: August 2004 6 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.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
 End of changes. 

This html diff was produced by rfcdiff 1.25, available from http://www.levkowetz.com/ietf/tools/rfcdiff/