Network Working Group J. Schaad
Internet-Draft Soaring Hawk Consulting
Intended status: Informational November 19, 2010
Expires: May 23, 2011
S/MIME Capabilities for Public Key Definitions
draft-ietf-pkix-pubkey-caps-00
Abstract
This document defines a set of S/MIME Capability types for ASN.1
encoding for the current set of public keys define in the PKIX
working group.
Status of this Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
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."
This Internet-Draft will expire on May 23, 2011.
Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Schaad Expires May 23, 2011 [Page 1]
Internet-Draft PubKey Caps November 2010
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Notation . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. RSA Public Keys . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. Generic RSA Public Keys . . . . . . . . . . . . . . . . . 5
2.2. RSASSA-PSS Signature Public Keys . . . . . . . . . . . . . 6
3. Diffie-Hellman Keys . . . . . . . . . . . . . . . . . . . . . 7
3.1. Diffie-Hellman Signature Public Key . . . . . . . . . . . 7
4. Elliptical Curve Keys . . . . . . . . . . . . . . . . . . . . 9
4.1. Generic Elliptical Curve Keys . . . . . . . . . . . . . . 9
5. RSASSA-PSS Signature Algorithm Capability . . . . . . . . . . 10
6. Security Considerations . . . . . . . . . . . . . . . . . . . 12
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.1. Normative References . . . . . . . . . . . . . . . . . . . 14
8.2. Informative References . . . . . . . . . . . . . . . . . . 14
Appendix A. 2008 ASN.1 Module . . . . . . . . . . . . . . . . . . 15
Appendix B. Future Work . . . . . . . . . . . . . . . . . . . . . 18
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 19
Schaad Expires May 23, 2011 [Page 2]
Internet-Draft PubKey Caps November 2010
1. Introduction
In the process of dealing with the OCSP agility issues in
[I-D.ietf-pkix-ocspagility] it was noted that we really wanted to
describe some information to be used in selecting a public key, but
we did not currently have any way of doing so at the current time.
This document fills that hole by defining a set of S/MIME Capability
types for a small set of public key representations.
1.1. Notation
The main body of the text is written using snippets of ASN.1 that are
extracted from the ASN.1 2008 module in Appendix A. This is because
I am a strong advocate of moving the current versions of ASN.1 as
they can contain meta-data which is not representable in the 1988
version of ASN.1. In keeping with the current policy of the PKIX
working group, the 1988 module is still to be considered the
normative module in the event of a conflict between the contents of
the two modules.
When reading this document, it is assumed that you will have a degree
of familiarity with tthe basic object module that is presented in
section 3 of RFC 5912 ([RFC5912]). We use the SMIME-CAPS object in
this document, it assoicates two fields together in a single object.
SMIME-CAPS ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
&Type OPTIONAL
}
WITH SYNTAX { [TYPE &Type] IDENTIFIED BY &id }
These fields are:
&id contains an object identifier. When placed in an objet set,
this element is tagged so that no two elements can be placed in
the set that have the same value in the &id field.
&Type optionally contains an ASN.1 type identifier. If the field
&Type is not defined then the optional parameters field of the
AlgorithmIdentifier type would be omitted.
The class also has a specialized syntax for how to define an object
in this class. The all upper case fields TYPE IDENTIFIER and BY are
syntaxtic sugar to make it easier to read and identify what pieces
are manditory and which are optional.
One of the things that can be done is to reference the fields of an
object while defining other objects. This means that if an object
Schaad Expires May 23, 2011 [Page 3]
Internet-Draft PubKey Caps November 2010
call foo has a field name &value, the same value can be directly
referenced as foo.&value. This means that we would automatically get
any updates to values or types and we do not need to do any
replication of the data.
Schaad Expires May 23, 2011 [Page 4]
Internet-Draft PubKey Caps November 2010
2. RSA Public Keys
There are currently three different public key object identifiers for
RSA public keys. These are RSA, RSA-OCSP and RSA-PSS.
2.1. Generic RSA Public Keys
Almost all RSA keys that are contained in certificates today use the
generic RSA public key format and identifier. This allows for the
public key to be used both for key transport and for signature
validation (assuming it is compatible with the bits in the key usage
extension). The only reason for using one of more specific public
key identifiers is if the user wants to restrict the usage of the RSA
public key with a specific algorithm.
For the generic RSA public key, the S/MIME capibility that is
advertised is a request for a specific key size to be used. This
would normally be used for dealing with a request on the key to be
used for a signature that the client would then verify. In general
the user would provide a specific key when a key transport algorithm
is being considered.
The ASN.1 that is used for the generic RSA public key is defined as
below:
scap-pk-rsa SMIME-CAPS ::= {
TYPE RSAKeyCapabilities
IDENTIFIED BY pk-rsa.&id
}
RSAKeyCapabilities ::= SEQUENCE {
minKeySize RSAKeySize,
maxKeySize RSAKeySize OPTIONAL
}
RSAKeySize ::= INTEGER (1024 | 2048 | 3072 | 7680 | 15360)
From the above we can see that:
o We use the same object identifer as the public key to identify the
S/MIME capability field.
o We define a new type RSAKeyCapabilities that is used as the type
field for the S/MIME capability.
For the structure RSAKeyCapabilities, the fields are used as follows:
Schaad Expires May 23, 2011 [Page 5]
Internet-Draft PubKey Caps November 2010
minKeySize contains the minimum length of the RSA modulus to be
used.
maxKeySize contains the maximum length of the RSA modules that
should be used. If this field is absent then no maximum length is
requested/expected.
2.2. RSASSA-PSS Signature Public Keys
While most of the time one will use the generic RSA public key
identifier in a certificate, the RSA SSA-PSS identifier can be used
if the owner of the key desires to restrict the usage of the key to
just this algorithm.
The ASN.1 that is used for the RSA SSA-PSS public key is defined
below:
scap-pk-rsaSSA-PSS SMIME-CAPS ::= {
TYPE RSAKeyCapabilities
IDENTIFIED BY pk-rsaSSA-PSS.&id
}
From the above we can see that:
o We use the same object identifier as the public key to identify
the S/MIME capability field.
o We use the same type for the S/MIME capability as is used above
for the generic RSA public key.
Schaad Expires May 23, 2011 [Page 6]
Internet-Draft PubKey Caps November 2010
3. Diffie-Hellman Keys
There is current two Diffie-Hellman public key object identifiers.
These are DH and DSA.
3.1. Diffie-Hellman Signature Public Key
This public key type is used for the validation of DSA signatures.
The ASN.1 that is used for DSA keys is defined below:
scap-pk-dsa ::= {
TYPE DSAKeyCapabilities
IDENTIFIED BY pk-dsa.&id
}
DSAKeyCapabilites ::= CHOICE {
keySizes [0] SEQUENCE {
minKeySize DSAKeySize,
maxKeySize DSAKeySize OPTIONAL
},
keyParams [1] pk-dsa.&Type
}
DSAKeySize ::= INTEGER (1024 | 2048 | 3072 | 7680 | 15360 )
From the above we can see that:
o We use the same object identifer as the public key to identify the
S/MIME capability field.
o We define a new type DSAKeyCapabilities that is used as the type
field for the S/MIME capability.
For the structure DSAKeyCapabilities, the fields are used as follows:
keySizes is used when only a key size is needed to be specified and
not a specific group. It is expected that ths would be the most
commonly used of the two options. In key sizes the fields are
used as follows:
minKeySize contains the minimum length of the DSA modulus to be
used.
maxKeySize contains the maximum length of the DSA modules that
should be used. If this field is absent then no maximum length
is requested/expected.
Schaad Expires May 23, 2011 [Page 7]
Internet-Draft PubKey Caps November 2010
keyParams contains the exact set of DSA for the key used to sign the
message.
NOTE: In the original discussions the option keyParams would not have
existed in this structure, and they may not exist in a future version
of the structure. The issue is that we really only need to have the
key size fields, but there seems to be a mis-match between this
structure and that used for ECC where we don't specify anything about
key sizes, but do specify the exact group to be used. We should
probably have a discussion about rationalizing these together.
Schaad Expires May 23, 2011 [Page 8]
Internet-Draft PubKey Caps November 2010
4. Elliptical Curve Keys
There are currently three Eliptical Curve public key object
identifiers. These are EC, EC-DH and EC-MQV
4.1. Generic Elliptical Curve Keys
All most all ECC keys that are contained in certificates today use
the generic ECC public key format and identifier. This allows for
the public key to be used both for key agreement and for signature
validation (assuming the appropriate bits are in the certificate).
The only reason for using one of the more specific public key
identifier is if the user wants to restrict the usage of the ECC
public key with a specific algorithm.
For the generic ECC public key, the S/MIME capability that is
advertized is a request for a specific group to be used.
The ASN.1 that is used for the generic ECC public key is defined as
below:
scap-pk-ec SMIME-CAPS ::= {
TYPE pk-ec.&Type
IDENTIFIED BY pk-ec.&id
}
From the above we can see that:
o We use the same object identifier as the public key to identify
the S/MIME capability field.
o We use the same data type for the S/MIME capability as is used for
the public key.
Schaad Expires May 23, 2011 [Page 9]
Internet-Draft PubKey Caps November 2010
5. RSASSA-PSS Signature Algorithm Capability
This document defines a new S/MIME Capability for the RSA-SSA-PSS
signature algorithm. THere already exists one in [RFC4055] where the
parameters field is not used.
When the S/MIME group defined a S/MIME Capability for the RSA-SSA-PSS
signature algorithm, it was done so in the context of how S/MIME
defines and uses S/MIME Capabilities. When placed in an S/MIME
message [RFC3851] or in a certificate [RFC4262] it is always placed
in a sequence of capabilities. This meant that one can place the
identifier for RSA-SSA-PSS in the sequence along with the identifier
for MD5, SHA-1 and SHA-256. The assumption was then made that one
could compute the matrix of all answers and the publisher would
support all elements in the matrix. This has the possiblity that the
publisher could accendently publish a point in the matrix that is not
actually supported.
In this situation, there is only a single item that is published.
This means that we need to publish all of the assoicated information
along with the identifier for the signature algorrithm in a single
entity. For this reason we now define a new parameter type to be
used as the S/MIME capaiblity type which contains a hash identifier
and a mask identifier. The actual ASN.1 used for this is as follows:
scap-sa-rsaSSA-PSS SMIME-CAPS ::= {
TYPE RsaSsa-Pss-sig-caps
IDENTIFIED BY sa-rsaSSA-PSS.&id
}
RsaSsa-Pss-sig-caps ::= SEQUENCE {
hashAlg SMimeCapability{ HashAlgorithmSet },
maskAlg SMimeCapability{ MaskAlgorithmSet },
trailerField INTEGER DEFAULT 1
}
From the above we can see that:
o We use the same object identifier as the public key to identify
the S/MIME capability field.
o We define a new type RsaSsa-Pss-sig-caps which contains the
information that needs to defined to describe a specific instance
of the signature algorithm.
For the type RsaSsa-Pss-sig-caps, the fields are used as follows:
Schaad Expires May 23, 2011 [Page 10]
Internet-Draft PubKey Caps November 2010
hashAlg contains the S/MIME capability for the hash algorithm we are
declaring we support with the RSA-SSA-PSS signature algorithm.
maskAlg contains the S/MIME capability for the mask algorithm we are
declaring we support with the RSA-SSA-PSS signature algorithm.
trailerField specifies which trailer field algorithm is being
supported. This MUST be the value 1.
NOTE: In at least one iteration of the design we used a sequence of
hash identifiers and a sequence of masking functions and again made
the assumption that entire matrix would be supported. This has been
removed at this point since the original intent of S/MIME
capabilities is that one should be able to do a binary comparison of
the DER encoding of the field and determine a specific capability was
published. We could return back to using the sequence if we wanted
to lose the ability to do a binary compare but needed to shorten the
encodings. This does not currently appear to be an issue at this
point.
Schaad Expires May 23, 2011 [Page 11]
Internet-Draft PubKey Caps November 2010
6. Security Considerations
To Be Supplied.
Schaad Expires May 23, 2011 [Page 12]
Internet-Draft PubKey Caps November 2010
7. IANA Considerations
This document has no IANA considerations.
Schaad Expires May 23, 2011 [Page 13]
Internet-Draft PubKey Caps November 2010
8. References
8.1. Normative References
[RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and
Identifiers for the Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 3279, April 2002.
[RFC3370] Housley, R., "Cryptographic Message Syntax (CMS)
Algorithms", RFC 3370, August 2002.
[RFC4055] Schaad, J., Kaliski, B., 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", RFC 4055,
June 2005.
[RFC5912] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the
Public Key Infrastructure Using X.509 (PKIX)", RFC 5912,
June 2010.
8.2. Informative References
[I-D.ietf-pkix-ocspagility]
Hallam-Baker, P. and S. Santesson, "OCSP Algorithm
Agility", draft-ietf-pkix-ocspagility-08 (work in
progress), March 2010.
[RFC3851] Ramsdell, B., "Secure/Multipurpose Internet Mail
Extensions (S/MIME) Version 3.1 Message Specification",
RFC 3851, July 2004.
[RFC4262] Santesson, S., "X.509 Certificate Extension for Secure/
Multipurpose Internet Mail Extensions (S/MIME)
Capabilities", RFC 4262, December 2005.
Schaad Expires May 23, 2011 [Page 14]
Internet-Draft PubKey Caps November 2010
Appendix A. 2008 ASN.1 Module
PUBLIC-KEY-SMIME-CAPIBLITIES --TBD Add module number--
DEFINITIONS ::=
BEGIN
SMIME-CAPS, PUBLIC-KEY
FROM AlgoritrithmInformation-2009
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0)
id-mod-algorithmInformation-02(58)}
pk-rsa, pk-dsa, pk-dh, pk-ec, pk-edDH, pk-ecMQV
FROM PKIXAlgs-2009 { iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-algorithms2008-02(56) }
pk-rsaSSA-PSS, pk-rsaES-OAEP, sa-rsaSSA-PSS
FROM PKIX1-PSS-OAEP-Algorithms-2009
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0) id-mod-pkix1-rsa-pkalgs-02(54)}
;
--
-- Define a set containing all of the S/MIME capabilties defined
-- by this document
--
SMimeCaps SMIME-CAPS ::= {
scap-pk-rsa | scap-pk-rsaSSA-PSS |
scap-pk-dsa |
scap-pk-ec | scap-pk-ecDH |
scap-sa-rsaSSA-PSS
}
--
-- We defined RSA keys from the modules RFC3279 and
--
scap-pk-rsa SMIME-CAPS ::= {
TYPE RSAKeyCapabilities
IDENTIFIED BY pk-rsa.&id
}
RSAKeyCapabilities ::= SEQUENCE {
minKeySize RSAKeySize,
maxKeySize RSAKeySize OPTIONAL
}
Schaad Expires May 23, 2011 [Page 15]
Internet-Draft PubKey Caps November 2010
RSAKeySize ::= INTEGER (1024 | 2048 | 3072 | 7680 | 15360)
scap-pk-rsaES-OAEP SMIME-CAPS ::= {
TYPE NULL
IDENTIFIED BY pk-rsaES-OAEP.&id
}
scap-pk-rsaSSA-PSS SMIME-CAPS ::= {
TYPE RSAKeyCapabilities
IDENTIFIED BY pk-rsaSSA-PSS.&id
}
scap-sa-rsaSSA-PSS SMIME-CAPS ::= {
TYPE RsaSsa-Pss-sig-caps
IDENTIFIED BY sa-rsaSSA-PSS.&id
}
RsaSsa-Pss-sig-caps ::= SEQUENCE {
hashAlg SMimeCapability{ HashAlgorithmSet },
maskAlg SMimeCapability{ MaskAlgorithmSet },
trailerField INTEGER DEFAULT 1
}
--
-- we define DH/DSA keys from the module RFC3279
--
scap-pk-dsa ::= {
TYPE DSAKeyCapabilities
IDENTIFIED BY pk-dsa.&id
}
DSAKeyCapabilites ::= CHOICE {
keySizes [0] SEQUENCE {
minKeySize DSAKeySize,
maxKeySize DSAKeySize OPTIONAL
},
keyParams [1] pk-dsa.&Type
}
DSAKeySize ::= INTEGER (1024 | 2048 | 3072 | 7680 | 15360 )
scap-pk-dh ::= {
TYPE INTEGER
IDENTIFIED BY pk-dh.&id
}
Schaad Expires May 23, 2011 [Page 16]
Internet-Draft PubKey Caps November 2010
--
-- we define Eliptical Curve keys from the module RFC3279
--
scap-pk-ec SMIME-CAPS ::= {
TYPE pk-ec.&Type
IDENTIFIED BY pk-ec.&id
}
scap-pk-ecDH SMIME-CAPS ::= {
TYPE pk-ecDH.&Type
IDENTIFIED BY pk-ecDH.&id
}
scap-pk-ecMQV SMIME-CAPS ::= {
TYPE pk-ecMQV.&Type
IDENTIFIED BY pk-ecMQV.&id
}
END
Schaad Expires May 23, 2011 [Page 17]
Internet-Draft PubKey Caps November 2010
Appendix B. Future Work
A future revision of [RFC5912] should be done at some point which
expands the definition of the PUBLIC-KEY class and allows for an
S/MIME Capability to be included in the class defintion. This would
encourage people to think about this as an issue when defining new
public key structures in the future.
Schaad Expires May 23, 2011 [Page 18]
Internet-Draft PubKey Caps November 2010
Author's Address
Jim Schaad
Soaring Hawk Consulting
Email: jimsch@augustcellars.com
Schaad Expires May 23, 2011 [Page 19]