<?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.3.37 -->
<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="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"
     docName="draft-ietf-httpbis-message-signatures-02"
     ipr="trust200902"
     submissionType="IETF">
   <x:feedback template="mailto:quic@ietf.org?subject={docname},%20%22{section}%22\&amp;amp;body=%3c{ref}%3e:"/>
   <front>
      <title>Signing HTTP Messages</title>
      <author fullname="Annabelle Backman"
              initials="A."
              role="editor"
              surname="Backman">
         <organization>Amazon</organization>
         <address>
            <postal>
               <street>P.O. Box 81226</street>
               <city>Seattle</city>
               <region>WA</region>
               <code>98108-1226</code>
               <country>United States of America</country>
            </postal>
            <email>richanna@amazon.com</email>
            <uri>https://www.amazon.com/</uri>
         </address>
      </author>
      <author fullname="Justin Richer" initials="J." surname="Richer">
         <organization>Bespoke Engineering</organization>
         <address>
            <email>ietf@justin.richer.org</email>
            <uri>https://bspk.io/</uri>
         </address>
      </author>
      <author fullname="Manu Sporny" initials="M." surname="Sporny">
         <organization>Digital Bazaar</organization>
         <address>
            <postal>
               <street>203 Roanoke Street W.</street>
               <city>Blacksburg</city>
               <region>VA</region>
               <code>24060</code>
               <country>United States of America</country>
            </postal>
            <email>msporny@digitalbazaar.com</email>
            <uri>https://manu.sporny.org/</uri>
         </address>
      </author>
      <date day="15" month="March" year="2021"/>
      <area>Applications and Real-Time</area>
      <workgroup>HTTP</workgroup>
      <keyword>PKI</keyword>
      <abstract>
         <t>This document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes over content within 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.</t>
      </abstract>
      <note title="Note to Readers">
         <t>
            <em>RFC EDITOR: please remove this section before publication</em>
         </t>
         <t>Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/">https://lists.w3.org/Archives/Public/ietf-http-wg/</eref>.</t>
         <t>Working Group information can be found at <eref target="https://httpwg.org/">https://httpwg.org/</eref>; source code and issues list for this draft can be found at <eref target="https://github.com/httpwg/http-extensions/labels/signatures">https://github.com/httpwg/http-extensions/labels/signatures</eref>.</t>
      </note>
   </front>
   <middle>
      <section anchor="intro">
         <name>Introduction</name>
         <t>Message integrity and authenticity are important security properties that are critical to the secure operation of many HTTP applications. Application developers typically rely on the transport layer to provide these properties, by operating their application over <xref target="TLS"/>. However, TLS only guarantees these properties over a single TLS connection, and the path between client and application may be composed of multiple independent TLS connections (for example, if the application is hosted behind a TLS-terminating gateway or if the client is behind a TLS Inspection appliance). In such cases, TLS cannot guarantee end-to-end message integrity or authenticity between the client and application. Additionally, some operating environments present obstacles that make it impractical to use TLS, or to use features necessary to provide message authenticity. Furthermore, some applications require the binding of an application-level key to the HTTP message, separate from any TLS certificates in use. Consequently, while TLS can meet message integrity and authenticity needs for many HTTP-based applications, it is not a universal solution.</t>
         <t>This document defines a mechanism for providing end-to-end integrity and authenticity for content within an HTTP message. The mechanism allows applications to create digital signatures or message authentication codes (MACs) over only that content within the message that is meaningful and appropriate for the application. Strict canonicalization rules ensure that the verifier can verify the signature even if the message has been transformed in any of the many ways permitted by HTTP.</t>
         <t>The mechanism described in this document consists of three parts:</t>
         <t>
            <list style="symbols">
               <t>A common nomenclature and canonicalization rule set for the different protocol elements and other content within HTTP messages.</t>
               <t>Algorithms for generating and verifying signatures over HTTP message content using this nomenclature and rule set.</t>
               <t>A mechanism for attaching a signature and related metadata to an HTTP message.</t>
            </list>
         </t>
         <section anchor="requirements-discussion">
            <name>Requirements Discussion</name>
            <t>HTTP permits and sometimes requires intermediaries to transform messages in a variety of ways. This may result in a recipient receiving a message that is not bitwise equivalent to the message that was oringally sent. In such a case, the recipient will be unable to verify a signature over the raw bytes of the sender's HTTP message, as verifying digital signatures or MACs requires both signer and verifier to have the exact same signed content. Since the raw bytes of the message cannot be relied upon as signed content, the signer and verifier must derive the signed content from their respective versions of the message, via a mechanism that is resilient to safe changes that do not alter the meaning of the message.</t>
            <t>For a variety of reasons, it is impractical to strictly define what constitutes a safe change versus an unsafe one. Applications use HTTP in a wide variety of ways, and may disagree on whether a particular piece of information in a message (e.g., the body, or the <spanx style="verb">Date</spanx> header field) is relevant. Thus a general purpose solution must provide signers with some degree of control over which message content is signed.</t>
            <t>HTTP applications may be running in environments that do not provide complete access to or control over HTTP messages (such as a web browser's JavaScript environment), or may be using libraries that abstract away the details of the protocol (such as <eref target="https://openjdk.java.net/groups/net/httpclient/intro.html">the Java HTTPClient library</eref>). These applications need to be able to generate and verify signatures despite incomplete knowledge of the HTTP message.</t>
         </section>
         <section anchor="about_sigs">
            <name>HTTP Message Transformations</name>
            <t>As mentioned earlier, HTTP explicitly permits and in some cases requires implementations to transform messages in a variety of ways. Implementations are required to tolerate many of these transformations. What follows is a non-normative and non-exhaustive list of transformations that may occur under HTTP, provided as context:</t>
            <t>
               <list style="symbols">
                  <t>Re-ordering of header fields with different header field names (<xref target="MESSAGING" x:fmt="," x:sec="3.2.2"/>).</t>
                  <t>Combination of header fields with the same field name (<xref target="MESSAGING" x:fmt="," x:sec="3.2.2"/>).</t>
                  <t>Removal of header fields listed in the <spanx style="verb">Connection</spanx> header field (<xref target="MESSAGING" x:fmt="," x:sec="6.1"/>).</t>
                  <t>Addition of header fields that indicate control options (<xref target="MESSAGING" x:fmt="," x:sec="6.1"/>).</t>
                  <t>Addition or removal of a transfer coding (<xref target="MESSAGING" x:fmt="," x:sec="5.7.2"/>).</t>
                  <t>Addition of header fields such as <spanx style="verb">Via</spanx> (<xref target="MESSAGING" x:fmt="," x:sec="5.7.1"/>) and <spanx style="verb">Forwarded</spanx> (<xref target="RFC7239" x:fmt="," x:sec="4"/>).</t>
               </list>
            </t>
         </section>
         <section anchor="safe-transformations">
            <name>Safe Transformations</name>
            <t>Based on the definition of HTTP and the requirements described above, we can identify certain types of transformations that should not prevent signature verification, even when performed on content covered by the signature. The following list describes those transformations:</t>
            <t>
               <list style="symbols">
                  <t>Combination of header fields with the same field name.</t>
                  <t>Reordering of header fields with different names.</t>
                  <t>Conversion between different versions of the HTTP protocol (e.g., HTTP/1.x to HTTP/2, or vice-versa).</t>
                  <t>Changes in casing (e.g., "Origin" to "origin") of any case-insensitive content such as header field names, request URI scheme, or host.</t>
                  <t>Addition or removal of leading or trailing whitespace to a header field value.</t>
                  <t>Addition or removal of <spanx style="verb">obs-folds</spanx>.</t>
                  <t>Changes to the <spanx style="verb">request-target</spanx> and <spanx style="verb">Host</spanx> header field that when applied together do not result in a change to the message's effective request URI, as defined in <xref target="MESSAGING" x:fmt="of" x:sec="5.5"/>.</t>
               </list>
            </t>
            <t>Additionally, all changes to content not covered by the signature are considered safe.</t>
         </section>
         <section anchor="definitions">
            <name>Conventions and Terminology</name>
            <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" 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>The terms "HTTP message", "HTTP request", "HTTP response", <spanx style="verb">absolute-form</spanx>, <spanx style="verb">absolute-path</spanx>, "effective request URI", "gateway", "header field", "intermediary", <spanx style="verb">request-target</spanx>, "sender", and "recipient" are used as defined in <xref target="MESSAGING"/>.</t>
            <t>The term "method" is to be interpreted as defined in <xref target="SEMANTICS" x:fmt="of" x:sec="4"/>.</t>
            <t>For brevity, the term "signature" on its own is used in this document to refer to both digital signatures and keyed MACs. Similarly, the verb "sign" refers to the generation of either a digital signature or keyed MAC over a given input string. The qualified term "digital signature" refers specifically to the output of an asymmetric cryptographic signing operation.</t>
            <t>In addition to those listed above, this document uses the following terms:</t>
            <dl newline="true">
               <dt>Signer:</dt>
               <dd>
                  <t>The entity that is generating or has generated an HTTP Message Signature.</t>
               </dd>
               <dt>Verifier:</dt>
               <dd>
                  <t>An entity that is verifying or has verified an HTTP Message Signature against an HTTP Message. Note that an HTTP Message Signature may be verified multiple times, potentially by different entities.</t>
               </dd>
            </dl>
            <t>The term "Unix time" is defined by <xref target="POSIX.1"/>
               <eref target="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16">section 4.16</eref>.</t>
            <t>This document contains non-normative examples of partial and complete HTTP messages. To improve readability, header fields may be split into multiple lines, using the <spanx style="verb">obs-fold</spanx> syntax. This syntax is deprecated in <xref target="MESSAGING"/>, and senders MUST NOT generate messages that include it.</t>
            <t>Additionally, some examples use '\' line wrapping for long values that contain no whitespace, as per <xref target="RFC8792"/>.</t>
         </section>
         <section anchor="application">
            <name>Application of HTTP Message Signatures</name>
            <t>HTTP Message Signatures are designed to be a general-purpose security mechanism applicable in a wide variety of circumstances and applications. In order to properly and safely apply HTTP Message Signatures, an application or profile of this specification MUST specify all of the following items:</t>
            <t>
               <list style="symbols">
                  <t>The set of <xref target="content-identifiers">content identifiers</xref> that are expected and required. For example, an authorization protocol would mandate that the <spanx style="verb">Authorization</spanx> header be covered to protect the authorization credentials, as well as a <spanx style="verb">*created</spanx> field to allow replay detection.</t>
                  <t>A means of retrieving the key material used to verify the signature. An application will usually use the <spanx style="verb">keyid</spanx> field of the <spanx style="verb">Signature-Input</spanx> header value and define rules for resolving a key from there.</t>
                  <t>A means of determining the signature algorithm used to verify the signature content is appropriate for the key material.</t>
                  <t>A means of determining that a given key and algorithm presented in the request are appropriate for the request being made. For example, a server expecting only ECDSA signatures should know to reject any RSA signatures; or a server expecting asymmetric cryptography should know to reject any symmetric cryptography.</t>
               </list>
            </t>
            <t>The details of this kind of profiling are the purview of the application and outside the scope of this specification.</t>
         </section>
      </section>
      <section anchor="content-identifiers">
         <name>Identifying and Canonicalizing Content</name>
         <t>In order to allow signers and verifiers to establish which content is covered by a signature, this document defines content identifiers for data items covered by an HTTP Message Signature.</t>
         <t>Some content within HTTP messages can undergo transformations that change the bitwise value without altering meaning of the content (for example, the merging together of header fields with the same name). Message content must therefore be canonicalized before it is signed, to ensure that a signature can be verified despite such intermediary transformations. This document defines rules for each content identifier that transform the identifier's associated content into such a canonical form.</t>
         <t>Content identifiers are defined using production grammar defined by <xref target="RFC8941"/> section 4. The content identifier is an <spanx style="verb">sf-string</spanx> value. The content identifier type MAY define parameters which are included using the <spanx style="verb">parameters</spanx> rule.</t>
         <figure>
            <artwork>
content-identifier = sf-string parameters
</artwork>
         </figure>
         <t>Note that this means the value of the identifier itself is encased in double quotes, with parameters following as a semicolon-separated list, such as <spanx style="verb">"cache-control"</spanx>, <spanx style="verb">"date"</spanx>, or <spanx style="verb">"@signature-params"</spanx>.</t>
         <t>The following sections define content identifier types, their parameters, their associated content, and their canonicalization rules.</t>
         <section anchor="http-header">
            <name>HTTP Headers</name>
            <t>The content identifier for an HTTP header is the lowercased form of its header field name. While HTTP header field names are case-insensitive, implementations MUST use lowercased field names (e.g., <spanx style="verb">content-type</spanx>, <spanx style="verb">date</spanx>, <spanx style="verb">etag</spanx>) when using them as content identifiers.</t>
            <t>Unless overridden by additional parameters and rules, the HTTP header field value MUST be canonicalized with the following steps:</t>
            <t>
               <list style="numbers">
                  <t>Create an ordered list of the field values of each instance of the header field in the message, in the order that they occur (or will occur) in the message.</t>
                  <t>Strip leading and trailing whitespace from each item in the list.</t>
                  <t>Concatenate the list items together, with a comma "," and space " " between each item.</t>
               </list>
            </t>
            <t>The resulting string is the canonicalized value.</t>
            <section anchor="http-header-structured">
               <name>Canonicalized Structured HTTP Headers</name>
               <t>If value of the the HTTP header in question is a structured field <xref target="RFC8941"/>, the content identifier MAY include the <spanx style="verb">sf</spanx> parameter. If this parameter is included, the HTTP header value MUST be canonicalized using the rules specified in <xref target="RFC8941"/> section 4. Note that this process will replace any optional whitespace with a single space.</t>
               <t>The resulting string is used as the field value input in <xref target="http-header"/>.</t>
            </section>
            <section anchor="canonicalization-examples">
               <name>Canonicalization Examples</name>
               <t>This section contains non-normative examples of canonicalized values for header fields, given the following example HTTP message:</t>
               <figure>
                  <sourcecode type="http-message">
HTTP/1.1 200 OK
Server: www.example.com
Date: Tue, 07 Jun 2014 20:51:35 GMT
X-OWS-Header:   Leading and trailing whitespace.    
X-Obs-Fold-Header: Obsolete
    line folding.
X-Empty-Header:
Cache-Control: max-age=60
Cache-Control:    must-revalidate
</sourcecode>
               </figure>
               <t>The following table shows example canonicalized values for header fields, given that message:</t>
               <texttable title="Non-normative examples of header field canonicalization.">
                  <ttcol align="left">Header Field</ttcol>
                  <ttcol align="left">Canonicalized Value</ttcol>
                  <c>
                     <spanx style="verb">"cache-control"</spanx>
                  </c>
                  <c>max-age=60, must-revalidate</c>
                  <c>
                     <spanx style="verb">"date"</spanx>
                  </c>
                  <c>Tue, 07 Jun 2014 20:51:35 GMT</c>
                  <c>
                     <spanx style="verb">"server"</spanx>
                  </c>
                  <c>www.example.com</c>
                  <c>
                     <spanx style="verb">"x-empty-header"</spanx>
                  </c>
                  <c> </c>
                  <c>
                     <spanx style="verb">"x-obs-fold-header"</spanx>
                  </c>
                  <c>Obsolete line folding.</c>
                  <c>
                     <spanx style="verb">"x-ows-header"</spanx>
                  </c>
                  <c>Leading and trailing whitespace.</c>
               </texttable>
            </section>
         </section>
         <section anchor="dictionary-structured-field-members">
            <name>Dictionary Structured Field Members</name>
            <t>An individual member in the value of a Dictionary Structured Field is identified by using the parameter <spanx style="verb">key</spanx> on the content identifier for the header. The value of this parameter is a the key being identified, without any parameters present on that key in the original dictionary.</t>
            <t>An individual member in the value of a Dictionary Structured Field is canonicalized by applying the serialization algorithm described in <xref target="RFC8941" x:fmt="of" x:sec="4.1.2"/> on a Dictionary containing only that member.</t>
            <section anchor="canonicalization-examples-1">
               <name>Canonicalization Examples</name>
               <t>This section contains non-normative examples of canonicalized values for Dictionary Structured Field Members given the following example header field, whose value is assumed to be a Dictionary:</t>
               <figure>
                  <sourcecode type="http-message">
X-Dictionary:  a=1, b=2;x=1;y=2, c=(a b c)
</sourcecode>
               </figure>
               <t>The following table shows example canonicalized values for different content identifiers, given that field:</t>
               <texttable title="Non-normative examples of Dictionary member canonicalization.">
                  <ttcol align="left">Content Identifier</ttcol>
                  <ttcol align="left">Canonicalized Value</ttcol>
                  <c>
                     <spanx style="verb">"x-dictionary";key=a</spanx>
                  </c>
                  <c>1</c>
                  <c>
                     <spanx style="verb">"x-dictionary";key=b</spanx>
                  </c>
                  <c>2;x=1;y=2</c>
                  <c>
                     <spanx style="verb">"x-dictionary";key=c</spanx>
                  </c>
                  <c>(a, b, c)</c>
               </texttable>
            </section>
         </section>
         <section anchor="list-prefixes">
            <name>List Prefixes</name>
            <t>A prefix of a List Structured Field consisting of the first N members in the field's value (where N is an integer greater than 0 and less than or equal to the number of members in the List) is identified by the parameter <spanx style="verb">prefix</spanx> with the value of N as an integer.</t>
            <t>A list prefix value is canonicalized by applying the serialization algorithm described in <xref target="RFC8941" x:fmt="of" x:sec="4.1.1"/> on a List containing only the first N members as specified in the list prefix, in the order they appear in the original List.</t>
            <section anchor="canonicalization-examples-2">
               <name>Canonicalization Examples</name>
               <t>This section contains non-normative examples of canonicalized values for list prefixes given the following example header fields, whose values are assumed to be Dictionaries:</t>
               <figure>
                  <sourcecode type="http-message">
X-List-A: (a b c d e f)
X-List-B: ()
</sourcecode>
               </figure>
               <t>The following table shows example canonicalized values for different content identifiers, given those fields:</t>
               <texttable title="Non-normative examples of list prefix canonicalization.">
                  <ttcol align="left">Content Identifier</ttcol>
                  <ttcol align="left">Canonicalized Value</ttcol>
                  <c>
                     <spanx style="verb">"x-list-a";prefix=0</spanx>
                  </c>
                  <c>()</c>
                  <c>
                     <spanx style="verb">"x-list-a";prefix=1</spanx>
                  </c>
                  <c>(a)</c>
                  <c>
                     <spanx style="verb">"x-list-a";prefix=3</spanx>
                  </c>
                  <c>(a, b, c)</c>
                  <c>
                     <spanx style="verb">"x-list-a";prefix=6</spanx>
                  </c>
                  <c>(a, b, c, d, e, f)</c>
                  <c>
                     <spanx style="verb">"x-list-b";prefix=0</spanx>
                  </c>
                  <c>()</c>
               </texttable>
            </section>
         </section>
         <section anchor="specialty-content-fields">
            <name>Specialty Content Fields</name>
            <t>Content not found in an HTTP header can be included in the signature base string by defining a content identifier and the canonicalization method for its content.</t>
            <t>To differentiate speciality content identifiers from HTTP headers, specialty content identifiers MUST start with the "at" <spanx style="verb">@</spanx> character. This specification defines the following specialty content identifiers:</t>
            <dl>
               <dt>@request-target</dt>
               <dd>
                  <t>The target request endpoint. <xref target="content-request-target"/>
                  </t>
               </dd>
               <dt>@signature-params</dt>
               <dd>
                  <t>The signature metadata parameters for this signature. <xref target="content-signature-params"/>
                  </t>
               </dd>
            </dl>
            <t>Additional specialty content identifiers MAY be defined and registered in the HTTP Signatures Specialty Content Identifier Registry. <xref target="content-registry"/>
            </t>
            <section anchor="content-request-target">
               <name>Request Target</name>
               <t>The request target endpoint, consisting of the request method and the path and query of the effective request URI, is identified by the <spanx style="verb">@request-target</spanx> identifier.</t>
               <t>Its value is canonicalized as follows:</t>
               <t>
                  <list style="numbers">
                     <t>Take the lowercased HTTP method of the message.</t>
                     <t>Append a space " ".</t>
                     <t>Append the path and query of the request target of the message, formatted according to the rules defined for the :path pseudo-header in <xref target="HTTP2" x:fmt="," x:sec="8.1.2.3"/>. The resulting string is the canonicalized value.</t>
                  </list>
               </t>
               <section anchor="canonicalization-examples-3">
                  <name>Canonicalization Examples</name>
                  <t>The following table contains non-normative example HTTP messages and their canonicalized <spanx style="verb">@request-target</spanx> values.</t>
                  <table>
                     <name>Non-normative examples of <tt>@request-target</tt> canonicalization.</name>
                     <thead>
                        <tr>
                           <th>HTTP Message</th>
                           <th>@request-target</th>
                        </tr>
                     </thead>
                     <tbody>
                        <tr>
                           <td>
                              <sourcecode type="http-message">
POST /?param=value HTTP/1.1
Host: www.example.com</sourcecode>
                           </td>
                           <td>
                              <tt>post /?param=value</tt>
                           </td>
                        </tr>
                        <tr>
                           <td>
                              <sourcecode type="http-message">
POST /a/b HTTP/1.1
Host: www.example.com</sourcecode>
                           </td>
                           <td>
                              <tt>post /a/b</tt>
                           </td>
                        </tr>
                        <tr>
                           <td>
                              <sourcecode type="http-message">
GET http://www.example.com/a/ HTTP/1.1</sourcecode>
                           </td>
                           <td>
                              <tt>get /a/</tt>
                           </td>
                        </tr>
                        <tr>
                           <td>
                              <sourcecode type="http-message">
GET http://www.example.com HTTP/1.1</sourcecode>
                           </td>
                           <td>
                              <tt>get /</tt>
                           </td>
                        </tr>
                        <tr>
                           <td>
                              <sourcecode type="http-message">
CONNECT server.example.com:80 HTTP/1.1
Host: server.example.com</sourcecode>
                           </td>
                           <td>
                              <tt>connect /</tt>
                           </td>
                        </tr>
                        <tr>
                           <td>
                              <sourcecode type="http-message">
OPTIONS * HTTP/1.1
Host: server.example.com</sourcecode>
                           </td>
                           <td>
                              <tt>options *</tt>
                           </td>
                        </tr>
                     </tbody>
                  </table>
               </section>
            </section>
            <section anchor="content-signature-params">
               <name>Signature Parameters</name>
               <t>The signature parameters special content is identified by the <spanx style="verb">@signature-params</spanx> identifier.</t>
               <t>Its canonicalized value is the serialization of the signature parameters for this signature, including the covered content list with all associated parameters. <xref target="signature-metadata"/>
               </t>
               <t>Note that an HTTP message could contain multiple signatures, but only the signature parameters used for the current signature are included.</t>
               <section anchor="canonicalization-examples-4">
                  <name>Canonicalization Examples</name>
                  <t>Given the following signature parameters:</t>
                  <texttable>
                     <ttcol align="left">Property</ttcol>
                     <ttcol align="left">Value</ttcol>
                     <c>Algorithm</c>
                     <c>
                        <spanx style="verb">hs2019</spanx>
                     </c>
                     <c>Covered Content</c>
                     <c>
                        <spanx style="verb">@request-target</spanx>, <spanx style="verb">host</spanx>, <spanx style="verb">date</spanx>, <spanx style="verb">cache-control</spanx>, <spanx style="verb">x-emptyheader</spanx>, <spanx style="verb">x-example</spanx>, <spanx style="verb">x-dictionary;key=b</spanx>, <spanx style="verb">x-dictionary;key=a</spanx>, <spanx style="verb">x-list;prefix=3</spanx>
                     </c>
                     <c>Creation Time</c>
                     <c>
                        <spanx style="verb">1402174295</spanx>
                     </c>
                     <c>Expiration Time</c>
                     <c>
                        <spanx style="verb">1402174595</spanx>
                     </c>
                     <c>Verification Key Material</c>
                     <c>The public key provided in <xref target="example-key-rsa-test"/> and identified by the <spanx style="verb">keyid</spanx> value "test-key-a".</c>
                  </texttable>
                  <t>The signature parameter value is defined as:</t>
                  <figure>
                     <artwork>
"@signature-params": ("@request-target" "host" "date" "cache-control" "x-empty-header" "x-example" "x-dictionary";key=b "x-dictionary";key=a "x-list";prefix=3); keyid="test-key-a"; alg="hs2019"; created=1402170695; expires=1402170995
</artwork>
                  </figure>
               </section>
            </section>
         </section>
      </section>
      <section anchor="message-signatures">
         <name>HTTP Message Signatures</name>
         <t>An HTTP Message Signature is a signature over a string generated from a subset of the content in an HTTP message and metadata about the signature itself. When successfully verified against an HTTP message, it provides cryptographic proof that with respect to the subset of content that was signed, the message is semantically equivalent to the message for which the signature was generated.</t>
         <section anchor="signature-metadata">
            <name>Signature Metadata</name>
            <t>HTTP Message Signatures have metadata properties that provide information regarding the signature's generation and/or verification. The following metadata properties are defined:</t>
            <dl newline="true">
               <dt>Algorithm:</dt>
               <dd>
                  <t>An HTTP Signature Algorithm defined in the HTTP Signature Algorithms Registry defined in this document, represented as a string. It describes the signing and verification algorithms for the signature.</t>
               </dd>
               <dt>Creation Time:</dt>
               <dd>
                  <t>A timestamp representing the point in time that the signature was generated, represented as an integer. Sub-second precision is not supported. A signature's Creation Time MAY be undefined, indicating that it is unknown.</t>
               </dd>
               <dt>Expiration Time:</dt>
               <dd>
                  <t>A timestamp representing the point in time at which the signature expires, represented as an integer. An expired signature always fails verification. A signature's Expiration Time MAY be undefined, indicating that the signature does not expire.</t>
               </dd>
               <dt>Verification Key Material:</dt>
               <dd>
                  <t>The key material required to verify the signature.</t>
               </dd>
               <dt>Covered Content:</dt>
               <dd>
                  <t>An ordered list of content identifiers (Section 2) that indicates the metadata and message content that is covered by the signature. This list MUST NOT include the <spanx style="verb">@signature-params</spanx> content identifier.</t>
               </dd>
            </dl>
            <t>The signature metadata is serialized using the rules in <xref target="RFC8941"/> section 4 as follows:</t>
            <t>
               <list style="numbers">
                  <t>Let the output be an empty string.</t>
                  <t>Serialize the content identifiers as an ordered <spanx style="verb">inner-list</spanx> according to <xref target="RFC8941"/> section 4.1.1.1 and append this to the output.</t>
                  <t>Append the signature metadata as parameters according to <xref target="RFC8941"/> section 4.1.1.2 in the any order, skipping fields that are not available: <list style="symbols">
                        <t>
                           <spanx style="verb">alg</spanx>: Algorithm as an <spanx style="verb">sf-string</spanx> value.</t>
                        <t>
                           <spanx style="verb">keyid</spanx>: Verification Key Material as an <spanx style="verb">sf-string</spanx> value.</t>
                        <t>
                           <spanx style="verb">created</spanx>: Creation Time as an <spanx style="verb">sf-integer</spanx> timestamp value.</t>
                        <t>
                           <spanx style="verb">expires</spanx>: Expiration Time as an <spanx style="verb">sf-integer</spanx> timestamp value.</t>
                     </list>
                  </t>
               </list>
            </t>
            <t>Note that the <spanx style="verb">inner-list</spanx> serialization is used instead of the <spanx style="verb">sf-list</spanx> serialization in order to facilitate this value's inclusion in the <spanx style="verb">Signature-Input</spanx> header's dictionary, as discussed in <xref target="signature-input-header"/>.</t>
            <t>The <xref target="example-metadata"/> values would be serialized as follows:</t>
            <figure>
               <artwork>
("@request-target" "host" "date" "cache-control" "x-empty-header" "x-example"); keyid="test-key-a"; alg="hs2019"; created=1402170695; expires=1402170995
</artwork>
            </figure>
         </section>
         <section anchor="create">
            <name>Creating a Signature</name>
            <t>In order to create a signature, a signer completes the following process:</t>
            <t>
               <list style="numbers">
                  <t>Choose key material and algorithm, and set metadata properties <xref target="choose-metadata"/>
                  </t>
                  <t>Create the Signature Input <xref target="create-sig-input"/>
                  </t>
                  <t>Sign the Signature Input <xref target="sign-sig-input"/>
                  </t>
               </list>
            </t>
            <t>The following sections describe each of these steps in detail.</t>
            <section anchor="choose-metadata">
               <name>Choose and Set Signature Metadata Properties</name>
               <t>
                  <list style="numbers">
                     <t>The signer chooses an HTTP Signature Algorithm from those registered in the HTTP Signature Algorithms Registry defined by this document, and sets the signature's Algorithm property to that value. The signer MUST NOT choose an algorithm marked "Deprecated". The mechanism by which the signer chooses an algorithm is out of scope for this document.</t>
                     <t>The signer chooses key material to use for signing and verification, and sets the signature's Verification Key Material property to the key material required for verification. The signer MUST choose key material that is appropriate for the signature's Algorithm, and that conforms to any requirements defined by the Algorithm, such as key size or format. The mechanism by which the signer chooses key material is out of scope for this document.</t>
                     <t>The signer sets the signature's Creation Time property to the current time.</t>
                     <t>The signer sets the signature's Expiration Time property to the time at which the signature is to expire, or to undefined if the signature will not expire.</t>
                     <t>The signer creates an ordered list of content identifiers representing the message content and signature metadata to be covered by the signature, and assigns this list as the signature's Covered Content. <list style="symbols">
                           <t>Each identifier MUST be one of those defined in Section 2.</t>
                           <t>This list MUST NOT be empty, as this would result in creating a signature over the empty string.</t>
                           <t>Signers SHOULD include <spanx style="verb">@request-target</spanx> in the list.</t>
                           <t>Signers SHOULD include a date stamp, such as the <spanx style="verb">date</spanx> header. Alternatively, the <spanx style="verb">created</spanx> signature metadata parameter can fulfil this role.</t>
                           <t>Further guidance on what to include in this list and in what order is out of scope for this document. However, the list order is significant and once established for a given signature it MUST be preserved for that signature.</t>
                           <t>Note that the signature metadata is not included in the explicit list of covered content identifiers since its value is always covered.</t>
                        </list>
                     </t>
                  </list>
               </t>
               <t>For example, given the following HTTP message:</t>
               <figure>
                  <sourcecode type="http-message">
GET /foo HTTP/1.1
Host: example.org
Date: Sat, 07 Jun 2014 20:51:35 GMT
X-Example: Example header
        with some whitespace.
X-EmptyHeader:
X-Dictionary: a=1, b=2
X-List: (a b c d)
Cache-Control: max-age=60
Cache-Control: must-revalidate
</sourcecode>
               </figure>
               <t>The following table presents a non-normative example of metadata values that a signer may choose:</t>
               <texttable anchor="example-metadata" title="Non-normative example metadata values">
                  <ttcol align="left">Property</ttcol>
                  <ttcol align="left">Value</ttcol>
                  <c>Algorithm</c>
                  <c>
                     <spanx style="verb">hs2019</spanx>
                  </c>
                  <c>Covered Content</c>
                  <c>
                     <spanx style="verb">@request-target</spanx>, <spanx style="verb">host</spanx>, <spanx style="verb">date</spanx>, <spanx style="verb">cache-control</spanx>, <spanx style="verb">x-emptyheader</spanx>, <spanx style="verb">x-example</spanx>, <spanx style="verb">x-dictionary;key=b</spanx>, <spanx style="verb">x-dictionary;key=a</spanx>, <spanx style="verb">x-list;prefix=3</spanx>
                  </c>
                  <c>Creation Time</c>
                  <c>
                     <spanx style="verb">1402174295</spanx>
                  </c>
                  <c>Expiration Time</c>
                  <c>
                     <spanx style="verb">1402174595</spanx>
                  </c>
                  <c>Verification Key Material</c>
                  <c>The public key provided in <xref target="example-key-rsa-test"/> and identified by the <spanx style="verb">keyid</spanx> value "test-key-a".</c>
               </texttable>
            </section>
            <section anchor="create-sig-input">
               <name>Create the Signature Input</name>
               <t>The Signature Input is a US-ASCII string containing the content that will be signed. To create it, the signer or verifier concatenates together entries for each identifier in the signature's Covered Content in the order it occurs in the list, with each entry separated by a newline <spanx style="verb">"\n"</spanx>. An identifier's entry is a <spanx style="verb">sf-string</spanx> followed with a colon <spanx style="verb">":"</spanx>, a space <spanx style="verb">" "</spanx>, and the identifier's canonicalized value.</t>
               <t>The signer or verifier then includes the signature metadata specialty field <spanx style="verb">@signature-params</spanx> as the last entry in the covered content, separated by a newline <spanx style="verb">"\n"</spanx>. <xref target="content-signature-params"/>
               </t>
               <t>If Covered Content contains an identifier for a header field that is malformed or is not present in the message, the implementation MUST produce an error.</t>
               <t>If Covered Content contains an identifier for a Dictionary member that references a header field using the <spanx style="verb">key</spanx> parameter that is not present, is malformed in the message, or is not a Dictionary Structured Field, the implementation MUST produce an error. If the header field value does not contain the specified member, the implementation MUST produce an error.</t>
               <t>If Covered Content contains an identifier for a List Prefix that references a header field using the <spanx style="verb">prefix</spanx> parameter that is not present, is malformed in the message, or is not a List Structured Field, the implementation MUST produce an error. If the header field value contains fewer than the specified number of members, the implementation MUST produce an error.</t>
               <t>For the non-normative example Signature metadata in <xref target="example-metadata"/>, the corresponding Signature Input is:</t>
               <figure anchor="example-sig-input"
                       title="Non-normative example Signature Input">
                  <artwork name="example-sig-input">
"@request-target": get /foo
"host": example.org
"date": Tue, 07 Jun 2014 20:51:35 GMT
"cache-control": max-age=60, must-revalidate
"x-emptyheader":
"x-example": Example header with some whitespace.
"x-dictionary";key=b: 2
"x-dictionary";key=a: 1
"x-list";prefix=3: (a, b, c)
"@signature-params": ("@request-target" "host" "date" "cache-control" "x-empty-header" "x-example" "x-dictionary";key=b "x-dictionary";key=b "x-list";prefix=3); keyid="test-key-a"; alg="hs2019"; created=1402170695; expires=1402170995
</artwork>
               </figure>
            </section>
            <section anchor="sign-sig-input">
               <name>Sign the Signature Input</name>
               <t>The signer signs the Signature Input using the signing algorithm described by the signature's Algorithm property, and the key material chosen by the signer. The signer then encodes the result of that operation as a base 64-encoded string <xref target="RFC4648"/>. This string is the signature value.</t>
               <t>For the non-normative example Signature metadata in <xref target="choose-metadata"/> and Signature Input in <xref target="example-sig-input"/>, the corresponding signature value is:</t>
               <figure anchor="example-sig-value"
                       title="Non-normative example signature value">
                  <artwork>
K2qGT5srn2OGbOIDzQ6kYT+ruaycnDAAUpKv+ePFfD0RAxn/1BUeZx/Kdrq32DrfakQ6b
PsvB9aqZqognNT6be4olHROIkeV879RrsrObury8L9SCEibeoHyqU/yCjphSmEdd7WD+z
rchK57quskKwRefy2iEC5S2uAH0EPyOZKWlvbKmKu5q4CaB8X/I5/+HLZLGvDiezqi6/7
p2Gngf5hwZ0lSdy39vyNMaaAT0tKo6nuVw0S1MVg1Q7MpWYZs0soHjttq0uLIA3DIbQfL
iIvK6/l0BdWTU7+2uQj7lBkQAsFZHoA96ZZgFquQrXRlmYOh+Hx5D9fJkXcXe5tmAg==
</artwork>
               </figure>
            </section>
         </section>
         <section anchor="verify">
            <name>Verifying a Signature</name>
            <t>In order to verify a signature, a verifier MUST:</t>
            <t>
               <list style="numbers">
                  <t>Examine the signature's metadata to confirm that the signature meets the requirements described in this document, as well as any additional requirements defined by the application such as which header fields or other content are required to be covered by the signature.</t>
                  <t>Use the received HTTP message and the signature's metadata to recreate the Signature Input, using the process described in <xref target="create-sig-input"/>. The value of the <spanx style="verb">@signature-params</spanx> input is the value of the signature input header field for this signature, not including the signature's label.</t>
                  <t>Use the signature's Algorithm and Verification Key Material with the recreated Signing Input to verify the signature value.</t>
               </list>
            </t>
            <t>A signature with a Creation Time that is in the future or an Expiration Time that is in the past MUST NOT be processed.</t>
            <t>The verifier MUST ensure that a signature's Algorithm is appropriate for the key material the verifier will use to verify the signature. If the Algorithm is not appropriate for the key material (for example, if it is the wrong size, or in the wrong format), the signature MUST NOT be processed.</t>
            <section anchor="enforcing-application-requirements">
               <name>Enforcing Application Requirements</name>
               <t>The verification requirements specified in this document are intended as a baseline set of restrictions that are generally applicable to all use cases. Applications using HTTP Message Signatures MAY impose requirements above and beyond those specified by this document, as appropriate for their use case.</t>
               <t>Some non-normative examples of additional requirements an application might define are:</t>
               <t>
                  <list style="symbols">
                     <t>Requiring a specific set of header fields to be signed (e.g., Authorization, Digest).</t>
                     <t>Enforcing a maximum signature age.</t>
                     <t>Prohibiting the use of certain algorithms, or mandating the use of an algorithm.</t>
                     <t>Requiring keys to be of a certain size (e.g., 2048 bits vs. 1024 bits).</t>
                  </list>
               </t>
               <t>Application-specific requirements are expected and encouraged. When an application defines additional requirements, it MUST enforce them during the signature verification process, and signature verification MUST fail if the signature does not conform to the application's requirements.</t>
               <t>Applications MUST enforce the requirements defined in this document. Regardless of use case, applications MUST NOT accept signatures that do not conform to these requirements.</t>
            </section>
         </section>
      </section>
      <section anchor="including-a-message-signature-in-a-message">
         <name>Including a Message Signature in a Message</name>
         <t>Message signatures can be included within an HTTP message via the <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> HTTP header fields, both defined within this specification. The <spanx style="verb">Signature</spanx> HTTP header field contains signature values, while the <spanx style="verb">Signature-Input</spanx> HTTP header field identifies the Covered Content and metadata that describe how each signature was generated.</t>
         <section anchor="signature-input-header">
            <name>The 'Signature-Input' HTTP Header</name>
            <t>The <spanx style="verb">Signature-Input</spanx> HTTP header field is a Dictionary Structured Header <xref target="RFC8941"/> containing the metadata for zero or more message signatures generated from content within the HTTP message. Each member describes a single message signature. The member's name is an identifier that uniquely identifies the message signature within the context of the HTTP message. The member's value is the serialization of the covered content including all signature metadata parameters, described in <xref target="signature-metadata"/>.</t>
            <figure>
               <artwork>
Signature-Input: sig1=("@request-target" "host" "date"
    "cache-control" "x-empty-header" "x-example"); keyid="test-key-a";
    alg="hs2019"; created=1402170695; expires=1402170995
</artwork>
            </figure>
            <t>To facilitate signature validation, the <spanx style="verb">Signature-Input</spanx> header MUST contain the same serialization value used in generating the signature input.</t>
         </section>
         <section anchor="signature-header">
            <name>The 'Signature' HTTP Header</name>
            <t>The <spanx style="verb">Signature</spanx> HTTP header field is a Dictionary Structured Header <xref target="RFC8941"/> containing zero or more message signatures generated from content within the HTTP message. Each member's name is a signature identifier that is present as a member name in the <spanx style="verb">Signature-Input</spanx> Structured Header within the HTTP message. Each member's value is a Byte Sequence containing the signature value for the message signature identified by the member name. Any member in the <spanx style="verb">Signature</spanx> HTTP header field that does not have a corresponding member in the HTTP message's <spanx style="verb">Signature-Input</spanx> HTTP header field MUST be ignored.</t>
            <figure>
               <artwork>
Signature: sig1=:K2qGT5srn2OGbOIDzQ6kYT+ruaycnDAAUpKv+ePFfD0RAxn/1BUe\
    Zx/Kdrq32DrfakQ6bPsvB9aqZqognNT6be4olHROIkeV879RrsrObury8L9SCEibe\
    oHyqU/yCjphSmEdd7WD+zrchK57quskKwRefy2iEC5S2uAH0EPyOZKWlvbKmKu5q4\
    CaB8X/I5/+HLZLGvDiezqi6/7p2Gngf5hwZ0lSdy39vyNMaaAT0tKo6nuVw0S1MVg\
    1Q7MpWYZs0soHjttq0uLIA3DIbQfLiIvK6/l0BdWTU7+2uQj7lBkQAsFZHoA96ZZg\
    FquQrXRlmYOh+Hx5D9fJkXcXe5tmAg==:
</artwork>
            </figure>
         </section>
         <section anchor="examples">
            <name>Examples</name>
            <t>The following is a non-normative example of <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> HTTP header fields representing the signature in <xref target="example-sig-value"/>:</t>
            <figure>
               <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

Signature-Input: sig1=("@request-target" "host" "date"
    "cache-control" "x-empty-header" "x-example"); keyid="test-key-a";
    alg="hs2019"; created=1402170695; expires=1402170995
Signature: sig1=:K2qGT5srn2OGbOIDzQ6kYT+ruaycnDAAUpKv+ePFfD0RAxn/1BUe\
    Zx/Kdrq32DrfakQ6bPsvB9aqZqognNT6be4olHROIkeV879RrsrObury8L9SCEibe\
    oHyqU/yCjphSmEdd7WD+zrchK57quskKwRefy2iEC5S2uAH0EPyOZKWlvbKmKu5q4\
    CaB8X/I5/+HLZLGvDiezqi6/7p2Gngf5hwZ0lSdy39vyNMaaAT0tKo6nuVw0S1MVg\
    1Q7MpWYZs0soHjttq0uLIA3DIbQfLiIvK6/l0BdWTU7+2uQj7lBkQAsFZHoA96ZZg\
    FquQrXRlmYOh+Hx5D9fJkXcXe5tmAg==:
</sourcecode>
            </figure>
            <t>Since <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> are both defined as Dictionary Structured Headers, they can be used to easily include multiple signatures within the same HTTP message. For example, a signer may include multiple signatures signing the same content with different keys and/or algorithms to support verifiers with different capabilities, or a reverse proxy may include information about the client in header fields when forwarding the request to a service host, and may also include a signature over those fields and the client's signature. The following is a non-normative example of header fields a reverse proxy might add to a forwarded request that contains the signature in the above example:</t>
            <figure>
               <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

X-Forwarded-For: 192.0.2.123
Signature-Input: reverse_proxy_sig=("host" "date"
    "signature";key=sig1 "x-forwarded-for"); keyid="test-key-a";
    alg="hs2019"; created=1402170695; expires=1402170695
Signature: reverse_proxy_sig=:ON3HsnvuoTlX41xfcGWaOEVo1M3bJDRBOp0Pc/O\
    jAOWKQn0VMY0SvMMWXS7xG+xYVa152rRVAo6nMV7FS3rv0rR5MzXL8FCQ2A35DCEN\
    LOhEgj/S1IstEAEFsKmE9Bs7McBsCtJwQ3hMqdtFenkDffSoHOZOInkTYGafkoy78\
    l1VZvmb3Y4yf7McJwAvk2R3gwKRWiiRCw448Nt7JTWzhvEwbh7bN2swc/v3NJbg/w\
    JYyYVbelZx4IywuZnYFxgPl/qvqbAjeEVvaLKLgSMr11y+uzxCHoMnDUnTYhMrmOT\
    4O8lBLfRFOcoJPKBdoKg9U0a96U2mUug1bFOozEVYFg==:
</sourcecode>
            </figure>
         </section>
      </section>
      <section anchor="iana">
         <name>IANA Considerations</name>
         <section anchor="hsa-registry">
            <name>HTTP Signature Algorithms Registry</name>
            <t>This document defines HTTP Signature Algorithms, for which IANA is asked to create and maintain a new registry titled "HTTP Signature Algorithms". Initial values for this registry are given in <xref target="iana-hsa-contents"/>. Future assignments and modifications to existing assignment are to be made through the Expert Review registration policy <xref target="RFC8126"/> and shall follow the template presented in <xref target="iana-hsa-template"/>.</t>
            <section anchor="iana-hsa-template">
               <name>Registration Template</name>
               <dl newline="true">
                  <dt>Algorithm Name:</dt>
                  <dd>
                     <t>An identifier for the HTTP Signature Algorithm. The name MUST be an ASCII string consisting only of lower-case characters (<spanx style="verb">"a"</spanx> - <spanx style="verb">"z"</spanx>), digits (<spanx style="verb">"0"</spanx> - <spanx style="verb">"9"</spanx>), and hyphens (<spanx style="verb">"-"</spanx>), and SHOULD NOT exceed 20 characters in length. The identifier MUST be unique within the context of the registry.</t>
                  </dd>
                  <dt>Status:</dt>
                  <dd>
                     <t>A brief text description of the status of the algorithm. The description MUST begin with one of "Active" or "Deprecated", and MAY provide further context or explanation as to the reason for the status.</t>
                  </dd>
                  <dt>Description:</dt>
                  <dd>
                     <t>A description of the algorithm used to sign the signing string when generating an HTTP Message Signature, or instructions on how to determine that algorithm. When the description specifies an algorithm, it MUST include a reference to the document or documents that define the algorithm.</t>
                  </dd>
               </dl>
            </section>
            <section anchor="iana-hsa-contents">
               <name>Initial Contents</name>
               <t>(( MS: The references in this section are problematic as many of the specifications that they refer to are too implementation specific, rather than just pointing to the proper signature and hashing specifications. A better approach might be just specifying the signature and hashing function specifications, leaving implementers to connect the dots (which are not that hard to connect). ))</t>
               <section anchor="hs2019">
                  <name>hs2019</name>
                  <dl newline="true">
                     <dt>Algorithm Name:</dt>
                     <dd>
                        <t>
                           <spanx style="verb">hs2019</spanx>
                        </t>
                     </dd>
                     <dt>Status:</dt>
                     <dd>
                        <t>active</t>
                     </dd>
                     <dt>Description:</dt>
                     <dd>
                        <t>Derived from metadata associated with keyid. Recommend support for:</t>
                     </dd>
                     <dt/>
                     <dd>
                        <t>
                           <list style="symbols">
                              <t>RSASSA-PSS <xref target="RFC8017"/> using SHA-512 <xref target="RFC6234"/>
                              </t>
                           </list>
                        </t>
                     </dd>
                     <dt/>
                     <dd>
                        <t>
                           <list style="symbols">
                              <t>HMAC <xref target="RFC2104"/> using SHA-512 <xref target="RFC6234"/>
                              </t>
                           </list>
                        </t>
                     </dd>
                     <dt/>
                     <dd>
                        <t>
                           <list style="symbols">
                              <t>ECDSA using curve P-256 DSS <xref target="FIPS186-4"/> and SHA-512 <xref target="RFC6234"/>
                              </t>
                           </list>
                        </t>
                     </dd>
                     <dt/>
                     <dd>
                        <t>
                           <list style="symbols">
                              <t>Ed25519ph, Ed25519ctx, and Ed25519 <xref target="RFC8032"/>
                              </t>
                           </list>
                        </t>
                     </dd>
                  </dl>
               </section>
               <section anchor="rsa-sha1">
                  <name>rsa-sha1</name>
                  <dl newline="true">
                     <dt>Algorithm Name:</dt>
                     <dd>
                        <t>
                           <spanx style="verb">rsa-sha1</spanx>
                        </t>
                     </dd>
                     <dt>Status:</dt>
                     <dd>
                        <t>Deprecated; SHA-1 not secure.</t>
                     </dd>
                     <dt>Description:</dt>
                     <dd>
                        <t>RSASSA-PKCS1-v1_5 <xref target="RFC8017"/> using SHA-1 <xref target="RFC6234"/>
                        </t>
                     </dd>
                  </dl>
               </section>
               <section anchor="rsa-sha256">
                  <name>rsa-sha256</name>
                  <dl newline="true">
                     <dt>Algorithm Name:</dt>
                     <dd>
                        <t>
                           <spanx style="verb">rsa-sha256</spanx>
                        </t>
                     </dd>
                     <dt>Status:</dt>
                     <dd>
                        <t>Deprecated; specifying signature algorithm enables attack vector.</t>
                     </dd>
                     <dt>Description:</dt>
                     <dd>
                        <t>RSASSA-PKCS1-v1_5 <xref target="RFC8017"/> using SHA-256 <xref target="RFC6234"/>
                        </t>
                     </dd>
                  </dl>
               </section>
               <section anchor="hmac-sha256">
                  <name>hmac-sha256</name>
                  <dl newline="true">
                     <dt>Algorithm Name:</dt>
                     <dd>
                        <t>
                           <spanx style="verb">hmac-sha256</spanx>
                        </t>
                     </dd>
                     <dt>Status:</dt>
                     <dd>
                        <t>Deprecated; specifying signature algorithm enables attack vector.</t>
                     </dd>
                     <dt>Description:</dt>
                     <dd>
                        <t>HMAC <xref target="RFC2104"/> using SHA-256 <xref target="RFC6234"/>
                        </t>
                     </dd>
                  </dl>
               </section>
               <section anchor="ecdsa-sha256">
                  <name>ecdsa-sha256</name>
                  <dl newline="true">
                     <dt>Algorithm Name:</dt>
                     <dd>
                        <t>
                           <spanx style="verb">ecdsa-sha256</spanx>
                        </t>
                     </dd>
                     <dt>Status:</dt>
                     <dd>
                        <t>Deprecated; specifying signature algorithm enables attack vector.</t>
                     </dd>
                     <dt>Description:</dt>
                     <dd>
                        <t>ECDSA using curve P-256 DSS <xref target="FIPS186-4"/> and SHA-256 <xref target="RFC6234"/>
                        </t>
                     </dd>
                  </dl>
               </section>
            </section>
         </section>
         <section anchor="param-registry">
            <name>HTTP Signature Metadata Parameters Registry</name>
            <t>This document defines the <spanx style="verb">Signature-Input</spanx> Structured Header, whose member values may have parameters containing metadata about a message signature. IANA is asked to create and maintain a new registry titled "HTTP Signature Metadata Parameters" to record and maintain the set of parameters defined for use with member values in the <spanx style="verb">Signature-Input</spanx> Structured Header. Initial values for this registry are given in <xref target="iana-param-contents"/>. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy <xref target="RFC8126"/> and shall follow the template presented in <xref target="iana-param-template"/>.</t>
            <section anchor="iana-param-template">
               <name>Registration Template</name>
            </section>
            <section anchor="iana-param-contents">
               <name>Initial Contents</name>
               <t>The table below contains the initial contents of the HTTP Signature Metadata Parameters Registry. Each row in the table represents a distinct entry in the registry.</t>
               <texttable title="Initial contents of the HTTP Signature Metadata Parameters Registry.">
                  <ttcol align="left">Name</ttcol>
                  <ttcol align="left">Status</ttcol>
                  <ttcol align="left">Reference(s)</ttcol>
                  <c>
                     <spanx style="verb">alg</spanx>
                  </c>
                  <c>Active</c>
                  <c>
                     <xref target="signature-metadata"/> of this document</c>
                  <c>
                     <spanx style="verb">created</spanx>
                  </c>
                  <c>Active</c>
                  <c>
                     <xref target="signature-metadata"/> of this document</c>
                  <c>
                     <spanx style="verb">expires</spanx>
                  </c>
                  <c>Active</c>
                  <c>
                     <xref target="signature-metadata"/> of this document</c>
                  <c>
                     <spanx style="verb">keyid</spanx>
                  </c>
                  <c>Active</c>
                  <c>
                     <xref target="signature-metadata"/> of this document</c>
               </texttable>
            </section>
         </section>
         <section anchor="content-registry">
            <name>HTTP Signature Specialty Content Identifiers Registry</name>
            <t>This document defines a method for canonicalizing HTTP message content, including content that can be generated from the context of the HTTP message outside of the HTTP headers. This content is identified by a unique key. IANA is asked to create and maintain a new registry typed "HTTP Signature Specialty Content Identifiers" to record and maintain the set of non-header content identifiers and their canonicalization method. Initial values for this registry are given in <xref target="iana-content-contents"/>. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy <xref target="RFC8126"/> and shall follow the template presented in <xref target="iana-content-template"/>.</t>
            <section anchor="iana-content-template">
               <name>Registration Template</name>
            </section>
            <section anchor="iana-content-contents">
               <name>Initial Contents</name>
               <t>The table below contains the initial contents of the HTTP Signature Specialty Content Identifiers Registry.</t>
               <texttable title="Initial contents of the HTTP Signature Specialty Content Identifiers Registry.">
                  <ttcol align="left">Name</ttcol>
                  <ttcol align="left">Status</ttcol>
                  <ttcol align="left">Reference(s)</ttcol>
                  <c>
                     <spanx style="verb">@request-target</spanx>
                  </c>
                  <c>Active</c>
                  <c>
                     <xref target="content-request-target"/> of this document</c>
                  <c>
                     <spanx style="verb">@signature-params</spanx>
                  </c>
                  <c>Active</c>
                  <c>
                     <xref target="content-signature-params"/> of this document</c>
               </texttable>
            </section>
         </section>
      </section>
      <section anchor="security">
         <name>Security Considerations</name>
         <t>(( TODO: need to dive deeper on this section; not sure how much of what's referenced below is actually applicable, or if it covers everything we need to worry about. ))</t>
         <t>(( TODO: Should provide some recommendations on how to determine what content needs to be signed for a given use case. ))</t>
         <t>There are a number of security considerations to take into account when implementing or utilizing this specification. A thorough security analysis of this protocol, including its strengths and weaknesses, can be found in <xref target="WP-HTTP-Sig-Audit"/>.</t>
      </section>
   </middle>
   <back>
      <references title="Normative References">
         <reference anchor="RFC2104">
            <front>
               <title>HMAC: Keyed-Hashing for Message Authentication</title>
               <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
               <author fullname="M. Bellare" initials="M." surname="Bellare"/>
               <author fullname="R. Canetti" initials="R." surname="Canetti"/>
               <date month="February" year="1997"/>
            </front>
            <seriesInfo name="RFC" value="2104"/>
            <seriesInfo name="DOI" value="10.17487/RFC2104"/>
         </reference>
         <reference anchor="FIPS186-4"
                    target="https://csrc.nist.gov/publications/detail/fips/186/4/final">
            <front>
               <title>Digital Signature Standard (DSS)</title>
               <author/>
               <date year="2013"/>
            </front>
         </reference>
         <reference anchor="POSIX.1"
                    target="https://pubs.opengroup.org/onlinepubs/9699919799/">
            <front>
               <title>The Open Group Base Specifications Issue 7, 2018 edition</title>
               <author/>
               <date year="2018"/>
            </front>
         </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="MESSAGING">
            <front>
               <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
               <author fullname="R. Fielding"
                       initials="R."
                       role="editor"
                       surname="Fielding"/>
               <author fullname="J. Reschke"
                       initials="J."
                       role="editor"
                       surname="Reschke"/>
               <date month="June" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7230"/>
            <seriesInfo name="DOI" value="10.17487/RFC7230"/>
         </reference>
         <reference anchor="SEMANTICS">
            <front>
               <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
               <author fullname="R. Fielding"
                       initials="R."
                       role="editor"
                       surname="Fielding"/>
               <author fullname="J. Reschke"
                       initials="J."
                       role="editor"
                       surname="Reschke"/>
               <date month="June" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7231"/>
            <seriesInfo name="DOI" value="10.17487/RFC7231"/>
         </reference>
         <reference anchor="RFC8792">
            <front>
               <title>Handling Long Lines in Content of Internet-Drafts and RFCs</title>
               <author fullname="K. Watsen" initials="K." surname="Watsen"/>
               <author fullname="E. Auerswald" initials="E." surname="Auerswald"/>
               <author fullname="A. Farrel" initials="A." surname="Farrel"/>
               <author fullname="Q. Wu" initials="Q." surname="Wu"/>
               <date month="June" year="2020"/>
            </front>
            <seriesInfo name="RFC" value="8792"/>
            <seriesInfo name="DOI" value="10.17487/RFC8792"/>
         </reference>
         <reference anchor="RFC8941">
            <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="HTTP2">
            <front>
               <title>Hypertext Transfer Protocol Version 2 (HTTP/2)</title>
               <author fullname="M. Belshe" initials="M." surname="Belshe"/>
               <author fullname="R. Peon" initials="R." surname="Peon"/>
               <author fullname="M. Thomson"
                       initials="M."
                       role="editor"
                       surname="Thomson"/>
               <date month="May" year="2015"/>
            </front>
            <seriesInfo name="RFC" value="7540"/>
            <seriesInfo name="DOI" value="10.17487/RFC7540"/>
         </reference>
      </references>
      <references title="Informative References">
         <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="RFC7239">
            <front>
               <title>Forwarded HTTP Extension</title>
               <author fullname="A. Petersson" initials="A." surname="Petersson"/>
               <author fullname="M. Nilsson" initials="M." surname="Nilsson"/>
               <date month="June" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7239"/>
            <seriesInfo name="DOI" value="10.17487/RFC7239"/>
         </reference>
         <reference anchor="RFC8017">
            <front>
               <title>PKCS #1: RSA Cryptography Specifications Version 2.2</title>
               <author fullname="K. Moriarty"
                       initials="K."
                       role="editor"
                       surname="Moriarty"/>
               <author fullname="B. Kaliski" initials="B." surname="Kaliski"/>
               <author fullname="J. Jonsson" initials="J." surname="Jonsson"/>
               <author fullname="A. Rusch" initials="A." surname="Rusch"/>
               <date month="November" year="2016"/>
            </front>
            <seriesInfo name="RFC" value="8017"/>
            <seriesInfo name="DOI" value="10.17487/RFC8017"/>
         </reference>
         <reference anchor="RFC8032">
            <front>
               <title>Edwards-Curve Digital Signature Algorithm (EdDSA)</title>
               <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
               <author fullname="I. Liusvaara" initials="I." surname="Liusvaara"/>
               <date month="January" year="2017"/>
            </front>
            <seriesInfo name="RFC" value="8032"/>
            <seriesInfo name="DOI" value="10.17487/RFC8032"/>
         </reference>
         <reference anchor="WP-HTTP-Sig-Audit"
                    target="https://web-payments.org/specs/source/http-signatures-audit/">
            <front>
               <title>Security Considerations for HTTP Signatures</title>
               <author/>
               <date year="2013"/>
            </front>
         </reference>
         <reference anchor="TLS">
            <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"/>
            </front>
            <seriesInfo name="RFC" value="8446"/>
            <seriesInfo name="DOI" value="10.17487/RFC8446"/>
         </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="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>
      </references>
      <section anchor="detection">
         <name>Detecting HTTP Message Signatures</name>
         <t>There have been many attempts to create signed HTTP messages in the past, including other non-standard definitions of the <spanx style="verb">Signature</spanx> header used within this specification. It is recommended that developers wishing to support both this specification and other historial drafts do so carefully and deliberately, as incompatibilities between this specification and various versions of other drafts could lead to problems.</t>
         <t>It is recommended that implementers first detect and validate the <spanx style="verb">Signature-Input</spanx> header defined in this specification to detect that this standard is in use and not an alternative. If the <spanx style="verb">Signature-Input</spanx> header is present, all <spanx style="verb">Signature</spanx> headers can be parsed and interpreted in the context of this draft.</t>
      </section>
      <section anchor="examples-1">
         <name>Examples</name>
         <section anchor="example-keys">
            <name>Example Keys</name>
            <t>This section provides cryptographic keys that are referenced in example signatures throughout this document. These keys MUST NOT be used for any purpose other than testing.</t>
            <section anchor="example-key-rsa-test">
               <name>Example Key RSA test</name>
               <t>The following key is a 2048-bit RSA public and private key pair:</t>
               <figure>
                  <artwork>
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAhAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsPBRrw
WEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsdJKFq
MGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd/QBwVW9OwNFhekro3RtlinV0a75jfZg
kne/YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKIlE0P
uKxI4T+HIaFpv8+rdV6eUgOrB2xeI1dSFFn/nnv5OoZJEIB+VmuKn3DCUcCZSFlQ
PSXSfBDiUGhwOw76WuSSsf1D4b/vLoJ10wIDAQAB
-----END RSA PUBLIC KEY-----

-----BEGIN RSA PRIVATE KEY-----
MIIEqAIBAAKCAQEAhAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsP
BRrwWEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsd
JKFqMGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd/QBwVW9OwNFhekro3RtlinV0a75
jfZgkne/YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKI
lE0PuKxI4T+HIaFpv8+rdV6eUgOrB2xeI1dSFFn/nnv5OoZJEIB+VmuKn3DCUcCZ
SFlQPSXSfBDiUGhwOw76WuSSsf1D4b/vLoJ10wIDAQABAoIBAG/JZuSWdoVHbi56
vjgCgkjg3lkO1KrO3nrdm6nrgA9P9qaPjxuKoWaKO1cBQlE1pSWp/cKncYgD5WxE
CpAnRUXG2pG4zdkzCYzAh1i+c34L6oZoHsirK6oNcEnHveydfzJL5934egm6p8DW
+m1RQ70yUt4uRc0YSor+q1LGJvGQHReF0WmJBZHrhz5e63Pq7lE0gIwuBqL8SMaA
yRXtK+JGxZpImTq+NHvEWWCu09SCq0r838ceQI55SvzmTkwqtC+8AT2zFviMZkKR
Qo6SPsrqItxZWRty2izawTF0Bf5S2VAx7O+6t3wBsQ1sLptoSgX3QblELY5asI0J
YFz7LJECgYkAsqeUJmqXE3LP8tYoIjMIAKiTm9o6psPlc8CrLI9CH0UbuaA2JCOM
cCNq8SyYbTqgnWlB9ZfcAm/cFpA8tYci9m5vYK8HNxQr+8FS3Qo8N9RJ8d0U5Csw
DzMYfRghAfUGwmlWj5hp1pQzAuhwbOXFtxKHVsMPhz1IBtF9Y8jvgqgYHLbmyiu1
mwJ5AL0pYF0G7x81prlARURwHo0Yf52kEw1dxpx+JXER7hQRWQki5/NsUEtv+8RT
qn2m6qte5DXLyn83b1qRscSdnCCwKtKWUug5q2ZbwVOCJCtmRwmnP131lWRYfj67
B/xJ1ZA6X3GEf4sNReNAtaucPEelgR2nsN0gKQKBiGoqHWbK1qYvBxX2X3kbPDkv
9C+celgZd2PW7aGYLCHq7nPbmfDV0yHcWjOhXZ8jRMjmANVR/eLQ2EfsRLdW69bn
f3ZD7JS1fwGnO3exGmHO3HZG+6AvberKYVYNHahNFEw5TsAcQWDLRpkGybBcxqZo
81YCqlqidwfeO5YtlO7etx1xLyqa2NsCeG9A86UjG+aeNnXEIDk1PDK+EuiThIUa
/2IxKzJKWl1BKr2d4xAfR0ZnEYuRrbeDQYgTImOlfW6/GuYIxKYgEKCFHFqJATAG
IxHrq1PDOiSwXd2GmVVYyEmhZnbcp8CxaEMQoevxAta0ssMK3w6UsDtvUvYvF22m
qQKBiD5GwESzsFPy3Ga0MvZpn3D6EJQLgsnrtUPZx+z2Ep2x0xc5orneB5fGyF1P
WtP+fG5Q6Dpdz3LRfm+KwBCWFKQjg7uTxcjerhBWEYPmEMKYwTJF5PBG9/ddvHLQ
EQeNC8fHGg4UXU8mhHnSBt3EA10qQJfRDs15M38eG2cYwB1PZpDHScDnDA0=
-----END RSA PRIVATE KEY-----
</artwork>
               </figure>
            </section>
         </section>
         <section anchor="example-keyid-values">
            <name>Example keyid Values</name>
            <t>The table below maps example <spanx style="verb">keyid</spanx> values to associated algorithms and/or keys. These are example mappings that are valid only within the context of examples in examples within this and future documents that reference this section. Unless otherwise specified, within the context of examples it should be assumed that the signer and verifier understand these <spanx style="verb">keyid</spanx> mappings. These <spanx style="verb">keyid</spanx> values are not reserved, and deployments are free to use them, with these associations or others.</t>
            <texttable>
               <ttcol align="left">keyid</ttcol>
               <ttcol align="left">Algorithm</ttcol>
               <ttcol align="left">Verification Key</ttcol>
               <c>
                  <spanx style="verb">test-key-a</spanx>
               </c>
               <c>
                  <spanx style="verb">hs2019</spanx>, using RSASSA-PSS <xref target="RFC8017"/> and SHA-512 <xref target="RFC6234"/>
               </c>
               <c>The public key specified in <xref target="example-key-rsa-test"/>
               </c>
               <c>
                  <spanx style="verb">test-key-b</spanx>
               </c>
               <c>
                  <spanx style="verb">rsa-sha256</spanx>
               </c>
               <c>The public key specified in <xref target="example-key-rsa-test"/>
               </c>
            </texttable>
         </section>
         <section anchor="test-cases">
            <name>Test Cases</name>
            <t>This section provides non-normative examples that may be used as test cases to validate implementation correctness. These examples are based on the following HTTP message:</t>
            <figure>
               <sourcecode type="http-message">
POST /foo?param=value&amp;pet=dog HTTP/1.1
Host: example.com
Date: Tue, 07 Jun 2014 20:51:35 GMT
Content-Type: application/json
Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
Content-Length: 18

{"hello": "world"}
</sourcecode>
            </figure>
            <section anchor="signature-generation">
               <name>Signature Generation</name>
               <section anchor="hs2019-signature-over-minimal-recommended-content">
                  <name>hs2019 signature over minimal recommended content</name>
                  <t>This presents metadata for a Signature using <spanx style="verb">hs2019</spanx>, over minimum recommended data to sign:</t>
                  <texttable>
                     <ttcol align="left">Property</ttcol>
                     <ttcol align="left">Value</ttcol>
                     <c>Algorithm</c>
                     <c>
                        <spanx style="verb">hs2019</spanx>, using RSASSA-PSS <xref target="RFC8017"/> using SHA-512 <xref target="RFC6234"/>
                     </c>
                     <c>Covered Content</c>
                     <c>
                        <spanx style="verb">@request-target</spanx>
                     </c>
                     <c>Creation Time</c>
                     <c>8:51:35 PM GMT, June 7th, 2014</c>
                     <c>Expiration Time</c>
                     <c>Undefined</c>
                     <c>Verification Key Material</c>
                     <c>The public key specified in <xref target="example-key-rsa-test"/>.</c>
                  </texttable>
                  <t>The Signature Input is:</t>
                  <figure>
                     <artwork>
"@request-target": post /foo?param=value&amp;pet=dog
"@signature-params": ("@request-target"); keyid="test-key-a"; created=1402170695
</artwork>
                  </figure>
                  <t>The signature value is:</t>
                  <figure>
                     <artwork>
QaVaWYfF2da6tG66Xtd0GrVFChJ0fOWUe/C6kaYESPiYYwnMH9egOgyKqgLLY9NQJFk7b
QY834sHEUwjS5ByEBaO3QNwIvqEY1qAAU/2MX14tc9Yn7ELBnaaNHaHkV3xVO9KIuLT7V
6e4OUuGb1axfbXpMgPEql6CEFrn6K95CLuuKP5/gOEcBtmJp5L58gN4VvZrk2OVA6U971
YiEDNuDa4CwMcQMvcGssbc/L3OULTUffD/1VcPtdGImP2uvVQntpT8b2lBeBpfh8MuaV2
vtzidyBYFtAUoYhRWO8+ntqA1q2OK4LMjM2XgDScSVWvGdVd459A0wI9lRlnPap3zg==
</artwork>
                  </figure>
                  <t>A possible <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> header containing this signature is:</t>
                  <figure>
                     <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

Signature-Input: sig1=("@request-target");
    keyid="test-key-a"; created=1402170695
Signature: sig1=:QaVaWYfF2da6tG66Xtd0GrVFChJ0fOWUe/C6kaYESPiYYwnMH9eg\
    OgyKqgLLY9NQJFk7bQY834sHEUwjS5ByEBaO3QNwIvqEY1qAAU/2MX14tc9Yn7ELB\
    naaNHaHkV3xVO9KIuLT7V6e4OUuGb1axfbXpMgPEql6CEFrn6K95CLuuKP5/gOEcB\
    tmJp5L58gN4VvZrk2OVA6U971YiEDNuDa4CwMcQMvcGssbc/L3OULTUffD/1VcPtd\
    GImP2uvVQntpT8b2lBeBpfh8MuaV2vtzidyBYFtAUoYhRWO8+ntqA1q2OK4LMjM2X\
    gDScSVWvGdVd459A0wI9lRlnPap3zg==:
</sourcecode>
                  </figure>
               </section>
               <section anchor="hs2019-signature-covering-all-header-fields">
                  <name>hs2019 signature covering all header fields</name>
                  <t>This presents metadata for a Signature using <spanx style="verb">hs2019</spanx> that covers all header fields in the request:</t>
                  <texttable>
                     <ttcol align="left">Property</ttcol>
                     <ttcol align="left">Value</ttcol>
                     <c>Algorithm</c>
                     <c>
                        <spanx style="verb">hs2019</spanx>, using RSASSA-PSS <xref target="RFC8017"/> using SHA-512 <xref target="RFC6234"/>
                     </c>
                     <c>Covered Content</c>
                     <c>
                        <spanx style="verb">@request-target</spanx>, <spanx style="verb">host</spanx>, <spanx style="verb">date</spanx>, <spanx style="verb">content-type</spanx>, <spanx style="verb">digest</spanx>, <spanx style="verb">content-length</spanx>
                     </c>
                     <c>Creation Time</c>
                     <c>8:51:35 PM GMT, June 7th, 2014</c>
                     <c>Expiration Time</c>
                     <c>Undefined</c>
                     <c>Verification Key Material</c>
                     <c>The public key specified in <xref target="example-key-rsa-test"/>.</c>
                  </texttable>
                  <t>The Signature Input is:</t>
                  <figure>
                     <artwork>
"@request-target": post /foo?param=value&amp;pet=dog
"host": example.com
"date": Tue, 07 Jun 2014 20:51:35 GMT
"content-type": application/json
"digest": SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
"content-length": 18
"@signature-params": ("@request-target" "host" "date" "content-type" "digest" "content-length"); keyid="test-key-a"; alg="hs2019"; created=1402170695
</artwork>
                  </figure>
                  <t>The signature value is:</t>
                  <figure>
                     <artwork>
B24UG4FaiE2kSXBNKV4DA91J+mElAhS3mncrgyteAye1GKMpmzt8jkHNjoudtqw3GngGY
3n0mmwjdfn1eA6nAjgeHwl0WXced5tONcCPNzLswqPOiobGeA5y4WE8iBveel30OKYVel
0lZ1OnXOmN5TIEIIPo9LrE+LzZis6A0HA1FRMtKgKGhT3N965pkqfhKbq/V48kpJKT8+c
Zs0TOn4HFMG+OIy6c9ofSBrXD68yxP6QYTz6xH0GMWawLyPLYR52j3I05fK1ylAb6K0ox
PxzQ5nwrLD+mUVPZ9rDs1En6fmOX9xfkZTblG/5D+s1fHHs9dDXCOVkT5dLS8DjdIA==
</artwork>
                  </figure>
                  <t>A possible <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> header containing this signature is:</t>
                  <figure>
                     <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

Signature-Input: sig1=("@request-target" "host" "date"
        "content-type" "digest" "content-length"); keyid="test-key-a";
    alg="hs2019"; created=1402170695
Signature: sig1=:B24UG4FaiE2kSXBNKV4DA91J+mElAhS3mncrgyteAye1GKMpmzt8\
    jkHNjoudtqw3GngGY3n0mmwjdfn1eA6nAjgeHwl0WXced5tONcCPNzLswqPOiobGe\
    A5y4WE8iBveel30OKYVel0lZ1OnXOmN5TIEIIPo9LrE+LzZis6A0HA1FRMtKgKGhT\
    3N965pkqfhKbq/V48kpJKT8+cZs0TOn4HFMG+OIy6c9ofSBrXD68yxP6QYTz6xH0G\
    MWawLyPLYR52j3I05fK1ylAb6K0oxPxzQ5nwrLD+mUVPZ9rDs1En6fmOX9xfkZTbl\
    G/5D+s1fHHs9dDXCOVkT5dLS8DjdIA==:
</sourcecode>
                  </figure>
               </section>
            </section>
            <section anchor="signature-verification">
               <name>Signature Verification</name>
               <section anchor="minimal-required-signature-header">
                  <name>Minimal Required Signature Header</name>
                  <t>This presents a <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> header containing only the minimal required parameters:</t>
                  <figure>
                     <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

Signature-Input: sig1=(); keyid="test-key-a"; created=1402170695
Signature: sig1=:cxieW5ZKV9R9A70+Ua1A/1FCvVayuE6Z77wDGNVFSiluSzR9TYFV\
    vwUjeU6CTYUdbOByGMCee5q1eWWUOM8BIH04Si6VndEHjQVdHqshAtNJk2Quzs6WC\
    2DkV0vysOhBSvFZuLZvtCmXRQfYGTGhZqGwq/AAmFbt5WNLQtDrEe0ErveEKBfaz+\
    IJ35zhaj+dun71YZ82b/CRfO6fSSt8VXeJuvdqUuVPWqjgJD4n9mgZpZFGBaDdPiw\
    pfbVZHzcHrumFJeFHWXH64a+c5GN+TWlP8NPg2zFdEc/joMymBiRelq236WGm5VvV\
    9a22RW2/yLmaU/uwf9v40yGR/I1NRA==:
</sourcecode>
                  </figure>
                  <t>The corresponding signature metadata derived from this header field is:</t>
                  <texttable>
                     <ttcol align="left">Property</ttcol>
                     <ttcol align="left">Value</ttcol>
                     <c>Algorithm</c>
                     <c>
                        <spanx style="verb">hs2019</spanx>, using RSASSA-PSS using SHA-256</c>
                     <c>Covered Content</c>
                     <c>``</c>
                     <c>Creation Time</c>
                     <c>8:51:35 PM GMT, June 7th, 2014</c>
                     <c>Expiration Time</c>
                     <c>Undefined</c>
                     <c>Verification Key Material</c>
                     <c>The public key specified in <xref target="example-key-rsa-test"/>.</c>
                  </texttable>
                  <t>The corresponding Signature Input is:</t>
                  <figure>
                     <artwork>
"@signature-params": sig1=(); alg="hs2019"; keyid="test-key-a"; created=1402170695
</artwork>
                  </figure>
               </section>
               <section anchor="minimal-recommended-signature-header">
                  <name>Minimal Recommended Signature Header</name>
                  <t>This presents a <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> header containing only the minimal required and recommended parameters:</t>
                  <figure>
                     <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

Signature-Input: sig1=(); alg="hs2019"; keyid="test-key-a";
    created=1402170695
Signature: sig1=:cxieW5ZKV9R9A70+Ua1A/1FCvVayuE6Z77wDGNVFSiluSzR9TYFV\
    vwUjeU6CTYUdbOByGMCee5q1eWWUOM8BIH04Si6VndEHjQVdHqshAtNJk2Quzs6WC\
    2DkV0vysOhBSvFZuLZvtCmXRQfYGTGhZqGwq/AAmFbt5WNLQtDrEe0ErveEKBfaz+\
    IJ35zhaj+dun71YZ82b/CRfO6fSSt8VXeJuvdqUuVPWqjgJD4n9mgZpZFGBaDdPiw\
    pfbVZHzcHrumFJeFHWXH64a+c5GN+TWlP8NPg2zFdEc/joMymBiRelq236WGm5VvV\
    9a22RW2/yLmaU/uwf9v40yGR/I1NRA==:
</sourcecode>
                  </figure>
                  <t>The corresponding signature metadata derived from this header field is:</t>
                  <texttable>
                     <ttcol align="left">Property</ttcol>
                     <ttcol align="left">Value</ttcol>
                     <c>Algorithm</c>
                     <c>
                        <spanx style="verb">hs2019</spanx>, using RSASSA-PSS using SHA-512</c>
                     <c>Covered Content</c>
                     <c>``</c>
                     <c>Creation Time</c>
                     <c>8:51:35 PM GMT, June 7th, 2014</c>
                     <c>Expiration Time</c>
                     <c>Undefined</c>
                     <c>Verification Key Material</c>
                     <c>The public key specified in <xref target="example-key-rsa-test"/>.</c>
                  </texttable>
                  <t>The corresponding Signature Input is:</t>
                  <figure>
                     <artwork>
"@signature-params": sig1=(); alg="rsa-sha256"; keyid="test-key-b"
</artwork>
                  </figure>
               </section>
               <section anchor="minimal-signature-header-using-rsa-sha256">
                  <name>Minimal Signature Header using rsa-sha256</name>
                  <t>This presents a minimal <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> header for a signature using the <spanx style="verb">rsa-sha256</spanx> algorithm:</t>
                  <figure>
                     <sourcecode type="http-message">
# NOTE: '\' line wrapping per RFC 8792

Signature: sig1=("date"); alg=rsa-sha256; keyid="test-key-b"
Signature: sig1=:HtXycCl97RBVkZi66ADKnC9c5eSSlb57GnQ4KFqNZplOpNfxqk62\
    JzZ484jXgLvoOTRaKfR4hwyxlcyb+BWkVasApQovBSdit9Ml/YmN2IvJDPncrlhPD\
    VDv36Z9/DiSO+RNHD7iLXugdXo1+MGRimW1RmYdenl/ITeb7rjfLZ4b9VNnLFtVWw\
    rjhAiwIqeLjodVImzVc5srrk19HMZNuUejK6I3/MyN3+3U8tIRW4LWzx6ZgGZUaEE\
    P0aBlBkt7Fj0Tt5/P5HNW/Sa/m8smxbOHnwzAJDa10PyjzdIbywlnWIIWtZKPPsoV\
    oKVopUWEU3TNhpWmaVhFrUL/O6SN3w==:
</sourcecode>
                  </figure>
                  <t>The corresponding signature metadata derived from this header field is:</t>
                  <texttable>
                     <ttcol align="left">Property</ttcol>
                     <ttcol align="left">Value</ttcol>
                     <c>Algorithm</c>
                     <c>
                        <spanx style="verb">rsa-sha256</spanx>
                     </c>
                     <c>Covered Content</c>
                     <c>
                        <spanx style="verb">date</spanx>
                     </c>
                     <c>Creation Time</c>
                     <c>Undefined</c>
                     <c>Expiration Time</c>
                     <c>Undefined</c>
                     <c>Verification Key Material</c>
                     <c>The public key specified in <xref target="example-key-rsa-test"/>.</c>
                  </texttable>
                  <t>The corresponding Signature Input is:</t>
                  <figure>
                     <artwork>
"date": Tue, 07 Jun 2014 20:51:35 GMT
"@signature-params": ("date"); alg=rsa-sha256; keyid="test-key-b"
</artwork>
                  </figure>
               </section>
            </section>
         </section>
      </section>
      <section anchor="acknowledgements" numbered="false">
         <name>Acknowledgements</name>
         <t>This specification was initially based on the draft-cavage-http-signatures internet draft. The editors would like to thank the authors of that draft, Mark Cavage and Manu Sporny, for their work on that draft and their continuing contributions.</t>
         <t>The editor would also like to thank the following individuals for feedback on and implementations of the draft-cavage-http-signatures draft (in alphabetical order): Mark Adamcin, Mark Allen, Paul Annesley, Karl Böhlmark, Stéphane Bortzmeyer, Sarven Capadisli, Liam Dennehy, ductm54, Stephen Farrell, Phillip Hallam-Baker, Eric Holmes, Andrey Kislyuk, Adam Knight, Dave Lehn, Dave Longley, James H. Manger, Ilari Liusvaara, Mark Nottingham, Yoav Nir, Adrian Palmer, Lucas Pardue, Roberto Polli, Julian Reschke, Michael Richardson, Wojciech Rygielski, Adam Scarr, Cory J. Slep, Dirk Stein, Henry Story, Lukasz Szewc, Chris Webber, and Jeffrey Yasskin</t>
      </section>
      <section anchor="document-history" numbered="false">
         <name>Document History</name>
         <t>
            <em>RFC EDITOR: please remove this section before publication</em>
         </t>
         <t>
            <list style="symbols">
               <t>draft-ietf-httpbis-message-signatures <list style="symbols">
                     <t>Since -02</t>
                     <t>-02 <list style="symbols">
                           <t>Removed editorial comments on document sources.</t>
                           <t>Removed in-document issues list in favor of tracked issues.</t>
                           <t>Replaced unstructured <spanx style="verb">Signature</spanx> header with <spanx style="verb">Signature-Input</spanx> and <spanx style="verb">Signature</spanx> Dictionary Structured Header Fields.</t>
                           <t>Defined content identifiers for individual Dictionary members, e.g., <spanx style="verb">"x-dictionary-field";key=member-name</spanx>.</t>
                           <t>Defined content identifiers for first N members of a List, e.g., <spanx style="verb">"x-list-field":prefix=4</spanx>.</t>
                           <t>Fixed up examples.</t>
                           <t>Updated introduction now that it's adopted.</t>
                           <t>Defined specialty content identifiers and a means to extend them.</t>
                           <t>Required signature parameters to be included in signature.</t>
                           <t>Added guidance on backwards compatibility, detection, and use of signature methods.</t>
                        </list>
                     </t>
                     <t>-01 <list style="symbols">
                           <t>Strengthened requirement for content identifiers for header fields to be lower-case (changed from SHOULD to MUST).</t>
                           <t>Added real example values for Creation Time and Expiration Time.</t>
                           <t>Minor editorial corrections and readability improvements.</t>
                        </list>
                     </t>
                     <t>-00 <list style="symbols">
                           <t>Initialized from draft-richanna-http-message-signatures-00, following adoption by the working group.</t>
                        </list>
                     </t>
                  </list>
               </t>
               <t>draft-richanna-http-message-signatures <list style="symbols">
                     <t>-00 <list style="symbols">
                           <t>Converted to xml2rfc v3 and reformatted to comply with RFC style guides.</t>
                           <t>Removed Signature auth-scheme definition and related content.</t>
                           <t>Removed conflicting normative requirements for use of algorithm parameter. Now MUST NOT be relied upon.</t>
                           <t>Removed Extensions appendix.</t>
                           <t>Rewrote abstract and introduction to explain context and need, and challenges inherent in signing HTTP messages.</t>
                           <t>Rewrote and heavily expanded algorithm definition, retaining normative requirements.</t>
                           <t>Added definitions for key terms, referenced RFC 7230 for HTTP terms.</t>
                           <t>Added examples for canonicalization and signature generation steps.</t>
                           <t>Rewrote Signature header definition, retaining normative requirements.</t>
                           <t>Added default values for algorithm and expires parameters.</t>
                           <t>Rewrote HTTP Signature Algorithms registry definition. Added change control policy and registry template. Removed suggested URI.</t>
                           <t>Added IANA HTTP Signature Parameter registry.</t>
                           <t>Added additional normative and informative references.</t>
                           <t>Added Topics for Working Group Discussion section, to be removed prior to publication as an RFC.</t>
                        </list>
                     </t>
                  </list>
               </t>
            </list>
         </t>
      </section>
   </back>
</rfc>
