idnits 2.17.1 draft-wouters-dane-openpgp-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 15, 2013) is 3931 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 388, 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 July 15, 2013 5 Expires: January 16, 2014 7 Using DANE to Associate OpenPGP public keys with email addresses 8 draft-wouters-dane-openpgp-00 10 Abstract 12 OpenPGP is a message format for email (and file) encryption, that 13 lacks a standarized secure lookup mechanism to obtain OpenPGP public 14 keys. This document specifies a standarized method for securely 15 publishing and locating OpenPGP public keys in DNS using a new 16 OPENPGPKEY DNS 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 January 16, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. The OPENPGPKEY Resource Record . . . . . . . . . . . . . . . . 4 55 2.1. Location of the OpenPGPKEY record . . . . . . . . . . . . 4 56 2.2. The OPENPGPKEY RDATA Format . . . . . . . . . . . . . . . 5 57 3. OpenPGP public key considerations . . . . . . . . . . . . . . 5 58 3.1. Public Key UIDs and email addresses . . . . . . . . . . . 5 59 3.2. Public Key UIDs and IDNA . . . . . . . . . . . . . . . . . 5 60 3.3. Public Key UIDs and synthesized DNS records . . . . . . . 5 61 3.4. Public Key size and DNS record size . . . . . . . . . . . 6 62 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 63 4.1. Email address information leak . . . . . . . . . . . . . . 7 64 4.2. OpenPGP security and DNSSEC . . . . . . . . . . . . . . . 7 65 4.3. MTA behaviour . . . . . . . . . . . . . . . . . . . . . . 7 66 4.4. MUA behaviour . . . . . . . . . . . . . . . . . . . . . . 8 67 4.5. Email client behaviour . . . . . . . . . . . . . . . . . . 8 68 4.6. Subject: line encryption . . . . . . . . . . . . . . . . . 9 69 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 70 5.1. OPENPGPKEY RRtype . . . . . . . . . . . . . . . . . . . . 9 71 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 72 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 7.1. Normative References . . . . . . . . . . . . . . . . . . . 9 74 7.2. Informative References . . . . . . . . . . . . . . . . . . 10 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 10 77 1. Introduction 79 To encrypt a message to a target recipient using OpenPGP [RFC4880], 80 possession of the recipient's OpenPGP public key is required. To 81 obtain that public key, two problems need to be solved by the 82 sender's email client, MUA or MTA. Where does one find the 83 recipient's public key and how does one trust that the found key 84 actually belongs to the intended recipient. 86 Obtaining a public key is not a straightforward process as there are 87 no standarized locations for publishing OpenPGP public keys indexed 88 by email address. Instead, OpenPGP clients rely on "well known key 89 servers" that are accessed using the web based HKP protocol or 90 manually by users using a variety of different front-end web pages. 92 Currently deployed key servers have no method of validating any 93 uploaded OpenPGP public key. The key servers simply store and 94 publish. Anyone can add public keys with any name or email address 95 and anyone can add signatures to any other public key using forged 96 malicious identities. For example, bogus keys of prominent 97 dissidents have been uploaded to these well-known key servers in 98 attempts to capture encrypted email. Furthermore, once uploaded, 99 public keys cannot be deleted. People who did not pre-sign a key 100 revocation and who have lost access to their private key can never 101 remove their public key from these key servers. 103 The lack of association of email address and public key lookup is 104 also preventing email clients, MTAs and MUAs from encrypting a 105 received message to the target receipient forcing the software to 106 send the message unencryped. Currently deployed MTA's only support 107 encrypting the transport of the email, not the email contents itself. 109 This document describes a mechanism to associate a user's OpenPGP 110 public key with their email address, using a new DNS RRtype. This is 111 similar to the SSHFP [RFC4255] RRType, except that this method 112 associates keys with users, not hosts. 114 The proposed new DNS Resource Record type is secured using DNSSEC. 115 This trust model is not meant to replace the "web of trust" model. 116 However, it can be used to encrypt a message that would otherwise 117 have to be sent out unencrypted, where it could be intercepted by a 118 third party in transit or located in plaintext on a storage or email 119 server. 121 1.1. Terminology 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 125 document are to be interpreted as described in RFC 2119 [RFC2119]. 127 This document also makes use of standard DNSSEC and DANE terminology. 128 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for 129 these terms. 131 2. The OPENPGPKEY Resource Record 133 The OPENPGPKEY DNS resource record (RR) is used to associate an end 134 entity OpenPGP public key with an email address, thus forming a 135 "OpenPGP public key association". 137 The type value allocated for the OPENPGPKEY RR type is [TBD]. The 138 OPENPGPKEY RR is class independent. The OPENPGPKEY RR has no special 139 TTL requirements. 141 2.1. Location of the OpenPGPKEY record 143 Domain names are prepared for requests in the following manner. 145 1. The user name (the "left-hand side" of the email address, called 146 the "local-part" in the mail message format definition [RFC2822] 147 and the "local part" in the specification for internationalized 148 email [RFC6530]), is encoded with Base32 [RFC4648], to become the 149 left-most label in the prepared domain name. This does not 150 include the "@" character that separates the left and right sides 151 of the email address. 153 2. The string "_openpgpkey" becomes the second left-most label in 154 the prepared domain name. 156 3. The domain name (the "right-hand side" of the email address, 157 called the "domain" in RFC 2822) is appended to the result of 158 step 2 to complete the prepared domain name. 160 For example, to request an OPENPGPKEY resource record for a user 161 whose address is "hugh@example.com", you would use 162 "d1qmeq0._openpgpkey.example.com" in the request. The corresponding 163 RR in the example.com zone might look like: 165 d1qmeq0._openpgpkey.example.com. IN OPENPGPKEY 167 Design note: Encoding the user name with Base32 allows local parts 168 that have characters that would prevent their use in domain names. 169 For example, a period (".") is a valid character in a local part, but 170 would wreak havoc in a domain name. Similarly, RFC 6530 allows non- 171 ASCII characters in local parts, and encoding a local part with non- 172 ASCII characters with Base32 renders the name usable in the DNS. 174 2.2. The OPENPGPKEY RDATA Format 176 The RDATA (or RHS) of an OPENPGPKEY Resource Record contains a single 177 value consisting of a [RFC4880] formatted OpenPGP public keyring 178 encoded in base32 as specified in [RFC4648]. 180 3. OpenPGP public key considerations 182 Once an OPENPGPKEY resource record has been found and the OpenPGP 183 public keyring has been base32 decoded, the right public key must be 184 located inside the keyring. For a public key in the keyring to be 185 usable, the public key has to have a key uid as specified in 186 [RFC4648] that matches the email address for which the OPENPGPKEY RR 187 lookup was performed. 189 3.1. Public Key UIDs and email addresses 191 An OpenPGP public key can be associated with multiple email addresses 192 by specifying multiple key uids. The OpenPGP public key obtained 193 from a OPENPGPKEY RR can be used as long as the target recipient's 194 email address appears as one of the OpenPGP public key uids. The 195 name part (left of the @) should appear in the native format, not its 196 base32 encoding that was used to lookup the OPENPGPKEY RR. 198 3.2. Public Key UIDs and IDNA 200 Internationalized domains that use non-ascii characters (U-label) are 201 encoded in DNS using IDNA [RFC5891] - also referred to as punycode or 202 A-label. When matching OpenPGP public key uids, both the email 203 address specified using U-label and A-label should be considered as 204 valid public key uids. 206 3.3. Public Key UIDs and synthesized DNS records 208 CNAME's (see [RFC2181]) and DNAME's (see [RFC6672]) can be followed 209 to obtain an OPENPGPKEY RR, as long as the original recipient's email 210 address appears as one of the OpenPGP public key uids. For example, 211 if the OPENPGPKEY RR query for hugh@example.com 212 (d1qmeq0._openpgpkey.example.com) yields a CNAME to 213 d1qmeq0._openpgpkey.example.net, and an OPENPGPKEY RR for 214 d1qmeq0._openpgpkey.example.net exists, then this OpenPGP public key 215 can be used, provided one of the key uids contains 216 "hugh@example.com". This public key cannot be used if it would only 217 contain the key uid "hugh@example.net". 219 If one of the OpenPGP key uids contains only a single wildcard as the 220 LHS of the email address, such as "*@example.com", the OpenPGP public 221 key may be used for any email address within that domain. Wildcards 222 at other locations (eg hugh@*.com) or regular expressions in key uids 223 are not allowed, and any OPENPGPKEY RR containing these should be 224 ignored. 226 3.4. Public Key size and DNS record size 228 Although the reliability of the transport of large DNS Resoruce 229 Records has improved in the last few years, it is still recommended 230 to keep the DNS records as small as possible without sacrificing the 231 security properties of the public key. The algorithm type and key 232 size of the OpenPGP keypair should not be modified to accomodate this 233 section. 235 [Should a statement be made on the number of signatures left on the 236 key? Should there be _any_ signatures other than the self-signed 237 one?] 239 OpenPGP supports various attributes that do not contribute to the 240 security of a key, such as an embedded image file. It is recommended 241 that these properties are not exported to OpenPGP public keyrings 242 that are used to create OPENPGPKEY Resource Records. 244 4. Security Considerations 246 The main goal of the OPENPGPKEY resource record is to stop passive 247 attacks against plaintext emails. While it can also twart some 248 active attacks (such as people uploading rogue keys to keyservers in 249 the hopes that others will encrypt to these rogue keys), this 250 resource record is not a replacement for verifying OpenPGP public 251 keys via the web of trust signatures, or manually via a fingerprint 252 verification. 254 Various components could be responsible for encrypting an email 255 message to a target recipient. It could be done by the sender's 256 email client or software plugin, the sender's Mail User Agent (MUA) 257 or the sender's Mail Transfer Agent (MTA). Each of these have their 258 own characteristics. An email client can interact with the user to 259 make a decision before continuing. The MUA can only accept or refuse 260 a message. The MTA must deliver the message, either as-is, or 261 encrypted. Each of these programs should ensure that an unencrypted 262 received email message will be encrypted whenever possible. 264 4.1. Email address information leak 266 DNS zones that are signed with DNSSEC using NSEC for denial of 267 existence are susceptible to zone-walking, a mechanism that allow 268 someone to enumerate all the names in the zone. Someone who wanted 269 to collect email addresses from a zone that uses OPENPGPKEY might use 270 such a mechanism. DNSSEC-signed zones using NSEC3 for denial of 271 existence are significantly less susceptible to zone-walking. 272 Someone could still attempt a dictionary attack on the zone to find 273 OPENPGPKEY records, just as they can use dictionary attacks on an 274 SMTP server or grab the entire contents of existing PGP key servers 275 to see which addresses are valid. 277 4.2. OpenPGP security and DNSSEC 279 DNSSEC key sizes are chosen based on the fact that these keys can be 280 rolled with next to no requirement for security in the future. If 281 one doubts the strength or security of the DNSSEC key for whatever 282 reason, one simply rolls to a new DNSSEC key with a stronger 283 algorithm or larger key size. 285 The same does not apply to OpenPGP encrypted messages. Users have an 286 expectation that their OpenPGP encrypted messages cannot be decrypted 287 for years or decades into the future. Changing to a new OpenPGP 288 keypair is also a costly and manual process that people tend to avoid 289 when possible. 291 This effectively means that anyone who can obtain a DNSSEC private 292 key of a domain name via coercion, theft or brute force calculations, 293 can replace any OPENPGPKEY record in that zone and all of the 294 delegated child zones, irrespective of the key length strength of the 295 OpenPGP keypair. 297 Therefore, DNSSEC is not an alternative for the "web of trust" or for 298 manual fingerprint verification by humans. It is a solution aimed to 299 ease obtaining someone's public key, and without manual verification 300 should be treated as "better then plaintext" only. While this twarts 301 all passive attacks that simply capture and log all plaintext email 302 content, it is not a security measure against active attacks. 304 4.3. MTA behaviour 306 An MTA could be operating in a stand-alone mode, without access to 307 the sender's OpenPGP public keyring, or in a way where it can access 308 the user's OpenPGP public keyring. Regardless, the MTA SHOULD NOT 309 modify the user's OpenPGP keyring. 311 An MTA sending an email SHOULD NOT add the public key obtained from 312 an OPENPGPKEY resource record to a permanent public keyring for 313 future use beyond the TTL. 315 If the obtained public key is revoked, the MTA MUST NOT use the key 316 for encryption, even if that would result in sending the message in 317 plaintext. 319 [What is the correct behaviour of an MTA when it receives an 320 encrypted message from a MUA that is encrypted to a different key 321 then the one listed in the recipient's OPENPGPKEY record? Encrypt 322 the encrypted message? Refuse to send out the message? Don't even 323 look up the OPENPGPKEY record and pass unmodified?] 325 If an OPENPGPKEY resource record is received without DNSSEC 326 protection, it MUST NOT be used. If the DNS request returned an 327 "indeterminate" or "bogus" answer, the MTA should queue the plaintext 328 message and try encryption and delivery again at a later time. 330 If multiple non-revoked OPENPGPKEY resource records are found, the 331 MTA should pick the most secure RR based on its local policy. 333 4.4. MUA behaviour 335 If the public key for a recipient obtained from the locally stored 336 public keyring differs from the recipient's OPENPGPKEY resource 337 record, the MUA SHOULD NOT accept the message for delivery. 339 If a MUA detects that a locally stored public key is present in an 340 OPENPGPKEY resource record, and the OPENPGPKEY RR version of the 341 public key is revoked, the MUA SHOULD reject the message for 342 delivery. 344 If multiple non-revoked OPENPGPKEY resource records are found, the 345 MUA should pick the most secure RR based on its local policy. 347 4.5. Email client behaviour 349 An email client MAY interact with a user to add the contents from an 350 OPENPGPKEY resource record into the user's permanent public keyring. 352 If the public key for a recipient obtained from the locally stored 353 public keyring differs from the recipient's OPENPGPKEY resource 354 record, the email client SHOULD ask the user which key to use for 355 encryption. The email cilent SHOULD allow encrypting to both public 356 keys. 358 An email client that is encrypting a message SHOULD clearly indicate 359 to the user the difference between encrypting to a locally stored and 360 manually verified public key and encrypting to an automatically 361 obtained public key via an OPENPGPKEY resource record that has not 362 been manually verified. 364 If a MUA detects that a locally stored and manually verified public 365 key is present in an OPENPGPKEY resource record, and the OPENPGPKEY 366 RR version of the public key is revoked, the MUA SHOULD warn the user 367 and give them the chance to not sent the message at all. 369 If multiple non-revoked OPENPGPKEY resource records are found, the 370 MUA should pick the most secure RR based on its local policy. 372 4.6. Subject: line encryption 374 Often, encrypting an email does not cause its Subject: line to be 375 encrypted. If the email client, MUA or MTA automatically encrypt an 376 email based on the existence of an OPENPGPKEY record, it should clear 377 or replace the Subject: header with a notification that does not 378 expose the original subject line. It should prepend the original 379 Subject: line to the first line of the body of the email message 380 before encryption. This allows a receiving email client to decrypt 381 the message and replace the Subject: line to its original decrypted 382 form when presenting the user with the decrypted email message. 384 5. IANA Considerations 386 5.1. OPENPGPKEY RRtype 388 This document uses a new DNS RR type, OPENPGPKEY, whose value [TBD] 389 has been allocated by IANA from the Resource Record (RR) TYPEs 390 subregistry of the Domain Name System (DNS) Parameters registry. 392 6. Acknowledgements 394 This document is based on RFC-4255 and draft-ietf-dane-smime whose 395 authors are Paul Hoffman, Jacob Schlyter and W. Griffin. 397 7. References 399 7.1. Normative References 401 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 402 Requirement Levels", BCP 14, RFC 2119, March 1997. 404 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 406 Rose, "DNS Security Introduction and Requirements", 407 RFC 4033, March 2005. 409 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 410 Rose, "Resource Records for the DNS Security Extensions", 411 RFC 4034, March 2005. 413 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 414 Rose, "Protocol Modifications for the DNS Security 415 Extensions", RFC 4035, March 2005. 417 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 418 Encodings", RFC 4648, October 2006. 420 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. 421 Thayer, "OpenPGP Message Format", RFC 4880, November 2007. 423 [RFC5891] Klensin, J., "Internationalized Domain Names in 424 Applications (IDNA): Protocol", RFC 5891, August 2010. 426 7.2. Informative References 428 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 429 Specification", RFC 2181, July 1997. 431 [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, 432 April 2001. 434 [RFC4255] Schlyter, J. and W. Griffin, "Using DNS to Securely 435 Publish Secure Shell (SSH) Key Fingerprints", RFC 4255, 436 January 2006. 438 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 439 Internationalized Email", RFC 6530, February 2012. 441 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the 442 DNS", RFC 6672, June 2012. 444 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 445 of Named Entities (DANE) Transport Layer Security (TLS) 446 Protocol: TLSA", RFC 6698, August 2012. 448 Author's Address 450 Paul Wouters 451 Red Hat 453 Email: pwouters@redhat.com