idnits 2.17.1 draft-ietf-dane-openpgpkey-09.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 (April 13, 2016) is 2907 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) Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 2 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 April 13, 2016 5 Expires: October 15, 2016 7 Using DANE to Associate OpenPGP public keys with email addresses 8 draft-ietf-dane-openpgpkey-09 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 October 15, 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 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 . . . . . . . . 6 67 3. Location of the OPENPGPKEY record . . . . . . . . . . . . . . 6 68 4. Email address variants and internationalization 69 considerations . . . . . . . . . . . . . . . . . . . . . . . 7 70 5. Application use of OPENPGPKEY . . . . . . . . . . . . . . . . 8 71 5.1. Obtaining an OpenPGP key for a specific email address . . 8 72 5.2. Confirming that an OpenPGP key is current . . . . . . . . 8 73 5.3. Public Key UIDs and query names . . . . . . . . . . . . . 9 74 6. OpenPGP Key size and DNS . . . . . . . . . . . . . . . . . . 9 75 7. Security Considerations . . . . . . . . . . . . . . . . . . . 10 76 7.1. MTA behaviour . . . . . . . . . . . . . . . . . . . . . . 10 77 7.2. MUA behaviour . . . . . . . . . . . . . . . . . . . . . . 11 78 7.3. Response size . . . . . . . . . . . . . . . . . . . . . . 12 79 7.4. Email address information leak . . . . . . . . . . . . . 12 80 7.5. Storage of OPENPGPKEY data . . . . . . . . . . . . . . . 12 81 7.6. Security of OpenPGP versus DNSSEC . . . . . . . . . . . . 13 82 8. Implementation Status . . . . . . . . . . . . . . . . . . . . 13 83 8.1. The GNU Privacy Guard (GNUpg) . . . . . . . . . . . . . . 13 84 8.2. hash-slinger . . . . . . . . . . . . . . . . . . . . . . 14 85 8.3. openpgpkey-milter . . . . . . . . . . . . . . . . . . . . 14 86 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 87 9.1. OPENPGPKEY RRtype . . . . . . . . . . . . . . . . . . . . 15 88 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 89 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 90 11.1. Normative References . . . . . . . . . . . . . . . . . . 16 91 11.2. Informative References . . . . . . . . . . . . . . . . . 16 92 Appendix A. Generating OPENPGPKEY records . . . . . . . . . . . 17 93 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 19 95 1. Introduction 96 OpenPGP [RFC4880] public keys are used to encrypt or sign email 97 messages and files. To encrypt an email message, or verify a 98 sender's OpenPGP signature, the email client (MUA) or the email 99 server (MTA) needs to locate the recipient's OpenPGP public key. 101 OpenPGP clients have relied on centralized "well-known" key servers 102 that are accessed using the HTTP Keyserver Protocol [HKP]. 103 Alternatively, users need to manually browse a variety of different 104 front-end websites. These key servers do not require a confirmation 105 of the email address used in the User ID of the uploaded OpenPGP 106 public key. Attackers can - and have - uploaded rogue public keys 107 with other people's email addresses to these key servers. 109 Once uploaded, public keys cannot be deleted. People who did not 110 pre-sign a key revocation can never remove their OpenPGP public key 111 from these key servers once they have lost access to their private 112 key. This results in receiving encrypted email that cannot be 113 decrypted. 115 Therefore, these keyservers are not well suited to support MUAs and 116 MTA's to automatically encrypt email - especially in the absence of 117 an interactive user. 119 This document describes a mechanism to associate a user's OpenPGP 120 public key with their email address, using the OPENPGPKEY DNS RRtype. 121 These records are published in the DNS zone of the user's email 122 address. If the user loses their private key, the OPENPGPKEY DNS 123 record can simply be updated or removed from the zone. 125 The OPENPGPKEY data is secured using Secure DNS [RFC4035] 127 The main goal of the OPENPGPKEY resource record is to stop passive 128 attacks against plaintext emails. While it can also thwart some 129 active attacks (such as people uploading rogue keys to keyservers in 130 the hopes that others will encrypt to these rogue keys), this 131 resource record is not a replacement for verifying OpenPGP public 132 keys via the web of trust signatures, or manually via a fingerprint 133 verification. 135 1.1. Experiment goal 137 This specification is one experiment in improving access to public 138 keys for end-to-end email security. There are a range of ways in 139 which this can reasonably be done, for OpenPGP or S/MIME, for example 140 using the DNS, or SMTP, or HTTP. Proposals for each of these have 141 been made with various levels of support in terms of implementation 142 and deployment. For each such experiment, specifications such as 143 this will enable experiments to be carried out that may succeed or 144 that may uncover technical or other impediments to large- or small- 145 scale deployments. The IETF encourages those implementing and 146 deploying such experiments to publicly document their experiences so 147 that future specifications in this space can benefit. 149 This document defines an RRtype whose use is Experimental. The goal 150 of the experiment is to see whether encrypted email usage will 151 increase if an automated discovery method is available to MTA's and 152 MUA's to help the enduser with email encryption key management. 154 It is unclear if this RRtype will scale to some of the larger email 155 service deployments. Concerns have been raised about the size of the 156 OPENPGPKEY record and the size of the resulting DNS zone files. This 157 experiment hopefully will give the working group some insight into 158 whether this is a problem or not. 160 If the experiment is successful, it is expected that the findings of 161 the experiment will result in an updated document for standards track 162 approval. 164 The OPENPGPKEY RRtype somewhat resembles the generic CERT record 165 defined in [RFC4398]. However, the CERT record uses sub-typing with 166 many different types of keys and certificates. It is suspected that 167 its general application of very different protocols (PKIX versus 168 OpenPGP) has been the cause for lack of implementation and 169 deployment. Furthermore, the CERT record uses sub-typing, which is 170 now considered to be a bad idea for DNS. 172 1.2. Terminology 174 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 175 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 176 document are to be interpreted as described in RFC 2119 [RFC2119]. 178 This document also makes use of standard DNSSEC and DANE terminology. 179 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for 180 these terms. 182 2. The OPENPGPKEY Resource Record 184 The OPENPGPKEY DNS resource record (RR) is used to associate an end 185 entity OpenPGP Transferable Public Key (see Section 11.1 of [RFC4880] 186 with an email address, thus forming a "OpenPGP public key 187 association". A user that wishes to specify more than one OpenPGP 188 key, for example because they are transitioning to a newer stronger 189 key, can do so by adding multiple OPENPGPKEY records. A single 190 OPENPGPKEY DNS record MUST only contain one OpenPGP key. 192 The type value allocated for the OPENPGPKEY RR type is 61. The 193 OPENPGPKEY RR is class independent. 195 2.1. The OPENPGPKEY RDATA component 197 The RDATA portion of an OPENPGPKEY Resource Record contains a single 198 value consisting of a [RFC4880] formatted Transferable Public Key. 200 2.1.1. The OPENPGPKEY RDATA content 202 An OpenPGP Transferable Public Key can be arbitrarily large. DNS 203 records are limited in size. When creating OPENPGPKEY DNS records, 204 the OpenPGP Transferable Public Key should be filtered to only 205 contain appropriate and useful data. At a minimum, an OPENPGPKEY 206 Transferable Public Key for the user hugh@example.com should contain: 208 o The primary key X 209 o One User ID Y, which SHOULD match 'hugh@example.com' 210 o self-signature from X, binding X to Y 212 If the primary key is not encryption-capable, a relevant subkey 213 should be included resulting in an OPENPGPKEY Transferable Public Key 214 containing: 216 o The primary key X 217 o One User ID Y, which SHOULD match 'hugh@example.com' 218 o self-signature from X, binding X to Y 219 o encryption-capable subkey Z 220 o self-signature from X, binding Z to X 221 o [ other subkeys if relevant ... ] 223 The user can also elect to add a few third-party certifications which 224 they believe would be helpful for validation in the traditional Web 225 Of Trust. The resulting OPENPGPKEY Transferable Public Key would 226 then look like: 228 o The primary key X 229 o One User ID Y, which SHOULD match 'hugh@example.com' 230 o self-signature from X, binding X to Y 231 o third-party certification from V, binding Y to X 232 o [ other third-party certifications if relevant ... ] 233 o encryption-capable subkey Z 234 o self-signature from X, binding Z to X 235 o [ other subkeys if relevant ... ] 237 2.1.2. Reducing the Transferable Public Key size 239 When preparing a Transferable Public Key for a specific OPENPGPKEY 240 RDATA format with the goal of minimizing certificate size, a user 241 would typically want to: 243 o Where one User ID from the certifications matches the looked-up 244 address, strip away non-matching User IDs and any associated 245 certifications (self-signatures or third-party certifications). 247 o Strip away all User Attribute packets and associated 248 certifications. 250 o Strip away all expired subkeys. The user may want to keep revoked 251 subkeys if these were revoked prior to their preferred expiration 252 time to ensure that correspondents know about these earlier than 253 expected revocations. 255 o Strip away all but the most recent self-signature for the 256 remaining user IDs and subkeys. 258 o Optionally strip away any uninteresting or unimportant third-party 259 User ID certifications. This is a value judgment by the user that 260 is difficult to automate. At the very least, expired and 261 superseded third-party certifcations should be stripped out. The 262 user should attempt to keep the most recent and most well 263 connected certifications in the Web Of Trust in their Transferable 264 Public Key. 266 2.2. The OPENPGPKEY RDATA wire format 268 The RDATA Wire Format consists of a single OpenPGP Transferable 269 Public Key as defined in Section 11.1 of [RFC4880]. Note that this 270 format is without ASCII armor or base64 encoding. 272 2.3. The OPENPGPKEY RDATA presentation format 274 The RDATA Presentation Format, as visible in master files [RFC1035], 275 consists of a single OpenPGP Transferable Public Key as defined in 276 Section 11.1 of [RFC4880] encoded in base64 as defined in Section 4 277 of [RFC4648]. 279 3. Location of the OPENPGPKEY record 281 The DNS does not allow the use of all characters that are supported 282 in the "local-part" of email addresses as defined in [RFC5322] and 283 [RFC6530]. Therefore, email addresses are mapped into DNS using the 284 following method: 286 o The user name (the "left-hand side" of the email address, called 287 the "local-part" in the mail message format definition [RFC5322] 288 and the local-part in the specification for internationalized 289 email [RFC6530]) is encoded in UTF-8 (or its subset ASCII). If 290 the local-part is written in another encoding it MUST be converted 291 to UTF-8. 293 o The local-part is hashed using the SHA2-256 [RFC5754] algorithm, 294 with the hash truncated to 28 octets and represented in its 295 hexadecimal representation, to become the left-most label in the 296 prepared domain name. 298 o The string "_openpgpkey" becomes the second left-most label in the 299 prepared domain name. 301 o The domain name (the "right-hand side" of the email address, 302 called the "domain" in [RFC5322]) is appended to the result of 303 step 2 to complete the prepared domain name. 305 For example, to request an OPENPGPKEY resource record for a user 306 whose email address is "hugh@example.com", an OPENPGPKEY query would 307 be placed for the following QNAME: "c93f1e400f26708f98cb19d936620da35 308 eec8f72e57f9eec01c1afd6._openpgpkey.example.com". The corresponding 309 RR in the example.com zone might look like (key shortened for 310 formatting): 312 c9[..]d6._openpgpkey.example.com. IN OPENPGPKEY 314 4. Email address variants and internationalization considerations 316 Mail systems usually handle variant forms of local-parts. The most 317 common variants are upper and lower case, often automatically 318 corrected when a name is recognized as such. Other variants include 319 systems that ignore "noise" characters such as dots, so that local 320 parts johnsmith and John.Smith would be equivalent. Many systems 321 allow "extensions" such as john-ext or mary+ext where john or mary is 322 treated as the effective local-part, and the ext is passed to the 323 recipient for further handling. This can complicate finding the 324 OPENPGPKEY record associated with the dynamically created email 325 address. 327 [RFC5321] and its predecessors have always made it clear that only 328 the recipient MTA is allowed to interpret the local-part of an 329 address. MUA's and MTA's supporting OPENPGPKEY therefore MUST NOT 330 perform any kind of mapping rules based on the email address. 332 Section 3 above defines how the local-part is used to determine the 333 location in which one looks for an OPENPGPKEY record. Given the 334 variety of local-parts seen in email, designing a good experiment for 335 this is difficult as: a) some current implementations are known to 336 lowercase at least US-ASCII local-parts, b) we know from (many) other 337 situations that any strategy based on guessing and making multiple 338 DNS queries is not going to achieve consensus for good reasons, and 339 c) the underlying issues are just hard - see Section 10.1 of 340 [RFC6530] for discussion of just some of the issues that would need 341 to be tackled to fully address this problem. 343 However, while this specification is not the place to try to address 344 these issues with local-parts, doing so is also not required to 345 determine the outcome of this experiment. If this experiment 346 succeeds then further work on email addresses with non-ASCII local- 347 parts will be needed and that would be better based on the findings 348 from this experiment, rather than doing nothing or starting this 349 experiment based on a speculative approach to what is a very complex 350 topic. 352 5. Application use of OPENPGPKEY 354 The OPENPGPKEY record allows an application or service to obtain an 355 OpenPGP public key and use it for verifying a digital signature or 356 encrypting a message to the public key. The DNS answer MUST pass 357 DNSSEC validation; if DNSSEC validation reaches any state other than 358 "Secure" (as specified in [RFC4035]), the DNSSEC validation MUST be 359 treated as a failure. 361 5.1. Obtaining an OpenPGP key for a specific email address 363 If no OpenPGP public keys are known for an email address, an 364 OPENPGPKEY DNS lookup MAY be performed to seek the OpenPGP public key 365 that corresponds to that email address. This public key can then be 366 used to verify a received signed message or can be used to send out 367 an encrypted email message. An application whose attempt fails to 368 retrieve a DNSSEC verified OPENPGPKEY RR from the DNS should remember 369 that failure for some time to avoid sending out a DNS request for 370 each email message the application is sending out; such DNS requests 371 constitute a privacy leak 373 5.2. Confirming that an OpenPGP key is current 375 Locally stored OpenPGP public keys are not automatically refreshed. 376 If the owner of that key creates a new OpenPGP public key, that owner 377 is unable to securely notify all users and applications that have its 378 old OpenPGP public key. Applications and users can perform an 379 OPENPGPKEY lookup to confirm the locally stored OpenPGP public key is 380 still the correct key to use. If the locally stored OpenPGP public 381 key is different from the DNSSEC validated OpenPGP public key 382 currently published in DNS, the confirmation MUST be treated as a 383 failure unless the locally stored OpenPGP key signed the newly 384 published OpenPGP public key found in DNS. An application that can 385 interact with the user MAY ask the user for guidance, otherwise the 386 application will have to apply local policy. For privacy reasons, an 387 application MUST NOT attempt to lookup an OpenPGP key from DNSSEC at 388 every use of that key. 390 5.3. Public Key UIDs and query names 392 An OpenPGP public key can be associated with multiple email addresses 393 by specifying multiple key uids. The OpenPGP public key obtained 394 from a OPENPGPKEY RR can be used as long as the query and resulting 395 data form a proper email to uid identity association. 397 CNAME's (see [RFC2181]) and DNAME's (see [RFC6672]) can be followed 398 to obtain an OPENPGPKEY RR, as long as the original recipient's email 399 address appears as one of the OpenPGP public key uids. For example, 400 if the OPENPGPKEY RR query for hugh@example.com 401 (8d57[...]b7._openpgpkey.example.com) yields a CNAME to 402 8d57[...]b7._openpgpkey.example.net, and an OPENPGPKEY RR for 403 8d57[...]b7._openpgpkey.example.net exists, then this OpenPGP public 404 key can be used, provided one of the key uids contains 405 "hugh@example.com". This public key cannot be used if it would only 406 contain the key uid "hugh@example.net". 408 If one of the OpenPGP key uids contains only a single wildcard as the 409 LHS of the email address, such as "*@example.com", the OpenPGP public 410 key may be used for any email address within that domain. Wildcards 411 at other locations (eg hugh@*.com) or regular expressions in key uids 412 are not allowed, and any OPENPGPKEY RR containing these MUST be 413 ignored. 415 6. OpenPGP Key size and DNS 417 Due to the expected size of the OPENPGPKEY record, applications 418 SHOULD use TCP - not UDP - to perform queries for the OPENPGPKEY 419 Resource Record. 421 Although the reliability of the transport of large DNS Resource 422 Records has improved in the last years, it is still recommended to 423 keep the DNS records as small as possible without sacrificing the 424 security properties of the public key. The algorithm type and key 425 size of OpenPGP keys should not be modified to accommodate this 426 section. 428 OpenPGP supports various attributes that do not contribute to the 429 security of a key, such as an embedded image file. It is recommended 430 that these properties not be exported to OpenPGP public keyrings that 431 are used to create OPENPGPKEY Resource Records. Some OpenPGP 432 software, for example GnuPG, support a "minimal key export" that is 433 well suited to use as OPENPGPKEY RDATA. See Appendix A. 435 7. Security Considerations 437 DNSSEC is not an alternative for the "web of trust" or for manual 438 fingerprint verification by users. DANE for OpenPGP as specified in 439 this document is a solution aimed to ease obtaining someone's public 440 key. Without manual verification of the OpenPGP key obtained via 441 DANE, this retrieved key should only be used for encryption if the 442 only other alternative is sending the message in plaintext. While 443 this thwarts all passive attacks that simply capture and log all 444 plaintext email content, it is not a security measure against active 445 attacks. A user who publishes an OPENPGPKEY record in DNS still 446 expects senders to perform their due diligence by additional (non- 447 DNSSEC) verification of their public key via other out-of-band 448 methods before sending any confidential or sensitive information. 450 In other words, the OPENPGPKEY record MUST NOT be used to send 451 sensitive information without additional verification or confirmation 452 that the OpenPGP key actually belongs to the target recipient. 454 Various components could be responsible for encrypting an email 455 message to a target recipient. It could be done by the sender's MUA 456 or a MUA plugin or the sender's MTA. Each of these have their own 457 characteristics. A MUA can ask the user to make a decision before 458 continuing. The MUA can either accept or refuse a message. The MTA 459 must deliver the message as-is, or encrypt the message before 460 delivering. Each of these components should attempt to encrypt an 461 unencrypted outgoing message whenever possible. 463 In theory, two different local-parts could hash to the same value. 464 This document assumes that such a hash collision has a negliable 465 chance of happening. 467 Organisations that are required to be able to read everyone's 468 encrypted email should publish the escrow key as the OPENPGPKEY 469 record. Mail servers of such organizations MAY optionally re-encrypt 470 the message to the individual's OpenPGP key. 472 7.1. MTA behaviour 474 An MTA could be operating in a stand-alone mode, without access to 475 the sender's OpenPGP public keyring, or in a way where it can access 476 the user's OpenPGP public keyring. Regardless, the MTA MUST NOT 477 modify the user's OpenPGP keyring. 479 An MTA sending an email MUST NOT add the public key obtained from an 480 OPENPGPKEY resource record to a permanent public keyring for future 481 use beyond the TTL. 483 If the obtained public key is revoked, the MTA MUST NOT use the key 484 for encryption, even if that would result in sending the message in 485 plaintext. 487 If a message is already encrypted, the MTA SHOULD NOT re-encrypt the 488 message, even if different encryption schemes or different encryption 489 keys would be used. 491 If the DNS request for an OPENPGPKEY record returned an Indeterminate 492 or Bogus answer as specified in [RFC4035], the MTA MUST NOT send the 493 message and queue the plaintext message for encrypted delivery at a 494 later time. If the problem persists, the email should be returned 495 via the regular bounce methods. 497 If multiple non-revoked OPENPGPKEY resource records are found, the 498 MTA SHOULD pick the most secure RR based on its local policy. 500 7.2. MUA behaviour 502 If the public key for a recipient obtained from the locally stored 503 sender's public keyring differs from the recipient's OPENPGPKEY RR, 504 the MUA SHOULD halt processing the message and interact with the user 505 to resolve the conflict before continuing to process the message. 507 If the public key for a recipient obtained from the locally stored 508 sender's public keyring contains contradicting properties for the 509 same key obtained from an OPENPGPKEY RR, the MUA SHOULD NOT accept 510 the message for delivery. 512 If multiple non-revoked OPENPGPKEY resource records are found, the 513 MUA SHOULD pick the most secure OpenPGP public key based on its local 514 policy. 516 The MUA MAY interact with the user to resolve any conflicts between 517 locally stored keyrings and OPENPGPKEY RRdata. 519 A MUA that is encrypting a message SHOULD clearly indicate to the 520 user the difference between encrypting to a locally stored and 521 previously user-verified public key and encrypting to public key 522 obtained via an OPENPGPKEY resource record that was not manually 523 verified by the user in the past. 525 7.3. Response size 527 To prevent amplification attacks, an Authoritative DNS server MAY 528 wish to prevent returning OPENPGPKEY records over UDP unless the 529 source IP address has been confirmed with [EDNS-COOKIE]. Such 530 servers MUST NOT return REFUSED, but answer the query with an empty 531 Answer Section and the truncation flag set ("TC=1"). 533 7.4. Email address information leak 535 The hashing of the local-part in this document is not a security 536 feature. Publishing OPENPGPKEY records however, will create a list 537 of hashes of valid email addresses, which could simplify obtaining a 538 list of valid email addresses for a particular domain. It is 539 desirable to not ease the harvesting of email addresses where 540 possible. 542 The domain name part of the email address is not used as part of the 543 hash so that hashes can be used in multiple zones deployed using 544 DNAME [RFC6672]. This does makes it slightly easier and cheaper to 545 brute-force the SHA2-256 hashes into common and short user names, as 546 single rainbow tables can be re-used across domains. This can be 547 somewhat countered by using NSEC3. 549 DNS zones that are signed with DNSSEC using NSEC for denial of 550 existence are susceptible to zone-walking, a mechanism that allows 551 someone to enumerate all the OPENPGPKEY hashes in a zone. This can 552 be used in combination with previously hashed common or short user 553 names (in rainbow tables) to deduce valid email addresses. DNSSEC- 554 signed zones using NSEC3 for denial of existence instead of NSEC are 555 significantly harder to brute-force after performing a zone-walk. 557 7.5. Storage of OPENPGPKEY data 559 Users may have a local key store with OpenPGP public keys. An 560 application supporting the use of OPENPGPKEY DNS records MUST NOT 561 modify the local key store without explicit confirmation of the user, 562 as the application is unaware of the user's personal policy for 563 adding, removing or updating their local key store. An application 564 MAY warn the user if an OPENPGPKEY record does not match the OpenPGP 565 public key in the local key store. 567 Applications that cannot interact with users, such as daemon 568 processes, SHOULD store OpenPGP public keys obtained via OPENPGPKEY 569 up to their DNS TTL value. This avoids repeated DNS lookups that 570 third parties could monitor to determine when an email is being sent 571 to a particular user. 573 7.6. Security of OpenPGP versus DNSSEC 575 Anyone who can obtain a DNSSEC private key of a domain name via 576 coercion, theft or brute force calculations, can replace any 577 OPENPGPKEY record in that zone and all of the delegated child zones. 578 Any future messages encrypted with the malicious OpenPGP key could 579 then be read. 581 Therefore, an OpenPGP key obtained via a DNSSEC validated OPENPGPKEY 582 record can only be trusted as much as the DNS domain can be trusted, 583 and is no substitute for in-person OpenPGP key verification or 584 additional Openpgp verification via "Web Of Trust" signatures present 585 on the OpenPGP in question. 587 8. Implementation Status 589 [RFC Editor Note: Please remove this entire seciton prior to 590 publication as an RFC.] 592 This section records the status of known implementations of the 593 protocol defined by this specification at the time of posting of this 594 Internet-Draft, and is based on a proposal described in [RFC6982]. 595 The description of implementations in this section is intended to 596 assist the IETF in its decision processes in progressing drafts to 597 RFCs. Please note that the listing of any individual implementation 598 here does not imply endorsement by the IETF. Furthermore, no effort 599 has been spent to verify the information presented here that was 600 supplied by IETF contributors. This is not intended as, and must not 601 be construed to be, a catalog of available implementations or their 602 features. Readers are advised to note that other implementations may 603 exist. According to RFC 6982, "this will allow reviewers and working 604 groups to assign due consideration to documents that have the benefit 605 of running code, which may serve as evidence of valuable 606 experimentation and feedback that have made the implemented protocols 607 more mature. It is up to the individual working groups to use this 608 information as they see fit." 610 8.1. The GNU Privacy Guard (GNUpg) 612 Implementation Name and Details: The GNUpg software, more commonly 613 known as "gpg", is is available at https://gnupg.org/ 615 Brief Description: Support has been added to gnupg in their git 616 repository. This code is expected to be part of the next official 617 release. 619 Level of Maturity: The implementation has just been added and has 620 not seen widespread deployment. 622 Coverage: The implementation follows the latest draft with the 623 exception that it first performs a lowercase of the local-part 624 before hashing. This is done because other parts in the code that 625 perform a lookup of uid already performed a localcasing to ensure 626 case insensitivity. The implementors are tracking the development 627 of this draft in particular with respect to the lowercase issue. 629 Licensing: All code is covered under the GNU Public License version 630 3 or later. 632 Implementation Experience: Currrent experience limited to small test 633 networks only 635 Contact Information: https://gnupg.org/ 637 Interoperability: No report. 639 8.2. hash-slinger 641 Implementation Name and Details: The hash-slinger software is a 642 collection of tools to generate, download and verify application 643 public keys and application fingerprints. It uses DNSSEC 644 validation. The tool is written by the author of this document. 645 It is available at http://people.redhat.com/pwouters/ 647 Brief Description: Support has been added in the form of an 648 "openpgpkey" command that can generate, fetch, validate the DNSSEC 649 authentication and verify OPENPGPKEY records. 651 Level of Maturity: The implementation has been around for a few 652 months but has not seen widespread deployment. 654 Coverage: The implementation follows the latest draft with the 655 exception that it first performs a lowercase of the local-part 656 before hashing. 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: pwouters@redhat.com 666 Interoperability: No report. 668 8.3. openpgpkey-milter 669 Implementation Name and Details: The openpgpkey-milter is a Postfix 670 and Sendmail Mail server plugin (milter) that automatically 671 encrypts email before sending further to other SMTP servers. It 672 is written by the author of this document. It is available at 673 http://github.com/letoams/openpgpkey-milter/ 675 Brief Description: Before forwarding an unencrypted email, the 676 plugin looks for the presence of an OPENPGPKEY record. When 677 available, it will encrypt the email message and send out the 678 encrypted email. 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 9. IANA Considerations 699 9.1. OPENPGPKEY RRtype 701 This document uses a new DNS RR type, OPENPGPKEY, whose value 61 has 702 been allocated by IANA from the Resource Record (RR) TYPEs 703 subregistry of the Domain Name System (DNS) Parameters registry. 705 10. Acknowledgments 707 This document is based on RFC-4255 and draft-ietf-dane-smime whose 708 authors are Paul Hoffman, Jacob Schlyter and W. Griffin. Olafur 709 Gudmundsson provided feedback and suggested various improvements. 710 Willem Toorop contributed the gpg and hexdump command options. 711 Daniel Kahn Gillmor provided the text describing the OpenPGP packet 712 formats and filtering options. Edwin Taylor contributed language 713 improvements for various iterations of this document. Text regarding 714 email mappings was taken from draft-levine-dns-mailbox whose author 715 is John Levine. 717 11. References 719 11.1. Normative References 721 [RFC1035] Mockapetris, P., "Domain names - implementation and 722 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 723 November 1987, . 725 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 726 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 727 RFC2119, March 1997, 728 . 730 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 731 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 732 . 734 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 735 Rose, "DNS Security Introduction and Requirements", RFC 736 4033, DOI 10.17487/RFC4033, March 2005, 737 . 739 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 740 Rose, "Resource Records for the DNS Security Extensions", 741 RFC 4034, DOI 10.17487/RFC4034, March 2005, 742 . 744 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 745 Rose, "Protocol Modifications for the DNS Security 746 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 747 . 749 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 750 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 751 . 753 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. 754 Thayer, "OpenPGP Message Format", RFC 4880, DOI 10.17487/ 755 RFC4880, November 2007, 756 . 758 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic 759 Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January 760 2010, . 762 11.2. Informative References 764 [EDNS-COOKIE] 765 Eastlake, Donald., "Domain Name System (DNS) Cookies", 766 draft-ietf-dnsop-cookies (work in progress), August 2015. 768 [HKP] Shaw, D., "The OpenPGP HTTP Keyserver Protocol (HKP)", 769 draft-shaw-openpgp-hkp (work in progress), March 2013. 771 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 772 (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September 773 2003, . 775 [RFC4398] Josefsson, S., "Storing Certificates in the Domain Name 776 System (DNS)", RFC 4398, DOI 10.17487/RFC4398, March 2006, 777 . 779 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 780 DOI 10.17487/RFC5321, October 2008, 781 . 783 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 784 10.17487/RFC5322, October 2008, 785 . 787 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 788 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530, 789 February 2012, . 791 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the 792 DNS", RFC 6672, DOI 10.17487/RFC6672, June 2012, 793 . 795 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 796 of Named Entities (DANE) Transport Layer Security (TLS) 797 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 798 2012, . 800 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 801 Code: The Implementation Status Section", RFC 6982, DOI 802 10.17487/RFC6982, July 2013, 803 . 805 Appendix A. Generating OPENPGPKEY records 807 The commonly available GnuPG software can be used to generate a 808 minimum Transferable Public Key for the RRdata portion of an 809 OPENPGPKEY record: 811 gpg --export --export-options export-minimal,no-export-attributes \ 812 hugh@example.com | base64 814 The --armor or -a option of the gpg command should NOT be used, as it 815 adds additional markers around the armored key. 817 When DNS software reading or signing the zone file does not yet 818 support the OPENPGPKEY RRtype, the Generic Record Syntax of [RFC3597] 819 can be used to generate the RDATA. One needs to calculate the number 820 of octets and the actual data in hexadecimal: 822 gpg --export --export-options export-minimal,no-export-attributes \ 823 hugh@example.com | wc -c 825 gpg --export --export-options export-minimal,no-export-attributes \ 826 hugh@example.com | hexdump -e \ 827 '"\t" /1 "%.2x"' -e '/32 "\n"' 829 These values can then be used to generate a generic record (line 830 break has been added for formatting): 832 ._openpgpkey.example.com. IN TYPE61 \# \ 833 835 The openpgpkey command in the hash-slinger software can be used to 836 generate complete OPENPGPKEY records 838 ~> openpgpkey --output rfc hugh@example.com 839 c9[..]d6._openpgpkey.example.com. IN OPENPGPKEY mQCNAzIG[...] 841 ~> openpgpkey --output generic hugh@example.com 842 c9[..]d6._openpgpkey.example.com. IN TYPE61 \# 2313 99008d03[...] 844 Author's Address 846 Paul Wouters 847 Red Hat 849 Email: pwouters@redhat.com