idnits 2.17.00 (12 Aug 2021) /tmp/idnits5108/draft-hoffman-keys-linkage-from-dns-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 13, 2010) is 4299 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 4634 (Obsoleted by RFC 6234) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Hoffman 3 Internet-Draft VPN Consortium 4 Intended status: Standards Track J. Schlyter 5 Expires: February 14, 2011 Kirei AB 6 W. Kumari 7 A. Langley 8 Google 9 August 13, 2010 11 Using Secure DNS to Associate Keys with Domain Names For TLS 12 draft-hoffman-keys-linkage-from-dns-00 14 Abstract 16 TLS uses PKIX certificates for authenticating the server. Users want 17 their applications to verify that the key in the certificate provided 18 by the TLS server is in fact associated with the domain name they 19 expect. Instead of trusting a certificate authority to have made 20 this association correctly, the user might instead trust the 21 authoritative DNS server for the domain name to make that 22 association. This document describes how to use secure DNS to 23 associate the key that appears in a TLS server's certificate with the 24 the intended domain name. 26 Status of this Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on February 14, 2011. 43 Copyright Notice 45 Copyright (c) 2010 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 1. Introduction 60 The first response from the server in TLS [RFC5246] may contain a 61 PKIX certificate. In order for the TLS client to authenticate that 62 it is talking to the expected TLS server, the client must validate 63 that the key in this certificate is associated with the domain name 64 used by the client to get to the server. Currently, the client must 65 extract the domain name from one of many places in the PKIX 66 certificate, must trust the trust anchor upon which the server's PKIX 67 certificate is rooted, and must perform correct PKIX validation on 68 the certificate. 70 Some people want a different way to authenticate the association of 71 the key in the server's certificate with the intended domain name 72 without trusting the CA. Given that the DNS administrator for a 73 domain name is authorized to give identifying information about the 74 zone, it makes sense to allow that administrator to also make an 75 authoritative binding between the domain name and a public key that 76 might be used by a host at that domain name. The easiest way to do 77 this is to use the DNS. 79 A key association is a cryptographic hash of the public key in a PKIX 80 certificate (sometimes called a "fingerprint"). That is, a hash is 81 taken of the DER-encoded subjectPublicKeyInfo field of the PKIX 82 certificate as defined in [RFC5280], and that hash is the key 83 association. The type of hash function used can be chosen by the DNS 84 administrator. 86 DNSSEC, which is defined in RFCs 4033, 4034, and 4035 ([RFC4033], 87 [RFC4034], and [RFC4035]), uses cryptographic keys and digital 88 signatures to provide authentication of DNS data. Information 89 retrieved from the DNS and that is validated using DNSSEC is thereby 90 proved to be the authoritative data. 92 This document defines a secure method to associate the key in the 93 PKIX certificate that is obtained from the TLS server with a domain 94 name using DNS protected by DNSSEC. Because the key association was 95 retrieved based on a DNS query, the domain name in the query is by 96 definition associated with the key. 98 This document only relates to securely getting the DNS information 99 for the key association using DNSSEC; other secure DNS mechanisms are 100 out of scope. The DNSSEC signature MUST be validated on all 101 responses in order to assure the proof of origin of the data. 103 This document only relates to securely getting keys for TLS; other 104 security protocols are handled in other documents. For example, keys 105 for IPsec are covered in [RFC4025] and keys for SSH are covered in 106 [RFC4255]. 108 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 109 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 110 document are to be interpreted as described in RFC 2119 [RFC2119]. 112 2. Getting TLS Key Associations from the DNS 114 This section describes three equivalent methods for encoding TLS 115 associations: a new certificate type of the existing CERT RR (defined 116 in [RFC4398]), a new resource record (RR) called "TLSFP" and a TXT RR 117 that can be emitted when the query has "_tlsfp" as the leftmost 118 label. 120 EXTREMELY IMPORTANT NOTE: Only one of these methods describe in this 121 document should be selected for the final protocol. We have listed 122 them in our approximate order of preference, but look forward to 123 discussion. When that decision is made, the two methods not used 124 will be moved to the appendix. 126 2.1. The TLSFP Certificate Type of the CERT RR 128 The CERT RR [RFC4398] allows expansion by defining new certificate 129 types. The new TLSFP certificate type is defined here. A query on a 130 domain name for the CERT RR can return one or more records of the 131 type CERT, and zero or more of those CERT responses can be of type 132 TLSFP. 134 The format of the TLSFP certificate type is binary. In the record, 135 all integers consist of two bytes in network byte order. The record, 136 which MUST be in the order defined here, is: 138 o An integer specifying how many port numbers are listed. If this 139 value is zero (0), the key association is valid for any port. 141 o An optional unordered set of two-byte integers, ranging from 1 to 142 65535, specifying the TCP/UDP ports for which the key association 143 is valid. 145 o An integer specifying the type of hash algorithm used for the key 146 association. 148 o A variable-length set of bytes containing the hash of the 149 associated key. 151 For example: 153 www.example.com. IN CERT TLSFP 0 0 ( AQG7ASCWCnpVpwaT 154 wRsZLt3FmDw45y/8H/Ie9tyEWLd2nZF9 ) 156 Note that, unlike the following two format proposals, no version 157 number is needed for the certificate type because a request for a 158 CERT RR can yield multiple results. If there is a later improvement 159 to the TLSFP certificate type, it could be sent along with a TLSFP 160 certificate type in a response. 162 2.2. The TLSFP Resource Record 164 The new RR TLSFP resource record is defined here. A query on a 165 domain name for the TLSFP type can return one or more records of the 166 type TLSFP. 168 The format of the TLSFP response is binary. In the record, all 169 integers consist of two bytes in network byte order. The record, 170 which MUST be in the order defined here, is: 172 o The version number. This is useful if non-critical changes are 173 made to this RR later. The initial version number is 42. 175 o An integer specifying how many port numbers are listed. If this 176 value is zero (0), the key association is valid for any port. 178 o An optional unordered set of two-byte integers, ranging from 1 to 179 65535, specifying the TCP/UDP ports for which the key association 180 is valid. 182 o An integer specifying the type of hash algorithm used for the key 183 association. 185 o A variable-length set of bytes containing the hash of the 186 associated key. 188 For example: 190 www.example.com. IN TLSFP 42 1 443 1 20960a7a55a706 191 93c11b192eddc5983c38e72ffc1ff21ef6dc8458b7769d917d 193 [[ This will need a proper RRTYPE definition. That will be added 194 later if this option is chosen. ]] 196 2.3. Using a TXT Resource Record with a _TLSFP Label Prefix 198 A request for a TXT RR whose domain is the label _tlsfp prepended to 199 a domain name can be used to get the KEY associated with the domain 200 name. A query of this can return one or more records of the type 201 TXT. 203 The format of the TXT response is ASCII text. The record, which MUST 204 be in the order defined here, is: 206 o One instance of "ver=", the version number, followed by ";", 207 followed by ";". This is useful if non-critical changes are made 208 to this RR later. The initial version number is 42. 210 o Zero or more instances of "port=" followed by an TCP/UDP port for 211 which the key association is valid (expressed as an integer), 212 followed by ";". If a port is not specified, the key association 213 is valid for all ports. 215 o The type of hash algorithm used for key association, specified as 216 "type=nn;" where "nn" is an integer defined below. 218 o "hash=" followed by the set of bytes containing the hash of the 219 associated key; the bytes are encoded as lower-case hexadecimal. 221 For example: 223 _tlsfp.www.example.com. IN TXT "ver=42; port=443; type=1; 224 hash=20960a7a55a70693c11b192eddc5983c38e72ffc1ff21ef6dc84 225 58b7769d917d 227 2.4. Key Association Hash Algorithms 229 The initial list of key association hash algorithms is: 231 o 0 - reserved 233 o 1 - SHA2-256 [RFC4634] 235 o 2 - SHA2-384 [RFC4634] 237 o 3 - SHA2-512 [RFC4634] 238 Defining other key association hash types requires IETF consensus as 239 defined in [RFC2434]. 241 For interoperability reasons, as few hash algorithm as possible 242 should be reserved. The only reason to reserve additional types is 243 to increase security. 245 3. Use of TLS Key Associations from the DNS in TLS 247 In order to use one or more TLS key associations obtained from the 248 DNS, an application MUST assure that the keys were obtained using DNS 249 protected by DNSSEC. There may be other methods to securely obtain 250 keys in DNS, but those methods are not covered by this document. 252 An application that requests TLS keys using the method described in 253 the previous section obtains zero or more key associations. If the 254 application receives zero key associations, it process TLS in the 255 normal fashion. If one or more key associations are received from 256 the DNS: 258 o If the PKIX certificate given by the TLS server is signed by a CA 259 trusted by the client, the application compares each key 260 association with the the hash of the key from the certificate, 261 using the same hash function that is given in the key association 262 type. If a match is found, the TLS handshake continues as normal, 263 including the TLS client doing all PKIX validation checks. 265 o If the PKIX certificate given by the TLS server is not signed by a 266 CA trusted by the client, the application compares each key 267 association with the the hash of the key from the certificate, 268 using the same hash function that is given in the key association 269 type. If a match is found, the TLS handshake continues using the 270 key from the certificate, but with no PKIX validations checks 271 being performed. 273 In either of the above cases, if a match between the key 274 association(s) is not found, the TLS client MUST abort the handshake 275 with an "access_denied" error. 277 4. IANA Considerations 279 [[ TBD. Will include the registration for the TLSFP RR if that is 280 the style chosen, as well as a new registry for hash algorithm types, 281 depending on what style is decided on. ]] 283 5. Security Considerations 285 [[ TBD. This section will need to describe, at least, the "attack" 286 where a DNS administrator goes rogue and changes both the A and TLSFP 287 records for a domain name. Also will discuss the need for secure 288 DNS. ]] 290 6. Acknowledgements 292 Many of the ideas in this document have been discussed over many 293 years. More recently, the ideas have been discussed by the authors 294 and others in a more focused fashion. In particular, some of the 295 ideas here originated with Paul Vixie, Dan Kaminsky, and Jeff Hodges, 296 among others. 298 7. References 300 7.1. Normative References 302 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 303 Requirement Levels", BCP 14, RFC 2119, March 1997. 305 [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an 306 IANA Considerations Section in RFCs", BCP 26, RFC 2434, 307 October 1998. 309 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 310 Rose, "DNS Security Introduction and Requirements", 311 RFC 4033, March 2005. 313 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 314 Rose, "Resource Records for the DNS Security Extensions", 315 RFC 4034, March 2005. 317 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 318 Rose, "Protocol Modifications for the DNS Security 319 Extensions", RFC 4035, March 2005. 321 [RFC4398] Josefsson, S., "Storing Certificates in the Domain Name 322 System (DNS)", RFC 4398, March 2006. 324 [RFC4634] Eastlake, D. and T. Hansen, "US Secure Hash Algorithms 325 (SHA and HMAC-SHA)", RFC 4634, July 2006. 327 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 328 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 330 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 331 Housley, R., and W. Polk, "Internet X.509 Public Key 332 Infrastructure Certificate and Certificate Revocation List 333 (CRL) Profile", RFC 5280, May 2008. 335 7.2. Informative References 337 [RFC4025] Richardson, M., "A Method for Storing IPsec Keying 338 Material in DNS", RFC 4025, March 2005. 340 [RFC4255] Schlyter, J. and W. Griffin, "Using DNS to Securely 341 Publish Secure Shell (SSH) Key Fingerprints", RFC 4255, 342 January 2006. 344 Appendix A. Ideas Considered But Not Chosen 346 This appendix will list some of the ideas that have been kicked 347 around in this space and give a few paragraphs why they weren't 348 chosen for this proposal. The following is a placeholder for the 349 list that will be filled out more in future versions of this 350 document: 352 o A flag that indicates that the certificate with the associated key 353 must be signed by a trusted CA. Briefly: this was not added 354 because it is up to the TLS server to decide which type of 355 certificate it wants to serve up. Serving a self-signed 356 certificate would effectively disable traditional PKIX validation, 357 whereas serving a certificate signed by a trusted CA would require 358 both validation by DNSSEC and the trusted CA. 360 o A flag that indicates that all connections to this server need to 361 be TLS secured. Briefly: this is a good idea but it is not 362 related to the key of the certificate given in TLS, and thus 363 should be indicated in a different method. 365 o Giving keys instead of fingerprints. Briefly: TLS requires that 366 the server gives a PKIX certificate, and some systems use the 367 metadata from a CA-signed certificate for display, so there is 368 value to always looking in the certificate. 370 o After a format for the information is chosen, the other two listed 371 earlier will go into this appendix. 373 Authors' Addresses 375 Paul Hoffman 376 VPN Consortium 378 Email: paul.hoffman@vpnc.org 380 Jakob Schlyter 381 Kirei AB 383 Email: jakob@kirei.se 385 Warren Kumari 386 Google 388 Email: warren@kumari.net 390 Adam Langley 391 Google 393 Email: agl@google.com