<?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-01" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title abbrev="PKD-HMAC for JOSE">Public Key Derived HMAC for JOSE</title>
    <seriesInfo name="Internet-Draft" value="draft-bastian-jose-pkdh-01"/>
    <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="20"/>
    <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>pkdh</tt> (public key derived HMAC), 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>pkdh</tt> parameter or in a claims element for use in the key agreement computation. The <tt>pkdh</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 value.</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> : salt for key derivation</t>
          </li>
          <li>
            <t><tt>info</tt> : info for key derivation</t>
          </li>
        </ul>
        <t>Function:</t>
        <artwork><![CDATA[
def pkdHmacSign(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>pkP</tt>: public key of the Producer</t>
          </li>
          <li>
            <t><tt>msg</tt>: JWS Signing Input</t>
          </li>
          <li>
            <t><tt>salt</tt> : salt for key derivation</t>
          </li>
          <li>
            <t><tt>info</tt> : info for key derivation</t>
          </li>
          <li>
            <t><tt>signature</tt> : the Message Authentication Code</t>
          </li>
        </ul>
        <t>Function:</t>
        <artwork><![CDATA[
def pkdHmacVerify(skR, pkP, msg, signature, salt, info)

    dh =  DH(skR, pkP)
    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>pkdh</tt> : <bcp14>REQUIRED</bcp14>. The <tt>pkdh</tt> (public key derived HMAC) parameter specifies the inputs needed to derive a symmetric key for MAC <xref target="pkdh_header">PKDH 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="pkdh_header">
        <name>The "pkdh" Header Parameter</name>
        <t>The pkdh 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>pkdh</tt> Header Parameter value <bcp14>MUST</bcp14> be a JSON object with the following fields:</t>
          <ul spacing="normal">
            <li>
              <t><tt>pkr</tt> (object, <bcp14>REQUIRED</bcp14>): The Recipient's public key used in DH-KA. The <tt>pkr</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>pkr</tt> key cannot be resolved unambiguously at validation time.</t>
            </li>
            <li>
              <t><tt>pkp</tt> (object, <bcp14>OPTIONAL</bcp14>):  The JWS Producer’s public key used in DH-KA. The <tt>pkp</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>pkp</tt> key cannot be resolved unambiguously at validation time or is incompatible with the key information in <tt>pkr</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. If absent, the default string value "PKDH-v1" <bcp14>SHALL</bcp14> be used.</t>
            </li>
            <li>
              <t><tt>salt</tt> (string, <bcp14>OPTIONAL</bcp14>): The salt parameter to the KDF encoded as BASE64(salt). If absent, TBD.</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",
  "pkdh":{
    "pkp":{
      "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":"PKDH-v1",
    "salt": "V2hhdCBhIHNhbHQ="
  }
}
]]></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>pkr</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>pkdh</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 316?>

<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 "pkdh" Header Parameter</name>
      <artwork><![CDATA[
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/pkdh.schema.json",
  "title": "JOSE Header Parameter: pkdh",
  "type": "object",
  "properties": {
    "pkp": {
      "$ref": "#/$defs/keyRef"
    },
    "pkr": {
      "$ref": "#/$defs/keyRef"
    },
    "info": {
      "type": "string"
    },
    "salt": {
      "type": "string"
    },
    "params": {
      "type": "object"
    }
  },
  "required": [
    "pkr"
  ],
  "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
    }
  }
}
]]></artwork>
    </section>
    <section numbered="false" anchor="document-history">
      <name>Document History</name>
      <t>-01</t>
      <ul spacing="normal">
        <li>
          <t>use consistent key naming</t>
        </li>
        <li>
          <t>rename pkds header to pkdh header</t>
        </li>
        <li>
          <t>add salt to pkdh header</t>
        </li>
      </ul>
      <t>-00</t>
      <ul spacing="normal">
        <li>
          <t>initial draft after renaming to draft-bastian-jose-pkdh</t>
        </li>
      </ul>
      <t>[ draft-bastian-jose-dvs ]</t>
      <t>-02</t>
      <ul spacing="normal">
        <li>
          <t>remove term "Designated Verifier Signatures", replace with "Public Key Derived HMAC"</t>
        </li>
        <li>
          <t>add pkds header structure</t>
        </li>
        <li>
          <t>rename Signing Party to Producer</t>
        </li>
        <li>
          <t>rename Verifying Party to Recipient</t>
        </li>
      </ul>
      <t>-01</t>
      <ul spacing="normal">
        <li>
          <t>remove all HPKE-related parts</t>
        </li>
        <li>
          <t>add co-editors Stefan Santesson and Peter Lee Altmann</t>
        </li>
      </ul>
      <t>-00</t>
      <ul spacing="normal">
        <li>
          <t>initial draft</t>
        </li>
      </ul>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81b63LbOLL+z6fAKFO1tkeULSd2bNVmdxTLjuz4NpaTTE42
NYZISEJEkRyClK14PbUPsX/23z7LeZR9ktPdAElQF08mJ6fqpGrGEgg0Gn39
ukG5ruukMg1Ei9Uus34gPfZazFhHJHIqfNY9ax+wQZSwk4veYc3h/X4ipjj1
dcede+bxVAyjZNZiMhxEjuNHXsgnQNdP+CB1+1ylkofup0gJNx77I3er6ais
P5FKyShMZzFMPT68PmLsCeOBimAXGfoiFvC/MK3VWU34Mo0SyQP8ctx+CX9g
99rx1fVRzQmzSV8kLccHNlqOF4VKhCpTLZYmmXCA56cOTwQHqj3hZYlMZzXn
NkrGwyTKYhg94VOuvETGKbvofxJeynpyGMpwyHjos8PQS2ZxCozWnLGYwUK/
5TCXjk5/3/WcqQgz2JqxP06SMX3+2jvgCCe8QhI4PuEygHGU2o9SpINGlAxx
nCfeCMZHaRqr1uYmTsMhUFojn7aJA5v9JLpVYhMJbOLCoUxHWR+WxjwLjFI2
V6gI5wcgT5VaW1nrGppYQ0arKKwab4zSSVBzHJ6loyhBUcJWjA2yINBGcwm7
sJd6GT2CA/FQfuYosBZ7mYFVKD/JvLFIhGSvJv0uTRNaYGZD5PXHYRQNAxpv
eNHEWdzrTHojzl4nPFNfsdUY1zUmSOPH4SO79FIx4CHr8RAEqqJlpzruKOGx
XhRk+F3Zuyha/SPn3IU5K7a4FKlI2KkQrB2kEx4u2+N6BE+HIvRm5LsdCTrk
AXsVTUUSTsDT7F25JvNjeawwSiZAaUqGfnV08HynudPKPxRDz/Oh58XQXj60
p4f2m3tbrfyDHtrZ291v5R/00HZz61kr/wBDL3vH7vWVu/W02Wy2iNM8eF0L
bxRKD4+SSV8EMhQ4mxWz2WEQgCtCgDvIkqlgB+h90TDh8WhWZ29FgmGIb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