idnits 2.17.1 draft-ietf-dane-openpgpkey-12.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 : ---------------------------------------------------------------------------- ** There are 2 instances of too long lines in the document, the longest one being 5 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 02, 2016) is 2916 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 6982 (Obsoleted by RFC 7942) -- Obsolete informational reference (is this intentional?): RFC 7816 (Obsoleted by RFC 9156) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Wouters 3 Internet-Draft Red Hat 4 Intended status: Experimental May 02, 2016 5 Expires: November 03, 2016 7 Using DANE to Associate OpenPGP public keys with email addresses 8 draft-ietf-dane-openpgpkey-12 10 Abstract 12 OpenPGP is a message format for email (and file) encryption that 13 lacks a standardized lookup mechanism to securely obtain OpenPGP 14 public keys. DNS-Based Authentication of Named Entities ("DANE") is 15 a method for publishing public keys in DNS. This document specifies 16 a DANE method for publishing and locating OpenPGP public keys in DNS 17 for a specific email address using a new OPENPGPKEY DNS Resource 18 Record. Security is provided via Secure DNS, however the OPENPGPKEY 19 record is not a replacement for verification of authenticity via the 20 "Web Of Trust" or manual verification. The OPENPGPKEY record can be 21 used to encrypt an email that would otherwise have to be sent 22 unencrypted. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on November 03, 2016. 41 Copyright Notice 43 Copyright (c) 2016 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 59 1.1. Experiment goal . . . . . . . . . . . . . . . . . . . . . 3 60 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 61 2. The OPENPGPKEY Resource Record . . . . . . . . . . . . . . . 4 62 2.1. The OPENPGPKEY RDATA component . . . . . . . . . . . . . 5 63 2.1.1. The OPENPGPKEY RDATA content . . . . . . . . . . . . 5 64 2.1.2. Reducing the Transferable Public Key size . . . . . . 6 65 2.2. The OPENPGPKEY RDATA wire format . . . . . . . . . . . . 6 66 2.3. The OPENPGPKEY RDATA presentation format . . . . . . . . 7 67 3. Location of the OPENPGPKEY record . . . . . . . . . . . . . . 7 68 4. Email address variants and internationalization 69 considerations . . . . . . . . . . . . . . . . . . . . . . . 8 70 5. Application use of OPENPGPKEY . . . . . . . . . . . . . . . . 9 71 5.1. Obtaining an OpenPGP key for a specific email address . . 9 72 5.2. Confirming that an OpenPGP key is current . . . . . . . . 9 73 5.3. Public Key UIDs and query names . . . . . . . . . . . . . 9 74 6. OpenPGP Key size and DNS . . . . . . . . . . . . . . . . . . 10 75 7. Security Considerations . . . . . . . . . . . . . . . . . . . 10 76 7.1. MTA behaviour . . . . . . . . . . . . . . . . . . . . . . 12 77 7.2. MUA behaviour . . . . . . . . . . . . . . . . . . . . . . 12 78 7.3. Response size . . . . . . . . . . . . . . . . . . . . . . 13 79 7.4. Email address information leak . . . . . . . . . . . . . 13 80 7.5. Storage of OPENPGPKEY data . . . . . . . . . . . . . . . 13 81 7.6. Security of OpenPGP versus DNSSEC . . . . . . . . . . . . 14 82 8. Implementation Status . . . . . . . . . . . . . . . . . . . . 14 83 8.1. The GNU Privacy Guard (GNUpg) . . . . . . . . . . . . . . 15 84 8.2. hash-slinger . . . . . . . . . . . . . . . . . . . . . . 15 85 8.3. openpgpkey-milter . . . . . . . . . . . . . . . . . . . . 16 86 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 87 9.1. OPENPGPKEY RRtype . . . . . . . . . . . . . . . . . . . . 16 88 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 89 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 90 11.1. Normative References . . . . . . . . . . . . . . . . . . 17 91 11.2. Informative References . . . . . . . . . . . . . . . . . 18 92 Appendix A. Generating OPENPGPKEY records . . . . . . . . . . . 19 93 Appendix B. OPENPGPKEY IANA template . . . . . . . . . . . . . . 21 94 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 22 96 1. Introduction 98 OpenPGP [RFC4880] public keys are used to encrypt or sign email 99 messages and files. To encrypt an email message, or verify a 100 sender's OpenPGP signature, the email client (MUA) or the email 101 server (MTA) needs to locate the recipient's OpenPGP public key. 103 OpenPGP clients have relied on centralized "well-known" key servers 104 that are accessed using the HTTP Keyserver Protocol [HKP]. 105 Alternatively, users need to manually browse a variety of different 106 front-end websites. These key servers do not require a confirmation 107 of the email address used in the User ID of the uploaded OpenPGP 108 public key. Attackers can - and have - uploaded rogue public keys 109 with other people's email addresses to these key servers. 111 Once uploaded, public keys cannot be deleted. People who did not 112 pre-sign a key revocation can never remove their OpenPGP public key 113 from these key servers once they have lost access to their private 114 key. This results in receiving encrypted email that cannot be 115 decrypted. 117 Therefore, these keyservers are not well suited to support MUAs and 118 MTAs to automatically encrypt email - especially in the absence of an 119 interactive user. 121 This document describes a mechanism to associate a user's OpenPGP 122 public key with their email address, using the OPENPGPKEY DNS RRtype. 123 These records are published in the DNS zone of the user's email 124 address. If the user loses their private key, the OPENPGPKEY DNS 125 record can simply be updated or removed from the zone. 127 The OPENPGPKEY data is secured using Secure DNS [RFC4035]. 129 The main goal of the OPENPGPKEY resource record is to stop passive 130 attacks against plaintext emails. While it can also thwart some 131 active attacks (such as people uploading rogue keys to keyservers in 132 the hopes that others will encrypt to these rogue keys), this 133 resource record is not a replacement for verifying OpenPGP public 134 keys via the web of trust signatures, or manually via a fingerprint 135 verification. 137 1.1. Experiment goal 139 This specification is one experiment in improving access to public 140 keys for end-to-end email security. There are a range of ways in 141 which this can reasonably be done, for OpenPGP or S/MIME, for example 142 using the DNS, or SMTP, or HTTP. Proposals for each of these have 143 been made with various levels of support in terms of implementation 144 and deployment. For each such experiment, specifications such as 145 this will enable experiments to be carried out that may succeed or 146 that may uncover technical or other impediments to large- or small- 147 scale deployments. The IETF encourages those implementing and 148 deploying such experiments to publicly document their experiences so 149 that future specifications in this space can benefit. 151 This document defines an RRtype whose use is Experimental. The goal 152 of the experiment is to see whether encrypted email usage will 153 increase if an automated discovery method is available to MTAs and 154 MUAs to help the enduser with email encryption key management. 156 It is unclear if this RRtype will scale to some of the larger email 157 service deployments. Concerns have been raised about the size of the 158 OPENPGPKEY record and the size of the resulting DNS zone files. This 159 experiment hopefully will give the working group some insight into 160 whether this is a problem or not. 162 If the experiment is successful, it is expected that the findings of 163 the experiment will result in an updated document for standards track 164 approval. 166 The OPENPGPKEY RRtype somewhat resembles the generic CERT record 167 defined in [RFC4398]. However, the CERT record uses sub-typing with 168 many different types of keys and certificates. It is suspected that 169 its general application of very different protocols (PKIX versus 170 OpenPGP) has been the cause for lack of implementation and 171 deployment. Furthermore, the CERT record uses sub-typing, which is 172 now considered to be a bad idea for DNS. 174 1.2. Terminology 176 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 177 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 178 document are to be interpreted as described in RFC 2119 [RFC2119]. 180 This document also makes use of standard DNSSEC and DANE terminology. 181 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for 182 these terms. 184 2. The OPENPGPKEY Resource Record 185 The OPENPGPKEY DNS resource record (RR) is used to associate an end 186 entity OpenPGP Transferable Public Key (see Section 11.1 of [RFC4880] 187 with an email address, thus forming a "OpenPGP public key 188 association". A user that wishes to specify more than one OpenPGP 189 key, for example because they are transitioning to a newer stronger 190 key, can do so by adding multiple OPENPGPKEY records. A single 191 OPENPGPKEY DNS record MUST only contain one OpenPGP key. 193 The type value allocated for the OPENPGPKEY RR type is 61. The 194 OPENPGPKEY RR is class independent. 196 2.1. The OPENPGPKEY RDATA component 198 The RDATA portion of an OPENPGPKEY Resource Record contains a single 199 value consisting of a [RFC4880] formatted Transferable Public Key. 201 2.1.1. The OPENPGPKEY RDATA content 203 An OpenPGP Transferable Public Key can be arbitrarily large. DNS 204 records are limited in size. When creating OPENPGPKEY DNS records, 205 the OpenPGP Transferable Public Key should be filtered to only 206 contain appropriate and useful data. At a minimum, an OPENPGPKEY 207 Transferable Public Key for the user hugh@example.com should contain: 209 o The primary key X 210 o One User ID Y, which SHOULD match 'hugh@example.com' 211 o self-signature from X, binding X to Y 213 If the primary key is not encryption-capable, at least one relevant 214 subkey should be included resulting in an OPENPGPKEY Transferable 215 Public Key containing: 217 o The primary key X 218 o One User ID Y, which SHOULD match 'hugh@example.com' 219 o self-signature from X, binding X to Y 220 o encryption-capable subkey Z 221 o self-signature from X, binding Z to X 222 o [ other subkeys if relevant ... ] 224 The user can also elect to add a few third-party certifications which 225 they believe would be helpful for validation in the traditional Web 226 Of Trust. The resulting OPENPGPKEY Transferable Public Key would 227 then look like: 229 o The primary key X 230 o One User ID Y, which SHOULD match 'hugh@example.com' 231 o self-signature from X, binding X to Y 232 o third-party certification from V, binding Y to X 233 o [ other third-party certifications if relevant ... ] 234 o encryption-capable subkey Z 235 o self-signature from X, binding Z to X 236 o [ other subkeys if relevant ... ] 238 2.1.2. Reducing the Transferable Public Key size 240 When preparing a Transferable Public Key for a specific OPENPGPKEY 241 RDATA format with the goal of minimizing certificate size, a user 242 would typically want to: 244 o Where one User ID from the certifications matches the looked-up 245 address, strip away non-matching User IDs and any associated 246 certifications (self-signatures or third-party certifications). 248 o Strip away all User Attribute packets and associated 249 certifications. 251 o Strip away all expired subkeys. The user may want to keep revoked 252 subkeys if these were revoked prior to their preferred expiration 253 time to ensure that correspondents know about these earlier than 254 expected revocations. 256 o Strip away all but the most recent self-signature for the 257 remaining user IDs and subkeys. 259 o Optionally strip away any uninteresting or unimportant third-party 260 User ID certifications. This is a value judgment by the user that 261 is difficult to automate. At the very least, expired and 262 superseded third-party certifcations should be stripped out. The 263 user should attempt to keep the most recent and most well 264 connected certifications in the Web Of Trust in their Transferable 265 Public Key. 267 2.2. The OPENPGPKEY RDATA wire format 269 The RDATA Wire Format consists of a single OpenPGP Transferable 270 Public Key as defined in Section 11.1 of [RFC4880]. Note that this 271 format is without ASCII armor or base64 encoding. 273 2.3. The OPENPGPKEY RDATA presentation format 275 The RDATA Presentation Format, as visible in master files [RFC1035], 276 consists of a single OpenPGP Transferable Public Key as defined in 277 Section 11.1 of [RFC4880] encoded in base64 as defined in Section 4 278 of [RFC4648]. 280 3. Location of the OPENPGPKEY record 282 The DNS does not allow the use of all characters that are supported 283 in the "local-part" of email addresses as defined in [RFC5322] and 284 [RFC6530]. Therefore, email addresses are mapped into DNS using the 285 following method: 287 o The "left-hand side" of the email address, called the "local-part" 288 in both the mail message format definition [RFC5322] and in the 289 specification for internationalized email [RFC6530]) is encoded in 290 UTF-8 (or its subset ASCII). If the local-part is written in 291 another charset it MUST be converted to UTF-8. 293 o The local-part is first canonicalized using the following rules. 294 If the local-part is unquoted, any whitespace (CFWS) around dots 295 (".") is removed. Any enclosing double quotes are removed. Any 296 literal quoting is removed. 298 o If the local-part contains any non-ASCII characters, it SHOULD be 299 normalized using the Unicode Normalization Form C from 300 [Unicode52]. Recommended normalization rules can be found in 301 Section 10.1 of [RFC6530]. 303 o The local-part is hashed using the SHA2-256 [RFC5754] algorithm, 304 with the hash truncated to 28 octets and represented in its 305 hexadecimal representation, to become the left-most label in the 306 prepared domain name. 308 o The string "_openpgpkey" becomes the second left-most label in the 309 prepared domain name. 311 o The domain name (the "right-hand side" of the email address, 312 called the "domain" in [RFC5322]) is appended to the result of 313 step 2 to complete the prepared domain name. 315 For example, to request an OPENPGPKEY resource record for a user 316 whose email address is "hugh@example.com", an OPENPGPKEY query would 317 be placed for the following QNAME: "c93f1e400f26708f98cb19d936620da35 318 eec8f72e57f9eec01c1afd6._openpgpkey.example.com". The corresponding 319 RR in the example.com zone might look like (key shortened for 320 formatting): 322 c9[..]d6._openpgpkey.example.com. IN OPENPGPKEY 324 4. Email address variants and internationalization considerations 326 Mail systems usually handle variant forms of local-parts. The most 327 common variants are upper and lower case, often automatically 328 corrected when a name is recognized as such. Other variants include 329 systems that ignore "noise" characters such as dots, so that local 330 parts johnsmith and John.Smith would be equivalent. Many systems 331 allow "extensions" such as john-ext or mary+ext where john or mary is 332 treated as the effective local-part, and the ext is passed to the 333 recipient for further handling. This can complicate finding the 334 OPENPGPKEY record associated with the dynamically created email 335 address. 337 [RFC5321] and its predecessors have always made it clear that only 338 the recipient MTA is allowed to interpret the local-part of an 339 address. Therefor, sending MUAs and MTAs supporting OPENPGPKEY MUST 340 NOT perform any kind of mapping rules based on the email address. In 341 order to improve chances of finding OPENPGP RRs for a particular 342 local-part, domains that allow variant forms (such as treating local- 343 parts as case-insensitive) might publish OPENPGP RRs for all variants 344 of local-parts, might publish variants on first use (for example a 345 webmail provider that also controls DNS for a domain can publish 346 variants as used by owner of a particular local-part) or just publish 347 OPENPGP RRs for the most common variants. 349 Section 3 above defines how the local-part is used to determine the 350 location in which one looks for an OPENPGPKEY record. Given the 351 variety of local-parts seen in email, designing a good experiment for 352 this is difficult as: a) some current implementations are known to 353 lowercase at least US-ASCII local-parts, b) we know from (many) other 354 situations that any strategy based on guessing and making multiple 355 DNS queries is not going to achieve consensus for good reasons, and 356 c) the underlying issues are just hard - see Section 10.1 of 357 [RFC6530] for discussion of just some of the issues that would need 358 to be tackled to fully address this problem. 360 However, while this specification is not the place to try to address 361 these issues with local-parts, doing so is also not required to 362 determine the outcome of this experiment. If this experiment 363 succeeds then further work on email addresses with non-ASCII local- 364 parts will be needed and that would be better based on the findings 365 from this experiment, rather than doing nothing or starting this 366 experiment based on a speculative approach to what is a very complex 367 topic. 369 5. Application use of OPENPGPKEY 371 The OPENPGPKEY record allows an application or service to obtain an 372 OpenPGP public key and use it for verifying a digital signature or 373 encrypting a message to the public key. The DNS answer MUST pass 374 DNSSEC validation; if DNSSEC validation reaches any state other than 375 "Secure" (as specified in [RFC4035]), the DNSSEC validation MUST be 376 treated as a failure. 378 5.1. Obtaining an OpenPGP key for a specific email address 380 If no OpenPGP public keys are known for an email address, an 381 OPENPGPKEY DNS lookup MAY be performed to seek the OpenPGP public key 382 that corresponds to that email address. This public key can then be 383 used to verify a received signed message or can be used to send out 384 an encrypted email message. An application whose attempt fails to 385 retrieve a DNSSEC verified OPENPGPKEY RR from the DNS should remember 386 that failure for some time to avoid sending out a DNS request for 387 each email message the application is sending out; such DNS requests 388 constitute a privacy leak. 390 5.2. Confirming that an OpenPGP key is current 392 Locally stored OpenPGP public keys are not automatically refreshed. 393 If the owner of that key creates a new OpenPGP public key, that owner 394 is unable to securely notify all users and applications that have its 395 old OpenPGP public key. Applications and users can perform an 396 OPENPGPKEY lookup to confirm the locally stored OpenPGP public key is 397 still the correct key to use. If the locally stored OpenPGP public 398 key is different from the DNSSEC validated OpenPGP public key 399 currently published in DNS, the confirmation MUST be treated as a 400 failure unless the locally stored OpenPGP key signed the newly 401 published OpenPGP public key found in DNS. An application that can 402 interact with the user MAY ask the user for guidance, otherwise the 403 application will have to apply local policy. For privacy reasons, an 404 application MUST NOT attempt to lookup an OpenPGP key from DNSSEC at 405 every use of that key. 407 5.3. Public Key UIDs and query names 409 An OpenPGP public key can be associated with multiple email addresses 410 by specifying multiple key uids. The OpenPGP public key obtained 411 from a OPENPGPKEY RR can be used as long as the query and resulting 412 data form a proper email to uid identity association. 414 CNAME's (see [RFC2181]) and DNAME's (see [RFC6672]) can be followed 415 to obtain an OPENPGPKEY RR, as long as the original recipient's email 416 address appears as one of the OpenPGP public key uids. For example, 417 if the OPENPGPKEY RR query for hugh@example.com 418 (8d57[...]b7._openpgpkey.example.com) yields a CNAME to 419 8d57[...]b7._openpgpkey.example.net, and an OPENPGPKEY RR for 420 8d57[...]b7._openpgpkey.example.net exists, then this OpenPGP public 421 key can be used, provided one of the key uids contains 422 "hugh@example.com". This public key cannot be used if it would only 423 contain the key uid "hugh@example.net". 425 If one of the OpenPGP key uids contains only a single wildcard as the 426 LHS of the email address, such as "*@example.com", the OpenPGP public 427 key may be used for any email address within that domain. Wildcards 428 at other locations (eg hugh@*.com) or regular expressions in key uids 429 are not allowed, and any OPENPGPKEY RR containing these MUST be 430 ignored. 432 6. OpenPGP Key size and DNS 434 Due to the expected size of the OPENPGPKEY record, applications 435 SHOULD use TCP - not UDP - to perform queries for the OPENPGPKEY 436 Resource Record. 438 Although the reliability of the transport of large DNS Resource 439 Records has improved in the last years, it is still recommended to 440 keep the DNS records as small as possible without sacrificing the 441 security properties of the public key. The algorithm type and key 442 size of OpenPGP keys should not be modified to accommodate this 443 section. 445 OpenPGP supports various attributes that do not contribute to the 446 security of a key, such as an embedded image file. It is recommended 447 that these properties not be exported to OpenPGP public keyrings that 448 are used to create OPENPGPKEY Resource Records. Some OpenPGP 449 software, for example GnuPG, support a "minimal key export" that is 450 well suited to use as OPENPGPKEY RDATA. See Appendix A. 452 7. Security Considerations 453 DNSSEC is not an alternative for the "web of trust" or for manual 454 fingerprint verification by users. DANE for OpenPGP as specified in 455 this document is a solution aimed to ease obtaining someone's public 456 key. Without manual verification of the OpenPGP key obtained via 457 DANE, this retrieved key should only be used for encryption if the 458 only other alternative is sending the message in plaintext. While 459 this thwarts all passive attacks that simply capture and log all 460 plaintext email content, it is not a security measure against active 461 attacks. A user who publishes an OPENPGPKEY record in DNS still 462 expects senders to perform their due diligence by additional (non- 463 DNSSEC) verification of their public key via other out-of-band 464 methods before sending any confidential or sensitive information. 466 In other words, the OPENPGPKEY record MUST NOT be used to send 467 sensitive information without additional verification or confirmation 468 that the OpenPGP key actually belongs to the target recipient. 470 DNSSEC does not protect the queries from Pervasive Monitoring as 471 defined in [RFC7258]. Since DNS queries are currently mostly 472 unencrypted, a query to lookup a target OPENPGPKEY record could 473 reveal that a user using the (monitored) recursive DNS server is 474 attempting to send encrypted email to a target. This information is 475 normally protected by the MUAs and MTAs by using TLS encryption using 476 STARTTLS. The DNS itself can mitigate some privacy concerns, but the 477 user needs to select a trusted DNS server that supports these privay 478 enhancing feaures. Recursive DNS servers can support DNS Query Name 479 Minimalisation [RFC7816] which limits leaking the QNAME to only the 480 recursive DNS server and the the nameservers of the actual zone being 481 queried for. Recursive DNS servers can also support TLS 482 [DNS-OVER-TLS] to ensure the path between the enduser and the 483 recursive DNS server is encrypted. 485 Various components could be responsible for encrypting an email 486 message to a target recipient. It could be done by the sender's MUA 487 or a MUA plugin or the sender's MTA. Each of these have their own 488 characteristics. A MUA can ask the user to make a decision before 489 continuing. The MUA can either accept or refuse a message. The MTA 490 must deliver the message as-is, or encrypt the message before 491 delivering. Each of these components should attempt to encrypt an 492 unencrypted outgoing message whenever possible. 494 In theory, two different local-parts could hash to the same value. 495 This document assumes that such a hash collision has a negliable 496 chance of happening. 498 Organisations that are required to be able to read everyone's 499 encrypted email should publish the escrow key as the OPENPGPKEY 500 record. Mail servers of such organizations MAY optionally re-encrypt 501 the message to the individual's OpenPGP key. 503 7.1. MTA behaviour 505 An MTA could be operating in a stand-alone mode, without access to 506 the sender's OpenPGP public keyring, or in a way where it can access 507 the user's OpenPGP public keyring. Regardless, the MTA MUST NOT 508 modify the user's OpenPGP keyring. 510 An MTA sending an email MUST NOT add the public key obtained from an 511 OPENPGPKEY resource record to a permanent public keyring for future 512 use beyond the TTL. 514 If the obtained public key is revoked, the MTA MUST NOT use the key 515 for encryption, even if that would result in sending the message in 516 plaintext. 518 If a message is already encrypted, the MTA SHOULD NOT re-encrypt the 519 message, even if different encryption schemes or different encryption 520 keys would be used. 522 If the DNS request for an OPENPGPKEY record returned an Indeterminate 523 or Bogus answer as specified in [RFC4035], the MTA MUST NOT send the 524 message and queue the plaintext message for encrypted delivery at a 525 later time. If the problem persists, the email should be returned 526 via the regular bounce methods. 528 If multiple non-revoked OPENPGPKEY resource records are found, the 529 MTA SHOULD pick the most secure RR based on its local policy. 531 7.2. MUA behaviour 533 If the public key for a recipient obtained from the locally stored 534 sender's public keyring differs from the recipient's OPENPGPKEY RR, 535 the MUA SHOULD halt processing the message and interact with the user 536 to resolve the conflict before continuing to process the message. 538 If the public key for a recipient obtained from the locally stored 539 sender's public keyring contains contradicting properties for the 540 same key obtained from an OPENPGPKEY RR, the MUA SHOULD NOT accept 541 the message for delivery. 543 If multiple non-revoked OPENPGPKEY resource records are found, the 544 MUA SHOULD pick the most secure OpenPGP public key based on its local 545 policy. 547 The MUA MAY interact with the user to resolve any conflicts between 548 locally stored keyrings and OPENPGPKEY RRdata. 550 A MUA that is encrypting a message SHOULD clearly indicate to the 551 user the difference between encrypting to a locally stored and 552 previously user-verified public key and encrypting to a public key 553 obtained via an OPENPGPKEY resource record that was not manually 554 verified by the user in the past. 556 7.3. Response size 558 To prevent amplification attacks, an Authoritative DNS server MAY 559 wish to prevent returning OPENPGPKEY records over UDP unless the 560 source IP address has been confirmed with [EDNS-COOKIE]. Such 561 servers MUST NOT return REFUSED, but answer the query with an empty 562 Answer Section and the truncation flag set ("TC=1"). 564 7.4. Email address information leak 566 The hashing of the local-part in this document is not a security 567 feature. Publishing OPENPGPKEY records will create a list of hashes 568 of valid email addresses, which could simplify obtaining a list of 569 valid email addresses for a particular domain. It is desirable to 570 not ease the harvesting of email addresses where possible. 572 The domain name part of the email address is not used as part of the 573 hash so that hashes can be used in multiple zones deployed using 574 DNAME [RFC6672]. This does makes it slightly easier and cheaper to 575 brute-force the SHA2-256 hashes into common and short local-parts, as 576 single rainbow tables can be re-used across domains. This can be 577 somewhat countered by using NSEC3. 579 DNS zones that are signed with DNSSEC using NSEC for denial of 580 existence are susceptible to zone-walking, a mechanism that allows 581 someone to enumerate all the OPENPGPKEY hashes in a zone. This can 582 be used in combination with previously hashed common or short local- 583 parts (in rainbow tables) to deduce valid email addresses. DNSSEC- 584 signed zones using NSEC3 for denial of existence instead of NSEC are 585 significantly harder to brute-force after performing a zone-walk. 587 7.5. Storage of OPENPGPKEY data 588 Users may have a local key store with OpenPGP public keys. An 589 application supporting the use of OPENPGPKEY DNS records MUST NOT 590 modify the local key store without explicit confirmation of the user, 591 as the application is unaware of the user's personal policy for 592 adding, removing or updating their local key store. An application 593 MAY warn the user if an OPENPGPKEY record does not match the OpenPGP 594 public key in the local key store. 596 Applications that cannot interact with users, such as daemon 597 processes, SHOULD store OpenPGP public keys obtained via OPENPGPKEY 598 up to their DNS TTL value. This avoids repeated DNS lookups that 599 third parties could monitor to determine when an email is being sent 600 to a particular user. 602 7.6. Security of OpenPGP versus DNSSEC 604 Anyone who can obtain a DNSSEC private key of a domain name via 605 coercion, theft or brute force calculations, can replace any 606 OPENPGPKEY record in that zone and all of the delegated child zones. 607 Any future messages encrypted with the malicious OpenPGP key could 608 then be read. 610 Therefore, an OpenPGP key obtained via a DNSSEC validated OPENPGPKEY 611 record can only be trusted as much as the DNS domain can be trusted, 612 and is no substitute for in-person OpenPGP key verification or 613 additional Openpgp verification via "Web Of Trust" signatures present 614 on the OpenPGP in question. 616 8. Implementation Status 618 [RFC Editor Note: Please remove this entire seciton prior to 619 publication as an RFC.] 621 This section records the status of known implementations of the 622 protocol defined by this specification at the time of posting of this 623 Internet-Draft, and is based on a proposal described in [RFC6982]. 624 The description of implementations in this section is intended to 625 assist the IETF in its decision processes in progressing drafts to 626 RFCs. Please note that the listing of any individual implementation 627 here does not imply endorsement by the IETF. Furthermore, no effort 628 has been spent to verify the information presented here that was 629 supplied by IETF contributors. This is not intended as, and must not 630 be construed to be, a catalog of available implementations or their 631 features. Readers are advised to note that other implementations may 632 exist. According to RFC 6982, "this will allow reviewers and working 633 groups to assign due consideration to documents that have the benefit 634 of running code, which may serve as evidence of valuable 635 experimentation and feedback that have made the implemented protocols 636 more mature. It is up to the individual working groups to use this 637 information as they see fit." 639 8.1. The GNU Privacy Guard (GNUpg) 641 Implementation Name and Details: The GNUpg software, more commonly 642 known as "gpg", is is available at https://gnupg.org/ 644 Brief Description: Support has been added to gnupg in their git 645 repository. This code is expected to be part of the next official 646 release. 648 Level of Maturity: The implementation has just been added and has 649 not seen widespread deployment. 651 Coverage: The implementation follows the latest draft with the 652 exception that it first performs a lowercase of the local-part 653 before hashing. This is done because other parts in the code that 654 perform a lookup of uid already performed a localcasing to ensure 655 case insensitivity. The implementors are tracking the development 656 of this draft in particular with respect to the lowercase issue. 658 Licensing: All code is covered under the GNU Public License version 659 3 or later. 661 Implementation Experience: Currrent experience limited to small test 662 networks only 664 Contact Information: https://gnupg.org/ 666 Interoperability: No report. 668 8.2. hash-slinger 670 Implementation Name and Details: The hash-slinger software is a 671 collection of tools to generate, download and verify application 672 public keys and application fingerprints. It uses DNSSEC 673 validation. The tool is written by the author of this document. 674 It is available at http://people.redhat.com/pwouters/ 676 Brief Description: Support has been added in the form of an 677 "openpgpkey" command that can generate, fetch, validate the DNSSEC 678 authentication and verify OPENPGPKEY records. 680 Level of Maturity: The implementation has been around for a few 681 months but has not seen widespread deployment. 683 Coverage: The implementation follows the latest draft with the 684 exception that it first performs a lowercase of the local-part 685 before hashing. 687 Licensing: All code is covered under the GNU Public License version 688 3 or later. 690 Implementation Experience: Currrent experience limited to small test 691 networks only 693 Contact Information: pwouters@redhat.com 695 Interoperability: No report. 697 8.3. openpgpkey-milter 699 Implementation Name and Details: The openpgpkey-milter is a Postfix 700 and Sendmail Mail server plugin (milter) that automatically 701 encrypts email before sending further to other SMTP servers. It 702 is written by the author of this document. It is available at 703 http://github.com/letoams/openpgpkey-milter/ 705 Brief Description: Before forwarding an unencrypted email, the 706 plugin looks for the presence of an OPENPGPKEY record. When 707 available, it will encrypt the email message and send out the 708 encrypted email. 710 Level of Maturity: The implementation has been around for a few 711 months but has not seen widespread deployment. 713 Coverage: The implementation follows the latest draft with the 714 exception that it first performs a lowercase of the local-part 715 before hashing. 717 Licensing: All code is covered under the GNU Public License version 718 3 or later. 720 Implementation Experience: Currrent experience limited to small test 721 networks only 723 Contact Information: pwouters@redhat.com 725 Interoperability: No report. 727 9. IANA Considerations 729 9.1. OPENPGPKEY RRtype 730 This document uses a new DNS RR type, OPENPGPKEY, whose value 61 has 731 been allocated by IANA from the Resource Record (RR) TYPEs 732 subregistry of the Domain Name System (DNS) Parameters registry. 734 The IANA template for OPENPGPKEY is listed in Appendix B. It was 735 submitted to IANA on July 23, 2014, reference number #773394 and 736 approved on August 12, 2014. 738 10. Acknowledgments 740 This document is based on [RFC4255] and [draft-ietf-dane-smime] whose 741 authors are Paul Hoffman, Jacob Schlyter and W. Griffin. Olafur 742 Gudmundsson provided feedback and suggested various improvements. 743 Willem Toorop contributed the gpg and hexdump command options. 744 Daniel Kahn Gillmor provided the text describing the OpenPGP packet 745 formats and filtering options. Edwin Taylor contributed language 746 improvements for various iterations of this document. Text regarding 747 email mappings was taken from [draft-levine-dns-mailbox] whose author 748 is John Levine. 750 11. References 752 11.1. Normative References 754 [RFC1035] Mockapetris, P., "Domain names - implementation and 755 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 756 November 1987, . 758 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 759 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 760 RFC2119, March 1997, 761 . 763 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 764 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 765 . 767 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 768 Rose, "DNS Security Introduction and Requirements", RFC 769 4033, DOI 10.17487/RFC4033, March 2005, 770 . 772 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 773 Rose, "Resource Records for the DNS Security Extensions", 774 RFC 4034, DOI 10.17487/RFC4034, March 2005, 775 . 777 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 778 Rose, "Protocol Modifications for the DNS Security 779 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 780 . 782 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 783 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 784 . 786 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. 787 Thayer, "OpenPGP Message Format", RFC 4880, DOI 10.17487/ 788 RFC4880, November 2007, 789 . 791 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic 792 Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January 793 2010, . 795 11.2. Informative References 797 [DNS-OVER-TLS] 798 Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 799 and P. Hoffman, "Specification for DNS over TLS", draft- 800 ietf-dprive-dns-over-tls (work in progress), March 2016. 802 [EDNS-COOKIE] 803 Eastlake, Donald., "Domain Name System (DNS) Cookies", 804 draft-ietf-dnsop-cookies (work in progress), August 2015. 806 [HKP] Shaw, D., "The OpenPGP HTTP Keyserver Protocol (HKP)", 807 draft-shaw-openpgp-hkp (work in progress), March 2013. 809 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 810 (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September 811 2003, . 813 [RFC4255] Schlyter, J. and W. Griffin, "Using DNS to Securely 814 Publish Secure Shell (SSH) Key Fingerprints", RFC 4255, 815 DOI 10.17487/RFC4255, January 2006, 816 . 818 [RFC4398] Josefsson, S., "Storing Certificates in the Domain Name 819 System (DNS)", RFC 4398, DOI 10.17487/RFC4398, March 2006, 820 . 822 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 823 DOI 10.17487/RFC5321, October 2008, 824 . 826 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 827 10.17487/RFC5322, October 2008, 828 . 830 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 831 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530, 832 February 2012, . 834 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the 835 DNS", RFC 6672, DOI 10.17487/RFC6672, June 2012, 836 . 838 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 839 of Named Entities (DANE) Transport Layer Security (TLS) 840 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 841 2012, . 843 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 844 Code: The Implementation Status Section", RFC 6982, DOI 845 10.17487/RFC6982, July 2013, 846 . 848 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 849 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 850 2014, . 852 [RFC7816] Bortzmeyer, S., "DNS Query Name Minimisation to Improve 853 Privacy", RFC 7816, DOI 10.17487/RFC7816, March 2016, 854 . 856 [Unicode52] 857 The Unicode Consortium, "The Unicode Standard, Version 858 5.2.0, defined by: "The Unicode Standard, Version 5.2.0", 859 (Mountain View, CA: The Unicode Consortium, 2009. ISBN 860 978-1-936213-00-9).", October 2009. 862 [draft-ietf-dane-smime] 863 Hoffman, P. and J. Schlyter, "Using Secure DNS to 864 Associate Certificates with Domain Names For S/MIME", 865 draft-ietf-dane-smime (work in progress), February 2016. 867 [draft-levine-dns-mailbox] 868 Levine, J., "Encoding mailbox local-parts in the DNS", 869 draft-ietf-dane-smime (work in progress), September 2015. 871 Appendix A. Generating OPENPGPKEY records 872 The commonly available GnuPG software can be used to generate a 873 minimum Transferable Public Key for the RRdata portion of an 874 OPENPGPKEY record: 876 gpg --export --export-options export-minimal,no-export-attributes \ 877 hugh@example.com | base64 879 The --armor or -a option of the gpg command should NOT be used, as it 880 adds additional markers around the armored key. 882 When DNS software reading or signing the zone file does not yet 883 support the OPENPGPKEY RRtype, the Generic Record Syntax of [RFC3597] 884 can be used to generate the RDATA. One needs to calculate the number 885 of octets and the actual data in hexadecimal: 887 gpg --export --export-options export-minimal,no-export-attributes \ 888 hugh@example.com | wc -c 890 gpg --export --export-options export-minimal,no-export-attributes \ 891 hugh@example.com | hexdump -e \ 892 '"\t" /1 "%.2x"' -e '/32 "\n"' 894 These values can then be used to generate a generic record (line 895 break has been added for formatting): 897 ._openpgpkey.example.com. IN TYPE61 \# \ 898 900 The openpgpkey command in the hash-slinger software can be used to 901 generate complete OPENPGPKEY records 903 ~> openpgpkey --output rfc hugh@example.com 904 c9[..]d6._openpgpkey.example.com. IN OPENPGPKEY mQCNAzIG[...] 906 ~> openpgpkey --output generic hugh@example.com 907 c9[..]d6._openpgpkey.example.com. IN TYPE61 \# 2313 99008d03[...] 909 Appendix B. OPENPGPKEY IANA template 911 A. Submission Date: 23-07-2014 913 B.1 Submission Type: [x] New RRTYPE [ ] Modification to RRTYPE 914 B.2 Kind of RR: [x] Data RR [ ] Meta-RR 916 C. Contact Information for submitter (will be publicly posted): 917 Name: Paul Wouters Email Address: pwouters@redhat.com 918 International telephone number: +1-647-896-3464 919 Other contact handles: paul@nohats.ca 921 D. Motivation for the new RRTYPE application. 923 Publishing RFC-4880 OpenPGP formatted keys in DNS with DNSSEC 924 protection to faciliate automatic encryption of emails in 925 defense against pervasive monitoring. 927 E. Description of the proposed RR type. 929 http://tools.ietf.org/html/draft-ietf-dane-openpgpkey-00#section-2 931 F. What existing RRTYPE or RRTYPEs come closest to filling that need 932 and why are they unsatisfactory? 934 The CERT RRtype is the closest match. It unfortunately depends on 935 subtyping, and its use in general is no longer recommended. It 936 also has no human usable presentation format. Some usage types of 937 CERT require external URI's which complicates the security model. 938 This was discussed in the dane working group. 940 G. What mnemonic is requested for the new RRTYPE (optional)? 942 OPENPGPKEY 944 H. Does the requested RRTYPE make use of any existing IANA registry 945 or require the creation of a new IANA subregistry in DNS 946 Parameters? If so, please indicate which registry is to be used 947 or created. If a new subregistry is needed, specify the 948 allocation policy for it and its initial contents. Also include 949 what the modification procedures will be. 951 The RDATA part uses the key format specified in RFC-4880, which 952 itself uses 953 https://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtm 955 This RRcode just uses the formats specified in those registries 956 for its RRdata part. 958 I. Does the proposal require/expect any changes in DNS 959 servers/resolvers that prevent the new type from being processed 960 as an unknown RRTYPE (see [RFC3597])? 962 No. 964 J. Comments: 966 Currently, three software implementations of draft-ietf-dane-openpgpkey 967 are using a private number. 969 Author's Address 971 Paul Wouters 972 Red Hat 974 Email: pwouters@redhat.com