idnits 2.17.00 (12 Aug 2021) /tmp/idnits40265/draft-wouters-dane-openpgp-01.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 (October 21, 2013) is 3134 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) == Missing Reference: 'TBD' is mentioned on line 387, but not defined -- Obsolete informational reference (is this intentional?): RFC 2822 (Obsoleted by RFC 5322) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 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: Standards Track October 21, 2013 5 Expires: April 24, 2014 7 Using DANE to Associate OpenPGP public keys with email addresses 8 draft-wouters-dane-openpgp-01 10 Abstract 12 OpenPGP is a message format for email (and file) encryption, that 13 lacks a standarized lookup mechanism to obtain OpenPGP public keys. 14 This document specifies a standarized method for securely publishing 15 and locating OpenPGP public keys in DNS using a new OPENPGPKEY DNS 16 Resource Record. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on April 24, 2014. 35 Copyright Notice 37 Copyright (c) 2013 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. The OPENPGPKEY record presence . . . . . . . . . . . . . . . 3 55 3. The OPENPGPKEY Resource Record . . . . . . . . . . . . . . . 4 56 3.1. Location of the OpenPGPKEY record . . . . . . . . . . . . 4 57 3.2. The OPENPGPKEY RDATA Format . . . . . . . . . . . . . . . 5 58 4. OpenPGP public key considerations . . . . . . . . . . . . . . 5 59 4.1. Public Key UIDs and email addresses . . . . . . . . . . . 5 60 4.2. Public Key UIDs and IDNA . . . . . . . . . . . . . . . . 5 61 4.3. Public Key UIDs and synthesized DNS records . . . . . . . 5 62 4.4. Public Key size and DNS record size . . . . . . . . . . . 6 63 5. Security Considerations . . . . . . . . . . . . . . . . . . . 6 64 5.1. Email address information leak . . . . . . . . . . . . . 7 65 5.2. OpenPGP security and DNSSEC . . . . . . . . . . . . . . . 7 66 5.3. MTA behaviour . . . . . . . . . . . . . . . . . . . . . . 7 67 5.4. MUA behaviour . . . . . . . . . . . . . . . . . . . . . . 8 68 5.5. Email client behaviour . . . . . . . . . . . . . . . . . 8 69 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 70 6.1. OPENPGPKEY RRtype . . . . . . . . . . . . . . . . . . . . 9 71 7. Generating OPENPGPKEY RRdata . . . . . . . . . . . . . . . . 9 72 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 73 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 75 9.2. Informative References . . . . . . . . . . . . . . . . . 10 76 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 78 1. Introduction 80 To encrypt a message to a target recipient using OpenPGP [RFC4880], 81 possession of the recipient's OpenPGP public key is required. To 82 obtain that public key, two problems need to be solved by the 83 sender's email client, MUA or MTA. Where does one find the 84 recipient's public key and how does one trust that the found key 85 actually belongs to the intended recipient. 87 Obtaining a public key is not a straightforward process as there are 88 no trusted standarized locations for publishing OpenPGP public keys 89 indexed by email address. Instead, OpenPGP clients rely on "well- 90 known key servers" that are accessed using the web based HKP protocol 91 or manually by users using a variety of differently formatted front- 92 end web pages. 94 Currently deployed key servers have no method of validating any 95 uploaded OpenPGP public key. The key servers simply store and 96 publish. Anyone can add public keys with any identities and anyone 97 can add signatures to any other public key using forged malicious 98 identities. Furthermore, once uploaded, public keys cannot be 99 deleted. People who did not pre-sign a key revocation can never 100 remove their public key from these key servers. 102 The lack of association of email address and public key lookup is 103 also preventing email clients, MTAs and MUAs from encrypting a 104 received message to the target receipient forcing the software to 105 send the message unencryped. Currently deployed MTA's only support 106 encrypting the transport of the email, not the email contents itself. 108 This document describes a mechanism to associate a user's OpenPGP 109 public key with their email address, using a new DNS RRtype. This is 110 similar to the SSHFP [RFC4255] RRType, except that this method 111 associates keys with users, not hosts. 113 The proposed new DNS Resource Record type is secured using DNSSEC. 114 This trust model is not meant to replace the "web of trust" model. 115 However, it can be used to encrypt a message that would otherwise 116 have to be sent out unencrypted, where it could be intercepted by a 117 third party in transit or located in plaintext on a storage or email 118 server. 120 1.1. Terminology 122 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 123 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 124 document are to be interpreted as described in RFC 2119 [RFC2119]. 126 This document also makes use of standard DNSSEC and DANE terminology. 127 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for 128 these terms. 130 2. The OPENPGPKEY record presence 132 A user who publishes an OPENPGPKEY record in DNS explicitly favours 133 receiving encrypted email instead of unencrypted email. 135 A user who publishes an OPENPGPKEY record in DNS still expects 136 senders to perform their due diligence by additional verification of 137 their public key via other out-of-band methods before sending any 138 confidential or sensitive information 140 In other words, the OPENPGPKEY record in DNS, without any additional 141 verification, should be used only as an alternative to sending 142 plaintext email. It SHOULD NOT be used to change one's opinion on 143 whether it is safe or appropriate to sent the content via email in 144 the first place. 146 3. The OPENPGPKEY Resource Record 148 The OPENPGPKEY DNS resource record (RR) is used to associate an end 149 entity OpenPGP public key with an email address, thus forming a 150 "OpenPGP public key association". 152 The type value allocated for the OPENPGPKEY RR type is [TBD]. The 153 OPENPGPKEY RR is class independent. The OPENPGPKEY RR has no special 154 TTL requirements. If an an OPENPGPKEY RR contains an expired OpenPGP 155 public key, it MUST NOT be used for encryption. 157 3.1. Location of the OpenPGPKEY record 159 Email addresses are mapped into DNS using the following method: 161 1. The user name (the "left-hand side" of the email address, called 162 the "local-part" in the mail message format definition [RFC2822] 163 and the "local part" in the specification for internationalized 164 email [RFC6530]), is encoded with Base32 [RFC4648], to become the 165 left-most label in the prepared domain name. This does not 166 include the at symbol ("@") that separates the left and right 167 sides of the email address but does include any trailing equal 168 signs ("=") of base64 padding. 170 2. The string "_openpgpkey" becomes the second left-most label in 171 the prepared domain name. 173 3. The domain name (the "right-hand side" of the email address, 174 called the "domain" in RFC 2822) is appended to the result of 175 step 2 to complete the prepared domain name. 177 For example, to request an OPENPGPKEY resource record for a user 178 whose address is "hugh@example.com", you would use 179 "nb2wo2a=._openpgpkey.example.com" in the request. The corresponding 180 RR in the example.com zone might look like: 182 nb2wo2a=._openpgpkey.example.com. IN OPENPGPKEY 184 Design note: Encoding the user name with Base32 allows local parts 185 that have characters that would prevent their use in domain names. 186 For example, a period (".") is a valid character in a local part, but 187 would wreak havoc in a domain name. Similarly, RFC 6530 allows non- 188 ASCII characters in local parts, and encoding a local part with non- 189 ASCII characters with Base32 renders the name usable in the DNS. The 190 equal sign ("=") is a valid character for a DNS label, even though it 191 is not a valid character for a DNS hostname. 193 3.2. The OPENPGPKEY RDATA Format 195 The RDATA (or RHS) of an OPENPGPKEY Resource Record contains a single 196 value consisting of a [RFC4880] formatted OpenPGP public keyring 197 encoded in base64 as specified in [RFC4648]. This is not equivalent 198 to an "ascii armor export" which adds a header, a footer, and 199 sometimes additional items, to the exported data. 201 4. OpenPGP public key considerations 203 Once an OPENPGPKEY resource record has been found and the OpenPGP 204 public keyring has been decoded, the right public key must be located 205 inside the keyring. For a public key in the keyring to be usable, 206 the public key has to have a key uid as specified in [RFC4648] that 207 matches the email address for which the OPENPGPKEY RR lookup was 208 performed. 210 4.1. Public Key UIDs and email addresses 212 An OpenPGP public key can be associated with multiple email addresses 213 by specifying multiple key uids. The OpenPGP public key obtained 214 from a OPENPGPKEY RR can be used as long as the target recipient's 215 email address appears as one of the OpenPGP public key uids. The 216 name part (left of the @) should appear in the native format, not its 217 base32 encoding that was used to lookup the OPENPGPKEY RR. 219 4.2. Public Key UIDs and IDNA 221 Internationalized domains that use non-ascii characters (U-label) are 222 encoded in DNS using IDNA [RFC5891] - also referred to as punycode or 223 A-label. When matching OpenPGP public key uids, both the email 224 address specified using U-label and A-label should be considered as 225 valid public key uids. 227 4.3. Public Key UIDs and synthesized DNS records 229 CNAME's (see [RFC2181]) and DNAME's (see [RFC6672]) can be followed 230 to obtain an OPENPGPKEY RR, as long as the original recipient's email 231 address appears as one of the OpenPGP public key uids. For example, 232 if the OPENPGPKEY RR query for hugh@example.com 233 (b2wo2a=._openpgpkey.example.com) yields a CNAME to 234 b2wo2a=._openpgpkey.example.net, and an OPENPGPKEY RR for 235 b2wo2a=._openpgpkey.example.net exists, then this OpenPGP public key 236 can be used, provided one of the key uids contains 237 "hugh@example.com". This public key cannot be used if it would only 238 contain the key uid "hugh@example.net". 240 If one of the OpenPGP key uids contains only a single wildcard as the 241 LHS of the email address, such as "*@example.com", the OpenPGP public 242 key may be used for any email address within that domain. Wildcards 243 at other locations (eg hugh@*.com) or regular expressions in key uids 244 are not allowed, and any OPENPGPKEY RR containing these should be 245 ignored. 247 4.4. Public Key size and DNS record size 249 Although the reliability of the transport of large DNS Resoruce 250 Records has improved in the last few years, it is still recommended 251 to keep the DNS records as small as possible without sacrificing the 252 security properties of the public key. The algorithm type and key 253 size of the OpenPGP keypair should not be modified to accomodate this 254 section. 256 [Should a statement be made on the number of signatures left on the 257 key? Should there be _any_ signatures other than the self-signed 258 one?] 260 OpenPGP supports various attributes that do not contribute to the 261 security of a key, such as an embedded image file. It is recommended 262 that these properties are not exported to OpenPGP public keyrings 263 that are used to create OPENPGPKEY Resource Records. 265 5. Security Considerations 267 The main goal of the OPENPGPKEY resource record is to stop passive 268 attacks against plaintext emails. While it can also twart some 269 active attacks (such as people uploading rogue keys to keyservers in 270 the hopes that others will encrypt to these rogue keys), this 271 resource record is not a replacement for verifying OpenPGP public 272 keys via the web of trust signatures, or manually via a fingerprint 273 verification. 275 Various components could be responsible for encrypting an email 276 message to a target recipient. It could be done by the sender's 277 email client or software plugin, the sender's Mail User Agent (MUA) 278 or the sender's Mail Transfer Agent (MTA). Each of these have their 279 own characteristics. An email client can direct the human to make a 280 decision before continuing. The MUA can either accept or refuse a 281 message. The MTA must deliver the message as-is, or encrypt the 282 message before delivering. Each of these programs should ensure that 283 the security of an email message is never downgraded, and that an 284 unencrypted received message will be encrypted whenever possible. 286 Organisations that require to be able to read everyone's encrypted 287 email should publish the escrow key as the OPENPGPKEY record. Upon 288 receipt, such mail servers can optionally re-encrypt the message to 289 the individual's OpenPGP key. 291 5.1. Email address information leak 293 DNS zones that are signed with DNSSEC using NSEC for denial of 294 existence are susceptible to zone-walking, a mechanism that allow 295 someone to enumerate all the names in the zone. Someone who wanted 296 to collect email addresses from a zone that uses OPENPGPKEY might use 297 such a mechanism. DNSSEC-signed zones using NSEC3 for denial of 298 existence are significantly less susceptible to zone-walking. 299 Someone could still attempt a dictionary attack on the zone to find 300 OPENPGPKEY records, just as they can use dictionary attacks on an 301 SMTP server or grab the entire contents of existing PGP key servers 302 to see which addresses are valid. 304 5.2. OpenPGP security and DNSSEC 306 DNSSEC key sizes are chosen based on the fact that these keys can be 307 rolled with next to no requirement for security in the future. If 308 one doubts the strength or security of the DNSSEC key for whatever 309 reason, one simply rolls to a new DNSSEC key with a stronger 310 algorithm or larger key size. 312 This effectively means that anyone who can obtain a DNSSEC private 313 key of a domain name via coercion, theft or brute force calculations, 314 can replace any OPENPGPKEY record in that zone and all of the 315 delegated child zones, irrespective of the key length strength of the 316 OpenPGP keypair. 318 Therefor, DNSSEC is not an alternative for the "web of trust" or for 319 manual fingerprint verification by humans. It is a solution aimed to 320 ease obtaining someone's public key, and without manual verification 321 should be treated as "better then plaintext" only. While this twarts 322 all passive attacks that simply capture and log all plaintext email 323 content, it is not a security measure against active attacks. 325 5.3. MTA behaviour 327 An MTA could be operating in a stand-alone mode, without access to 328 the sender's OpenPGP public keyring, or in a way where it can access 329 the user's OpenPGP public keyring. Regardless, the MTA MUST NOT 330 modify the user's OpenPGP keyring. 332 An MTA sending an email MUST NOT add the public key obtained from an 333 OPENPGPKEY resource record to a permanent public keyring for future 334 use beyond the TTL. 336 If the obtained public key is revoked, the MTA MUST NOT use the key 337 for encryption, even if that would result in sending the message in 338 plaintext. 340 If a message is already encrypted, the MTA SHOULD NOT re-encrypt the 341 message, even if different encryption schemes or different encryption 342 keys were used. 344 If an OPENPGPKEY resource record is received without DNSSEC 345 protection, it MAY still be used for encryption. 347 If the DNS request for an OPENPGPKEY returned an "indeterminate" or 348 "bogus" answer, the MTA MUST NOT sent the message and queue the 349 plaintext message for delivery at a later time. If the problem 350 persists, the email should be returned via the regular bounce 351 methods. 353 If multiple non-revoked OPENPGPKEY resource records are found, the 354 MTA SHOULD pick the most secure RR based on its local policy. [or 355 should it encrypt to both?] 357 5.4. MUA behaviour 359 If the public key for a recipient obtained from the locally stored 360 sender's public keyring differs from the recipient's OPENPGPKEY RR, 361 the MUA MUST NOT accept the message for delivery. 363 If the public key for a recipient obtained from the locally stored 364 sender's public keyring contains contradicting properties for the 365 same key obtained from an OPENPGPKEY RR, the MUA SHOULD NOT accept 366 the message for delivery. 368 If multiple non-revoked OPENPGPKEY resource records are found, the 369 MUA SHOULD pick the most secure OpenPGP public key based on its local 370 policy. 372 5.5. Email client behaviour 374 Email clients should adhere to the above listed MUA behaviour. 375 Additionally, an email client MAY interact with the user to resolve 376 any conflicts between locally stored keyrings and OPENPGPKEY RRdata. 378 An email client that is encrypting a message SHOULD clearly indicate 379 to the user the difference between encrypting to a locally stored and 380 humanly verified public key and encrypting to an unverified (by the 381 human sender) public key obtained via an OPENPGPKEY resource record. 383 6. IANA Considerations 385 6.1. OPENPGPKEY RRtype 387 This document uses a new DNS RR type, OPENPGPKEY, whose value [TBD] 388 has been allocated by IANA from the Resource Record (RR) TYPEs 389 subregistry of the Domain Name System (DNS) Parameters registry. 391 7. Generating OPENPGPKEY RRdata 393 The commonly available GnuPG software can be used to generate the 394 RRdata portion of an OPENPGPKEY record: 396 gpg --export --export-options export-minimal \ 397 your@email.com | base64 399 The --armor or -a option should NOT be used. While it also provides 400 a base64 encoded copy of the binary openpgk key data, it adds a 401 header and footer to the output. 403 8. Acknowledgements 405 This document is based on RFC-4255 and draft-ietf-dane-smime whose 406 authors are Paul Hoffman, Jacob Schlyter and W. Griffin. 408 9. References 410 9.1. Normative References 412 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 413 Requirement Levels", BCP 14, RFC 2119, March 1997. 415 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 416 Rose, "DNS Security Introduction and Requirements", RFC 417 4033, March 2005. 419 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 420 Rose, "Resource Records for the DNS Security Extensions", 421 RFC 4034, March 2005. 423 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 424 Rose, "Protocol Modifications for the DNS Security 425 Extensions", RFC 4035, March 2005. 427 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 428 Encodings", RFC 4648, October 2006. 430 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. 431 Thayer, "OpenPGP Message Format", RFC 4880, November 2007. 433 [RFC5891] Klensin, J., "Internationalized Domain Names in 434 Applications (IDNA): Protocol", RFC 5891, August 2010. 436 9.2. Informative References 438 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 439 Specification", RFC 2181, July 1997. 441 [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 442 2001. 444 [RFC4255] Schlyter, J. and W. Griffin, "Using DNS to Securely 445 Publish Secure Shell (SSH) Key Fingerprints", RFC 4255, 446 January 2006. 448 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 449 Internationalized Email", RFC 6530, February 2012. 451 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the 452 DNS", RFC 6672, June 2012. 454 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 455 of Named Entities (DANE) Transport Layer Security (TLS) 456 Protocol: TLSA", RFC 6698, August 2012. 458 Author's Address 460 Paul Wouters 461 Red Hat 463 Email: pwouters@redhat.com