<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type='text/xsl' href='http://xml2rfc.tools.ietf.org/authoring/rfc2629.xslt' ?>
<!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN" "http://xml2rfc.tools.ietf.org/authoring/rfc2629.dtd">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std" ipr="trust200902"
  docName="draft-ietf-jose-fully-specified-algorithms-05"
  updates="7518, 8037, 8152, 9053">

  <?rfc toc="yes"?>
  <?rfc tocompact="yes"?>
  <?rfc tocdepth="5"?>
  <?rfc tocindent="yes"?>
  <?rfc symrefs="yes"?>
  <?rfc sortrefs="yes"?>
  <?rfc compact="yes"?>
  <?rfc subcompact="no"?>

  <front>

    <title abbrev="Fully-Specified Algorithms">Fully-Specified Algorithms for JOSE and COSE</title>

    <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
      <organization>Self-Issued Consulting</organization>
      <address>
	<email>michael_b_jones@hotmail.com</email>
	<uri>https://self-issued.info/</uri>
      </address>
    </author>

    <author fullname="Orie Steele" initials="O." surname="Steele">
      <organization>Transmute</organization>
      <address>
	<email>orie@transmute.industries</email>
      </address>
    </author>

    <date day="17" month="August" year="2024" />

    <area>Security</area>
    <workgroup>JOSE Working Group</workgroup>

    <keyword>Cryptographic Algorithm Identifiers</keyword>
    <keyword>JSON Object Signing and Encryption (JOSE)</keyword>
    <keyword>CBOR Object Signing and Encryption (COSE)</keyword>
    <keyword>Internet-Draft</keyword>

    <abstract>
      <t>
	This specification refers to cryptographic algorithm identifiers
	that fully specify the cryptographic operations to be performed,
	including any curve, key derivation function (KDF), hash functions, etc.,
	as being "fully specified".
	Whereas, it refers to cryptographic algorithm identifiers
	that require additional information beyond the algorithm identifier
	to determine the cryptographic operations to be performed
	as being "polymorphic".
	This specification creates fully-specified algorithm identifiers for registered
	JOSE and COSE polymorphic algorithm identifiers,
	enabling applications to use only fully-specified algorithm identifiers.
      </t>
    </abstract>

  </front>

  <middle>

    <section anchor="Introduction" title="Introduction">
      <t>
	The IANA algorithm registries for JOSE <xref target="IANA.JOSE"/> and
	COSE <xref target="IANA.COSE"/> contain two kinds of algorithm identifiers:
      </t>
      <t>
	<list style="hanging">

          <t hangText="Fully Specified">
	    <vspace/>
	    Those that fully determine the cryptographic operations to be performed,
	    including any curve, key derivation function (KDF), hash functions, etc.
	    Examples are <spanx style="verb">RS256</spanx> and <spanx style="verb">ES256K</spanx> in both JOSE and COSE
	    and <spanx style="verb">ES256</spanx> in JOSE.
	  </t>

          <t hangText="Polymorphic">
	    <vspace/>
	    Those requiring information beyond the algorithm identifier
	    to determine the cryptographic operations to be performed.
	    Such additional information could include the actual key value and a curve that it uses.
	    Examples are <spanx style="verb">EdDSA</spanx> in both JOSE and COSE
	    and <spanx style="verb">ES256</spanx> in COSE.
	  </t>

	</list>
      </t>
      <t>
	This matters because many protocols negotiate supported operations using only algorithm identifiers.
	For instance, OAuth Authorization Server Metadata <xref target="RFC8414"/>
	uses negotiation parameters like these (from an example in the specification):
	<figure><artwork><![CDATA[
  "token_endpoint_auth_signing_alg_values_supported":
    ["RS256", "ES256"]
]]></artwork></figure>
      </t>
      <t>
	OpenID Connect Discovery <xref target="OpenID.Discovery"/> likewise negotiates supported algorithms
	using <spanx style="verb">alg</spanx> and <spanx style="verb">enc</spanx> values.
	W3C Web Authentication <xref target="WebAuthn"/> and
	FIDO Client to Authenticator Protocol (CTAP) <xref target="FIDO2"/>
	negotiate using COSE <spanx style="verb">alg</spanx> numbers.
      </t>
      <t>
	This does not work for polymorphic algorithms.
	For instance, with <spanx style="verb">EdDSA</spanx>, you do not know which of the curves
	<spanx style="verb">Ed25519</spanx> and/or <spanx style="verb">Ed448</spanx> are supported!
	This causes real problems in practice.
      </t>
      <t>
	WebAuthn contains this de-facto algorithm definition to work around this problem:
	<figure><artwork><![CDATA[
  -8 (EdDSA), where crv is 6 (Ed25519)
]]></artwork></figure>
      </t>
      <t>
	This redefines the COSE <spanx style="verb">EdDSA</spanx> algorithm identifier
	for the purposes of WebAuthn to restrict it to using
	the <spanx style="verb">Ed25519</spanx> curve - making it non-polymorphic
	so that algorithm negotiation can succeed, but also effectively
	eliminating the possibility of using <spanx style="verb">Ed448</spanx>.
	Other similar workarounds for polymorphic algorithm identifiers are used in practice.
      </t>
      <t>
	This specification creates fully-specified algorithm identifiers for registered
	polymorphic JOSE and COSE algorithms and their parameters,
	enabling applications to use only fully-specified algorithm identifiers.
	It furthermore deprecates the practice of registering polymorphic algorithm identifiers.
      </t>

      <section anchor="rnc" title="Requirements Notation and Conventions">
        <t>
	  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
	  "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
	  "OPTIONAL" in this document are to be interpreted as described in
	  BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
	  only when, they appear in all capitals, as shown here.
	</t>
      </section>
    </section>

    <section anchor="fully-specified-algs" title="Fully-Specified Digital Signature Algorithm Identifiers">
      <t>
	This section creates fully-specified digital signature algorithm identifiers for all registered
	polymorphic JOSE and COSE algorithms and their parameters.
      </t>

      <section anchor="ECDSA" title="Elliptic Curve Digital Signature Algorithm (ECDSA)">
	<t>
	  <xref target="RFC9053"/> defines the current use of
	  the Elliptic Curve Digital Signature Algorithm (ECDSA) by COSE.
	  The COSE algorithm registrations for ECDSA are polymorphic,
	  since they do not specify the curve used.
	  For instance, <spanx style="verb">ES256</spanx> is defined as
	  "ECDSA w/ SHA-256" in Section 2.1 of <xref target="RFC9053"/>.
	  (The corresponding JOSE registrations in <xref target="RFC7518"/> are full-specified.)
	</t>
	<t>
	  The following fully-specified COSE ECDSA algorithms are defined:
	</t>
	<texttable anchor="ecdsa-algs" title="ECDSA Algorithm Values" suppress-title="false" align="center" style="full">
	  <ttcol align="left">Name</ttcol>
	  <ttcol align="left">COSE Value</ttcol>
	  <ttcol align="left">Description</ttcol>
	  <ttcol align="left">COSE Recommended</ttcol>

	  <c>ESP256</c>
	  <c>TBD (requested assignment -9)</c>
	  <c>ECDSA using P-256 curve and SHA-256</c>
	  <c>Yes</c>

	  <c>ESP384</c>
	  <c>TBD (requested assignment -48)</c>
	  <c>ECDSA using P-384 curve and SHA-384</c>
	  <c>Yes</c>

	  <c>ESP512</c>
	  <c>TBD (requested assignment -49)</c>
	  <c>ECDSA using P-521 curve and SHA-512</c>
	  <c>Yes</c>

	  <c>ESB256</c>
	  <c>TBD (requested assignment -261)</c>
	  <c>ECDSA using BrainpoolP256r1 curve and SHA-256</c>
	  <c>No</c>

	  <c>ESB320</c>
	  <c>TBD (requested assignment -262)</c>
	  <c>ECDSA using BrainpoolP320r1 curve and SHA-384</c>
	  <c>No</c>

	  <c>ESB384</c>
	  <c>TBD (requested assignment -263)</c>
	  <c>ECDSA using BrainpoolP384r1 curve and SHA-384</c>
	  <c>No</c>

	  <c>ESB512</c>
	  <c>TBD (requested assignment -264)</c>
	  <c>ECDSA using BrainpoolP512r1 curve and SHA-512</c>
	  <c>No</c>

	</texttable>
      </section>

      <section anchor="EdDSA" title="Edwards-Curve Digital Signature Algorithm (EdDSA)">
	<t>
	  <xref target="RFC8037"/> defines the current use of
	  the Edwards-Curve Digital Signature Algorithm (EdDSA)
	  by JOSE and <xref target="RFC9053"/> defines its current use by COSE.
	  Both register polymorphic <spanx style="verb">EdDSA</spanx> algorithm identifiers.
	</t>
	<t>
	  The following fully-specified JOSE and COSE EdDSA algorithms are defined:
	</t>
	<texttable anchor="eddsa-algs" title="EdDSA Algorithm Values" suppress-title="false" align="center" style="full">
	  <ttcol align="left">Name</ttcol>
	  <ttcol align="left">COSE Value</ttcol>
	  <ttcol align="left">Description</ttcol>
	  <ttcol align="left">JOSE Implementation Requirements</ttcol>
	  <ttcol align="left">COSE Recommended</ttcol>

	  <c>Ed25519</c>
	  <c>TBD (requested assignment -50)</c>
	  <c>EdDSA using Ed25519 curve</c>
	  <c>Optional</c>
	  <c>Yes</c>

	  <c>Ed448</c>
	  <c>TBD (requested assignment -51)</c>
	  <c>EdDSA using Ed448 curve</c>
	  <c>Optional</c>
	  <c>Yes</c>

	</texttable>
      </section>

    </section>

    <section anchor="fully-specified-enc" title="Fully-Specified Encryption">
      <t>
  This section describes the construction of fully-specified encryption algorithm identifiers in the context of existing the JOSE and COSE encryption schemes
  JSON Web Encryption (JWE) as described in <xref target="RFC7516"/> and
  COSE Encrypt as described in <xref target="RFC9052"/>.
      </t>

      <section anchor="MultiAlgs" title="Fully-Specified Computations Using Multiple Algorithms">
	<t>
	  Both JOSE and COSE have operations that take multiple algorithms as parameters.
	  Encrypted objects in JOSE <xref target="RFC7516"/> use two algorithm identifiers:
	  the first in the <spanx style="verb">alg</spanx> (Algorithm) Header Parameter,
	  which specifies how to determine the content encryption key, and
	  the second in the <spanx style="verb">enc</spanx> (Encryption Algorithm)
	  Header Parameter, which specifies the content encryption algorithm.
	  Likewise, encrypted COSE objects can use multiple algorithms
	  for corresponding purposes.
	</t>
	<t>
	  Each of these multiple algorithms must be independently fully specified.
	  The operations performed by each of them MUST NOT vary
	  when used alongside other algorithms.
	  So for instance, for JOSE, <spanx style="verb">alg</spanx> values
	  and <spanx style="verb">enc</spanx> values MUST each be fully specified,
	  and their behaviors MUST NOT depend upon one another.
	</t>
      </section>

      <section title="Analysis of Modes of Encryption" anchor="EncryptionModes">
      <t>
JOSE and COSE support several modes of encryption.
Although the terminology sometimes differs between JOSE and COSE,
both support these encryption modes:
      </t>
      <list style="symbols">
        <t>
Direct Encryption - A symmetric cryptographic operation.
        </t>
        <t>
Key Establishment with Direct Encryption - An asymmetric cryptographic operation to derive a shared secret, key derivation and then a symmetric cryptographic operation.
        </t>
        <t>
Two-Layer Encryption - A content encryption key is protected (multiple possible ways), then content encryption or decryption is performed using the protected content encryption key.
        </t>
      </list>
      <t>
Mode complexity creates the following risks:
      </t>

      <list style="symbols">
        <t>
The combination of chosen algorithms might not be implemented by the receiver.
        </t>
        <t>
The combination of chosen algorithms might not be aligned in terms of strength.
        </t>
        <t>
Underspecified or implicit parameters could lead to exploitable faults in implementations, for example,
cross-curve Elliptic Curve Diffie-Hellman (ECDH) between P-256 and P-384 or X25519.
        </t>
        <t>
Alternative algorithms at a component layer, such as symmetric key encryption, might provide different security properties, for example, "A128GCM" vs. "A128CBC-HS256".
        </t>
      </list>

      <t>
While this specification provides a definition of what fully-specified encryption algorithm identifiers are for both JOSE and COSE, including examples,
it does not deprecate any polymorphic algorithms,
since complete replacements for them are not provided.
It does register a small set of new fully-specified encryption algorithms,
so that polymorphic encryption algorithms need not be used.
</t>

      <t>
The following sections describe what fully specified means for each mode.
They also register at least one fully-specified algorithm for each mode,
when one was not already available.
      </t>

      <section anchor="fully-specified-symmetric-encryption-algs" title="Direct Encryption">
<t>
Symmetric encryption algorithms generally satisfy the following interface:
</t>
<sourcecode>
secret_key = key_generation(algorithm_identifier)
ciphertext = encrypt(plaintext, secret_key)
plaintext  = decrypt(ciphertext, secret_key)
</sourcecode>
<t>
Depending on the algorithm, additional parameters such as Additional Authenticated Data (AAD) or Initialization Vector (IV) might be required.
</t>
<t>
In the special case where the plaintext is a content encryption key, to be used with a subsequent symmetric encryption algorithm,
such a symmetric encryption algorithm is referred to as a key wrapping algorithm and the secret_key is referred to as a key wrapping key.
</t>
<t>
An example of a fully-specified symmetric encryption algorithm is "A128GCM" (AES GCM using 128-bit key).
</t>
<t>
An example of a fully-specified key wrapping algorithm is "A128KW" (AES Key Wrap using 128-bit key).
</t>
<t>
A symmetric encryption algorithm is fully specified when it satisfies the interface above, and depends only on the parameters to the encrypt and decrypt operations.
</t>
<t>
Direct Encryption and Key Wrapping algorithms encode the primary symmetric key parameter (key length) in the algorithm identifier.
Key Wrapping algorithms impose additional implicit constraints on AAD and IV.
</t>

<t>
In JOSE and COSE, all currently registered Direct Encryption and Key Wrapping algorithms are fully specified.
</t>

<t>
Example of a decoded JWE Protected Header, for Direct Encryption:
</t>
<sourcecode>
{
  "alg": "dir",
  "enc": "A128GCM",
  ...
}
</sourcecode>

<t>
Example of a decoded JWE Protected Header, for Key Wrapping:
</t>
<sourcecode>
{
  "alg": "A128KW",
  "enc": "A128GCM",
  ...
}
</sourcecode>

<!--
<t>
TODO: COSE EDN example.
</t>
-->

      </section>

      <section anchor="fully-specified-direct-encryption-algs" title="Key Establishment with Direct Encryption">
<t>
Key establishment with direct encryption algorithms generally satisfy the following interface:
</t>
<sourcecode>
private_key, public_key = key_generation(algorithm_identifier)
ciphertext = encrypt(plaintext, public_key)
plaintext  = decrypt(ciphertext, private_key)
</sourcecode>

<t>
Depending on the symmetric algorithm, additional parameters such as Additional Authenticated Data (AAD) or Initialization Vector (IV) might be required.
</t>

<t>
Although JOSE and COSE encode this type of encryption differently, both rely on a symmetric key derived from an asymmetric key.
An algorithm called a key derivation function (KDF) is applied between key establishment and symmetric encryption.
</t>

<t>
Key establishment algorithms often rely on an asymmetric cryptographic operation whereby a public and a private key are used to produce a shared secret, which can be combined with a KDF to produce a symmetric key.
The process of producing a shared secret is key type specific, and is different for elliptic curves, RSA, and lattice-based algorithms.
</t>

<t>
Elliptic Curve Diffie-Hellman (ECDH) is used to produce a shared secret with elliptic curve-based keys as follows:
</t>
<sourcecode>
private_key1, public_key1 = key_generation(algorithm_identifier)
private_key2, public_key2 = key_generation(algorithm_identifier)
shared_secret = derive_shared_secret(public_key1, private_key2)
shared_secret = derive_shared_secret(public_key2, private_key1)
</sourcecode>

<t>
An algorithm called a Key Encapsulation Mechanism, can be used to provide a common interface for deriving shared secrets, regardless of key type.
</t>

<t>
Key encapsulation algorithms generally satisfy the following interface:
</t>
<sourcecode>
private_key, public_key = key_generation(algorithm_identifier)
ciphertext, shared_secret = encapsulate(public_key)
shared_secret = deencapsulate(ciphertext, private_key)
</sourcecode>

<t>
When using Key Establishment with Direct Encryption, the ciphertext is not only the output of symmetric encryption, but also includes all parameters necessary for the recipient to decrypt the ciphertext.
Encrypted content encryption keys are not produced by fully-specified Key Establishment with Direct Encryption algorithms.
</t>

<t>
In JOSE, the KDF algorithm is "Concat KDF" and is an implicit parameter of the key establishment algorithm.
In JOSE and COSE, key establishment algorithms have historically been generic to a key type including all its mandatory parameters.
For example, "ECDH-ES" establishes a shared secret, and then through the use of a KDF, a content encryption key, for keys based on elliptic curves.
However, the mandatory parameters of the public_key and private_key need be the same in the context of the key type.
</t>

<t>
For example, when using ECDH-ES with secp256r1 (P-256) to establish a shared secret,
the ECDH algorithm is a function of an ephemeral and a static key,
which need to be of the same key type, and having the same parameters, in this case, the curve parameter.
</t>

<t>
To successfully encrypt to a recipient, a sender needs to possess the recipient's key (which contains the curve parameter) and know the recipients supported algorithms.
</t>

<t>
In JOSE and COSE, key representations can support communicating the algorithm which a recipient supports for a given key.
It is considered a best practice to only support one algorithm during the lifetime of a key.
</t>

<t>
Example of a decoded JWE Protected Header, for Key Establishment with Direct Encryption:
</t>

<sourcecode>
{
  "alg":"ECDH-ES",
  "enc":"A128GCM",
  ...
}
</sourcecode>

<!--
<t>
TODO: COSE EDN example.
</t>
-->

<t>
Despite containing both the key establishment algorithm (with an implicit KDF) and the symmetric encryption algorithm, the example above is not fully specified.
</t>

<t>
To make a Key Establishment with Direct Encryption algorithm fully specified, all essential parameters need to be encoded in the algorithm identifier.
In the context of the example above, the missing explicit parameters are curve name and KDF name.
If the KDF requires additional parameters, they need to be present.
</t>

<t>
To convey a fully-specified Key Establishment with Direct Encryption algorithm in JOSE, the "alg" value MUST be "dir",
and the "enc" value MUST be fully specified, specifying all essential parameters for both key establishment and symmetric encryption.
For example: "ECDH-ES using P-256 and Concat-KDF with A128GCM" or "ECDH-ES using X25519 and Concat-KDF with A256GCM".
</t>

<t>
To convey a fully-specified Key Establishment with Direct Encryption algorithm in COSE, the "alg" value MUST specify all essential parameters for both key establishment and symmetric encryption.
For example: "ECDH-ES using P-256 and HKDF SHA-256 with A128GCM" or "ECDH-ES using X25519 HKDF SHA-512 wit A256GCM".
</t>

<t>
Fully-specified Key Establishment with Direct Encryption algorithms enable the sender and receiver to agree on all algorithms needed to encrypt and decrypt a message using a single algorithm identifier.
</t>

      </section>

      <section anchor="fully-specified-key-wrapping-encryption-algs" title="Two-Layer Encryption">

<t>
This section describes Two-Layer Encryption in both JOSE and COSE.
Each defines multiple ways that a content encryption key can be produced and protected, then later used to decrypt or encrypt content.
</t>

<t>
This specification uses the term "Two-Layer Encryption" to refer to what JOSE describes as "Key Encryption" and "Key Agreement with Key Wrapping", and what COSE describes as "Key Transport" and "Key Agreement with Key Wrap".
</t>

<t>
A distinguishing characteristic of Two-Layer Encryption schemes is that multiple recipients can perform decryptions, using a wide range of algorithms, and that encrypted content encryption keys are always present.
</t>

<t>
In RSA-OAEP, the encrypted content encryption key is generated through an asymmetric cryptographic operation.
</t>

<t>
When Key Wrapping without any key establishment is used, the content encryption key is encrypted using a symmetric cryptographic operation (key wrap).
How the content encryption key was generated is out of scope for this discussion.
</t>

<t>
Key wrapping algorithms generally satisfy the following interface:
</t>
<sourcecode>
key_encryption_key = \
key_generation(algorithm_identifier)

encrypted_content_encryption_key = \
encrypt(content_encryption_key, key_encryption_key)

content_encryption_key  = \
decrypt(encrypted_content_encryption_key, key_encryption_key)
</sourcecode>

<t>
When Key Establishment with Key Wrapping is used, the content encryption key is protected with Key Wrapping, where the Key Encryption Key is derived from an asymmetric cryptographic operation and a key derivation function.
</t>

<t>
Key Establishment with Key Wrapping algorithms generally satisfy the following interface:
</t>
<sourcecode>
private_key, public_key = key_generation(algorithm_identifier)
# ignoring ephemeral/static vs. static/static, etc.

key_encryption_key = \
key_establishment(public_key, private_key)

encrypted_content_encryption_key = \
encrypt(content_encryption_key, key_encryption_key)

content_encryption_key = \
decrypt(encrypted_content_encryption_key, key_encryption_key)
</sourcecode>

<t>
The interface above is consistent with Key Establishment with Direct Encryption.
The process of deriving a shared secret and content encryption key is specific to the asymmetric key type used.
The difference is that instead of using the derived content encryption key directly, two-layer encryption always uses a key encryption key, and protects the content encryption key.
</t>

<t>
Regardless of how a Two-Layer Encryption scheme protects the content encryption key, content encryption algorithms generally satisfy the following interface:
</t>
<sourcecode>
content_encryption_key = \
unwrap or establish and unwrap or key transport...

ciphertext = encrypt(plaintext, content_encryption_key)
plaintext  = decrypt(ciphertext, content_encryption_key)
</sourcecode>

<t>
Depending on the content encryption algorithm, additional parameters such as Additional Authenticated Data (AAD) and/or an Initialization Vector (IV) might be required.
</t>

<t>
Although JOSE and COSE encode Two-Layer Encryptions differently, both rely on a protected content encryption key.
The content encryption key is protected using Key Wrapping directly, or through Key Establishment and then Key Wrapping, or Key Transport, or Key Encryption.
</t>

<t>
When using Two-Layer Encryption, the ciphertext is not only the output of symmetric encryption, but also includes
and/or is accompanied by
all parameters necessary for the recipient to decrypt the ciphertext,
including parameters for use with the key establishment algorithm, such as ephemeral or encapsulated keys, any required key derivation functions and their parameters and the key wrapping algorithm.
Encrypted content encryption keys are always present when Two-Layer Encryption algorithms are used.
Parameters accompanying the ciphertext can include
an Initialization Vector (IV),
an Authentication Tag,
and Additional Authenticated Data (AAD).
Two-Layer Encryption is often used for encrypting the same plaintext to multiple recipients, in contrast with other modes which can only be used to encrypt to a single recipient.
</t>

<t>
Example of a decoded JWE Protected Header, for Key Agreement with ECDH-ES:
</t>

<sourcecode>
{
  "alg": "ECDH-ES",
  "enc": "A256GCM",
  ...
}
</sourcecode>

<t>
Example of a decoded JWE Protected Header, for Key Agreement using ECDH-ES and AES-KeyWrap with AES-GCM:
</t>

<sourcecode>
{
  "alg": "ECDH-ES+A128KW",
  "enc": "A128GCM",
  ...
}
</sourcecode>

<t>
However, despite containing both the key establishment algorithm and a content encryption algorithm, the examples above are not fully specified.
</t>

<t>
To make a Two-Layer Encryption algorithm fully specified, all security relevant details need to be encoded in the algorithm identifiers directly or be defined by the other algorithm.
In the context of the examples above, the missing explicit parameters are
the curve name for the ephemeral key in both cases and
for <spanx style="verb">ECDH-ES</spanx>, the keydatalen KDF parameter.
</t>

<t>
To convey a fully-specified Two-Layer Encryption algorithm in JOSE, the "alg" value MUST explicitly specify all essential parameters for key establishment and key wrapping
or have them be specified by the accompanying "enc" value.
For example: "ECDH-ES using Concat KDF and P-256" or "ECDH-ES using Concat KDF and P-256 and "A128KW" wrapping".
The keydatalen KDF parameter value for <spanx style="verb">ECDH-ES</spanx> is determined from the "enc" value,
as described in Section 4.6.2 of <xref target="RFC7518"/>.
</t>

<t>
To convey a fully-specified Two-Layer Encryption algorithm in COSE, the outer "alg" value MUST specify all essential parameters for key establishment and key wrapping.
For example: "ECDH-ES using P-256 w/ HKDF" or "ECDH-ES using P-256 w/ HKDF and AES Key Wrap w/ 128-bit key".
</t>

<t>
In COSE, preventing cross-mode attacks, such as those described in <xref target="RFC9459"/>, can be accomplished in two ways:
(1) Allow only authenticated content encryption algorithms.
(2) Bind the the potentially unauthenticated content encryption algorithm to be used
into the key protection algorithm so that different content encryption algorithms
result in different content encryption keys.
Which choice to use in which circumstances is beyond the scope of this specification.
</t>

<t>
Fully-specified Two-Layer Encryption algorithms enable the sender and receiver to agree on all mandatory security parameters.
They also enable a protocol to specify an allow list of algorithm combinations that does not include polymorphic combinations,
such as cross-curve key establishment,
cross-mode symmetric encryption,
or mismatched KDF size to symmetric key scenarios.
</t>

      </section>
      </section>

      <section anchor="fully-specified-encryption-algs" title="Fully-Specified Encryption Algorithm Identifiers">

	<section anchor="ecdh-algs" title="Elliptic Curve Diffie-Hellman (ECDH)">
	  <t>
	    <xref target="RFC7518"/> defines the current use of
	    Elliptic Curve Diffie-Hellman (ECDH) by JOSE.
	    Likewise, <xref target="RFC9053"/> defines the current use of
	    Elliptic Curve Diffie-Hellman (ECDH) by COSE.
	    As described in <xref target="PolymorphicECDH"/>,
	    both sets of registered ECDH algorithms are polymorphic.
	  </t>
	  <t>
	    While <xref target="PolymorphicECDH"/> describes possible
	    fully-specified ECDH algorithms that could be registered for JOSE and COSE,
	    the working group decided to leave decisions about
	    which fully-specified ECDH algorithms to register
	    to future specifications, if needed.
	  </t>
	</section>
      </section>

    </section>

    <section anchor="IANA" title="IANA Considerations">

      <section anchor="jose-algorithm-registration" title="JOSE Algorithms Registrations">
        <t>
	  This section registers the following values in the
	  IANA "JSON Web Signature and Encryption Algorithms" registry <xref target="IANA.JOSE"/>
	  established by <xref target="RFC7515"/>.
	</t>

	<section anchor="new-jose-regs" title="Fully-Specified JOSE Algorithm Registrations">
	  <t>
	    <?rfc subcompact="yes"?>
	    <list style="symbols">
	      <t>
		Algorithm Name: Ed25519
	      </t>
	      <t>
		Algorithm Description: EdDSA using Ed25519 curve
	      </t>
	      <t>
		Algorithm Usage Locations: alg
	      </t>
	      <t>
		JOSE Implementation Requirements: Optional
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="EdDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Algorithm Analysis Document(s): <xref target="RFC8032"/>
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Algorithm Name: Ed448
	      </t>
	      <t>
		Algorithm Description: EdDSA using Ed448 curve
	      </t>
	      <t>
		Algorithm Usage Locations: alg
	      </t>
	      <t>
		JOSE Implementation Requirements: Optional
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="EdDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Algorithm Analysis Document(s): <xref target="RFC8032"/>
	      </t>
	    </list>
	  </t>
	  <?rfc subcompact="no"?>
	</section>

	<section anchor="deprecated-jose-regs" title="Deprecated Polymorphic JOSE Algorithm Registrations">
	  <t>
	    The following registration is updated to change its status to Deprecated.
	  </t>
	  <t>
	    <?rfc subcompact="yes"?>
	    <list style="symbols">
	      <t>
		Algorithm Name: EdDSA
	      </t>
	      <t>
		Algorithm Description: EdDSA signature algorithms
	      </t>
	      <t>
		Algorithm Usage Locations: alg
	      </t>
	      <t>
		JOSE Implementation Requirements: Deprecated
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="EdDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Algorithm Analysis Document(s): <xref target="RFC8032"/>
	      </t>
	    </list>
	  </t>
	  <?rfc subcompact="no"?>
	</section>
      </section>

      <section anchor="cose-algorithms-registrations" title="COSE Algorithms Registrations">
        <t>
	  This section registers the following values in the
	  IANA "COSE Algorithms" registry <xref target="IANA.COSE"/>.
	</t>

	<section anchor="new-cose-regs" title="Fully-Specified COSE Algorithm Registrations">
	  <t>
	    <?rfc subcompact="yes"?>
	    <list style="symbols">
	      <t>
		Name: ESP256
	      </t>
	      <t>
		Value: TBD (requested assignment -9)
	      </t>
	      <t>
		Description: ECDSA using P-256 curve and SHA-256
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: Yes
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ESP384
	      </t>
	      <t>
		Value: TBD (requested assignment -48)
	      </t>
	      <t>
		Description: ECDSA using P-384 curve and SHA-384
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: Yes
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ESP512
	      </t>
	      <t>
		Value: TBD (requested assignment -49)
	      </t>
	      <t>
		Description: ECDSA using P-521 curve and SHA-512
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: Yes
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ESB256
	      </t>
	      <t>
		Value: TBD (requested assignment -261)
	      </t>
	      <t>
		Description: ECDSA using BrainpoolP256r1 curve and SHA-256
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: No
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ESB320
	      </t>
	      <t>
		Value: TBD (requested assignment -262)
	      </t>
	      <t>
		Description: ECDSA using BrainpoolP320r1 curve and SHA-384
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: No
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ESB384
	      </t>
	      <t>
		Value: TBD (requested assignment -263)
	      </t>
	      <t>
		Description: ECDSA using BrainpoolP384r1 curve and SHA-384
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: No
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ESB512
	      </t>
	      <t>
		Value: TBD (requested assignment -264)
	      </t>
	      <t>
		Description: ECDSA using BrainpoolP512r1 curve and SHA-512
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="ECDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: No
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: Ed25519
	      </t>
	      <t>
		Value: TBD (requested assignment -50)
	      </t>
	      <t>
		Description: EdDSA using Ed25519 curve
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="EdDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: Yes
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: Ed448
	      </t>
	      <t>
		Value: TBD (requested assignment -51)
	      </t>
	      <t>
		Description: EdDSA using Ed448 curve
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: <xref target="EdDSA"/> of [[ this specification ]]
	      </t>
	      <t>
		Recommended: Yes
	      </t>
	    </list>
	  </t>
	  <?rfc subcompact="no"?>
	</section>

	<section anchor="deprecated-cose-regs" title="Deprecated Polymorphic COSE Algorithm Registrations">
	  <t>
	    The following registrations are updated to change their status to Deprecated.
	  </t>
	  <t>
	    <?rfc subcompact="yes"?>
	    <list style="symbols">
	      <t>
		Name: ES256
	      </t>
	      <t>
		Value: -7
	      </t>
	      <t>
		Description: ECDSA w/ SHA-256
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: RFC 9053
	      </t>
	      <t>
		Recommended: Deprecated
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ES384
	      </t>
	      <t>
		Value: -35
	      </t>
	      <t>
		Description: ECDSA w/ SHA-384
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: RFC 9053
	      </t>
	      <t>
		Recommended: Deprecated
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: ES512
	      </t>
	      <t>
		Value: -36
	      </t>
	      <t>
		Description: ECDSA w/ SHA-512
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: RFC 9053
	      </t>
	      <t>
		Recommended: Deprecated
	      </t>
	    </list>
	  </t>
	  <t>
	    &#xA0;
	  </t>
	  <t>
	    <list style="symbols">
	      <t>
		Name: EdDSA
	      </t>
	      <t>
		Value: -8
	      </t>
	      <t>
		Description: EdDSA
	      </t>
	      <t>
		Capabilities: [kty]
	      </t>
	      <t>
		Change Controller: IETF
	      </t>
	      <t>
		Reference: RFC 9053
	      </t>
	      <t>
		Recommended: Deprecated
	      </t>
	    </list>
	  </t>
	  <?rfc subcompact="no"?>
	</section>
      </section>

<section anchor="UpdatedInstructions" title="Updated Review Instructions for Designated Experts">
  <section anchor="UpdatedInstructions1" title="JSON Web Signature and Encryption Algorithms">
	<t>
		IANA is directed to preserve the current reference to RFC 7518,
		and to add a reference to this section of this specification.
	</t>
	<t>
	  The review instructions for the designated experts for the
	  IANA "JSON Web Signature and Encryption Algorithms" registry <xref target="IANA.JOSE"/>
	  in Section 7.1 of <xref target="RFC7518"/>
	  have been updated to include an additional review criterion:
	  <list style="symbols">
	    <t>
				Only fully-specified algorithm identifiers may be registered.
	      Polymorphic algorithm identifiers must not be registered.
	    </t>
	  </list>
	</t>
	</section>
	<section anchor="UpdatedInstructions2" title="COSE Algorithms">
	<t>
		IANA is directed to preserve the current references to RFC 9053 and RFC 9054,
		and to add a reference to this section of this specification.
	</t>
	<t>
	  The review instructions for the designated experts for the
	  IANA "COSE Algorithms" registry <xref target="IANA.COSE"/>
	  in Section 10.4 of <xref target="RFC9053"/>
	  have been updated to include an additional review criterion:
	  <list style="symbols">
	    <t>
				Only fully-specified algorithm identifiers may be registered.
	      Polymorphic algorithm identifiers must not be registered.
	    </t>
	  </list>
	</t>
	</section>
</section>

      <section title="Defining Deprecated and Prohibited" anchor="DeprecatedProhibited">
	<t>
	  The terms "Deprecated" and "Prohibited"
	  as used by JOSE and COSE registrations are currently undefined.
	  Furthermore, while in <xref target="RFC7518"/> JOSE specifies that both
	  "Deprecated" and "Prohibited" can be used,
	  in <xref target="RFC8152"/> COSE specifies
	  the use of "Deprecated" but not "Prohibited".
	  (Note that <xref target="RFC9053"/> did not carry the definitions of the
	  "Recommended" registry columns forward,
	  so <xref target="RFC8152"/> remains definitive in this regard.)
	  This section defines these terms for use by both
	  JOSE and COSE IANA registrations in a consistent manner,
	  eliminating this potentially confusing inconsistency.
	</t>
	<t>
	  For purposes of use in the "JOSE Implementation Requirements" columns
	  in the IANA JOSE registries <xref target="IANA.JOSE"/> and
	  in the "Recommended" columns
	  in the IANA COSE registries <xref target="IANA.COSE"/>,
	  these terms are defined as follows:
	</t>
	<t>
	  <list style="hanging">

	    <t hangText="Deprecated">
	      <vspace/>
	      There is a preferred mechanism to achieve similar functionality
	      to that referenced by the identifier;
	      this replacement functionality SHOULD be utilized in new deployments
	      in preference to the deprecated identifier.
	    </t>

	    <t hangText="Prohibited">
	      <vspace/>
	      The identifier and the functionality that it references MUST NOT be used.
	      (Identifiers MAY be designated as "Prohibited" due to security flaws,
	      for instance.)
	    </t>

	  </list>
	</t>
	<t>
	  Note that the terms "Deprecated" and "Prohibited" have been used
	  with a multiplicity of different meanings in various specifications,
	  sometimes without actually being defined in those specifications.
	  For instance, the term "Deprecated" is used in the title of
	  <xref target="RFC8996"/>, but the actual specification text
	  uses the terminology "MUST NOT be used".
	</t>
	<t>
	  The definitions above were chosen because they are consistent with
	  all existing registrations in both JOSE and COSE;
	  none will need to change.
	  Furthermore, they are consistent with their existing usage in JOSE.
	  The only net change is to enable a clear distinction between
	  "Deprecated" and "Prohibited" in future COSE registrations.
	</t>
      </section>

    </section>

    <section anchor="Keys" title="Key Representations">
      <t>
	The key representations for the new fully-specified algorithms
	defined by this specification are the same as those for the
	polymorphic algorithms that they replace,
	other than the <spanx style="verb">alg</spanx> value, if included.
	For instance, the representation for a key used with the
	<spanx style="verb">Ed25519</spanx> algorithm is the same as that specified
	in <xref target="RFC8037"/>, except that the <spanx style="verb">alg</spanx>
	value would be <spanx style="verb">Ed25519</spanx> rather than
	<spanx style="verb">EdDSA</spanx>, if included.
      </t>
    </section>

    <section anchor="NotUpdated" title="Notes on Algorithms Not Updated">
      <t>
	The working group has discussed some existing algorithms that are not updated
	by this specification.
	This section discusses why they have not been updated.
      </t>

      <section anchor="RSA" title="RSA Signing Algorithms">
	<t>
	  The working group has discussed whether the
	  <spanx style="verb">RS256</spanx>,
	  <spanx style="verb">RS384</spanx>, and
	  <spanx style="verb">RS512</spanx> algorithms
	  should be considered fully-specified or not,
	  because they can operate on keys of different sizes.
	  For instance, they can use both 2048- and 4096-bit keys.
	  The same is true of the <spanx style="verb">PS*</spanx> algorithms.
	</t>
	<t>
	  This is not a problem in practice, because RSA libraries accommodate
	  keys of different sizes without having to use different code.
	  Therefore, for example, there are not known cases in the wild where it would be useful
	  to have different algorithm identifiers for RSASSA-PKCS1-v1_5 with SHA-256 and 2048-bit keys
	  versus 4096-bit keys or 8192-bit keys.
	  Therefore, the RSA signature algorithms are not replaced by this specification.
	</t>
	<t>
	  That said, should it be useful at some point to have
	  RSA algorithm identifiers that are specific to the key size,
	  a future specification could always register them.
	</t>
      </section>

      <section anchor="ECDH" title="ECDH Encryption Algorithms">
	<t>
	  As discussed in <xref target="ecdh-algs"/>
	  and <xref target="PolymorphicECDH"/>,
	  the working group decided not to update the
	  Elliptic Curve Diffie-Hellman (ECDH) algorithms at this time,
	  but to describe how to potentially do so in the future, if needed.
	</t>
      </section>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t>
	Using fully-specified algorithm identifiers reduces the attack surface
	relative to using polymorphic algorithm identifiers,
	since it reduces the opportunity for attackers to choose insecure or unexpected combinations of algorithms.
      </t>
      <t>
	The security considerations for ECDSA in <xref target="RFC7518"/>,
	for EdDSA in <xref target="RFC8037"/>, and
	for ECDSA and EdDSA in <xref target="RFC9053"/> apply.
      </t>
    </section>

  </middle>

  <back>

    <references title="Normative References">

      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7516.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8037.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9053.xml"/>
			<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9052.xml"/>

    </references>

    <references title="Informative References">
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7518.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8032.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8152.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8414.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8996.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9459.xml"/>

      <reference anchor="IANA.JOSE" target="https://www.iana.org/assignments/jose/">
        <front>
          <title>JSON Object Signing and Encryption (JOSE)</title>
          <author>
            <organization>IANA</organization>
          </author>
	  <date/>
        </front>
      </reference>

      <reference anchor="IANA.COSE" target="https://www.iana.org/assignments/cose/">
        <front>
          <title>CBOR Object Signing and Encryption (COSE)</title>
          <author>
            <organization>IANA</organization>
          </author>
	  <date/>
        </front>
      </reference>

      <reference anchor="OpenID.Discovery" target="https://openid.net/specs/openid-connect-discovery-1_0.html">
	<front>
	  <title>OpenID Connect Discovery 1.0</title>

	  <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
	    <organization abbrev="NAT.Consulting (was at NRI)">NAT.Consulting</organization>
	  </author>

	  <author fullname="John Bradley" initials="J." surname="Bradley">
	    <organization abbrev="Yubico (was at Ping Identity)">Yubico</organization>
	  </author>

	  <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
	    <organization abbrev="independent (was at Microsoft)">independent</organization>
	  </author>

	  <author fullname="Edmund Jay" initials="E." surname="Jay">
	    <organization abbrev="Illumila">Illumila</organization>
	  </author>

          <date day="8" month="November" year="2014"/>
	</front>
      </reference>

      <reference anchor="WebAuthn" target="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/">
        <front>
          <title>Web Authentication: An API for accessing Public Key Credentials - Level 2</title>
          <seriesInfo name="World Wide Web Consortium (W3C)" value="Recommendation"/>
          <author initials="J." surname="Hodges" fullname="Jeff Hodges">
            <organization>PayPal</organization>
            <address>
              <email>jdhodges@google.com</email>
            </address>
          </author>
          <author initials="J.C." surname="Jones" fullname="J.C. Jones">
            <organization>Mozilla</organization>
            <address>
              <email>jc@mozilla.com</email>
            </address>
          </author>
          <author initials="M." surname="Jones" fullname="Michael B. Jones">
            <organization>Microsoft</organization>
            <address>
              <email>mbj@microsoft.com</email>
              <uri>http://self-issued.info/</uri>
            </address>
          </author>
          <author initials="A." surname="Kumar" fullname="Akshay Kumar">
            <organization>Microsoft</organization>
            <address>
              <email>akshayku@microsoft.com</email>
            </address>
          </author>
          <author initials="E." surname="Lundberg" fullname="Emil Lundberg">
            <organization>Yubico</organization>
            <address>
              <email>emil@yubico.com</email>
            </address>
          </author>
          <date day="8" month="April" year="2021"/>
        </front>
      </reference>

      <reference anchor="FIDO2" target="https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html">
        <front>
          <title>Client to Authenticator Protocol (CTAP)</title>
          <seriesInfo name="FIDO Alliance" value="Proposed Standard"/>
          <author initials="J." surname="Bradley" fullname="John Bradley">
            <organization>Yubico</organization>
            <address>
              <email>jbradley@yubico.com</email>
            </address>
          </author>
          <author initials="J." surname="Hodges" fullname="Jeff Hodges">
            <organization>PayPal</organization>
            <address>
              <email>jdhodges@google.com</email>
            </address>
          </author>
          <author initials="M." surname="Jones" fullname="Michael B. Jones">
            <organization>Microsoft</organization>
            <address>
              <email>mbj@microsoft.com</email>
              <uri>http://self-issued.info/</uri>
            </address>
          </author>
          <author initials="A." surname="Kumar" fullname="Akshay Kumar">
            <organization>Microsoft</organization>
            <address>
              <email>akshayku@microsoft.com</email>
            </address>
          </author>
          <author initials="J." surname="Johan" fullname="Johan Verrept">
            <organization>OneSpan</organization>
            <address>
              <email>johan.verrept@onespan.com</email>
            </address>
          </author>
          <date day="15" month="June" year="2021"/>
        </front>
      </reference>

    </references>

    <section title="Inventory of Polymorphic ECDH Algorithms" anchor="PolymorphicECDH">
      <t>
	The working group assembled the following inventory of registered polymorphic
	Elliptic Curve Diffie-Hellman (ECDH) JOSE and COSE algorithms
	with the goal of understanding what
	registering fully-specified ECDH algorithms to replace them would entail.
	While there was not an appetite in the working group
	to register these replacement algorithms at this time,
	this inventory documents how to do so,
	should others wish to register some or all of the replacements in the future.
      </t>

      <section title="Polymorphic ECDH JOSE Algorithms"
	       anchor="polymorphic-ECDH-jose">
	<t>
	  These registered JOSE algorithms are polymorphic,
	  because they do not include the curve name in the algorithm to be used with the ephemeral key:
	</t>
	<texttable anchor="poly-ecdh-jose" title="Polymorphic ECDH JOSE Algorithms"
		   suppress-title="false" align="center" style="full">
	  <ttcol align="left">Name</ttcol>
	  <ttcol align="left">Description</ttcol>

	  <c>ECDH-ES</c>
	  <c>ECDH-ES using Concat KDF</c>

	  <c>ECDH-ES+A128KW</c>
	  <c>ECDH-ES using Concat KDF and "A128KW" wrapping</c>

	  <c>ECDH-ES+A192KW</c>
	  <c>ECDH-ES using Concat KDF and "A192KW" wrapping</c>

	  <c>ECDH-ES+A256KW</c>
	  <c>ECDH-ES using Concat KDF and "A256KW" wrapping</c>

	</texttable>

	<t>
	  Descriptions of fully-specified JOSE versions of these algorithms
	  using combinations discussed by the working group
	  that could be registered by future specifications are:
	</t>
	<texttable anchor="full-ecdh-jose" title="Fully-Specified ECDH JOSE Algorithms"
		   suppress-title="false" align="center" style="full">
	  <ttcol align="left">Description</ttcol>

	  <c>ECDH-ES using Concat KDF and P-256</c>

	  <c>ECDH-ES using Concat KDF and P-384</c>

	  <c>ECDH-ES using Concat KDF and P-521</c>

	  <c>ECDH-ES using Concat KDF and X25519</c>

	  <c>ECDH-ES using Concat KDF and X448</c>

	  <c>ECDH-ES using Concat KDF and P-256 and "A128KW" wrapping</c>

	  <c>ECDH-ES using Concat KDF and X25519 and "A128KW" wrapping</c>

	  <c>ECDH-ES using Concat KDF and P-384 and "A192KW" wrapping</c>

	  <c>ECDH-ES using Concat KDF and P-521 and "A256KW" wrapping</c>

	  <c>ECDH-ES using Concat KDF and X448 and "A256KW" wrapping</c>

	</texttable>
      </section>

      <section title="Polymorphic ECDH COSE Algorithms"
	       anchor="polymorphic-ECDH-cose">
	<t>
	  These registered COSE algorithms are likewise polymorphic,
	  because they do not include the curve name in the algorithm to be used with
	  the ephemeral key or the static key:
	</t>
	<texttable anchor="poly-ecdh-cose" title="Polymorphic ECDH COSE Algorithms"
		   suppress-title="false" align="center" style="full">
	  <ttcol align="left">Name</ttcol>
	  <ttcol align="left">Description</ttcol>

	  <c>ECDH-ES + HKDF-256</c>
	  <c>ECDH-ES w/ HKDF -- generate key directly</c>

	  <c>ECDH-ES + HKDF-512</c>
	  <c>ECDH-ES w/ HKDF -- generate key directly</c>

	  <c>ECDH-SS + HKDF-256</c>
	  <c>ECDH-SS w/ HKDF -- generate key directly</c>

	  <c>ECDH-SS + HKDF-512</c>
	  <c>ECDH-SS w/ HKDF -- generate key directly</c>

	  <c>ECDH-ES + A128KW</c>
	  <c>ECDH-ES w/ HKDF and AES Key Wrap w/ 128-bit key</c>

	  <c>ECDH-ES + A192KW</c>
	  <c>ECDH-ES w/ HKDF and AES Key Wrap w/ 192-bit key</c>

	  <c>ECDH-ES + A256KW</c>
	  <c>ECDH-ES w/ HKDF and AES Key Wrap w/ 256-bit key</c>

	  <c>ECDH-SS + A128KW</c>
	  <c>ECDH-SS w/ HKDF and AES Key Wrap w/ 128-bit key</c>

	  <c>ECDH-SS + A192KW</c>
	  <c>ECDH-SS w/ HKDF and AES Key Wrap w/ 192-bit key</c>

	  <c>ECDH-SS + A256KW</c>
	  <c>ECDH-SS w/ HKDF and AES Key Wrap w/ 256-bit key</c>

	</texttable>

	<t>
	  Descriptions of fully-specified COSE versions of these algorithms
	  using combinations discussed by the working group
	  that could be registered by future specifications are:
	</t>
	<texttable anchor="full-ecdh-cose" title="Fully-Specified ECDH COSE Algorithms"
		   suppress-title="false" align="center" style="full">
	  <ttcol align="left">Description</ttcol>

	  <c>ECDH-ES using P-256 w/ HKDF -- generate key directly</c>

	  <c>ECDH-ES using X25519 w/ HKDF -- generate key directly</c>

	  <c>ECDH-ES using P-521 w/ HKDF -- generate key directly</c>

	  <c>ECDH-ES using X448 w/ HKDF -- generate key directly</c>

	  <c>ECDH-SS using P-256 w/ HKDF -- generate key directly</c>

	  <c>ECDH-SS using X25519 w/ HKDF -- generate key directly</c>

	  <c>ECDH-SS using P-521 w/ HKDF -- generate key directly</c>

	  <c>ECDH-SS using X448 w/ HKDF -- generate key directly</c>

	  <c>ECDH-ES using P-256 w/ HKDF and AES Key Wrap w/ 128-bit key</c>

	  <c>ECDH-ES using X25519 w/ HKDF and AES Key Wrap w/ 128-bit key</c>

	  <c>ECDH-ES using P-384 w/ HKDF and AES Key Wrap w/ 192-bit key</c>

	  <c>ECDH-ES using P-521 w/ HKDF and AES Key Wrap w/ 256-bit key</c>

	  <c>ECDH-ES using X448 w/ HKDF and AES Key Wrap w/ 256-bit key</c>

	  <c>ECDH-SS using P-256 w/ HKDF and AES Key Wrap w/ 128-bit key</c>

	  <c>ECDH-SS using X25519 w/ HKDF and AES Key Wrap w/ 128-bit key</c>

	  <c>ECDH-SS using P-384 w/ HKDF and AES Key Wrap w/ 192-bit key</c>

	  <c>ECDH-SS using P-521 w/ HKDF and AES Key Wrap w/ 256-bit key</c>

	  <c>ECDH-SS using X448 w/ HKDF and AES Key Wrap w/ 256-bit key</c>

	</texttable>
      </section>

    </section>

    <section title="Document History" anchor="History">
      <t>
        [[ to be removed by the RFC Editor before publication as an RFC ]]
      </t>

      <t>
        -05
        <list style="symbols">
	  <t>
	    Applied IANA early review comments.
	  </t>
	</list>
      </t>

      <t>
        -04
        <list style="symbols">
	  <t>
	    Removed ECDH registrations and proposed fully-specified ECDH algorithm identifiers, per feedback at IETF 120.
	  </t>
	  <t>
	    Tightened descriptive text for fully-specified encryption algorithms.
	  </t>
	  <t>
	    Applied John Mattsson's suggestion for the RSA section title.
	  </t>
        </list>
      </t>

      <t>
        -03
        <list style="symbols">
	  <t>
	    Acknowledged contributions made during Working Group Last Call.
	  </t>
          <t>
	    Addressed security considerations feedback from WGLC.
          </t>
	  <t>
	    Made COSE Recommended status for Ed25519 and Ed448 "yes".
	  </t>
	  <t>
	    Registered COSE algorithms for using Brainpool curves with ECDSA.
	  </t>
	  <t>
	    Removed text on KEMs, since currently registered algorithms don't use them.
	  </t>
	  <t>
	    Enabled use of fully-specified ECDH algorithms.
	  </t>
	  <t>
	    Defined the terms "Deprecated" and "Prohibited" for both JOSE and COSE registrations.
	  </t>
        </list>
      </t>

      <t>
        -02
        <list style="symbols">
          <t>
	    Expanded references for KEMs.
          </t>
	  <t>
	    Added example of a fully-specified KEM.
          </t>
        </list>
      </t>

      <t>
        -01
        <list style="symbols">
          <t>
	    Included additional instructions for IANA.
          </t>
	  <t>
	    Added text on KEMs and Encapsulated keys.
	  </t>
	  <t>
	    Added the section Fully-Specified Computations Using Multiple Algorithms.
	  </t>
        </list>
      </t>

      <t>
        -00
        <list style="symbols">
          <t>
	    Created initial working group version based on draft-jones-jose-fully-specified-algorithms-02.
          </t>
        </list>
      </t>

    </section>

    <section title="Acknowledgements" anchor="Acknowledgements" numbered="no">
      <t>
	The authors thank
	Carsten Bormann,
	John Bradley,
	Tim Bray,
	Brian Campbell,
	Stephen Farrell,
	Ilari Liusvaara,
	Tobias Looker,
	Neil Madden,
	John Mattsson,
	Jeremy O'Donoghue,
	Anders Rundgren,
	Göran Selander,
	Filip Skokan,
	Oliver Terbu,
	and
	David Waite
	for their contributions to this specification.
      </t>
    </section>

  </back>

</rfc>
