1
2
3
4
5
6
7Internet Engineering Task Force (IETF) P. Wouters
8Request for Comments: 7929 Red Hat
9Category: Experimental August 2016
10ISSN: 2070-1721
11
12
13 DNS-Based Authentication of Named Entities (DANE) Bindings for OpenPGP
14
15Abstract
16
17 OpenPGP is a message format for email (and file) encryption that
18 lacks a standardized lookup mechanism to securely obtain OpenPGP
19 public keys. DNS-Based Authentication of Named Entities (DANE) is a
20 method for publishing public keys in DNS. This document specifies a
21 DANE method for publishing and locating OpenPGP public keys in DNS
22 for a specific email address using a new OPENPGPKEY DNS resource
23 record. Security is provided via Secure DNS, however the OPENPGPKEY
24 record is not a replacement for verification of authenticity via the
25 "web of trust" or manual verification. The OPENPGPKEY record can be
26 used to encrypt an email that would otherwise have to be sent
27 unencrypted.
28
29Status of This Memo
30
31 This document is not an Internet Standards Track specification; it is
32 published for examination, experimental implementation, and
33 evaluation.
34
35 This document defines an Experimental Protocol for the Internet
36 community. This document is a product of the Internet Engineering
37 Task Force (IETF). It represents the consensus of the IETF
38 community. It has received public review and has been approved for
39 publication by the Internet Engineering Steering Group (IESG). Not
40 all documents approved by the IESG are a candidate for any level of
41 Internet Standard; see Section 2 of RFC 7841.
42
43 Information about the current status of this document, any errata,
44 and how to provide feedback on it may be obtained at
45 http://www.rfc-editor.org/info/rfc7929.
46
47
48
49
50
51
52
53
54
55
56
57
58Wouters Experimental [Page 1]
59
60RFC 7929 DANE for OpenPGP Keys August 2016
61
62
63Copyright Notice
64
65 Copyright (c) 2016 IETF Trust and the persons identified as the
66 document authors. All rights reserved.
67
68 This document is subject to BCP 78 and the IETF Trust's Legal
69 Provisions Relating to IETF Documents
70 (http://trustee.ietf.org/license-info) in effect on the date of
71 publication of this document. Please review these documents
72 carefully, as they describe your rights and restrictions with respect
73 to this document. Code Components extracted from this document must
74 include Simplified BSD License text as described in Section 4.e of
75 the Trust Legal Provisions and are provided without warranty as
76 described in the Simplified BSD License.
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114Wouters Experimental [Page 2]
115
116RFC 7929 DANE for OpenPGP Keys August 2016
117
118
119Table of Contents
120
121 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
122 1.1. Experiment Goal . . . . . . . . . . . . . . . . . . . . . 4
123 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5
124 2. The OPENPGPKEY Resource Record . . . . . . . . . . . . . . . 5
125 2.1. The OPENPGPKEY RDATA Component . . . . . . . . . . . . . 6
126 2.1.1. The OPENPGPKEY RDATA Content . . . . . . . . . . . . 6
127 2.1.2. Reducing the Transferable Public Key Size . . . . . . 7
128 2.2. The OPENPGPKEY RDATA Wire Format . . . . . . . . . . . . 7
129 2.3. The OPENPGPKEY RDATA Presentation Format . . . . . . . . 7
130 3. Location of the OPENPGPKEY Record . . . . . . . . . . . . . . 8
131 4. Email Address Variants and Internationalization
132 Considerations . . . . . . . . . . . . . . . . . . . . . . . 9
133 5. Application Use of OPENPGPKEY . . . . . . . . . . . . . . . . 10
134 5.1. Obtaining an OpenPGP Key for a Specific Email Address . . 10
135 5.2. Confirming that an OpenPGP Key is Current . . . . . . . . 10
136 5.3. Public Key UIDs and Query Names . . . . . . . . . . . . . 10
137 6. OpenPGP Key Size and DNS . . . . . . . . . . . . . . . . . . 11
138 7. Security Considerations . . . . . . . . . . . . . . . . . . . 11
139 7.1. MTA Behavior . . . . . . . . . . . . . . . . . . . . . . 12
140 7.2. MUA Behavior . . . . . . . . . . . . . . . . . . . . . . 13
141 7.3. Response Size . . . . . . . . . . . . . . . . . . . . . . 14
142 7.4. Email Address Information Leak . . . . . . . . . . . . . 14
143 7.5. Storage of OPENPGPKEY Data . . . . . . . . . . . . . . . 14
144 7.6. Security of OpenPGP versus DNSSEC . . . . . . . . . . . . 15
145 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
146 8.1. OPENPGPKEY RRtype . . . . . . . . . . . . . . . . . . . . 15
147 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15
148 9.1. Normative References . . . . . . . . . . . . . . . . . . 15
149 9.2. Informative References . . . . . . . . . . . . . . . . . 16
150 Appendix A. Generating OPENPGPKEY Records . . . . . . . . . . . 18
151 Appendix B. OPENPGPKEY IANA Template . . . . . . . . . . . . . . 19
152 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 20
153 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 20
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170Wouters Experimental [Page 3]
171
172RFC 7929 DANE for OpenPGP Keys August 2016
173
174
1751. Introduction
176
177 OpenPGP [RFC4880] public keys are used to encrypt or sign email
178 messages and files. To encrypt an email message, or verify a
179 sender's OpenPGP signature, the email client Mail User Agent (MUA) or
180 the email server Mail Transfer Agent (MTA) needs to locate the
181 recipient's OpenPGP public key.
182
183 OpenPGP clients have relied on centralized "well-known" key servers
184 that are accessed using the HTTP Keyserver Protocol [HKP].
185 Alternatively, users need to manually browse a variety of different
186 front-end websites. These key servers do not require a confirmation
187 of the email address used in the User ID (UID) of the uploaded
188 OpenPGP public key. Attackers can -- and have -- uploaded rogue
189 public keys with other people's email addresses to these key servers.
190
191 Once uploaded, public keys cannot be deleted. People who did not
192 pre-sign a key revocation can never remove their OpenPGP public key
193 from these key servers once they have lost access to their private
194 key. This results in receiving encrypted email that cannot be
195 decrypted.
196
197 Therefore, these key servers are not well suited to support MUAs and
198 MTAs to automatically encrypt email -- especially in the absence of
199 an interactive user.
200
201 This document describes a mechanism to associate a user's OpenPGP
202 public key with their email address, using the OPENPGPKEY DNS RRtype.
203 These records are published in the DNS zone of the user's email
204 address. If the user loses their private key, the OPENPGPKEY DNS
205 record can simply be updated or removed from the zone.
206
207 The OPENPGPKEY data is secured using Secure DNS [RFC4035].
208
209 The main goal of the OPENPGPKEY resource record is to stop passive
210 attacks against plaintext emails. While it can also thwart some
211 active attacks (such as people uploading rogue keys to key servers in
212 the hopes that others will encrypt to these rogue keys), this
213 resource record is not a replacement for verifying OpenPGP public
214 keys via the "web of trust" signatures, or manually via a fingerprint
215 verification.
216
2171.1. Experiment Goal
218
219 This specification is one experiment in improving access to public
220 keys for end-to-end email security. There are a range of ways in
221 which this can reasonably be done for OpenPGP or S/MIME, for example,
222 using the DNS, or SMTP, or HTTP. Proposals for each of these have
223
224
225
226Wouters Experimental [Page 4]
227
228RFC 7929 DANE for OpenPGP Keys August 2016
229
230
231 been made with various levels of support in terms of implementation
232 and deployment. For each such experiment, specifications such as
233 this will enable experiments to be carried out that may succeed or
234 that may uncover technical or other impediments to large- or small-
235 scale deployments. The IETF encourages those implementing and
236 deploying such experiments to publicly document their experiences so
237 that future specifications in this space can benefit.
238
239 This document defines an RRtype whose use is Experimental. The goal
240 of the experiment is to see whether encrypted email usage will
241 increase if an automated discovery method is available to MTAs and
242 MUAs to help the end user with email encryption key management.
243
244 It is unclear if this RRtype will scale to some of the larger email
245 service deployments. Concerns have been raised about the size of the
246 OPENPGPKEY record and the size of the resulting DNS zone files. This
247 experiment hopefully will give the working group some insight into
248 whether or not this is a problem.
249
250 If the experiment is successful, it is expected that the findings of
251 the experiment will result in an updated document for standards track
252 approval.
253
254 The OPENPGPKEY RRtype somewhat resembles the generic CERT record
255 defined in [RFC4398]. However, the CERT record uses sub-typing with
256 many different types of keys and certificates. It is suspected that
257 its general application of very different protocols (PKIX versus
258 OpenPGP) has been the cause for lack of implementation and
259 deployment. Furthermore, the CERT record uses sub-typing, which is
260 now considered to be a bad idea for DNS.
261
2621.2. Terminology
263
264 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
265 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
266 document are to be interpreted as described in RFC 2119 [RFC2119].
267
268 This document also makes use of standard DNSSEC and DANE terminology.
269 See DNSSEC [RFC4033], [RFC4034], [RFC4035], and DANE [RFC6698] for
270 these terms.
271
2722. The OPENPGPKEY Resource Record
273
274 The OPENPGPKEY DNS resource record (RR) is used to associate an end
275 entity OpenPGP Transferable Public Key (see Section 11.1 of
276 [RFC4880]) with an email address, thus forming an "OpenPGP public key
277 association". A user that wishes to specify more than one OpenPGP
278 key, for example, because they are transitioning to a newer stronger
279
280
281
282Wouters Experimental [Page 5]
283
284RFC 7929 DANE for OpenPGP Keys August 2016
285
286
287 key, can do so by adding multiple OPENPGPKEY records. A single
288 OPENPGPKEY DNS record MUST only contain one OpenPGP key.
289
290 The type value allocated for the OPENPGPKEY RR type is 61. The
291 OPENPGPKEY RR is class independent.
292
2932.1. The OPENPGPKEY RDATA Component
294
295 The RDATA portion of an OPENPGPKEY resource record contains a single
296 value consisting of a Transferable Public Key formatted as specified
297 in [RFC4880].
298
2992.1.1. The OPENPGPKEY RDATA Content
300
301 An OpenPGP Transferable Public Key can be arbitrarily large. DNS
302 records are limited in size. When creating OPENPGPKEY DNS records,
303 the OpenPGP Transferable Public Key should be filtered to only
304 contain appropriate and useful data. At a minimum, an OPENPGPKEY
305 Transferable Public Key for the user hugh@example.com should contain:
306
307 o The primary key X
308 o One User ID Y, which SHOULD match 'hugh@example.com'
309 o Self-signature from X, binding X to Y
310
311 If the primary key is not encryption-capable, at least one relevant
312 subkey should be included, resulting in an OPENPGPKEY Transferable
313 Public Key containing:
314
315 o The primary key X
316 o One User ID Y, which SHOULD match 'hugh@example.com'
317 o Self-signature from X, binding X to Y
318 o Encryption-capable subkey Z
319 o Self-signature from X, binding Z to X
320 o (Other subkeys, if relevant)
321
322 The user can also elect to add a few third-party certifications,
323 which they believe would be helpful for validation in the traditional
324 "web of trust". The resulting OPENPGPKEY Transferable Public Key
325 would then look like:
326
327 o The primary key X
328 o One User ID Y, which SHOULD match 'hugh@example.com'
329 o Self-signature from X, binding X to Y
330 o Third-party certification from V, binding Y to X
331 o (Other third-party certifications, if relevant)
332 o Encryption-capable subkey Z
333 o Self-signature from X, binding Z to X
334 o (Other subkeys, if relevant)
335
336
337
338Wouters Experimental [Page 6]
339
340RFC 7929 DANE for OpenPGP Keys August 2016
341
342
3432.1.2. Reducing the Transferable Public Key Size
344
345 When preparing a Transferable Public Key for a specific OPENPGPKEY
346 RDATA format with the goal of minimizing certificate size, a user
347 would typically want to:
348
349 o Where one User ID from the certifications matches the looked-up
350 address, strip away non-matching User IDs and any associated
351 certifications (self-signatures or third-party certifications).
352
353 o Strip away all User Attribute packets and associated
354 certifications.
355
356 o Strip away all expired subkeys. The user may want to keep revoked
357 subkeys if these were revoked prior to their preferred expiration
358 time to ensure that correspondents know about these earlier than
359 expected revocations.
360
361 o Strip away all but the most recent self-signature for the
362 remaining User IDs and subkeys.
363
364 o Optionally strip away any uninteresting or unimportant third-party
365 User ID certifications. This is a value judgment by the user that
366 is difficult to automate. At the very least, expired and
367 superseded third-party certifications should be stripped out. The
368 user should attempt to keep the most recent and most well-
369 connected certifications in the "web of trust" in their
370 Transferable Public Key.
371
3722.2. The OPENPGPKEY RDATA Wire Format
373
374 The RDATA Wire Format consists of a single OpenPGP Transferable
375 Public Key as defined in Section 11.1 of [RFC4880]. Note that this
376 format is without ASCII armor or base64 encoding.
377
3782.3. The OPENPGPKEY RDATA Presentation Format
379
380 The RDATA Presentation Format, as visible in master files [RFC1035],
381 consists of a single OpenPGP Transferable Public Key as defined in
382 Section 11.1 of [RFC4880] encoded in base64 as defined in Section 4
383 of [RFC4648].
384
385
386
387
388
389
390
391
392
393
394Wouters Experimental [Page 7]
395
396RFC 7929 DANE for OpenPGP Keys August 2016
397
398
3993. Location of the OPENPGPKEY Record
400
401 The DNS does not allow the use of all characters that are supported
402 in the "local-part" of email addresses as defined in [RFC5322] and
403 [RFC6530]. Therefore, email addresses are mapped into DNS using the
404 following method:
405
406 1. The "left-hand side" of the email address, called the "local-
407 part" in both the mail message format definition [RFC5322] and in
408 the specification for internationalized email [RFC6530]) is
409 encoded in UTF-8 (or its subset ASCII). If the local-part is
410 written in another charset, it MUST be converted to UTF-8.
411
412 2. The local-part is first canonicalized using the following rules.
413 If the local-part is unquoted, any comments and/or folding
414 whitespace (CFWS) around dots (".") is removed. Any enclosing
415 double quotes are removed. Any literal quoting is removed.
416
417 3. If the local-part contains any non-ASCII characters, it SHOULD be
418 normalized using the Unicode Normalization Form C from
419 [Unicode90]. Recommended normalization rules can be found in
420 Section 10.1 of [RFC6530].
421
422 4. The local-part is hashed using the SHA2-256 [RFC5754] algorithm,
423 with the hash truncated to 28 octets and represented in its
424 hexadecimal representation, to become the left-most label in the
425 prepared domain name.
426
427 5. The string "_openpgpkey" becomes the second left-most label in
428 the prepared domain name.
429
430 6. The domain name (the "right-hand side" of the email address,
431 called the "domain" in [RFC5322]) is appended to the result of
432 step 2 to complete the prepared domain name.
433
434 For example, to request an OPENPGPKEY resource record for a user
435 whose email address is "hugh@example.com", an OPENPGPKEY query would
436 be placed for the following QNAME: "c93f1e400f26708f98cb19d936620da35
437 eec8f72e57f9eec01c1afd6._openpgpkey.example.com". The corresponding
438 RR in the example.com zone might look like (key shortened for
439 formatting):
440
441 c9[..]d6._openpgpkey.example.com. IN OPENPGPKEY <base64 public key>
442
443
444
445
446
447
448
449
450Wouters Experimental [Page 8]
451
452RFC 7929 DANE for OpenPGP Keys August 2016
453
454
4554. Email Address Variants and Internationalization Considerations
456
457 Mail systems usually handle variant forms of local-parts. The most
458 common variants are upper- and lowercase, often automatically
459 corrected when a name is recognized as such. Other variants include
460 systems that ignore "noise" characters such as dots, so that local-
461 parts 'johnsmith' and 'John.Smith' would be equivalent. Many systems
462 allow "extensions" such as 'john-ext' or 'mary+ext' where 'john' or
463 'mary' is treated as the effective local-part, and 'ext' is passed to
464 the recipient for further handling. This can complicate finding the
465 OPENPGPKEY record associated with the dynamically created email
466 address.
467
468 [RFC5321] and its predecessors have always made it clear that only
469 the recipient MTA is allowed to interpret the local-part of an
470 address. Therefore, sending MUAs and MTAs supporting OPENPGPKEY MUST
471 NOT perform any kind of mapping rules based on the email address. In
472 order to improve chances of finding OPENPGP RRs for a particular
473 local-part, domains that allow variant forms (such as treating local-
474 parts as case-insensitive) might publish OPENPGP RRs for all variants
475 of local-parts, might publish variants on first use (for example, a
476 webmail provider that also controls DNS for a domain can publish
477 variants as used by owner of a particular local-part) or just publish
478 OPENPGP RRs for the most common variants.
479
480 Section 3 above defines how the local-part is used to determine the
481 location where one looks for an OPENPGPKEY record. Given the variety
482 of local-parts seen in email, designing a good experiment for this is
483 difficult, as: a) some current implementations are known to lowercase
484 at least US-ASCII local-parts, b) we know from (many) other
485 situations that any strategy based on guessing and making multiple
486 DNS queries is not going to achieve consensus for good reasons, and
487 c) the underlying issues are just hard -- see Section 10.1 of
488 [RFC6530] for discussion of just some of the issues that would need
489 to be tackled to fully address this problem.
490
491 However, while this specification is not the place to try to address
492 these issues with local-parts, doing so is also not required to
493 determine the outcome of this experiment. If this experiment
494 succeeds, then further work on email addresses with non-ASCII local-
495 parts will be needed and, based on the findings from this experiment,
496 that would be better than doing nothing or starting this experiment
497 based on a speculative approach to what is a very complex topic.
498
499
500
501
502
503
504
505
506Wouters Experimental [Page 9]
507
508RFC 7929 DANE for OpenPGP Keys August 2016
509
510
5115. Application Use of OPENPGPKEY
512
513 The OPENPGPKEY record allows an application or service to obtain an
514 OpenPGP public key and use it for verifying a digital signature or
515 encrypting a message to the public key. The DNS answer MUST pass
516 DNSSEC validation; if DNSSEC validation reaches any state other than
517 "Secure" (as specified in [RFC4035]), the DNSSEC validation MUST be
518 treated as a failure.
519
5205.1. Obtaining an OpenPGP Key for a Specific Email Address
521
522 If no OpenPGP public keys are known for an email address, an
523 OPENPGPKEY DNS lookup MAY be performed to seek the OpenPGP public key
524 that corresponds to that email address. This public key can then be
525 used to verify a received signed message or can be used to send out
526 an encrypted email message. An application whose attempt fails to
527 retrieve a DNSSEC-verified OPENPGPKEY RR from the DNS should remember
528 that failure for some time to avoid sending out a DNS request for
529 each email message the application is sending out; such DNS requests
530 constitute a privacy leak.
531
5325.2. Confirming that an OpenPGP Key is Current
533
534 Locally stored OpenPGP public keys are not automatically refreshed.
535 If the owner of that key creates a new OpenPGP public key, that owner
536 is unable to securely notify all users and applications that have its
537 old OpenPGP public key. Applications and users can perform an
538 OPENPGPKEY lookup to confirm that the locally stored OpenPGP public
539 key is still the correct key to use. If the locally stored OpenPGP
540 public key is different from the DNSSEC-validated OpenPGP public key
541 currently published in DNS, the confirmation MUST be treated as a
542 failure unless the locally stored OpenPGP key signed the newly
543 published OpenPGP public key found in DNS. An application that can
544 interact with the user MAY ask the user for guidance; otherwise, the
545 application will have to apply local policy. For privacy reasons, an
546 application MUST NOT attempt to look up an OpenPGP key from DNSSEC at
547 every use of that key.
548
5495.3. Public Key UIDs and Query Names
550
551 An OpenPGP public key can be associated with multiple email addresses
552 by specifying multiple key UIDs. The OpenPGP public key obtained
553 from an OPENPGPKEY RR can be used as long as the query and resulting
554 data form a proper email to the UID identity association.
555
556 CNAMEs (see [RFC2181]) and DNAMEs (see [RFC6672]) can be followed to
557 obtain an OPENPGPKEY RR, as long as the original recipient's email
558 address appears as one of the OpenPGP public key UIDs. For example,
559
560
561
562Wouters Experimental [Page 10]
563
564RFC 7929 DANE for OpenPGP Keys August 2016
565
566
567 if the OPENPGPKEY RR query for hugh@example.com
568 (8d57[...]b7._openpgpkey.example.com) yields a CNAME to
569 8d57[...]b7._openpgpkey.example.net, and an OPENPGPKEY RR for
570 8d57[...]b7._openpgpkey.example.net exists, then this OpenPGP public
571 key can be used, provided one of the key UIDs contains
572 "hugh@example.com". This public key cannot be used if it would only
573 contain the key UID "hugh@example.net".
574
575 If one of the OpenPGP key UIDs contains only a single wildcard as the
576 left-hand side of the email address, such as "*@example.com", the
577 OpenPGP public key may be used for any email address within that
578 domain. Wildcards at other locations (e.g., "hugh@*.com") or regular
579 expressions in key UIDs are not allowed, and any OPENPGPKEY RR
580 containing these MUST be ignored.
581
5826. OpenPGP Key Size and DNS
583
584 Due to the expected size of the OPENPGPKEY record, applications
585 SHOULD use TCP -- not UDP -- to perform queries for the OPENPGPKEY
586 resource record.
587
588 Although the reliability of the transport of large DNS resource
589 records has improved in the last years, it is still recommended to
590 keep the DNS records as small as possible without sacrificing the
591 security properties of the public key. The algorithm type and key
592 size of OpenPGP keys should not be modified to accommodate this
593 section.
594
595 OpenPGP supports various attributes that do not contribute to the
596 security of a key, such as an embedded image file. It is recommended
597 that these properties not be exported to OpenPGP public keyrings that
598 are used to create OPENPGPKEY resource records. Some OpenPGP
599 software (for example, GnuPG) supports a "minimal key export" that is
600 well suited to use as OPENPGPKEY RDATA. See Appendix A.
601
6027. Security Considerations
603
604 DNSSEC is not an alternative for the "web of trust" or for manual
605 fingerprint verification by users. DANE for OpenPGP, as specified in
606 this document, is a solution aimed to ease obtaining someone's public
607 key. Without manual verification of the OpenPGP key obtained via
608 DANE, this retrieved key should only be used for encryption if the
609 only other alternative is sending the message in plaintext. While
610 this thwarts all passive attacks that simply capture and log all
611 plaintext email content, it is not a security measure against active
612 attacks. A user who publishes an OPENPGPKEY record in DNS still
613
614
615
616
617
618Wouters Experimental [Page 11]
619
620RFC 7929 DANE for OpenPGP Keys August 2016
621
622
623 expects senders to perform their due diligence by additional (non-
624 DNSSEC) verification of their public key via other out-of-band
625 methods before sending any confidential or sensitive information.
626
627 In other words, the OPENPGPKEY record MUST NOT be used to send
628 sensitive information without additional verification or confirmation
629 that the OpenPGP key actually belongs to the target recipient.
630
631 DNSSEC does not protect the queries from Pervasive Monitoring as
632 defined in [RFC7258]. Since DNS queries are currently mostly
633 unencrypted, a query to look up a target OPENPGPKEY record could
634 reveal that a user using the (monitored) recursive DNS server is
635 attempting to send encrypted email to a target. This information is
636 normally protected by the MUAs and MTAs by using Transport Layer
637 Security (TLS) encryption using STARTTLS. The DNS itself can
638 mitigate some privacy concerns, but the user needs to select a
639 trusted DNS server that supports these privacy-enhancing features.
640 Recursive DNS servers can support DNS Query Name Minimalisation
641 [RFC7816], which limits leaking the QNAME to only the recursive DNS
642 server and the nameservers of the actual zone being queried for.
643 Recursive DNS servers can also support TLS [RFC7858] to ensure that
644 the path between the end user and the recursive DNS server is
645 encrypted.
646
647 Various components could be responsible for encrypting an email
648 message to a target recipient. It could be done by the sender's MUA
649 or a MUA plug-in or the sender's MTA. Each of these have their own
650 characteristics. A MUA can ask the user to make a decision before
651 continuing. The MUA can either accept or refuse a message. The MTA
652 must deliver the message as-is, or encrypt the message before
653 delivering. Each of these components should attempt to encrypt an
654 unencrypted outgoing message whenever possible.
655
656 In theory, two different local-parts could hash to the same value.
657 This document assumes that such a hash collision has a negligible
658 chance of happening.
659
660 Organizations that are required to be able to read everyone's
661 encrypted email should publish the escrow key as the OPENPGPKEY
662 record. Mail servers of such organizations MAY optionally re-encrypt
663 the message to the individual's OpenPGP key.
664
6657.1. MTA Behavior
666
667 An MTA could be operating in a stand-alone mode, without access to
668 the sender's OpenPGP public keyring, or in a way where it can access
669 the user's OpenPGP public keyring. Regardless, the MTA MUST NOT
670 modify the user's OpenPGP keyring.
671
672
673
674Wouters Experimental [Page 12]
675
676RFC 7929 DANE for OpenPGP Keys August 2016
677
678
679 An MTA sending an email MUST NOT add the public key obtained from an
680 OPENPGPKEY resource record to a permanent public keyring for future
681 use beyond the TTL.
682
683 If the obtained public key is revoked, the MTA MUST NOT use the key
684 for encryption, even if that would result in sending the message in
685 plaintext.
686
687 If a message is already encrypted, the MTA SHOULD NOT re-encrypt the
688 message, even if different encryption schemes or different encryption
689 keys would be used.
690
691 If the DNS request for an OPENPGPKEY record returned an Indeterminate
692 or Bogus answer as specified in [RFC4035], the MTA MUST NOT send the
693 message and queue the plaintext message for encrypted delivery at a
694 later time. If the problem persists, the email should be returned
695 via the regular bounce methods.
696
697 If multiple non-revoked OPENPGPKEY resource records are found, the
698 MTA SHOULD pick the most secure RR based on its local policy.
699
7007.2. MUA Behavior
701
702 If the public key for a recipient obtained from the locally stored
703 sender's public keyring differs from the recipient's OPENPGPKEY RR,
704 the MUA SHOULD halt processing the message and interact with the user
705 to resolve the conflict before continuing to process the message.
706
707 If the public key for a recipient obtained from the locally stored
708 sender's public keyring contains contradicting properties for the
709 same key obtained from an OPENPGPKEY RR, the MUA SHOULD NOT accept
710 the message for delivery.
711
712 If multiple non-revoked OPENPGPKEY resource records are found, the
713 MUA SHOULD pick the most secure OpenPGP public key based on its local
714 policy.
715
716 The MUA MAY interact with the user to resolve any conflicts between
717 locally stored keyrings and OPENPGPKEY RRdata.
718
719 A MUA that is encrypting a message SHOULD clearly indicate to the
720 user the difference between encrypting to a locally stored and
721 previously user-verified public key and encrypting to a public key
722 obtained via an OPENPGPKEY resource record that was not manually
723 verified by the user in the past.
724
725
726
727
728
729
730Wouters Experimental [Page 13]
731
732RFC 7929 DANE for OpenPGP Keys August 2016
733
734
7357.3. Response Size
736
737 To prevent amplification attacks, an Authoritative DNS server MAY
738 wish to prevent returning OPENPGPKEY records over UDP unless the
739 source IP address has been confirmed with [RFC7873]. Such servers
740 MUST NOT return REFUSED, but answer the query with an empty answer
741 section and the truncation flag set ("TC=1").
742
7437.4. Email Address Information Leak
744
745 The hashing of the local-part in this document is not a security
746 feature. Publishing OPENPGPKEY records will create a list of hashes
747 of valid email addresses, which could simplify obtaining a list of
748 valid email addresses for a particular domain. It is desirable to
749 not ease the harvesting of email addresses where possible.
750
751 The domain name part of the email address is not used as part of the
752 hash so that hashes can be used in multiple zones deployed using
753 DNAME [RFC6672]. This does makes it slightly easier and cheaper to
754 brute-force the SHA2-256 hashes into common and short local-parts, as
755 single rainbow tables can be re-used across domains. This can be
756 somewhat countered by using NextSECure version 3 (NSEC3).
757
758 DNS zones that are signed with DNSSEC using NSEC for denial of
759 existence are susceptible to zone walking, a mechanism that allows
760 someone to enumerate all the OPENPGPKEY hashes in a zone. This can
761 be used in combination with previously hashed common or short local-
762 parts (in rainbow tables) to deduce valid email addresses. DNSSEC-
763 signed zones using NSEC3 for denial of existence instead of NSEC are
764 significantly harder to brute-force after performing a zone walk.
765
7667.5. Storage of OPENPGPKEY Data
767
768 Users may have a local key store with OpenPGP public keys. An
769 application supporting the use of OPENPGPKEY DNS records MUST NOT
770 modify the local key store without explicit confirmation of the user,
771 as the application is unaware of the user's personal policy for
772 adding, removing, or updating their local key store. An application
773 MAY warn the user if an OPENPGPKEY record does not match the OpenPGP
774 public key in the local key store.
775
776 Applications that cannot interact with users, such as daemon
777 processes, SHOULD store OpenPGP public keys obtained via OPENPGPKEY
778 up to their DNS TTL value. This avoids repeated DNS lookups that
779 third parties could monitor to determine when an email is being sent
780 to a particular user.
781
782
783
784
785
786Wouters Experimental [Page 14]
787
788RFC 7929 DANE for OpenPGP Keys August 2016
789
790
7917.6. Security of OpenPGP versus DNSSEC
792
793 Anyone who can obtain a DNSSEC private key of a domain name via
794 coercion, theft, or brute-force calculations, can replace any
795 OPENPGPKEY record in that zone and all of the delegated child zones.
796 Any future messages encrypted with the malicious OpenPGP key could
797 then be read.
798
799 Therefore, an OpenPGP key obtained via a DNSSEC-validated OPENPGPKEY
800 record can only be trusted as much as the DNS domain can be trusted,
801 and is no substitute for in-person OpenPGP key verification or
802 additional OpenPGP verification via "web of trust" signatures present
803 on the OpenPGP in question.
804
8058. IANA Considerations
806
8078.1. OPENPGPKEY RRtype
808
809 This document uses a new DNS RR type, OPENPGPKEY, whose value 61 has
810 been allocated by IANA from the "Resource Record (RR) TYPEs"
811 subregistry of the "Domain Name System (DNS) Parameters" registry.
812
813 The IANA template for OPENPGPKEY is listed in Appendix B. It was
814 submitted to IANA for review on July 23, 2014 and approved on August
815 12, 2014.
816
8179. References
818
8199.1. Normative References
820
821 [RFC1035] Mockapetris, P., "Domain names - implementation and
822 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
823 November 1987, <http://www.rfc-editor.org/info/rfc1035>.
824
825 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
826 Requirement Levels", BCP 14, RFC 2119,
827 DOI 10.17487/RFC2119, March 1997,
828 <http://www.rfc-editor.org/info/rfc2119>.
829
830 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
831 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
832 <http://www.rfc-editor.org/info/rfc2181>.
833
834 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
835 Rose, "DNS Security Introduction and Requirements",
836 RFC 4033, DOI 10.17487/RFC4033, March 2005,
837 <http://www.rfc-editor.org/info/rfc4033>.
838
839
840
841
842Wouters Experimental [Page 15]
843
844RFC 7929 DANE for OpenPGP Keys August 2016
845
846
847 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
848 Rose, "Resource Records for the DNS Security Extensions",
849 RFC 4034, DOI 10.17487/RFC4034, March 2005,
850 <http://www.rfc-editor.org/info/rfc4034>.
851
852 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
853 Rose, "Protocol Modifications for the DNS Security
854 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005,
855 <http://www.rfc-editor.org/info/rfc4035>.
856
857 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
858 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
859 <http://www.rfc-editor.org/info/rfc4648>.
860
861 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R.
862 Thayer, "OpenPGP Message Format", RFC 4880,
863 DOI 10.17487/RFC4880, November 2007,
864 <http://www.rfc-editor.org/info/rfc4880>.
865
866 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic
867 Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January
868 2010, <http://www.rfc-editor.org/info/rfc5754>.
869
8709.2. Informative References
871
872 [HKP] Shaw, D., "The OpenPGP HTTP Keyserver Protocol (HKP)",
873 Work in Progress, draft-shaw-openpgp-hkp-00, March 2003.
874
875 [MAILBOX] Levine, J., "Encoding mailbox local-parts in the DNS",
876 Work in Progress, draft-levine-dns-mailbox-01, September
877 2015.
878
879 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record
880 (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September
881 2003, <http://www.rfc-editor.org/info/rfc3597>.
882
883 [RFC4255] Schlyter, J. and W. Griffin, "Using DNS to Securely
884 Publish Secure Shell (SSH) Key Fingerprints", RFC 4255,
885 DOI 10.17487/RFC4255, January 2006,
886 <http://www.rfc-editor.org/info/rfc4255>.
887
888 [RFC4398] Josefsson, S., "Storing Certificates in the Domain Name
889 System (DNS)", RFC 4398, DOI 10.17487/RFC4398, March 2006,
890 <http://www.rfc-editor.org/info/rfc4398>.
891
892 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
893 DOI 10.17487/RFC5321, October 2008,
894 <http://www.rfc-editor.org/info/rfc5321>.
895
896
897
898Wouters Experimental [Page 16]
899
900RFC 7929 DANE for OpenPGP Keys August 2016
901
902
903 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322,
904 DOI 10.17487/RFC5322, October 2008,
905 <http://www.rfc-editor.org/info/rfc5322>.
906
907 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for
908 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530,
909 February 2012, <http://www.rfc-editor.org/info/rfc6530>.
910
911 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the
912 DNS", RFC 6672, DOI 10.17487/RFC6672, June 2012,
913 <http://www.rfc-editor.org/info/rfc6672>.
914
915 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
916 of Named Entities (DANE) Transport Layer Security (TLS)
917 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August
918 2012, <http://www.rfc-editor.org/info/rfc6698>.
919
920 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an
921 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May
922 2014, <http://www.rfc-editor.org/info/rfc7258>.
923
924 [RFC7816] Bortzmeyer, S., "DNS Query Name Minimisation to Improve
925 Privacy", RFC 7816, DOI 10.17487/RFC7816, March 2016,
926 <http://www.rfc-editor.org/info/rfc7816>.
927
928 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D.,
929 and P. Hoffman, "Specification for DNS over Transport
930 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May
931 2016, <http://www.rfc-editor.org/info/rfc7858>.
932
933 [RFC7873] Eastlake 3rd, D. and M. Andrews, "Domain Name System (DNS)
934 Cookies", RFC 7873, DOI 10.17487/RFC7873, May 2016,
935 <http://www.rfc-editor.org/info/rfc7873>.
936
937 [SMIME] Hoffman, P. and J. Schlyter, "Using Secure DNS to
938 Associate Certificates with Domain Names For S/MIME", Work
939 in Progress, draft-ietf-dane-smime-12, July 2016.
940
941 [Unicode90]
942 The Unicode Consortium, "The Unicode Standard, Version
943 9.0.0", (Mountain View, CA: The Unicode Consortium,
944 2016. ISBN 978-1-936213-13-9),
945 <http://www.unicode.org/versions/Unicode9.0.0/>.
946
947
948
949
950
951
952
953
954Wouters Experimental [Page 17]
955
956RFC 7929 DANE for OpenPGP Keys August 2016
957
958
959Appendix A. Generating OPENPGPKEY Records
960
961 The commonly available GnuPG software can be used to generate a
962 minimum Transferable Public Key for the RRdata portion of an
963 OPENPGPKEY record:
964
965 gpg --export --export-options export-minimal,no-export-attributes \
966 hugh@example.com | base64
967
968 The --armor or -a option of the gpg command should not be used, as it
969 adds additional markers around the armored key.
970
971 When DNS software reading or signing of the zone file does not yet
972 support the OPENPGPKEY RRtype, the Generic Record Syntax of [RFC3597]
973 can be used to generate the RDATA. One needs to calculate the number
974 of octets and the actual data in hexadecimal:
975
976 gpg --export --export-options export-minimal,no-export-attributes \
977 hugh@example.com | wc -c
978 gpg --export --export-options export-minimal,no-export-attributes \
979 hugh@example.com | hexdump -e \
980 '"\t" /1 "%.2x"' -e '/32 "\n"'
981
982 These values can then be used to generate a generic record (line
983 break has been added for formatting):
984
985 <SHA2-256-trunc(hugh)>._openpgpkey.example.com. IN TYPE61 \# \
986 <numOctets> <keydata in hex>
987
988 The openpgpkey command in the hash-slinger software can be used to
989 generate complete OPENPGPKEY records
990
991 ~> openpgpkey --output rfc hugh@example.com
992 c9[..]d6._openpgpkey.example.com. IN OPENPGPKEY mQCNAzIG[...]
993
994 ~> openpgpkey --output generic hugh@example.com
995 c9[..]d6._openpgpkey.example.com. IN TYPE61 \# 2313 99008d03[...]
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010Wouters Experimental [Page 18]
1011
1012RFC 7929 DANE for OpenPGP Keys August 2016
1013
1014
1015Appendix B. OPENPGPKEY IANA Template
1016
1017 This is a copy of the original registration template submitted to
1018 IANA; the text (including the references) has not been updated.
1019
1020 A. Submission Date: 23-07-2014
1021
1022 B.1 Submission Type: [x] New RRTYPE [ ] Modification to RRTYPE
1023 B.2 Kind of RR: [x] Data RR [ ] Meta-RR
1024
1025 C. Contact Information for submitter (will be publicly posted):
1026 Name: Paul Wouters Email Address: pwouters@redhat.com
1027 International telephone number: +1-647-896-3464
1028 Other contact handles: paul@nohats.ca
1029
1030 D. Motivation for the new RRTYPE application.
1031
1032 Publishing RFC-4880 OpenPGP formatted keys in DNS with DNSSEC
1033 protection to faciliate automatic encryption of emails in
1034 defense against pervasive monitoring.
1035
1036 E. Description of the proposed RR type.
1037
1038 http://tools.ietf.org/html/draft-ietf-dane-openpgpkey-00#section-2
1039
1040 F. What existing RRTYPE or RRTYPEs come closest to filling that need
1041 and why are they unsatisfactory?
1042
1043 The CERT RRtype is the closest match. It unfortunately depends on
1044 subtyping, and its use in general is no longer recommended. It
1045 also has no human usable presentation format. Some usage types of
1046 CERT require external URI's which complicates the security model.
1047 This was discussed in the dane working group.
1048
1049 G. What mnemonic is requested for the new RRTYPE (optional)?
1050
1051 OPENPGPKEY
1052
1053 H. Does the requested RRTYPE make use of any existing IANA registry
1054 or require the creation of a new IANA subregistry in DNS
1055 Parameters? If so, please indicate which registry is to be used
1056 or created. If a new subregistry is needed, specify the
1057 allocation policy for it and its initial contents. Also include
1058 what the modification procedures will be.
1059
1060 The RDATA part uses the key format specified in RFC-4880, which
1061 itself use
1062 https://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtm
1063
1064
1065
1066Wouters Experimental [Page 19]
1067
1068RFC 7929 DANE for OpenPGP Keys August 2016
1069
1070
1071 This RRcode just uses the formats specified in those registries for
1072 its RRdata part.
1073
1074 I. Does the proposal require/expect any changes in DNS
1075 servers/resolvers that prevent the new type from being processed
1076 as an unknown RRTYPE (see [RFC3597])?
1077
1078 No.
1079
1080 J. Comments:
1081
1082 Currently, three software implementations of
1083 draft-ietf-dane-openpgpkey are using a private number.
1084
1085Acknowledgments
1086
1087 This document is based on [RFC4255] and [SMIME] whose authors are
1088 Paul Hoffman, Jakob Schlyter, and W. Griffin. Olafur Gudmundsson
1089 provided feedback and suggested various improvements. Willem Toorop
1090 contributed the gpg and hexdump command options. Daniel Kahn Gillmor
1091 provided the text describing the OpenPGP packet formats and filtering
1092 options. Edwin Taylor contributed language improvements for various
1093 iterations of this document. Text regarding email mappings was taken
1094 from [MAILBOX] whose author is John Levine.
1095
1096Author's Address
1097
1098 Paul Wouters
1099 Red Hat
1100
1101 Email: pwouters@redhat.com
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122Wouters Experimental [Page 20]
1123
1124