ietf-corpus

rfc-4398

Storing Certificates in the Domain Name System (DNS)

S. Josefsson
date2006-03 streamIETF areaint wgdnsext statusPROPOSED STANDARD pages17 canonicalhttps://www.rfc-editor.org/rfc/rfc4398 doi10.17487/RFC4398 errataview
Cryptographic public keys are frequently published, and their authenticity is 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). [STANDARDS-TRACK]

obsoletes

updated by

Extracted elements (26)

design-rationale §4

CERT RRs for email (S/MIME or OpenPGP) change DNS access patterns from per-domain to per-user lookups. Wide deployment of certificate-based signed email could substantially increase DNS query volume and degrade cache effectiveness, though the magnitude of this impact is unknown.

dns, email

design-rationale §2.1

The IPKIX, ISPKI, IPGP, and IACPKIX indirect types were introduced because the DNS RDATA field is limited to 65535 octets, making it impossible to store large certificates or CRLs inline. Indirect types carry a URL reference instead of the certificate data itself.

dns, pkix

design-rationale §3

Two owner name guidelines are defined: content-based (derived from certificate content such as Subject field or OpenPGP User ID) and purpose-based (a name the client already knows, such as TLS server hostname or email address). Purpose-based names are preferred because clients may not know all certificate content fields prior to retrieval.

dns, pkix

interoperability-note §2

The algorithm field in the CERT RR has the same meaning as in DNSKEY and RRSIG RRs, except that an algorithm value of zero indicates the algorithm is unknown to secure DNS — which may simply mean it has not been standardized for DNSSEC. The CERT RR reuses the DNS Security Algorithm Numbers registry and requires algorithm 0 remain reserved.

dns, crypto

interoperability-note §2.1

The SPKI and ISPKI types are reserved for the SPKI certificate format but their format is not yet specified, pending SPKI documents advancing from experimental status (RFC 2692/2693). Implementations encountering these types cannot currently interpret the certificate portion.

dns, pkix

normative-requirement §4 MUST NOT

Each CERT RR MUST NOT contain more than 65535 octets (64 KB) of payload, even if the corresponding certificate or CRL is larger. The indirect types address this by allowing the CERT RR to reference external content via URL.

dns, pkix

normative-requirement §2.1 MUST NOT

For the PGP certificate type, the data is binary and MUST NOT be encoded into ASCII armor. An implementation SHOULD process transferable public keys as described in Section 10.1 of RFC 2440, but MAY handle additional OpenPGP packets.

dns, crypto

normative-requirement §2.1 MUST

For the URI private certificate type, the certificate portion of the CERT RR MUST begin with a null-terminated URI, and the data after the null is the private format certificate itself.

dns

normative-requirement §3 SHOULD

Implementations SHOULD use the purpose-based owner name guidelines described in this document and MAY use CNAME RRs at content-based owner names pointing to the purpose-based owner name.

dns

normative-requirement §2.1 MUST

The indirect types (IPKIX, ISPKI, IPGP, IACPKIX) MUST be used when the certificate content is too large to fit in the CERT RR, and MAY be used at the implementer's discretion. They SHOULD NOT be used where the DNS message is 512 octets or smaller and could fit in a UDP packet.

dns, pkix

normative-requirement §2 MUST

The key MUST be transformed to the format it would have as the public key portion of a DNSKEY RR before the key tag is computed. If the key is not applicable to a DNS security algorithm, the algorithm field MUST be zero and the key tag SHOULD be zero.

dns, crypto

normative-requirement §2.1 SHOULD

X.509 certificates conforming to the IETF PKIX profile SHOULD be indicated by the PKIX type, not the OID private type.

dns, pkix

protocol-element §3.1

For content-based X.509 CERT RR naming, priority order is: (1) domain name in certificate/CRL identification, (2) reverse DNS of IP address, (3) domain name extracted from a URI in the certificate, (4) character string name treated as OpenPGP-style, (5) distinguished name mapped to domain per RFC 2247.

dns, pkix

protocol-element §3.4

For purpose-based OpenPGP CERT RR naming, the owner name should be the key fingerprint or Key ID expressed in hexadecimal. Multiple owner names can be used (full fingerprint, partial fingerprint, Key ID), and CNAME can reduce duplication when the same key material is stored under multiple names.

dns, crypto

protocol-element §3.2

Purpose-based X.509 CERT RR owner names by scenario: S/MIME uses RFC 2822 email address translated to hostname (e.g., postmaster.example.org); TLS uses the server hostname; IPsec uses the machine hostname and/or reverse DNS of the IP address.

dns, pkix, security

protocol-element §2.1

The IPGP certificate type contains a one-octet fingerprint length, followed by the OpenPGP fingerprint (computed as per RFC 2440), followed by the URL. A zero-length fingerprint or zero-length URL is legal (URL-only or fingerprint-only), but both being zero-length is invalid.

dns, crypto

protocol-element §2

The key tag field is a 16-bit value computed for the key embedded in the certificate using the RRSIG Key Tag algorithm. It serves as an efficiency measure to narrow which CERT RRs may be applicable to a given key, but note that two different keys can share the same key tag.

dns, crypto

protocol-element §2.1

The OID private type certificate section begins with a one-octet unsigned OID length followed by a BER-encoded OID indicating the nature of the remainder of the certificate section. Recognition of private types may use OID prefix matching rather than exact equality.

dns, pkix

protocol-element §2.3

The PKIX type certificate section begins with a one-octet unsigned OID length followed by an X.500 OID indicating the nature of the remainder. Defined OIDs include id-at-userCertificate (0x03 55 04 24), id-at-cACertificate (0x03 55 04 25), id-at-authorityRevocationList (0x03 55 04 26), and id-at-certificateRevocationList (0x03 55 04 27).

dns, pkix

registry §8

IANA created a new registry for CERT RR certificate types. Initial values include: 0 (Reserved), 1 PKIX, 2 SPKI, 3 PGP, 4 IPKIX, 5 ISPKI, 6 IPGP, 7 ACPKIX, 8 IACPKIX, 9-252 (IANA assignment via Standards Action), 253 URI, 254 OID, 255 (Reserved), 256-65279 (IANA assignment via IETF Consensus), 65280-65534 (Experimental), 65535 (Reserved).

dns, registry, pkix

security-consideration §7

Certificates contain their own authenticating signatures, so it is reasonable to store them in non-secure DNS zones or retrieve them without DNS security checking. The retrieved certificate may be trusted if the certificate chain is verified back to a known trusted key, or if DNSSEC verification is used in lieu of chain verification.

dns, security, pkix

security-consideration §7

If an organization stores CERT RRs by employee owner name and DNSSEC with NSEC is in use, an attacker can enumerate all employees by walking the zone. This is analogous to publicly exposing an enterprise phone directory and is generally undesirable.

dns, security, privacy

security-consideration §7

If DNSSEC is deployed, the non-existence of a CERT RR — and therefore of certificates or revocation lists — can be securely asserted. Without DNSSEC, this negative assertion cannot be made reliably.

dns, security

security-consideration §7

Using the URI (indirect) types introduces an additional level of indirection that may be exploited. One mitigation is to include a hash of the certificate in the URI itself, so that a retrieved document can be verified against the expected content.

dns, security, pkix

wire-format §2.2

In master file text representation, the CERT RR RDATA type field is an unsigned decimal integer or mnemonic, the key tag is an unsigned decimal integer, the algorithm field is an unsigned decimal integer or mnemonic, and the certificate/CRL is represented in base 64 (RFC 3548), which may be split across lines using parentheses.

dns

wire-format §2

The CERT RR wire format consists of a 16-bit type field, a 16-bit key tag field, an 8-bit algorithm field, and a variable-length certificate or CRL field. The RR type code is 37.

dns, pkix, crypto