<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.26 (Ruby 2.6.4) -->
<?rfc tocindent="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc docmapping="yes"?>
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>
<rfc xmlns:x="http://purl.org/net/xml2rfc/ext"
     category="std"
     consensus="true"
     docName="draft-ietf-httpbis-digest-headers-08"
     ipr="trust200902"
     obsoletes="3230"
     sortRefs="true"
     symRefs="true"
     tocInclude="true">
   <x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22\&amp;amp;body=%3c{ref}%3e:"/>
   <front>
      <title>Digest Fields</title>
      <author fullname="Roberto Polli" initials="R." surname="Polli">
         <organization>Team Digitale, Italian Government</organization>
         <address>
            <postal>
               <country>Italy</country>
            </postal>
            <email>robipolli@gmail.com</email>
         </address>
      </author>
      <author fullname="Lucas Pardue" initials="L." surname="Pardue">
         <organization>Cloudflare</organization>
         <address>
            <email>lucaspardue.24.7@gmail.com</email>
         </address>
      </author>
      <date day="21" month="March" year="2022"/>
      <area>Applications and Real-Time</area>
      <workgroup>HTTP</workgroup>
      <keyword>Digest</keyword>
      <abstract>
         <t>This document defines HTTP fields that support integrity digests. The Repr-Digest field can be used for the integrity of HTTP representations. The Content-Digest field can be used for the integrity of HTTP message content. Want-Repr-Digest and Want-Content-Digest can be used to indicate a sender's interest and preferences for receiving the respective Integrity fields.</t>
         <t>This document obsoletes RFC 3230 and the Digest and Want-Digest HTTP fields.</t>
      </abstract>
      <note removeInRFC="true" title="About This Document">
         <t>Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-httpbis-digest-headers/"/>.</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/"/>. Working Group information can be found at <eref target="https://httpwg.org/"/>.</t>
         <t>Source for this draft and an issue tracker can be found at <eref target="https://github.com/httpwg/http-extensions/labels/digest-headers"/>.</t>
      </note>
   </front>
   <middle>
      <section anchor="introduction">
         <name>Introduction</name>
         <t>HTTP does not define the means to protect the data integrity of representations or content. When HTTP messages are transferred between endpoints, lower layer features or properties such as TCP checksums or TLS records <xref target="RFC2818"/> can provide some integrity protection. However, transport-oriented integrity provides a limited utility because it is opaque to the application layer and only covers the extent of a single connection. HTTP messages often travel over a chain of separate connections, in between connections there is a possibility for unintended or malicious data corruption. An HTTP integrity mechanism can provide the means for endpoints, or applications using HTTP, to detect data corruption and make a choice about how to act on it. An example use case is to aid fault detection and diagnosis across system boundaries.</t>
         <t>This document defines two digest integrity mechanisms for HTTP. First, representation data integrity, which acts on representation data (<xref section="3.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor representations?><?aug-title Representations?></xref>). This supports advanced use cases such as validating the integrity of a resource that was reconstructed from parts retrieved using multiple requests or connections. Second, content integrity, which acts on conveyed content (<xref section="6.4" sectionFormat="of" target="SEMANTICS"><?aug-anchor content?><?aug-title Content?></xref>).</t>
         <t>This document obsoletes RFC 3230 and therefore the Digest and Want-Digest HTTP fields; see <xref target="obsolete-3230"/>.</t>
         <section anchor="document-structure">
            <name>Document Structure</name>
            <t>This document is structured as follows:</t>
            <t>
               <list style="symbols">
                  <t>
                     <xref target="representation-digest"/> defines the Repr-Digest request and response header and trailer field,</t>
                  <t>
                     <xref target="content-digest"/> defines the Content-Digest request and response header and trailer field,</t>
                  <t>
                     <xref target="want-fields"/> defines the Want-Repr-Digest and Want-Content-Digest request and response header and trailer field,</t>
                  <t>
                     <xref target="algorithms"/> describes algorithms and their relation to the fields defined in this document,</t>
                  <t>
                     <xref target="state-changing-requests"/> details computing representation digests,</t>
                  <t>
                     <xref target="examples-unsolicited"/> and <xref target="examples-solicited"/> provide examples of using Repr-Digest and Want-Repr-Digest.</t>
               </list>
            </t>
         </section>
         <section anchor="concept-overview">
            <name>Concept Overview</name>
            <t>The HTTP fields defined in this document can be used for HTTP integrity. Senders choose a hashing algorithm and calculate a digest from an input related to the HTTP message, the algorithm identifier and digest are transmitted in an HTTP field. Receivers can validate the digest for integrity purposes. Hashing algorithms are registered in the "Hash Algorithms for HTTP Digest Fields" (see <xref target="algorithms"/>).</t>
            <t>Selecting the data on which digests are calculated depends on the use case of HTTP messages. This document provides different headers for HTTP representation data and HTTP content.</t>
            <t>This document defines the <spanx style="verb">Repr-Digest</spanx> request and response header and trailer field (<xref target="representation-digest"/>) that contains a digest value computed by applying a hashing algorithm to "selected representation data" (<xref section="3.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor representations?><?aug-title Representations?></xref>). Basing <spanx style="verb">Repr-Digest</spanx> on the selected representation makes it straightforward to apply it to use-cases where the transferred data requires some sort of manipulation to be considered a representation or conveys a partial representation of a resource, such as Range Requests (see <xref section="14.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor field.range?><?aug-title Range?></xref>).</t>
            <t>There are use-cases where a simple digest of the HTTP content bytes is required. The <spanx style="verb">Content-Digest</spanx> request and response header and trailer field is defined to support digests of content (<xref section="3.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor representations?><?aug-title Representations?></xref>); see <xref target="content-digest"/>.</t>
            <t>
               <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digest</spanx> support hashing algorithm agility. The <spanx style="verb">Want-Repr-Digest</spanx> and <spanx style="verb">Want-Content-Digest</spanx> fields allows endpoints to express interest in <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digest</spanx> respectively, and preference of algorithms in either.</t>
            <t>
               <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digest</spanx> are collectively termed Integrity fields. <spanx style="verb">Want-Repr-Digest</spanx> and <spanx style="verb">Want-Content-Digest</spanx>are collectively termed Integrity preference fields.</t>
            <t>Integrity fields are tied to the <spanx style="verb">Content-Encoding</spanx> and <spanx style="verb">Content-Type</spanx> header fields. Therefore, a given resource may have multiple different digest values when transferred with HTTP.</t>
            <t>Integrity fields do not provide integrity for HTTP messages or fields. However, they can be combined with other mechanisms that protect metadata, such as digital signatures, in order to protect the phases of an HTTP exchange in whole or in part.</t>
            <t>This specification does not define means for authentication, authorization or privacy.</t>
         </section>
         <section anchor="obsolete-3230">
            <name>Obsoleting RFC 3230</name>
            <t>
               <xref target="RFC3230"/> defined the <spanx style="verb">Digest</spanx> and <spanx style="verb">Want-Digest</spanx> HTTP fields for HTTP integrity. It also coined the term "instance" and "instance manipulation" in order to explain concepts that are now more universally defined, and implemented, as HTTP semantics such as "selected representation data" (<xref section="3.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor representations?><?aug-title Representations?></xref>).</t>
            <t>Experience has shown that implementations of <xref target="RFC3230"/> have interpreted the meaning of "instance" inconsistently, leading to interoperability issues. The most common mistake being the calculation of the digest using (what we now call) message content, rather than using (what we now call) representation data as was originally intended. Interestingly, time has also shown that a digest of message content can be beneficial for some use cases. So it is difficult to detect if non-conformance to <xref target="RFC3230"/> is intentional or unintentional.</t>
            <t>In order to address potential inconsistencies and ambiguity across implementations of <spanx style="verb">Digest</spanx> and <spanx style="verb">Want-Digest</spanx>, this document obsoletes <xref target="RFC3230"/>. The Integrity fields (<xref target="representation-digest"/> and <xref target="content-digest"/>) and Integrity preference fields (<xref target="want-fields"/>) defined in this document are better aligned with current HTTP semantics and have names that more clearly articulate the intended usages.</t>
         </section>
         <section anchor="notational-conventions">
            <name>Notational Conventions</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>
            <t>This document uses the Augmented BNF defined in <xref target="RFC5234"/> and updated by <xref target="RFC7405"/>.</t>
            <t>This document uses the Boolean, Byte Sequence, Dictionary, Integer and List types from <xref target="STRUCTURED-FIELDS"/> along with the sf-dictionary and sf-list ABNF rules.</t>
            <t>The definitions "representation", "selected representation", "representation data", "representation metadata", "user agent" and "content" in this document are to be interpreted as described in <xref target="SEMANTICS"/>.</t>
            <t>Hashing algorithm names respect the casing used in their definition document (e.g. SHA-1, CRC32c) whereas hashing algorithm keys are quoted (e.g. "sha", "crc32c").</t>
            <t>The term "checksum" describes the output of the application of an algorithm to a sequence of bytes, whereas "digest" is only used in relation to the value contained in the fields.</t>
            <t>Integrity fields: collective term for <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digest</spanx>
            </t>
            <t>Integrity preference fields: collective term for <spanx style="verb">Want-Repr-Digest</spanx> and <spanx style="verb">Want-Content-Digest</spanx>
            </t>
         </section>
      </section>
      <section anchor="representation-digest">
         <name>The Repr-Digest Field</name>
         <t>The <spanx style="verb">Repr-Digest</spanx> HTTP field can be used in requests and responses to communicate digests that are calculated using a hashing algorithm applied to the entire "selected representation data" (see <xref section="8.1" sectionFormat="of" target="SEMANTICS"><?aug-anchor representation.data?><?aug-title Representation Data?></xref>).</t>
         <t>Representations take into account the effect of the HTTP semantics on messages. For example, the content can be affected by Range Requests or methods such as HEAD, while the way the content is transferred "on the wire" is dependent on other transformations (e.g. transfer codings for HTTP/1.1 - see <xref section="6.1" sectionFormat="of" target="HTTP11"/>). To help illustrate HTTP representation concepts, several examples are provided in <xref target="resource-representation"/>.</t>
         <t>When a message has no "representation data" it is still possible to assert that no "representation data" was sent by computing the digest on an empty string (see <xref target="usage-in-signatures"/>).</t>
         <t>
            <spanx style="verb">Repr-Digest</spanx> is a Structured Fields <spanx style="verb">Dictionary</spanx> (see <xref section="3.2" sectionFormat="of" target="STRUCTURED-FIELDS"/>) where:</t>
         <t>
            <list style="symbols">
               <t>keys convey the hashing algorithm (see <xref target="algorithms"/>) used to compute the digest;</t>
               <t>values <bcp14>MUST</bcp14> be of type <spanx style="verb">Byte Sequence</spanx>, which contain the output of the digest calculation.</t>
            </list>
         </t>
         <figure>
            <sourcecode type="abnf">
Repr-Digest   = sf-dictionary
</sourcecode>
         </figure>
         <t>For example:</t>
         <figure>
            <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

Repr-Digest: \
  sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrI\
  iYllu7BNNyealdVLvRwEmTHWXvJwew==:
</sourcecode>
         </figure>
         <t>The <spanx style="verb">Dictionary</spanx> type can be used, for example, to attach multiple digests calculated using different hashing algorithms in order to support a population of endpoints with different or evolving capabilities. Such an approach could support transitions away from weaker algorithms (see <xref target="sec-agility"/>).</t>
         <figure>
            <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

Repr-Digest: \
  sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:,\
  sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrI\
  iYllu7BNNyealdVLvRwEmTHWXvJwew==:
</sourcecode>
         </figure>
         <t>A recipient <bcp14>MAY</bcp14> ignore any or all digests. This allows the recipient to choose which hashing algorithm(s) to use for validation instead of verifying every digest.</t>
         <t>A sender <bcp14>MAY</bcp14> send a digest without knowing whether the recipient supports a given hashing algorithm, or even knowing that the recipient will ignore it.</t>
         <t>
            <spanx style="verb">Repr-Digest</spanx> can be sent in a trailer section. In this case, <spanx style="verb">Repr-Digest</spanx>
            <bcp14>MAY</bcp14> be merged into the header section; see <xref section="6.5.1" sectionFormat="of" target="SEMANTICS"><?aug-anchor trailers.limitations?><?aug-title Limitations on use of Trailers?></xref>.</t>
         <section anchor="state-changing-requests">
            <name>Using Repr-Digest in State-Changing Requests</name>
            <t>When the representation enclosed in a state-changing request does not describe the target resource, the representation digest <bcp14>MUST</bcp14> be computed on the representation data. This is the only possible choice because representation digest requires complete representation metadata (see <xref target="representation-digest"/>).</t>
            <t>In responses,</t>
            <t>
               <list style="symbols">
                  <t>if the representation describes the status of the request, <spanx style="verb">Repr-Digest</spanx>
                     <bcp14>MUST</bcp14> be computed on the enclosed representation (see <xref target="post-referencing-status"/> );</t>
                  <t>if there is a referenced resource <spanx style="verb">Repr-Digest</spanx>
                     <bcp14>MUST</bcp14> be computed on the selected representation of the referenced resource even if that is different from the target resource. That might or might not result in computing <spanx style="verb">Repr-Digest</spanx> on the enclosed representation.</t>
               </list>
            </t>
            <t>The latter case is done according to the HTTP semantics of the given method, for example using the <spanx style="verb">Content-Location</spanx> header field (see <xref section="8.7" sectionFormat="of" target="SEMANTICS"><?aug-anchor field.content-location?><?aug-title Content-Location?></xref>). In contrast, the <spanx style="verb">Location</spanx> header field does not affect <spanx style="verb">Repr-Digest</spanx> because it is not representation metadata.</t>
            <t>For example, in <spanx style="verb">PATCH</spanx> requests, the representation digest will be computed on the patch document because the representation metadata refers to the patch document and not to the target resource (see <xref section="2" sectionFormat="of" target="PATCH"/>). In responses, instead, the representation digest will be computed on the selected representation of the patched resource.</t>
         </section>
         <section anchor="digest-and-content-location">
            <name>Repr-Digest and Content-Location in Responses</name>
            <t>When a state-changing method returns the <spanx style="verb">Content-Location</spanx> header field, the enclosed representation refers to the resource identified by its value and <spanx style="verb">Repr-Digest</spanx> is computed accordingly. An example is given in <xref target="post-not-request-uri"/>.</t>
         </section>
      </section>
      <section anchor="content-digest">
         <name>The Content-Digest Field</name>
         <t>The <spanx style="verb">Content-Digest</spanx> HTTP field can be used in requests and responses to communicate digests that are calculated using a hashing algorithm applied to the actual message content (see <xref section="6.4" sectionFormat="of" target="SEMANTICS"><?aug-anchor content?><?aug-title Content?></xref>). It is a Structured Fields Dictionary (see <xref section="3.2" sectionFormat="of" target="STRUCTURED-FIELDS"/>) where:</t>
         <t>
            <list style="symbols">
               <t>keys convey the hashing algorithm (see <xref target="algorithms"/>) used to compute the digest;</t>
               <t>values <bcp14>MUST</bcp14> be <spanx style="verb">Byte Sequences</spanx> (<xref section="3.3.5" sectionFormat="of" target="STRUCTURED-FIELDS"/>) containing the output of the digest calculation.</t>
            </list>
         </t>
         <figure>
            <sourcecode type="abnf">
Content-Digest   = sf-dictionary
</sourcecode>
         </figure>
         <t>For example:</t>
         <figure>
            <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

Content-Digest: \
  sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrI\
  iYllu7BNNyealdVLvRwEmTHWXvJwew==:
</sourcecode>
         </figure>
         <t>The <spanx style="verb">Dictionary</spanx> type can be used, for example, to attach multiple digests calculated using different hashing algorithms in order to support a population of endpoints with different or evolving capabilities. Such an approach could support transitions away from weaker algorithms (see <xref target="sec-agility"/>).</t>
         <figure>
            <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

Repr-Digest: \
  sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:,\
  sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrI\
  iYllu7BNNyealdVLvRwEmTHWXvJwew==:
</sourcecode>
         </figure>
         <t>A recipient <bcp14>MAY</bcp14> ignore any or all digests. This allows the recipient to choose which hashing algorithm(s) to use for validation instead of verifying every digest.</t>
         <t>A sender <bcp14>MAY</bcp14> send a digest without knowing whether the recipient supports a given hashing algorithm, or even knowing that the recipient will ignore it.</t>
         <t>
            <spanx style="verb">Content-Digest</spanx> can be sent in a trailer section. In this case, <spanx style="verb">Content-Digest</spanx>
            <bcp14>MAY</bcp14> be merged into the header section; see <xref section="6.5.1" sectionFormat="of" target="SEMANTICS"><?aug-anchor trailers.limitations?><?aug-title Limitations on use of Trailers?></xref>.</t>
      </section>
      <section anchor="want-fields">
         <name>Integrity preference fields</name>
         <t>Senders can indicate their interest in Integrity fields and hashing algorithm preferences using the <spanx style="verb">Want-Repr-Digest</spanx> or <spanx style="verb">Want-Content-Digest</spanx> fields. These can be used in both requests and responses.</t>
         <t>
            <spanx style="verb">Want-Repr-Digest</spanx> indicates the sender's desire to receive a representation digest on messages associated with the request URI and representation metadata, using the <spanx style="verb">Repr-Digest</spanx> field.</t>
         <t>
            <spanx style="verb">Want-Content-Digest</spanx> indicates the sender's desire to receive a content digest on messages associated with the request URI and representation metadata, using the <spanx style="verb">Content-Digest</spanx> field.</t>
         <t>
            <spanx style="verb">Want-Repr-Digest</spanx> and <spanx style="verb">Want-Content-Digest</spanx> are Structured Fields Dictionary (see <xref section="3.2" sectionFormat="of" target="STRUCTURED-FIELDS"/>) where:</t>
         <t>
            <list style="symbols">
               <t>keys convey the hashing algorithm (see <xref target="algorithms"/>);</t>
               <t>values <bcp14>MUST</bcp14> be of type <spanx style="verb">Integer</spanx> (<xref section="3.3.1" sectionFormat="of" target="STRUCTURED-FIELDS"/>) in the range 0 to 10 inclusive. 1 is the least preferred, 10 is the most preferred, and a value of 0 means "not acceptable". Values convey an ascending, relative, weighted preference.</t>
            </list>
         </t>
         <figure>
            <sourcecode type="abnf">
   Want-Repr-Digest = sf-dictionary
   Want-Content-Digest = sf-dictionary
</sourcecode>
         </figure>
         <t>Examples:</t>
         <figure>
            <sourcecode type="http-message">
Want-Repr-Digest: sha-256=1
Want-Repr-Digest: sha-512=3, sha-256=10, unixsum=0
Want-Content-Digest: sha-256=1
Want-Content-Digest: sha-512=3, sha-256=10, unixsum=0
</sourcecode>
         </figure>
      </section>
      <section anchor="algorithms">
         <name>Hash Algorithms for HTTP Digest Fields Registry</name>
         <t>The "Hash Algorithms for HTTP Digest Fields", maintained by IANA at <eref target="https://www.iana.org/assignments/http-dig-alg/">https://www.iana.org/assignments/http-dig-alg/</eref>, registers algorithms for use with the Integrity and Integrity preference fields defined in this document.</t>
         <t>This registry uses the Specification Required policy (<xref section="4.6" sectionFormat="of" target="RFC8126"/>).</t>
         <t>Registrations <bcp14>MUST</bcp14> include the following fields:</t>
         <t>
            <list style="symbols">
               <t>Algorithm Key: the Structured Fields key value used in <spanx style="verb">Repr-Digest</spanx>, <spanx style="verb">Content-Digest</spanx>, <spanx style="verb">Want-Repr-Digest</spanx> or <spanx style="verb">Want-Content-Digest</spanx> field Dictionary member keys</t>
               <t>Status: the status of the algorithm. Use "standard" for standardized algorithms without known problems; "experimental" or some other appropriate value <list style="symbols">
                     <t>e.g. according to the type and status of the primary document in which the algorithm is defined; "insecure" when the algorithm is insecure; "reserved" when the algorithm references a reserved token value</t>
                  </list>
               </t>
               <t>Description: a short description of the algorithm</t>
               <t>Reference(s): a set of pointers to the primary documents defining the algorithm and key</t>
            </list>
         </t>
         <t>Insecure hashing algorithms <bcp14>MAY</bcp14> be used to preserve integrity against corruption, but <bcp14>MUST NOT</bcp14> be used in a potentially adversarial setting; for example, when signing Integrity fields' values for authenticity.</t>
         <t>The entries in <xref target="iana-hash-algorithm-table"/> are registered by this document.</t>
         <texttable anchor="iana-hash-algorithm-table" title="Initial Hash Algorithms">
            <ttcol align="left">Algorithm Key</ttcol>
            <ttcol align="left">Status</ttcol>
            <ttcol align="left">Description</ttcol>
            <ttcol align="left">Reference(s)</ttcol>
            <c>sha-512</c>
            <c>standard</c>
            <c>The SHA-512 algorithm.</c>
            <c>
               <xref target="RFC6234"/>, <xref target="RFC4648"/>, this document.</c>
            <c>sha-256</c>
            <c>standard</c>
            <c>The SHA-256 algorithm.</c>
            <c>
               <xref target="RFC6234"/>, <xref target="RFC4648"/>, this document.</c>
            <c>md5</c>
            <c>insecure</c>
            <c>The MD5 algorithm. It is vulnerable to collision attacks; see <xref target="NO-MD5"/> and <xref target="CMU-836068"/>
            </c>
            <c>
               <xref target="RFC1321"/>, <xref target="RFC4648"/>, this document.</c>
            <c>sha</c>
            <c>insecure</c>
            <c>The SHA-1 algorithm. It is vulnerable to collision attacks; see <xref target="NO-SHA"/> and <xref target="IACR-2020-014"/>
            </c>
            <c>
               <xref target="RFC3174"/>, <xref target="RFC4648"/>, <xref target="RFC6234"/> this document.</c>
            <c>unixsum</c>
            <c>insecure</c>
            <c>The algorithm used by the UNIX "sum" command.</c>
            <c>
               <xref target="RFC4648"/>, <xref target="RFC6234"/>, <xref target="UNIX"/>, this document.</c>
            <c>unixcksum</c>
            <c>insecure</c>
            <c>The algorithm used by the UNIX "cksum" command.</c>
            <c>
               <xref target="RFC4648"/>, <xref target="RFC6234"/>, <xref target="UNIX"/>, this document.</c>
            <c>adler</c>
            <c>insecure</c>
            <c>The ADLER32 algorithm.</c>
            <c>
               <xref target="RFC1950"/>, this document.</c>
            <c>crc32c</c>
            <c>insecure</c>
            <c>The CRC32c algorithm.</c>
            <c>
               <xref target="RFC4960"/> appendix B, this document.</c>
         </texttable>
      </section>
      <section anchor="security-considerations">
         <name>Security Considerations</name>
         <section anchor="sec-limitations">
            <name>HTTP Messages Are Not Protected In Full</name>
            <t>This document specifies a data integrity mechanism that protects HTTP "representation data" or content, but not HTTP header and trailer fields, from certain kinds of corruption.</t>
            <t>Integrity fields are not intended to be a general protection against malicious tampering with HTTP messages. This can be achieved by combining it with other approaches such as transport-layer security or digital signatures.</t>
         </section>
         <section anchor="end-to-end-integrity">
            <name>End-to-End Integrity</name>
            <t>Integrity fields can help detect "representation data" or content modification due to implementation errors, undesired "transforming proxies" (see <xref section="7.7" sectionFormat="of" target="SEMANTICS"><?aug-anchor message.transformations?><?aug-title Message Transformations?></xref>) or other actions as the data passes across multiple hops or system boundaries. Even a simple mechanism for end-to-end "representation data" integrity is valuable because a user agent can validate that resource retrieval succeeded before handing off to a HTML parser, video player etc. for parsing.</t>
            <t>Note that using these mechanisms alone does not provide end-to-end integrity of HTTP messages over multiple hops, since metadata could be manipulated at any stage. Methods to protect metadata are discussed in <xref target="usage-in-signatures"/>.</t>
         </section>
         <section anchor="usage-in-signatures">
            <name>Usage in Signatures</name>
            <t>Digital signatures are widely used together with checksums to provide the certain identification of the origin of a message <xref target="NIST800-32"/>. Such signatures can protect one or more HTTP fields and there are additional considerations when Integrity fields are included in this set.</t>
            <t>Digests explicitly depend on the "representation metadata" (e.g. the values of <spanx style="verb">Content-Type</spanx>, <spanx style="verb">Content-Encoding</spanx> etc). A signature that protects Integrity fields but not other "representation metadata" can expose the communication to tampering. For example, an actor could manipulate the <spanx style="verb">Content-Type</spanx> field-value and cause a digest validation failure at the recipient, preventing the application from accessing the representation. Such an attack consumes the resources of both endpoints. See also <xref target="digest-and-content-location"/>.</t>
            <t>Signatures are likely to be deemed an adversarial setting when applying Integrity fields; see <xref target="algorithms"/>. Using signatures to protect the checksum of an empty representation allows receiving endpoints to detect if an eventual payload has been stripped or added.</t>
            <t>Any mangling of Integrity fields, including digests' de-duplication or combining different field values (see <xref section="5.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor field.lines?><?aug-title Field Lines and Combined Field Value?></xref>) might affect signature validation.</t>
         </section>
         <section anchor="usage-in-trailer-fields">
            <name>Usage in Trailer Fields</name>
            <t>Before sending Integrity fields in a trailer section, the sender should consider that intermediaries are explicitly allowed to drop any trailer (see <xref section="6.5.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor trailers.processing?><?aug-title Processing Trailer Fields?></xref>).</t>
            <t>When Integrity fields are used in a trailer section, the field-values are received after the content. Eager processing of content before the trailer section prevents digest validation, possibly leading to processing of invalid data.</t>
            <t>Not every hashing algorithm is suitable for use in the trailer section, some may require to pre-process the whole payload before sending a message (e.g. see <xref target="I-D.thomson-http-mice"/>).</t>
         </section>
         <section anchor="usage-with-encryption">
            <name>Usage with Encryption</name>
            <t>The checksum of an encrypted payload can change between different messages depending on the encryption algorithm used; in those cases its value could not be used to provide a proof of integrity "at rest" unless the whole (e.g. encoded) content is persisted.</t>
         </section>
         <section anchor="sec-agility">
            <name>Algorithm Agility</name>
            <t>The security properties of hashing algorithms are not fixed. Algorithm Agility (see <xref target="RFC7696"/>) is achieved by providing implementations with flexibility to choose hashing algorithms from the IANA Hash Algorithms for HTTP Digest Fields registry; see <xref target="establish-hash-algorithm-registry"/>.</t>
            <t>The "standard" algorithms listed in this document are suitable for many purposes, including adversarial situations where hash functions might need to provide resistance to collision, first-preimage and second-preimage attacks. Algorithms listed as "insecure" either provide none of these properties, or are known to be weak (see <xref target="NO-MD5"/> and <xref target="NO-SHA"/>).</t>
            <t>For adversarial situations, which of the "standard" algorithms are acceptable will depend on the level of protection the circumstances demand. As there is no negotiation, endpoints that depend on a digest for security will be vulnerable to attacks on the weakest algorithm they are willing to accept.</t>
            <t>Transition from weak algorithms is supported by negotiation of hashing algorithm using <spanx style="verb">Want-Repr-Digest</spanx> or <spanx style="verb">Want-Content-Digest</spanx> (see <xref target="want-fields"/>) or by sending multiple digests from which the receiver chooses. Endpoints are advised that sending multiple values consumes resources, which may be wasted if the receiver ignores them (see <xref target="representation-digest"/>).</t>
            <t>While algorithm agility allows the migration to stronger algorithms it does not prevent the use of weaker algorithms. Integrity fields do not provide any mitigiations for downgrade or substitution attacks (see <xref target="RFC6211" x:fmt="of" x:sec="1"/>) of the hashing algorithm. To protect against such attacks, endpoints could restrict their set of supported algorithms to stronger ones and protect the fields value by using TLS and/or digital signatures.</t>
         </section>
         <section anchor="resource-exhaustion">
            <name>Resource exhaustion</name>
            <t>Integrity fields validation consumes computational resources. In order to avoid resource exhaustion, implementations can restrict validation of the algorithm types, number of validations, or the size of content.</t>
         </section>
      </section>
      <section anchor="iana-considerations">
         <name>IANA Considerations</name>
         <section anchor="http-field-name-registration">
            <name>HTTP Field Name Registration</name>
            <t>IANA is asked to update the "Hypertext Transfer Protocol (HTTP) Field Name Registry" registry (<xref target="SEMANTICS"/>) according to the table below:</t>
            <texttable>
               <ttcol align="left">Field Name</ttcol>
               <ttcol align="left">Status</ttcol>
               <ttcol align="left">Reference</ttcol>
               <c>Repr-Digest</c>
               <c>permanent</c>
               <c>
                  <xref target="representation-digest"/> of this document</c>
               <c>Content-Digest</c>
               <c>permanent</c>
               <c>
                  <xref target="content-digest"/> of this document</c>
               <c>Want-Repr-Digest</c>
               <c>permanent</c>
               <c>
                  <xref target="want-fields"/> of this document</c>
               <c>Want-Content-Digest</c>
               <c>permanent</c>
               <c>
                  <xref target="want-fields"/> of this document</c>
               <c>Digest</c>
               <c>obsoleted</c>
               <c>
                  <xref target="RFC3230"/>, <xref target="obsolete-3230"/> of this document</c>
               <c>Want-Digest</c>
               <c>obsoleted</c>
               <c>
                  <xref target="RFC3230"/>, <xref target="obsolete-3230"/> of this document</c>
            </texttable>
         </section>
         <section anchor="establish-hash-algorithm-registry">
            <name>Establish the Hash Algorithms for HTTP Digest Fields Registry</name>
            <t>This memo sets this specification to be the establishing document for the <eref target="https://www.iana.org/assignments/http-structured-dig-alg/">Hash Algorithms for HTTP Digest Fields</eref> registry defined in <xref target="algorithms"/>.</t>
            <t>IANA is asked to initialize the registry with the entries in <xref target="iana-hash-algorithm-table"/>.</t>
         </section>
      </section>
   </middle>
   <back>
      <references title="Normative References">
         <reference anchor="RFC1321">
            <front>
               <title>The MD5 Message-Digest Algorithm</title>
               <author fullname="R. Rivest" initials="R." surname="Rivest"/>
               <date month="April" year="1992"/>
            </front>
            <seriesInfo name="RFC" value="1321"/>
            <seriesInfo name="DOI" value="10.17487/RFC1321"/>
         </reference>
         <reference anchor="RFC3174">
            <front>
               <title>US Secure Hash Algorithm 1 (SHA1)</title>
               <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
               <author fullname="P. Jones" initials="P." surname="Jones"/>
               <date month="September" year="2001"/>
            </front>
            <seriesInfo name="RFC" value="3174"/>
            <seriesInfo name="DOI" value="10.17487/RFC3174"/>
         </reference>
         <reference anchor="RFC1950">
            <front>
               <title>ZLIB Compressed Data Format Specification version 3.3</title>
               <author fullname="P. Deutsch" initials="P." surname="Deutsch"/>
               <author fullname="J-L. Gailly" initials="J-L." surname="Gailly"/>
               <date month="May" year="1996"/>
            </front>
            <seriesInfo name="RFC" value="1950"/>
            <seriesInfo name="DOI" value="10.17487/RFC1950"/>
         </reference>
         <reference anchor="RFC3230">
            <front>
               <title>Instance Digests in HTTP</title>
               <author fullname="J. Mogul" initials="J." surname="Mogul"/>
               <author fullname="A. Van Hoff" initials="A." surname="Van Hoff"/>
               <date month="January" year="2002"/>
            </front>
            <seriesInfo name="RFC" value="3230"/>
            <seriesInfo name="DOI" value="10.17487/RFC3230"/>
         </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"/>
            </front>
            <seriesInfo name="RFC" value="4648"/>
            <seriesInfo name="DOI" value="10.17487/RFC4648"/>
         </reference>
         <reference anchor="RFC5234">
            <front>
               <title>Augmented BNF for Syntax Specifications: ABNF</title>
               <author fullname="D. Crocker"
                       initials="D."
                       role="editor"
                       surname="Crocker"/>
               <author fullname="P. Overell" initials="P." surname="Overell"/>
               <date month="January" year="2008"/>
            </front>
            <seriesInfo name="STD" value="68"/>
            <seriesInfo name="RFC" value="5234"/>
            <seriesInfo name="DOI" value="10.17487/RFC5234"/>
         </reference>
         <reference anchor="RFC6234">
            <front>
               <title>US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)</title>
               <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
               <author fullname="T. Hansen" initials="T." surname="Hansen"/>
               <date month="May" year="2011"/>
            </front>
            <seriesInfo name="RFC" value="6234"/>
            <seriesInfo name="DOI" value="10.17487/RFC6234"/>
         </reference>
         <reference anchor="RFC7405">
            <front>
               <title>Case-Sensitive String Support in ABNF</title>
               <author fullname="P. Kyzivat" initials="P." surname="Kyzivat"/>
               <date month="December" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7405"/>
            <seriesInfo name="DOI" value="10.17487/RFC7405"/>
         </reference>
         <reference anchor="UNIX">
            <front>
               <title>The Single UNIX Specification, Version 2 - 6 Vol Set for UNIX 98</title>
               <author>
                  <organization>The Open Group</organization>
               </author>
               <date month="February" year="1997"/>
            </front>
         </reference>
         <reference anchor="NIST800-32"
                    target="https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-32.pdf">
            <front>
               <title>Introduction to Public Key Technology and the Federal PKI Infrastructure</title>
               <author>
                  <organization>National Institute of Standards and Technology, U.S. Department of Commerce</organization>
               </author>
               <date month="February" year="2001"/>
            </front>
         </reference>
         <reference anchor="CMU-836068" target="https://www.kb.cert.org/vuls/id/836068/">
            <front>
               <title>MD5 Vulnerable to collision attacks</title>
               <author>
                  <organization>Carnagie Mellon University, Software Engineering Institute</organization>
               </author>
               <date day="31" month="December" year="2008"/>
            </front>
         </reference>
         <reference anchor="IACR-2020-014" target="https://eprint.iacr.org/2020/014.pdf">
            <front>
               <title>SHA-1 is a Shambles</title>
               <author initials="G." surname="Leurent">
                  <organization>Inria, France</organization>
               </author>
               <author initials="T." surname="Peyrin">
                  <organization>Nanyang Technological University, Singapore; Temasek Laboratories, Singapore</organization>
               </author>
               <date day="05" month="January" year="2020"/>
            </front>
         </reference>
         <reference anchor="SEMANTICS">
            <front>
               <title>HTTP Semantics</title>
               <author fullname="Roy T. Fielding">
                  <organization>Adobe</organization>
               </author>
               <author fullname="Mark Nottingham">
                  <organization>Fastly</organization>
               </author>
               <author fullname="Julian Reschke">
                  <organization>greenbytes GmbH</organization>
               </author>
               <date day="12" month="September" year="2021"/>
            </front>
            <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-semantics-19"/>
            <x:source basename="draft-ietf-httpbis-semantics-19"
                      href="draft-ietf-httpbis-semantics-19.xml"/>
         </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"/>
            </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"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
         </reference>
         <reference anchor="STRUCTURED-FIELDS">
            <front>
               <title>Structured Field Values for HTTP</title>
               <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
               <author fullname="P-H. Kamp" initials="P-H." surname="Kamp"/>
               <date month="February" year="2021"/>
            </front>
            <seriesInfo name="RFC" value="8941"/>
            <seriesInfo name="DOI" value="10.17487/RFC8941"/>
         </reference>
         <reference anchor="RFC8126">
            <front>
               <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
               <author fullname="M. Cotton" initials="M." surname="Cotton"/>
               <author fullname="B. Leiba" initials="B." surname="Leiba"/>
               <author fullname="T. Narten" initials="T." surname="Narten"/>
               <date month="June" year="2017"/>
            </front>
            <seriesInfo name="BCP" value="26"/>
            <seriesInfo name="RFC" value="8126"/>
            <seriesInfo name="DOI" value="10.17487/RFC8126"/>
         </reference>
         <reference anchor="RFC4960">
            <front>
               <title>Stream Control Transmission Protocol</title>
               <author fullname="R. Stewart"
                       initials="R."
                       role="editor"
                       surname="Stewart"/>
               <date month="September" year="2007"/>
            </front>
            <seriesInfo name="RFC" value="4960"/>
            <seriesInfo name="DOI" value="10.17487/RFC4960"/>
         </reference>
      </references>
      <references title="Informative References">
         <reference anchor="RFC2818">
            <front>
               <title>HTTP Over TLS</title>
               <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
               <date month="May" year="2000"/>
            </front>
            <seriesInfo name="RFC" value="2818"/>
            <seriesInfo name="DOI" value="10.17487/RFC2818"/>
         </reference>
         <reference anchor="HTTP11">
            <front>
               <title>HTTP/1.1</title>
               <author fullname="Roy T. Fielding">
                  <organization>Adobe</organization>
               </author>
               <author fullname="Mark Nottingham">
                  <organization>Fastly</organization>
               </author>
               <author fullname="Julian Reschke">
                  <organization>greenbytes GmbH</organization>
               </author>
               <date day="12" month="September" year="2021"/>
            </front>
            <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-messaging-19"/>
         </reference>
         <reference anchor="PATCH">
            <front>
               <title>PATCH Method for HTTP</title>
               <author fullname="L. Dusseault" initials="L." surname="Dusseault"/>
               <author fullname="J. Snell" initials="J." surname="Snell"/>
               <date month="March" year="2010"/>
            </front>
            <seriesInfo name="RFC" value="5789"/>
            <seriesInfo name="DOI" value="10.17487/RFC5789"/>
         </reference>
         <reference anchor="NO-MD5">
            <front>
               <title>Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms</title>
               <author fullname="S. Turner" initials="S." surname="Turner"/>
               <author fullname="L. Chen" initials="L." surname="Chen"/>
               <date month="March" year="2011"/>
            </front>
            <seriesInfo name="RFC" value="6151"/>
            <seriesInfo name="DOI" value="10.17487/RFC6151"/>
         </reference>
         <reference anchor="NO-SHA">
            <front>
               <title>Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms</title>
               <author fullname="T. Polk" initials="T." surname="Polk"/>
               <author fullname="L. Chen" initials="L." surname="Chen"/>
               <author fullname="S. Turner" initials="S." surname="Turner"/>
               <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
               <date month="March" year="2011"/>
            </front>
            <seriesInfo name="RFC" value="6194"/>
            <seriesInfo name="DOI" value="10.17487/RFC6194"/>
         </reference>
         <reference anchor="I-D.thomson-http-mice">
            <front>
               <title>Merkle Integrity Content Encoding</title>
               <author fullname="Martin Thomson">
                  <organization>Mozilla</organization>
               </author>
               <author fullname="Jeffrey Yasskin">
                  <organization>Google</organization>
               </author>
               <date day="13" month="August" year="2018"/>
            </front>
            <seriesInfo name="Internet-Draft" value="draft-thomson-http-mice-03"/>
         </reference>
         <reference anchor="RFC7696">
            <front>
               <title>Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms</title>
               <author fullname="R. Housley" initials="R." surname="Housley"/>
               <date month="November" year="2015"/>
            </front>
            <seriesInfo name="BCP" value="201"/>
            <seriesInfo name="RFC" value="7696"/>
            <seriesInfo name="DOI" value="10.17487/RFC7696"/>
         </reference>
         <reference anchor="RFC6211">
            <front>
               <title>Cryptographic Message Syntax (CMS) Algorithm Identifier Protection Attribute</title>
               <author fullname="J. Schaad" initials="J." surname="Schaad"/>
               <date month="April" year="2011"/>
            </front>
            <seriesInfo name="RFC" value="6211"/>
            <seriesInfo name="DOI" value="10.17487/RFC6211"/>
         </reference>
         <reference anchor="RFC7396">
            <front>
               <title>JSON Merge Patch</title>
               <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
               <author fullname="J. Snell" initials="J." surname="Snell"/>
               <date month="October" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7396"/>
            <seriesInfo name="DOI" value="10.17487/RFC7396"/>
         </reference>
         <reference anchor="RFC7807">
            <front>
               <title>Problem Details for HTTP APIs</title>
               <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
               <author fullname="E. Wilde" initials="E." surname="Wilde"/>
               <date month="March" year="2016"/>
            </front>
            <seriesInfo name="RFC" value="7807"/>
            <seriesInfo name="DOI" value="10.17487/RFC7807"/>
         </reference>
      </references>
      <section anchor="resource-representation">
         <name>Resource Representation and Representation Data</name>
         <t>The following examples show how representation metadata, payload transformations and method impacts on the message and content. When the content contains non-printable characters (e.g. when it is compressed) it is shown as a Base64-encoded string.</t>
         <figure title="Request containing a JSON object without any content coding">
            <sourcecode type="http-message">
PUT /entries/1234 HTTP/1.1
Host: foo.example
Content-Type: application/json

{"hello": "world"}
</sourcecode>
         </figure>
         <figure title="Request containing a gzip-encoded JSON object">
            <sourcecode type="http-message">
PUT /entries/1234 HTTP/1.1
Host: foo.example
Content-Type: application/json
Content-Encoding: gzip

H4sIAItWyFwC/6tWSlSyUlAypANQqgUAREcqfG0AAAA=
</sourcecode>
         </figure>
         <t>Now the same content conveys a malformed JSON object, because the request does not indicate a content coding.</t>
         <figure title="Request containing malformed JSON">
            <sourcecode type="http-message">
PUT /entries/1234 HTTP/1.1
Host: foo.example
Content-Type: application/json

H4sIAItWyFwC/6tWSlSyUlAypANQqgUAREcqfG0AAAA=
</sourcecode>
         </figure>
         <t>A Range-Request alters the content, conveying a partial representation.</t>
         <figure title="Request for partial content">
            <sourcecode type="http-message">
GET /entries/1234 HTTP/1.1
Host: foo.example
Range: bytes=1-7

</sourcecode>
         </figure>
         <figure title="Partial response from a gzip-encoded representation">
            <sourcecode type="http-message">
HTTP/1.1 206 Partial Content
Content-Encoding: gzip
Content-Type: application/json
Content-Range: bytes 1-7/18

iwgAla3RXA==
</sourcecode>
         </figure>
         <t>The method can also alter the content. For example, the response to a HEAD request does not carry content.</t>
         <figure title="HEAD request">
            <sourcecode type="http-message">
HEAD /entries/1234 HTTP/1.1
Host: foo.example
Accept: application/json
Accept-Encoding: gzip

</sourcecode>
         </figure>
         <figure title="Response to HEAD request (empty content)">
            <sourcecode type="http-message">
HTTP/1.1 200 OK
Content-Type: application/json
Content-Encoding: gzip

</sourcecode>
         </figure>
         <t>Finally, the semantics of an HTTP response might decouple the effective request URI from the enclosed representation. In the example response below, the <spanx style="verb">Content-Location</spanx> header field indicates that the enclosed representation refers to the resource available at <spanx style="verb">/authors/123</spanx>, even though the request is directed to <spanx style="verb">/authors/</spanx>.</t>
         <figure title="POST request">
            <sourcecode type="http-message">
POST /authors/ HTTP/1.1
Host: foo.example
Accept: application/json
Content-Type: application/json

{"author": "Camilleri"}
</sourcecode>
         </figure>
         <figure title="Response with Content-Location header">
            <sourcecode type="http-message">
HTTP/1.1 201 Created
Content-Type: application/json
Content-Location: /authors/123
Location: /authors/123

{"id": "123", "author": "Camilleri"}
</sourcecode>
         </figure>
      </section>
      <section anchor="examples-unsolicited">
         <name>Examples of Unsolicited Digest</name>
         <t>The following examples demonstrate interactions where a server responds with a <spanx style="verb">Repr-Digest</spanx> or <spanx style="verb">Content-Digest</spanx> fields even though the client did not solicit one using <spanx style="verb">Want-Repr-Digest</spanx> or <spanx style="verb">Want-Content-Digest</spanx>.</t>
         <t>Some examples include JSON objects in the content. For presentation purposes, objects that fit completely within the line-length limits are presented on a single line using compact notation with no leading space. Objects that would exceed line-length limits are presented across multiple lines (one line per key-value pair) with 2 spaced of leading indentation.</t>
         <t>Checksum mechanisms defined in this document are media-type agnostic and do not provide canonicalization algorithms for specific formats. Examples are calculated inclusive of any space. While examples can include both fields, <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digest</spanx> can be returned independently.</t>
         <section anchor="example-full-representation">
            <name>Server Returns Full Representation Data</name>
            <t>In this example, the message content conveys complete representation data. This means that in the response, <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digest</spanx> are both computed over the JSON object <spanx style="verb">{"hello": "world"}</spanx>, and thus have the same value.</t>
            <figure title="GET request for an item">
               <sourcecode type="http-message">
GET /items/123 HTTP/1.1
Host: foo.example

</sourcecode>
            </figure>
            <figure title="Response with identical Repr-Digest and Content-Digest">
               <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Repr-Digest: \
  sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
Content-Digest: \
  sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:

{"hello": "world"}
</sourcecode>
            </figure>
         </section>
         <section anchor="server-returns-no-representation-data">
            <name>Server Returns No Representation Data</name>
            <t>In this example, a HEAD request is used to retrieve the checksum of a resource.</t>
            <t>The response <spanx style="verb">Repr-Digest</spanx> field-value is calculated over the JSON object <spanx style="verb">{"hello": "world"}</spanx>, which is not shown because there is no payload data. <spanx style="verb">Content-Digest</spanx> is computed on empty content.</t>
            <figure title="HEAD request for an item">
               <sourcecode type="http-message">
HEAD /items/123 HTTP/1.1
Host: foo.example

</sourcecode>
            </figure>
            <figure title="Response with both Content-Digest and Digest; empty content">
               <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Repr-Digest: \
  sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
Content-Digest: \
  sha-256=:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=:

</sourcecode>
            </figure>
         </section>
         <section anchor="server-returns-partial-representation-data">
            <name>Server Returns Partial Representation Data</name>
            <t>In this example, the client makes a range request and the server responds with partial content.</t>
            <figure title="Request for partial content">
               <sourcecode type="http-message">
GET /items/123 HTTP/1.1
Host: foo.example
Range: bytes=1-7

</sourcecode>
            </figure>
            <figure title="Partial response with both Content-Digest and Repr-Digest">
               <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 206 Partial Content
Content-Type: application/json
Content-Range: bytes 1-7/18
Repr-Digest: \
  sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
Content-Digest: \
  sha-256=:Wqdirjg/u3J688ejbUlApbjECpiUUtIwT8lY/z81Tno=:

"hello"
</sourcecode>
            </figure>
            <t>In the response message above, note that the <spanx style="verb">Repr-Digest</spanx> and <spanx style="verb">Content-Digests</spanx> are different. The <spanx style="verb">Repr-Digest</spanx> field-value is calculated across the entire JSON object <spanx style="verb">{"hello": "world"}</spanx>, and the field is</t>
            <figure>
               <sourcecode type="http-message">
Repr-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
</sourcecode>
            </figure>
            <t>However, since the message content is constrained to bytes 1-7, the <spanx style="verb">Content-Digest</spanx> field-value is calculated over the byte sequence <spanx style="verb">"hello"</spanx>, thus resulting in</t>
            <figure>
               <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

Content-Digest: \
  sha-256=:Wqdirjg/u3J688ejbUlApbjECpiUUtIwT8lY/z81Tno=:
</sourcecode>
            </figure>
         </section>
         <section anchor="client-and-server-provide-full-representation-data">
            <name>Client and Server Provide Full Representation Data</name>
            <t>The request contains a <spanx style="verb">Repr-Digest</spanx> field-value calculated on the enclosed representation. It also includes an <spanx style="verb">Accept-Encoding: br</spanx> header field that advertises the client supports Brotli encoding.</t>
            <t>The response includes a <spanx style="verb">Content-Encoding: br</spanx> that indicates the selected representation is Brotli-encoded. The <spanx style="verb">Repr-Digest</spanx> field-value is therefore different compared to the request.</t>
            <t>For presentation purposes, the response body is displayed as a Base64-encoded string because it contains non-printable characters.</t>
            <figure title="PUT Request with Digest">
               <sourcecode type="http-message">
PUT /items/123 HTTP/1.1
Host: foo.example
Content-Type: application/json
Accept-Encoding: br
Repr-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:

{"hello": "world"}
</sourcecode>
            </figure>
            <figure title="Response with Digest of encoded response">
               <sourcecode type="http-message">
HTTP/1.1 200 OK
Content-Type: application/json
Content-Location: /items/123
Content-Encoding: br
Content-Length: 22
Repr-Digest: sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:

iwiAeyJoZWxsbyI6ICJ3b3JsZCJ9Aw==
</sourcecode>
            </figure>
         </section>
         <section anchor="client-provides-full-representation-data-server-provides-no-representation-data">
            <name>Client Provides Full Representation Data, Server Provides No Representation Data</name>
            <t>The request <spanx style="verb">Repr-Digest</spanx> field-value is calculated on the enclosed payload.</t>
            <t>The response <spanx style="verb">Repr-Digest</spanx> field-value depends on the representation metadata header fields, including <spanx style="verb">Content-Encoding: br</spanx> even when the response does not contain content.</t>
            <figure>
               <sourcecode type="http-message">
PUT /items/123 HTTP/1.1
Host: foo.example
Content-Type: application/json
Content-Length: 18
Accept-Encoding: br
Repr-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:

{"hello": "world"}
</sourcecode>
            </figure>
            <figure title="Empty response with Digest">
               <sourcecode type="http-message">
HTTP/1.1 204 No Content
Content-Type: application/json
Content-Encoding: br
Repr-Digest: sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:

</sourcecode>
            </figure>
         </section>
         <section anchor="client-and-server-provide-full-representation-data-1">
            <name>Client and Server Provide Full Representation Data</name>
            <t>The response contains two digest values using different algorithms.</t>
            <t>As the response body contains non-printable characters, it is displayed as a base64-encoded string.</t>
            <figure title="PUT Request with Digest">
               <sourcecode type="http-message">
PUT /items/123 HTTP/1.1
Host: foo.example
Content-Type: application/json
Accept-Encoding: br
Repr-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:

{"hello": "world"}
</sourcecode>
            </figure>
            <figure title="Response with Digest of Encoded Content">
               <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Content-Encoding: br
Content-Location: /items/123
Repr-Digest: \
  sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:,\
  sha-512=:pxo7aYzcGI88pnDnoSmAnaOEVys0MABhgvHY9+VI+ElE60jBCwnMPyA/\
  s3NF3ZO5oIWA7lf8ukk+5KJzm3p5og==:

iwiAeyJoZWxsbyI6ICJ3b3JsZCJ9Aw==
</sourcecode>
            </figure>
         </section>
         <section anchor="post-not-request-uri">
            <name>POST Response does not Reference the Request URI</name>
            <t>The request <spanx style="verb">Repr-Digest</spanx> field-value is computed on the enclosed representation (see <xref target="state-changing-requests"/>).</t>
            <t>The representation enclosed in the response refers to the resource identified by <spanx style="verb">Content-Location</spanx> (see <xref section="6.4.2" sectionFormat="of" target="SEMANTICS"><?aug-anchor identifying.content?><?aug-title Identifying Content?></xref>). <spanx style="verb">Repr-Digest</spanx> is thus computed on the enclosed representation.</t>
            <figure title="POST Request with Digest">
               <sourcecode type="http-message">
POST /books HTTP/1.1
Host: foo.example
Content-Type: application/json
Accept: application/json
Accept-Encoding: identity
Repr-Digest: sha-256=:bWopGGNiZtbVgHsG+I4knzfEJpmmmQHf7RHDXA3o1hQ=:

{"title": "New Title"}
</sourcecode>
            </figure>
            <figure title="Response with Digest of Resource">
               <sourcecode type="http-message">
HTTP/1.1 201 Created
Content-Type: application/json
Content-Location: /books/123
Location: /books/123
Repr-Digest: sha-256=:yxOAqEeoj+reqygSIsLpT0LhumrNkIds5uLKtmdLyYE=:

{
  "id": "123",
  "title": "New Title"
}
</sourcecode>
            </figure>
            <t>Note that a <spanx style="verb">204 No Content</spanx> response without content but with the same <spanx style="verb">Repr-Digest</spanx> field-value would have been legitimate too. In that case, <spanx style="verb">Content-Digest</spanx> would have been computed on an empty content.</t>
         </section>
         <section anchor="post-referencing-status">
            <name>POST Response Describes the Request Status</name>
            <t>The request <spanx style="verb">Repr-Digest</spanx> field-value is computed on the enclosed representation (see <xref target="state-changing-requests"/>).</t>
            <t>The representation enclosed in the response describes the status of the request, so <spanx style="verb">Repr-Digest</spanx> is computed on that enclosed representation.</t>
            <t>Response <spanx style="verb">Repr-Digest</spanx> has no explicit relation with the resource referenced by <spanx style="verb">Location</spanx>.</t>
            <figure title="POST Request with Digest">
               <sourcecode type="http-message">
POST /books HTTP/1.1
Host: foo.example
Content-Type: application/json
Accept: application/json
Accept-Encoding: identity
Repr-Digest: sha-256=:bWopGGNiZtbVgHsG+I4knzfEJpmmmQHf7RHDXA3o1hQ=:

{"title": "New Title"}
</sourcecode>
            </figure>
            <figure title="Response with Digest of Representation">
               <sourcecode type="http-message">
HTTP/1.1 201 Created
Content-Type: application/json
Repr-Digest: sha-256=:2LBp5RKZGpsSNf8BPXlXrX4Td4Tf5R5bZ9z7kdi5VvY=:
Location: /books/123

{
  "status": "created",
  "id": "123",
  "ts": 1569327729,
  "instance": "/books/123"
}
</sourcecode>
            </figure>
         </section>
         <section anchor="digest-with-patch">
            <name>Digest with PATCH</name>
            <t>This case is analogous to a POST request where the target resource reflects the effective request URI.</t>
            <t>The PATCH request uses the <spanx style="verb">application/merge-patch+json</spanx> media type defined in <xref target="RFC7396"/>.</t>
            <t>
               <spanx style="verb">Repr-Digest</spanx> is calculated on the enclosed payload, which corresponds to the patch document.</t>
            <t>The response <spanx style="verb">Repr-Digest</spanx> field-value is computed on the complete representation of the patched resource.</t>
            <figure anchor="fig-patch" title="PATCH Request with Digest">
               <sourcecode type="http-message">
PATCH /books/123 HTTP/1.1
Host: foo.example
Content-Type: application/merge-patch+json
Accept: application/json
Accept-Encoding: identity
Repr-Digest: sha-256=:bWopGGNiZtbVgHsG+I4knzfEJpmmmQHf7RHDXA3o1hQ=:

{"title": "New Title"}
</sourcecode>
            </figure>
            <figure title="Response with Digest of Representation">
               <sourcecode type="http-message">
HTTP/1.1 200 OK
Content-Type: application/json
Repr-Digest: sha-256=:yxOAqEeoj+reqygSIsLpT0LhumrNkIds5uLKtmdLyYE=:

{
  "id": "123",
  "title": "New Title"
}
</sourcecode>
            </figure>
            <t>Note that a <spanx style="verb">204 No Content</spanx> response without content but with the same <spanx style="verb">Repr-Digest</spanx> field-value would have been legitimate too.</t>
         </section>
         <section anchor="error-responses">
            <name>Error responses</name>
            <t>In error responses, the "representation data" does not necessarily refer to the target resource. Instead, it refers to the representation of the error.</t>
            <t>In the following example, a client sends the same request from <xref target="fig-patch"/> to patch the resource located at /books/123. However, the resource does not exist and the server generates a 404 response with a body that describes the error in accordance with <xref target="RFC7807"/>.</t>
            <t>The response <spanx style="verb">Repr-Digest</spanx> field-value is computed on this enclosed representation.</t>
            <figure title="Response with Digest of Error Representation">
               <sourcecode type="http-message">
HTTP/1.1 404 Not Found
Content-Type: application/problem+json
Repr-Digest: sha-256=:KPqhVXAT25LLitV1w0O167unHmVQusu+fpxm65zAsvk=:

{
  "title": "Not Found",
  "detail": "Cannot PATCH a non-existent resource",
  "status": 404
}
</sourcecode>
            </figure>
         </section>
         <section anchor="use-with-trailer-fields-and-transfer-coding">
            <name>Use with Trailer Fields and Transfer Coding</name>
            <t>An origin server sends <spanx style="verb">Repr-Digest</spanx> as trailer field, so it can calculate digest-value while streaming content and thus mitigate resource consumption. The <spanx style="verb">Repr-Digest</spanx> field-value is the same as in <xref target="example-full-representation"/> because <spanx style="verb">Repr-Digest</spanx> is designed to be independent from the use of one or more transfer codings (see <xref target="representation-digest"/>).</t>
            <figure title="GET Request">
               <sourcecode type="http-message">
GET /items/123 HTTP/1.1
Host: foo.example

</sourcecode>
            </figure>
            <figure title="Chunked Response with Digest">
               <sourcecode type="http-message">
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Trailer: Digest

8\r\n
{"hello"\r\n
8
: "world\r\n
2\r\n
"}\r\n
0\r\n
Repr-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:

</sourcecode>
            </figure>
         </section>
      </section>
      <section anchor="examples-solicited">
         <name>Examples of Want-Repr-Digest Solicited Digest</name>
         <t>The following examples demonstrate interactions where a client solicits a <spanx style="verb">Repr-Digest</spanx> using <spanx style="verb">Want-Repr-Digest</spanx>. The behavior of <spanx style="verb">Content-Digest</spanx> and <spanx style="verb">Want-Content-Digest</spanx> is identical.</t>
         <t>Some examples include JSON objects in the content. For presentation purposes, objects that fit completely within the line-length limits are presented on a single line using compact notation with no leading space. Objects that would exceed line-length limits are presented across multiple lines (one line per key-value pair) with 2 spaced of leading indentation.</t>
         <t>Checksum mechanisms described in this document are media-type agnostic and do not provide canonicalization algorithms for specific formats. Examples are calculated inclusive of any space.</t>
         <section anchor="server-selects-clients-least-preferred-algorithm">
            <name>Server Selects Client's Least Preferred Algorithm</name>
            <t>The client requests a digest, preferring "sha". The server is free to reply with "sha-256" anyway.</t>
            <figure title="GET Request with Want-Repr-Digest">
               <sourcecode type="http-message">
GET /items/123 HTTP/1.1
Host: foo.example
Want-Repr-Digest: sha-256=3, sha=10

</sourcecode>
            </figure>
            <figure title="Response with Different Algorithm">
               <sourcecode type="http-message">
HTTP/1.1 200 OK
Content-Type: application/json
Repr-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:

{"hello": "world"}
</sourcecode>
            </figure>
         </section>
         <section anchor="ex-server-selects-unsupported-algorithm">
            <name>Server Selects Algorithm Unsupported by Client</name>
            <t>The client requests a "sha" digest because that is the only algorithm it supports. The server is not obliged to produce a response containing a "sha" digest, it instead uses a different algorithm.</t>
            <figure title="GET Request with Want-Repr-Digest">
               <sourcecode type="http-message">
GET /items/123 HTTP/1.1
Host: foo.example
Want-Repr-Digest: sha=10

</sourcecode>
            </figure>
            <figure title="Response with Unsupported Algorithm">
               <sourcecode type="http-message">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Repr-Digest: \
  sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrI\
  iYllu7BNNyealdVLvRwEmTHWXvJwew==:

{"hello": "world"}
</sourcecode>
            </figure>
         </section>
         <section anchor="server-does-not-support-client-algorithm-and-returns-an-error">
            <name>Server Does Not Support Client Algorithm and Returns an Error</name>
            <t>
               <xref target="ex-server-selects-unsupported-algorithm"/> is an example where a server ignores the client's preferred digest algorithm. Alternatively a server can also reject the request and return an error.</t>
            <t>In this example, the client requests a "sha" <spanx style="verb">Repr-Digest</spanx>, and the server returns an error with problem details <xref target="RFC7807"/> contained in the content. The problem details contain a list of the hashing algorithms that the server supports. This is purely an example, this specification does not define any format or requirements for such content.</t>
            <figure title="GET Request with Want-Repr-Digest">
               <sourcecode type="http-message">
GET /items/123 HTTP/1.1
Host: foo.example
Want-Repr-Digest: sha=10

</sourcecode>
            </figure>
            <figure title="Response advertising the supported algorithms">
               <sourcecode type="http-message">
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json

{
  "title": "Bad Request",
  "detail": "Supported hashing algorithms: sha-256, sha-512",
  "status": 400
}
</sourcecode>
            </figure>
         </section>
      </section>
      <section anchor="acknowledgements" numbered="false">
         <name>Acknowledgements</name>
         <t>This document is based on ideas from <xref target="RFC3230"/>, so thanks to J. Mogul and A. Van Hoff for their great work. The original idea of refreshing RFC3230 arose from an interesting discussion with M. Nottingham, J. Yasskin and M. Thomson when reviewing the MICE content coding.</t>
         <t>Thanks to Julian Reschke for his valuable contributions to this document, and to the following contributors that have helped improve this specification by reporting bugs, asking smart questions, drafting or reviewing text, and evaluating open issues: Mike Bishop, Brian Campbell, Matthew Kerwin, James Manger, Tommy Pauly, Sean Turner, Justin Richer, and Erik Wilde.</t>
      </section>
      <section anchor="code-samples" numbered="false">
         <name>Code Samples</name>
         <t>
            <em>RFC Editor: Please remove this section before publication.</em>
         </t>
         <t>How can I generate and validate the <spanx style="verb">Repr-Digest</spanx> values shown in the examples throughout this document?</t>
         <t>The following python3 code can be used to generate digests for JSON objects using SHA algorithms for a range of encodings. Note that these are formatted as base64. This function could be adapted to other algorithms and should take into account their specific formatting rules.</t>
         <figure>
            <artwork>
import base64, json, hashlib, brotli, logging
log = logging.getLogger()

def encode_item(item, encoding=lambda x: x):
    indent = 2 if isinstance(item, dict) and len(item) &gt; 1 else None
    json_bytes = json.dumps(item, indent=indent).encode()
    return encoding(json_bytes)

def digest_bytes(bytes_, algorithm=hashlib.sha256):
    checksum_bytes = algorithm(bytes_).digest()
    log.warning("Log bytes: \n[%r]", bytes_)
    return base64.encodebytes(checksum_bytes).strip()

def digest(item, encoding=lambda x: x, algorithm=hashlib.sha256):
    content_encoded = encode_item(item, encoding)
    return digest_bytes(content_encoded, algorithm)


item = {"hello": "world"}

print("Encoding | hashing algorithm | digest-value")
print("Identity | sha256 |", digest(item))
# Encoding | hashing algorithm | digest-value
# Identity | sha256 | X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=

print("Encoding | hashing algorithm | digest-value")
print("Brotli | sha256 |", digest(item, encoding=brotli.compress))
# Encoding | hashing algorithm | digest-value
# Brotli | sha256 | 4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=

print("Encoding | hashing algorithm | digest-value")
print("Identity | sha512 |", digest(item, algorithm=hashlib.sha512))
print("Brotli | sha512 |", digest(item, algorithm=hashlib.sha512,
                                    encoding=brotli.compress))
# Encoding | hashing algorithm | digest-value
# Identity | sha512 |b'WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm'
#                     '+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew=='
# Brotli | sha512 | b'pxo7aYzcGI88pnDnoSmAnaOEVys0MABhgvHY9+VI+ElE6'
#                   '0jBCwnMPyA/s3NF3ZO5oIWA7lf8ukk+5KJzm3p5og=='

</artwork>
         </figure>
      </section>
      <section anchor="changes" numbered="false">
         <name>Changes</name>
         <t>
            <em>RFC Editor: Please remove this section before publication.</em>
         </t>
         <section anchor="since-draft-ietf-httpbis-digest-headers-06" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-06</name>
            <t>
               <list style="symbols">
                  <t>Remove id-sha-256 and id-sha-512 from the list of supported algorithms #855</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-digest-headers-05" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-05</name>
            <t>
               <list style="symbols">
                  <t>Reboot digest-algorithm values registry #1567</t>
                  <t>Add Content-Digest #1542</t>
                  <t>Remove SRI section #1478</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-digest-headers-04" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-04</name>
            <t>
               <list style="symbols">
                  <t>Improve SRI section #1354</t>
                  <t>About duplicate digest-algorithms #1221</t>
                  <t>Improve security considerations #852</t>
                  <t>md5 and sha deprecation references #1392</t>
                  <t>Obsolete 3230 #1395</t>
                  <t>Editorial #1362</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-digest-headers-03" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-03</name>
            <t>
               <list style="symbols">
                  <t>Reference semantics-12</t>
                  <t>Detail encryption quirks</t>
                  <t>Details on Algorithm agility #1250</t>
                  <t>Obsolete parameters #850</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-digest-headers-02" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-02</name>
            <t>
               <list style="symbols">
                  <t>Deprecate SHA-1 #1154</t>
                  <t>Avoid id-* with encrypted content</t>
                  <t>Digest is independent from MESSAGING and HTTP/1.1 is not normative #1215</t>
                  <t>Identity is not a valid field value for content-encoding #1223</t>
                  <t>Mention trailers #1157</t>
                  <t>Reference httpbis-semantics #1156</t>
                  <t>Add contentMD5 as an obsoleted digest-algorithm #1249</t>
                  <t>Use lowercase digest-algorithms names in the doc and in the digest-algorithm IANA table.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-digest-headers-01" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-01</name>
            <t>
               <list style="symbols">
                  <t>Digest of error responses is computed on the error representation-data #1004</t>
                  <t>Effect of HTTP semantics on payload and message body moved to appendix #1122</t>
                  <t>Editorial refactoring, moving headers sections up. #1109-#1112, #1116, #1117, #1122-#1124</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-digest-headers-00" numbered="false">
            <name>Since draft-ietf-httpbis-digest-headers-00</name>
            <t>
               <list style="symbols">
                  <t>Align title with document name</t>
                  <t>Add id-sha-* algorithm examples #880</t>
                  <t>Reference <xref target="RFC6234"/> and <xref target="RFC3174"/> instead of FIPS-1</t>
                  <t>Deprecate MD5</t>
                  <t>Obsolete ADLER-32 but don't forbid it #828</t>
                  <t>Update CRC32C value in IANA table #828</t>
                  <t>Use when acting on resources (POST, PATCH) #853</t>
                  <t>Added Relationship with SRI, draft Use Cases #868, #971</t>
                  <t>Warn about the implications of <spanx style="verb">Content-Location</spanx>
                  </t>
               </list>
            </t>
         </section>
      </section>
   </back>
</rfc>
