<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" docName="draft-farrell-tls-pemesni-13" number="9934" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" consensus="true" prepTime="2026-03-04T16:24:48" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-farrell-tls-pemesni-13" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9934" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="PEM File Format for ECH">Privacy-Enhanced Mail (PEM) File Format for Encrypted ClientHello (ECH)</title>
    <seriesInfo name="RFC" value="9934" stream="IETF"/>
    <author fullname="Stephen Farrell" initials="S." surname="Farrell">
      <organization showOnFrontPage="true">Trinity College Dublin</organization>
      <address>
        <postal>
          <city>Dublin</city>
          <code>2</code>
          <country>Ireland</country>
        </postal>
        <phone>+353-1-896-2354</phone>
        <email>stephen.farrell@cs.tcd.ie</email>
      </address>
    </author>
    <date month="03" year="2026"/>
    <area>Security Area</area>
    <keyword>TLS</keyword>
    <keyword>ESNI</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">
            Encrypted ClientHello (ECH) key pairs need to be configured into TLS
            servers, which can be built using different TLS libraries.
            This document specifies a standard file format for this purpose,
            similar to how RFC 7468 defines other Privacy-Enhanced Mail (PEM) file formats.
      </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 is an Internet Standards Track document.
        </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).  Further
            information on Internet Standards is available in 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/rfc9934" 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) 2026 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" keepWithNext="true" 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>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" keepWithNext="true" 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-terminology">Terminology</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" keepWithNext="true" 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-echconfig-file">ECHConfig File</xref></t>
          </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-security-considerations">Security Considerations</xref></t>
          </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-iana-considerations">IANA Considerations</xref></t>
          </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-references">References</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-normative-references">Normative References</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-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">Encrypted ClientHello (ECH)
            <xref target="RFC9849" format="default" sectionFormat="of" derivedContent="RFC9849"/> for TLS1.3 <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>
            defines a confidentiality mechanism for server names and other ClientHello
            content in TLS.
            That requires publication of an ECHConfigList data structure in an HTTPS or SVCB RR
            <xref target="RFC9460" format="default" sectionFormat="of" derivedContent="RFC9460"/> in the DNS.
            An ECHConfigList can contain one or more ECHConfig values.
            An ECHConfig structure contains the public component of a key pair
            that will typically be periodically (re-)generated by some key manager
            for a TLS server.
            TLS servers then need to be configured to use these key pairs,
            and given that various TLS servers can be built with different
            TLS libraries, there is a benefit in having a standard format for
            ECH key pairs and configs, just as was done with <xref target="RFC7468" format="default" sectionFormat="of" derivedContent="RFC7468"/>.
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-terminology">Terminology</name>
      <t indent="0" pn="section-2-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>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-echconfig-file">ECHConfig File</name>
      <t indent="0" pn="section-3-1">A PEM ECH file contains zero or one private key and one encoded ECHConfigList.</t>
      <t indent="0" pn="section-3-2">The public and private keys <bcp14>MUST</bcp14> both
              be PEM encoded <xref target="RFC7468" format="default" sectionFormat="of" derivedContent="RFC7468"/>.
              The file contains the concatenation of the PEM encoding
              of the private key (if present) followed by the PEM encoding of the public key(s) as
              an ECHConfigList.
              When a private key is present, the ECHConfigList <bcp14>MUST</bcp14> contain an ECHConfig that matches the private key.
              The private key <bcp14>MUST</bcp14> be encoded as a PKCS #8 PrivateKey <xref target="RFC7468" format="default" sectionFormat="of" derivedContent="RFC7468"/>.
              The public
              key(s) <bcp14>MUST</bcp14> be the base64-encoded form (see <xref target="RFC4648" section="4" format="default" sectionFormat="of" derivedLink="https://rfc-editor.org/rfc/rfc4648#section-4" derivedContent="RFC4648"/>) of an ECHConfigList value that
                  can be published in the DNS using an HTTPS RR as described in
              <xref target="RFC9848" format="default" sectionFormat="of" derivedContent="RFC9848"/>.
              The string "ECHCONFIG" <bcp14>MUST</bcp14> be used in the PEM
                  file delimiter for the public key.</t>
      <t indent="0" pn="section-3-3">Any content after the PEM encoded ECHConfigList <bcp14>SHOULD</bcp14> be ignored.</t>
      <t indent="0" pn="section-3-4"><xref target="sample" format="default" sectionFormat="of" derivedContent="Figure 1"/> shows an example ECHConfig PEM File</t>
      <figure anchor="sample" align="left" suppress-title="false" pn="figure-1">
        <name slugifiedName="name-example-echconfig-pem-file">Example ECHConfig PEM File</name>
        <artwork name="" type="" align="left" alt="" pn="section-3-5.1">
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VuBCIEICjd4yGRdsoP9gU7YT7My8DHx1Tjme8GYDXrOMCi8v1V
-----END PRIVATE KEY-----
-----BEGIN ECHCONFIG-----
AD7+DQA65wAgACA8wVN2BtscOl3vQheUzHeIkVmKIiydUhDCliA4iyQRCwAEAAEA
AQALZXhhbXBsZS5jb20AAA==
-----END ECHCONFIG-----</artwork>
      </figure>
      <t indent="0" pn="section-3-6">
                If the above ECHConfigList were published in the DNS for
                foo.example.com, then one could access that as shown
                in <xref target="dig" format="default" sectionFormat="of" derivedContent="Figure 2"/>.
      </t>
      <figure anchor="dig" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-use-of-dig-to-get-the-echco">Use of Dig to Get the ECHConfigList from DNS</name>
        <artwork name="" type="" align="left" alt="" pn="section-3-7.1">
$ dig +short HTTPS foo.example.com
1 . ech=AD7+DQA65wAgACA8wVN2BtscOl3vQheUzHeIkVmKIiydUhDCliA4iyQR
wAEAAEAAQALZXhhbXBsZS5jb20AAA==</artwork>
      </figure>
      <t indent="0" pn="section-3-8">
                TLS servers using this file format might configure
                multiple file names as part of their overall configuration,
                if, for example, only the ECHConfigList values
                from a subset of those files are to be used as the value for
                retry_configs in the ECH fallback scenario.
      </t>
      <t indent="0" pn="section-3-9">
                The ECHConfigList in a PEM file might contain more than one
                ECHConfig if, for example, those ECHConfig values contain
                different extensions or different public_name
                values. Consistent with <xref target="RFC9849" format="default" sectionFormat="of" derivedContent="RFC9849"/>,
                the ECHConfig values within an ECHConfigList appear in
                decreasing order of preference. If the
                ECHConfigList value is to be used as the retry_configs value,
                then that might contain different public keys. (Nonetheless,
                when a private key is present, that <bcp14>MUST</bcp14> match the public key
                from one of the ECHConfig values.)
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-4-1">Storing cryptographic keys in files leaves them vulnerable should
            anyone get read access to the filesystem on which they are stored.
            The same protection mechanisms that would be used for a server's PEM-encoded HTTPS certificate private key should be used for the PEM ECH
            configuration.
      </t>
      <t indent="0" pn="section-4-2">
                The security considerations of <xref target="RFC9848" format="default" sectionFormat="of" derivedContent="RFC9848"/>
                apply when retrieving an ECHConfigList from the DNS.
      </t>
      <t indent="0" pn="section-4-3">
                For clarity, only the ECHConfigList is to be published
                in the DNS - the private key from an ECH PEM file <bcp14>MUST NOT</bcp14> be published in the DNS.
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-5-1">This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references pn="section-6">
      <name slugifiedName="name-references">References</name>
      <references pn="section-6.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="RFC4648" target="https://www.rfc-editor.org/info/rfc4648" quoteTitle="true" derivedAnchor="RFC4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
            <abstract>
              <t indent="0">This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC7468" target="https://www.rfc-editor.org/info/rfc7468" quoteTitle="true" derivedAnchor="RFC7468">
          <front>
            <title>Textual Encodings of PKIX, PKCS, and CMS Structures</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <author fullname="S. Leonard" initials="S." surname="Leonard"/>
            <date month="April" year="2015"/>
            <abstract>
              <t indent="0">This document describes and discusses the textual encodings of the Public-Key Infrastructure X.509 (PKIX), Public-Key Cryptography Standards (PKCS), and Cryptographic Message Syntax (CMS). The textual encodings are well-known, are implemented by several applications and libraries, and are widely deployed. This document articulates the de facto rules by which existing implementations operate and defines them so that future implementations can interoperate.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7468"/>
          <seriesInfo name="DOI" value="10.17487/RFC7468"/>
        </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="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t indent="0">This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t indent="0">This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="RFC9849" target="https://www.rfc-editor.org/info/rfc9849" quoteTitle="true" derivedAnchor="RFC9849">
          <front>
            <title>TLS Encrypted Client Hello</title>
            <author initials="E." surname="Rescorla" fullname="Eric Rescorla">
              <organization showOnFrontPage="true">Independent</organization>
            </author>
            <author initials="K." surname="Oku" fullname="Kazuho Oku">
              <organization showOnFrontPage="true">Fastly</organization>
            </author>
            <author initials="N." surname="Sullivan" fullname="Nick Sullivan">
              <organization showOnFrontPage="true">Cryptography Consulting LLC</organization>
            </author>
            <author initials="C. A." surname="Wood" fullname="Christopher A. Wood">
              <organization showOnFrontPage="true">Cloudflare</organization>
            </author>
            <date month="March" year="2026"/>
          </front>
          <seriesInfo name="RFC" value="9849"/>
          <seriesInfo name="DOI" value="10.17487/RFC9849"/>
        </reference>
      </references>
      <references pn="section-6.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="RFC9460" target="https://www.rfc-editor.org/info/rfc9460" quoteTitle="true" derivedAnchor="RFC9460">
          <front>
            <title>Service Binding and Parameter Specification via the DNS (SVCB and HTTPS Resource Records)</title>
            <author fullname="B. Schwartz" initials="B." surname="Schwartz"/>
            <author fullname="M. Bishop" initials="M." surname="Bishop"/>
            <author fullname="E. Nygren" initials="E." surname="Nygren"/>
            <date month="November" year="2023"/>
            <abstract>
              <t indent="0">This document specifies the "SVCB" ("Service Binding") and "HTTPS" DNS resource record (RR) types to facilitate the lookup of information needed to make connections to network services, such as for HTTP origins. SVCB records allow a service to be provided from multiple alternative endpoints, each with associated parameters (such as transport protocol configuration), and are extensible to support future uses (such as keys for encrypting the TLS ClientHello). They also enable aliasing of apex domains, which is not possible with CNAME. The HTTPS RR is a variation of SVCB for use with HTTP (see RFC 9110, "HTTP Semantics"). By providing more information to the client before it attempts to establish a connection, these records offer potential benefits to both performance and privacy.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9460"/>
          <seriesInfo name="DOI" value="10.17487/RFC9460"/>
        </reference>
        <reference anchor="RFC9848" target="https://www.rfc-editor.org/info/rfc9848" quoteTitle="true" derivedAnchor="RFC9848">
          <front>
            <title>Bootstrapping TLS Encrypted ClientHello with DNS Service Bindings</title>
            <author fullname="Benjamin M. Schwartz" initials="B." surname="Schwartz">
              <organization showOnFrontPage="true">Meta Platforms, Inc.</organization>
            </author>
            <author fullname="Mike Bishop" initials="M." surname="Bishop">
              <organization showOnFrontPage="true">Akamai Technologies</organization>
            </author>
            <author fullname="Erik Nygren" initials="E." surname="Nygren">
              <organization showOnFrontPage="true">Akamai Technologies</organization>
            </author>
            <date month="March" year="2026"/>
          </front>
          <seriesInfo name="RFC" value="9848"/>
        </reference>
      </references>
    </references>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.a-1">Thanks to <contact fullname="Daniel McCarney"/>, <contact fullname="Jim Reid"/>, and <contact fullname="Peter Yee"/> for
      comments.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author fullname="Stephen Farrell" initials="S." surname="Farrell">
        <organization showOnFrontPage="true">Trinity College Dublin</organization>
        <address>
          <postal>
            <city>Dublin</city>
            <code>2</code>
            <country>Ireland</country>
          </postal>
          <phone>+353-1-896-2354</phone>
          <email>stephen.farrell@cs.tcd.ie</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
