<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-ietf-lamps-e2e-mail-guidance-17" number="9787" updates="" obsoletes="" consensus="true" category="info" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" xml:lang="en" prepTime="2025-08-22T19:06:40" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-lamps-e2e-mail-guidance-17" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9787" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Guidance on End-to-End Email Security">Guidance on End-to-End Email Security</title>
    <seriesInfo name="RFC" value="9787" stream="IETF"/>
    <author initials="D. K." surname="Gillmor" fullname="Daniel Kahn Gillmor" role="editor">
      <organization abbrev="ACLU" showOnFrontPage="true">American Civil Liberties Union</organization>
      <address>
        <postal>
          <street>125 Broad St.</street>
          <city>New York</city>
          <region>NY</region>
          <code>10004</code>
          <country>United States of America</country>
        </postal>
        <email>dkg@fifthhorseman.net</email>
      </address>
    </author>
    <author initials="A." surname="Melnikov" fullname="Alexey Melnikov" role="editor">
      <organization showOnFrontPage="true">Isode Ltd</organization>
      <address>
        <postal>
          <street>14 Castle Mews</street>
          <city>Hampton, Middlesex</city>
          <code>TW12 2NP</code>
          <country>United Kingdom</country>
        </postal>
        <email>alexey.melnikov@isode.com</email>
      </address>
    </author>
    <author initials="B." surname="Hoeneisen" fullname="Bernie Hoeneisen" role="editor">
      <organization showOnFrontPage="true">pEp Project</organization>
      <address>
        <postal>
          <street>Oberer Graben 4</street>
          <city>Winterthur</city>
          <code>8400</code>
          <country>Switzerland</country>
        </postal>
        <email>bernie@ietf.hoeneisen.ch</email>
        <uri>https://pep-project.org/</uri>
      </address>
    </author>
    <date month="08" year="2025"/>
    <area>SEC</area>
    <workgroup>lamps</workgroup>
    <keyword>cryptography</keyword>
    <keyword>encryption</keyword>
    <keyword>signature</keyword>
    <keyword>signing</keyword>
    <keyword>usability</keyword>
    <keyword>MIME</keyword>
    <keyword>confidentiality</keyword>
    <keyword>integrity</keyword>
    <keyword>authenticity</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">End-to-end cryptographic protections for email messages can provide useful security.
However, the standards for providing cryptographic protection are extremely flexible.
That flexibility can trap users and cause surprising failures.
This document offers guidance for Mail User Agent (MUA) implementers to help mitigate those risks and to make end-to-end email simple and secure for the end user.
It provides a useful set of vocabulary as well as recommendations to avoid common failures.
It also identifies a number of currently unsolved usability and interoperability problems.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for informational purposes.  
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by the
            Internet Engineering Steering Group (IESG).  Not all documents
            approved by the IESG are candidates for any level of Internet
            Standard; see Section 2 of RFC 7841. 
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9787" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2025 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2.1.2">
                  <li pn="section-toc.1-1.1.2.1.2.1">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.1.1"><xref derivedContent="1.1.1" format="counter" sectionFormat="of" target="section-1.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-structural-header-fields">Structural Header Fields</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.1.2.2">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.2.1"><xref derivedContent="1.1.2" format="counter" sectionFormat="of" target="section-1.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-user-facing-header-fields">User-Facing Header Fields</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-usability">Usability</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simplicity">Simplicity</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-email-users-want-a-familiar">Email Users Want a Familiar Experience</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-warning-about-failure-vs-an">Warning About Failure vs. Announcing Success</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-types-of-protection">Types of Protection</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simplified-mental-model">Simplified Mental Model</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-one-cryptographic-status-pe">One Cryptographic Status per Message</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cryptographic-mime-message-">Cryptographic MIME Message Structure</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cryptographic-layers">Cryptographic Layers</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.1.2">
                  <li pn="section-toc.1-1.4.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.1.1"><xref derivedContent="4.1.1" format="counter" sectionFormat="of" target="section-4.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-s-mime-cryptographic-layers">S/MIME Cryptographic Layers</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.2.1"><xref derivedContent="4.1.2" format="counter" sectionFormat="of" target="section-4.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-pgp-mime-cryptographic-laye">PGP/MIME Cryptographic Layers</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cryptographic-envelope">Cryptographic Envelope</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cryptographic-payload">Cryptographic Payload</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-types-of-cryptographic-enve">Types of Cryptographic Envelope</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.4.2">
                  <li pn="section-toc.1-1.4.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.4.2.1.1"><xref derivedContent="4.4.1" format="counter" sectionFormat="of" target="section-4.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simple-cryptographic-envelo">Simple Cryptographic Envelopes</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.4.2.2.1"><xref derivedContent="4.4.2" format="counter" sectionFormat="of" target="section-4.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-multilayer-cryptographic-en">Multilayer Cryptographic Envelopes</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.5">
                <t indent="0" pn="section-toc.1-1.4.2.5.1"><xref derivedContent="4.5" format="counter" sectionFormat="of" target="section-4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-errant-cryptographic-layers">Errant Cryptographic Layers</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.5.2">
                  <li pn="section-toc.1-1.4.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.5.2.1.1"><xref derivedContent="4.5.1" format="counter" sectionFormat="of" target="section-4.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mailing-list-wrapping">Mailing List Wrapping</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.5.2.2.1"><xref derivedContent="4.5.2" format="counter" sectionFormat="of" target="section-4.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-a-baroque-example">A Baroque Example</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.6">
                <t indent="0" pn="section-toc.1-1.4.2.6.1"><xref derivedContent="4.6" format="counter" sectionFormat="of" target="section-4.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cryptographic-summary">Cryptographic Summary</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-composition">Message Composition</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-composition-algorit">Message Composition Algorithm</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-encryption-outside-signatur">Encryption Outside, Signature Inside</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-avoid-offering-encrypted-on">Avoid Offering Encrypted-Only Messages</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.4">
                <t indent="0" pn="section-toc.1-1.5.2.4.1"><xref derivedContent="5.4" format="counter" sectionFormat="of" target="section-5.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-composing-a-reply-message">Composing a Reply Message</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-interpretation">Message Interpretation</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rendering-well-formed-messa">Rendering Well-Formed Messages</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-errant-cryptographic-layers-2">Errant Cryptographic Layers</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2.2.2">
                  <li pn="section-toc.1-1.6.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.6.2.2.2.1.1"><xref derivedContent="6.2.1" format="counter" sectionFormat="of" target="section-6.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-errant-signing-layer">Errant Signing Layer</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.6.2.2.2.2.1"><xref derivedContent="6.2.2" format="counter" sectionFormat="of" target="section-6.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-errant-encryption-layer">Errant Encryption Layer</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.6.2.2.2.3.1"><xref derivedContent="6.2.3" format="counter" sectionFormat="of" target="section-6.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-avoiding-non-mime-cryptogra">Avoiding Non-MIME Cryptographic Mechanisms</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.6.2.3">
                <t indent="0" pn="section-toc.1-1.6.2.3.1"><xref derivedContent="6.3" format="counter" sectionFormat="of" target="section-6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-forwarded-messages-with-cry">Forwarded Messages with Cryptographic Protection</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.4">
                <t indent="0" pn="section-toc.1-1.6.2.4.1"><xref derivedContent="6.4" format="counter" sectionFormat="of" target="section-6.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-signature-failures">Signature Failures</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.5">
                <t indent="0" pn="section-toc.1-1.6.2.5.1"><xref derivedContent="6.5" format="counter" sectionFormat="of" target="section-6.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-weak-encryption">Weak Encryption</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reasoning-about-message-par">Reasoning about Message Parts</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-main-body-part">Main Body Part</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-attachments">Attachments</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.3">
                <t indent="0" pn="section-toc.1-1.7.2.3.1"><xref derivedContent="7.3" format="counter" sectionFormat="of" target="section-7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mime-part-examples">MIME Part Examples</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-certificate-management">Certificate Management</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-peer-certificates">Peer Certificates</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2.1.2">
                  <li pn="section-toc.1-1.8.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.8.2.1.2.1.1"><xref derivedContent="8.1.1" format="counter" sectionFormat="of" target="section-8.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-peer-certificate-selection">Peer Certificate Selection</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-local-certificates">Local Certificates</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2.2.2">
                  <li pn="section-toc.1-1.8.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.1.1"><xref derivedContent="8.2.1" format="counter" sectionFormat="of" target="section-8.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-getting-certificates-for-th">Getting Certificates for the User</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.2.1"><xref derivedContent="8.2.2" format="counter" sectionFormat="of" target="section-8.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-local-certificate-maintenan">Local Certificate Maintenance</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.3.1"><xref derivedContent="8.2.3" format="counter" sectionFormat="of" target="section-8.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-shipping-certificates-in-ou">Shipping Certificates in Outbound Messages</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-common-pitfalls-and-guideli">Common Pitfalls and Guidelines</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reading-sent-messages">Reading Sent Messages</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reading-encrypted-messages-">Reading Encrypted Messages after Certificate Expiration</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.3">
                <t indent="0" pn="section-toc.1-1.9.2.3.1"><xref derivedContent="9.3" format="counter" sectionFormat="of" target="section-9.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-unprotected-message-header-">Unprotected Message Header Fields</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.4">
                <t indent="0" pn="section-toc.1-1.9.2.4.1"><xref derivedContent="9.4" format="counter" sectionFormat="of" target="section-9.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-composing-an-encrypted-mess">Composing an Encrypted Message with Bcc</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.4.2">
                  <li pn="section-toc.1-1.9.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.4.2.1.1"><xref derivedContent="9.4.1" format="counter" sectionFormat="of" target="section-9.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simple-encryption-with-bcc">Simple Encryption with Bcc</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.9.2.5">
                <t indent="0" pn="section-toc.1-1.9.2.5.1"><xref derivedContent="9.5" format="counter" sectionFormat="of" target="section-9.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-draft-messages">Draft Messages</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.6">
                <t indent="0" pn="section-toc.1-1.9.2.6.1"><xref derivedContent="9.6" format="counter" sectionFormat="of" target="section-9.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-composing-a-message-to-hete">Composing a Message to Heterogeneous Recipients</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.7">
                <t indent="0" pn="section-toc.1-1.9.2.7.1"><xref derivedContent="9.7" format="counter" sectionFormat="of" target="section-9.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-transport-protocol-">Message Transport Protocol Proxy: A Dangerous Implementation Choice</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.7.2">
                  <li pn="section-toc.1-1.9.2.7.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.7.2.1.1"><xref derivedContent="9.7.1" format="counter" sectionFormat="of" target="section-9.7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dangers-of-a-submission-pro">Dangers of a Submission Proxy for Message Composition</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.7.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.7.2.2.1"><xref derivedContent="9.7.2" format="counter" sectionFormat="of" target="section-9.7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dangers-of-an-imap-proxy-fo">Dangers of an IMAP Proxy for Message Rendering</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.7.2.3">
                    <t indent="0" pn="section-toc.1-1.9.2.7.2.3.1"><xref derivedContent="9.7.3" format="counter" sectionFormat="of" target="section-9.7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-who-controls-the-proxy">Who Controls the Proxy?</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.9.2.8">
                <t indent="0" pn="section-toc.1-1.9.2.8.1"><xref derivedContent="9.8" format="counter" sectionFormat="of" target="section-9.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-intervening-muas-do-not-han">Intervening MUAs Do Not Handle End-to-End Cryptographic Protections</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.9">
                <t indent="0" pn="section-toc.1-1.9.2.9.1"><xref derivedContent="9.9" format="counter" sectionFormat="of" target="section-9.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-external-subresources-in-mi">External Subresources in MIME Parts Break Cryptographic Protections</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="11" format="counter" sectionFormat="of" target="section-11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="12" format="counter" sectionFormat="of" target="section-12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2">
              <li pn="section-toc.1-1.12.2.1">
                <t indent="0" pn="section-toc.1-1.12.2.1.1"><xref derivedContent="12.1" format="counter" sectionFormat="of" target="section-12.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.12.2.2">
                <t indent="0" pn="section-toc.1-1.12.2.2.1"><xref derivedContent="12.2" format="counter" sectionFormat="of" target="section-12.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.13">
            <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-future-work">Future Work</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2">
              <li pn="section-toc.1-1.13.2.1">
                <t indent="0" pn="section-toc.1-1.13.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-appendix.a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-webmail-threat-model">Webmail Threat Model</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.2">
                <t indent="0" pn="section-toc.1-1.13.2.2.1"><xref derivedContent="A.2" format="counter" sectionFormat="of" target="section-appendix.a.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vectors">Test Vectors</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.3">
                <t indent="0" pn="section-toc.1-1.13.2.3.1"><xref derivedContent="A.3" format="counter" sectionFormat="of" target="section-appendix.a.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-further-guidance-on-peer-ce">Further Guidance on Peer Certificates</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2.3.2">
                  <li pn="section-toc.1-1.13.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.13.2.3.2.1.1"><xref derivedContent="A.3.1" format="counter" sectionFormat="of" target="section-appendix.a.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-certificate-discovery-from-">Certificate Discovery from Incoming Messages</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.13.2.3.2.2.1"><xref derivedContent="A.3.2" format="counter" sectionFormat="of" target="section-appendix.a.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-certificate-directories">Certificate Directories</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.13.2.3.2.3.1"><xref derivedContent="A.3.3" format="counter" sectionFormat="of" target="section-appendix.a.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-checking-for-certificate-re">Checking for Certificate Revocation</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.13.2.3.2.4.1"><xref derivedContent="A.3.4" format="counter" sectionFormat="of" target="section-appendix.a.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-further-peer-certificate-se">Further Peer Certificate Selection</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.3.2.5">
                    <t indent="0" pn="section-toc.1-1.13.2.3.2.5.1"><xref derivedContent="A.3.5" format="counter" sectionFormat="of" target="section-appendix.a.3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-human-readable-names-in-pee">Human-Readable Names in Peer Certificates, Header Fields, and Address Books</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.13.2.4">
                <t indent="0" pn="section-toc.1-1.13.2.4.1"><xref derivedContent="A.4" format="counter" sectionFormat="of" target="section-appendix.a.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-further-guidance-on-local-c">Further Guidance on Local Certificates and Secret Keys</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2.4.2">
                  <li pn="section-toc.1-1.13.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.13.2.4.2.1.1"><xref derivedContent="A.4.1" format="counter" sectionFormat="of" target="section-appendix.a.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cross-mua-sharing-of-local-">Cross-MUA Sharing of Local Certificates and Secret Keys</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.13.2.4.2.2.1"><xref derivedContent="A.4.2" format="counter" sectionFormat="of" target="section-appendix.a.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-use-of-smart-cards-or-other">Use of Smart Cards or Other Portable Secret Key Mechanisms</xref></t>
                  </li>
                  <li pn="section-toc.1-1.13.2.4.2.3">
                    <t indent="0" pn="section-toc.1-1.13.2.4.2.3.1"><xref derivedContent="A.4.3" format="counter" sectionFormat="of" target="section-appendix.a.4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-active-local-certificate-ma">Active Local Certificate Maintenance</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.13.2.5">
                <t indent="0" pn="section-toc.1-1.13.2.5.1"><xref derivedContent="A.5" format="counter" sectionFormat="of" target="section-appendix.a.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-certification-authorities">Certification Authorities</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.6">
                <t indent="0" pn="section-toc.1-1.13.2.6.1"><xref derivedContent="A.6" format="counter" sectionFormat="of" target="section-appendix.a.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-indexing-and-search-of-encr">Indexing and Search of Encrypted Messages</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.7">
                <t indent="0" pn="section-toc.1-1.13.2.7.1"><xref derivedContent="A.7" format="counter" sectionFormat="of" target="section-appendix.a.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cached-signature-validation">Cached Signature Validation</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.8">
                <t indent="0" pn="section-toc.1-1.13.2.8.1"><xref derivedContent="A.8" format="counter" sectionFormat="of" target="section-appendix.a.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aggregate-cryptographic-sta">Aggregate Cryptographic Status</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.9">
                <t indent="0" pn="section-toc.1-1.13.2.9.1"><xref derivedContent="A.9" format="counter" sectionFormat="of" target="section-appendix.a.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-expectations-of-cryptograph">Expectations of Cryptographic Protection</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.10">
                <t indent="0" pn="section-toc.1-1.13.2.10.1"><xref derivedContent="A.10" format="counter" sectionFormat="of" target="section-appendix.a.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-secure-deletion">Secure Deletion</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.11">
                <t indent="0" pn="section-toc.1-1.13.2.11.1"><xref derivedContent="A.11" format="counter" sectionFormat="of" target="section-appendix.a.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-with-opportunis">Interaction with Opportunistic Encryption</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.12">
                <t indent="0" pn="section-toc.1-1.13.2.12.1"><xref derivedContent="A.12" format="counter" sectionFormat="of" target="section-appendix.a.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-split-attachments">Split Attachments</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.13">
                <t indent="0" pn="section-toc.1-1.13.2.13.1"><xref derivedContent="A.13" format="counter" sectionFormat="of" target="section-appendix.a.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-proxy-extensions">Proxy Extensions</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.14">
                <t indent="0" pn="section-toc.1-1.13.2.14.1"><xref derivedContent="A.14" format="counter" sectionFormat="of" target="section-appendix.a.14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-mailing-lists">Mailing Lists</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.14">
            <t indent="0" pn="section-toc.1-1.14.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.15">
            <t indent="0" pn="section-toc.1-1.15.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">End-to-end email security using S/MIME <xref target="RFC8551" format="default" sectionFormat="of" derivedContent="RFC8551"/> and PGP/MIME (Pretty Good Privacy with MIME) <xref target="RFC3156" format="default" sectionFormat="of" derivedContent="RFC3156"/> cryptographic standards can provide integrity, authentication, and confidentiality to MIME <xref target="RFC4289" format="default" sectionFormat="of" derivedContent="RFC4289"/> email messages.</t>
      <t indent="0" pn="section-1-2">However, there are many ways that an MUA handling such a message can misinterpret or accidentally break these security guarantees.
For example, as described in <xref target="EFAIL" format="default" sectionFormat="of" derivedContent="EFAIL"/>, the "Direct Exfiltration" attack leaks cleartext due to an attack that splices existing ciphertext into a new message, which is then handled optimistically (and wrongly) by many MUAs.</t>
      <t indent="0" pn="section-1-3">A MUA that interprets a message with end-to-end cryptographic protections needs to do so defensively, staying alert to different ways that these protections can be bypassed by mangling (either malicious or accidental) or a failed user experience.</t>
      <t indent="0" pn="section-1-4">A MUA that generates a message with end-to-end cryptographic protections should be aware of these defensive interpretation strategies and should compose any new outbound message conservatively if they want the protections to remain intact.</t>
      <t indent="0" pn="section-1-5">This document offers guidance to the implementer of a MUA that provides these cryptographic protections, whether for composing, interpreting, rendering, or replying to a message.
An implementation that follows this guidance will provide its users with stronger and easier-to-understand security properties and will also offer more reliable interoperability for messages exchanged with other implementations.</t>
      <t indent="0" pn="section-1-6">In <xref target="future-work" format="default" sectionFormat="of" derivedContent="Appendix A"/>, this document also identifies a number of interoperability and usability concerns for end-to-end cryptographic email that have no current broadly accepted technical standard for resolution.
      One major area not covered in this document is the acquisition and long-term maintenance of cryptographic identity information and metadata across multiple MUAs controlled by the same user.</t>
      <section anchor="terminology" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.1-1">The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <t indent="0" pn="section-1.1-2">For the purposes of this document, we define the following concepts:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.1-3">
          <li pn="section-1.1-3.1">
            <t indent="0" pn="section-1.1-3.1.1">The <em>Mail User Agent (MUA)</em> is an email client.</t>
          </li>
          <li pn="section-1.1-3.2">
            <t indent="0" pn="section-1.1-3.2.1"><em>Protection</em> of message data refers to cryptographic encryption and/or signatures, providing confidentiality, authenticity, and/or integrity.</t>
          </li>
          <li pn="section-1.1-3.3">
            <t indent="0" pn="section-1.1-3.3.1"><em>Cryptographic Layer</em>, <em>Cryptographic Envelope</em>, <em>Cryptographic Payload</em>, <em>Cryptographic Summary</em>, and <em>Errant Cryptographic Layer</em> are defined in <xref target="cryptographic-structure" format="default" sectionFormat="of" derivedContent="Section 4"/>.</t>
          </li>
          <li pn="section-1.1-3.4">
            <t indent="0" pn="section-1.1-3.4.1">A <em>well-formed</em> email message with cryptographic protection has both a <em>Cryptographic Envelope</em> and a <em>Cryptographic Payload</em>.</t>
          </li>
          <li pn="section-1.1-3.5">
            <t indent="0" pn="section-1.1-3.5.1"><em>Structural Header Fields</em> are documented in <xref target="structural-header-fields" format="default" sectionFormat="of" derivedContent="Section 1.1.1"/>.</t>
          </li>
          <li pn="section-1.1-3.6">
            <t indent="0" pn="section-1.1-3.6.1"><em>Non-Structural Header Fields</em> are header fields that are not Structural Header Fields.</t>
          </li>
          <li pn="section-1.1-3.7">
            <t indent="0" pn="section-1.1-3.7.1"><em>User-Facing Header Fields</em> are documented in <xref target="user-facing-header-fields" format="default" sectionFormat="of" derivedContent="Section 1.1.2"/>.</t>
          </li>
          <li pn="section-1.1-3.8">
            <t indent="0" pn="section-1.1-3.8.1">A <em>Main Body Part</em> is any part of a message that is typically rendered to the user as the message itself (not "as an attachment").  See <xref target="main-body-part" format="default" sectionFormat="of" derivedContent="Section 7.1"/>.</t>
          </li>
        </ul>
        <t indent="0" pn="section-1.1-4">This document contains extensive discussion about end-to-end cryptographic protections in email while acknowledging that many MUAs have no capabilities for end-to-end cryptographic protections at all.
We divide MUAs into three distinct profiles:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.1-5">
          <li pn="section-1.1-5.1">
            <t indent="0" pn="section-1.1-5.1.1">A <em>non-cryptographic</em> MUA has no capabilities for end-to-end cryptographic protections.</t>
          </li>
          <li pn="section-1.1-5.2">
            <t indent="0" pn="section-1.1-5.2.1">A <em>conformant</em> MUA follows the guidance in this document when dealing with end-to-end cryptographic protections.</t>
          </li>
          <li pn="section-1.1-5.3">
            <t indent="0" pn="section-1.1-5.3.1">A <em>legacy</em> MUA has capabilities for end-to-end cryptographic protections but does not adhere to the guidance in this document.</t>
          </li>
        </ul>
        <t indent="0" pn="section-1.1-6">At the time of the writing of this document, most MUAs with cryptographic protections are legacy MUAs.</t>
        <section anchor="structural-header-fields" numbered="true" removeInRFC="false" toc="include" pn="section-1.1.1">
          <name slugifiedName="name-structural-header-fields">Structural Header Fields</name>
          <t indent="0" pn="section-1.1.1-1">A message header field named <tt>MIME-Version</tt>, or whose name begins with <tt>Content-</tt>, is referred to in this document as a "structural" header field.
This is a less-ambiguous name for what <xref target="RFC2045" format="default" sectionFormat="of" derivedContent="RFC2045"/> calls "MIME header fields".</t>
          <t indent="0" pn="section-1.1.1-2">These header fields indicate something about the specific MIME part they are attached to and cannot be transferred or copied to other parts without endangering the readability of the message.</t>
          <t indent="0" pn="section-1.1.1-3">This includes:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.1.1-4">
            <li pn="section-1.1.1-4.1">
              <t indent="0" pn="section-1.1.1-4.1.1"><tt>MIME-Version</tt></t>
            </li>
            <li pn="section-1.1.1-4.2">
              <t indent="0" pn="section-1.1.1-4.2.1"><tt>Content-Type</tt></t>
            </li>
            <li pn="section-1.1.1-4.3">
              <t indent="0" pn="section-1.1.1-4.3.1"><tt>Content-Transfer-Encoding</tt></t>
            </li>
            <li pn="section-1.1.1-4.4">
              <t indent="0" pn="section-1.1.1-4.4.1"><tt>Content-Disposition</tt></t>
            </li>
          </ul>
        </section>
        <section anchor="user-facing-header-fields" numbered="true" removeInRFC="false" toc="include" pn="section-1.1.2">
          <name slugifiedName="name-user-facing-header-fields">User-Facing Header Fields</name>
          <t indent="0" pn="section-1.1.2-1">Of all the header fields that an email message may contain, only a small subset are typically presented directly to the user.
This document refers to them as User-Facing Header Fields.
Typically, User-Facing Header Fields are:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.1.2-2">
            <li pn="section-1.1.2-2.1">
              <t indent="0" pn="section-1.1.2-2.1.1"><tt>Subject</tt></t>
            </li>
            <li pn="section-1.1.2-2.2">
              <t indent="0" pn="section-1.1.2-2.2.1"><tt>From</tt></t>
            </li>
            <li pn="section-1.1.2-2.3">
              <t indent="0" pn="section-1.1.2-2.3.1"><tt>To</tt></t>
            </li>
            <li pn="section-1.1.2-2.4">
              <t indent="0" pn="section-1.1.2-2.4.1"><tt>Cc</tt></t>
            </li>
            <li pn="section-1.1.2-2.5">
              <t indent="0" pn="section-1.1.2-2.5.1"><tt>Date</tt></t>
            </li>
            <li pn="section-1.1.2-2.6">
              <t indent="0" pn="section-1.1.2-2.6.1"><tt>Reply-To</tt></t>
            </li>
            <li pn="section-1.1.2-2.7">
              <t indent="0" pn="section-1.1.2-2.7.1"><tt>Followup-To</tt></t>
            </li>
            <li pn="section-1.1.2-2.8">
              <t indent="0" pn="section-1.1.2-2.8.1"><tt>Sender</tt></t>
            </li>
            <li pn="section-1.1.2-2.9">
              <t indent="0" pn="section-1.1.2-2.9.1"><tt>Resent-From</tt></t>
            </li>
            <li pn="section-1.1.2-2.10">
              <t indent="0" pn="section-1.1.2-2.10.1"><tt>Resent-To</tt></t>
            </li>
            <li pn="section-1.1.2-2.11">
              <t indent="0" pn="section-1.1.2-2.11.1"><tt>Resent-Cc</tt></t>
            </li>
            <li pn="section-1.1.2-2.12">
              <t indent="0" pn="section-1.1.2-2.12.1"><tt>Resent-Date</tt></t>
            </li>
            <li pn="section-1.1.2-2.13">
              <t indent="0" pn="section-1.1.2-2.13.1"><tt>Resent-Sender</tt></t>
            </li>
          </ul>
          <t indent="0" pn="section-1.1.2-3">The above list contains the header fields most often presented directly to the user who views a message, though an MUA may also decide to treat any other header field as "User-Facing".
Of course, many of these header fields are entirely absent from any given message, and an absent header field is not presented to the user at all.</t>
          <t indent="0" pn="section-1.1.2-4">Note that the resending header fields (those beginning with <tt>Resent-</tt>) are typically only added by an intervening MUA (see <xref section="3.6.6" sectionFormat="of" target="RFC5322" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5322#section-3.6.6" derivedContent="RFC5322"/> and <xref target="intervening-mua" format="default" sectionFormat="of" derivedContent="Section 9.8"/> of this document).
As such, though they may in some cases be presented to the user, they will typically not bear any end-to-end cryptographic protection (even if the original header fields of a message are protected; see <xref target="message-header-fields" format="default" sectionFormat="of" derivedContent="Section 9.3"/>), because they are unknown to the original sender.</t>
          <t indent="0" pn="section-1.1.2-5">Other header fields may affect the visible rendering of the message (e.g., <tt>References</tt> and <tt>In-Reply-To</tt> may affect the placement of a message in a threaded discussion, or the <tt>List-*</tt> and <tt>Archived-At</tt> header fields added by mailing lists may cause additional buttons to be displayed during rendering), but they are not directly displayed to the user and so are not considered "User-Facing".</t>
        </section>
      </section>
    </section>
    <section anchor="usability" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-usability">Usability</name>
      <t indent="0" pn="section-2-1">Any MUA that enables its user to transition from unprotected messages to messages with end-to-end cryptographic protection needs to consider how the user understands this transition.
That said, the primary goal of the user of an MUA is communication -- so interface elements that interfere with communication should be avoided where possible.</t>
      <t indent="0" pn="section-2-2">Furthermore, it is a near certainty that the user will continue to encounter unprotected messages and may need to send unprotected messages (for example, if a given recipient cannot handle cryptographic protections).
This means that the MUA needs to provide the user with some guidance so that they understand what protections any given message or conversation has.
But the user should not be overwhelmed with choices or presented with unactionable information.</t>
      <section anchor="simplicity" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-simplicity">Simplicity</name>
        <t indent="0" pn="section-2.1-1">The end user (the operator of the MUA) is unlikely to understand complex end-to-end cryptographic protections on any email message, so keep it simple.</t>
        <t indent="0" pn="section-2.1-2">For clarity to the user, any cryptographic protections should apply to the message as a whole, not just to some subparts.</t>
        <t indent="0" pn="section-2.1-3">This is true for message composition: The standard message composition user interface of an MUA should offer minimal controls that indicate which types of protection to apply to the new message as a whole.</t>
        <t indent="0" pn="section-2.1-4">This is also true for message interpretation: The standard message rendering user interface of an MUA should offer a minimal, clear indicator about the end-to-end cryptographic status of the message as a whole.</t>
        <t indent="0" pn="section-2.1-5">See <xref target="types-of-protection" format="default" sectionFormat="of" derivedContent="Section 3"/> for more details about mental models and cryptographic status.</t>
        <aside pn="section-2.1-6">
          <t indent="0" pn="section-2.1-6.1">(It is of course possible that a message forwarded as a MIME attachment could have its own cryptographic status while still being a message subpart, but that status should be distinct from the status of the enclosing message.)</t>
        </aside>
      </section>
      <section anchor="similar-ux" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-email-users-want-a-familiar">Email Users Want a Familiar Experience</name>
        <t indent="0" pn="section-2.2-1">A person communicating over the Internet today often has many options for reaching their desired correspondent, including web-based bulletin boards, contact forms, and instant messaging services.</t>
        <t indent="0" pn="section-2.2-2">Email offers a few distinctions from these other systems, most notably features like:</t>
        <dl spacing="normal" newline="false" indent="3" pn="section-2.2-3">
          <dt pn="section-2.2-3.1">Ubiquity:</dt>
          <dd pn="section-2.2-3.2">Most correspondents will have an email address, while not everyone is present on the various non-email messaging services, particularly those that have reliable end-to-end cryptographic protections.</dd>
          <dt pn="section-2.2-3.3">Federation:</dt>
          <dd pn="section-2.2-3.4">Interaction between users on distinct domains who have not agreed on a common communications provider is still possible.</dd>
          <dt pn="section-2.2-3.5">User Control:</dt>
          <dd pn="section-2.2-3.6">The user can interact with the email system using an MUA of their choosing, including automation and other control over their preferred and/or customized workflow.</dd>
        </dl>
        <t indent="0" pn="section-2.2-4">Other systems (like some popular instant messaging applications, such as WhatsApp and Signal Private Messenger) offer built-in end-to-end cryptographic protections by default, which are simpler for the user to understand.
("All the messages I see on Signal are confidential and integrity-protected" is a clean user story.)</t>
        <t indent="0" pn="section-2.2-5">A user of email is likely using email instead of other systems because of the distinctions outlined above.
When adding end-to-end cryptographic protection to an email endpoint, care should be taken not to negate any of the distinct features of email as a whole.
If these features are violated to provide end-to-end cryptographic protection, the user may just as well choose one of the other systems that don't have the drawbacks that email has.
Implementers should try to provide end-to-end protections that retain the familiar experience of email itself.</t>
        <t indent="0" pn="section-2.2-6">Furthermore, an email user is likely to regularly interact with other email correspondents who <em>cannot</em> handle or produce end-to-end cryptographic protections.
Care should be taken when enabling cryptography in an MUA so that the MUA does not inadvertently limit the ability of the user to interact with correspondents who use legacy or non-cryptographic MUAs.</t>
      </section>
      <section anchor="security-indicators" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-warning-about-failure-vs-an">Warning About Failure vs. Announcing Success</name>
        <t indent="0" pn="section-2.3-1">Moving the Web from http to https offers useful historical similarities to adding end-to-end encryption to email.</t>
        <t indent="0" pn="section-2.3-2">In particular, the indicators of what is "secure" vs. "insecure" for web browsers have changed over time.
For example, years ago, the default experience was http, and https sites were flagged with "secure" indicators like a lock icon.
	Starting in 2018, some browsers reversed that process by downplaying https and instead visibly marking http as "not secure" (see <xref target="CHROME-INDICATORS" format="default" sectionFormat="of" derivedContent="CHROME-INDICATORS"/>).</t>
        <t indent="0" pn="section-2.3-3">By analogy, when the user of an MUA first enables end-to-end cryptographic protection, it's likely that they will want to see which messages <em>have</em> protection (that is, the security indicators amenable to a conformant MUA as of 2025 are most likely to be comparable to those of a pre-2018 web browser).
But a user whose private email communications with a given correspondent, or within a given domain, are known to be entirely end-to-end protected might instead want to know which messages do <em>not</em> have the expected protections.</t>
        <t indent="0" pn="section-2.3-4">Note also that some messages may be expected to be confidential, but other messages are expected to be public -- the types of protection (see <xref target="types-of-protection" format="default" sectionFormat="of" derivedContent="Section 3"/>) that apply to each particular message will be different.
	And the types of protection that are <em>expected</em> to be present in any context might differ (for example, by sender, by thread, or by date).</t>
        <t indent="0" pn="section-2.3-5">It is out of scope for this document to define expectations about protections for any given message, but an implementer who cares about offering a simple user experience should be deliberate and judicious about the expectations their interface assumes that the user has in a given context.
See <xref target="expect-e2e" format="default" sectionFormat="of" derivedContent="Appendix A.9"/> for future work.</t>
      </section>
    </section>
    <section anchor="types-of-protection" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-types-of-protection">Types of Protection</name>
      <t indent="0" pn="section-3-1">A given message might be:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3-2">
        <li pn="section-3-2.1">
          <t indent="0" pn="section-3-2.1.1">signed,</t>
        </li>
        <li pn="section-3-2.2">
          <t indent="0" pn="section-3-2.2.1">encrypted,</t>
        </li>
        <li pn="section-3-2.3">
          <t indent="0" pn="section-3-2.3.1">both signed and encrypted, or</t>
        </li>
        <li pn="section-3-2.4">
          <t indent="0" pn="section-3-2.4.1">none of the above.</t>
        </li>
      </ul>
      <t indent="0" pn="section-3-3">Given that many email messages offer no cryptographic protections, the user needs to be able to detect which protections are present for any given message.</t>
      <section anchor="simple-mental-model" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-simplified-mental-model">Simplified Mental Model</name>
        <t indent="0" pn="section-3.1-1">To the extent that an email message actually does have end-to-end cryptographic protections, those protections need to be visible and comprehensible to the end users: both the composing user and the recipient who views the rendered message.
If either user is unaware of the protections, then they do not effectively extend all the way to the "end".</t>
        <t indent="0" pn="section-3.1-2">However, most users do not have (or want to have) a sophisticated mental model of what kinds of protections can be associated with a given message.
Even the four states above approach the limits of complexity for an interface for normal users.</t>
        <t indent="0" pn="section-3.1-3">While <xref target="no-encrypted-only" format="default" sectionFormat="of" derivedContent="Section 5.3"/> recommends avoiding deliberate creation of encrypted-only messages, some messages may end up in the encrypted-only state due to signature failure or certificate revocation.</t>
        <t indent="0" pn="section-3.1-4">A simple model for the recipient could be that a message is in one of three normal states, which align with the only reasonable choices for message composition:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.1-5">
          <li pn="section-3.1-5.1">
            <t indent="0" pn="section-3.1-5.1.1">Unprotected</t>
          </li>
          <li pn="section-3.1-5.2">
            <t indent="0" pn="section-3.1-5.2.1">Verified (has a valid signature from the apparent sender of the message)</t>
          </li>
          <li pn="section-3.1-5.3">
            <t indent="0" pn="section-3.1-5.3.1">Confidential (encrypted with a valid signature from the apparent sender of the message)</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.1-6">However, one error state exists for rendered mail that does not correspond to a reasonable choice for message composition:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.1-7">
          <li pn="section-3.1-7.1">
            <t indent="0" pn="section-3.1-7.1.1">Encrypted But Unverified (encrypted without a valid signature from the apparent sender of the message)</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.1-8">Note that this last state is not "Confidential" (a secret shared exclusively between the participants in the communication) because the recipient does not know for sure who sent it.</t>
        <t indent="0" pn="section-3.1-9">In an ecosystem where encrypted-only messages are never deliberately sent (see <xref target="no-encrypted-only" format="default" sectionFormat="of" derivedContent="Section 5.3"/>), representing an Encrypted But Unverified message as a type of user-visible error is not unreasonable.
However, this is not the state of the global email ecosystem when this document was written, since some legacy MUAs permit composing encrypted-but-unsigned mail (see <xref target="expect-e2e" format="default" sectionFormat="of" derivedContent="Appendix A.9"/> for possible future guidance).</t>
        <t indent="0" pn="section-3.1-10">Alternately, an MUA may prefer to represent the state of an Encrypted But Unverified message to the user as though it was Unprotected since no verification is possible.
However the MUA represents the message to the user, it <bcp14>MUST NOT</bcp14> leak cleartext of an encrypted message (even an Encrypted But Unverified message) in subsequent replies (see <xref target="composing-reply" format="default" sectionFormat="of" derivedContent="Section 5.4"/>) or similar replications of the message.</t>
        <t indent="0" pn="section-3.1-11">Note that a cleartext message with an invalid signature <bcp14>SHOULD NOT</bcp14> be represented to the user as anything other than Unprotected (see <xref target="signature-failures" format="default" sectionFormat="of" derivedContent="Section 6.4"/>) unless the MUA is providing the user with debugging information.</t>
        <t indent="0" pn="section-3.1-12">At the time this document was written, the global email ecosystem contains a heterogeneous mix of legacy and non-cryptographic MUAs.
In such an ecosystem, a conformant MUA may instead prefer to represent "Verified" and "Encrypted" as orthogonal states of any given rendered message.
While this model does not precisely match the choice a user makes when composing a message, it may align more with the reality of the range of messages they encounter as a recipient.</t>
      </section>
      <section anchor="one-cryptographic-status-per-message" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-one-cryptographic-status-pe">One Cryptographic Status per Message</name>
        <t indent="0" pn="section-3.2-1">Some MUAs may attempt to generate multiple copies of a given email message, with different copies offering different types of protection (for example, opportunistically encrypting on a per-recipient basis).
A message resulting from this approach will have a cryptographic state that few users will understand.
Even if the composer understands the different statuses of the different copies, the recipients of the messages may not understand (each recipient might not even know about the other copies).
See, for example, the discussion in <xref target="mixed-recipients" format="default" sectionFormat="of" derivedContent="Section 9.6"/> for how this can go wrong.</t>
        <t indent="0" pn="section-3.2-2">For comprehensibility, a conformant MUA <bcp14>SHOULD NOT</bcp14> create multiple copies of a given message that differ in the types of end-to-end cryptographic protections afforded.</t>
        <t indent="0" pn="section-3.2-3">For opportunistic cryptographic protections that are not surfaced to the user (that is, that are not end-to-end), other mechanisms like transport encryption <xref target="RFC3207" format="default" sectionFormat="of" derivedContent="RFC3207"/> or domain-based signing <xref target="RFC6376" format="default" sectionFormat="of" derivedContent="RFC6376"/> may be preferable due to ease of implementation and deployment.
These opportunistic transport protections are orthogonal to the end-to-end protections described in this document.</t>
        <t indent="0" pn="section-3.2-4">To the extent that opportunistic message protections are made visible to the user for a given copy of a message, a conformant MUA will distinguish that status from the message's end-to-end cryptographic status.
But the potential confusion caused by rendering this complex, hybrid state may not be worth the value of additional knowledge gained by the user.
The benefits of opportunistic protections accrue (or don't) even without visibility to the user (see <xref target="RFC7435" format="default" sectionFormat="of" derivedContent="RFC7435"/>).</t>
        <t indent="0" pn="section-3.2-5">The user needs a single clear, simple, and correct indication about the end-to-end cryptographic status of any given message.
See <xref target="cryptographic-summary" format="default" sectionFormat="of" derivedContent="Section 4.6"/> for more details.</t>
      </section>
    </section>
    <section anchor="cryptographic-structure" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-cryptographic-mime-message-">Cryptographic MIME Message Structure</name>
      <t indent="0" pn="section-4-1">Implementations use the structure of an email message to establish (when composing) and understand (when rendering) the cryptographic status of the message.
This section establishes some conventions about how to think about message structure.</t>
      <section anchor="cryptographic-layer" numbered="true" removeInRFC="false" toc="include" pn="section-4.1">
        <name slugifiedName="name-cryptographic-layers">Cryptographic Layers</name>
        <t indent="0" pn="section-4.1-1">"Cryptographic Layer" refers to a MIME substructure that supplies some cryptographic protections to an internal MIME subtree.
The internal subtree is known as the "protected part", though of course it may itself be a multipart object.</t>
        <t indent="0" pn="section-4.1-2">In the diagrams below, <u format="lit-name-num" pn="u-1">╧</u> indicates "decrypts to" and <u format="lit-name-num" pn="u-2">┴</u> indicates "unwraps to".</t>
        <section anchor="smime-cryptographic-layers" numbered="true" removeInRFC="false" toc="include" pn="section-4.1.1">
          <name slugifiedName="name-s-mime-cryptographic-layers">S/MIME Cryptographic Layers</name>
          <t indent="0" pn="section-4.1.1-1">For S/MIME <xref target="RFC8551" format="default" sectionFormat="of" derivedContent="RFC8551"/>, there are four forms of Cryptographic Layers: multipart/signed, PKCS #7 signed-data, PKCS #7 enveloped-data, and PKCS #7 authEnveloped-data.</t>
          <section anchor="smime-multipart-signed" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.1.1">
            <name slugifiedName="name-s-mime-multipart-signed-cry">S/MIME Multipart Signed Cryptographic Layer</name>
            <artwork type="ascii-art" align="left" pn="section-4.1.1.1-1">
└┬╴multipart/signed; protocol="application/pkcs7-signature"
 ├─╴[protected part]
 └─╴application/pkcs7-signature
</artwork>
            <t indent="0" pn="section-4.1.1.1-2">This MIME layer offers authentication and integrity.</t>
          </section>
          <section anchor="smime-pkcs7-signed-data" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.1.2">
            <name slugifiedName="name-s-mime-pkcs-7-signed-data-c">S/MIME PKCS #7 signed-data Cryptographic Layer</name>
            <artwork type="ascii-art" align="left" pn="section-4.1.1.2-1">
└┬╴application/pkcs7-mime; smime-type="signed-data"
 ┴ (unwraps to)
 └─╴[protected part]
</artwork>
            <t indent="0" pn="section-4.1.1.2-2">This MIME layer offers authentication and integrity.</t>
          </section>
          <section anchor="smime-pkcs7-enveloped-data" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.1.3">
            <name slugifiedName="name-s-mime-pkcs-7-enveloped-dat">S/MIME PKCS #7 enveloped-data Cryptographic Layer</name>
            <artwork type="ascii-art" align="left" pn="section-4.1.1.3-1">
└┬╴application/pkcs7-mime; smime-type="enveloped-data"
 ╧ (decrypts to)
 └─╴[protected part]
</artwork>
            <t indent="0" pn="section-4.1.1.3-2">This MIME layer offers confidentiality.</t>
          </section>
          <section anchor="smime-pkcs7-authenveloped-data" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.1.4">
            <name slugifiedName="name-s-mime-pkcs-7-authenveloped">S/MIME PKCS #7 authEnveloped-data Cryptographic Layer</name>
            <artwork type="ascii-art" align="left" pn="section-4.1.1.4-1">
└┬╴application/pkcs7-mime; smime-type="authEnveloped-data"
 ╧ (decrypts to)
 └─╴[protected part]
</artwork>
            <t indent="0" pn="section-4.1.1.4-2">This MIME layer offers confidentiality and integrity.</t>
            <t indent="0" pn="section-4.1.1.4-3">Note that <tt>enveloped-data</tt> (<xref target="smime-pkcs7-enveloped-data" format="default" sectionFormat="of" derivedContent="Section 4.1.1.3"/>) and <tt>authEnveloped-data</tt> (<xref target="smime-pkcs7-authenveloped-data" format="default" sectionFormat="of" derivedContent="Section 4.1.1.4"/>) have identical message structures and very similar confidentiality semantics.
The only difference between the two is ciphertext malleability.</t>
            <t indent="0" pn="section-4.1.1.4-4">The examples in this document only include <tt>enveloped-data</tt>, but the implications for that layer apply to <tt>authEnveloped-data</tt> as well.</t>
          </section>
          <section anchor="pkcs7-compression-is-not-a-cryptographic-layer" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.1.5">
            <name slugifiedName="name-pkcs-7-compression-is-not-a">PKCS #7 Compression is NOT a Cryptographic Layer</name>
            <t indent="0" pn="section-4.1.1.5-1">The Cryptographic Message Syntax (CMS) provides a MIME compression layer (<tt>smime-type="compressed-data"</tt>), as defined in <xref target="RFC3274" format="default" sectionFormat="of" derivedContent="RFC3274"/>.
While the compression layer is technically a part of CMS, it is not considered a Cryptographic Layer for the purposes of this document.</t>
          </section>
        </section>
        <section anchor="pgpmime-cryptographic-layers" numbered="true" removeInRFC="false" toc="include" pn="section-4.1.2">
          <name slugifiedName="name-pgp-mime-cryptographic-laye">PGP/MIME Cryptographic Layers</name>
          <t indent="0" pn="section-4.1.2-1">For PGP/MIME <xref target="RFC3156" format="default" sectionFormat="of" derivedContent="RFC3156"/>, there are two forms of Cryptographic Layers: signing and encryption.</t>
          <section anchor="pgpmime-multipart-signed" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.2.1">
            <name slugifiedName="name-pgp-mime-signing-cryptograp">PGP/MIME Signing Cryptographic Layer (multipart/signed)</name>
            <artwork type="ascii-art" align="left" pn="section-4.1.2.1-1">
└┬╴multipart/signed; protocol="application/pgp-signature"
 ├─╴[protected part]
 └─╴application/pgp-signature
</artwork>
            <t indent="0" pn="section-4.1.2.1-2">This MIME layer offers authenticity and integrity.</t>
          </section>
          <section anchor="pgpmime-multipart-encrypted" numbered="true" removeInRFC="false" toc="exclude" pn="section-4.1.2.2">
            <name slugifiedName="name-pgp-mime-encryption-cryptog">PGP/MIME Encryption Cryptographic Layer (multipart/encrypted)</name>
            <artwork type="ascii-art" align="left" pn="section-4.1.2.2-1">
└┬╴multipart/encrypted
 ├─╴application/pgp-encrypted
 └┬╴application/octet-stream
  ╧ (decrypts to)
  └─╴[protected part]
</artwork>
            <t indent="0" pn="section-4.1.2.2-2">This MIME layer can offer:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.1.2.2-3">
              <li pn="section-4.1.2.2-3.1">
                <t indent="0" pn="section-4.1.2.2-3.1.1">confidentiality (via a Symmetrically Encrypted Data Packet, see <xref section="5.7" sectionFormat="of" target="RFC9580" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9580#section-5.7" derivedContent="RFC9580"/>; an MUA <bcp14>MUST NOT</bcp14> generate this form due to ciphertext malleability),</t>
              </li>
              <li pn="section-4.1.2.2-3.2">
                <t indent="0" pn="section-4.1.2.2-3.2.1">confidentiality and integrity (via a Symmetrically Encrypted and Integrity Protected Data Packet (SEIPD); see <xref section="5.13" sectionFormat="of" target="RFC9580" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9580#section-5.13" derivedContent="RFC9580"/>), or</t>
              </li>
              <li pn="section-4.1.2.2-3.3">
                <t indent="0" pn="section-4.1.2.2-3.3.1">confidentiality, integrity, and authenticity all together (by including an OpenPGP Signature Packet, see <xref section="5.2" sectionFormat="of" target="RFC9580" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9580#section-5.2" derivedContent="RFC9580"/>, within the SEIPD).</t>
              </li>
            </ul>
          </section>
        </section>
      </section>
      <section anchor="cryptographic-envelope" numbered="true" removeInRFC="false" toc="include" pn="section-4.2">
        <name slugifiedName="name-cryptographic-envelope">Cryptographic Envelope</name>
        <t indent="0" pn="section-4.2-1">The Cryptographic Envelope is the largest contiguous set of Cryptographic Layers of an email message starting with the outermost MIME type (that is, with the Content-Type of the message itself).</t>
        <t indent="0" pn="section-4.2-2">If the Content-Type of the message itself is not a Cryptographic Layer, then the message has no Cryptographic Envelope.</t>
        <t indent="0" pn="section-4.2-3">"Contiguous" in the definition above indicates that if a Cryptographic Layer is the protected part of another Cryptographic Layer, the layers together comprise a single Cryptographic Envelope.</t>
        <t indent="0" pn="section-4.2-4">Note that if a non-Cryptographic Layer intervenes, all Cryptographic Layers within the non-Cryptographic Layer <em>are not</em> part of the Cryptographic Envelope.
They are Errant Cryptographic Layers (see <xref target="errant-cryptographic-layers" format="default" sectionFormat="of" derivedContent="Section 4.5"/>).</t>
        <t indent="0" pn="section-4.2-5">Also note that the ordering of the Cryptographic Layers implies different cryptographic properties.
A signed-then-encrypted message is different than an encrypted-then-signed message.
See <xref target="sign-then-encrypt" format="default" sectionFormat="of" derivedContent="Section 5.2"/>.</t>
      </section>
      <section anchor="cryptographic-payload" numbered="true" removeInRFC="false" toc="include" pn="section-4.3">
        <name slugifiedName="name-cryptographic-payload">Cryptographic Payload</name>
        <t indent="0" pn="section-4.3-1">The Cryptographic Payload of a message is the first non-Cryptographic Layer -- the "protected part" -- within the Cryptographic Envelope.</t>
      </section>
      <section anchor="types-of-cryptographic-envelope" numbered="true" removeInRFC="false" toc="include" pn="section-4.4">
        <name slugifiedName="name-types-of-cryptographic-enve">Types of Cryptographic Envelope</name>
        <section anchor="simple-cryptographic-envelopes" numbered="true" removeInRFC="false" toc="include" pn="section-4.4.1">
          <name slugifiedName="name-simple-cryptographic-envelo">Simple Cryptographic Envelopes</name>
          <t indent="0" pn="section-4.4.1-1">As described above, if the "protected part" identified in the section above is not itself a Cryptographic Layer, that part <em>is</em> the Cryptographic Payload.</t>
          <t indent="0" pn="section-4.4.1-2">If the application wants to generate a message that is both encrypted and signed, it <bcp14>MAY</bcp14> use the simple MIME structure from <xref target="pgpmime-multipart-encrypted" format="default" sectionFormat="of" derivedContent="Section 4.1.2.2"/> by ensuring that the <xref target="RFC9580" format="default" sectionFormat="of" derivedContent="RFC9580"/> Encrypted Message within the <tt>application/octet-stream</tt> part contains a <xref target="RFC9580" format="default" sectionFormat="of" derivedContent="RFC9580"/> Signed Message (the final option described in <xref target="pgpmime-multipart-encrypted" format="default" sectionFormat="of" derivedContent="Section 4.1.2.2"/>).</t>
        </section>
        <section anchor="multilayer-cryptographic-envelopes" numbered="true" removeInRFC="false" toc="include" pn="section-4.4.2">
          <name slugifiedName="name-multilayer-cryptographic-en">Multilayer Cryptographic Envelopes</name>
          <t indent="0" pn="section-4.4.2-1">It is possible to construct a Cryptographic Envelope consisting of multiple layers with either S/MIME or PGP/MIME, for example, using the following structure:</t>
          <artwork type="ascii-art" align="left" pn="section-4.4.2-2">
A └┬╴application/pkcs7-mime; smime-type="enveloped-data"
B  ╧ (decrypts to)
C  └┬╴application/pkcs7-mime; smime-type="signed-data"
D   ┴ (unwraps to)
E   └─╴[protected part]
</artwork>
          <t indent="0" pn="section-4.4.2-3">When handling such a message, the properties of the Cryptographic Envelope are derived from the series <tt>A</tt> and <tt>C</tt>.</t>
          <t indent="0" pn="section-4.4.2-4">As noted in <xref target="simple-cryptographic-envelopes" format="default" sectionFormat="of" derivedContent="Section 4.4.1"/>, PGP/MIME applications also have a simpler MIME construction available with the same cryptographic properties.</t>
        </section>
      </section>
      <section anchor="errant-cryptographic-layers" numbered="true" removeInRFC="false" toc="include" pn="section-4.5">
        <name slugifiedName="name-errant-cryptographic-layers">Errant Cryptographic Layers</name>
        <t indent="0" pn="section-4.5-1">Due to confusion, malice, message forwarding, or well-intentioned tampering, a message may contain a Cryptographic Layer that is not part of the Cryptographic Envelope.
Such a layer is an Errant Cryptographic Layer.</t>
        <t indent="0" pn="section-4.5-2">An Errant Cryptographic Layer <bcp14>MUST NOT</bcp14> contribute to the message's overall cryptographic state.</t>
        <t indent="0" pn="section-4.5-3">Guidance for dealing with Errant Cryptographic Layers can be found in <xref target="errant-layers" format="default" sectionFormat="of" derivedContent="Section 6.2"/>.</t>
        <section anchor="mailing-list-wrapping" numbered="true" removeInRFC="false" toc="include" pn="section-4.5.1">
          <name slugifiedName="name-mailing-list-wrapping">Mailing List Wrapping</name>
          <t indent="0" pn="section-4.5.1-1">Some mailing list software will rewrap a well-formed signed message before resending to add a footer, resulting in the following structure seen by recipients of the email:</t>
          <artwork type="ascii-art" align="left" pn="section-4.5.1-2">
H └┬╴multipart/mixed
I  ├┬╴multipart/signed
J  │├─╴text/plain
K  │└─╴application/pgp-signature
L  └─╴text/plain
</artwork>
          <t indent="0" pn="section-4.5.1-3">In this message, <tt>L</tt> is the footer added by the mailing list.  <tt>I</tt> is now an Errant Cryptographic Layer.</t>
          <t indent="0" pn="section-4.5.1-4">Note that this message has no Cryptographic Envelope at all.</t>
          <t indent="0" pn="section-4.5.1-5">It is <bcp14>NOT RECOMMENDED</bcp14> to produce email messages with this structure, because a legacy MUA may present the data in part <tt>L</tt> as though it were part of <tt>J</tt>, though they have different cryptographic properties.
In particular, if the user believes that the entire message is signed but cannot distinguish <tt>L</tt> from <tt>J</tt>, then the author of <tt>L</tt> can effectively tamper with content of the signed message, breaking the user's expectation of integrity and authenticity.</t>
          <t indent="0" pn="section-4.5.1-6">See also <xref target="exception-mailing-list-footers" format="default" sectionFormat="of" derivedContent="Section 6.2.1.1"/> for guidance on how a rendering MUA might deal with this common pattern.</t>
        </section>
        <section anchor="baroque-example" numbered="true" removeInRFC="false" toc="include" pn="section-4.5.2">
          <name slugifiedName="name-a-baroque-example">A Baroque Example</name>
          <t indent="0" pn="section-4.5.2-1">Consider a message with the following overcomplicated structure:</t>
          <artwork type="ascii-art" align="left" pn="section-4.5.2-2">
M └┬╴multipart/encrypted
N  ├─╴application/pgp-encrypted
O  └┬╴application/octet-stream
P   ╧ (decrypts to)
Q   └┬╴multipart/signed
R    ├┬╴multipart/mixed
S    │├┬╴multipart/signed
T    ││├─╴text/plain
U    ││└─╴application/pgp-signature
V    │└─╴text/plain
W    └─╴application/pgp-signature
</artwork>
          <t indent="0" pn="section-4.5.2-3">The three Cryptographic Layers in such a message are rooted in parts <tt>M</tt>, <tt>Q</tt>, and <tt>S</tt>.
But the Cryptographic Envelope of the message consists only of the properties derived from the series <tt>M</tt> and <tt>Q</tt>.
The Cryptographic Payload of the message is part <tt>R</tt>.
Part <tt>S</tt> is an Errant Cryptographic Layer.</t>
          <t indent="0" pn="section-4.5.2-4">Note that this message has both a Cryptographic Envelope <em>and</em> an Errant Cryptographic Layer.</t>
          <t indent="0" pn="section-4.5.2-5">It is <bcp14>NOT RECOMMENDED</bcp14> to generate messages with such complicated structures.
Even if a receiving MUA can parse this structure properly, it is nearly impossible to render in a way that the user can reason about the cryptographic properties of part <tt>T</tt> compared to part <tt>V</tt>.</t>
        </section>
      </section>
      <section anchor="cryptographic-summary" numbered="true" removeInRFC="false" toc="include" pn="section-4.6">
        <name slugifiedName="name-cryptographic-summary">Cryptographic Summary</name>
        <t indent="0" pn="section-4.6-1">The cryptographic status of an email message with end-to-end cryptographic protections is known as the Cryptographic Summary.
A reasonable, simple Cryptographic Summary is derived from the aggregate properties of the layers in the Cryptographic Envelope.
This is a conceptual tool and a feature that an MUA can use to guide behavior and user experience, but it is not necessarily always directly exposed in any given user interface.
See <xref target="well-formed" format="default" sectionFormat="of" derivedContent="Section 6.1"/> for guidance and considerations about rendering the Cryptographic Summary to the user.</t>
      </section>
    </section>
    <section anchor="message-composition" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-message-composition">Message Composition</name>
      <t indent="0" pn="section-5-1">This section describes the ideal composition of an email message with end-to-end cryptographic protection.
A message composed with this form is most likely to achieve its end-to-end security goals.</t>
      <section anchor="composition" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-message-composition-algorit">Message Composition Algorithm</name>
        <t indent="0" pn="section-5.1-1">This section describes the steps that an MUA should use to compose a cryptographically protected message, such that it has a proper Cryptographic Envelope and Payload.</t>
        <t indent="0" pn="section-5.1-2">The inputs to the algorithm are:</t>
        <dl newline="false" spacing="normal" indent="3" pn="section-5.1-3">
          <dt pn="section-5.1-3.1"><tt>origbody</tt>:</dt>
          <dd pn="section-5.1-3.2">The unprotected message body as a
          well-formed MIME tree (possibly just a single MIME leaf part).  As a
          well-formed MIME tree, <tt>origbody</tt> already has Structural
          Header Fields present (see <xref target="structural-header-fields" format="default" sectionFormat="of" derivedContent="Section 1.1.1"/>).</dd>
          <dt pn="section-5.1-3.3"><tt>origheaders</tt>:</dt>
          <dd pn="section-5.1-3.4">The intended Non-Structural Header
          Fields for the message, represented here as a list of <tt>(h,v)</tt>
          pairs, where <tt>h</tt> is a header field name and <tt>v</tt> is the
          associated value.</dd>
          <dt pn="section-5.1-3.5"><tt>crypto</tt>:</dt>
          <dd pn="section-5.1-3.6">The series of cryptographic protections
          to apply (for example, "sign with the secret key corresponding to
          X.509 certificate X, then encrypt to X.509 certificates X and Y").
          This is a routine that accepts a MIME tree as input (the
          Cryptographic Payload), wraps the input in the appropriate
          Cryptographic Envelope, and returns the resultant MIME tree as
          output.</dd>
        </dl>
        <t indent="0" pn="section-5.1-4">The algorithm returns a MIME object that is ready to be injected into the mail system:</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5.1-5">
          <li pn="section-5.1-5.1" derivedCounter="1.">
            <t indent="0" pn="section-5.1-5.1.1">Apply <tt>crypto</tt> to MIME part <tt>origbody</tt>, producing MIME tree <tt>output</tt>.</t>
          </li>
          <li pn="section-5.1-5.2" derivedCounter="2.">
            <t indent="0" pn="section-5.1-5.2.1">For each header field name and value <tt>(h,v)</tt> in <tt>origheaders</tt>:
            </t>
            <ol spacing="normal" type="a" indent="adaptive" start="1" pn="section-5.1-5.2.2">
              <li pn="section-5.1-5.2.2.1" derivedCounter="a.">
                <t indent="0" pn="section-5.1-5.2.2.1.1">Add header field <tt>h</tt> to <tt>output</tt> with value <tt>v</tt>.</t>
              </li>
            </ol>
          </li>
          <li pn="section-5.1-5.3" derivedCounter="3.">
            <t indent="0" pn="section-5.1-5.3.1">Return <tt>output</tt>.</t>
          </li>
        </ol>
        <t indent="0" pn="section-5.1-6">This is the classic algorithm.  It only protects the Structural Header Fields of the message body and leaves Non-Structural (including User-Facing) Header Fields unprotected.</t>
        <t indent="0" pn="section-5.1-7">Therefore, a conformant MUA <bcp14>MUST</bcp14> implement Header Protection as described in <xref target="RFC9788" format="default" sectionFormat="of" derivedContent="RFC9788"/> (see <xref target="message-header-fields" format="default" sectionFormat="of" derivedContent="Section 9.3"/>).</t>
      </section>
      <section anchor="sign-then-encrypt" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-encryption-outside-signatur">Encryption Outside, Signature Inside</name>
        <t indent="0" pn="section-5.2-1">An email message that is both signed and encrypted is signed <em>inside</em> the encryption and not the other way around.
For example, when crafting a signed-and-encrypted message using a simple Cryptographic Envelope of a single layer (<xref target="simple-cryptographic-envelopes" format="default" sectionFormat="of" derivedContent="Section 4.4.1"/>) with PGP/MIME, the OpenPGP Encrypted Message object should contain an OpenPGP Signed Message.
Likewise, when using a multilayer Cryptographic Envelope (<xref target="multilayer-cryptographic-envelopes" format="default" sectionFormat="of" derivedContent="Section 4.4.2"/>), the outer layer should be an encryption layer and the inner layer should be a signing layer.</t>
        <t indent="0" pn="section-5.2-2">Putting the signature inside the encryption has two advantages:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2-3">
          <li pn="section-5.2-3.1">
            <t indent="0" pn="section-5.2-3.1.1">The details of the signature remain confidential, visible only to the parties capable of decryption.</t>
          </li>
          <li pn="section-5.2-3.2">
            <t indent="0" pn="section-5.2-3.2.1">Any mail transport agent that modifies the message is unlikely to be able to accidentally break the signature.</t>
          </li>
        </ul>
        <t indent="0" pn="section-5.2-4">A conformant MUA <bcp14>MUST NOT</bcp14> generate an encrypted and signed message where the only signature is outside the encryption.</t>
      </section>
      <section anchor="no-encrypted-only" numbered="true" removeInRFC="false" toc="include" pn="section-5.3">
        <name slugifiedName="name-avoid-offering-encrypted-on">Avoid Offering Encrypted-Only Messages</name>
        <t indent="0" pn="section-5.3-1">When generating an email, there are four options for applying end-to-end cryptographic protections:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3-2">
          <li pn="section-5.3-2.1">Unprotected: In some cases, offering any end-to-end cryptographic protection is harmful: It may confuse the recipient and offer no benefit.</li>
          <li pn="section-5.3-2.2">Signed-only: In other cases, signing a message is useful (authenticity and integrity are desirable), but encryption is either impossible (for example, if the composer does not know how to encrypt to all recipients) or meaningless (for example, an email message to a mailing list that is intended to be published to a public archive).</li>
          <li pn="section-5.3-2.3">Signed-and-encrypted: In other cases, full end-to-end confidentiality, authenticity, and integrity are desirable.</li>
          <li pn="section-5.3-2.4">
            <t indent="0" pn="section-5.3-2.4.1">Encrypted-only: There is no common use case for generating an email message with end-to-end confidentiality but without       authenticity or integrity.</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3-2.4.2">
              <li pn="section-5.3-2.4.2.1">Additionally, some encryption schemes are malleable.  This allows an attacker to tamper with the plaintext by modifying the ciphertext (i.e., without decrypting it).  One way to prevent this is to authenticate the ciphertext, e.g., using signatures, Message Authentication Codes (MACs), or Authenticated Encryption with Associated Data (AEAD) schemes.  See the Cipher Block Chaining (CBC) / Cipher FeedBack (CFB) gadget attack in <xref target="EFAIL" format="default" sectionFormat="of" derivedContent="EFAIL"/>.</li>
            </ul>
          </li>
        </ul>
        <t indent="0" pn="section-5.3-3">A conformant MUA should keep its message composition interface simple. When presenting the user with a choice of cryptographic protection, it <bcp14>MUST</bcp14> offer no more than three choices:</t>
        <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-5.3-4">
          <li pn="section-5.3-4.1" derivedCounter="1.">
            <t indent="0" pn="section-5.3-4.1.1">No end-to-end cryptographic protection</t>
          </li>
          <li pn="section-5.3-4.2" derivedCounter="2.">
            <t indent="0" pn="section-5.3-4.2.1">Verified (signed only)</t>
          </li>
          <li pn="section-5.3-4.3" derivedCounter="3.">
            <t indent="0" pn="section-5.3-4.3.1">Confidential (signed and encrypted)</t>
          </li>
        </ol>
        <t indent="0" pn="section-5.3-5">Note that these choices correspond to the simplified mental model in <xref target="simple-mental-model" format="default" sectionFormat="of" derivedContent="Section 3.1"/>.</t>
        <t indent="0" pn="section-5.3-6">A common anti-pattern among legacy MUAs is offering two boolean choices: one to toggle signing and another to toggle encryption.  This creates usability hurdles:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3-7">
          <li pn="section-5.3-7.1">
            <t indent="0" pn="section-5.3-7.1.1">A user who wants to compose a signed-and-encrypted message will have to click two buttons instead of one.</t>
          </li>
          <li pn="section-5.3-7.2">
            <t indent="0" pn="section-5.3-7.2.1">A user who clicks "Encrypt" but neglects to click "Signed" may not understand that they are creating a message that cannot be authenticated by the recipient.</t>
          </li>
        </ul>
      </section>
      <section anchor="composing-reply" numbered="true" removeInRFC="false" toc="include" pn="section-5.4">
        <name slugifiedName="name-composing-a-reply-message">Composing a Reply Message</name>
        <t indent="0" pn="section-5.4-1">When replying to a message, most MUAs compose an initial draft of the reply that contains quoted text from the original message.
A responsible MUA will take precautions to avoid leaking the cleartext of an encrypted message in such a reply.</t>
        <t indent="0" pn="section-5.4-2">If the original message was end-to-end encrypted, the replying MUA <bcp14>MUST</bcp14> either:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.4-3">
          <li pn="section-5.4-3.1">
            <t indent="0" pn="section-5.4-3.1.1">compose the reply with end-to-end encryption or</t>
          </li>
          <li pn="section-5.4-3.2">
            <t indent="0" pn="section-5.4-3.2.1">avoid including quoted text from the original message.</t>
          </li>
        </ul>
        <t indent="0" pn="section-5.4-4">In general, MUAs <bcp14>SHOULD</bcp14> prefer the first option: to compose an encrypted reply.
This is what users expect.</t>
        <t indent="0" pn="section-5.4-5">However, in some circumstances, the replying MUA cannot compose an encrypted reply.
For example, the MUA might not have a valid, unexpired, and encryption-capable certificate for all recipients.
This can also happen during composition when a user adds a new recipient into the reply or manually toggles the cryptographic protections to remove encryption.</t>
        <t indent="0" pn="section-5.4-6">In this circumstance, the composing MUA <bcp14>SHOULD</bcp14> strip the quoted text from the original message, unless the user indicates that they are deliberately including previously confidential content in a non-confidential message.</t>
        <t indent="0" pn="section-5.4-7">Note additional nuance about replies to malformed messages that contain encryption in <xref target="reply-to-errant-encryption" format="default" sectionFormat="of" derivedContent="Section 6.2.2.1"/>.</t>
      </section>
    </section>
    <section anchor="message-interpretation" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-message-interpretation">Message Interpretation</name>
      <t indent="0" pn="section-6-1">Despite the best efforts of well-intentioned composers to create email messages with well-formed, end-to-end cryptographic protection, rendering MUAs will inevitably encounter some messages with malformed end-to-end cryptographic protection.</t>
      <t indent="0" pn="section-6-2">This section offers guidance on dealing with both well-formed and malformed messages containing Cryptographic Layers.</t>
      <section anchor="well-formed" numbered="true" removeInRFC="false" toc="include" pn="section-6.1">
        <name slugifiedName="name-rendering-well-formed-messa">Rendering Well-Formed Messages</name>
        <t indent="0" pn="section-6.1-1">A message is well-formed when it has a Cryptographic Envelope, a Cryptographic Payload, and no Errant Cryptographic Layers.
Rendering a well-formed message is straightforward.</t>
        <t indent="0" pn="section-6.1-2">The rendering MUA evaluates and assembles the cryptographic properties of the Cryptographic Envelope into a Cryptographic Summary and displays that status to the user in a secure and strictly controlled part of the UI.
In particular, the part of the UI used to render the Cryptographic Summary of the message <bcp14>MUST NOT</bcp14> be spoofable, modifiable, or otherwise controllable by the rendered message itself.
By analogy, consider the "lock" icon in the address bar of the web browser: Regardless of the content of the webpage, the lock icon will only be displayed when the transport to the web server is adequately secured.</t>
        <t indent="0" pn="section-6.1-3">Aside from this Cryptographic Summary, the message itself <bcp14>MUST</bcp14> be rendered as though the Cryptographic Payload is the body of the message.
The Cryptographic Layers themselves <bcp14>SHOULD NOT</bcp14> be rendered as distinct objects unless the MUA is providing the user with debugging information.</t>
      </section>
      <section anchor="errant-layers" numbered="true" removeInRFC="false" toc="include" pn="section-6.2">
        <name slugifiedName="name-errant-cryptographic-layers-2">Errant Cryptographic Layers</name>
        <t indent="0" pn="section-6.2-1">If an incoming message has any Errant Cryptographic Layers, a conformant interpreting MUA <bcp14>MUST</bcp14> ignore those layers when rendering the Cryptographic Summary of the message to the user.</t>
        <section anchor="errant-signing-layer" numbered="true" removeInRFC="false" toc="include" pn="section-6.2.1">
          <name slugifiedName="name-errant-signing-layer">Errant Signing Layer</name>
          <t indent="0" pn="section-6.2.1-1">When rendering a message with an Errant Cryptographic Layer that provides authenticity and integrity (via signatures), the message should be rendered by replacing the Cryptographic Layer with the part it encloses.</t>
          <t indent="0" pn="section-6.2.1-2">For example, a message with this structure:</t>
          <artwork type="ascii-art" align="left" pn="section-6.2.1-3">
A └┬╴multipart/mixed
B  ├╴text/plain
C  ├┬╴multipart/signed
D  │├─╴image/jpeg
E  │└─╴application/pgp-signature
F  └─╴text/plain
</artwork>
          <t indent="0" pn="section-6.2.1-4">should be rendered identically to this:</t>
          <artwork type="ascii-art" align="left" pn="section-6.2.1-5">
A └┬╴multipart/mixed
B  ├─╴text/plain
D  ├─╴image/jpeg
F  └─╴text/plain
</artwork>
          <t indent="0" pn="section-6.2.1-6">In such a situation, a conformant MUA <bcp14>MUST NOT</bcp14> indicate in the Cryptographic Summary that the message is signed.
It <bcp14>MUST</bcp14> indicate that the message is Unprotected.</t>
          <section anchor="exception-mailing-list-footers" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.2.1.1">
            <name slugifiedName="name-exception-mailing-list-foot">Exception: Mailing List Footers</name>
            <t indent="0" pn="section-6.2.1.1-1">The use case described in <xref target="mailing-list-wrapping" format="default" sectionFormat="of" derivedContent="Section 4.5.1"/> is common enough in some contexts that a conformant MUA <bcp14>MAY</bcp14> decide to handle it as a special exception.</t>
            <t indent="0" pn="section-6.2.1.1-2">If the MUA determines that the message comes from a mailing list (for example, it has a <tt>List-ID</tt> header field) and it has a structure that appends a footer to a signing-only Cryptographic Layer with a valid signature, such as:</t>
            <artwork type="ascii-art" align="left" pn="section-6.2.1.1-3">
H └┬╴multipart/mixed
I  ├┬╴multipart/signed
J  │├─╴[protected part, may be arbitrary MIME subtree]
K  │└─╴application/{pgp,pkcs7}-signature
L  └─╴[footer, typically text/plain]
</artwork>
            <t indent="0" pn="section-6.2.1.1-4">or:</t>
            <artwork type="ascii-art" align="left" pn="section-6.2.1.1-5">
H └┬╴multipart/mixed
I  ├┬╴application/pkcs7-mime; smime-type="signed-data"
   │┴ (unwraps to)
J  │└─╴[protected part, may be an arbitrary MIME subtree]
L  └─╴[footer, typically text/plain]
</artwork>
            <t indent="0" pn="section-6.2.1.1-6">then the MUA <bcp14>MAY</bcp14> indicate to the user that this is a Verified message that has been wrapped by the mailing list.</t>
            <t indent="0" pn="section-6.2.1.1-7">In this case, the MUA <bcp14>MUST</bcp14> distinguish the footer (part <tt>L</tt>) from the protected part (part <tt>J</tt>) when rendering any information about the signature.</t>
            <t indent="0" pn="section-6.2.1.1-8">One way to do this is to offer the user two different views of the message: the "mailing list" view, which hides any positive Cryptographic Summary but shows the footer:</t>
            <artwork type="ascii-art" align="left" pn="section-6.2.1.1-9">
Cryptographic Protections: Unprotected
H └┬╴multipart/mixed
J  ├─╴[protected part, may be arbitrary MIME subtree]
L  └─╴[footer, typically text/plain]
</artwork>
            <t indent="0" pn="section-6.2.1.1-10">or the "sender's view", which shows the Cryptographic Summary as Verified but hides the footer:</t>
            <artwork type="ascii-art" align="left" pn="section-6.2.1.1-11">
Cryptographic Protections: Verified [details from part I]
J └─╴[protected part, may be arbitrary MIME subtree]
</artwork>
          </section>
        </section>
        <section anchor="errant-encryption-layer" numbered="true" removeInRFC="false" toc="include" pn="section-6.2.2">
          <name slugifiedName="name-errant-encryption-layer">Errant Encryption Layer</name>
          <t indent="0" pn="section-6.2.2-1">An MUA may encounter a message with an Errant Cryptographic Layer that offers confidentiality (encryption), and the MUA is capable of decrypting it.</t>
          <t indent="0" pn="section-6.2.2-2">The user wants to be able to see the contents of any message that they have access to, so a conformant MUA in this situation <bcp14>SHOULD</bcp14> decrypt the part.</t>
          <t indent="0" pn="section-6.2.2-3">However, in this case, a conformant MUA <bcp14>MUST NOT</bcp14> indicate in the message's Cryptographic Summary that the message itself was encrypted.
	  Such an indication could be taken to mean that other (non-encrypted) parts of the message arrived with cryptographic confidentiality.</t>
          <t indent="0" pn="section-6.2.2-4">Furthermore, when decrypting an Errant Cryptographic Layer, the MUA <bcp14>MUST</bcp14> treat the decrypted cleartext as a distinct MIME subtree and it <bcp14>MUST NOT</bcp14> attempt to merge or splice it together with any other part of the message.
This offers protection against the direct exfiltration (also known as EFAIL-DE) attacks described in <xref target="EFAIL" format="default" sectionFormat="of" derivedContent="EFAIL"/> and so-called <tt>multipart/oracle</tt> attacks described in <xref target="ORACLE" format="default" sectionFormat="of" derivedContent="ORACLE"/>.</t>
          <section anchor="reply-to-errant-encryption" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.2.2.1">
            <name slugifiedName="name-replying-to-a-message-with-">Replying to a Message with an Errant Encryption Layer</name>
            <t indent="0" pn="section-6.2.2.1-1">Note that there is an asymmetry here between rendering and replying to a message with an Errant Encryption Layer.</t>
            <t indent="0" pn="section-6.2.2.1-2">When rendering, the MUA does not indicate that the message was encrypted, even if some subpart of it was decrypted for rendering.</t>
            <t indent="0" pn="section-6.2.2.1-3">When composing a reply to a message that has any encryption layer, even an errant one, the reply message <bcp14>SHOULD</bcp14> be marked for encryption, unless quoted and attributed text is not included in the reply, as noted in <xref target="composing-reply" format="default" sectionFormat="of" derivedContent="Section 5.4"/>.</t>
            <t indent="0" pn="section-6.2.2.1-4">When composing a reply to a message with an Errant Cryptographic Layer, a conformant MUA <bcp14>MUST NOT</bcp14> quote or attribute text derived from the decryption of any Errant Cryptographic Layer.
This will typically mean either leaving the ciphertext itself in the generated reply message or simply not generating any quoted or attributed text at all.
This offers protection against the reply-based attacks described in <xref target="REPLY" format="default" sectionFormat="of" derivedContent="REPLY"/>.</t>
            <t indent="0" pn="section-6.2.2.1-5">In all circumstances, if the reply message cannot be encrypted (or if the user elects to not encrypt the reply), the composed reply <bcp14>MUST NOT</bcp14> include any material from the decrypted subpart.</t>
          </section>
        </section>
        <section anchor="avoiding-non-mime-cryptographic-mechanisms" numbered="true" removeInRFC="false" toc="include" pn="section-6.2.3">
          <name slugifiedName="name-avoiding-non-mime-cryptogra">Avoiding Non-MIME Cryptographic Mechanisms</name>
          <t indent="0" pn="section-6.2.3-1">In some cases, there may be a cryptographic signature or encryption that does not coincide with a MIME boundary.
For example, so-called "PGP Inline" messages typically contain base64-encoded ("ASCII-armored", see <xref section="6" sectionFormat="of" target="RFC9580" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9580#section-6" derivedContent="RFC9580"/>) ciphertext within the content of a MIME part.</t>
          <section anchor="do-not-validate-non-mime-signatures" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.2.3.1">
            <name slugifiedName="name-do-not-validate-non-mime-si">Do Not Validate Non-MIME Signatures</name>
            <t indent="0" pn="section-6.2.3.1-1">When encountering cryptographic signatures in these positions, a conformant MUA <bcp14>MUST NOT</bcp14> attempt to validate any signature.
It is challenging to communicate to the user exactly which part of such a message is covered by the signature, so it is better to leave the message marked as Unprotected.
See <xref target="SPOOFING" format="default" sectionFormat="of" derivedContent="SPOOFING"/> for examples of spoofed message signatures that rely on permissive legacy clients that are willing to validate signatures in poorly structured messages.</t>
          </section>
          <section anchor="skip-or-isolate-non-mime-decryption-when-rendering" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.2.3.2">
            <name slugifiedName="name-skip-or-isolate-non-mime-de">Skip or Isolate Non-MIME Decryption When Rendering</name>
            <t indent="0" pn="section-6.2.3.2-1">When encountering what appears to be encrypted data not at a MIME boundary, a conformant MUA <bcp14>MAY</bcp14> fully decline to decrypt the data.</t>
            <t indent="0" pn="section-6.2.3.2-2">During message rendering, if a conformant MUA attempts decryption of such a non-MIME encrypted section of an email, it <bcp14>MUST</bcp14> synthesize a separate MIME part to contain only the decrypted data and it <bcp14>MUST NOT</bcp14> attempt to merge or splice that part together with any other part of the message.
Keeping such a section distinct and isolated from any other part of the message offers protection against the direct exfiltration attacks (also known as EFAIL-DE) described in <xref target="EFAIL" format="default" sectionFormat="of" derivedContent="EFAIL"/>.</t>
          </section>
          <section anchor="do-not-decrypt-non-mime-decryption-when-replying" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.2.3.3">
            <name slugifiedName="name-do-not-decrypt-non-mime-dec">Do Not Decrypt Non-MIME Decryption When Replying</name>
            <t indent="0" pn="section-6.2.3.3-1">When composing a reply to a message with such a non-MIME encrypted section, a conformant MUA <bcp14>MUST NOT</bcp14> decrypt any non-MIME encrypted section when generating quoted or attributed text, similar to the guidance in <xref target="reply-to-errant-encryption" format="default" sectionFormat="of" derivedContent="Section 6.2.2.1"/>.</t>
            <t indent="0" pn="section-6.2.3.3-2">This offers protection against the reply-based attacks described in <xref target="REPLY" format="default" sectionFormat="of" derivedContent="REPLY"/>.</t>
          </section>
        </section>
      </section>
      <section anchor="forwarded-messages-with-cryptographic-protection" numbered="true" removeInRFC="false" toc="include" pn="section-6.3">
        <name slugifiedName="name-forwarded-messages-with-cry">Forwarded Messages with Cryptographic Protection</name>
        <t indent="0" pn="section-6.3-1">An incoming email message may include an attached forwarded message, typically as a MIME subpart with <tt>Content-Type: message/rfc822</tt> <xref target="RFC5322" format="default" sectionFormat="of" derivedContent="RFC5322"/> or <tt>Content-Type: message/global</tt> <xref target="RFC6532" format="default" sectionFormat="of" derivedContent="RFC6532"/>.</t>
        <t indent="0" pn="section-6.3-2">Regardless of the cryptographic protections and structure of the incoming message, the internal forwarded message may have its own Cryptographic Envelope.</t>
        <t indent="0" pn="section-6.3-3">The Cryptographic Layers that are part of the Cryptographic Envelope of the forwarded message are Errant Cryptographic Layers with respect to the surrounding message -- they are layers that only apply to the forwarded message itself.</t>
        <t indent="0" pn="section-6.3-4">A conformant rendering MUA <bcp14>MUST NOT</bcp14> conflate the cryptographic protections of the forwarded message with the cryptographic protections of the incoming message.</t>
        <t indent="0" pn="section-6.3-5">A conformant rendering MUA <bcp14>MAY</bcp14> render a Cryptographic Summary of the protections afforded to the forwarded message by its own Cryptographic Envelope, as long as that rendering is unambiguously tied to the forwarded message itself and cannot be spoofed by either the enclosing message or the forwarded message.</t>
      </section>
      <section anchor="signature-failures" numbered="true" removeInRFC="false" toc="include" pn="section-6.4">
        <name slugifiedName="name-signature-failures">Signature Failures</name>
        <t indent="0" pn="section-6.4-1">A cryptographic signature may fail in multiple ways.
A conformant rendering MUA that discovers a failed signature treats the message as though the signature did not exist.
This is similar to the standard guidance for failed DomainKeys Identified Mail (DKIM) signatures (see <xref section="6.1" sectionFormat="of" target="RFC6376" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6376#section-6.1" derivedContent="RFC6376"/>).</t>
        <t indent="0" pn="section-6.4-2">A conformant MUA <bcp14>MUST NOT</bcp14> render a message with a failed signature as more dangerous or more dubious than a comparable message without any signature at all.
In both cases, the Cryptographic Summary should be Unprotected.</t>
        <t indent="0" pn="section-6.4-3">A conformant MUA that encounters a signed-and-encrypted message where the signature is invalid <bcp14>SHOULD</bcp14> treat the message the same way that it would treat a message that is encryption-only, unless the MUA is providing the user with debugging information.</t>
        <t indent="0" pn="section-6.4-4">These are some different ways that a signature may be invalid on a given message:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.4-5">
          <li pn="section-6.4-5.1">
            <t indent="0" pn="section-6.4-5.1.1">The signature is not cryptographically valid (the math fails).</t>
          </li>
          <li pn="section-6.4-5.2">
            <t indent="0" pn="section-6.4-5.2.1">The signature relies on suspect cryptographic primitives (e.g., over a deprecated digest algorithm, or was made by a weak key, e.g., 1024-bit RSA); note that this requires the rendering MUA to have an explicit policy about what cryptographic primitives are acceptable.</t>
          </li>
          <li pn="section-6.4-5.3">
            <t indent="0" pn="section-6.4-5.3.1">The signature is made by a certificate that the rendering MUA does not have access to.</t>
          </li>
          <li pn="section-6.4-5.4">
            <t indent="0" pn="section-6.4-5.4.1">The certificate used to verify the signature was revoked.</t>
          </li>
          <li pn="section-6.4-5.5">
            <t indent="0" pn="section-6.4-5.5.1">The certificate used to verify the signature was expired at the time that the signature was made.</t>
          </li>
          <li pn="section-6.4-5.6">
            <t indent="0" pn="section-6.4-5.6.1">The certificate used to verify the signature does not correspond to the author of the message. (For X.509, there is no subjectAltName of type rfc822Name whose value matches an email address found in the <tt>From</tt> or <tt>Sender</tt> header field.)</t>
          </li>
          <li pn="section-6.4-5.7">
            <t indent="0" pn="section-6.4-5.7.1">The certificate used to verify the signature was not issued by an authority that the MUA user is willing to rely on for certifying the sender's email address, and the user has no other reasonable indication that the certificate belongs to the sender's email address.</t>
          </li>
          <li pn="section-6.4-5.8">
            <t indent="0" pn="section-6.4-5.8.1">The signature indicates that it was made at a time much before or much after the date of the message itself.</t>
          </li>
          <li pn="section-6.4-5.9">
            <t indent="0" pn="section-6.4-5.9.1">The signature covers a message that depends on an external subresource that might change (see <xref target="external-subresources" format="default" sectionFormat="of" derivedContent="Section 9.9"/>).</t>
          </li>
        </ul>
        <t indent="0" pn="section-6.4-6">A valid signature must pass all these tests, but of course, invalid signatures may be invalid in more than one of the ways listed above.</t>
      </section>
      <section anchor="weak-encryption" numbered="true" removeInRFC="false" toc="include" pn="section-6.5">
        <name slugifiedName="name-weak-encryption">Weak Encryption</name>
        <t indent="0" pn="section-6.5-1">Sometimes, an MUA might encounter a message with a well-formed Cryptographic Envelope that uses a form of encryption with substantial known flaws.
For example, a PGP/MIME message might use a Symmetrically Encrypted Data Packet, which is known to have malleable ciphertext (see <xref section="5.7" sectionFormat="of" target="RFC9580" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9580#section-5.7" derivedContent="RFC9580"/>). As another example, an S/MIME message may use an <tt>enveloped-data</tt> MIME part with a <tt>contentEncryptionAlgorithm</tt> of <tt>rc2-cbc</tt> with <tt>rc2ParameterVersion</tt> of 160, meaning a 40-bit key (see <xref section="5.2" sectionFormat="of" target="RFC3370" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3370#section-5.2" derivedContent="RFC3370"/>), which is widely considered breakable via brute force with moderate hardware investment in 2024.
As cryptanalysis and hardware capacities advance, an implementation may widen the scope of what encryption mechanisms are considered weak.</t>
        <t indent="0" pn="section-6.5-2">A rendering MUA <bcp14>MUST</bcp14> warn the user that such a message has a known weakness.
The rendering MUA <bcp14>MAY</bcp14> fully decline to decrypt such a message.
If it decides to decrypt a message with a weak encryption layer, it <bcp14>MUST NOT</bcp14> indicate in the message's Cryptographic Summary that the message was encrypted, as the confidentiality of the message is suspect.
This is similar to the approach taken in <xref target="errant-encryption-layer" format="default" sectionFormat="of" derivedContent="Section 6.2.2"/> for messages with an Errant Encryption Layer.</t>
        <t indent="0" pn="section-6.5-3">Like the Errant Encryption Layer situation, there is an asymmetry between rendering and replying to a message with weak encryption.
The guidance in <xref target="reply-to-errant-encryption" format="default" sectionFormat="of" derivedContent="Section 6.2.2.1"/> should be followed when replying to a message with weak encryption as well.</t>
        <t indent="0" pn="section-6.5-4">A rendering MUA <bcp14>MAY</bcp14> also treat historically archived messages with weak encryption differently than modern messages.
For example, if an encryption algorithm was known to be weak in 2005, then a message that appears to have been encrypted with that algorithm in 1995 might be decrypted with a warning, as an archival service.
But a message that appears to have been encrypted with that same weak algorithm in 2015 might be quarantined as a likely attack.</t>
        <t indent="0" pn="section-6.5-5">There are several possible ways to distinguish a historical message from a modern one, including:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.5-6">
          <li pn="section-6.5-6.1">
            <t indent="0" pn="section-6.5-6.1.1">the message timestamp (e.g., the <tt>Date</tt> header field)</t>
          </li>
          <li pn="section-6.5-6.2">
            <t indent="0" pn="section-6.5-6.2.1">the time the message was first observed on the network (e.g., delivery of a new message via IMAP from a mailbox that had recently checked)</t>
          </li>
          <li pn="section-6.5-6.3">
            <t indent="0" pn="section-6.5-6.3.1">the timestamp in any signature observed in the message</t>
          </li>
          <li pn="section-6.5-6.4">
            <t indent="0" pn="section-6.5-6.4.1">the message structure (a message composed using protocol elements that were invented after the encryption algorithm was known as weak is more likely to be an attack than a legitimate archival message)</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="reasoning-about-message-parts" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-reasoning-about-message-par">Reasoning about Message Parts</name>
      <t indent="0" pn="section-7-1">When generating or rendering messages, it is useful to know what parts of the message are likely to be displayed and how.
This section introduces some common terms that can be applied to parts within the Cryptographic Payload.</t>
      <section anchor="main-body-part" numbered="true" removeInRFC="false" toc="include" pn="section-7.1">
        <name slugifiedName="name-main-body-part">Main Body Part</name>
        <t indent="0" pn="section-7.1-1">When an email message is composed or rendered to the user, there is typically one main view that presents a (mostly textual) part of the message.</t>
        <t indent="0" pn="section-7.1-2">While the message itself may be constructed of several distinct MIME parts in a tree, the part that is rendered to the user is the "Main Body Part".</t>
        <t indent="0" pn="section-7.1-3">When rendering a message, one of the primary jobs of the rendering MUA is identifying which part (or parts) is the Main Body Part.
Typically, this is found by traversing the MIME tree of the message looking for a leaf node that has <tt>text</tt> (e.g., <tt>text/plain</tt> or <tt>text/html</tt>) as a primary content type and is not <tt>Content-Disposition: attachment</tt>.</t>
        <t indent="0" pn="section-7.1-4">MIME tree traversal follows the first child of every <tt>multipart</tt> node, with the exception of <tt>multipart/alternative</tt>.
	When traversing a <tt>multipart/alternative</tt> node, all children should be scanned, with preference given to the last child node with a MIME type that the MUA is capable of rendering directly.</t>
        <t indent="0" pn="section-7.1-5">An MUA <bcp14>MAY</bcp14> let the user select a preferred MIME type for rendering within <tt>multipart/alternative</tt> instead of the last renderable child.
For example, a user may explicitly prefer a <tt>text/plain</tt> alternative part over <tt>text/html</tt>.
Note that due to uncertainty about the capabilities and configuration of the rendering MUA, a conformant composing MUA should consider that multiple parts might be rendered as the Main Body Part when the message is ultimately viewed.
In particular, the composing MUA should ensure that any part likely to be viewed as the Main Body Part has the same semantic content as any other such part.</t>
        <t indent="0" pn="section-7.1-6">When composing a message, an originating MUA operating on behalf of an active user can identify which part (or parts) are the "main" parts: These are the parts the MUA generates from the user's editor.
Tooling that automatically generates email messages should also have a reasonable estimate of which part (or parts) are the "main" parts, as they can be programmatically identified by the message author.</t>
        <t indent="0" pn="section-7.1-7">For a filtering program that attempts to transform an outbound message without any special knowledge about which parts are the Main Body Parts, it can identify the likely parts by following the same routine as a rendering MUA.</t>
      </section>
      <section anchor="attachments" numbered="true" removeInRFC="false" toc="include" pn="section-7.2">
        <name slugifiedName="name-attachments">Attachments</name>
        <t indent="0" pn="section-7.2-1">A message may contain one or more separated MIME parts that are intended for download or extraction.
Such a part is commonly called an "attachment" and is commonly identified by having <tt>Content-Disposition: attachment</tt>.</t>
        <t indent="0" pn="section-7.2-2">An MUA <bcp14>MAY</bcp14> identify a subpart as an attachment or permit extraction of a subpart even when the subpart does not have <tt>Content-Disposition: attachment</tt>.</t>
        <t indent="0" pn="section-7.2-3">When generating a message with end-to-end cryptographic protection, any attachment <bcp14>MUST</bcp14> be included within the Cryptographic Payload.
If an attachment is found outside the Cryptographic Payload, then the message is not well-formed (see <xref target="well-formed" format="default" sectionFormat="of" derivedContent="Section 6.1"/>) and will not be handled by other MUAs as intended.</t>
        <t indent="0" pn="section-7.2-4">Some MUAs have tried to compose messages where each attachment is placed in its own Cryptographic Envelope.
Such a message is problematic for several reasons:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7.2-5">
          <li pn="section-7.2-5.1">
            <t indent="0" pn="section-7.2-5.1.1">The attachments can be stripped, replaced, or reordered without breaking any cryptographic integrity mechanism.</t>
          </li>
          <li pn="section-7.2-5.2">
            <t indent="0" pn="section-7.2-5.2.1">The resulting message may have a mix of cryptographic statuses (e.g., if a signature on one part fails but another succeeds or if one part is encrypted and another is not).
This mix of statuses is difficult to represent to the user in a comprehensible way.</t>
          </li>
          <li pn="section-7.2-5.3">
            <t indent="0" pn="section-7.2-5.3.1">The divisions between the different attachments are visible to operators of any mail transport agent (MTA) that handles the message, potentially resulting in a metadata leak.
For example, the MTA operator may learn the number of attachments and the size of each attachment.</t>
          </li>
        </ul>
        <t indent="0" pn="section-7.2-6">These messages are unlikely to be usefully interoperable without additional standardization work (see <xref target="split-attachments" format="default" sectionFormat="of" derivedContent="Appendix A.12"/>).</t>
      </section>
      <section anchor="mime-part-examples" numbered="true" removeInRFC="false" toc="include" pn="section-7.3">
        <name slugifiedName="name-mime-part-examples">MIME Part Examples</name>
        <t indent="0" pn="section-7.3-1">Consider a common message with the following MIME structure:</t>
        <artwork type="ascii-art" align="left" pn="section-7.3-2">
M └┬╴application/pkcs7-mime
   ╧ (decrypts to)
N  └┬╴application/pkcs7-mime
    ┴ (unwraps to)
O   └┬╴multipart/mixed
P    ├┬╴multipart/alternative
Q    │├─╴text/plain
R    │└─╴text/html
S    └─╴image/png
</artwork>
        <t indent="0" pn="section-7.3-3">Parts <tt>M</tt> and <tt>N</tt> comprise the Cryptographic Envelope.</t>
        <t indent="0" pn="section-7.3-4">Parts <tt>Q</tt> and <tt>R</tt> are both Main Body Parts.</t>
        <t indent="0" pn="section-7.3-5">If part <tt>S</tt> is <tt>Content-Disposition: attachment</tt>, then it is an attachment.
If part <tt>S</tt> has no <tt>Content-Disposition</tt> header field, it is potentially ambiguous whether it is an attachment or not.
If the composer prefers a specific behavior, it should explicitly set the <tt>Content-Disposition</tt> header field on part <tt>S</tt> to either <tt>inline</tt> or <tt>attachment</tt> as guidance to the rendering MUA.</t>
        <t indent="0" pn="section-7.3-6">Consider also this alternate structure:</t>
        <artwork type="ascii-art" align="left" pn="section-7.3-7">
M └┬╴application/pkcs7-mime
   ╧ (decrypts to)
N  └┬╴application/pkcs7-mime
    ┴ (unwraps to)
O   └┬╴multipart/alternative
P    ├─╴text/plain
Q    └┬╴multipart/related
R     ├─╴text/html
S     └─╴image/png
</artwork>
        <t indent="0" pn="section-7.3-8">In this case, parts <tt>M</tt> and <tt>N</tt> still comprise the Cryptographic Envelope.</t>
        <t indent="0" pn="section-7.3-9">Parts <tt>P</tt> and <tt>R</tt> (the first two leaf nodes within each subtree of part <tt>O</tt>) are the Main Body Parts.</t>
        <t indent="0" pn="section-7.3-10">Part <tt>S</tt> is more likely not to be an attachment, as the subtree layout suggests that it is only relevant for the HTML version of the message.
For example, it might be rendered as an image within the HTML alternative.</t>
      </section>
    </section>
    <section anchor="cert-management" numbered="true" removeInRFC="false" toc="include" pn="section-8">
      <name slugifiedName="name-certificate-management">Certificate Management</name>
      <t indent="0" pn="section-8-1">A cryptographically capable MUA typically maintains knowledge about certificates for the user's own account(s), as well as certificates for the peers that it communicates with.</t>
      <section anchor="peer-certificates" numbered="true" removeInRFC="false" toc="include" pn="section-8.1">
        <name slugifiedName="name-peer-certificates">Peer Certificates</name>
        <t indent="0" pn="section-8.1-1">Most certificates that a cryptographically capable MUA will use will be certificates belonging to the parties that the user communicates with through the MUA.
This section discusses how to manage the certificates that belong to such a peer.</t>
        <t indent="0" pn="section-8.1-2">The MUA will need to be able to discover X.509 certificates for each peer, cache them, and select among them when composing an encrypted message.
        Detailed guidance about how to do this is beyond the scope of this document, but future revisions may bring it into scope (see <xref target="more-peer-certs" format="default" sectionFormat="of" derivedContent="Appendix A.3"/>).</t>
        <section anchor="peer-cert-selection" numbered="true" removeInRFC="false" toc="include" pn="section-8.1.1">
          <name slugifiedName="name-peer-certificate-selection">Peer Certificate Selection</name>
          <t indent="0" pn="section-8.1.1-1">When composing an encrypted message, the MUA needs to select an encryption-capable certificate for each recipient.</t>
          <t indent="0" pn="section-8.1.1-2">To select such a certificate for a given destination email address, the MUA should look through all of its known certificates and verify that <em>all</em> of the conditions below are met:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.1.1-3">
            <li pn="section-8.1.1-3.1">
              <t indent="0" pn="section-8.1.1-3.1.1">The certificate must be valid, not expired or revoked.</t>
            </li>
            <li pn="section-8.1.1-3.2">
              <t indent="0" pn="section-8.1.1-3.2.1">It must have a subjectAltName of type rfc822Name (for all ASCII email addresses) or SmtpUTF8Mailbox (for Internationalized Email Addresses) whose contents match the destination email address.
  In particular, for rfc822Name, the <tt>local-part</tt> of the two addresses should be an exact bytewise match, and the domain parts of the two addresses should be matched by ensuring label equivalence across the full domain name, as described in <xref section="2.3.2.4" sectionFormat="of" target="RFC5890" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5890#section-2.3.2.4" derivedContent="RFC5890"/>.
  Comparison with SmtpUTF8Mailbox is specified in <xref section="5" sectionFormat="of" target="RFC9598" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9598#section-5" derivedContent="RFC9598"/>.</t>
            </li>
            <li pn="section-8.1.1-3.3">
              <t indent="0" pn="section-8.1.1-3.3.1">The algorithm OID in the certificate's SubjectPublicKeyInfo (SPKI) is known to the MUA and capable of encryption.
Examples include:
              </t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.1.1-3.3.2">
                <li pn="section-8.1.1-3.3.2.1">
                  <t indent="0" pn="section-8.1.1-3.3.2.1.1">rsaEncryption (OID 1.2.840.113549.1.1.1), with the keyUsage (OID 2.5.29.15) extension present and the "key encipherment" bit (value 32) set.</t>
                </li>
                <li pn="section-8.1.1-3.3.2.2">
                  <t indent="0" pn="section-8.1.1-3.3.2.2.1">curveX25519 (OID 1.3.101.110), with the keyUsage extension present and the "key agreement" bit (value 8) set.</t>
                </li>
              </ul>
            </li>
            <li pn="section-8.1.1-3.4">
              <t indent="0" pn="section-8.1.1-3.4.1">If extendedKeyUsage (OID 2.5.29.37) is present, it contains at least one of the following OIDs: email protection (OID 1.3.6.1.5.5.7.3.4), anyExtendedKeyUsage (OID 2.5.29.37.0).</t>
            </li>
          </ul>
          <t indent="0" pn="section-8.1.1-4">A conformant MUA may include more considerations when selecting a peer certificate as well; see <xref target="more-peer-cert-selection" format="default" sectionFormat="of" derivedContent="Appendix A.3.4"/> for examples.</t>
        </section>
      </section>
      <section anchor="local-certificates" numbered="true" removeInRFC="false" toc="include" pn="section-8.2">
        <name slugifiedName="name-local-certificates">Local Certificates</name>
        <t indent="0" pn="section-8.2-1">The MUA also needs to know about one or more certificates associated with the user's email account.
It is typically expected to have access to the secret key material associated with the public keys in those certificates.</t>
        <t indent="0" pn="section-8.2-2">While some basic guidance is offered here, it is beyond the scope of this document to describe all possible relevant guidance for local certificate and key material handling.
See <xref target="more-local-certs" format="default" sectionFormat="of" derivedContent="Appendix A.4"/> for suggestions of guidance that a future version might bring into scope.</t>
        <section anchor="local-certificate-setup" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.1">
          <name slugifiedName="name-getting-certificates-for-th">Getting Certificates for the User</name>
          <t indent="0" pn="section-8.2.1-1">If a conformant MUA does not have a certificate or secret key for the user, it should help the user to generate, acquire, or import them with minimum difficulty.</t>
          <section anchor="local-cert-smime" numbered="true" removeInRFC="false" toc="exclude" pn="section-8.2.1.1">
            <name slugifiedName="name-user-certificates-for-s-mim">User Certificates for S/MIME</name>
            <t indent="0" pn="section-8.2.1.1-1">For S/MIME, the user <bcp14>SHOULD</bcp14> have both a signing-capable certificate and an encryption-capable certificate (and the corresponding secret keys).
Using the same cryptographic key material for multiple algorithms (i.e., for both encryption and signing) has been the source of vulnerabilities in other (non-email) contexts (e.g., <xref target="DROWN" format="default" sectionFormat="of" derivedContent="DROWN"/> and <xref target="IKE" format="default" sectionFormat="of" derivedContent="IKE"/>).
The simplest way to avoid any comparable risk is to use distinct key material for each cryptographic algorithm.
   A conformant MUA that generates S/MIME certificates for the user <bcp14>MUST</bcp14>
   generate distinct S/MIME certificates to avoid possible cross-protocol
   key misuse: one for encryption and another for signing.</t>
            <t indent="0" pn="section-8.2.1.1-2">The simplest option for an S/MIME-capable MUA is for the MUA to permit the user to import a PKCS #12 <xref target="RFC7292" format="default" sectionFormat="of" derivedContent="RFC7292"/> object that is expected to contain secret key material, end entity certificates for the user, and intermediate certification authority (CA) certificates that permit chaining from the end entity certificates to widely accepted trust anchors.
A conformant MUA that imports such a PKCS #12 bundle <bcp14>SHOULD</bcp14> warn the user if the bundle contains an S/MIME certificate and corresponding secret key where the same secret key is used for both encryption and signing.</t>
            <t indent="0" pn="section-8.2.1.1-3">An S/MIME-capable MUA that has access to user certificates and their corresponding secret key material should also offer the ability to export those objects into a well-formed PKCS #12 object that could be imported into another MUA operated by the same user.</t>
            <t indent="0" pn="section-8.2.1.1-4">Manual handling of PKCS #12 objects is challenging for most users.
Producing the initial PKCS #12 object typically can only be done with the aid of a CA via non-standardized, labor-intensive, and error-prone procedures that most users do not understand.
Furthermore, manual export and import incurs ongoing labor (for example, before certificate expiration) by the user, which most users are unprepared to do (see <xref target="local-cert-maintenance" format="default" sectionFormat="of" derivedContent="Section 8.2.2"/>).</t>
            <t indent="0" pn="section-8.2.1.1-5">A better approach is for the MUA to integrate some form of automated certificate issuance procedure, for example, by using the Automatic Certificate Management Environment (ACME) protocol for end user S/MIME certificates <xref target="RFC8823" format="default" sectionFormat="of" derivedContent="RFC8823"/>.</t>
            <t indent="0" pn="section-8.2.1.1-6">Another possible approach is integration with a cryptographic hardware token or smart card that can provide certificates and permit the use of isolated secret key material, for example, see <xref target="PKCS11" format="default" sectionFormat="of" derivedContent="PKCS11"/>, though this approach delegates the complexity of acquiring and managing certificates to management of the hardware token itself (see <xref target="smartcards" format="default" sectionFormat="of" derivedContent="Appendix A.4.2"/>).</t>
            <t indent="0" pn="section-8.2.1.1-7">See also <xref target="I-D.woodhouse-cert-best-practice" format="default" sectionFormat="of" derivedContent="CERT-BEST-PRACTICE"/> for more recommendations about managing user certificates.</t>
          </section>
          <section anchor="local-cert-pgp" numbered="true" removeInRFC="false" toc="exclude" pn="section-8.2.1.2">
            <name slugifiedName="name-user-certificates-for-pgp-m">User Certificates for PGP/MIME</name>
            <t indent="0" pn="section-8.2.1.2-1">As distinct from S/MIME, OpenPGP <xref target="RFC9580" format="default" sectionFormat="of" derivedContent="RFC9580"/> has a different set of common practices.
For one thing, a single OpenPGP certificate can contain both a signing-capable key and a distinct encryption-capable key, so only one certificate is needed for an email user of OpenPGP as long as the certificate has distinct key material for the different purposes.</t>
            <t indent="0" pn="section-8.2.1.2-2">Furthermore, a single OpenPGP certificate <bcp14>MAY</bcp14> only be self-signed, so the MUA can generate such a certificate entirely on its own.</t>
            <t indent="0" pn="section-8.2.1.2-3">An OpenPGP-capable MUA should have the ability to import and export OpenPGP Transferable Secret Keys (see <xref section="10.2" sectionFormat="of" target="RFC9580" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9580#section-10.2" derivedContent="RFC9580"/>) to enable manual transfer of user certificates and secret key material between multiple MUAs controlled by the user.</t>
            <t indent="0" pn="section-8.2.1.2-4">Since an OpenPGP certificate <bcp14>MAY</bcp14> be certified by third parties (whether formal CAs or merely other well-connected peers), the MUA <bcp14>SHOULD</bcp14> offer affordances to help the user acquire and merge third-party certifications on their certificate.
When doing this, the MUA should prioritize third-party certifications from entities that the user's peers are likely to know about and be willing to rely on.</t>
            <t indent="0" pn="section-8.2.1.2-5">Since an OpenPGP certificate can grow arbitrarily large with third-party certifications, the MUA should assist the user in pruning it to ensure that it remains a reasonable size when transmitting it to other parties.</t>
          </section>
          <section anchor="local-key-generation" numbered="true" removeInRFC="false" toc="exclude" pn="section-8.2.1.3">
            <name slugifiedName="name-generate-secret-key-materia">Generate Secret Key Material Locally</name>
            <t indent="0" pn="section-8.2.1.3-1">Regardless of the protocol used (S/MIME or PGP), when producing certificates for the end user, the MUA <bcp14>SHOULD</bcp14> ensure that it has generated secret key material locally and <bcp14>MUST NOT</bcp14> accept secret key material from an untrusted external party as the basis for the user's certificate.
For example, a user who trusts their system administrator not to compromise their MUA may accept secret key material generated by the system administrator but probably should not accept secret key material generated by an unaffiliated online web service.</t>
            <t indent="0" pn="section-8.2.1.3-2">An MUA that accepts secret key material from a third party cannot prevent that third party from retaining this material.
A third party with this level of access could decrypt messages intended to be confidential for the user or could forge messages that would appear to come from the user.</t>
          </section>
        </section>
        <section anchor="local-cert-maintenance" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.2">
          <name slugifiedName="name-local-certificate-maintenan">Local Certificate Maintenance</name>
          <t indent="0" pn="section-8.2.2-1">In the context of a single email account managed by an MUA, where that email account is expected to be able to use end-to-end cryptographic protections, the MUA <bcp14>SHOULD</bcp14> warn the user (or proactively fix the problem) when/if:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.2-2">
            <li pn="section-8.2.2-2.1">
              <t indent="0" pn="section-8.2.2-2.1.1">For S/MIME, the user's own certificate set for the account does not include a valid, unexpired encryption-capable X.509 certificate and a valid, unexpired signature-capable X.509 certificate.</t>
            </li>
            <li pn="section-8.2.2-2.2">
              <t indent="0" pn="section-8.2.2-2.2.1">For PGP/MIME, the user's own certificate does not include a valid, unexpired signing-capable key/subkey and a valid, unexpired encryption-capable key/subkey.</t>
            </li>
            <li pn="section-8.2.2-2.3">
              <t indent="0" pn="section-8.2.2-2.3.1">Any of the user's own certificates for the account:
              </t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.2-2.3.2">
                <li pn="section-8.2.2-2.3.2.1">
                  <t indent="0" pn="section-8.2.2-2.3.2.1.1">are due to expire in the next month (or at some other reasonable cadence).</t>
                </li>
                <li pn="section-8.2.2-2.3.2.2">
                  <t indent="0" pn="section-8.2.2-2.3.2.2.1">do not match the email address associated with the account in question.</t>
                </li>
              </ul>
            </li>
            <li pn="section-8.2.2-2.4">
              <t indent="0" pn="section-8.2.2-2.4.1">Any of the user's own S/MIME certificates for the account:
              </t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.2-2.4.2">
                <li pn="section-8.2.2-2.4.2.1">
                  <t indent="0" pn="section-8.2.2-2.4.2.1.1">do not have a keyUsage extension.</t>
                </li>
                <li pn="section-8.2.2-2.4.2.2">
                  <t indent="0" pn="section-8.2.2-2.4.2.2.1">do not contain an extendedKeyUsage extension.</t>
                </li>
                <li pn="section-8.2.2-2.4.2.3">
                  <t indent="0" pn="section-8.2.2-2.4.2.3.1">would be considered invalid by the MUA for any other reason if it were a peer certificate.</t>
                </li>
              </ul>
            </li>
          </ul>
          <t indent="0" pn="section-8.2.2-3">An MUA that takes active steps to fix any of these problems before they arise is even more usable than one that just issues warnings, but guidance on how to do active certificate maintenance is beyond the scope of this document (see <xref target="more-local-cert-maintenance" format="default" sectionFormat="of" derivedContent="Appendix A.4.3"/>).</t>
          <t indent="0" pn="section-8.2.2-4">If the MUA does find any of these issues and chooses to warn the user, it should use one aggregate warning with simple language that describes how the certificates might not be acceptable for other people and recommend a course of action that the user can take to remedy the problem.</t>
        </section>
        <section anchor="sending-certificates" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.3">
          <name slugifiedName="name-shipping-certificates-in-ou">Shipping Certificates in Outbound Messages</name>
          <t indent="0" pn="section-8.2.3-1">When composing mail, a conformant MUA <bcp14>SHOULD</bcp14> include copies of the user's own certificates (and potentially other certificates) in each message to facilitate future communication, unless it has specific knowledge that the other parties involved already know the relevant keys (for example, if it is mail between members within a domain that has a synchronized and up-to-date certificate directory).</t>
          <t indent="0" pn="section-8.2.3-2">The mechanism for including these certificates, and which certificates to include in the message, are protocol specific.</t>
          <section anchor="shipping-certificates-in-smime-messages" numbered="true" removeInRFC="false" toc="exclude" pn="section-8.2.3.1">
            <name slugifiedName="name-shipping-certificates-in-s-">Shipping Certificates in S/MIME Messages</name>
            <t indent="0" pn="section-8.2.3.1-1">In any S/MIME SignedData object, certificates can be shipped in the "certificates" member.
In any S/MIME EnvelopedData object, certificates can be shipped in the "originatorInfo.certs" member.</t>
            <t indent="0" pn="section-8.2.3.1-2">When a single S/MIME-protected email message is signed-and-encrypted, it is usually sufficient to ship all the relevant certificates in the inner SignedData object's "certificates" member.</t>
            <t indent="0" pn="section-8.2.3.1-3">The S/MIME certificates shipped in such a message <bcp14>SHOULD</bcp14> include:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.3.1-4">
              <li pn="section-8.2.3.1-4.1">
                <t indent="0" pn="section-8.2.3.1-4.1.1">the user's own S/MIME signing certificate, so that signature on the current message can be validated.</t>
              </li>
              <li pn="section-8.2.3.1-4.2">
                <t indent="0" pn="section-8.2.3.1-4.2.1">the user's own S/MIME encryption-capable certificate, so that the recipient can reply in encrypted form.</t>
              </li>
              <li pn="section-8.2.3.1-4.3">
                <t indent="0" pn="section-8.2.3.1-4.3.1">on an encrypted message to multiple recipients, the encryption-capable peer certificates of the other recipients, so that any recipient can easily "reply all" without needing to search for certificates.</t>
              </li>
              <li pn="section-8.2.3.1-4.4">
                <t indent="0" pn="section-8.2.3.1-4.4.1">any intermediate CA certificates needed to chain all of the above to a widely trusted set of root authorities.</t>
              </li>
            </ul>
          </section>
          <section anchor="shipping-certificates-in-pgpmime-messages" numbered="true" removeInRFC="false" toc="exclude" pn="section-8.2.3.2">
            <name slugifiedName="name-shipping-certificates-in-pg">Shipping Certificates in PGP/MIME Messages</name>
            <t indent="0" pn="section-8.2.3.2-1">PGP/MIME does not have a single specific standard location for shipping certificates.</t>
            <t indent="0" pn="section-8.2.3.2-2">Some MUAs ship relevant OpenPGP certificates in a single MIME leaf of Content-Type "application/pgp-keys".
When such a message has cryptographic protections, to ensure that the message is well-formed, this kind of MIME part <bcp14>SHOULD</bcp14> be a leaf of the Cryptographic Payload and not outside of it.
One problem with this approach is that it appears to recipients with non-cryptographic MUAs as an "attachment", which can lead to confusion if the user does not know how to use it.</t>
            <t indent="0" pn="section-8.2.3.2-3">Other implementations ship relevant OpenPGP certificates in "Autocrypt" or "Autocrypt-Gossip" message header fields (see <xref target="AUTOCRYPT" format="default" sectionFormat="of" derivedContent="AUTOCRYPT"/>).
To ensure that those header fields receive the same cryptographic authenticity as the rest of the message, these header fields <bcp14>SHOULD</bcp14> be protected as described in <xref target="RFC9788" format="default" sectionFormat="of" derivedContent="RFC9788"/>.</t>
            <t indent="0" pn="section-8.2.3.2-4">The OpenPGP certificates shipped in such a message <bcp14>SHOULD</bcp14> include:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8.2.3.2-5">
              <li pn="section-8.2.3.2-5.1">
                <t indent="0" pn="section-8.2.3.2-5.1.1">the user's own OpenPGP certificate, capable of both signing and encryption, so that the user can validate the message's signature and can encrypt future messages.</t>
              </li>
              <li pn="section-8.2.3.2-5.2">
                <t indent="0" pn="section-8.2.3.2-5.2.1">on an encrypted message to multiple recipients, the OpenPGP certificates of the other recipients, so that any recipient can easily "reply all" without needing to search for certificates.</t>
              </li>
            </ul>
          </section>
        </section>
      </section>
    </section>
    <section anchor="common-pitfalls" numbered="true" removeInRFC="false" toc="include" pn="section-9">
      <name slugifiedName="name-common-pitfalls-and-guideli">Common Pitfalls and Guidelines</name>
      <t indent="0" pn="section-9-1">This section highlights a few "pitfalls" and guidelines based on these discussions and lessons learned.</t>
      <section anchor="reading-sent-messages" numbered="true" removeInRFC="false" toc="include" pn="section-9.1">
        <name slugifiedName="name-reading-sent-messages">Reading Sent Messages</name>
        <t indent="0" pn="section-9.1-1">When sending a message, a typical MUA will store a copy of the message sent in sender's Sent mail folder so that the sender can read it later.
If the message is an encrypted message, storing it encrypted requires some forethought to ensure that the sender can read it in the future.</t>
        <t indent="0" pn="section-9.1-2">It is a common and simple practice to encrypt the message not only to the recipients of the message but also to the sender.
One advantage of doing this is that the message that is sent on the wire can be identical to the message stored in the sender's Sent mail folder.
This allows the sender to review and reread the message even though it was encrypted.</t>
        <t indent="0" pn="section-9.1-3">There are at least three other approaches that are possible to ensure future readability by the sender of the message but with different trade-offs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.1-4">
          <li pn="section-9.1-4.1">
            <t indent="0" pn="section-9.1-4.1.1">Encrypt two versions of the message: one to the recipients (this version is sent on the wire) and one to the sender only (this version is stored in the sender's Sent folder).
This approach means that the message stored in the Sent folder is not byte-for-byte identical to the message sent to the recipients.
In the event that message delivery has a transient failure, the MUA cannot simply resubmit the stored message into the SMTP system and expect it to be readable by the recipient.</t>
          </li>
          <li pn="section-9.1-4.2">
            <t indent="0" pn="section-9.1-4.2.1">Store a cleartext version of the message in the Sent folder.
	    This presents a risk of information leakage: Anyone with access to the Sent folder can read the contents of the message.
Furthermore, in any attempt to resend the message, the cryptographic transformation needs to be reapplied before sending or else the message contents will leak upon resend.
A conformant MUA <bcp14>SHOULD NOT</bcp14> store a cleartext copy in the Sent folder unless it knows that the Sent folder cannot be read by an attacker.
For example, if end-to-end confidentiality is desired, then storing the cleartext in an IMAP folder where a potentially adversarial server can read it defeats the purpose.</t>
          </li>
          <li pn="section-9.1-4.3">
            <t indent="0" pn="section-9.1-4.3.1">A final option is that the MUA can store a copy of the message's encryption session key.
Standard email encryption mechanisms (e.g., S/MIME and PGP/MIME) are hybrid mechanisms: The asymmetric encryption steps simply encrypt a symmetric "session key", which is used to encrypt the message itself.
If the MUA stores the session key itself, it can use the session key to decrypt the Sent message without needing the Sent message to be decryptable by the user's own asymmetric key.
An MUA doing this must take care to store (and backup) its stash of session keys, because if it loses them, it will not be able to read the sent messages; and if someone else gains access to them, they can decrypt the sent messages.
This has the additional consequence that any other MUA accessing the same Sent folder cannot decrypt the message unless it also has access to the stashed session key.</t>
          </li>
        </ul>
      </section>
      <section anchor="reading-encrypted-messages-after-certificate-expiration" numbered="true" removeInRFC="false" toc="include" pn="section-9.2">
        <name slugifiedName="name-reading-encrypted-messages-">Reading Encrypted Messages after Certificate Expiration</name>
        <t indent="0" pn="section-9.2-1">When encrypting a message, the composing MUA should decline to encrypt to an expired certificate (see <xref target="peer-cert-selection" format="default" sectionFormat="of" derivedContent="Section 8.1.1"/>).
But when decrypting a message, as long as the viewing MUA has access to the appropriate secret key material, it should permit decryption of the message, even if the associated certificate is expired.
That is, the rendering MUA should not prevent the user from reading a message that they have access to merely due to an expired encryption certificate.</t>
        <t indent="0" pn="section-9.2-2">The rendering MUA may warn the user when decrypting a message that appears to have been encrypted to an encryption-capable certificate that was expired at the time of encryption (e.g., based on the <tt>Date</tt> header field of the message or the timestamp in the cryptographic signature) but otherwise should not complain.</t>
        <t indent="0" pn="section-9.2-3">The primary goal of certificate expiration is to facilitate rotation of secret key material, so that secret key material does not need to be retained indefinitely.
Certificate expiration permits the user to destroy an older secret key if access to the messages encrypted to it is no longer necessary (see also <xref target="secure-deletion" format="default" sectionFormat="of" derivedContent="Appendix A.10"/>).</t>
      </section>
      <section anchor="message-header-fields" numbered="true" removeInRFC="false" toc="include" pn="section-9.3">
        <name slugifiedName="name-unprotected-message-header-">Unprotected Message Header Fields</name>
        <t indent="0" pn="section-9.3-1">Many legacy cryptographically aware MUAs only apply cryptographic protections to the body of the message but leave the header fields unprotected.
This gives rise to vulnerabilities like information leakage (e.g., the Subject line is visible to a passive intermediary) or message tampering (e.g., the Subject line is replaced, effectively changing the semantics of a signed message).
These are not only security vulnerabilities but also usability problems, because the distinction between what is part of the header section and what is part of the body of a message is unclear to many end users and requires a more complex mental model than is necessary.
Useful security comes from alignment between simple mental models and tooling.</t>
        <t indent="0" pn="section-9.3-2">To avoid these concerns, a conformant MUA <bcp14>MUST</bcp14> implement Header Protection as described in <xref target="RFC9788" format="default" sectionFormat="of" derivedContent="RFC9788"/>.</t>
        <t indent="0" pn="section-9.3-3">Note that some message header fields, such as <tt>List-*</tt>, <tt>Archived-At</tt>, and <tt>Resent-*</tt>, are typically added by an intervening MUA (see <xref target="intervening-mua" format="default" sectionFormat="of" derivedContent="Section 9.8"/>), not by one of the classic "ends" of an end-to-end email exchange.
A rendering MUA may choose to consider the contents of these header fields on an end-to-end protected message as markers added during message transit, even if they are not covered by the end-to-end cryptographic protection.</t>
      </section>
      <section anchor="bcc-variants" numbered="true" removeInRFC="false" toc="include" pn="section-9.4">
        <name slugifiedName="name-composing-an-encrypted-mess">Composing an Encrypted Message with Bcc</name>
        <t indent="0" pn="section-9.4-1">When composing an encrypted message containing at least one recipient address in the <tt>Bcc</tt> header field, there is a risk that the encrypted message itself could leak information about the actual recipients, even if the <tt>Bcc</tt> header field does not mention the recipient.
For example, if the message clearly indicates which certificates it is encrypted to, the set of certificates can identify the recipients even if they are not named in the message header fields.</t>
        <t indent="0" pn="section-9.4-2">Because of these complexities, there are several interacting factors that need to be taken into account when composing an encrypted message with <tt>Bcc</tt>'ed recipients.</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.4-3">
          <li pn="section-9.4-3.1">
            <t indent="0" pn="section-9.4-3.1.1">Should the <tt>Bcc</tt> header field be populated explicitly on <tt>Bcc</tt>'ed copies
      of the message and in the copy stored in the sender's <tt>Sent</tt>
      folder? See <xref section="3.6.3" sectionFormat="of" target="RFC5322" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5322#section-3.6.3" derivedContent="RFC5322"/> for a set of choices.</t>
          </li>
          <li pn="section-9.4-3.2">
            <t indent="0" pn="section-9.4-3.2.1">When separate copies are made for <tt>Bcc</tt>'ed recipients, should each separate copy <em>also</em> be encrypted to the named recipients or just to the designated <tt>Bcc</tt> recipient?</t>
          </li>
          <li pn="section-9.4-3.3">
            <t indent="0" pn="section-9.4-3.3.1">When a copy is stored in the <tt>Sent</tt> folder, should that copy also be encrypted to <tt>Bcc</tt>'ed recipients? (See also <xref target="reading-sent-messages" format="default" sectionFormat="of" derivedContent="Section 9.1"/>.)</t>
          </li>
          <li pn="section-9.4-3.4">
            <t indent="0" pn="section-9.4-3.4.1">When a message is encrypted, if there is a mechanism to include the certificates of the recipients, whose certificates should be included?</t>
          </li>
        </ul>
        <section anchor="bcc-recommendation" numbered="true" removeInRFC="false" toc="include" pn="section-9.4.1">
          <name slugifiedName="name-simple-encryption-with-bcc">Simple Encryption with Bcc</name>
          <t indent="0" pn="section-9.4.1-1">Here is a simple approach that tries to minimize the total number of variants of the message created while leaving a coherent view of the message itself:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.4.1-2">
            <li pn="section-9.4.1-2.1">
              <t indent="0" pn="section-9.4.1-2.1.1">No Cryptographic Payload contains any <tt>Bcc</tt> header field.</t>
            </li>
            <li pn="section-9.4.1-2.2">
              <t indent="0" pn="section-9.4.1-2.2.1">The main copy of the message is signed and encrypted to all named recipients and to the sender.
A copy of this message is also stored in the sender's <tt>Sent</tt> folder.</t>
            </li>
            <li pn="section-9.4.1-2.3">
              <t indent="0" pn="section-9.4.1-2.3.1">Each <tt>Bcc</tt> recipient receives a distinct copy of the message, with an identical Cryptographic Payload (that is, the cleartext is identical), and the message is signed and encrypted to that specific recipient and all the named recipients.
These copies are not stored in the sender's <tt>Sent</tt> folder.</t>
            </li>
            <li pn="section-9.4.1-2.4">
              <t indent="0" pn="section-9.4.1-2.4.1">Any <tt>Bcc</tt>'ed recipient <bcp14>MUST NOT</bcp14> be taken into consideration when determining which certificates to include in the message.
In particular, certificates for <tt>Bcc</tt>'ed recipients <bcp14>MUST NOT</bcp14> included in any message.</t>
            </li>
          </ul>
          <section anchor="rationale" numbered="true" removeInRFC="false" toc="exclude" pn="section-9.4.1.1">
            <name slugifiedName="name-rationale">Rationale</name>
            <t indent="0" pn="section-9.4.1.1-1">The approach described in <xref target="bcc-recommendation" format="default" sectionFormat="of" derivedContent="Section 9.4.1"/> aligns the list of cryptographic recipients as closely as possible with the set of named recipients while still allowing a <tt>Bcc</tt>'ed recipient to read their own copy and to "reply all", should they want to.</t>
            <t indent="0" pn="section-9.4.1.1-2">This should reduce user confusion on the receiving side: A recipient of such a message who naively looks at the User-Facing Header Fields from their own mailbox will have a good sense of what cryptographic treatments have been applied to the message.
It also simplifies message composition and user experience: The message composer sees fields that match their expectations about what will happen to the message.
Additionally, it may preserve the ability for a <tt>Bcc</tt>'ed recipient to retain their anonymity, should they need to offer the signed Cryptographic Payload to an outside party as proof of the original sender's intent without revealing their own identity.</t>
          </section>
        </section>
      </section>
      <section anchor="draft-messages" numbered="true" removeInRFC="false" toc="include" pn="section-9.5">
        <name slugifiedName="name-draft-messages">Draft Messages</name>
        <t indent="0" pn="section-9.5-1">When composing a message, most MUAs will save a copy of the as-yet-unsent message to a "Drafts" folder.
If that folder is itself stored somewhere not under the user's control (e.g., an IMAP mailbox), it would be a mistake to store the draft message in the clear, because its contents could leak.</t>
        <t indent="0" pn="section-9.5-2">This is the case even if the message is ultimately sent deliberately in the clear.
During message composition, the MUA does not know whether the message is intended to be sent encrypted or not.
For example, just before sending, the user could decide to encrypt the message, and the MUA would have had no way of knowing.</t>
        <t indent="0" pn="section-9.5-3">The MUA <bcp14>SHOULD</bcp14> encrypt all draft messages, unless it has explicit knowledge that the message will not be encrypted when sent or that the Drafts folder cannot be read by an attacker.
For example, if end-to-end confidentiality is desired, then storing a cleartext draft in an IMAP folder where a potentially adversarial server can read it defeats the purpose.</t>
        <t indent="0" pn="section-9.5-4">Furthermore, when encrypting a draft message, the message draft <bcp14>MUST</bcp14> only be encrypted to the user's own certificate or to some equivalent secret key that only the user possesses.
A draft message encrypted in this way can be decrypted when the user wants to resume composing the message but cannot be read by anyone else, including a potential intended recipient.
Note that a draft message encrypted in this way will only be resumable by another MUA attached to the same mailbox if that other MUA has access to the user's decryption-capable secret key.
This shared access to key material is also likely necessary for useful interoperability but is beyond the scope of this document (see <xref target="cross-mua-local-keys" format="default" sectionFormat="of" derivedContent="Appendix A.4.1"/>).</t>
        <t indent="0" pn="section-9.5-5">A conformant MUA <bcp14>MUST NOT</bcp14> sign a message draft with the user's normal signing key, because creating a non-repudiable signature implies a commitment from the sender.
If a signed draft message were to leak to the user's "Drafts" folder on some untrustworthy server, the server operator could claim that the user had committed to something that they had not yet decided to commit to.
If draft signing is intended for cryptographic coordination between multiple MUAs of the same user, it should be negotiated with a different key (but see <xref target="cross-mua-local-keys" format="default" sectionFormat="of" derivedContent="Appendix A.4.1"/>).</t>
        <t indent="0" pn="section-9.5-6">The message should only be encrypted to its recipients upon actually sending the message.
No reasonable user expects their message's intended recipients to be able to read a message that is not yet complete.</t>
      </section>
      <section anchor="mixed-recipients" numbered="true" removeInRFC="false" toc="include" pn="section-9.6">
        <name slugifiedName="name-composing-a-message-to-hete">Composing a Message to Heterogeneous Recipients</name>
        <t indent="0" pn="section-9.6-1">When composing a message that the user intends to be encrypted, it's possible that some recipients will be unable to view an encrypted copy.
For example, when Carol composes a message to Alice and Bob, Carol's MUA may be able to find a valid encryption-capable certificate for Alice, but none for Bob.</t>
        <t indent="0" pn="section-9.6-2">In this situation, there are four possible strategies, each of which has a negative impact on the experience of using encrypted mail.
Carol's MUA can:</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-9.6-3"><li pn="section-9.6-3.1" derivedCounter="1.">
            <t indent="0" pn="section-9.6-3.1.1">send encrypted to Alice and Bob, knowing that Bob will be unable to read the message.</t>
          </li>
          <li pn="section-9.6-3.2" derivedCounter="2.">
            <t indent="0" pn="section-9.6-3.2.1">send encrypted to Alice only, dropping Bob from the message recipient list.</t>
          </li>
          <li pn="section-9.6-3.3" derivedCounter="3.">
            <t indent="0" pn="section-9.6-3.3.1">send the message in the clear to both Alice and Bob.</t>
          </li>
          <li pn="section-9.6-3.4" derivedCounter="4.">
            <t indent="0" pn="section-9.6-3.4.1">send an encrypted copy of the message to Alice and a cleartext copy to Bob.</t>
          </li>
        </ol>
        <t indent="0" pn="section-9.6-4">Each of these strategies has different drawbacks.</t>
        <t indent="0" pn="section-9.6-5">The problem with approach 1 is that Bob will receive unreadable mail.</t>
        <t indent="0" pn="section-9.6-6">The problem with approach 2 is that Carol's MUA will not send the message to Bob, despite Carol asking it to.</t>
        <t indent="0" pn="section-9.6-7">The problem with approach 3 is that Carol's MUA will not encrypt the message, despite Carol asking it to.</t>
        <t indent="0" pn="section-9.6-8">Approach 4 has two problems:</t>
        <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-9.6-9">
          <li pn="section-9.6-9.1" derivedCounter="1.">
            <t indent="0" pn="section-9.6-9.1.1">Carol's MUA will release a cleartext copy of the message,
            despite Carol asking it to send the message encrypted.</t>
          </li>
          <li pn="section-9.6-9.2" derivedCounter="2.">
            <t indent="0" pn="section-9.6-9.2.1">If Alice wants to "reply all" to the message, she may not be
            able to find an encryption-capable certificate for Bob either.
            This puts Alice in an awkward and confusing position, one that
            users are unlikely to understand.  In particular, if Alice's MUA
            is following the guidance about replies to encrypted messages in
            <xref target="composing-reply" format="default" sectionFormat="of" derivedContent="Section 5.4"/>, having received an encrypted
            copy will make Alice's reply buffer behave in an unusual
            fashion.</t>
          </li>
        </ol>
        <t indent="0" pn="section-9.6-10">This is particularly problematic when the second recipient is not "Bob" but in fact a public mailing list or other visible archive, where messages are simply never encrypted.</t>
        <t indent="0" pn="section-9.6-11">Carol is unlikely to understand the subtleties and negative downstream interactions involved with approaches 1 and 4, so presenting the user with those choices is not advised.</t>
        <t indent="0" pn="section-9.6-12">The most understandable approach for an MUA with an active user is to ask the user (when they hit "send") to choose between approach 2 and approach 3.
If the user declines to choose between 2 and 3, the MUA can drop them back to their message composition window and let them make alternate adjustments.</t>
        <t indent="0" pn="section-9.6-13">See also further discussion of these scenarios in <xref target="I-D.dkg-mail-cleartext-copy" format="default" sectionFormat="of" derivedContent="CLEARTEXT-COPY"/>.</t>
      </section>
      <section anchor="proxy-dangers" numbered="true" removeInRFC="false" toc="include" pn="section-9.7">
        <name slugifiedName="name-message-transport-protocol-">Message Transport Protocol Proxy: A Dangerous Implementation Choice</name>
        <t indent="0" pn="section-9.7-1">An implementer of end-to-end cryptographic protections may be tempted by a simple software design that piggybacks off of a mail protocol, like SMTP Submission <xref target="RFC6409" format="default" sectionFormat="of" derivedContent="RFC6409"/>, IMAP <xref target="RFC9051" format="default" sectionFormat="of" derivedContent="RFC9051"/>, or JSON Meta Application Protocol (JMAP) <xref target="RFC8621" format="default" sectionFormat="of" derivedContent="RFC8621"/>, to handle message assembly and interpretation.
In such an architecture, a naive MUA speaks something like a "standard" protocol, like SMTP, IMAP, or JMAP, to a local proxy, and the proxy handles signing and encryption (outbound) and decryption and verification (inbound) internally on behalf of the user.
While such a "pluggable" architecture has the advantage of likely being easy to apply to any MUA, it is problematic for the goals of end-to-end communication, especially in an existing cleartext ecosystem like email, where any given message might be unsigned or signed, cleartext or encrypted.
In particular:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.7-2">
          <li pn="section-9.7-2.1">
            <t indent="0" pn="section-9.7-2.1.1">the user cannot easily and safely identify what protections any particular message has (including messages currently being composed) and</t>
          </li>
          <li pn="section-9.7-2.2">
            <t indent="0" pn="section-9.7-2.2.1">the proxy itself is unaware of subtle nuances about the message that the MUA actually knows.</t>
          </li>
        </ul>
        <t indent="0" pn="section-9.7-3">With a trustworthy and well-synchronized side channel or protocol extension between the MUA and the proxy, it is possible to deploy such an implementation safely, but the requirement for the side channel or extension eliminates the universal deployability advantage of the scheme.</t>
        <t indent="0" pn="section-9.7-4">Similar concerns apply to any implementation bound by an API that operates on message objects alone, without any additional contextual parameters.</t>
        <t indent="0" pn="section-9.7-5">This section attempts to document some of the inherent risks involved with such an architecture.</t>
        <section anchor="proxy-for-message-composition" numbered="true" removeInRFC="false" toc="include" pn="section-9.7.1">
          <name slugifiedName="name-dangers-of-a-submission-pro">Dangers of a Submission Proxy for Message Composition</name>
          <t indent="0" pn="section-9.7.1-1">When composing and sending a message, the act of applying cryptographic protections has subtleties that cannot be directly expressed in the SMTP protocol used by Submission <xref target="RFC6409" format="default" sectionFormat="of" derivedContent="RFC6409"/> or in any other simple protocol that hands off a cleartext message for further processing.</t>
          <t indent="0" pn="section-9.7.1-2">For example, the sender cannot indicate via SMTP whether or not a given message <em>should</em> be encrypted (some messages, such as those sent to a publicly archived mailing list, are pointless to encrypt) or select among multiple certificates for a recipient, if they exist (see <xref target="peer-cert-selection" format="default" sectionFormat="of" derivedContent="Section 8.1.1"/>).</t>
          <t indent="0" pn="section-9.7.1-3">Likewise, because such a proxy only interacts with the message when it is ready to be sent, it cannot indicate back to the user <em>during message composition</em> whether or not the message is able to be encrypted (that is, whether a valid certificate is available for each intended recipient).
A message author may write an entirely different message if they know that it will be protected end-to-end; however, without this knowledge, the author is obliged to either write text that they presume will be intercepted or risk revealing sensitive content.</t>
          <t indent="0" pn="section-9.7.1-4">Even without encryption, deciding whether to sign or not (and which certificate to sign with, if more than one exists) is another choice that the proxy is ill-equipped to make.
The common message-signing techniques either render a message unreadable by any non-cryptographic MUA (i.e., PKCS #7 signed-data) or appear as an attachment that can cause confusion to a naive recipient using a non-cryptographic MUA (i.e., multipart/signed).
If the composer knows that the recipient will not check signatures, they may prefer to leave a cleartext message without a cryptographic signature at all.</t>
          <t indent="0" pn="section-9.7.1-5">Furthermore, handling encryption properly depends on the context of any given message, which cannot be expressed by the MUA to the Submission proxy.
For example, decisions about how to handle encryption and quoted or attributed text may depend on the cryptographic status of the message that is being replied to (see <xref target="composing-reply" format="default" sectionFormat="of" derivedContent="Section 5.4"/>).</t>
          <t indent="0" pn="section-9.7.1-6">Additionally, such a proxy would need to be capable of managing the user's own key and certificate (see <xref target="local-certificates" format="default" sectionFormat="of" derivedContent="Section 8.2"/>).
For example, how will the implementation indicate to the user when their own certificate is near expiry?
How will any other error conditions be handled when communication with the user is needed?</t>
          <t indent="0" pn="section-9.7.1-7">While an extension to SMTP might be able to express all the necessary semantics that would allow a generic MUA to compose messages with standard cryptographic protections via a proxy, such an extension is beyond the scope of this document.
See <xref target="I-D.ietf-jmap-smime-sender-extensions" format="default" sectionFormat="of" derivedContent="SMIME-SENDER-EXTENSIONS"/> for an example of how an MUA using a proxy protocol might indicate signing and encryption instructions to its proxy.</t>
        </section>
        <section anchor="dangers-of-an-imap-proxy-for-message-rendering" numbered="true" removeInRFC="false" toc="include" pn="section-9.7.2">
          <name slugifiedName="name-dangers-of-an-imap-proxy-fo">Dangers of an IMAP Proxy for Message Rendering</name>
          <t indent="0" pn="section-9.7.2-1">When receiving and rendering a message, the process of indicating the cryptographic status of a message to the user requires subtleties that are difficult to offer from a straightforward IMAP (or Post Office Protocol (POP) <xref target="RFC1939" format="default" sectionFormat="of" derivedContent="RFC1939"/> or JMAP) proxy.</t>
          <t indent="0" pn="section-9.7.2-2">One approach such a proxy could take is to remove all the Cryptographic Layers from a well-formed message and to package a description of those layers into a special header field that the MUA can read.
But this merely raises the question: What semantics need to be represented?
For example:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.7.2-3">
            <li pn="section-9.7.2-3.1">
              <t indent="0" pn="section-9.7.2-3.1.1">Was the message signed?  If so, by whom?  When?</t>
            </li>
            <li pn="section-9.7.2-3.2">
              <t indent="0" pn="section-9.7.2-3.2.1">Should the details of the cryptographic algorithms used in any signatures found be indicated as well?</t>
            </li>
            <li pn="section-9.7.2-3.3">
              <t indent="0" pn="section-9.7.2-3.3.1">Was the message encrypted?  If so, to whom?  What key was used to decrypt it?</t>
            </li>
            <li pn="section-9.7.2-3.4">
              <t indent="0" pn="section-9.7.2-3.4.1">If both signed and encrypted, was the signing outside or inside the encryption?</t>
            </li>
            <li pn="section-9.7.2-3.5">
              <t indent="0" pn="section-9.7.2-3.5.1">How should Errant Cryptographic Layers (see <xref target="errant-cryptographic-layers" format="default" sectionFormat="of" derivedContent="Section 4.5"/>) be dealt with?</t>
            </li>
            <li pn="section-9.7.2-3.6">
              <t indent="0" pn="section-9.7.2-3.6.1">What cryptographic protections do the header fields of the message have? (See <xref target="RFC9788" format="default" sectionFormat="of" derivedContent="RFC9788"/>.)</t>
            </li>
            <li pn="section-9.7.2-3.7">
              <t indent="0" pn="section-9.7.2-3.7.1">How are any errors or surprises communicated to the user?</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.7.2-4">If the proxy passes any of this cryptographic status to the client in an added header field, it must also ensure that no such header field is present on the messages it receives before processing it.
If it were to allow such an unmodified header field through to any client that is willing to trust its contents, an attacker could spoof the field to make the user believe lies about the cryptographic status of the message.
In order for an MUA to be confident in such a header field, it needs a guarantee from the proxy that any header field it produces will be safe.
How does the MUA reliably negotiate this guarantee with the proxy?
If the proxy can no longer offer this guarantee, how will the MUA know that things have changed?</t>
          <t indent="0" pn="section-9.7.2-5">If such an inbound proxy handles certificate discovery in inbound messages (see <xref target="peer-discovery-incoming" format="default" sectionFormat="of" derivedContent="Appendix A.3.1"/>), it will also need to communicate the results of that discovery process to its corresponding outbound proxy for message composition (see <xref target="proxy-for-message-composition" format="default" sectionFormat="of" derivedContent="Section 9.7.1"/>).</t>
          <t indent="0" pn="section-9.7.2-6">While an extension to IMAP (or POP or JMAP) might be able to express all the necessary semantics that would allow a generic MUA to indicate standardized cryptographic message status, such an extension is beyond the scope of this document.
<xref target="RFC9219" format="default" sectionFormat="of" derivedContent="RFC9219"/> describes the transmission of an S/MIME signature verification status over JMAP, which is a subset of the cryptographic status information described here.</t>
        </section>
        <section anchor="who-controls-the-proxy" numbered="true" removeInRFC="false" toc="include" pn="section-9.7.3">
          <name slugifiedName="name-who-controls-the-proxy">Who Controls the Proxy?</name>
          <t indent="0" pn="section-9.7.3-1">Finally, consider that the naive proxy deployment approach is risky precisely because of its opacity to the end user.
Such a deployment could be placed anywhere in the stack, including on a machine that is not ultimately controlled by the end user, making it effectively a form of transport protection rather than end-to-end protection.</t>
          <t indent="0" pn="section-9.7.3-2">An MUA explicitly under the control of the end user with thoughtful integration can offer UI/UX and security guarantees that a simple proxy cannot provide.
See also <xref target="proxy-extensions" format="default" sectionFormat="of" derivedContent="Appendix A.13"/> for suggestions of future work that might augment a proxy to make it safer.</t>
        </section>
      </section>
      <section anchor="intervening-mua" numbered="true" removeInRFC="false" toc="include" pn="section-9.8">
        <name slugifiedName="name-intervening-muas-do-not-han">Intervening MUAs Do Not Handle End-to-End Cryptographic Protections</name>
        <t indent="0" pn="section-9.8-1">Some MUAs will resend a message in identical form (or very similar form) to the way that they received it.
For example, consider the following use cases:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.8-2">
          <li pn="section-9.8-2.1">
            <t indent="0" pn="section-9.8-2.1.1">a mail expander or mailing list that receives a message and resends it to all subscribers (see also <xref target="mailing-lists" format="default" sectionFormat="of" derivedContent="Appendix A.14"/> for more discussion of mailing lists)</t>
          </li>
          <li pn="section-9.8-2.2">
            <t indent="0" pn="section-9.8-2.2.1">an individual user who reintroduces a message they received into the mail transport system (see <xref section="3.6.6" sectionFormat="of" target="RFC5322" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5322#section-3.6.6" derivedContent="RFC5322"/>)</t>
          </li>
          <li pn="section-9.8-2.3">
            <t indent="0" pn="section-9.8-2.3.1">an automated email intake system that forwards a report to the mailboxes of responsible staffers</t>
          </li>
        </ul>
        <t indent="0" pn="section-9.8-3">These MUAs intervene in message transport by receiving and then reinjecting messages into the mail transport system.
In some cases, the original sender or final recipient of a message that has passed through such an MUA may be unaware of the intervention.
(Note that an MUA that forwards a received message as a attachment (MIME subpart) of type <tt>message/rfc822</tt> or <tt>message/global</tt> or "inline" in the body of a message is <em>not</em> acting as an intervening MUA in this sense, because the forwarded message is encapsulated within a visible outer message that is clearly from the MUA itself.)</t>
        <t indent="0" pn="section-9.8-4">An intervening MUA should be aware of end-to-end cryptographic protections that might already exist on messages that they resend.
In particular, it is unclear what the "end-to-end" properties are of a message that has been handled by an intervening MUA.
For signed-only messages, if the intervening MUA makes any substantive modifications to the message as it passes it along, it may break the signature from the original sender.
In many cases, breaking the original signature is the appropriate result, since the original message has been modified, and the original sender has no control over the modifications made by the intervening MUA.
For signed-and-encrypted messages, if the intervening MUA is capable of decrypting the message, it must be careful when retransmitting the message.
Will the new recipient be able to decrypt it?
If not, will the message be useful to the recipient?
If not, it may not make sense to resend the message.</t>
        <t indent="0" pn="section-9.8-5">Beyond the act of resending, an intervening MUA should not itself try to apply end-to-end cryptographic protections on a message that it is resending unless directed otherwise by some future specification.
Additional layers of cryptographic protection added in an ad hoc way by an intervening MUA are more likely to confuse the recipient and will not be interpretable as end-to-end protections as they do not originate with the original sender of the message.</t>
      </section>
      <section anchor="external-subresources" numbered="true" removeInRFC="false" toc="include" pn="section-9.9">
        <name slugifiedName="name-external-subresources-in-mi">External Subresources in MIME Parts Break Cryptographic Protections</name>
        <t indent="0" pn="section-9.9-1">A MIME part with a content type that can refer to external resources (like <tt>text/html</tt>) may itself have some sort of end-to-end cryptographic protections.
However, retrieving or rendering these external resources may violate the properties that users expect from cryptographic protection.</t>
        <t indent="0" pn="section-9.9-2">As a baseline, retrieving the external resource at the time a message is read can be used as a "web bug", leaking the activity and network location of the recipient to the server hosting the external resource.
This privacy risk is present, of course, even for messages with no cryptographic protections but may be even more surprising to users who are shown some level of security indicator about a given message.</t>
        <t indent="0" pn="section-9.9-3">Other problems with external resources are more specifically bound to cryptographic protections.</t>
        <t indent="0" pn="section-9.9-4">For example, a signed email message with a <tt>text/html</tt> part that refers to an external image (i.e., via <tt>&lt;img src="https://example.com/img.png"&gt;</tt>) may render differently if the hosting web server decides to serve different content at the source URL for the image.
This effectively breaks the goals of integrity and authenticity that the user should be able to rely on for signed messages, unless the external subresource has strict integrity guarantees (e.g., via <xref target="SRI" format="default" sectionFormat="of" derivedContent="SRI"/>).</t>
        <t indent="0" pn="section-9.9-5">Likewise, fetching an external subresource for a signed-and-encrypted message effectively breaks goals of privacy and confidentiality for the user.</t>
        <t indent="0" pn="section-9.9-6">This is loosely analogous to security indicator problems that arose for web browsers as described in <xref target="MIXED-CONTENT" format="default" sectionFormat="of" derivedContent="MIXED-CONTENT"/>.
However, while fetching the external subresource over https is sufficient to avoid a "mixed content" warning from most browsers, it is insufficient for an MUA that wants to offer its users true end-to-end guarantees for email messages.</t>
        <t indent="0" pn="section-9.9-7">A conformant composing MUA that applies signing-only cryptographic protection to a new email message with an external subresource should take one of the following options:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.9-8">
          <li pn="section-9.9-8.1">
            <t indent="0" pn="section-9.9-8.1.1">pre-fetch the external subresource and include it in the message itself,</t>
          </li>
          <li pn="section-9.9-8.2">
            <t indent="0" pn="section-9.9-8.2.1">use a strong integrity mechanism like Subresource Integrity <xref target="SRI" format="default" sectionFormat="of" derivedContent="SRI"/> to guarantee the content of the subresource (though this does not fix the "web bug" privacy risk described above), or</t>
          </li>
          <li pn="section-9.9-8.3">
            <t indent="0" pn="section-9.9-8.3.1">prompt the composing user to remove the subresource from the message.</t>
          </li>
        </ul>
        <t indent="0" pn="section-9.9-9">A conformant composing MUA that applies encryption to a new email message with an external resource cannot depend on Subresource Integrity to protect the privacy and confidentiality of the message, so it should either pre-fetch the external resource to include it in the message or prompt the composing user to remove it before sending.</t>
        <t indent="0" pn="section-9.9-10">A conformant rendering MUA that encounters a message with end-to-end cryptographic protections that contain a subresource <bcp14>MUST</bcp14> either refuse to retrieve and render the external subresource or decline to treat the message as having cryptographic protections.
For example, it could indicate in the Cryptographic Summary that the message is Unprotected.</t>
        <t indent="0" pn="section-9.9-11">Note that when composing a message reply with quoted text from the original message, if the original message did contain an external resource, the composing MUA <bcp14>SHOULD NOT</bcp14> fetch the external resource solely to include it in the reply message, as doing so would trigger the "web bug" at reply composition time.
Instead, the safest way to deal with quoted text that contains an external resource in an end-to-end encrypted reply is to strip any reference to the external resource during initial composition of the reply.</t>
      </section>
    </section>
    <section anchor="iana-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-10">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-10-1">This document has no IANA actions.</t>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-11">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-11-1">This entire document addresses security considerations about end-to-end cryptographic protections for email messages.</t>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.woodhouse-cert-best-practice" to="CERT-BEST-PRACTICE"/>
    <displayreference target="I-D.ietf-jmap-smime-sender-extensions" to="SMIME-SENDER-EXTENSIONS"/>
    <displayreference target="I-D.koch-openpgp-webkey-service" to="WEBKEY-SERVICE"/>
    <displayreference target="I-D.wussler-openpgp-forwarding" to="OPENPGP-FORWARDING"/>
    <displayreference target="I-D.dkg-mail-cleartext-copy" to="CLEARTEXT-COPY"/>
    <references pn="section-12">
      <name slugifiedName="name-references">References</name>
      <references pn="section-12.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t indent="0">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC3156" target="https://www.rfc-editor.org/info/rfc3156" quoteTitle="true" derivedAnchor="RFC3156">
          <front>
            <title>MIME Security with OpenPGP</title>
            <author fullname="M. Elkins" initials="M." surname="Elkins"/>
            <author fullname="D. Del Torto" initials="D." surname="Del Torto"/>
            <author fullname="R. Levien" initials="R." surname="Levien"/>
            <author fullname="T. Roessler" initials="T." surname="Roessler"/>
            <date month="August" year="2001"/>
            <abstract>
              <t indent="0">This document describes how the OpenPGP Message Format can be used to provide privacy and authentication using the Multipurpose Internet Mail Extensions (MIME) security content types described in RFC 1847. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3156"/>
          <seriesInfo name="DOI" value="10.17487/RFC3156"/>
        </reference>
        <reference anchor="RFC4289" target="https://www.rfc-editor.org/info/rfc4289" quoteTitle="true" derivedAnchor="RFC4289">
          <front>
            <title>Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures</title>
            <author fullname="N. Freed" initials="N." surname="Freed"/>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <date month="December" year="2005"/>
            <abstract>
              <t indent="0">This document specifies IANA registration procedures for MIME external body access types and content-transfer-encodings. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="13"/>
          <seriesInfo name="RFC" value="4289"/>
          <seriesInfo name="DOI" value="10.17487/RFC4289"/>
        </reference>
        <reference anchor="RFC5890" target="https://www.rfc-editor.org/info/rfc5890" quoteTitle="true" derivedAnchor="RFC5890">
          <front>
            <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <date month="August" year="2010"/>
            <abstract>
              <t indent="0">This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version. It describes the document collection and provides definitions and other material that are common to the set. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5890"/>
          <seriesInfo name="DOI" value="10.17487/RFC5890"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8551" target="https://www.rfc-editor.org/info/rfc8551" quoteTitle="true" derivedAnchor="RFC8551">
          <front>
            <title>Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 Message Specification</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <author fullname="B. Ramsdell" initials="B." surname="Ramsdell"/>
            <author fullname="S. Turner" initials="S." surname="Turner"/>
            <date month="April" year="2019"/>
            <abstract>
              <t indent="0">This document defines Secure/Multipurpose Internet Mail Extensions (S/MIME) version 4.0. S/MIME provides a consistent way to send and receive secure MIME data. Digital signatures provide authentication, message integrity, and non-repudiation with proof of origin. Encryption provides data confidentiality. Compression can be used to reduce data size. This document obsoletes RFC 5751.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8551"/>
          <seriesInfo name="DOI" value="10.17487/RFC8551"/>
        </reference>
        <reference anchor="RFC9598" target="https://www.rfc-editor.org/info/rfc9598" quoteTitle="true" derivedAnchor="RFC9598">
          <front>
            <title>Internationalized Email Addresses in X.509 Certificates</title>
            <author fullname="A. Melnikov" initials="A." surname="Melnikov"/>
            <author fullname="W. Chuang" initials="W." surname="Chuang"/>
            <author fullname="C. Bonnell" initials="C." surname="Bonnell"/>
            <date month="May" year="2024"/>
            <abstract>
              <t indent="0">This document defines a new name form for inclusion in the otherName field of an X.509 Subject Alternative Name and Issuer Alternative Name extension that allows a certificate subject to be associated with an internationalized email address.</t>
              <t indent="0">This document updates RFC 5280 and obsoletes RFC 8398.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9598"/>
          <seriesInfo name="DOI" value="10.17487/RFC9598"/>
        </reference>
        <reference anchor="RFC9788" target="https://www.rfc-editor.org/info/rfc9788" quoteTitle="true" derivedAnchor="RFC9788">
          <front>
            <title>Header Protection for Cryptographically Protected Email</title>
            <author initials="D. K." surname="Gillmor" fullname="Daniel Kahn Gillmor">
              <organization showOnFrontPage="true">American Civil Liberties Union</organization>
            </author>
            <author initials="B." surname="Hoeneisen" fullname="Bernie Hoeneisen">
              <organization showOnFrontPage="true">pEp Project</organization>
            </author>
            <author initials="A." surname="Melnikov" fullname="Alexey Melnikov">
              <organization showOnFrontPage="true">Isode Ltd</organization>
            </author>
            <date month="August" year="2025"/>
          </front>
          <seriesInfo name="RFC" value="9788"/>
          <seriesInfo name="DOI" value="10.17487/RFC9788"/>
        </reference>
      </references>
      <references pn="section-12.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="AUTOCRYPT" target="https://autocrypt.org/" quoteTitle="true" derivedAnchor="AUTOCRYPT">
          <front>
            <title>Autocrypt - Convenient End-to-End Encryption for E-Mail</title>
            <author>
              <organization showOnFrontPage="true">Autocrypt Team</organization>
            </author>
          </front>
        </reference>
        <reference anchor="I-D.woodhouse-cert-best-practice" target="https://datatracker.ietf.org/doc/html/draft-woodhouse-cert-best-practice-01" quoteTitle="true" derivedAnchor="CERT-BEST-PRACTICE">
          <front>
            <title>Recommendations for applications using X.509 client certificates</title>
            <author fullname="David Woodhouse" initials="D." surname="Woodhouse">
              <organization showOnFrontPage="true">Amazon Web Services</organization>
            </author>
            <author fullname="Nikos Mavrogiannopoulos" initials="N." surname="Mavrogiannopoulos"/>
            <date day="25" month="July" year="2023"/>
            <abstract>
              <t indent="0">X.509 certificates are widely used for client authentication in many protocols, especially in conjunction with Transport Layer Security ([RFC5246]) and Datagram Transport Layer Security ([RFC6347]. There exist a multitude of forms in which certificates and especially their corresponding private keys may be stored or referenced. Applications have historically been massively inconsistent in which subset of these forms have been supported, and what knowledge is demanded of the user. This memo sets out best practice for applications in the interest of usability and consistency.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-woodhouse-cert-best-practice-01"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="CHROME-INDICATORS" target="https://blog.chromium.org/2018/05/evolving-chromes-security-indicators.html" quoteTitle="true" derivedAnchor="CHROME-INDICATORS">
          <front>
            <title>Evolving Chrome's security indicators</title>
            <author initials="E." surname="Schechter" fullname="Emily Schechter">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="May"/>
          </front>
          <refcontent>Chromium Blog</refcontent>
        </reference>
        <reference anchor="I-D.dkg-mail-cleartext-copy" target="https://datatracker.ietf.org/doc/html/draft-dkg-mail-cleartext-copy-01" quoteTitle="true" derivedAnchor="CLEARTEXT-COPY">
          <front>
            <title>Encrypted E-mail with Cleartext Copies</title>
            <author fullname="Daniel Kahn Gillmor" initials="D. K." surname="Gillmor"/>
            <date day="21" month="February" year="2023"/>
            <abstract>
              <t indent="0">When an e-mail program generates an encrypted message to multiple recipients, it is possible that it has no encryption capability for at least one of the recipients. In this circumstance, an e-mail program may choose to send the message in cleartext to the recipient it cannot encrypt to. This draft currently offers several possible approaches when such a choice is made by the sender, so that the recipient can reason about and act on the cryptographic status of the message responsibly.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-dkg-mail-cleartext-copy-01"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="DROWN" target="https://drownattack.com/drown-attack-paper.pdf" quoteTitle="true" derivedAnchor="DROWN">
          <front>
            <title>DROWN: Breaking TLS using SSLv2</title>
            <author initials="N." surname="Aviram" fullname="Nimrod Aviram">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Schinzel" fullname="Sebastian Schinzel">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Somorovsky" fullname="Juraj Somorovsky">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Heninger" fullname="Nadia Heninger">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Dankel" fullname="Maik Dankel">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Steube" fullname="Jens Steube">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Valenta" fullname="Luke Valenta">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Adrian" fullname="David Adrian">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J. A." surname="Halderman" fullname="J. Alex Halderman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="V." surname="Dukhovni" fullname="Viktor Dukhovni">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Käsper" fullname="Emilia Käsper">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Cohney" fullname="Shaanan Cohney">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Engels" fullname="Susanne Engels">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Paar" fullname="Christof Paar">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Y." surname="Shavitt" fullname="Yuval Shavitt">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="August"/>
          </front>
          <refcontent>Proceedings of the 25th USENIX Security Symposium (USENIX Security 16), pp. 689-706</refcontent>
        </reference>
        <reference anchor="EFAIL" target="https://www.usenix.org/conference/usenixsecurity18/presentation/poddebniak" quoteTitle="true" derivedAnchor="EFAIL">
          <front>
            <title>Efail: Breaking S/MIME and OpenPGP Email Encryption using Exfiltration Channels</title>
            <author initials="D." surname="Poddebniak" fullname="Damian Poddebniak">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Dresen" fullname="Christian Dresen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Müller" fullname="Jens Müller">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="F." surname="Ising" fullname="Fabian Ising">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Schinzel" fullname="Sebastian Schinzel">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Friedberger" fullname="Simon Friedberger">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Somorovsky" fullname="Juraj Somorovsky">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schwenk" fullname="Jörg Schwenk">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="August"/>
          </front>
          <refcontent>Proceedings of the 27th USENIX Security Symposium (USENIX Security 18), pp. 549-566</refcontent>
        </reference>
        <reference anchor="IKE" target="https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-felsch.pdf" quoteTitle="true" derivedAnchor="IKE">
          <front>
            <title>The Dangers of Key Reuse: Practical Attacks on IPsec IKE</title>
            <author initials="D." surname="Felsch" fullname="Dennis Felsch">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Grothe" fullname="Martin Grothe">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schwenk" fullname="Jörg Schwenk">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Czubak" fullname="Adam Czubak">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Szymane" fullname="Marcin Szymane">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="August"/>
          </front>
          <refcontent>Proceedings of the 27th USENIX Security Symposium, pp. 567-583</refcontent>
        </reference>
        <reference anchor="MIXED-CONTENT" target="https://www.w3.org/TR/2023/CRD-mixed-content-20230223/" quoteTitle="true" derivedAnchor="MIXED-CONTENT">
          <front>
            <title>Mixed Content</title>
            <author initials="E." surname="Stark" fullname="Emily Stark" role="editor"/>
            <author initials="M." surname="West" fullname="Mike West" role="editor"/>
            <author initials="C." surname="Lopez" fullname="Carlos Ibarra Lopez" role="editor"/>
            <date year="2023" month="February"/>
          </front>
          <refcontent>W3C Candidate Recommendation Draft</refcontent>
          <annotation>Latest version available at <eref target="https://www.w3.org/TR/mixed-content/" brackets="angle"/>.</annotation>
        </reference>
        <reference anchor="I-D.wussler-openpgp-forwarding" target="https://datatracker.ietf.org/doc/html/draft-wussler-openpgp-forwarding-00" quoteTitle="true" derivedAnchor="OPENPGP-FORWARDING">
          <front>
            <title>Automatic Forwarding for ECDH Curve25519 OpenPGP messages</title>
            <author fullname="Aron Wussler" initials="A." surname="Wussler">
              <organization showOnFrontPage="true">Proton AG</organization>
            </author>
            <date day="10" month="July" year="2023"/>
            <abstract>
              <t indent="0">An OpenPGP user may want to request their email provider to automatically forward some or all of the messages they receive to a third party. Given that messages are encrypted, this requires transforming them into ciphertexts decryptable by the intended forwarded parties, while maintaining confidentiality and authentication. This can be achieved using Proxy transformations on the Curve25519 elliptic curve field with minimal changes to the OpenPGP protocol, in particular no change is required on the sender side. In this document we implement the forwarding scheme described in [FORWARDING].</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-wussler-openpgp-forwarding-00"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="ORACLE" target="https://www.usenix.org/conference/usenixsecurity23/presentation/ising" quoteTitle="true" derivedAnchor="ORACLE">
          <front>
            <title>Content-Type: multipart/oracle - Tapping into Format Oracles in Email End-to-End Encryption</title>
            <author initials="F." surname="Ising" fullname="Fabian Ising">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Poddebniak" fullname="Damian Poddebniak">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Kappert" fullname="Tobias Kappert">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Saatjohann" fullname="Christoph Saatjohann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Schinzel" fullname="Sebastian Schinzel">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2023" month="August"/>
          </front>
          <refcontent>Proceedings of the 32nd USENIX Security Symposium (USENIX Security 23), pp. 4175-4192</refcontent>
        </reference>
        <reference anchor="PKCS11" target="https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/os/pkcs11-spec-v3.1-os.html" quoteTitle="true" derivedAnchor="PKCS11">
          <front>
            <title>PKCS #11 Specification Version 3.1</title>
            <author initials="D." surname="Bong" fullname="Dieter Bong" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Cox" fullname="Tony Cox" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2023" month="July"/>
          </front>
          <refcontent>OASIS Standard</refcontent>
        </reference>
        <reference anchor="REPLY" quoteTitle="true" target="https://doi.org/10.1007/978-3-030-21568-2_2" derivedAnchor="REPLY">
          <front>
            <title>Re: What's Up Johnny?: Covert Content Attacks on Email End-to-End Encryption</title>
            <author fullname="Jens Müller" initials="J." surname="Müller">
              <organization showOnFrontPage="true"/>
            </author>
            <author fullname="Marcus Brinkmann" initials="M." surname="Brinkmann">
              <organization showOnFrontPage="true"/>
            </author>
            <author fullname="Damian Poddebniak" initials="D." surname="Poddebniak">
              <organization showOnFrontPage="true"/>
            </author>
            <author fullname="Sebastian Schinzel" initials="S." surname="Schinzel">
              <organization showOnFrontPage="true"/>
            </author>
            <author fullname="Jörg Schwenk" initials="J." surname="Schwenk">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="April"/>
          </front>
          <refcontent>Applied Cryptography and Network Security (ACNS 2019), Lecture Notes in Computer Science, vol. 11464, pp. 24-42</refcontent>
          <seriesInfo name="DOI" value="10.1007/978-3-030-21568-2_2"/>
        </reference>
        <reference anchor="RFC1939" target="https://www.rfc-editor.org/info/rfc1939" quoteTitle="true" derivedAnchor="RFC1939">
          <front>
            <title>Post Office Protocol - Version 3</title>
            <author fullname="J. Myers" initials="J." surname="Myers"/>
            <author fullname="M. Rose" initials="M." surname="Rose"/>
            <date month="May" year="1996"/>
            <abstract>
              <t indent="0">The Post Office Protocol - Version 3 (POP3) is intended to permit a workstation to dynamically access a maildrop on a server host in a useful fashion. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="53"/>
          <seriesInfo name="RFC" value="1939"/>
          <seriesInfo name="DOI" value="10.17487/RFC1939"/>
        </reference>
        <reference anchor="RFC2045" target="https://www.rfc-editor.org/info/rfc2045" quoteTitle="true" derivedAnchor="RFC2045">
          <front>
            <title>Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
            <author fullname="N. Freed" initials="N." surname="Freed"/>
            <author fullname="N. Borenstein" initials="N." surname="Borenstein"/>
            <date month="November" year="1996"/>
            <abstract>
              <t indent="0">This initial document specifies the various headers used to describe the structure of MIME messages. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2045"/>
          <seriesInfo name="DOI" value="10.17487/RFC2045"/>
        </reference>
        <reference anchor="RFC3207" target="https://www.rfc-editor.org/info/rfc3207" quoteTitle="true" derivedAnchor="RFC3207">
          <front>
            <title>SMTP Service Extension for Secure SMTP over Transport Layer Security</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <date month="February" year="2002"/>
            <abstract>
              <t indent="0">This document describes an extension to the SMTP (Simple Mail Transfer Protocol) service that allows an SMTP server and client to use TLS (Transport Layer Security) to provide private, authenticated communication over the Internet. This gives SMTP agents the ability to protect some or all of their communications from eavesdroppers and attackers. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3207"/>
          <seriesInfo name="DOI" value="10.17487/RFC3207"/>
        </reference>
        <reference anchor="RFC3274" target="https://www.rfc-editor.org/info/rfc3274" quoteTitle="true" derivedAnchor="RFC3274">
          <front>
            <title>Compressed Data Content Type for Cryptographic Message Syntax (CMS)</title>
            <author fullname="P. Gutmann" initials="P." surname="Gutmann"/>
            <date month="June" year="2002"/>
            <abstract>
              <t indent="0">This document defines a format for using compressed data as a Cryptographic Message Syntax (CMS) content type. Compressing data before transmission provides a number of advantages, including the elimination of data redundancy which could help an attacker, speeding up processing by reducing the amount of data to be processed by later steps (such as signing or encryption), and reducing overall message size. Although there have been proposals for adding compression at other levels (for example at the MIME or SSL level), these don't address the problem of compression of CMS content unless the compression is supplied by an external means (for example by intermixing MIME and CMS). [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3274"/>
          <seriesInfo name="DOI" value="10.17487/RFC3274"/>
        </reference>
        <reference anchor="RFC3370" target="https://www.rfc-editor.org/info/rfc3370" quoteTitle="true" derivedAnchor="RFC3370">
          <front>
            <title>Cryptographic Message Syntax (CMS) Algorithms</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="August" year="2002"/>
          </front>
          <seriesInfo name="RFC" value="3370"/>
          <seriesInfo name="DOI" value="10.17487/RFC3370"/>
        </reference>
        <reference anchor="RFC4511" target="https://www.rfc-editor.org/info/rfc4511" quoteTitle="true" derivedAnchor="RFC4511">
          <front>
            <title>Lightweight Directory Access Protocol (LDAP): The Protocol</title>
            <author fullname="J. Sermersheim" initials="J." role="editor" surname="Sermersheim"/>
            <date month="June" year="2006"/>
            <abstract>
              <t indent="0">This document describes the protocol elements, along with their semantics and encodings, of the Lightweight Directory Access Protocol (LDAP). LDAP provides access to distributed directory services that act in accordance with X.500 data and service models. These protocol elements are based on those described in the X.500 Directory Access Protocol (DAP). [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4511"/>
          <seriesInfo name="DOI" value="10.17487/RFC4511"/>
        </reference>
        <reference anchor="RFC5322" target="https://www.rfc-editor.org/info/rfc5322" quoteTitle="true" derivedAnchor="RFC5322">
          <front>
            <title>Internet Message Format</title>
            <author fullname="P. Resnick" initials="P." role="editor" surname="Resnick"/>
            <date month="October" year="2008"/>
            <abstract>
              <t indent="0">This document specifies the Internet Message Format (IMF), a syntax for text messages that are sent between computer users, within the framework of "electronic mail" messages. This specification is a revision of Request For Comments (RFC) 2822, which itself superseded Request For Comments (RFC) 822, "Standard for the Format of ARPA Internet Text Messages", updating it to reflect current practice and incorporating incremental changes that were specified in other RFCs. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5322"/>
          <seriesInfo name="DOI" value="10.17487/RFC5322"/>
        </reference>
        <reference anchor="RFC6376" target="https://www.rfc-editor.org/info/rfc6376" quoteTitle="true" derivedAnchor="RFC6376">
          <front>
            <title>DomainKeys Identified Mail (DKIM) Signatures</title>
            <author fullname="D. Crocker" initials="D." role="editor" surname="Crocker"/>
            <author fullname="T. Hansen" initials="T." role="editor" surname="Hansen"/>
            <author fullname="M. Kucherawy" initials="M." role="editor" surname="Kucherawy"/>
            <date month="September" year="2011"/>
            <abstract>
              <t indent="0">DomainKeys Identified Mail (DKIM) permits a person, role, or organization that owns the signing domain to claim some responsibility for a message by associating the domain with the message. This can be an author's organization, an operational relay, or one of their agents. DKIM separates the question of the identity of the Signer of the message from the purported author of the message. Assertion of responsibility is validated through a cryptographic signature and by querying the Signer's domain directly to retrieve the appropriate public key. Message transit from author to recipient is through relays that typically make no substantive change to the message content and thus preserve the DKIM signature.</t>
              <t indent="0">This memo obsoletes RFC 4871 and RFC 5672. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="76"/>
          <seriesInfo name="RFC" value="6376"/>
          <seriesInfo name="DOI" value="10.17487/RFC6376"/>
        </reference>
        <reference anchor="RFC6409" target="https://www.rfc-editor.org/info/rfc6409" quoteTitle="true" derivedAnchor="RFC6409">
          <front>
            <title>Message Submission for Mail</title>
            <author fullname="R. Gellens" initials="R." surname="Gellens"/>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <date month="November" year="2011"/>
            <abstract>
              <t indent="0">This memo splits message submission from message relay, allowing each service to operate according to its own rules (for security, policy, etc.), and specifies what actions are to be taken by a submission server.</t>
              <t indent="0">Message relay is unaffected, and continues to use SMTP over port 25.</t>
              <t indent="0">When conforming to this document, message submission uses the protocol specified here, normally over port 587.</t>
              <t indent="0">This separation of function offers a number of benefits, including the ability to apply specific security or policy requirements. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="72"/>
          <seriesInfo name="RFC" value="6409"/>
          <seriesInfo name="DOI" value="10.17487/RFC6409"/>
        </reference>
        <reference anchor="RFC6532" target="https://www.rfc-editor.org/info/rfc6532" quoteTitle="true" derivedAnchor="RFC6532">
          <front>
            <title>Internationalized Email Headers</title>
            <author fullname="A. Yang" initials="A." surname="Yang"/>
            <author fullname="S. Steele" initials="S." surname="Steele"/>
            <author fullname="N. Freed" initials="N." surname="Freed"/>
            <date month="February" year="2012"/>
            <abstract>
              <t indent="0">Internet mail was originally limited to 7-bit ASCII. MIME added support for the use of 8-bit character sets in body parts, and also defined an encoded-word construct so other character sets could be used in certain header field values. However, full internationalization of electronic mail requires additional enhancements to allow the use of Unicode, including characters outside the ASCII repertoire, in mail addresses as well as direct use of Unicode in header fields like "From:", "To:", and "Subject:", without requiring the use of complex encoded-word constructs. This document specifies an enhancement to the Internet Message Format and to MIME that allows use of Unicode in mail addresses and most header field content.</t>
              <t indent="0">This specification updates Section 6.4 of RFC 2045 to eliminate the restriction prohibiting the use of non-identity content-transfer- encodings on subtypes of "message/". [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6532"/>
          <seriesInfo name="DOI" value="10.17487/RFC6532"/>
        </reference>
        <reference anchor="RFC7292" target="https://www.rfc-editor.org/info/rfc7292" quoteTitle="true" derivedAnchor="RFC7292">
          <front>
            <title>PKCS #12: Personal Information Exchange Syntax v1.1</title>
            <author fullname="K. Moriarty" initials="K." role="editor" surname="Moriarty"/>
            <author fullname="M. Nystrom" initials="M." surname="Nystrom"/>
            <author fullname="S. Parkinson" initials="S." surname="Parkinson"/>
            <author fullname="A. Rusch" initials="A." surname="Rusch"/>
            <author fullname="M. Scott" initials="M." surname="Scott"/>
            <date month="July" year="2014"/>
            <abstract>
              <t indent="0">PKCS #12 v1.1 describes a transfer syntax for personal identity information, including private keys, certificates, miscellaneous secrets, and extensions. Machines, applications, browsers, Internet kiosks, and so on, that support this standard will allow a user to import, export, and exercise a single set of personal identity information. This standard supports direct transfer of personal information under several privacy and integrity modes.</t>
              <t indent="0">This document represents a republication of PKCS #12 v1.1 from RSA Laboratories' Public Key Cryptography Standard (PKCS) series. By publishing this RFC, change control is transferred to the IETF.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7292"/>
          <seriesInfo name="DOI" value="10.17487/RFC7292"/>
        </reference>
        <reference anchor="RFC7435" target="https://www.rfc-editor.org/info/rfc7435" quoteTitle="true" derivedAnchor="RFC7435">
          <front>
            <title>Opportunistic Security: Some Protection Most of the Time</title>
            <author fullname="V. Dukhovni" initials="V." surname="Dukhovni"/>
            <date month="December" year="2014"/>
            <abstract>
              <t indent="0">This document defines the concept "Opportunistic Security" in the context of communications protocols. Protocol designs based on Opportunistic Security use encryption even when authentication is not available, and use authentication when possible, thereby removing barriers to the widespread use of encryption on the Internet.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7435"/>
          <seriesInfo name="DOI" value="10.17487/RFC7435"/>
        </reference>
        <reference anchor="RFC7929" target="https://www.rfc-editor.org/info/rfc7929" quoteTitle="true" derivedAnchor="RFC7929">
          <front>
            <title>DNS-Based Authentication of Named Entities (DANE) Bindings for OpenPGP</title>
            <author fullname="P. Wouters" initials="P." surname="Wouters"/>
            <date month="August" year="2016"/>
            <abstract>
              <t indent="0">OpenPGP is a message format for email (and file) encryption that lacks a standardized lookup mechanism to securely obtain OpenPGP public keys. DNS-Based Authentication of Named Entities (DANE) is a method for publishing public keys in DNS. This document specifies a DANE method for publishing and locating OpenPGP public keys in DNS for a specific email address using a new OPENPGPKEY DNS resource record. Security is provided via Secure DNS, however the OPENPGPKEY record is not a replacement for verification of authenticity via the "web of trust" or manual verification. The OPENPGPKEY record can be used to encrypt an email that would otherwise have to be sent unencrypted.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7929"/>
          <seriesInfo name="DOI" value="10.17487/RFC7929"/>
        </reference>
        <reference anchor="RFC8162" target="https://www.rfc-editor.org/info/rfc8162" quoteTitle="true" derivedAnchor="RFC8162">
          <front>
            <title>Using Secure DNS to Associate Certificates with Domain Names for S/MIME</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <author fullname="J. Schlyter" initials="J." surname="Schlyter"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">This document describes how to use secure DNS to associate an S/MIME user's certificate with the intended domain name, similar to the way that DNS-Based Authentication of Named Entities (DANE), RFC 6698, does for TLS.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8162"/>
          <seriesInfo name="DOI" value="10.17487/RFC8162"/>
        </reference>
        <reference anchor="RFC8621" target="https://www.rfc-editor.org/info/rfc8621" quoteTitle="true" derivedAnchor="RFC8621">
          <front>
            <title>The JSON Meta Application Protocol (JMAP) for Mail</title>
            <author fullname="N. Jenkins" initials="N." surname="Jenkins"/>
            <author fullname="C. Newman" initials="C." surname="Newman"/>
            <date month="August" year="2019"/>
            <abstract>
              <t indent="0">This document specifies a data model for synchronising email data with a server using the JSON Meta Application Protocol (JMAP). Clients can use this to efficiently search, access, organise, and send messages, and to get push notifications for fast resynchronisation when new messages are delivered or a change is made in another client.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8621"/>
          <seriesInfo name="DOI" value="10.17487/RFC8621"/>
        </reference>
        <reference anchor="RFC8823" target="https://www.rfc-editor.org/info/rfc8823" quoteTitle="true" derivedAnchor="RFC8823">
          <front>
            <title>Extensions to Automatic Certificate Management Environment for End-User S/MIME Certificates</title>
            <author fullname="A. Melnikov" initials="A." surname="Melnikov"/>
            <date month="April" year="2021"/>
            <abstract>
              <t indent="0">This document specifies identifiers and challenges required to enable the Automated Certificate Management Environment (ACME) to issue certificates for use by email users that want to use S/MIME.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8823"/>
          <seriesInfo name="DOI" value="10.17487/RFC8823"/>
        </reference>
        <reference anchor="RFC9051" target="https://www.rfc-editor.org/info/rfc9051" quoteTitle="true" derivedAnchor="RFC9051">
          <front>
            <title>Internet Message Access Protocol (IMAP) - Version 4rev2</title>
            <author fullname="A. Melnikov" initials="A." role="editor" surname="Melnikov"/>
            <author fullname="B. Leiba" initials="B." role="editor" surname="Leiba"/>
            <date month="August" year="2021"/>
            <abstract>
              <t indent="0">The Internet Message Access Protocol Version 4rev2 (IMAP4rev2) allows a client to access and manipulate electronic mail messages on a server. IMAP4rev2 permits manipulation of mailboxes (remote message folders) in a way that is functionally equivalent to local folders. IMAP4rev2 also provides the capability for an offline client to resynchronize with the server.</t>
              <t indent="0">IMAP4rev2 includes operations for creating, deleting, and renaming mailboxes; checking for new messages; removing messages permanently; setting and clearing flags; parsing per RFCs 5322, 2045, and 2231; searching; and selective fetching of message attributes, texts, and portions thereof. Messages in IMAP4rev2 are accessed by the use of numbers. These numbers are either message sequence numbers or unique identifiers.</t>
              <t indent="0">IMAP4rev2 does not specify a means of posting mail; this function is handled by a mail submission protocol such as the one specified in RFC 6409.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9051"/>
          <seriesInfo name="DOI" value="10.17487/RFC9051"/>
        </reference>
        <reference anchor="RFC9216" target="https://www.rfc-editor.org/info/rfc9216" quoteTitle="true" derivedAnchor="RFC9216">
          <front>
            <title>S/MIME Example Keys and Certificates</title>
            <author fullname="D. K. Gillmor" initials="D. K." role="editor" surname="Gillmor"/>
            <date month="April" year="2022"/>
            <abstract>
              <t indent="0">The S/MIME development community benefits from sharing samples of signed or encrypted data. This document facilitates such collaboration by defining a small set of X.509v3 certificates and keys for use when generating such samples.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9216"/>
          <seriesInfo name="DOI" value="10.17487/RFC9216"/>
        </reference>
        <reference anchor="RFC9219" target="https://www.rfc-editor.org/info/rfc9219" quoteTitle="true" derivedAnchor="RFC9219">
          <front>
            <title>S/MIME Signature Verification Extension to the JSON Meta Application Protocol (JMAP)</title>
            <author fullname="A. Melnikov" initials="A." surname="Melnikov"/>
            <date month="April" year="2022"/>
            <abstract>
              <t indent="0">This document specifies an extension to "The JSON Meta Application Protocol (JMAP) for Mail" (RFC 8621) for returning the S/MIME signature verification status.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9219"/>
          <seriesInfo name="DOI" value="10.17487/RFC9219"/>
        </reference>
        <reference anchor="RFC9580" target="https://www.rfc-editor.org/info/rfc9580" quoteTitle="true" derivedAnchor="RFC9580">
          <front>
            <title>OpenPGP</title>
            <author fullname="P. Wouters" initials="P." role="editor" surname="Wouters"/>
            <author fullname="D. Huigens" initials="D." surname="Huigens"/>
            <author fullname="J. Winter" initials="J." surname="Winter"/>
            <author fullname="Y. Niibe" initials="Y." surname="Niibe"/>
            <date month="July" year="2024"/>
            <abstract>
              <t indent="0">This document specifies the message formats used in OpenPGP. OpenPGP provides encryption with public key or symmetric cryptographic algorithms, digital signatures, compression, and key management.</t>
              <t indent="0">This document is maintained in order to publish all necessary information needed to develop interoperable applications based on the OpenPGP format. It is not a step-by-step cookbook for writing an application. It describes only the format and methods needed to read, check, generate, and write conforming packets crossing any network. It does not deal with storage and implementation questions. It does, however, discuss implementation issues necessary to avoid security flaws.</t>
              <t indent="0">This document obsoletes RFCs 4880 ("OpenPGP Message Format"), 5581 ("The Camellia Cipher in OpenPGP"), and 6637 ("Elliptic Curve Cryptography (ECC) in OpenPGP").</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9580"/>
          <seriesInfo name="DOI" value="10.17487/RFC9580"/>
        </reference>
        <reference anchor="I-D.ietf-jmap-smime-sender-extensions" target="https://datatracker.ietf.org/doc/html/draft-ietf-jmap-smime-sender-extensions-04" quoteTitle="true" derivedAnchor="SMIME-SENDER-EXTENSIONS">
          <front>
            <title>JMAP extension for S/MIME signing and encryption</title>
            <author fullname="Alexey Melnikov" initials="A." surname="Melnikov">
              <organization showOnFrontPage="true">Isode Ltd</organization>
            </author>
            <date day="3" month="August" year="2023"/>
            <abstract>
              <t indent="0">This document specifies an extension to JMAP for sending S/MIME signed and/or S/MIME encrypted messages, as well as automatic decryption of received S/MIME messages.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-jmap-smime-sender-extensions-04"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="SPOOFING" target="https://www.usenix.org/system/files/sec19-muller.pdf" quoteTitle="true" derivedAnchor="SPOOFING">
          <front>
            <title>"Johnny, you are fired!" - Spoofing OpenPGP and S/MIME Signatures in Emails</title>
            <author initials="J." surname="Müller" fullname="Jens Müller">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Brinkmann" fullname="Marcus Brinkmann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Poddebniak" fullname="Damian Poddebniak">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Böck" fullname="Hanno Böck">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Schinzel" fullname="Sebastian Schinzel">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Somorovsky" fullname="Juraj Somorovsky">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schwenk" fullname="Jörg Schwenk">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="August"/>
          </front>
          <refcontent>Proceedings of the 28th USENIX Security Symposium (USENIX Security 19), pp. 1011-1028</refcontent>
        </reference>
        <reference anchor="SRI" target="https://www.w3.org/TR/2016/REC-SRI-20160623/" quoteTitle="true" derivedAnchor="SRI">
          <front>
            <title>Subresource Integrity</title>
            <author initials="D." surname="Akhawe" fullname="Devdatta Akhawe"/>
            <author initials="F." surname="Braun" fullname="Frederik Braun"/>
            <author initials="F." surname="Marier" fullname="Francois Marier"/>
            <author initials="J." surname="Weinberger" fullname="Joel Weinberger"/>
            <date year="2016" month="June"/>
          </front>
          <refcontent>W3C Candidate Recommendation</refcontent>
          <annotation>Latest version available at <eref target="https://www.w3.org/TR/SRI/" brackets="angle"/>.</annotation>
        </reference>
        <reference anchor="I-D.koch-openpgp-webkey-service" target="https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service-20" quoteTitle="true" derivedAnchor="WEBKEY-SERVICE">
          <front>
            <title>OpenPGP Web Key Directory</title>
            <author fullname="Werner Koch" initials="W." surname="Koch">
              <organization showOnFrontPage="true">g10 Code GmbH</organization>
            </author>
            <date day="2" month="June" year="2025"/>
            <abstract>
              <t indent="0">This specification describes a service to locate OpenPGP keys by mail address using a Web service and the HTTPS protocol. It also provides a method for secure communication between the key owner and the mail provider to publish and revoke the public key.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-koch-openpgp-webkey-service-20"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="future-work" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-future-work">Future Work</name>
      <t indent="0" pn="section-appendix.a-1">This document contains useful guidance for MUA implementers, but it cannot contain all possible guidance.
Future revisions of this document may want to further explore the following topics, which are out of scope for this version.</t>
      <section anchor="webmail-threat-model" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.1">
        <name slugifiedName="name-webmail-threat-model">Webmail Threat Model</name>
        <t indent="0" pn="section-appendix.a.1-1">The webmail threat model for end-to-end cryptographic protections is significantly more complex than the classic MUA model.
For example, the web server hosting the webmail interface could be a potential adversary.
If the user treats the web server as a trusted party, but the web server violates that trust, the end-to-end cryptographic protections do not hold.</t>
        <t indent="0" pn="section-appendix.a.1-2">A future version of this document could include more detailed discussion of an adversarial threat model for end-to-end cryptographic protections in a webmail context.</t>
      </section>
      <section anchor="test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2">
        <name slugifiedName="name-test-vectors">Test Vectors</name>
        <t indent="0" pn="section-appendix.a.2-1">A future version of this document (or a companion document) could contain examples of well-formed and malformed messages using cryptographic key material and certificates from <xref target="RFC9580" format="default" sectionFormat="of" derivedContent="RFC9580"/> and <xref target="RFC9216" format="default" sectionFormat="of" derivedContent="RFC9216"/>.</t>
        <t indent="0" pn="section-appendix.a.2-2">It may also include example renderings of these messages.</t>
      </section>
      <section anchor="more-peer-certs" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3">
        <name slugifiedName="name-further-guidance-on-peer-ce">Further Guidance on Peer Certificates</name>
        <section anchor="peer-discovery-incoming" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.1">
          <name slugifiedName="name-certificate-discovery-from-">Certificate Discovery from Incoming Messages</name>
          <t indent="0" pn="section-appendix.a.3.1-1">As described in <xref target="sending-certificates" format="default" sectionFormat="of" derivedContent="Section 8.2.3"/>, an incoming email message may have one or more certificates embedded in it.
This document currently acknowledges that a rendering MUA should assemble a cache of certificates for future use, but providing more detailed guidance for how to assemble and manage that cache is currently out of scope.</t>
          <t indent="0" pn="section-appendix.a.3.1-2">Existing recommendations like <xref target="AUTOCRYPT" format="default" sectionFormat="of" derivedContent="AUTOCRYPT"/> provide some guidance for handling incoming certificates about peers but only in certain contexts.
A future version of this document may describe in more detail how these incoming certificates should be handled.</t>
        </section>
        <section anchor="peer-discovery--directory" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.2">
          <name slugifiedName="name-certificate-directories">Certificate Directories</name>
          <t indent="0" pn="section-appendix.a.3.2-1">Some MUAs may have the capability to look up peer certificates in a directory, for example, via the Lightweight Directory Access Protocol (LDAP) <xref target="RFC4511" format="default" sectionFormat="of" derivedContent="RFC4511"/>, Web Key Directory (WKD) <xref target="I-D.koch-openpgp-webkey-service" format="default" sectionFormat="of" derivedContent="WEBKEY-SERVICE"/>, or DNS (e.g., SMIMEA <xref target="RFC8162" format="default" sectionFormat="of" derivedContent="RFC8162"/> or OPENPGPKEY <xref target="RFC7929" format="default" sectionFormat="of" derivedContent="RFC7929"/> resource records).</t>
          <t indent="0" pn="section-appendix.a.3.2-2">A future version of this document may describe in more detail what sources an MUA should consider when searching for a peer's certificates and what to do with the certificates found by various methods.</t>
        </section>
        <section anchor="cert-revocation" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.3">
          <name slugifiedName="name-checking-for-certificate-re">Checking for Certificate Revocation</name>
          <t indent="0" pn="section-appendix.a.3.3-1">A future version of this document could discuss how/when to check for revocation of peer certificates or of the user's own certificate.</t>
          <t indent="0" pn="section-appendix.a.3.3-2">Such discussion should address privacy concerns: What information leaks to whom when checking peer certificate revocations?</t>
        </section>
        <section anchor="more-peer-cert-selection" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.4">
          <name slugifiedName="name-further-peer-certificate-se">Further Peer Certificate Selection</name>
          <t indent="0" pn="section-appendix.a.3.4-1">A future version of this document may describe more prescriptions for deciding whether a peer certificate is acceptable for encrypting a message.
For example, if the SPKI is an Elliptic Curve (EC) public key and the keyUsage extension is absent, what should the encrypting MUA do?</t>
          <t indent="0" pn="section-appendix.a.3.4-2">A future version of this document might also provide guidance on what to do if multiple certificates are all acceptable for encrypting to a given recipient.
For example, the composing MUA could select among them in some deterministic way; it could encrypt to all of them; or it could present them to the user to let the user select any or all of them.</t>
        </section>
        <section anchor="display-names" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.5">
          <name slugifiedName="name-human-readable-names-in-pee">Human-Readable Names in Peer Certificates, Header Fields, and Address Books</name>
          <t indent="0" pn="section-appendix.a.3.5-1">In header fields such as <tt>From</tt> that may contain a <tt>display-name</tt> as described in <xref section="3.4" sectionFormat="of" target="RFC5322" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5322#section-3.4" derivedContent="RFC5322"/>, a malicious composer (or interfering adversary) may populate the <tt>display-name</tt> part with a human-readable name that does not at all match the actual name of the participant.
<xref target="peer-cert-selection" format="default" sectionFormat="of" derivedContent="Section 8.1.1"/> describes some matching rules relating peer certificates to email addresses (the <tt>addr-spec</tt> part of these email header fields) but does not contemplate matching <tt>display-name</tt>s or other similar user-visible data elements.
<xref target="signature-failures" format="default" sectionFormat="of" derivedContent="Section 6.4"/> describes how signature validation should confirm a binding between the <tt>addr-spec</tt> and the certificate itself, but it also does not contemplate matching <tt>display-name</tt>s or other similar user-visible data elements.
Depending on how the rendering MUA renders the <tt>display-name</tt> in a message's header field, that unvalidated field may present a risk of user confusion, which could break the intended end-to-end assurances.
Yet both X.509 and OpenPGP certificate formats offer ways to provide cryptographically certified (though possibly not unique) comparable human-readable names.
Additionally, many MUAs also include an address book or comparable feature that can make substantive connections between user-relevant identity labels and email addresses.</t>
          <t indent="0" pn="section-appendix.a.3.5-2">A human-readable name like a <tt>display-name</tt> does not have the property of global uniqueness that an <tt>addr-spec</tt> does, so reasoning about human-readable names and rendering them to the user as an element in a system providing end-to-end cryptographic assurance requires additional deliberate analysis.</t>
          <t indent="0" pn="section-appendix.a.3.5-3">A future version of this document might offer strategies for associating human-readable names from certificates (and features like address books) to the rendering of header fields that include <tt>display-name</tt>.
Such guidance should be paired with an analysis of specific usability and security risks associated with these human-readable fields, as well as a description of how the recommended guidance mitigates those risks.</t>
        </section>
      </section>
      <section anchor="more-local-certs" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4">
        <name slugifiedName="name-further-guidance-on-local-c">Further Guidance on Local Certificates and Secret Keys</name>
        <section anchor="cross-mua-local-keys" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4.1">
          <name slugifiedName="name-cross-mua-sharing-of-local-">Cross-MUA Sharing of Local Certificates and Secret Keys</name>
          <t indent="0" pn="section-appendix.a.4.1-1">Many users today use more than one MUA to access the same mailbox (for example, one MUA on a mobile device and another MUA on a desktop computer).</t>
          <t indent="0" pn="section-appendix.a.4.1-2">A future version of this document might offer guidance on how multiple MUAs attached to the same mailbox can efficiently and securely share the user's own secret key material and certificates between each other.
This guidance should include suggestions on how to maintain the user's keys (e.g., avoiding certificate expiration) and safe secret key transmission.</t>
        </section>
        <section anchor="smartcards" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4.2">
          <name slugifiedName="name-use-of-smart-cards-or-other">Use of Smart Cards or Other Portable Secret Key Mechanisms</name>
          <t indent="0" pn="section-appendix.a.4.2-1">Rather than having to transfer secret key material between clients, some users may prefer to rely on portable hardware-backed secret keys in the form of smart cards, USB tokens, or other comparable form factors.
These secret keys sometimes require direct user interaction for each use, which can complicate the usability of any MUA that uses them to decrypt a large number of messages.</t>
          <t indent="0" pn="section-appendix.a.4.2-2">Guidance on the use of this kind of secret key management is beyond the scope of this document, but future revisions may bring them into scope.</t>
        </section>
        <section anchor="more-local-cert-maintenance" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4.3">
          <name slugifiedName="name-active-local-certificate-ma">Active Local Certificate Maintenance</name>
          <t indent="0" pn="section-appendix.a.4.3-1"><xref target="local-cert-maintenance" format="default" sectionFormat="of" derivedContent="Section 8.2.2"/> describes conditions where the MUA <bcp14>SHOULD</bcp14> warn the user that something is going wrong with their certificate.</t>
          <t indent="0" pn="section-appendix.a.4.3-2">A future version of this document might outline how an MUA could actively avoid these warning situations, for example, by automatically updating the certificate or prompting the user to take specific action.</t>
        </section>
      </section>
      <section anchor="cert-authorities" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.5">
        <name slugifiedName="name-certification-authorities">Certification Authorities</name>
        <t indent="0" pn="section-appendix.a.5-1">A future document could offer guidance on how an MUA should select and manage root CAs.</t>
        <t indent="0" pn="section-appendix.a.5-2">For example:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.a.5-3">
          <li pn="section-appendix.a.5-3.1">
            <t indent="0" pn="section-appendix.a.5-3.1.1">Should the MUA cache intermediate CAs?</t>
          </li>
          <li pn="section-appendix.a.5-3.2">
            <t indent="0" pn="section-appendix.a.5-3.2.1">Should the MUA share such a cache with other PKI clients (e.g., web browsers)?</t>
          </li>
          <li pn="section-appendix.a.5-3.3">
            <t indent="0" pn="section-appendix.a.5-3.3.1">What distinctions are there between a CA for S/MIME and a CA for the Web?</t>
          </li>
        </ul>
      </section>
      <section anchor="indexing-and-search" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.6">
        <name slugifiedName="name-indexing-and-search-of-encr">Indexing and Search of Encrypted Messages</name>
        <t indent="0" pn="section-appendix.a.6-1">A common use case for MUAs is the search of existing messages by keyword or topic.
This is done most efficiently for large mailboxes by assembling an index of message content rather than by a linear scan of all message content.</t>
        <t indent="0" pn="section-appendix.a.6-2">When message contents and header fields are encrypted, search by index is complicated.
If the cleartext is not indexed, then messages cannot be found by search.
On the other hand, if the cleartext is indexed, then the index effectively contains the sensitive contents of the message and needs to be protected.</t>
        <t indent="0" pn="section-appendix.a.6-3">Detailed guidance on the trade-off here, including choices about remote search vs. local search, are beyond the scope of this document, but a future version of the document may bring them into scope.</t>
      </section>
      <section anchor="cached-sigs" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.7">
        <name slugifiedName="name-cached-signature-validation">Cached Signature Validation</name>
        <t indent="0" pn="section-appendix.a.7-1">Asymmetric signature validation can be computationally expensive, and the results can also potentially vary over time (e.g., if a signing certificate is discovered to be revoked).
In some cases, the user may care about the signature validation that they saw when they first read or received the message, not only about the status of the signature verification at the current time.</t>
        <t indent="0" pn="section-appendix.a.7-2">So, for both performance reasons and historical perspective, it may be useful for an MUA to cache signature validation results in a way that they can be easily retrieved and compared.
Documenting how and when to cache signature validation, as well as how to indicate it to the user, is beyond the scope of this document, but a future version of the document may bring these topics into scope.</t>
      </section>
      <section anchor="aggregate-cryptographic-status" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8">
        <name slugifiedName="name-aggregate-cryptographic-sta">Aggregate Cryptographic Status</name>
        <t indent="0" pn="section-appendix.a.8-1">This document limits itself to consideration of the cryptographic status of single messages as a baseline concept that can be clearly and simply communicated to the user.
However, some users and some MUAs may find it useful to contemplate even higher-level views of cryptographic status, which are not considered directly here.</t>
        <t indent="0" pn="section-appendix.a.8-2">For example, a future version of the document may also consider how to indicate a simple cryptographic status of message threads (groups of explicitly related messages), conversations (groups of messages with shared sets of participants), peers, or other perspectives that an MUA can provide.</t>
      </section>
      <section anchor="expect-e2e" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.9">
        <name slugifiedName="name-expectations-of-cryptograph">Expectations of Cryptographic Protection</name>
        <t indent="0" pn="section-appendix.a.9-1">As mentioned in <xref target="security-indicators" format="default" sectionFormat="of" derivedContent="Section 2.3"/>, the types of security indicators displayed to the user may vary based on the expectations of the user for a given communication.
At present, there is no widely shared method for the MUA to establish and maintain reasonable expectations about whether a specific rendered message should have cryptographic protections.</t>
        <t indent="0" pn="section-appendix.a.9-2">If such a standard is developed, a future version of this document should reference it and encourage the deployment of clearer and simpler security indicators.</t>
      </section>
      <section anchor="secure-deletion" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.10">
        <name slugifiedName="name-secure-deletion">Secure Deletion</name>
        <t indent="0" pn="section-appendix.a.10-1">One feature many users desire from a secure communications medium is the ability to reliably destroy a message such that it cannot be recovered even by a determined adversary.
In other contexts, a similar desired property is called "forward secrecy".
Doing this with standard email mechanisms such as S/MIME and PGP/MIME is challenging because of two interrelated factors:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.a.10-2">
          <li pn="section-appendix.a.10-2.1">
            <t indent="0" pn="section-appendix.a.10-2.1.1">A copy of an email message may be retained by any of the mail transport agents that handle it during delivery.</t>
          </li>
          <li pn="section-appendix.a.10-2.2">
            <t indent="0" pn="section-appendix.a.10-2.2.1">The secret key used to decrypt an encrypted email message is typically retained indefinitely.</t>
          </li>
        </ul>
        <t indent="0" pn="section-appendix.a.10-3">This means that an adversary aiming to recover the cleartext contents of a deleted message can do so by getting access to a copy of the encrypted message and the long-term secret key material.</t>
        <t indent="0" pn="section-appendix.a.10-4">Some mitigation measures may be available to make it possible to delete some encrypted messages securely, but this document considers this use case out of scope.
A future version of the document may elaborate on secure message deletion in more detail.</t>
      </section>
      <section anchor="interaction-with-opportunistic-encryption" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.11">
        <name slugifiedName="name-interaction-with-opportunis">Interaction with Opportunistic Encryption</name>
        <t indent="0" pn="section-appendix.a.11-1">This document focuses on guidance for strong, user-comprehensible end-to-end cryptographic protections for email.
Other approaches are possible, including various forms of opportunistic and transport encryption, which are out of scope for this document.</t>
        <t indent="0" pn="section-appendix.a.11-2">A future version of this document could describe the interaction between this guidance and more opportunistic forms of encryption, for example, some of the scenarios contemplated in <xref target="I-D.dkg-mail-cleartext-copy" format="default" sectionFormat="of" derivedContent="CLEARTEXT-COPY"/>.</t>
      </section>
      <section anchor="split-attachments" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.12">
        <name slugifiedName="name-split-attachments">Split Attachments</name>
        <t indent="0" pn="section-appendix.a.12-1">As noted in <xref target="attachments" format="default" sectionFormat="of" derivedContent="Section 7.2"/>, the standard form for encrypted email messages is a single Cryptographic Envelope.
In a scenario where multiple user agents are drafting a single encrypted message over low-bandwidth links, this can create a poor user experience, as each MUA has to retrieve the full message, including attachments, to modify the draft.
Similarly, when retrieving a message with a large attachment, the receiving MUA might want to only render the Main Body Part and will have a significant delay in doing so if required to process the full message before handling.</t>
        <t indent="0" pn="section-appendix.a.12-2">Future work might include an attempt to standardize a mechanism that eases this use case, potentially at the risk of additional metadata leakage about the message (e.g., the size and number of message parts).
Any such work should explicitly try to minimize the risks and concerns described in <xref target="attachments" format="default" sectionFormat="of" derivedContent="Section 7.2"/>.</t>
      </section>
      <section anchor="proxy-extensions" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.13">
        <name slugifiedName="name-proxy-extensions">Proxy Extensions</name>
        <t indent="0" pn="section-appendix.a.13-1">As noted in <xref target="proxy-dangers" format="default" sectionFormat="of" derivedContent="Section 9.7"/>, a proxy-based implementation can be a tempting approach.
But its naive form is likely to be insufficient to provide safe end-to-end encrypted email.</t>
        <t indent="0" pn="section-appendix.a.13-2">A future version of this document, or a separate but related document, could try to outline the specific additional information, state, and network API surface that would be needed to allow an MUA to be safely integrated with an encryption provider.
Any such work should try to address the potential problems described in <xref target="proxy-dangers" format="default" sectionFormat="of" derivedContent="Section 9.7"/>.</t>
      </section>
      <section anchor="mailing-lists" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.14">
        <name slugifiedName="name-mailing-lists">Mailing Lists</name>
        <t indent="0" pn="section-appendix.a.14-1">Mailing lists offer challenging complications to any notion of end-to-end cryptographic protections.
By default, there is some sort of intervening MUA (see <xref target="intervening-mua" format="default" sectionFormat="of" derivedContent="Section 9.8"/>), but more than that, user expectations about cryptographic protections might differ from normal messages, at least insofar as they understand they are writing to a mailing list.
A particular challenge to the notion of end-to-end cryptographic security with mailing lists is that a subscriber to a mailing list often does not know who else is subscribed to the mailing list.
Another challenge is that, for some mailing lists, some subscribers might not have a valid, non-expired certificate.</t>
        <t indent="0" pn="section-appendix.a.14-2">Encryption can interact with mailing lists in different ways, depending on the use case of the list.
It's not clear that there are any useful motivations for sending encrypted mail to a publicly archived mailing list.
But an unarchived mailing list might want to provide confidentiality between all recipients, even if the recipients don't know for certain who all the other participants are.
Or a mailing list with private archives might well decide that two "hops" of encryption (between the composer and the mailing list, and the mailing list and all the subscribers) are useful confidentiality measures even though they are not "end-to-end" in the sense of the composer directly to all recipients.</t>
        <t indent="0" pn="section-appendix.a.14-3">Similarly, cryptographic signatures may play different roles in a mailing list, depending on the list's communication goals.
The mailing list itself might want to verify that an incoming message is cryptographically signed by an authorized sender before redistribution to the list subscribers.
It might also want to pass along the composer's signature in a way that the subscribers can all verify it.
Alternately, the mailing list might want to sign each redistributed message itself and change the message so it appears to come from the list rather than the original composer.</t>
        <t indent="0" pn="section-appendix.a.14-4">Yet another design for a mailing list with end-to-end cryptographic protections might involve redistributing shared secret keys to all recipients or using some sort of proxied re-encryption scheme, similar to <xref target="I-D.wussler-openpgp-forwarding" format="default" sectionFormat="of" derivedContent="OPENPGP-FORWARDING"/>.</t>
        <t indent="0" pn="section-appendix.a.14-5">A future version of this document, or a separate but related document, might describe some of these trade-offs and provide guidance for safely meeting common requirements or use cases when combining end-to-end cryptographic protections with mailing lists.</t>
      </section>
    </section>
    <section anchor="acknowledgements" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.b-1">The set of constructs and recommendations in this document are
      derived from discussions with many different implementers, including
      <contact fullname="Bjarni Rúnar Einarsson"/>, <contact fullname="Daniel       Huigens"/>, <contact fullname="David Bremner"/>, <contact fullname="Deb       Cooley"/>, <contact fullname="Eliot Lear"/>, <contact fullname="Fabian       Ising"/>, <contact fullname="Heiko Schaefer"/>, <contact fullname="Holger Krekel"/>, <contact fullname="Jameson Rollins"/>,
      <contact fullname="John Levine"/>, <contact fullname="Jonathan       Hammell"/>, <contact fullname="juga"/>, <contact fullname="Patrick       Brunschwig"/>, <contact fullname="Paul Kyzivat"/>, <contact fullname="Pete Resnick"/>, <contact fullname="Roman Danyliw"/>, <contact fullname="Santosh Chokhani"/>, <contact fullname="Stephen Farrell"/>,
      <contact fullname="Thore Göbel"/>, and <contact fullname="Vincent       Breitmoser"/>.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="D. K." surname="Gillmor" fullname="Daniel Kahn Gillmor" role="editor">
        <organization abbrev="ACLU" showOnFrontPage="true">American Civil Liberties Union</organization>
        <address>
          <postal>
            <street>125 Broad St.</street>
            <city>New York</city>
            <region>NY</region>
            <code>10004</code>
            <country>United States of America</country>
          </postal>
          <email>dkg@fifthhorseman.net</email>
        </address>
      </author>
      <author initials="A." surname="Melnikov" fullname="Alexey Melnikov" role="editor">
        <organization showOnFrontPage="true">Isode Ltd</organization>
        <address>
          <postal>
            <street>14 Castle Mews</street>
            <city>Hampton, Middlesex</city>
            <code>TW12 2NP</code>
            <country>United Kingdom</country>
          </postal>
          <email>alexey.melnikov@isode.com</email>
        </address>
      </author>
      <author initials="B." surname="Hoeneisen" fullname="Bernie Hoeneisen" role="editor">
        <organization showOnFrontPage="true">pEp Project</organization>
        <address>
          <postal>
            <street>Oberer Graben 4</street>
            <city>Winterthur</city>
            <code>8400</code>
            <country>Switzerland</country>
          </postal>
          <email>bernie@ietf.hoeneisen.ch</email>
          <uri>https://pep-project.org/</uri>
        </address>
      </author>
    </section>
  </back>
</rfc>
