<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bastian-jose-pkdh-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.30.2 -->
  <front>
    <title abbrev="PKD-HMAC for JOSE">Public Key Derived HMAC for JOSE</title>
    <seriesInfo name="Internet-Draft" value="draft-bastian-jose-pkdh-00"/>
    <author fullname="Paul Bastian">
      <organization>Bundesdruckerei GmbH</organization>
      <address>
        <email>bastianpaul@googlemail.com</email>
      </address>
    </author>
    <author fullname="Micha Kraus">
      <organization>Bundesdruckerei GmbH</organization>
      <address>
        <email>kraus.micha@gmail.com</email>
      </address>
    </author>
    <author fullname="Stefan Santesson">
      <organization>IDsec Solutions</organization>
      <address>
        <email>stefan@aaa-sec.com</email>
      </address>
    </author>
    <author fullname="Peter Lee Altmann">
      <organization>The Agency for Digital Government</organization>
      <address>
        <email>altmann@mail.com</email>
      </address>
    </author>
    <date year="2025" month="October" day="12"/>
    <area>Security</area>
    <workgroup>Javascript Object Signing and Encryption</workgroup>
    <keyword>JOSE</keyword>
    <keyword>JWS</keyword>
    <abstract>
      <?line 72?>

<t>This specification defines the use of a Diffie-Hellman key agreement (DH-KA) protocol combined with a key derivation function (KDF) to derive a symmetric Message Authentication Code (MAC) key from public information conveyed within a JSON Web Signature (JWS).</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://paulbastian.github.io/draft-bastian-jose-pkdh/draft-bastian-jose-pkdh.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-bastian-jose-pkdh/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Javascript Object Signing and Encryption Working Group mailing list (<eref target="mailto:jose@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/jose/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/jose/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/paulbastian/draft-bastian-jose-pkdh"/>.</t>
    </note>
  </front>
  <middle>
    <?line 76?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>JSON Web Signature (JWS) <xref target="RFC7515"/> and JSON Web Algorithms (JWA) <xref target="RFC7518"/> specify how to secure content with Hash-based Message Authentication Codes (HMAC) <xref target="RFC2104"/> using a shared symmetric key. These specifications do not provide means to dynamically derive a MAC key for JWS validation using only public information embedded in the JWS.</t>
      <t>This specification defines a new protected header parameter, <tt>pkds</tt> (public key derived secret), which contains information required to derive an HMAC key using a Diffie-Hellman key agreement (DH-KA) and a key derivation function (KDF). The JWS Producer's DH-KA public key appears either in the <tt>pkds</tt> parameter or in a claims element for use in the key agreement computation. The <tt>pkds</tt> parameter also includes the JWS Recipient's DH-KA public key, used by the JWS Producer during key agreement, as well as the KDF parameters necessary for deriving the MAC key.</t>
      <t>This specification also defines new <tt>alg</tt> parameter values, that are fully-specified according to <eref target="https://www.ietf.org/archive/id/draft-jones-jose-fully-specified-algorithms-00.html">Fully Specified Algorithms</eref>.</t>
      <t>The method is useful in settings where pre-shared keys are undesirable or infeasible, and where direct key distribution or key wrapping introduces operational concerns. It enables the use of HMAC-based signatures that can be validated solely with information embedded in a JWS.</t>
      <t>A primary motivation for this work is to enable HMAC signature validation from information contained within an SD-JWT, mirroring capabilities available in credential formats like <xref target="ISO-18013-5"/>.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="terminology">
      <name>Terminology</name>
      <t>The draft uses "JSON Web Signature", "JOSE Header", "JWS Signature", "JWS Signing Input" as defined by <xref target="RFC7515"/>.</t>
      <dl>
        <dt><strong>Producer</strong>:</dt>
        <dd>
          <t>The party that performs the DH-KA first, derives the MAC key via a KDF, constructs the JOSE Header and JWS Payload, and computes the JWS Signature.</t>
        </dd>
        <dt><strong>Recipient</strong>:</dt>
        <dd>
          <t>The party that performs the DH-KA second, derives the MAC key via information in the JWS, and validates the JWS using the MAC key according to <xref target="RFC7515"/>.</t>
        </dd>
      </dl>
    </section>
    <section anchor="cryptographic-dependencies">
      <name>Cryptographic Dependencies</name>
      <t>This specification relies on the following primitives:</t>
      <ul spacing="normal">
        <li>
          <t>A Diffie-Hellman Key Agreement (KA-DH), for example ECKA-DH defined in <xref target="BSI-TR-03111"/>:
          </t>
          <ul spacing="normal">
            <li>
              <t><tt>DH(skX, pkY)</tt>: Perform a non-interactive Diffie-Hellman exchange using the private key <tt>skX</tt> and public key <tt>pkY</tt> to produce a Diffie-Hellman shared secret of length Ndh. This function can raise a ValidationError.</t>
            </li>
            <li>
              <t><tt>Ndh</tt>: The length in bytes of a Diffie-Hellman shared secret produced by <tt>DH()</tt>.</t>
            </li>
            <li>
              <t><tt>Nsk</tt>: The length in bytes of a Diffie-Hellman private key.</t>
            </li>
          </ul>
        </li>
        <li>
          <t>A key derivation function (KDF), for example HKDF defined in <xref target="RFC5869"/>:
          </t>
          <ul spacing="normal">
            <li>
              <t><tt>Extract(salt, ikm)</tt>: Extract a pseudorandom key of fixed length Nh bytes from input keying material <tt>ikm</tt> and an optional byte string <tt>salt</tt>.</t>
            </li>
            <li>
              <t><tt>Expand(prk, info, L)</tt>: Expand a pseudorandom key <tt>prk</tt> using optional string <tt>info</tt> into <tt>L</tt> bytes of output keying material.</t>
            </li>
            <li>
              <t><tt>Nh</tt>: The output size of the Extract() function in bytes.</t>
            </li>
          </ul>
        </li>
        <li>
          <t>A Message Authentication Code algorithm (MAC), for example HMAC defined in <xref target="RFC2104"/>:
          </t>
          <ul spacing="normal">
            <li>
              <t><tt>MacSign(k, i)</tt>: Returns an authenticated tag for the given input <tt>i</tt> and key <tt>k</tt>.</t>
            </li>
            <li>
              <t><tt>Nk</tt>: The length in bytes of key <tt>k</tt>.</t>
            </li>
          </ul>
        </li>
      </ul>
    </section>
    <section anchor="public-key-derived-hmac">
      <name>Public Key Derived HMAC</name>
      <t>A public key derived HMAC requires three components for an algorithm:</t>
      <ol spacing="normal" type="1"><li>
          <t>a Diffie-Hellman Key Agreement (DHKA)</t>
        </li>
        <li>
          <t>a Key Derivation Function (KDF)</t>
        </li>
        <li>
          <t>a Message Authentication Code algorithm (MAC)</t>
        </li>
      </ol>
      <t>In general, these parameters are chosen by the Producer. These parameters need to be communicated to the Recipient to be able to verify the HMAC.</t>
      <section anchor="signature-generation">
        <name>Signature Generation</name>
        <t>The generation of the public key derived HMAC uses the Producer’s private key, the Recipient’s public key, and the message as inputs, along with optional parameters. The retrieval and communication of the Recipient's public key is out of scope of this specification and subject to the implementing protocols.</t>
        <t>Input:</t>
        <ul spacing="normal">
          <li>
            <t><tt>skP</tt>: private key of the Producer</t>
          </li>
          <li>
            <t><tt>pkR</tt>: public key of the Recipient</t>
          </li>
          <li>
            <t><tt>msg</tt>: JWS Signing Input</t>
          </li>
          <li>
            <t><tt>salt</tt> : Optional salt for key derivation</t>
          </li>
          <li>
            <t><tt>info</tt> : Optional info for key derivation</t>
          </li>
        </ul>
        <t>Function:</t>
        <artwork><![CDATA[
def pkdHhmacSign(skP, pkR, msg, salt, info)

    dh =  DH(skP, pkR)
    prk = Extract(salt, dh)
    k = Expand(prk, info, Nk)
    signature = MacSign(k, msg)
    return signature
]]></artwork>
      </section>
      <section anchor="signature-verification">
        <name>Signature Verification</name>
        <t>The generation of the public key derived HMAC uses the Recipient's private key, the Producer's public key, and the message as inputs, along with optional parameters.</t>
        <t>Input:</t>
        <ul spacing="normal">
          <li>
            <t><tt>skR</tt>: private key of the Recipient</t>
          </li>
          <li>
            <t><tt>pkS</tt>: public key of the Producer</t>
          </li>
          <li>
            <t><tt>msg</tt>: JWS Signing Input</t>
          </li>
          <li>
            <t><tt>salt</tt> : Optional salt for key derivation</t>
          </li>
          <li>
            <t><tt>info</tt> : Optional info for key derivation</t>
          </li>
          <li>
            <t><tt>signature</tt> : the Message Authentication Code</t>
          </li>
        </ul>
        <t>Function:</t>
        <artwork><![CDATA[
def pkdHhmacVerify(skR, pkS, msg, signature, salt, info)

    dh =  DH(skR, pkS)
    prk = Extract(salt, dh)
    k = Expand(prk, info, Nk)
    signature' = MacSign(k, msg)
    if signature != signature':
      raise Exception("Public key derived HMAC invalid")
    return
]]></artwork>
      </section>
      <section anchor="generic_suites">
        <name>Signature Suites</name>
        <t>Algorithms <bcp14>MUST</bcp14> follow the naming <tt>**TODO**</tt>.</t>
      </section>
    </section>
    <section anchor="public-key-derived-hmac-for-jose">
      <name>Public Key Derived HMAC for JOSE</name>
      <t>Public Key Derived HMAC behave like a digital signature as described in Section 3 of <xref target="RFC7518"/> and are intended for use in JSON Web Signatures (JWS) as described in <xref target="RFC7515"/>. The Producer performs the <tt>Message Signature or MAC Computation</tt> as defined by Section 5.1 of <xref target="RFC7515"/>. The Recipient performs the <tt>Message Signature or MAC Validation</tt> as defined by Section 5.2 of <xref target="RFC7515"/>.</t>
      <t>The following JWS headers are used to convey Public Key Derived HMAC for JOSE:</t>
      <ul spacing="normal">
        <li>
          <t><tt>alg</tt> : <bcp14>REQUIRED</bcp14>. The algorithm parameter describes the chosen signature suite, for example the ones described in <xref target="generic_suites">Suites</xref>.</t>
        </li>
        <li>
          <t><tt>pkds</tt> : <bcp14>REQUIRED</bcp14>. The <tt>pkds</tt> (Public key derived secret) parameter specifies the inputs needed to derive a symmetric key for MAC <xref target="pkds_header">PKDS Headermake</xref>.</t>
        </li>
        <li>
          <t><tt>nonce</tt> : <bcp14>OPTIONAL</bcp14>. The <tt>nonce</tt> may be provided by the Recipient additional to it's public key and ensure additional freshness of the signature. If provided, the Producer <bcp14>SHOULD</bcp14> add the <tt>nonce</tt> to the header.</t>
        </li>
      </ul>
      <section anchor="pkds_header">
        <name>The "pkds" Header Parameter</name>
        <t>The pkds protected header parameter specifies the inputs needed to derive a symmetric key for MAC computation using a key agreement and derivation scheme. Its value is a JSON object that includes identifiers, public keys, and algorithm-specific parameters relevant to the derivation.</t>
        <section anchor="syntax-and-semantics">
          <name>Syntax and semantics</name>
          <t>The <tt>pkds</tt> Header Parameter value <bcp14>MUST</bcp14> be a JSON object with the following fields:</t>
          <ul spacing="normal">
            <li>
              <t><tt>rpk</tt> (object, <bcp14>REQUIRED</bcp14>): The Recipient's public key used in DH-KA. The <tt>rpk</tt> object <bcp14>MUST</bcp14> contain at least one key claim as defined in Section 4.1 of <xref target="RFC7515"/>.  </t>
              <t>
Implementations <bcp14>MUST</bcp14> reject a JWS if the <tt>rpk</tt> key cannot be resolved unambiguously at validation time.</t>
            </li>
            <li>
              <t><tt>ppk</tt> (object, <bcp14>OPTIONAL</bcp14>):  The JWS Producer’s public key used in DH-KA. The <tt>ppk</tt> object <bcp14>MUST</bcp14> contain at least one key claim as defined in Section 4.1 of <xref target="RFC7515"/>.  </t>
              <t>
Implementations <bcp14>MUST</bcp14> reject a JWS if the <tt>ppk</tt> key cannot be resolved unambiguously at validation time or is incompatible with the key information in <tt>rpk</tt>.</t>
            </li>
            <li>
              <t><tt>info</tt> (string, <bcp14>OPTIONAL</bcp14>): Context- and application-specific information used as the info parameter to the KDF.</t>
            </li>
          </ul>
          <t>For a machine-readable definition of these fields, see the JSON Schema in <xref target="appendix-a">Appendix A</xref>.</t>
        </section>
      </section>
      <section anchor="example-jwt-todo">
        <name>Example JWT (<strong>TODO</strong>)</name>
        <t>The JWT/JWS header:</t>
        <artwork><![CDATA[
{
  "typ":"JWT",
  "alg":"ECDH-P256+HKDF-SHA256+HS256",
  "pkds":{
    "pkS":{
      "jwk":{
        "kty":"EC",
        "crv":"P-256",
        "x":"f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
        "y":"x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"
      }
    },
    "pkR":{
      "jwk":{
        "kty":"EC",
        "crv":"P-256",
        "x":"vWV4vmRT8HV9QAkbZJAWrvjOV0NfNOzkzq92apq8yjk",
        "y":"XGJRplhubKDv6cFA7e9-yn7F89UUwt57JVLAOS1tpXE"
      }
    },
    "info":"PKDS-v1"
  }
}
]]></artwork>
        <t>The JWT/JWS payload (TODO!:</t>
        <artwork><![CDATA[
{
  "sub": "1234567890",
  "iat": 1516239022
}
]]></artwork>
        <t>The JWT/JWS signature:</t>
        <artwork><![CDATA[
base64-encoded MAC
]]></artwork>
        <t>This specification described instantiations of Public Key Derived HMAC using specific algorithm combinations:</t>
        <artwork type="ascii-art"><![CDATA[
+-------------------------------+--------------------------+----------------+
| Algorithm Name                | Algorithm Description    | Requirements   |
+-------------------------------+--------------------------+----------------+
| "ECDH-P256+HKDF-SHA256+HS256" | ECDH using NIST P-256,   |   Optional     |
|                               | HKDF using SHA-256, and  |                |
|                               | HMAC using SHA-256       |                |
+-------------------------------+--------------------------+----------------+
]]></artwork>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="replay-attack-detection">
        <name>Replay Attack Detection</name>
        <t>Recipient <bcp14>MUST</bcp14> ensure the freshness of signatures by utilizing ephemeral keys in <tt>rpk</tt> or by providing a nonce for <tt>nonce</tt>.</t>
      </section>
      <section anchor="limited-repudiability">
        <name>Limited Repudiability</name>
        <t>A malicious Recipient can weaken the repudiability property by involving certain third parties in the protocol steps.</t>
        <ul spacing="normal">
          <li>
            <t>One method is to have a third party observe all protocol steps so that third party can be sure that the signature originates by the Producer.</t>
          </li>
          <li>
            <t>Another method requires that the Recipient's public key is a shared key that has previously been calculated with the keys of certain specific third parties so that the proof of authenticity can be done with Multi Party Computation involving all parties (see <xref target="TLS-NOTARY"/>).</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>Define:</t>
      <ul spacing="normal">
        <li>
          <t>define new <tt>pkds</tt> header parameter</t>
        </li>
        <li>
          <t>alg values for <strong>TODO</strong> and some more</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC7515">
          <front>
            <title>JSON Web Signature (JWS)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and an IANA registry defined by that specification. Related encryption capabilities are described in the separate JSON Web Encryption (JWE) specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7515"/>
          <seriesInfo name="DOI" value="10.17487/RFC7515"/>
        </reference>
        <reference anchor="RFC7517">
          <front>
            <title>JSON Web Key (JWK)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. This specification also defines a JWK Set JSON data structure that represents a set of JWKs. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and IANA registries established by that specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7517"/>
          <seriesInfo name="DOI" value="10.17487/RFC7517"/>
        </reference>
        <reference anchor="RFC7518">
          <front>
            <title>JSON Web Algorithms (JWA)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>This specification registers cryptographic algorithms and identifiers to be used with the JSON Web Signature (JWS), JSON Web Encryption (JWE), and JSON Web Key (JWK) specifications. It defines several IANA registries for these identifiers.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7518"/>
          <seriesInfo name="DOI" value="10.17487/RFC7518"/>
        </reference>
        <reference anchor="RFC9180">
          <front>
            <title>Hybrid Public Key Encryption</title>
            <author fullname="R. Barnes" initials="R." surname="Barnes"/>
            <author fullname="K. Bhargavan" initials="K." surname="Bhargavan"/>
            <author fullname="B. Lipp" initials="B." surname="Lipp"/>
            <author fullname="C. Wood" initials="C." surname="Wood"/>
            <date month="February" year="2022"/>
            <abstract>
              <t>This document describes a scheme for hybrid public key encryption (HPKE). This scheme provides a variant of public key encryption of arbitrary-sized plaintexts for a recipient public key. It also includes three authenticated variants, including one that authenticates possession of a pre-shared key and two optional ones that authenticate possession of a key encapsulation mechanism (KEM) private key. HPKE works for any combination of an asymmetric KEM, key derivation function (KDF), and authenticated encryption with additional data (AEAD) encryption function. Some authenticated variants may not be supported by all KEMs. We provide instantiations of the scheme using widely used and efficient primitives, such as Elliptic Curve Diffie-Hellman (ECDH) key agreement, HMAC-based key derivation function (HKDF), and SHA2.</t>
              <t>This document is a product of the Crypto Forum Research Group (CFRG) in the IRTF.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9180"/>
          <seriesInfo name="DOI" value="10.17487/RFC9180"/>
        </reference>
        <reference anchor="RFC5869">
          <front>
            <title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
            <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
            <author fullname="P. Eronen" initials="P." surname="Eronen"/>
            <date month="May" year="2010"/>
            <abstract>
              <t>This document specifies a simple Hashed Message Authentication Code (HMAC)-based key derivation function (HKDF), which can be used as a building block in various protocols and applications. The key derivation function (KDF) is intended to support a wide range of applications and requirements, and is conservative in its use of cryptographic hash functions. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5869"/>
          <seriesInfo name="DOI" value="10.17487/RFC5869"/>
        </reference>
        <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"/>
            <abstract>
              <t>This document describes HMAC, a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function, e.g., MD5, SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2104"/>
          <seriesInfo name="DOI" value="10.17487/RFC2104"/>
        </reference>
        <reference anchor="BSI-TR-03111" target="https://www.bsi.bund.de/dok/TR-03111-en">
          <front>
            <title>Technical Guideline BSI TR-03111: Elliptic Curve Cryptography, Version 2.10</title>
            <author>
              <organization/>
            </author>
            <date year="2018" month="June"/>
          </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"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="ISO-18013-5" target="https://www.iso.org/standard/69084.html">
          <front>
            <title>ISO/IEC 18013-5:2021, Personal identification — ISO-compliant driving licence, Part 5: Mobile driving licence (mDL) application</title>
            <author>
              <organization/>
            </author>
            <date year="2021" month="September"/>
          </front>
        </reference>
        <reference anchor="TLS-NOTARY" target="https://tlsnotary.org/">
          <front>
            <title>TLSNotary project</title>
            <author>
              <organization/>
            </author>
            <date year="2024" month="October"/>
          </front>
        </reference>
      </references>
    </references>
    <?line 313?>

<section anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Thanks to:</t>
      <ul spacing="normal">
        <li>
          <t>Brian Campbell</t>
        </li>
        <li>
          <t>John Bradley</t>
        </li>
      </ul>
    </section>
    <section anchor="appendix-a">
      <name>Appendix A. JSON Schema for the "pkds" Header Parameter</name>
      <t><tt>JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/pkds.schema.json",
  "title": "JOSE Header Parameter: pkds",
  "type": "object",
  "properties": {
    "ppk": {
      "$ref": "#/$defs/keyRef"
    },
    "rpk": {
      "$ref": "#/$defs/keyRef"
    },
    "params": {
      "type": "object"
    }
  },
  "required": [
    "rpk"
  ],
  "additionalProperties": false,
  "$defs": {
    "keyRef": {
      "type": "object",
      "properties": {
        "jwk": {
          "type": "object"
        },
        "kid": {
          "type": "string"
        },
        "jkt": {
          "type": "string"
        },
        "jku": {
          "type": "string"
        },
        "x5c": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "x5u": {
          "type": "string"
        },
        "x5t": {
          "type": "string"
        }
      },
      "anyOf": [
        {
          "required": [
            "jwk"
          ]
        },
        {
          "required": [
            "kid"
          ]
        },
        {
          "required": [
            "jkt"
          ]
        },
        {
          "required": [
            "jku"
          ]
        },
        {
          "required": [
            "x5c"
          ]
        },
        {
          "required": [
            "x5u"
          ]
        },
        {
          "required": [
            "x5t"
          ]
        }
      ],
      "additionalProperties": false
    }
  }
}
</tt></t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81a3XLbOJa+51Ogla4aOy3Jlh07tmp6Joplx3b8N5ITdzaV
akEkJMGiSDZBylY87pqH2Ju922fZR5kn2XMOQBLUjyedcW1tLmIRBA4Ozu93
Dlir1ZxEJr5osspV2vely96LGWuLWE6Fx47PWwdsEMbs9LJ7WHF4vx+LKU59
367NvXN5IoZhPGsyGQxCx/FCN+AToOvFfJDU+lwlkge121CJWjT2RrXNTUel
/YlUSoZBMotg6snh9RFjLxj3VQi7yMATkYD/gqRSZRXhySSMJffx4aT1Fv7A
7pWTzvVRxQnSSV/ETccDNpqOGwZKBCpVTZbEqXCA522Hx4ID1a5w01gms4pz
F8bjYRymEYye8ilXbiyjhF32b4WbsK4cBjIYMh547DBw41mUAKMVZyxmsNBr
OqxGR6e/N11nKoIUtmbsj5NkTJ+/cgMc4YR3SALHJ1z6MI5SeyNFMqiH8RDH
eeyOYHyUJJFqbmzgNBwCpdWzaRs4sNGPwzslNpDABi4cymSU9mFpxFPfKGVj
hYpwvg/yVIm1lbWuronVZbiKwqrx+iiZ+BXH4WkyCmMUJWzF2CD1fW00V7AL
e6uX0Ss4EA/kV44Ca7K3KViF8uLUHYtYSPZu0j+maUILzGyIvL4ZhuHQp/G6
G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