Network Working Group S. Josefsson
Internet-Draft October 14, 2004
Expires: April 14, 2005
Storing Certificates in the Domain Name System (DNS)
draft-josefsson-rfc2538bis-00
Status of this Memo
This document is an Internet-Draft and is subject to all provisions
of section 3 of RFC 3667. 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 become aware will be disclosed, in accordance with
RFC 3668.
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 April 14, 2005.
Copyright Notice
Copyright (C) The Internet Society (2004).
Abstract
Cryptographic public key are frequently published and their
authenticity demonstrated by certificates. A CERT resource record
(RR) is defined so that such certificates and related certificate
revocation lists can be stored in the Domain Name System (DNS).
More information on this document, including rfcdiff output, may be
found at .
Josefsson Expires April 14, 2005 [Page 1]
Internet-Draft Storing Certificates in the DNS October 2004
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. The CERT Resource Record . . . . . . . . . . . . . . . . . . . 3
2.1 Certificate Type Values . . . . . . . . . . . . . . . . . 4
2.2 Text Representation of CERT RRs . . . . . . . . . . . . . 5
2.3 X.509 OIDs . . . . . . . . . . . . . . . . . . . . . . . . 5
3. Appropriate Owner Names for CERT RRs . . . . . . . . . . . . . 6
3.1 X.509 CERT RR Names . . . . . . . . . . . . . . . . . . . 6
3.2 PGP CERT RR Names . . . . . . . . . . . . . . . . . . . . 7
4. Performance Considerations . . . . . . . . . . . . . . . . . . 8
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6. Security Considerations . . . . . . . . . . . . . . . . . . . 8
7. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 9
8. Changes since RFC 2538 . . . . . . . . . . . . . . . . . . . . 9
Author's Address . . . . . . . . . . . . . . . . . . . . . . . 10
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9
9.1 Normative References . . . . . . . . . . . . . . . . . . . . 9
9.2 Informative References . . . . . . . . . . . . . . . . . . . 10
A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10
Intellectual Property and Copyright Statements . . . . . . . . 12
Josefsson Expires April 14, 2005 [Page 2]
Internet-Draft Storing Certificates in the DNS October 2004
1. Introduction
Public keys are frequently published in the form of a certificate and
their authenticity is commonly demonstrated by certificates and
related certificate revocation lists (CRLs). A certificate is a
binding, through a cryptographic digital signature, of a public key,
a validity interval and/or conditions, and identity, authorization,
or other information. A certificate revocation list is a list of
certificates that are revoked, and incidental information, all signed
by the signer (issuer) of the revoked certificates. Examples are
X.509 certificates/CRLs in the X.500 directory system or OpenPGP
certificates/revocations used by OpenPGP software.
Section 2 below specifies a CERT resource record (RR) for the storage
of certificates in the Domain Name System.
Section 3 discusses appropriate owner names for CERT RRs.
Sections 4, 5, and 6 below cover performance, IANA, and security
considerations, respectively.
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 [11].
2. The CERT Resource Record
The CERT resource record (RR) has the structure given below. Its RR
type code is 37.
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| type | key tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| algorithm | /
+---------------+ certificate or CRL /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
The type field is the certificate type as define in section 2.1
below.
The algorithm field has the same meaning as the algorithm field in
DNSKEY and RRSIG RRs [10] except that a zero algorithm field
indicates the algorithm is unknown to a secure DNS, which may simply
be the result of the algorithm not having been standardized for
DNSSEC.
Josefsson Expires April 14, 2005 [Page 3]
Internet-Draft Storing Certificates in the DNS October 2004
The key tag field is the 16 bit value computed for the key embedded
in the certificate, using the RRSIG Key Tag Algorithm described in
Appendix B of [10]. This field is used as an efficiency measure to
pick which CERT RRs may be applicable to a particular key. The key
tag can be calculated for the key in question and then only CERT RRs
with the same key tag need be examined. However, the key must always
be transformed to the format it would have as the public key portion
of a DNSKEY RR before the key tag is computed. This is only possible
if the key is applicable to an algorithm (and limits such as key size
limits) defined for DNS security. If it is not, the algorithm field
MUST BE zero and the tag field is meaningless and SHOULD BE zero.
2.1 Certificate Type Values
The following values are defined or reserved:
Value Mnemonic Certificate Type
----- -------- ----------- ----
0 reserved
1 PKIX X.509 as per PKIX
2 SPKI SPKI certificate
3 PGP OpenPGP data packet
4-252 available for IANA assignment
253 URI URI private
254 OID OID private
255-65534 available for IANA assignment
65535 reserved
The PKIX type is reserved to indicate an X.509 certificate conforming
to the profile being defined by the IETF PKIX working group. The
certificate section will start with a one byte unsigned OID length
and then an X.500 OID indicating the nature of the remainder of the
certificate section (see 2.3 below). (NOTE: X.509 certificates do
not include their X.500 directory type designating OID as a prefix.)
The SPKI type is reserved to indicate a certificate formated as to be
specified by the IETF SPKI working group.
The PGP type indicates an OpenPGP data packet. Two uses are to
transfer public key material and revocation signatures. The data is
binary, and MUST NOT be encoded into an ASCII armor. Public keys can
use the OpenPGP public key packet (tag 6) or public subkey packet
(tag 14), as described in section 5.5 of [5]. Revocation signatures
can use an OpenPGP signature packet with a revocation signature type,
i.e., signature type 0x20, 0x28 or 0x30, as described in section 5.2
of [5].
The URI private type indicates a certificate format defined by an
Josefsson Expires April 14, 2005 [Page 4]
Internet-Draft Storing Certificates in the DNS October 2004
absolute URI. The certificate portion of the CERT RR MUST begin with
a null terminated URI [4] and the data after the null is the private
format certificate itself. The URI SHOULD be such that a retrieval
from it will lead to documentation on the format of the certificate.
Recognition of private certificate types need not be based on URI
equality but can use various forms of pattern matching so that, for
example, subtype or version information can also be encoded into the
URI.
The OID private type indicates a private format certificate specified
by a an ISO OID prefix. The certificate section will start with a
one byte unsigned OID length and then a BER encoded OID indicating
the nature of the remainder of the certificate section. This can be
an X.509 certificate format or some other format. X.509 certificates
that conform to the IETF PKIX profile SHOULD be indicated by the PKIX
type, not the OID private type. Recognition of private certificate
types need not be based on OID equality but can use various forms of
pattern matching such as OID prefix.
2.2 Text Representation of CERT RRs
The RDATA portion of a CERT RR has the type field as an unsigned
decimal integer or as a mnemonic symbol as listed in section 2.1
above.
The key tag field is represented as an unsigned decimal integer.
The algorithm field is represented as an unsigned decimal integer or
a mnemonic symbol as listed in [10].
The certificate / CRL portion is represented in base 64 [8] and may
be divided up into any number of white space separated substrings,
down to single base 64 digits, which are concatenated to obtain the
full signature. These substrings can span lines using the standard
parenthesis.
Note that the certificate / CRL portion may have internal sub-fields
but these do not appear in the master file representation. For
example, with type 254, there will be an OID size, an OID, and then
the certificate / CRL proper. But only a single logical base 64
string will appear in the text representation.
2.3 X.509 OIDs
OIDs have been defined in connection with the X.500 directory for
user certificates, certification authority certificates, revocations
of certification authority, and revocations of user certificates.
The following table lists the OIDs, their BER encoding, and their
Josefsson Expires April 14, 2005 [Page 5]
Internet-Draft Storing Certificates in the DNS October 2004
length prefixed hex format for use in CERT RRs:
id-at-userCertificate
= { joint-iso-ccitt(2) ds(5) at(4) 36 }
== 0x 03 55 04 24
id-at-cACertificate
= { joint-iso-ccitt(2) ds(5) at(4) 37 }
== 0x 03 55 04 25
id-at-authorityRevocationList
= { joint-iso-ccitt(2) ds(5) at(4) 38 }
== 0x 03 55 04 26
id-at-certificateRevocationList
= { joint-iso-ccitt(2) ds(5) at(4) 39 }
== 0x 03 55 04 27
3. Appropriate Owner Names for CERT RRs
It is recommended that certificate CERT RRs be stored under a domain
name related to their subject, i.e., the name of the entity intended
to control the private key corresponding to the public key being
certified. It is recommended that certificate revocation list CERT
RRs be stored under a domain name related to their issuer.
Following some of the guidelines below may result in the use in DNS
names of characters that require DNS quoting which is to use a
backslash followed by the octal representation of the ASCII code for
the character such as \000 for NULL.
3.1 X.509 CERT RR Names
Some X.509 versions permit multiple names to be associated with
subjects and issuers under "Subject Alternate Name" and "Issuer
Alternate Name". For example, x.509v3 has such Alternate Names with
an ASN.1 specification as follows:
GeneralName ::= CHOICE {
otherName [0] INSTANCE OF OTHER-NAME,
rfc822Name [1] IA5String,
dNSName [2] IA5String,
x400Address [3] EXPLICIT OR-ADDRESS.&Type,
directoryName [4] EXPLICIT Name,
ediPartyName [5] EDIPartyName,
uniformResourceIdentifier [6] IA5String,
iPAddress [7] OCTET STRING,
registeredID [8] OBJECT IDENTIFIER
}
Josefsson Expires April 14, 2005 [Page 6]
Internet-Draft Storing Certificates in the DNS October 2004
The recommended locations of CERT storage are as follows, in priority
order:
1. If a domain name is included in the identification in the
certificate or CRL, that should be used.
2. If a domain name is not included but an IP address is included,
then the translation of that IP address into the appropriate
inverse domain name should be used.
3. If neither of the above it used but a URI containing a domain
name is present, that domain name should be used.
4. If none of the above is included but a character string name is
included, then it should be treated as described for PGP names in
3.2 below.
5. If none of the above apply, then the distinguished name (DN)
should be mapped into a domain name as specified in [3].
Example 1: Assume that an X.509v3 certificate is issued to /CN=John
Doe/DC=Doe/DC=com/DC=xy/O=Doe Inc/C=XY/ with Subject Alternative
names of (a) string "John (the Man) Doe", (b) domain name john-
doe.com, and (c) uri . Then
the storage locations recommended, in priority order, would be
1. john-doe.com,
2. www.secure.john-doe.com, and
3. Doe.com.xy.
Example 2: Assume that an X.509v3 certificate is issued to /CN=James
Hacker/L=Basingstoke/O=Widget Inc/C=GB/ with Subject Alternate names
of (a) domain name widget.foo.example, (b) IPv4 address
10.251.13.201, and (c) string "James Hacker
". Then the storage locations
recommended, in priority order, would be
1. widget.foo.example,
2. 201.13.251.10.in-addr.arpa, and
3. hacker.mail.widget.foo.example.
3.2 PGP CERT RR Names
OpenPGP signed keys (certificates) use a general character string
User ID [5]. However, it is recommended by PGP that such names
include the RFC 2822 [7] email address of the party, as in "Leslie
Example ". If such a format is used, the CERT
should be under the standard translation of the email address into a
domain name, which would be leslie.host.example in this case. If no
RFC 2822 name can be extracted from the string name no specific
domain name is recommended.
If a user has more than one email address, the CNAME type can be used
to reduce the amount of data stored in the DNS. For example:
Josefsson Expires April 14, 2005 [Page 7]
Internet-Draft Storing Certificates in the DNS October 2004
$ORIGIN example.org.
smith IN CERT PGP 0 0
john.smith IN CNAME smith
js IN CNAME smith
For some applications, the above guidelines are not useful.
Applications that receive an OpenPGP packet but do not know the email
address of the sender will have difficulties guessing the correct
owner name. However, the OpenPGP packet typically contain the Key ID
of the key. Such applications can derive the owner name from the Key
ID using an Base 16 encoding [8]. For example:
$ORIGIN example.org.
F835EDA21E94B565716F IN CERT PGP ...
B565716F IN CNAME F835EDA21E94B565716F
Again, if the same key material is stored at several owner names,
using CNAME can be used to avoid data duplication.
4. Performance Considerations
Current Domain Name System (DNS) implementations are optimized for
small transfers, typically not more than 512 bytes including
overhead. While larger transfers will perform correctly and work is
underway to make larger transfers more efficient, it is still
advisable at this time to make every reasonable effort to minimize
the size of certificates stored within the DNS. Steps that can be
taken may include using the fewest possible optional or extensions
fields and using short field values for variable length fields that
must be included.
5. IANA Considerations
Certificate types 0x0000 through 0x00FF and 0xFF00 through 0xFFFF can
only be assigned by an IETF standards action [6]. This document
assigns 0x0001 through 0x0003 and 0x00FD and 0x00FE. Certificate
types 0x0100 through 0xFEFF are assigned through IETF Consensus [6]
based on RFC documentation of the certificate type. The availability
of private types under 0x00FD and 0x00FE should satisfy most
requirements for proprietary or private types.
6. Security Considerations
By definition, certificates contain their own authenticating
signature. Thus it is reasonable to store certificates in non-secure
DNS zones or to retrieve certificates from DNS with DNS security
checking not implemented or deferred for efficiency. The results MAY
be trusted if the certificate chain is verified back to a known
Josefsson Expires April 14, 2005 [Page 8]
Internet-Draft Storing Certificates in the DNS October 2004
trusted key and this conforms with the user's security policy.
Alternatively, if certificates are retrieved from a secure DNS zone
with DNS security checking enabled and are verified by DNS security,
the key within the retrieved certificate MAY be trusted without
verifying the certificate chain if this conforms with the user's
security policy.
CERT RRs are not used in connection with securing the DNS security
additions so there are no security considerations related to CERT RRs
and securing the DNS itself.
7. Open Issues
1. Not yet described: New DNSSEC Key Tag algorithm "OpenPGPKeyID" to
optimize PGP key retreival. Compare section 5 of
draft-josefsson-cert-openpgp. Not clear that it is needed.
2. How to handle PGP certificates larger than 64kb? In
draft-josefsson-cert-openpgp I outline one approach, but it may
not be the best one.
3. Should the document suggest use of both 8 and 4 byte OpenPGP key
id owner names? Perhaps only 8 byte version.
4. Any feedback on the X.509 data format and owner name guidelines
would be appreciated. Is anyone using this at all? They appear
as unnecessarily complex to me.
8. Changes since RFC 2538
1. Editorial changes to conform with new document requirements,
including splitting reference section into two parts and updating
references to point at latest versions.
2. Improve terminology. For example replace "PGP" with "OpenPGP",
to align with RFC 2440.
3. Clarify that OpenPGP public key data are binary, not the ASCII
armored format.
4. Clarify that integers in the representation format are decimal.
5. Replace KEY/SIG with DNSKEY/RRSIG etc, to align with DNSSECbis
terminology.
6. Suggest additional OpenPGP owner name guidelines.
9. References
9.1 Normative References
[1] Mockapetris, P., "Domain names - concepts and facilities", STD
13, RFC 1034, November 1987.
[2] Mockapetris, P., "Domain names - implementation and
Josefsson Expires April 14, 2005 [Page 9]
Internet-Draft Storing Certificates in the DNS October 2004
specification", STD 13, RFC 1035, November 1987.
[3] Kille, S., Wahl, M., Grimstad, A., Huber, R. and S. Sataluri,
"Using Domains in LDAP/X.500 Distinguished Names", RFC 2247,
January 1998.
[4] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396, August
1998.
[5] Callas, J., Donnerhacke, L., Finney, H. and R. Thayer, "OpenPGP
Message Format", RFC 2440, November 1998.
[6] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA
Considerations Section in RFCs", BCP 26, RFC 2434, October
1998.
[7] Resnick, P., "Internet Message Format", RFC 2822, April 2001.
[8] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings",
RFC 3548, July 2003.
[9] Arends, R., Austein, R., Massey, D., Larson, M. and S. Rose,
"DNS Security Introduction and Requirements",
draft-ietf-dnsext-dnssec-intro-13 (work in progress), October
2004.
[10] Arends, R., "Resource Records for the DNS Security Extensions",
draft-ietf-dnsext-dnssec-records-11 (work in progress), October
2004.
9.2 Informative References
[11] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
Author's Address
Simon Josefsson
EMail: simon@josefsson.org
Appendix A. Acknowledgements
The majority of this document is copied verbatim from RFC 2538, by D.
Eastlake and O. Gudmundsson.
Josefsson Expires April 14, 2005 [Page 10]
Internet-Draft Storing Certificates in the DNS October 2004
The author wishes to thank David Shaw and Michael Graff for their
contributions to draft-josefsson-cert-openpgp.
Josefsson Expires April 14, 2005 [Page 11]
Internet-Draft Storing Certificates in the DNS October 2004
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 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 Internet Society (2004). 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.
Josefsson Expires April 14, 2005 [Page 12]