7Internet Engineering Task Force (IETF) P. Hoffman
8Request for Comments: 8162 ICANN
9Category: Experimental J. Schlyter
10ISSN: 2070-1721 Kirei AB
14Using Secure DNS to Associate Certificates with Domain Names for S/MIME
18 This document describes how to use secure DNS to associate an S/MIME
19 user's certificate with the intended domain name, similar to the way
20 that DNS-Based Authentication of Named Entities (DANE), RFC 6698,
25 This document is not an Internet Standards Track specification; it is
26 published for examination, experimental implementation, and
29 This document defines an Experimental Protocol for the Internet
30 community. This document is a product of the Internet Engineering
31 Task Force (IETF). It represents the consensus of the IETF
32 community. It has received public review and has been approved for
33 publication by the Internet Engineering Steering Group (IESG). Not
34 all documents approved by the IESG are a candidate for any level of
35 Internet Standard; see Section 2 of RFC 7841.
37 Information about the current status of this document, any errata,
38 and how to provide feedback on it may be obtained at
39 http://www.rfc-editor.org/info/rfc8162.
43 Copyright (c) 2017 IETF Trust and the persons identified as the
44 document authors. All rights reserved.
46 This document is subject to BCP 78 and the IETF Trust's Legal
47 Provisions Relating to IETF Documents
48 (http://trustee.ietf.org/license-info) in effect on the date of
49 publication of this document. Please review these documents
50 carefully, as they describe your rights and restrictions with respect
51 to this document. Code Components extracted from this document must
52 include Simplified BSD License text as described in Section 4.e of
53 the Trust Legal Provisions and are provided without warranty as
54 described in the Simplified BSD License.
58Hoffman & Schlyter Experimental [Page 1]
60RFC 8162 DNS-Based Authentication for S/MIME May 2017
65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
66 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
67 1.2. Experiment Goal . . . . . . . . . . . . . . . . . . . . . 3
68 2. The SMIMEA Resource Record . . . . . . . . . . . . . . . . . 4
69 3. Location of the SMIMEA Record . . . . . . . . . . . . . . . . 4
70 4. Email Address Variants and Internationalization
71 Considerations . . . . . . . . . . . . . . . . . . . . . . . 5
72 5. Mandatory-to-Implement Features . . . . . . . . . . . . . . . 6
73 6. Application Use of S/MIME Certificate Associations . . . . . 6
74 7. Certificate Size and DNS . . . . . . . . . . . . . . . . . . 7
75 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
76 9. Security Considerations . . . . . . . . . . . . . . . . . . . 7
77 9.1. Response Size . . . . . . . . . . . . . . . . . . . . . . 8
78 9.2. Email Address Information Leak . . . . . . . . . . . . . 8
79 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
80 10.1. Normative References . . . . . . . . . . . . . . . . . . 9
81 10.2. Informative References . . . . . . . . . . . . . . . . . 10
82 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 11
83 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
87 S/MIME [RFC5751] messages often contain a certificate (some messages
88 contain more than one certificate). These certificates assist in
89 authenticating the sender of the message and can be used for
90 encrypting messages that will be sent in reply. In order for the
91 S/MIME receiver to authenticate that a message is from the sender
92 identified in the message, the receiver's Mail User Agent (MUA) must
93 validate that this certificate is associated with the purported
94 sender. Currently, the MUA must trust a trust anchor upon which the
95 sender's certificate is rooted and must successfully validate the
96 certificate. There are other requirements on the MUA, such as
97 associating the identity in the certificate with that of the message,
98 that are out of scope for this document.
100 Some people want to authenticate the association of the sender's
101 certificate with the sender without trusting a configured trust
102 anchor. Others to want mitigate the difficulty of finding
103 certificates from outside the enterprise. Given that the DNS
104 administrator for a domain name is authorized to give identifying
105 information about the zone, it makes sense to allow that
106 administrator to also make an authoritative binding between email
107 messages purporting to come from the domain name and a certificate
108 that might be used by someone authorized to send mail from those
109 servers. The easiest way to do this is to use the DNS.
114Hoffman & Schlyter Experimental [Page 2]
116RFC 8162 DNS-Based Authentication for S/MIME May 2017
119 This document describes a mechanism for associating a user's
120 certificate with the domain that is similar to that described in DANE
121 itself [RFC6698], as updated by [RFC7218] and [RFC7671]; it is also
122 similar to the mechanism given in [RFC7929] for OpenPGP. Most of the
123 operational and security considerations for using the mechanism in
124 this document are described in RFC 6698 and are not described here at
125 all. Only the major differences between this mechanism and those
126 used in RFC 6698 are described here. Thus, the reader must be
127 familiar with RFC 6698 before reading this document.
131 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
132 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
133 "OPTIONAL" in this document are to be interpreted as described in
134 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
135 capitals, as shown here.
137 This document also makes use of standard PKIX, DNSSEC, and S/MIME
138 terminology. See PKIX [RFC5280], DNSSEC [RFC4033] [RFC4034]
139 [RFC4035], and S/MIME [RFC5751] for these terms.
143 This specification is one experiment in improving access to public
144 keys for end-to-end email security. There are a range of ways in
145 which this can reasonably be done for OpenPGP or S/MIME, for example,
146 using the DNS, SMTP, or HTTP. Proposals for each of these have been
147 made with various levels of support in terms of implementation and
148 deployment. For each such experiment, specifications such as this
149 will enable experiments to be carried out that may succeed or that
150 may uncover technical or other impediments to large- or small-scale
151 deployments. The IETF encourages those implementing and deploying
152 such experiments to publicly document their experiences so that
153 future specifications in this space can benefit.
155 This document defines an RRtype whose use is Experimental. The goal
156 of the experiment is to see whether encrypted email usage will
157 increase if an automated discovery method is available to Mail
158 Transfer Agents (MTAs) and if MUAs help the end user with email
159 encryption key management.
161 It is unclear if this RRtype will scale to some of the larger email
162 service deployments. Concerns have been raised about the size of the
163 SMIMEA record and the size of the resulting DNS zone files. This
164 experiment hopefully will give the IETF some insight into whether or
165 not this is a problem.
170Hoffman & Schlyter Experimental [Page 3]
172RFC 8162 DNS-Based Authentication for S/MIME May 2017
175 If the experiment is successful, it is expected that the findings of
176 the experiment will result in an updated document for Standards Track
1792. The SMIMEA Resource Record
181 The SMIMEA DNS resource record (RR) is used to associate an end
182 entity certificate or public key with the associated email address,
183 thus forming a "SMIMEA certificate association". The semantics of
184 how the SMIMEA resource record is interpreted are given later in this
185 document. Note that the information returned in the SMIMEA record
186 might be for the end entity certificate, or it might be for the trust
187 anchor or an intermediate certificate. This mechanism is similar to
188 the one given in [RFC7929] for OpenPGP.
190 The type value for the SMIMEA RRtype is defined in Section 8. The
191 SMIMEA resource record is class independent.
193 The SMIMEA wire format and presentation format are the same as for
194 the TLSA record as described in Section 2.1 of [RFC6698]. The
195 certificate usage field, the selector field, and the matching type
196 field have the same format; the semantics are also the same except
197 where RFC 6698 talks about TLS as the target protocol for the
198 certificate information.
2003. Location of the SMIMEA Record
202 The DNS does not allow the use of all characters that are supported
203 in the "local-part" of email addresses as defined in [RFC5322] and
204 [RFC6530]. Therefore, email addresses are mapped into DNS using the
207 1. The "left-hand side" of the email address, called the "local-
208 part" in both the mail message format definition [RFC5322] and in
209 the specification for internationalized email [RFC6530]) is
210 encoded in UTF-8 (or its subset ASCII). If the local-part is
211 written in another charset, it MUST be converted to UTF-8.
213 2. The local-part is first canonicalized using the following rules.
214 If the local-part is unquoted, any comments and/or folding
215 whitespace (CFWS) around dots (".") is removed. Any enclosing
216 double quotes are removed. Any literal quoting is removed.
218 3. If the local-part contains any non-ASCII characters, it SHOULD be
219 normalized using the Unicode Normalization Form C from [UNICODE].
220 Recommended normalization rules can be found in Section 10.1 of
226Hoffman & Schlyter Experimental [Page 4]
228RFC 8162 DNS-Based Authentication for S/MIME May 2017
231 4. The local-part is hashed using the SHA2-256 [RFC5754] algorithm,
232 with the hash truncated to 28 octets and represented in its
233 hexadecimal representation, to become the left-most label in the
234 prepared domain name.
236 5. The string "_smimecert" becomes the second left-most label in the
237 prepared domain name.
239 6. The domain name (the "right-hand side" of the email address,
240 called the "domain" in [RFC5322]) is appended to the result of
241 step 5 to complete the prepared domain name.
243 For example, to request an SMIMEA resource record for a user whose
244 email address is "hugh@example.com", an SMIMEA query would be placed
245 for the following QNAME: "c93f1e400f26708f98cb19d936620da35eec8f72e57
246 f9eec01c1afd6._smimecert.example.com".
2484. Email Address Variants and Internationalization Considerations
250 Mail systems usually handle variant forms of local-parts. The most
251 common variants are upper and lower case, often automatically
252 corrected when a name is recognized as such. Other variants include
253 systems that ignore "noise" characters such as dots, so that local-
254 parts 'johnsmith' and 'John.Smith' would be equivalent. Many systems
255 allow "extensions" such as 'john-ext' or 'mary+ext' where 'john' or
256 'mary' is treated as the effective local-part, and the 'ext' is
257 passed to the recipient for further handling. This can complicate
258 finding the SMIMEA record associated with the dynamically created
261 [RFC5321] and its predecessors have always made it clear that only
262 the recipient MTA is allowed to interpret the local-part of an
263 address. Therefore, sending MUAs and MTAs supporting this
264 specification MUST NOT perform any kind of mapping rules based on the
265 email address. In order to improve the chances of finding SMIMEA
266 resource records for a particular local-part, domains that allow
267 variant forms (such as treating local-parts as case-insensitive)
268 might publish SMIMEA resource records for all variants of local-
269 parts, might publish variants on first use (for example, a webmail
270 provider that also controls DNS for a domain can publish variants as
271 used by owner of a particular local-part), or might just publish
272 SMIMEA resource records for the most common variants.
274 Section 3 above defines how the local-part is used to determine the
275 location in which one looks for an SMIMEA resource record. Given the
276 variety of local-parts seen in email, designing a good experiment for
277 this is difficult as a) some current implementations are known to
278 lowercase at least US-ASCII local-parts, b) we know from (many) other
282Hoffman & Schlyter Experimental [Page 5]
284RFC 8162 DNS-Based Authentication for S/MIME May 2017
287 situations that any strategy based on guessing and making multiple
288 DNS queries is not going to achieve consensus for good reasons, and
289 c) the underlying issues are just hard -- see Section 10.1 of
290 [RFC6530] for discussion of just some of the issues that would need
291 to be tackled to fully address this problem.
293 However, while this specification is not the place to try to address
294 these issues with local-parts, doing so is also not required to
295 determine the outcome of this experiment. If this experiment
296 succeeds, then further work on email addresses with non-ASCII local-
297 parts will be needed, and that would be better based on the findings
298 from this experiment, rather than doing nothing or starting this
299 experiment based on a speculative approach to what is a very complex
3025. Mandatory-to-Implement Features
304 S/MIME MUAs conforming to this specification MUST be able to
305 correctly interpret SMIMEA records with certificate usages 0, 1, 2,
306 and 3. S/MIME MUAs conforming to this specification MUST be able to
307 compare a certificate association with a certificate offered by
308 another S/MIME MUA using selector types 0 and 1, and matching type 0
309 (no hash used) and matching type 1 (SHA-256), and SHOULD be able to
310 make such comparisons with matching type 2 (SHA-512).
312 S/MIME MUAs conforming to this specification MUST be able to
313 interpret any S/MIME capabilities (defined in [RFC4262]) in any
314 certificates that it receives through SMIMEA records.
3166. Application Use of S/MIME Certificate Associations
318 The SMIMEA record allows an application or service to obtain an
319 S/MIME certificate or public key and use it for verifying a digital
320 signature or encrypting a message to the public key. The DNS answer
321 MUST pass DNSSEC validation; if DNSSEC validation reaches any state
322 other than "Secure" (as specified in [RFC4035]), the DNSSEC
323 validation MUST be treated as a failure.
325 If no S/MIME certificates are known for an email address, an SMIMEA
326 DNS lookup MAY be performed to seek the certificate or public key
327 that corresponds to that email address. This can then be used to
328 verify a received signed message or can be used to send out an
329 encrypted email message. An application whose attempt fails to
330 retrieve a DNSSEC-verified SMIMEA resource record from the DNS should
331 remember that failed attempt and not retry it for some time. This
332 will avoid sending out a DNS request for each email message the
333 application is sending out; such DNS requests constitute a privacy
338Hoffman & Schlyter Experimental [Page 6]
340RFC 8162 DNS-Based Authentication for S/MIME May 2017
3437. Certificate Size and DNS
345 Due to the expected size of the SMIMEA record, applications SHOULD
346 use TCP -- not UDP -- to perform queries for the SMIMEA resource
349 Although the reliability of the transport of large DNS resource
350 records has improved in the last years, it is still recommended to
351 keep the DNS records as small as possible without sacrificing the
352 security properties of the public key. The algorithm type and key
353 size of certificates should not be modified to accommodate this
3568. IANA Considerations
358 This document uses a new DNS RRtype, SMIMEA, whose value (53) was
359 allocated by IANA from the "Resource Record (RR) TYPEs" subregistry
360 of the "Domain Name System (DNS) Parameters" registry.
3629. Security Considerations
364 Client treatment of any information included in the trust anchor is a
365 matter of local policy. This specification does not mandate that
366 such information be inspected or validated by the domain name
369 DNSSEC does not protect the queries from pervasive monitoring as
370 defined in [RFC7258]. Since DNS queries are currently mostly
371 unencrypted, a query to look up a target SMIMEA record could reveal
372 that a user using the (monitored) recursive DNS server is attempting
373 to send encrypted email to a target.
375 Various components could be responsible for encrypting an email
376 message to a target recipient. It could be done by the sender's MUA,
377 an MUA plugin, or the sender's MTA. Each of these have their own
378 characteristics. An MUA can ask the user to make a decision before
379 continuing. The MUA can either accept or refuse a message. The MTA
380 might deliver the message as is or encrypt the message before
381 delivering. Each of these components should attempt to encrypt an
382 unencrypted outgoing message whenever possible.
384 In theory, two different local-parts could hash to the same value.
385 This document assumes that such a hash collision has a negligible
388 If an obtained S/MIME certificate is revoked or expired, that
389 certificate MUST NOT be used, even if that would result in sending a
390 message in plaintext.
394Hoffman & Schlyter Experimental [Page 7]
396RFC 8162 DNS-Based Authentication for S/MIME May 2017
399 Anyone who can obtain a DNSSEC private key of a domain name via
400 coercion, theft, or brute-force calculations can replace any SMIMEA
401 record in that zone and all of the delegated child zones. Any future
402 messages encrypted with the malicious SMIMEA key could then be read.
403 Therefore, a certificate or key obtained from a DNSSEC-validated
404 SMIMEA record can only be trusted as much as the DNS domain can be
407 Organizations that are required to be able to read everyone's
408 encrypted email should publish the escrow key as the SMIMEA record.
409 Mail servers of such organizations MAY optionally re-encrypt the
410 message to the individual's S/MIME key. This case can be considered
411 a special case of the key-replacement attack described above.
415 To prevent amplification attacks, an Authoritative DNS server MAY
416 wish to prevent returning SMIMEA records over UDP unless the source
417 IP address has been confirmed with DNS Cookies [RFC7873]. If a query
418 is received via UDP without source IP address verification, the
419 server MUST NOT return REFUSED but answer the query with an empty
420 answer section and the truncation flag set ("TC=1").
4229.2. Email Address Information Leak
424 The hashing of the local-part in this document is not a security
425 feature. Publishing SMIMEA records will create a list of hashes of
426 valid email addresses, which could simplify obtaining a list of valid
427 email addresses for a particular domain. It is desirable to not ease
428 the harvesting of email addresses where possible.
430 The domain name part of the email address is not used as part of the
431 hash so that hashes can be used in multiple zones deployed using
432 DNAME [RFC6672]. This makes it slightly easier and cheaper to brute-
433 force the SHA2-256 hashes into common and short local-parts, as
434 single rainbow tables [Rainbow] can be reused across domains. This
435 can be somewhat countered by using NSEC3 [RFC5155].
437 DNS zones that are signed with DNSSEC using NSEC [RFC4033] for denial
438 of existence are susceptible to zone walking, a mechanism that allows
439 someone to enumerate all the SMIMEA hashes in a zone. This can be
440 used in combination with previously hashed common or short local-
441 parts (in rainbow tables) to deduce valid email addresses. DNSSEC-
442 signed zones using NSEC3 for denial of existence instead of NSEC are
443 significantly harder to brute-force after performing a zone walk.
450Hoffman & Schlyter Experimental [Page 8]
452RFC 8162 DNS-Based Authentication for S/MIME May 2017
45710.1. Normative References
459 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
460 Requirement Levels", BCP 14, RFC 2119,
461 DOI 10.17487/RFC2119, March 1997,
462 <http://www.rfc-editor.org/info/rfc2119>.
464 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
465 Rose, "DNS Security Introduction and Requirements",
466 RFC 4033, DOI 10.17487/RFC4033, March 2005,
467 <http://www.rfc-editor.org/info/rfc4033>.
469 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
470 Rose, "Resource Records for the DNS Security Extensions",
471 RFC 4034, DOI 10.17487/RFC4034, March 2005,
472 <http://www.rfc-editor.org/info/rfc4034>.
474 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
475 Rose, "Protocol Modifications for the DNS Security
476 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005,
477 <http://www.rfc-editor.org/info/rfc4035>.
479 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
480 Housley, R., and W. Polk, "Internet X.509 Public Key
481 Infrastructure Certificate and Certificate Revocation List
482 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
483 <http://www.rfc-editor.org/info/rfc5280>.
485 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet
486 Mail Extensions (S/MIME) Version 3.2 Message
487 Specification", RFC 5751, DOI 10.17487/RFC5751, January
488 2010, <http://www.rfc-editor.org/info/rfc5751>.
490 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic
491 Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January
492 2010, <http://www.rfc-editor.org/info/rfc5754>.
494 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
495 of Named Entities (DANE) Transport Layer Security (TLS)
496 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August
497 2012, <http://www.rfc-editor.org/info/rfc6698>.
499 [RFC7671] Dukhovni, V. and W. Hardaker, "The DNS-Based
500 Authentication of Named Entities (DANE) Protocol: Updates
501 and Operational Guidance", RFC 7671, DOI 10.17487/RFC7671,
502 October 2015, <http://www.rfc-editor.org/info/rfc7671>.
506Hoffman & Schlyter Experimental [Page 9]
508RFC 8162 DNS-Based Authentication for S/MIME May 2017
511 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
512 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
513 May 2017, <http://www.rfc-editor.org/info/rfc8174>.
51510.2. Informative References
517 [Rainbow] Oechslin, P., "Making a Faster Cryptanalytic Time-Memory
518 Trade-Off", DOI 10.1007/978-3-540-45146-4_36, 2003,
519 <http://www.iacr.org/cryptodb/archive/2003/
520 CRYPTO/1615/1615.ps>.
522 [RFC4262] Santesson, S., "X.509 Certificate Extension for Secure/
523 Multipurpose Internet Mail Extensions (S/MIME)
524 Capabilities", RFC 4262, DOI 10.17487/RFC4262, December
525 2005, <http://www.rfc-editor.org/info/rfc4262>.
527 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS
528 Security (DNSSEC) Hashed Authenticated Denial of
529 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008,
530 <http://www.rfc-editor.org/info/rfc5155>.
532 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
533 DOI 10.17487/RFC5321, October 2008,
534 <http://www.rfc-editor.org/info/rfc5321>.
536 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322,
537 DOI 10.17487/RFC5322, October 2008,
538 <http://www.rfc-editor.org/info/rfc5322>.
540 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for
541 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530,
542 February 2012, <http://www.rfc-editor.org/info/rfc6530>.
544 [RFC6672] Rose, S. and W. Wijngaards, "DNAME Redirection in the
545 DNS", RFC 6672, DOI 10.17487/RFC6672, June 2012,
546 <http://www.rfc-editor.org/info/rfc6672>.
548 [RFC7218] Gudmundsson, O., "Adding Acronyms to Simplify
549 Conversations about DNS-Based Authentication of Named
550 Entities (DANE)", RFC 7218, DOI 10.17487/RFC7218, April
551 2014, <http://www.rfc-editor.org/info/rfc7218>.
553 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an
554 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May
555 2014, <http://www.rfc-editor.org/info/rfc7258>.
562Hoffman & Schlyter Experimental [Page 10]
564RFC 8162 DNS-Based Authentication for S/MIME May 2017
567 [RFC7873] Eastlake 3rd, D. and M. Andrews, "Domain Name System (DNS)
568 Cookies", RFC 7873, DOI 10.17487/RFC7873, May 2016,
569 <http://www.rfc-editor.org/info/rfc7873>.
571 [RFC7929] Wouters, P., "DNS-Based Authentication of Named Entities
572 (DANE) Bindings for OpenPGP", RFC 7929,
573 DOI 10.17487/RFC7929, August 2016,
574 <http://www.rfc-editor.org/info/rfc7929>.
576 [UNICODE] The Unicode Consortium, "The Unicode Standard",
577 <http://www.unicode.org/versions/latest/>.
581 A great deal of material in this document is copied from [RFC7929].
582 That material was created by Paul Wouters and other participants in
585 Brian Dickson, Stephen Farrell, Miek Gieben, Martin Pels, and Jim
586 Schaad contributed technical ideas and support to this document.
593 Email: paul.hoffman@icann.org
599 Email: jakob@kirei.se
618Hoffman & Schlyter Experimental [Page 11]