<?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-dvs-02" 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-dvs-02"/>
    <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-dvs/draft-bastian-jose-dvs.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-bastian-jose-dvs/"/>.
      </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-dvs"/>.</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+51Ogla4aOy3Klh07tmp6Joplx3b8N5aTdDaV
akEkJCGiSDZBylY87pqH2Ju922fZR5kn2XMOQBLUjyedcW1tLmIRBA4Ozu93
Dui6rpPKNBAtVrvK+oH02FsxYx2RyKnw2fF5+4ANooSdXnYPaw7v9xMxxalv
O+7cO4+nYhglsxaT4SByHD/yQj4Bun7CB6nb5yqVPHS/REq4/lS5m1uOyvoT
qZSMwnQWw8yTw5sjxp4xHqgINpGhL2IB/4Vprc5qwpdplEge4MNJ+zX8gc1r
J9c3RzUnzCZ9kbQcH7hoOV4UKhGqTLVYmmTCAZa3HZ4IDlS7wssSmc5qzm2U
jIdJlMUwesqnXHmJjFN22f8ivJR15TCU4ZDx0GeHoZfM4hQYrTljMYOFfsth
Lp2c/n7oOlMRZrA1Y3+cJGP6/LUPwBFOeIMkcHzCZQDjKLRXUqSDRpQMcZwn
3gjGR2kaq9bGBk7DIdBZI5+2gQMb/SS6VWIDCWzgwqFMR1kflsY8C4xONpZr
CKcHIE6VWjtZyxqaVkNGKwisGG6M0klQcxyepaMoQTnCRowNsiDQBnMFe7DX
ehW9gtPwUH7lKK0We52BSSg/ybyxSIRkbyb9Y5omtLTMfsjpq2EUDQM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