📄 rfc4025.txt
字号:
Network Working Group M. RichardsonRequest for Comments: 4025 SSWCategory: Standards Track February 2005 A Method for Storing IPsec Keying Material in DNSStatus of This Memo This document specifies an Internet standards track protocol for the 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.Copyright Notice Copyright (C) The Internet Society (2005).Abstract This document describes a new resource record for the Domain Name System (DNS). This record may be used to store public keys for use in IP security (IPsec) systems. The record also includes provisions for indicating what system should be contacted when an IPsec tunnel is established with the entity in question. This record replaces the functionality of the sub-type #4 of the KEY Resource Record, which has been obsoleted by RFC 3445.Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2. Use of DNS Address-to-Name Maps (IN-ADDR.ARPA and IP6.ARPA) . . . . . . . . . . . . . . . . . . . . . . . 3 1.3. Usage Criteria . . . . . . . . . . . . . . . . . . . . . 3 2. Storage Formats . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. IPSECKEY RDATA Format . . . . . . . . . . . . . . . . . 3 2.2. RDATA Format - Precedence . . . . . . . . . . . . . . . 4 2.3. RDATA Format - Gateway Type . . . . . . . . . . . . . . 4 2.4. RDATA Format - Algorithm Type . . . . . . . . . . . . . 4 2.5. RDATA Format - Gateway . . . . . . . . . . . . . . . . . 5 2.6. RDATA Format - Public Keys . . . . . . . . . . . . . . . 5 3. Presentation Formats . . . . . . . . . . . . . . . . . . . . . 6 3.1. Representation of IPSECKEY RRs . . . . . . . . . . . . . 6 3.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Security Considerations . . . . . . . . . . . . . . . . . . . 7Richardson Standards Track [Page 1]RFC 4025 Storing IPsec Keying Material in DNS February 2005 4.1. Active Attacks Against Unsecured IPSECKEY Resource Records . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1.1. Active Attacks Against IPSECKEY Keying Materials. . . . . . . . . . . . . . . . . . . . 8 4.1.2. Active Attacks Against IPSECKEY Gateway Material. . . . . . . . . . . . . . . . . . . . 8 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1. Normative References . . . . . . . . . . . . . . . . . . 10 7.2. Informative References . . . . . . . . . . . . . . . . . 10 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11 Full Copyright Statement . . . . . . . . . . . . . . . . . . . . . 121. Introduction Suppose a host wishes (or is required by policy) to establish an IPsec tunnel with some remote entity on the network prior to allowing normal communication to take place. In many cases, this end system will be able to determine the DNS name for the remote entity (either by having the DNS name given explicitly, by performing a DNS PTR query for a particular IP address, or through some other means, e.g., by extracting the DNS portion of a "user@FQDN" name for a remote entity). In these cases, the host will need to obtain a public key to authenticate the remote entity, and may also need some guidance about whether it should contact the entity directly or use another node as a gateway to the target entity. The IPSECKEY RR provides a mechanism for storing such information. The type number for the IPSECKEY RR is 45. This record replaces the functionality of the sub-type #4 of the KEY Resource Record, which has been obsoleted by RFC 3445 [11].1.1. Overview The IPSECKEY resource record (RR) is used to publish a public key that is to be associated with a Domain Name System (DNS) [1] name for use with the IPsec protocol suite. This can be the public key of a host, network, or application (in the case of per-port keying). 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 [3].Richardson Standards Track [Page 2]RFC 4025 Storing IPsec Keying Material in DNS February 20051.2. Use of DNS Address-to-Name Maps (IN-ADDR.ARPA and IP6.ARPA) Often a security gateway will only have access to the IP address of the node with which communication is desired and will not know any other name for the target node. Because of this, frequently the best way of looking up IPSECKEY RRs will be by using the IP address as an index into one of the reverse mapping trees (IN-ADDR.ARPA for IPv4 or IP6.ARPA for IPv6). The lookup is done in the fashion usual for PTR records. The IP address' octets (IPv4) or nibbles (IPv6) are reversed and looked up with the appropriate suffix. Any CNAMEs or DNAMEs found MUST be followed. Note: even when the IPsec function is contained in the end-host, often only the application will know the forward name used. Although the case where the application knows the forward name is common, the user could easily have typed in a literal IP address. This storage mechanism does not preclude using the forward name when it is available but does not require it.1.3. Usage Criteria An IPSECKEY resource record SHOULD be used in combination with DNSSEC [8] unless some other means of authenticating the IPSECKEY resource record is available. It is expected that there will often be multiple IPSECKEY resource records at the same name. This will be due to the presence of multiple gateways and a need to roll over keys. This resource record is class independent.2. Storage Formats2.1. IPSECKEY RDATA Format The RDATA for an IPSECKEY RR consists of a precedence value, a gateway type, a public key, algorithm type, and an optional gateway address.Richardson Standards Track [Page 3]RFC 4025 Storing IPsec Keying Material in DNS February 2005 0 1 2 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | precedence | gateway type | algorithm | gateway | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------+ + ~ gateway ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | / / public key / / / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|2.2. RDATA Format - Precedence This is an 8-bit precedence for this record. It is interpreted in the same way as the PREFERENCE field described in section 3.3.9 of RFC 1035 [2]. Gateways listed in IPSECKEY records with lower precedence are to be attempted first. Where there is a tie in precedence, the order should be non-deterministic.2.3. RDATA Format - Gateway Type The gateway type field indicates the format of the information that is stored in the gateway field. The following values are defined: 0 No gateway is present. 1 A 4-byte IPv4 address is present. 2 A 16-byte IPv6 address is present. 3 A wire-encoded domain name is present. The wire-encoded format is self-describing, so the length is implicit. The domain name MUST NOT be compressed. (See Section 3.3 of RFC 1035 [2].)2.4. RDATA Format - Algorithm Type The algorithm type field identifies the public key's cryptographic algorithm and determines the format of the public key field. A value of 0 indicates that no key is present. The following values are defined: 1 A DSA key is present, in the format defined in RFC 2536 [9]. 2 A RSA key is present, in the format defined in RFC 3110 [10].Richardson Standards Track [Page 4]RFC 4025 Storing IPsec Keying Material in DNS February 20052.5. RDATA Format - Gateway The gateway field indicates a gateway to which an IPsec tunnel may be created in order to reach the entity named by this resource record. There are three formats: A 32-bit IPv4 address is present in the gateway field. The data portion is an IPv4 address as described in section 3.4.1 of RFC 1035 [2]. This is a 32-bit number in network byte order. A 128-bit IPv6 address is present in the gateway field. The data portion is an IPv6 address as described in section 2.2 of RFC 3596 [12]. This is a 128-bit number in network byte order. The gateway field is a normal wire-encoded domain name, as described in section 3.3 of RFC 1035 [2]. Compression MUST NOT be used.2.6. RDATA Format - Public Keys Both the public key types defined in this document (RSA and DSA) inherit their public key formats from the corresponding KEY RR formats. Specifically, the public key field contains the algorithm-specific portion of the KEY RR RDATA, which is all the KEY RR DATA after the first four octets. This is the same portion of the KEY RR that must be specified by documents that define a DNSSEC algorithm. Those documents also specify a message digest to be used for generation of SIG RRs; that specification is not relevant for IPSECKEY RRs. Future algorithms, if they are to be used by both DNSSEC (in the KEY RR) and IPSECKEY, are likely to use the same public key encodings in both records. Unless otherwise specified, the IPSECKEY public key field will contain the algorithm-specific portion of the KEY RR RDATA for the corresponding algorithm. The algorithm must still be designated for use by IPSECKEY, and an IPSECKEY algorithm type number (which might be different from the DNSSEC algorithm number) must be assigned to it. The DSA key format is defined in RFC 2536 [9] The RSA key format is defined in RFC 3110 [10], with the following changes: The earlier definition of RSA/MD5 in RFC 2065 [4] limited the exponent and modulus to 2552 bits in length. RFC 3110 extended that limit to 4096 bits for RSA/SHA1 keys. The IPSECKEY RR imposes no length limit on RSA public keys, other than the 65535 octet limitRichardson Standards Track [Page 5]RFC 4025 Storing IPsec Keying Material in DNS February 2005 imposed by the two-octet length encoding. This length extension is applicable only to IPSECKEY; it is not applicable to KEY RRs.3. Presentation Formats3.1. Representation of IPSECKEY RRs IPSECKEY RRs may appear in a zone data master file. The precedence, gateway type, algorithm, and gateway fields are REQUIRED. The base64 encoded public key block is OPTIONAL; if it is not present, the public key field of the resource record MUST be construed to be zero octets in length. The algorithm field is an unsigned integer. No mnemonics are defined. If no gateway is to be indicated, then the gateway type field MUST be zero, and the gateway field MUST be "." The Public Key field is represented as a Base64 encoding of the Public Key. Whitespace is allowed within the Base64 text. For a definition of Base64 encoding, see RFC 3548 [6], Section 5.2. The general presentation for the record is as follows: IN IPSECKEY ( precedence gateway-type algorithm gateway base64-encoded-public-key )3.2. Examples An example of a node, 192.0.2.38, that will accept IPsec tunnels on its own behalf. 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) An example of a node, 192.0.2.38, that has published its key only. 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )Richardson Standards Track [Page 6]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -