<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-hardt-httpbis-signature-key-03" submissionType="IETF" category="std" xml:lang="en" indexInclude="true">

<front>
<title abbrev="Signature-Key">HTTP Signature-Key Header</title><seriesInfo value="draft-hardt-httpbis-signature-key-03" stream="IETF" status="standard" name="Internet-Draft"/>
<author initials="D." surname="Hardt" fullname="Dick Hardt"><organization>Hellō</organization><address><postal><street/>
</postal><email>dick.hardt@gmail.com</email>
</address></author><author initials="T." surname="Meunier" fullname="Thibault Meunier"><organization>Cloudflare</organization><address><postal><street/>
</postal><email>ot-ietf@thibault.uk</email>
</address></author><date/>
<area>Applications and Real-Time</area>
<workgroup>HTTP</workgroup>
<keyword>http</keyword>
<keyword>signature</keyword>
<keyword>authentication</keyword>
<keyword>jwk</keyword>
<keyword>jwt</keyword>

<abstract>
<t>This document defines the Signature-Key HTTP header field for distributing public keys used to verify HTTP Message Signatures as defined in RFC 9421. Five initial key distribution schemes are defined: pseudonymous inline keys (hwk), self-issued key delegation via JWK Thumbprint JWTs (jkt-jwt), identified signers with JWKS URI discovery (jwks_uri), JWT-based delegation (jwt), and X.509 certificate chains (x509). These schemes enable flexible trust models ranging from privacy-preserving pseudonymous verification to PKI-based identity chains and horizontally-scalable delegated authentication.</t>
</abstract>

<note><name>Discussion Venues</name>
<t><em>Note: This section is to be removed before publishing as an RFC.</em></t>
<t>Source for this draft and an issue tracker can be found at <eref target="https://github.com/dickhardt/signature-key">https://github.com/dickhardt/signature-key</eref>.</t>
</note>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>HTTP Message Signatures <xref target="RFC9421"/> provides a powerful mechanism for creating and verifying digital signatures over HTTP messages. To verify a signature, the verifier needs the signer's public key. While RFC 9421 defines signature creation and verification procedures, it intentionally leaves key distribution to application protocols, recognizing that different deployments have different trust requirements.</t>
<t>This document defines the Signature-Key HTTP header field to standardize key distribution for HTTP Message Signatures. The header enables signers to provide their public key or a reference to it directly in the HTTP message, allowing verifiers to obtain keying material without prior coordination.</t>
<t>The header supports four schemes, each designed for different trust models and operational requirements:</t>

<ol spacing="compact">
<li><strong>Header Web Key (hwk)</strong> - Self-contained public keys for pseudonymous verification</li>
<li><strong>JKT JWT (jkt-jwt)</strong> - Self-issued key delegation via JWK Thumbprint JWTs ("jacket jot")</li>
<li><strong>JWKS URI (jwks_uri)</strong> - Identified signers with key discovery via metadata</li>
<li><strong>JWT (jwt)</strong> - Delegated keys embedded in signed JWTs for horizontal scale</li>
<li><strong>X.509 (x509)</strong> - Certificate-based verification with PKI trust chains</li>
</ol>
<t>Additional schemes may be defined through the IANA registry established by this document.</t>
<t>The Signature-Key header works in conjunction with the Signature-Input and Signature headers defined in RFC 9421, using matching labels to correlate signature metadata with keying material.</t>
</section>

<section anchor="the-signature-key-header-field"><name>The Signature-Key Header Field</name>
<t>The Signature-Key header field provides the public key or key reference needed to verify an HTTP Message Signature. The header is a Structured Field Dictionary <xref target="RFC8941"/> keyed by signature label, where each member describes how to obtain the verification key for the corresponding signature.</t>
<t><strong>Format:</strong></t>

<artwork><![CDATA[Signature-Key: <label>=<scheme>;<parameters>...
]]>
</artwork>
<t>Where:
- <tt>&lt;label&gt;</tt> (dictionary key) matches the label in Signature-Input and Signature headers
- <tt>&lt;scheme&gt;</tt> (token) identifies the key distribution scheme
- <tt>&lt;parameters&gt;</tt> are semicolon-separated key-value pairs whose values are structured field strings or byte sequences, varying by scheme</t>
<t>Multiple keys are comma-separated per the dictionary format. See <xref target="RFC8941"/> for definitions of dictionary, token, string, and byte sequence.</t>
<t><strong>Example:</strong></t>

<artwork><![CDATA[Signature-Input: sig=("@method" "@authority" "@path" "signature-key"); created=1732210000
Signature: sig=:MEQCIA5...
Signature-Key: sig=hwk;kty="OKP";crv="Ed25519";x="JrQLj..."
]]>
</artwork>
<t><strong>Label Correlation:</strong></t>
<t>Labels are correlated by equality of label names across Signature-Input, Signature, and Signature-Key. Signature-Key is a dictionary keyed by label; Signature-Input and Signature are the sources of what signatures are present; Signature-Key provides keying material for those labels.</t>
<t>Verifiers MUST:</t>

<ol>
<li><t>Parse Signature-Input and Signature per RFC 9421 and obtain the set of signature labels present. The verifier determines which labels it is attempting to verify based on application context and RFC 9421 processing.</t>
</li>
<li><t>Parse Signature-Key as a Structured Fields Dictionary</t>
</li>
<li><t>For each label being verified, select the Signature-Key dictionary member with the same name</t>
</li>
<li><t>If the Signature-Key header is present and the verifier is attempting to verify a label using it, but the corresponding dictionary member is missing, verification for that signature MUST fail</t>
</li>
</ol>
<blockquote><t><strong>Note:</strong> A verifier might choose to verify only a subset of labels present (e.g., the application-required signature); labels not verified can be ignored.</t>
</blockquote><t>Signatures whose keys are distributed through mechanisms outside this specification (e.g., pre-configured keys, out-of-band key exchange) are out of scope. A Signature-Key header is not required for such signatures, and verifiers MAY use application-specific means to obtain the verification key.</t>

<section anchor="label-consistency"><name>Label Consistency</name>
<t>If a label appears in Signature or Signature-Input, and the verifier attempts to verify it using Signature-Key, the corresponding member MUST exist in Signature-Key. If Signature-Key contains members for labels not being verified, verifiers MAY ignore them.</t>
</section>

<section anchor="multiple-signatures"><name>Multiple Signatures</name>
<t>The dictionary format supports multiple signatures per message. Each signature has its own dictionary member keyed by its unique label:</t>

<artwork><![CDATA[Signature-Input: sig1=(... "signature-key"), sig2=(... "signature-key")
Signature: sig1=:...:, sig2=:...:
Signature-Key: sig1=jwt;jwt="eyJ...", sig2=jwks_uri;id="https://example.com";dwk="meta";kid="k1"
]]>
</artwork>
<t>Most deployments SHOULD use a single signature. When multiple signatures are required, the complete Signature-Key header (containing all keys) MUST be populated before any signature is created, and each signature MUST cover <tt>signature-key</tt>. This ensures all signatures protect the integrity of all key material. See <eref target="#signature-key-integrity">Signature-Key Integrity</eref> in Security Considerations. Alternative key distribution mechanisms outside this specification may be used for scenarios requiring independent signature addition.</t>
</section>

<section anchor="header-web-key-hwk"><name>Header Web Key (hwk)</name>
<t>The hwk scheme provides a self-contained public key inline in the header, enabling pseudonymous verification without key discovery. The parameter names and values correspond directly to the JWK parameters defined in <xref target="RFC7517"/>.</t>
<t><strong>Parameters by key type:</strong></t>
<t>OKP (Octet Key Pair):</t>

<ul>
<li><t><tt>kty</tt> (REQUIRED, String) - "OKP"</t>
</li>
<li><t><tt>crv</tt> (REQUIRED, String) - Curve name (e.g., "Ed25519")</t>
</li>
<li><t><tt>x</tt> (REQUIRED, String) - Public key value</t>
</li>
</ul>

<artwork><![CDATA[Signature-Key: sig=hwk;kty="OKP";crv="Ed25519";x="JrQLj5P..."
]]>
</artwork>
<t>EC (Elliptic Curve):</t>

<ul>
<li><t><tt>kty</tt> (REQUIRED, String) - "EC"</t>
</li>
<li><t><tt>crv</tt> (REQUIRED, String) - Curve name (e.g., "P-256", "P-384")</t>
</li>
<li><t><tt>x</tt> (REQUIRED, String) - X coordinate</t>
</li>
<li><t><tt>y</tt> (REQUIRED, String) - Y coordinate</t>
</li>
</ul>

<artwork><![CDATA[Signature-Key: sig=hwk;kty="EC";crv="P-256";x="f83OJ3D...";y="x_FEzRu..."
]]>
</artwork>
<t>RSA:</t>

<ul>
<li><t><tt>kty</tt> (REQUIRED, String) - "RSA"</t>
</li>
<li><t><tt>n</tt> (REQUIRED, String) - Modulus</t>
</li>
<li><t><tt>e</tt> (REQUIRED, String) - Exponent</t>
</li>
</ul>

<artwork><![CDATA[Signature-Key: sig=hwk;kty="RSA";n="0vx7agoebGcQ...";e="AQAB"
]]>
</artwork>
<t><strong>Constraints:</strong></t>

<ul>
<li><t>The <tt>alg</tt> parameter MUST NOT be present (algorithm is specified in Signature-Input)</t>
</li>
<li><t>The <tt>kid</tt> parameter SHOULD NOT be used</t>
</li>
</ul>
<t><strong>Use cases:</strong></t>

<ul>
<li><t>Privacy-preserving agents that avoid identity disclosure</t>
</li>
<li><t>Experimental or temporary access without registration</t>
</li>
<li><t>Rate limiting and reputation building on a per-key basis</t>
</li>
</ul>
</section>

<section anchor="jkt-jwt-self-issued-key-delegation-jkt-jwt"><name>JKT JWT Self-Issued Key Delegation (jkt-jwt)</name>
<t>The jkt-jwt scheme (pronounced "jacket jot") provides self-issued key delegation using a JWT whose signing key is embedded in the JWT header. This enables devices with hardware-backed secure enclaves to delegate signing authority to ephemeral keys, avoiding the performance cost of repeated enclave operations while maintaining a cryptographic chain of trust rooted in the enclave key.</t>
<t>Many devices — mobile phones, laptops, IoT hardware — include secure enclaves or trusted execution environments (e.g., Apple Secure Enclave, Android StrongBox, TPM) that can generate and store private keys with strong protection guarantees. However, signing operations using these enclaves are comparatively slow and may require user interaction (biometric confirmation, PIN entry).</t>
<t>For HTTP Message Signatures, where every request requires a signature, this creates a tension between security and performance. The jkt-jwt scheme resolves this by allowing the enclave key to sign a JWT that delegates authority to a faster ephemeral key:</t>

<ol spacing="compact">
<li>The enclave generates a long-lived key pair (the identity key)</li>
<li>The device generates an ephemeral key pair in software (the signing key)</li>
<li>The enclave signs a JWT binding the ephemeral key via the <tt>cnf</tt> claim</li>
<li>HTTP requests are signed with the fast ephemeral key</li>
<li>The JWT proves the ephemeral key was authorized by the enclave key</li>
</ol>
<t>The enclave key's JWK Thumbprint URI (<tt>urn:jkt:&lt;hash-algorithm&gt;:&lt;thumbprint&gt;</tt>) serves as a stable, pseudonymous device identity. Verifiers build trust in this identity over time (TOFU — Trust On First Use <xref target="RFC7435"/>).</t>
<t><strong>Parameters:</strong></t>

<ul spacing="compact">
<li><tt>jwt</tt> (REQUIRED, String) - Compact-serialized JWT</li>
</ul>
<t><strong>JWT requirements:</strong></t>
<t>Header:</t>

<ul>
<li><t><tt>typ</tt> (REQUIRED) - Identifies the thumbprint hash algorithm. Defined values: <tt>jkt-s256+jwt</tt> (SHA-256), <tt>jkt-s512+jwt</tt> (SHA-512). Implementations MUST support <tt>jkt-s256+jwt</tt> and MAY support additional algorithms.</t>
</li>
<li><t><tt>alg</tt> (REQUIRED) - Signature algorithm used by the enclave key</t>
</li>
<li><t><tt>jwk</tt> (REQUIRED) - JWK public key of the enclave/identity key (the key that signed this JWT)</t>
</li>
</ul>
<t>Payload:</t>

<ul>
<li><t><tt>iss</tt> (REQUIRED) - JWK Thumbprint URI of the signing key, in the format <tt>urn:jkt:&lt;hash-algorithm&gt;:&lt;thumbprint&gt;</tt> where the thumbprint is computed per <xref target="RFC7638"/>. The hash algorithm in the URN MUST match the algorithm indicated by the JWT <tt>typ</tt>. The verifier knows the hash algorithm from the <tt>typ</tt> it accepted, computes the thumbprint of the header <tt>jwk</tt>, prepends the known <tt>urn:jkt:&lt;hash-algorithm&gt;:</tt> prefix, and compares to <tt>iss</tt> by string equality.</t>
</li>
<li><t><tt>iat</tt> (REQUIRED) - Issued-at timestamp</t>
</li>
<li><t><tt>exp</tt> (REQUIRED) - Expiration timestamp</t>
</li>
<li><t><tt>cnf</tt> (REQUIRED) - Confirmation claim <xref target="RFC7800"/> containing <tt>jwk</tt>: the ephemeral public key delegated for HTTP message signing</t>
</li>
</ul>
<t>The <tt>sub</tt> claim is not used. The identity is the enclave key itself, fully represented by the <tt>iss</tt> thumbprint.</t>
<t><strong>JWT Type Values:</strong></t>
<t>The <tt>typ</tt> value encodes both the purpose and the thumbprint hash algorithm:</t>
<table>
<thead>
<tr>
<th><tt>typ</tt></th>
<th>Hash Algorithm</th>
<th><tt>iss</tt> prefix</th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>jkt-s256+jwt</tt></td>
<td>SHA-256</td>
<td><tt>urn:jkt:sha-256:</tt></td>
</tr>

<tr>
<td><tt>jkt-s512+jwt</tt></td>
<td>SHA-512</td>
<td><tt>urn:jkt:sha-512:</tt></td>
</tr>
</tbody>
</table><t>The <tt>jkt-</tt> prefix indicates a self-issued delegation JWT: the signing key is embedded in the JWT header as a JWK, the issuer is identified by the key's thumbprint, and the JWT delegates signing authority to the key in the <tt>cnf</tt> claim. The suffix (<tt>s256</tt>, <tt>s512</tt>) identifies the hash algorithm used for the thumbprint. The <tt>typ</tt> and <tt>iss</tt> prefix MUST be consistent.</t>
<t>These types are independent of the Signature-Key header and MAY be used in other contexts where self-issued key delegation is needed. Additional hash algorithms can be supported by registering new <tt>typ</tt> values following the <tt>jkt-&lt;alg&gt;+jwt</tt> pattern.</t>
<t><strong>Example:</strong></t>

<artwork><![CDATA[Signature-Key: sig=jkt-jwt;jwt="eyJ..."
]]>
</artwork>
<t>JWT header:</t>

<sourcecode type="json"><![CDATA[{
  "typ": "jkt-s256+jwt",
  "alg": "ES256",
  "jwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
    "y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"
  }
}
]]>
</sourcecode>
<t>JWT payload:</t>

<sourcecode type="json"><![CDATA[{
  "iss": "urn:jkt:sha-256:NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs",
  "iat": 1732210000,
  "exp": 1732296400,
  "cnf": {
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "JrQLj5P_89iXES9-vFgrIy29clF9CC_oPPsw3c5D0bs"
    }
  }
}
]]>
</sourcecode>
<t>In this example, the enclave holds a P-256 key (signed via hardware) and delegates to an Ed25519 ephemeral key (signed in software). The identity is <tt>urn:jkt:sha-256:NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs</tt>.</t>
<t><strong>Verification procedure:</strong></t>

<ol>
<li><t>Parse the JWT without verifying the signature</t>
</li>
<li><t>Check the <tt>typ</tt> header (e.g., <tt>jkt-s256+jwt</tt>). Reject if the type is not supported.</t>
</li>
<li><t>Determine the hash algorithm and <tt>iss</tt> prefix from the <tt>typ</tt> (e.g., <tt>jkt-s256+jwt</tt> → SHA-256, <tt>urn:jkt:sha-256:</tt>)</t>
</li>
<li><t>Extract the <tt>jwk</tt> from the JWT header</t>
</li>
<li><t>Compute the JWK Thumbprint (<xref target="RFC7638"/>) of the header <tt>jwk</tt> using the determined hash algorithm</t>
</li>
<li><t>Construct the expected <tt>iss</tt> value by prepending the known prefix to the computed thumbprint</t>
</li>
<li><t>Verify the <tt>iss</tt> claim matches the constructed value by string equality</t>
</li>
<li><t>Verify the JWT signature using the header <tt>jwk</tt></t>
</li>
<li><t>Validate <tt>exp</tt> and <tt>iat</tt> claims per policy</t>
</li>
<li><t>Extract the ephemeral public key from <tt>cnf.jwk</tt></t>
</li>
<li><t>Verify the HTTP Message Signature using the ephemeral key</t>
</li>
</ol>
<t><strong>Use cases:</strong></t>

<ul>
<li><t>Devices with hardware-backed secure enclaves delegating to fast ephemeral keys</t>
</li>
<li><t>Persistent pseudonymous identity without requiring registration or authority</t>
</li>
<li><t>Mobile apps, laptops, and IoT devices with enclave-backed identity</t>
</li>
</ul>
</section>

<section anchor="jwks-uri-discovery-jwks-uri"><name>JWKS URI Discovery (jwks_uri)</name>
<t>The jwks_uri scheme identifies the signer and enables key discovery via a metadata document containing a <tt>jwks_uri</tt> property.</t>
<t><strong>Parameters:</strong></t>

<ul>
<li><t><tt>id</tt> (REQUIRED, String) - Signer identifier (HTTPS URL)</t>
</li>
<li><t><tt>dwk</tt> (REQUIRED, String) - Dot well-known metadata document name under <tt>/.well-known/</tt></t>
</li>
<li><t><tt>kid</tt> (REQUIRED, String) - Key identifier</t>
</li>
</ul>
<t><strong>Discovery procedure:</strong></t>

<ol>
<li><t>Fetch <tt>{id}/.well-known/{dwk}</tt></t>
</li>
<li><t>Parse as JSON metadata</t>
</li>
<li><t>Extract <tt>jwks_uri</tt> property</t>
</li>
<li><t>Fetch JWKS from <tt>jwks_uri</tt></t>
</li>
<li><t>Find key with matching <tt>kid</tt></t>
</li>
</ol>
<t><strong>Example:</strong></t>

<artwork><![CDATA[Signature-Key: sig=jwks_uri;id="https://agent.example";dwk="aauth-agent";kid="key-1"
]]>
</artwork>
<t><strong>Use cases:</strong></t>

<ul>
<li><t>Identified services with stable HTTPS identity</t>
</li>
<li><t>Search engine crawlers and monitoring services</t>
</li>
<li><t>Services requiring explicit entity identification</t>
</li>
</ul>
</section>

<section anchor="jwt-confirmation-key-jwt"><name>JWT Confirmation Key (jwt)</name>
<t>The jwt scheme embeds a public key inside a signed JWT using the <tt>cnf</tt> (confirmation) claim <xref target="RFC7800"/>, enabling delegation and horizontal scale.</t>
<t><strong>Parameters:</strong></t>

<ul spacing="compact">
<li><tt>jwt</tt> (REQUIRED, String) - Compact-serialized JWT</li>
</ul>
<t><strong>JWT requirements:</strong></t>

<ul>
<li><t>MUST contain <tt>cnf.jwk</tt> claim with embedded JWK</t>
</li>
<li><t>SHOULD contain <tt>iss</tt> claim (HTTPS URL of the issuer) — using SHOULD rather than MUST allows existing JWT infrastructure to be used without modification</t>
</li>
<li><t>SHOULD contain <tt>dwk</tt> claim (dot well-known metadata document name) — the verifier constructs <tt>{iss}/.well-known/{dwk}</tt> to discover the issuer's <tt>jwks_uri</tt>. Using SHOULD allows deployments where the verifier already knows the issuer's keys.</t>
</li>
<li><t>SHOULD contain standard claims: <tt>sub</tt>, <tt>exp</tt>, <tt>iat</tt></t>
</li>
<li><t>Verifiers SHOULD verify the JWT <tt>typ</tt> header parameter has an expected value per deployment policy, to optimize for a quick rejection</t>
</li>
</ul>
<blockquote><t><strong>Note:</strong> The mechanism by which the JWT is obtained is out of scope of this specification.</t>
</blockquote><t><strong>Verification procedure:</strong></t>

<ol>
<li><t>Parse the JWT parameter value per <xref target="RFC7519"/> Section 7.2. Reject if the value is not a well-formed JWT. This and subsequent pre-signature checks allow the verifier to fail early without expensive cryptographic operations or network fetches.</t>
</li>
<li><t>Verify the JWT <tt>typ</tt> header parameter has an expected value per policy. Reject if unexpected.</t>
</li>
<li><t>Validate <tt>exp</tt> claim if present. Reject if the token has expired.</t>
</li>
<li><t>Verify required claims are present (<tt>cnf.jwk</tt>, plus any claims required by deployment policy). Reject if a required claim is missing.</t>
</li>
<li><t>If <tt>iss</tt> and <tt>dwk</tt> claims are present, fetch <tt>{iss}/.well-known/{dwk}</tt>, parse as JSON metadata, extract <tt>jwks_uri</tt>. Fetch JWKS from <tt>jwks_uri</tt>, find key matching <tt>kid</tt> in JWT header. If <tt>iss</tt> or <tt>dwk</tt> is absent, the verifier MUST obtain the issuer's key through an application-specific mechanism.</t>
</li>
<li><t>Verify JWT signature using the discovered key</t>
</li>
<li><t>Validate remaining JWT claims per policy (<tt>iss</tt>, <tt>sub</tt>, etc.)</t>
</li>
<li><t>Extract JWK from <tt>cnf.jwk</tt></t>
</li>
<li><t>Verify HTTP Message Signature using extracted key</t>
</li>
</ol>
<t><strong>Example:</strong></t>

<artwork><![CDATA[Signature-Key: sig=jwt;jwt="eyJhbGciOiJFUzI1NiI..."
]]>
</artwork>
<t><strong>JWT payload example:</strong></t>

<sourcecode type="json"><![CDATA[{
  "iss": "https://issuer.example",
  "dwk": "oauth-authorization-server",
  "sub": "instance-123",
  "exp": 1732210000,
  "cnf": {
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "JrQLj5P_89iXES9-vFgrIy29clF9CC_oPPsw3c5D0bs"
    }
  }
}
]]>
</sourcecode>
<t><strong>Use cases:</strong></t>

<ul>
<li><t>Distributed services with ephemeral instance keys</t>
</li>
<li><t>Delegation scenarios where instances act on behalf of an authority</t>
</li>
<li><t>Short-lived credentials for horizontal scaling</t>
</li>
</ul>
</section>

<section anchor="x-509-certificates-x509"><name>X.509 Certificates (x509)</name>
<t>The x509 scheme provides certificate-based verification using PKI trust chains.</t>
<t><strong>Parameters:</strong></t>

<ul>
<li><t><tt>x5u</tt> (REQUIRED, String) - URL to X.509 certificate chain (PEM format, <xref target="RFC7517"/> Section 4.6)</t>
</li>
<li><t><tt>x5t</tt> (REQUIRED, Byte Sequence) - Certificate thumbprint: SHA-256 hash of DER-encoded end-entity certificate</t>
</li>
</ul>
<t><strong>Verification procedure:</strong></t>

<ol>
<li><t>Check cache for certificate with matching <tt>x5t</tt></t>
</li>
<li><t>If not cached or expired, fetch PEM from <tt>x5u</tt></t>
</li>
<li><t>Validate certificate chain to trusted root CA</t>
</li>
<li><t>Check certificate validity and revocation status</t>
</li>
<li><t>Verify <tt>x5t</tt> matches end-entity certificate</t>
</li>
<li><t>Extract public key from end-entity certificate</t>
</li>
<li><t>Verify signature using extracted key</t>
</li>
<li><t>Cache certificate indexed by <tt>x5t</tt></t>
</li>
</ol>
<t><strong>Example:</strong></t>

<artwork><![CDATA[Signature-Key: sig=x509;x5u="https://agent.example/.well-known/cert.pem";x5t=:bWcoon4QTVn8Q6xiY0ekMD6L8bNLMkuDV2KtvsFc1nM=:
]]>
</artwork>
<t><strong>Use cases:</strong></t>

<ul>
<li><t>Enterprise environments with PKI infrastructure</t>
</li>
<li><t>Integration with existing certificate management systems</t>
</li>
<li><t>Scenarios requiring certificate revocation checking</t>
</li>
<li><t>Regulated industries requiring certificate-based authentication</t>
</li>
</ul>
</section>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>

<section anchor="key-validation"><name>Key Validation</name>
<t>Verifiers MUST validate all cryptographic material before use:</t>

<ul>
<li><t><strong>hwk</strong>: Validate JWK structure and key parameters</t>
</li>
<li><t><strong>jwks_uri</strong>: Verify HTTPS transport and validate fetched JWKS</t>
</li>
<li><t><strong>x509</strong>: Validate complete certificate chain, check revocation status</t>
</li>
<li><t><strong>jwt</strong>: Verify JWT signature and validate embedded JWK</t>
</li>
<li><t><strong>jkt-jwt</strong>: Verify JWT signature using header <tt>jwk</tt>, validate thumbprint matches <tt>iss</tt>, validate embedded ephemeral JWK</t>
</li>
</ul>
</section>

<section anchor="caching-and-performance"><name>Caching and Performance</name>
<t>Verifiers MAY cache keys to improve performance but MUST implement appropriate cache expiration:</t>

<ul>
<li><t><strong>jwks_uri</strong>: Respect cache-control headers, implement reasonable TTLs</t>
</li>
<li><t><strong>x509</strong>: Cache by <tt>x5t</tt>, invalidate on certificate expiry</t>
</li>
<li><t><strong>jwt</strong>: Cache embedded keys until JWT expiration</t>
</li>
<li><t><strong>jkt-jwt</strong>: Cache embedded keys until JWT expiration; cache by <tt>iss</tt> thumbprint URI</t>
</li>
</ul>
<t>Verifiers SHOULD implement cache limits to prevent resource exhaustion attacks.</t>
</section>

<section anchor="scheme-specific-risks"><name>Scheme-Specific Risks</name>
<t><strong>hwk</strong>: No identity verification - suitable only for scenarios where pseudonymous access is acceptable.</t>
<t><strong>jwks_uri</strong>: Relies on HTTPS security - vulnerable to DNS/CA compromise. Verifiers should implement certificate pinning where appropriate.</t>
<t><strong>x509</strong>: Requires robust certificate validation including revocation checking. Verifiers MUST NOT skip certificate chain validation.</t>
<t><strong>jwt</strong>: Delegation trust depends on JWT issuer verification. Verifiers MUST validate JWT signatures and claims before trusting embedded keys.</t>
<t><strong>jkt-jwt</strong>: The security of this scheme depends on the enclave key's private key remaining protected in hardware. If the enclave key is compromised, all delegated ephemeral keys are compromised. Verifiers should be aware that the jkt-jwt scheme implies but does not prove hardware protection — there is no attestation mechanism in this scheme. Unlike the <tt>jwt</tt> scheme where trust is rooted in a discoverable issuer, jkt-jwt trust is rooted in the key itself. Verifiers MUST understand that any party can create a jkt-jwt — the scheme provides pseudonymous identity, not verified identity. The <tt>exp</tt> claim on the JWT controls how long the ephemeral key is valid. Shorter lifetimes limit the exposure window if an ephemeral key is compromised. Implementations SHOULD use the shortest practical lifetime. The <tt>iss</tt> value is a JWK Thumbprint URI — a globally unique, collision-resistant identifier. The verifier MUST always compute the expected <tt>iss</tt> from the header <tt>jwk</tt> and compare by string equality — never trust the <tt>iss</tt> value alone.</t>
</section>

<section anchor="algorithm-selection"><name>Algorithm Selection</name>
<t>The <tt>alg</tt> parameter in Signature-Input (RFC 9421) determines the signature algorithm. Verifiers MUST:</t>

<ul>
<li><t>Validate algorithm against policy (reject weak algorithms)</t>
</li>
<li><t>Ensure key type matches algorithm requirements</t>
</li>
<li><t>Reject algorithm/key mismatches</t>
</li>
</ul>
</section>

<section anchor="signature-key-integrity"><name>Signature-Key Integrity</name>
<t>The Signature-Key header SHOULD be included as a covered component in Signature-Input:</t>

<artwork><![CDATA[Signature-Input: sig=("@method" "@authority" "@path" "signature-key"); created=1732210000
]]>
</artwork>
<t>If <tt>signature-key</tt> is not covered, an attacker can modify the header without invalidating the signature. Attacks include:</t>
<t><strong>Scheme substitution</strong>: An attacker extracts the public key from an <tt>hwk</tt> scheme and republishes it via <tt>jwks_uri</tt> under their own identity, causing verifiers to attribute the request to the attacker.</t>
<t><strong>Identity substitution</strong>: An attacker modifies the <tt>id</tt> parameter in a <tt>jwks_uri</tt> scheme to point to their own metadata endpoint that returns the same public key, impersonating a different signer.</t>
<t>Verifiers SHOULD reject requests where <tt>signature-key</tt> is not a covered component.</t>
</section>
</section>

<section anchor="privacy-considerations"><name>Privacy Considerations</name>

<section anchor="pseudonymity-vs-identity"><name>Pseudonymity vs. Identity</name>
<t>The hwk scheme enables pseudonymous operation where the signer's identity is not disclosed. Verifiers should be aware that:</t>

<ul>
<li><t>hwk provides no identity linkage across requests (unless keys are reused)</t>
</li>
<li><t>Key reuse enables tracking but may be necessary for reputation/rate-limiting</t>
</li>
<li><t>Verifiers should not log or retain hwk keys beyond operational necessity</t>
</li>
</ul>
<t>The jkt-jwt scheme is pseudonymous like hwk — the identity is a key thumbprint URI. However, because the thumbprint is stable across sessions (tied to the enclave key), it enables long-term tracking. Verifiers should apply the same retention considerations as for hwk keys.</t>
<t>The jwks_uri, x509, and jwt schemes all reveal signer identity. Protocols using these schemes should inform signers that their identity will be disclosed to verifiers.</t>
</section>

<section anchor="key-discovery-tracking"><name>Key Discovery Tracking</name>
<t>The jwks_uri and x509 schemes require verifiers to fetch resources from signer-controlled URLs. This creates potential tracking vectors:</t>

<ul>
<li><t>Signers can observe when and from where keys are fetched</t>
</li>
<li><t>Verifiers should cache keys to minimize fetches</t>
</li>
<li><t>Verifiers may wish to use shared caching infrastructure to reduce fingerprinting</t>
</li>
</ul>
</section>

<section anchor="jwt-contents"><name>JWT Contents</name>
<t>JWTs in the jwt scheme may contain additional claims beyond <tt>cnf</tt>. Verifiers should:</t>

<ul>
<li><t>Only process claims necessary for verification</t>
</li>
<li><t>Not log or retain unnecessary JWT claims</t>
</li>
<li><t>Be aware that JWT contents are visible to network observers unless using TLS</t>
</li>
</ul>
</section>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>

<section anchor="http-field-name-registration"><name>HTTP Field Name Registration</name>
<t>This document registers the Signature-Key header field in the "Hypertext Transfer Protocol (HTTP) Field Name Registry" defined in <xref target="RFC9110"/>.</t>
<t>Header field name: Signature-Key</t>
<t>Applicable protocol: http</t>
<t>Status: standard</t>
<t>Author/Change controller: IETF</t>
<t>Specification document(s): [this document]</t>
</section>

<section anchor="signature-key-scheme-registry"><name>Signature-Key Scheme Registry</name>
<t>This document establishes the "HTTP Signature-Key Scheme" registry. This registry allows for the definition of additional key distribution schemes beyond those defined in this document.</t>

<section anchor="registration-procedure"><name>Registration Procedure</name>
<t>New scheme registrations require Specification Required per <xref target="RFC8126"/>.</t>
</section>

<section anchor="initial-registry-contents"><name>Initial Registry Contents</name>
<table>
<thead>
<tr>
<th>Scheme</th>
<th>Description</th>
<th>Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td>hwk</td>
<td>Header Web Key - inline public key</td>
<td>[this document]</td>
</tr>

<tr>
<td>jkt-jwt</td>
<td>JKT JWT Self-Issued Key Delegation - enclave-backed delegation</td>
<td>[this document]</td>
</tr>

<tr>
<td>jwks_uri</td>
<td>JWKS URI Discovery - key discovery via metadata</td>
<td>[this document]</td>
</tr>

<tr>
<td>jwt</td>
<td>JWT Confirmation Key - delegated key in JWT</td>
<td>[this document]</td>
</tr>

<tr>
<td>x509</td>
<td>X.509 Certificate - PKI certificate chain</td>
<td>[this document]</td>
</tr>
</tbody>
</table></section>

<section anchor="registration-template"><name>Registration Template</name>

<dl spacing="compact">
<dt>Scheme Name:</dt>
<dd>The token value used in the Signature-Key header</dd>
<dt>Description:</dt>
<dd>A brief description of the scheme</dd>
<dt>Specification:</dt>
<dd>Reference to the specification defining the scheme</dd>
<dt>Parameters:</dt>
<dd>List of parameters defined for this scheme</dd>
</dl>
</section>
</section>
</section>

</middle>

<back>
<references><name>References</name>
<references><name>Normative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7517.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7638.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7800.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8941.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9421.xml"/>
</references>
<references><name>Informative References</name>
<reference anchor="OpenID.Discovery" target="https://openid.net/specs/openid-connect-discovery-1_0.html">
  <front>
    <title>OpenID Connect Discovery 1.0</title>
    <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
      <organization>NRI</organization>
    </author>
    <author fullname="John Bradley" initials="J." surname="Bradley">
      <organization>Ping Identity</organization>
    </author>
    <author fullname="Michael B. Jones" initials="M." surname="Jones">
      <organization>Microsoft</organization>
    </author>
    <author fullname="Edmund Jay" initials="E." surname="Jay">
      <organization>Illumila</organization>
    </author>
    <date year="2014" month="November"/>
  </front>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7435.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8414.xml"/>
</references>
</references>

<section anchor="document-history"><name>Document History</name>
<t><em>Note: This section is to be removed before publishing as an RFC.</em></t>

<section anchor="draft-hardt-httpbis-signature-key-03"><name>draft-hardt-httpbis-signature-key-03</name>

<ul spacing="compact">
<li>Added jkt-jwt scheme for self-issued key delegation</li>
<li>Renamed <tt>well-known</tt> parameter to <tt>dwk</tt> (dot well-known)</li>
<li>Added <tt>iss</tt> and <tt>dwk</tt> claims to jwt scheme (SHOULD) for issuer key discovery</li>
<li>Added early validation step to jwt verification procedure (format, typ, exp checks before network fetches)</li>
<li>Added TOFU reference (RFC 7435) to jkt-jwt scheme</li>
<li>Added design rationale for jwks_uri vs inline JWKS</li>
<li>Moved hwk string vs byte sequence design note to rationale appendix</li>
<li>Reordered schemes</li>
<li>Added acknowledgments</li>
</ul>
</section>

<section anchor="draft-hardt-httpbis-signature-key-02"><name>draft-hardt-httpbis-signature-key-02</name>

<ul spacing="compact">
<li>Changed x5t parameter to byte sequence per reviewer feedback</li>
<li>Added structured field types to all parameters</li>
<li>Added design note explaining string vs byte sequence choice for hwk</li>
</ul>
</section>

<section anchor="draft-hardt-httpbis-signature-key-01"><name>draft-hardt-httpbis-signature-key-01</name>

<ul spacing="compact">
<li>Initial public draft with four schemes: hwk, jwks_uri, x509, jwt</li>
</ul>
</section>
</section>

<section anchor="design-rationale"><name>Design Rationale</name>

<section anchor="why-jwks-uri-instead-of-inline-jwks"><name>Why jwks_uri Instead of Inline JWKS?</name>
<t>The <tt>jwks_uri</tt> and <tt>jwt</tt> schemes reference a <tt>jwks_uri</tt> property in the <tt>.well-known</tt> metadata document rather than embedding the JWKS directly in the metadata. This separation of concerns is deliberate:</t>

<ol>
<li><t><strong>Independent key rotation</strong>: Keys can be rotated by updating the JWKS endpoint without modifying the <tt>.well-known</tt> metadata document. This decouples key lifecycle management from configuration management, allowing operations teams to rotate keys on their own schedule without redeploying metadata.</t>
</li>
<li><t><strong>Independent management</strong>: The <tt>.well-known</tt> metadata document and the JWKS can be hosted, managed, and secured by different systems or teams. For example, an identity team may manage keys while a platform team manages service metadata.</t>
</li>
<li><t><strong>Caching semantics</strong>: The JWKS endpoint can have its own cache-control headers tuned for key rotation frequency (e.g., short TTLs during a rotation event), independent of the <tt>.well-known</tt> document's caching policy.</t>
</li>
<li><t><strong>Consistency with existing standards</strong>: This approach mirrors the pattern established by OpenID Connect Discovery <xref target="OpenID.Discovery"/> and OAuth Authorization Server Metadata <xref target="RFC8414"/>, which both use <tt>jwks_uri</tt> in metadata documents for the same reasons.</t>
</li>
</ol>
</section>

<section anchor="why-a-separate-header"><name>Why a Separate Header?</name>
<t>An alternative design would extend Signature-Input with additional parameters to carry key material. This was considered and rejected for several reasons:</t>

<ol>
<li><t><strong>Parameter complexity</strong>: Each scheme has a different set of parameters (e.g., <tt>hwk</tt> needs <tt>kty</tt>, <tt>crv</tt>, <tt>x</tt>, <tt>y</tt>; <tt>jwks_uri</tt> needs <tt>id</tt>, <tt>dwk</tt>, <tt>kid</tt>; <tt>jwt</tt> needs a full JWT string). Overloading Signature-Input with all possible key parameters across all schemes would make the Signature-Input grammar unwieldy and harder to parse.</t>
</li>
<li><t><strong>Separation of concerns</strong>: Signature-Input describes <em>what</em> is signed and <em>how</em> (covered components, algorithm, timestamps). Signature-Key describes <em>who</em> signed it and <em>where to find the key</em>. These are distinct concerns, and separating them into distinct headers makes each easier to understand and process independently.</t>
</li>
<li><t><strong>Extensibility</strong>: A separate header with a scheme registry allows new key distribution mechanisms to be added without modifying the Signature-Input grammar. New schemes can define arbitrary parameters without coordination with RFC 9421.</t>
</li>
<li><t><strong>Multiple signatures</strong>: With a dictionary structure keyed by label, each signature can use a different scheme. This is natural in a separate header but would create complex nesting if embedded in Signature-Input.</t>
</li>
</ol>
</section>

<section anchor="why-schemes-instead-of-just-a-key-and-key-id"><name>Why Schemes Instead of Just a Key and Key ID?</name>
<t>A simpler design would define Signature-Key as carrying only a public key (or key reference) and a key identifier, without the scheme abstraction. This was considered insufficient because:</t>

<ol>
<li><t><strong>Trust model varies</strong>: A bare key tells the verifier nothing about the trust model. Is this a pseudonymous key to be evaluated on its own merits (hwk)? A key bound to a discoverable identity (jwks_uri)? A delegated key from an authority (jwt)? A certificate-backed key (x509)? The scheme token tells the verifier which verification procedure to follow and what trust properties the key carries.</t>
</li>
<li><t><strong>Verification procedure differs</strong>: Each scheme has a fundamentally different verification path. <tt>hwk</tt> requires no external fetches. <tt>jwks_uri</tt> requires metadata discovery. <tt>x509</tt> requires certificate chain validation. <tt>jwt</tt> requires JWT signature verification before the HTTP signature can be verified. A key-and-ID-only design would push scheme detection to heuristics or out-of-band agreement.</t>
</li>
<li><t><strong>Security properties differ</strong>: Without an explicit scheme, a verifier cannot distinguish between a self-asserted key and a CA-certified key. The scheme makes the trust model explicit, allowing verifiers to enforce policy (e.g., "only accept <tt>jwt</tt> or <tt>x509</tt> schemes").</t>
</li>
<li><t><strong>Interoperability</strong>: Explicit schemes create clear interoperability targets. Two implementations that support the <tt>jwt</tt> scheme know exactly what to expect from each other. Without schemes, the same key material could be interpreted differently by different implementations.</t>
</li>
</ol>
</section>

<section anchor="why-strings-instead-of-byte-sequences-for-hwk"><name>Why Strings Instead of Byte Sequences for hwk?</name>
<t>The hwk parameters use structured field strings rather than byte sequences. JWK key values are base64url-encoded per <xref target="RFC7517"/>, while structured field byte sequences use base64 encoding per <xref target="RFC8941"/>. Using strings allows implementations to pass JWK values directly without converting between base64url and base64, avoiding a potential source of encoding bugs.</t>
</section>
</section>

<section anchor="acknowledgments"><name>Acknowledgments</name>
<t>The author would like to thank Yaron Sheffer for their feedback on this specification.</t>
</section>

</back>

</rfc>
