idnits 2.17.1 draft-wouters-dane-openpgp-02.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 4 instances of too long lines in the document, the longest one being 47 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 doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (February 13, 2014) is 3725 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 254, but not defined == Unused Reference: 'RFC2181' is defined on line 300, but no explicit reference was found in the text -- No information found for draft-wouters-openpgpkey-usage - is the name correct? -- Obsolete informational reference (is this intentional?): RFC 2822 (Obsoleted by RFC 5322) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 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: Standards Track February 13, 2014 5 Expires: August 17, 2014 7 Using DANE to Associate OpenPGP public keys with email addresses 8 draft-wouters-dane-openpgp-02 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 August 17, 2014. 35 Copyright Notice 37 Copyright (c) 2014 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 Resource Record . . . . . . . . . . . . . . . 3 55 2.1. The OPENPGPKEY RDATA component . . . . . . . . . . . . . 3 56 2.2. The OPENPGPKEY RDATA wire format . . . . . . . . . . . . 3 57 2.3. The OPENPGPKEY RDATA presentation format . . . . . . . . 3 58 3. Location of the OpenPGPKEY record . . . . . . . . . . . . . . 4 59 4. OpenPGP Key size and DNS . . . . . . . . . . . . . . . . . . 4 60 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 61 5.1. Email address information leak . . . . . . . . . . . . . 5 62 5.2. Forward security of OpenPGP versus DNSSEC . . . . . . . . 5 63 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 64 6.1. OPENPGPKEY RRtype . . . . . . . . . . . . . . . . . . . . 6 65 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 66 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 68 8.2. Informative References . . . . . . . . . . . . . . . . . 7 69 Appendix A. Generating OPENPGPKEY records . . . . . . . . . . . 7 70 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 72 1. Introduction 74 To encrypt a message to a target recipient using OpenPGP [RFC4880], 75 possession of the recipient's OpenPGP public key is required. To 76 obtain that public key, two problems need to be solved by the 77 sender's email client, MUA or MTA. Where does one find the 78 recipient's public key and how does one trust that the found key 79 actually belongs to the intended recipient. 81 Obtaining a public key is not a straightforward process as there are 82 no trusted standarized locations for publishing OpenPGP public keys 83 indexed by email address. Instead, OpenPGP clients rely on "well- 84 known key servers" that are accessed using the web based HKP protocol 85 or manually by users using a variety of differently formatted front- 86 end web pages. 88 Currently deployed key servers have no method of validating any 89 uploaded OpenPGP public key. The key servers simply store and 90 publish. Anyone can add public keys with any identities and anyone 91 can add signatures to any other public key using forged malicious 92 identities. Furthermore, once uploaded, public keys cannot be 93 deleted. People who did not pre-sign a key revocation can never 94 remove their public key from these key servers once they lost their 95 private key. 97 The lack of association of email address and public key lookup is 98 also preventing email clients, MTAs and MUAs from encrypting a 99 received message to the target receipient forcing the software to 100 send the message unencryped. Currently deployed MTA's only support 101 encrypting the transport of the email, not the email contents itself. 103 This document describes a mechanism to associate a user's OpenPGP 104 public key with their email address, using a new DNS RRtype. 106 The proposed new DNS Resource Record type is secured using DNSSEC. 107 This trust model is not meant to replace the "web of trust" model. 108 However, it can be used to encrypt a message that would otherwise 109 have to be sent out unencrypted, where it could be monitored by a 110 third party in transit or located in plaintext on a storage or email 111 server. 113 1.1. Terminology 115 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 116 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 117 document are to be interpreted as described in RFC 2119 [RFC2119]. 119 This document also makes use of standard DNSSEC and DANE terminology. 120 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for 121 these terms. 123 2. The OPENPGPKEY Resource Record 125 The OPENPGPKEY DNS resource record (RR) is used to associate an end 126 entity OpenPGP public key with an email address, thus forming a 127 "OpenPGP public key association". 129 The type value allocated for the OPENPGPKEY RR type is [TBD]. The 130 OPENPGPKEY RR is class independent. The OPENPGPKEY RR has no special 131 TTL requirements. 133 2.1. The OPENPGPKEY RDATA component 135 The RDATA (or RHS) of an OPENPGPKEY Resource Record contains a single 136 value consisting of a [RFC4880] formatted OpenPGP public keyring. 138 2.2. The OPENPGPKEY RDATA wire format 140 The RDATA Wire Format is the binary OpenPGP public keyring as 141 specified in [RFC4880] without any ascii armor or base64 encoding. 143 2.3. The OPENPGPKEY RDATA presentation format 144 The RDATA Presentation Format, as visible in textual zone files, 145 consists of the [RFC4880] formatted OpenPGP public keyring encoded in 146 Base64 [RFC4648] 148 3. Location of the OpenPGPKEY record 150 Email addresses are mapped into DNS using the following method: 152 1. The user name (the "left-hand side" of the email address, called 153 the "local-part" in the mail message format definition [RFC2822] 154 and the "local part" in the specification for internationalized 155 email [RFC6530]), is hashed using the SHA2-224 [RFC5754] 156 algorithm to become the left-most label in the prepared domain 157 name. This does not include the at symbol ("@") that separates 158 the left and right sides of the email address. 160 2. The DNS does not allow the use of all characters that are 161 supported in "local-part" of email addresses as defined in 162 [RFC2822] and [RFC6530] . The SHA2-224 hashing of the user name 163 ensures that none of these characters would need to be placed 164 directly in the DNS. 166 3. The string "_openpgpkey" becomes the second left-most label in 167 the prepared domain name. 169 4. The domain name (the "right-hand side" of the email address, 170 called the "domain" in RFC 2822) is appended to the result of 171 step 2 to complete the prepared domain name. 173 For example, to request an OPENPGPKEY resource record for a user 174 whose email address is "hugh@example.com", an OPENPGPKEY query would 175 be placed for the following QNAME: "8d5730bd8d76d417bf974c03f59eedb7a 176 f98cb5c3dc73ea8ebbd54b7._openpgpkey.example.com" The corresponding RR 177 in the example.com zone might look like: 179 8d5730bd8d76d417bf974c03f59eedb7af98cb5c3dc73ea8ebbd54b7._openpgpkey.example.com. IN OPENPGPKEY 181 4. OpenPGP Key size and DNS 183 Although the reliability of the transport of large DNS Resoruce 184 Records has improved in the last years, it is still recommended to 185 keep the DNS records as small as possible without sacrificing the 186 security properties of the public key. The algorithm type and key 187 size of OpenPGP keys should not be modified to accomodate this 188 section. 190 OpenPGP supports various attributes that do not contribute to the 191 security of a key, such as an embedded image file. It is recommended 192 that these properties are not exported to OpenPGP public keyrings 193 that are used to create OPENPGPKEY Resource Records. Some OpenPGP 194 software, for example GnuPG, have support for a "minimal key export" 195 that is well suited to use as OPENPGPKEY RDATA. See Appendix A 197 5. Security Considerations 199 OPENPGPKEY usage considerations are published in [OPENPGPKEY-USAGE] 201 5.1. Email address information leak 203 Email addresses are not secret. Using them causes its publication. 204 The hashing of the user name in this document is not a security 205 feature. Publishing OPENPGPKEY records however, will create a list 206 of hashes of valid email addresses, which could simplify obtaining a 207 list of valid email addresses for a particular domain. It is 208 desirable to not ease the harvesting of email addresses where 209 possible. 211 The domain name part of the email address is not used as part of the 212 hash so that hashes can be used in multiple zones deployed using 213 DNAME [RFC6672]. This does makes it slightly easier and cheaper to 214 brute-force the SHA2-224 hashes into common and short user names, as 215 single rainbow tables can be re-used accross domains. This can be 216 somewhat countered by using NSEC3. 218 DNS zones that are signed with DNSSEC using NSEC for denial of 219 existence are susceptible to zone-walking, a mechanism that allows 220 someone to enumerate all the OPENPGPKEY hashes in a zone. This can 221 be used in combination with previously hashed common or short user 222 names (in rainbow tables) to deduce valid email addresses. DNSSEC- 223 signed zones using NSEC3 for denial of existence instead of NSEC are 224 significantly harder to brute-force after performing a zone-walk. 226 5.2. Forward security of OpenPGP versus DNSSEC 228 DNSSEC key sizes are chosen based on the fact that these keys can be 229 rolled with next to no requirement for security in the future. If 230 one doubts the strength or security of the DNSSEC key for whatever 231 reason, one simply rolls to a new DNSSEC key with a stronger 232 algorithm or larger key size. On the other hand, OpenPGP key sizes 233 are chosen based on how many years (or decades) their encryption 234 should remain unbreakable by adversaries that own large scale 235 computational resources. 237 This effectively means that anyone who can obtain a DNSSEC private 238 key of a domain name via coercion, theft or brute force calculations, 239 can replace any OPENPGPKEY record in that zone and all of the 240 delegated child zones, irrespective of the key size of the OpenPGP 241 keypair. Any future messages encrypted with the malicious OpenPGP 242 key could then be read. 244 Therefor, an OpenPGP key obtained via an OPENPGPKEY record can only 245 be trusted as much as the DNS domain can be trusted, and are no 246 substitute for in-person key verification of the "Web of Trust". See 247 [OPENPGPKEY-USAGE] for more in-depth information on safe usage of 248 OPENPGPKEY based OpenPGP keys. 250 6. IANA Considerations 252 6.1. OPENPGPKEY RRtype 254 This document uses a new DNS RR type, OPENPGPKEY, whose value [TBD] 255 has been allocated by IANA from the Resource Record (RR) TYPEs 256 subregistry of the Domain Name System (DNS) Parameters registry. 258 7. Acknowledgements 260 This document is based on RFC-4255 and draft-ietf-dane-smime whose 261 authors are Paul Hoffman, Jacob Schlyter and W. Griffin. Olafur 262 Gudmundsson provided feedback and suggested various improvements. 263 Willem Toorop contributed the gpg and hexdump command options. 265 8. References 267 8.1. Normative References 269 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 270 Requirement Levels", BCP 14, RFC 2119, March 1997. 272 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 273 Rose, "DNS Security Introduction and Requirements", RFC 274 4033, March 2005. 276 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 277 Rose, "Resource Records for the DNS Security Extensions", 278 RFC 4034, March 2005. 280 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 281 Rose, "Protocol Modifications for the DNS Security 282 Extensions", RFC 4035, March 2005. 284 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 285 Encodings", RFC 4648, October 2006. 287 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. 288 Thayer, "OpenPGP Message Format", RFC 4880, November 2007. 290 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic 291 Message Syntax", RFC 5754, January 2010. 293 8.2. Informative References 295 [OPENPGPKEY-USAGE] 296 Wouters, P., "Usage considerations with the DNS OPENPGPKEY 297 record", draft-wouters-openpgpkey-usage (work in 298 progress), January 2014. 300 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 301 Specification", RFC 2181, July 1997. 303 [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 304 2001. 306 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 307 (RR) Types", RFC 3597, September 2003. 309 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 310 Internationalized Email", RFC 6530, February 2012. 312 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the 313 DNS", RFC 6672, June 2012. 315 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 316 of Named Entities (DANE) Transport Layer Security (TLS) 317 Protocol: TLSA", RFC 6698, August 2012. 319 Appendix A. Generating OPENPGPKEY records 321 The commonly available GnuPG software can be used to generate the 322 RRdata portion of an OPENPGPKEY record: 324 gpg --export --export-options export-minimal \ 325 hugh@example.com | base64 327 The --armor or -a option of the gpg command should NOT be used, as it 328 adds additional markers around the armored key. 330 When DNS software reading or signing the zone file does not yet 331 support the OPENPGPKEY RRtype, the Generic Record Syntax of [RFC3597] 332 can be used to generate the RDATA. One needs to calculate the number 333 of octets and the actual data in hexadecimal: 335 gpg --export --export-options export-minimal \ 336 hugh@example.com | wc -c 338 gpg --export --export-options export-minimal \ 339 hugh@example.com | hexdump -e \ 340 '"\t" /1 "%.2x"' -e '/32 "\n"' 342 These values can then be used to generate a generic record: 344 ._openpgpkey.example.com. IN TYPE65280 \# 346 The openpgpkey command in the hash-slinger software can be used to 347 generate complete OPENPGPKEY records 349 ~> openpgpkey --output rfc hugh@example.com 350 8d5730bd8d[...]bbd54b7._openpgpkey.example.com. IN OPENPGPKEY mQCNAzIG[...] 352 ~> openpgpkey --output generic hugh@example.com 353 8d5730bd8d[...]bbd54b7._openpgpkey.example.com. IN TYPE65280 \# 2313 99008d03[...] 355 Author's Address 357 Paul Wouters 358 Red Hat 360 Email: pwouters@redhat.com