<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-hoypat-httpbis-message-signatures-ekm-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title>HTTP Signature Component for TLS Channel Binding</title>
    <seriesInfo name="Internet-Draft" value="draft-hoypat-httpbis-message-signatures-ekm-00"/>
    <author fullname="Jonathan Hoyland">
      <organization/>
      <address>
        <email>jonathan.hoyland@gmail.com</email>
      </address>
    </author>
    <author fullname="Christopher Patton">
      <organization>Cloudflare</organization>
      <address>
        <email>chrispatton+ietf@gmail.com</email>
      </address>
    </author>
    <date year="2025" month="October" day="20"/>
    <area>Web and Internet Transport</area>
    <workgroup>HTTP</workgroup>
    <keyword>next generation</keyword>
    <keyword>unicorn</keyword>
    <keyword>sparkling distributed ledger</keyword>
    <abstract>
      <?line 41?>

<t>A derived component is specified for HTTP Message Signatures that binds the
signature to the underlying secure channel (TLS over TCP or QUIC), thereby
ensuring a signed message transmitted over one channel cannot be retransmitted
over another. The component consists of key material exported from TLS.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://cjpatton.github.io/draft-hoypat-httpbis-message-signatures-ekm/draft-hoypat-httpbis-message-signatures-ekm.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-hoypat-httpbis-message-signatures-ekm/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        HTTP Working Group mailing list (<eref target="mailto:ietf-http-wg@w3.org"/>),
        which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/cjpatton/draft-hoypat-httpbis-message-signatures-ekm"/>.</t>
    </note>
  </front>
  <middle>
    <?line 48?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>HTTP Message Signatures <xref target="RFC9421"/> allow various components of an HTTP
message to the authenticated by the sender either using a digital signature or
a message authentication code (MAC). The exact set of components to be signed
may very depending upon the application:</t>
      <ol spacing="normal" type="1"><li>
          <t>the components that need to be signed depend on the security considerations
of the application; and</t>
        </li>
        <li>
          <t>some components of the message may not available at the time of signing or
verification.</t>
        </li>
      </ol>
      <t>To accommodate these limitations, HTTP Message Signatures defines a number of
HTTP Message Components (<xref section="2" sectionFormat="of" target="RFC9421"/>) and specifies rules for
transforming components into the input to the signature algorithm (<xref section="3.1" sectionFormat="of" target="RFC9421"/>). The value of most components are extracted directly from
the bytes of the HTTP message; others are derived from the message through a
well-specified process.</t>
      <t>All components are derived from the HTTP messages themselves. Consequentially,
an on-path attacker with access to the HTTP messages transmitted between the
client and server can replay a signed message at will. This is described in
<xref section="7.2.2" sectionFormat="of" target="RFC9421"/>.</t>
      <t>The <tt>nonce</tt> parameter provides some defense against replay attacks, but this
mechanism is not applicable in all deployment scenarios. For example, it is
common for two TLS servers to be authoritative for the same DNS name. (This
setup is commonly referred to as "multi-CDN".) In this scenario, the first
server can intercept a signed request from a client, then replay that request
to the second server, thereby impersonating the client.</t>
      <t>The goal of this document is to make replay protection more robust. A new
derived component is defined for HTTP Message Signatures whose value is set to
key material exported from TLS as defined in <xref section="7.5" sectionFormat="of" target="RFC8446"/>. This
binds the signed message to the underlying TLS channel, thereby ensuring the
signature is never accepted outside of that channel.</t>
      <ul empty="true">
        <li>
          <t>OPEN ISSUE Would it be better do define exported key material as a signature
parameter instead of as a derived component?</t>
        </li>
      </ul>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>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"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="the-ekm-derived-component">
      <name>The <tt>@ekm</tt> Derived Component</name>
      <t>A new derived component is defined with the name <tt>@ekm</tt>.</t>
      <t>The contents of this component are the output of a call to the exporter
interface of the underlying TLS connection as defined in <xref section="7.5" sectionFormat="of" target="RFC8446"/>, encoded in base64 <xref target="RFC4648"/>. The label parameter of the exporter
function is set to "http-sig-ekm" and the context value is the version of TLS.
For TLS 1.3 (i.e., <xref target="RFC8446"/>) its value is <tt>0x0304</tt>.</t>
      <t>TLS 1.3 or later is <bcp14>REQUIRED</bcp14>. This derived component is not compatible with
HTTP messages sent in plaintext or over TLS 1.2 and below.</t>
      <ul empty="true">
        <li>
          <t>NOTE We could in principal specify this for TLS 1.2, if we need to.</t>
        </li>
      </ul>
      <t>If the signer and verifier do not agree on the value of <tt>@ekm</tt>, then the
signature will not verify. If the signer and verifier share a TLS connection
between them, then they will compute the same value. If they do not share a
direct TLS connection, it is possible to architect a system such that the
verifier does not directly call the exporter interface, but is simply provided
its output on a trusted channel. This behaviour works, but requires the
verifier and caller to trust each other.</t>
      <ul empty="true">
        <li>
          <t>OPEN ISSUE How do we negotiate usage of <tt>@ekm</tt>? Both the signer and verifier
need to support the new derived component into generate message signatures
that use it, but the signer might not know if the verifier uses it.</t>
        </li>
      </ul>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <ul empty="true">
        <li>
          <t>TODO Define a channel binding and say why it prevents replays between CDNs.</t>
        </li>
      </ul>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <ul empty="true">
        <li>
          <t>TODO Update the "HTTP Signature Derived Component Names" registry.</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC9421">
        <front>
          <title>HTTP Message Signatures</title>
          <author fullname="A. Backman" initials="A." role="editor" surname="Backman"/>
          <author fullname="J. Richer" initials="J." role="editor" surname="Richer"/>
          <author fullname="M. Sporny" initials="M." surname="Sporny"/>
          <date month="February" year="2024"/>
          <abstract>
            <t>This document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes over components of an HTTP message. This mechanism supports use cases where the full HTTP message may not be known to the signer and where the message may be transformed (e.g., by intermediaries) before reaching the verifier. This document also describes a means for requesting that a signature be applied to a subsequent HTTP message in an ongoing HTTP exchange.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9421"/>
        <seriesInfo name="DOI" value="10.17487/RFC9421"/>
      </reference>
      <reference anchor="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>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>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="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>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="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>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="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>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>
    </references>
    <?line 148?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA5VY63LbuBX+j6dAlT/J1qKvzWa92ySKbNfu+NZYnsxOpzMB
SUjCmiRYAJTCevIufZY+Wb8D8CbZyUz+6AIC5/qd7xxwPB4zp1wmj/nofDa7
5XdqUQhXGcmnOi91IQvH59rw2eUdny5FUciMf1BFqorFiCXCyYU29TFXxVwz
luqkEDlkpUbM3Xip61Lgy7kyVnacS2vFQo5tq8KO5U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