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

<front>
<title abbrev="json-web-proof">JSON Web Proof</title><seriesInfo value="draft-ietf-jose-json-web-proof-13" stream="IETF" status="standard" name="Internet-Draft"/>
<author initials="D." surname="Waite" fullname="David Waite"><organization>Ping Identity</organization><address><postal><street/>
</postal><email>dwaite+jwp@pingidentity.com</email>
</address></author><author initials="M." surname="Jones" fullname="Michael B. Jones"><organization>Self-Issued Consulting</organization><address><postal><street/>
</postal><email>michael_b_jones@hotmail.com</email>
<uri>https://self-issued.info/</uri>
</address></author><author initials="J." surname="Miller" fullname="Jeremie Miller"><organization>Ping Identity</organization><address><postal><street/>
</postal><email>jmiller@pingidentity.com</email>
</address></author><date/>
<area>Internet</area>
<workgroup>jose</workgroup>
<keyword>json</keyword>
<keyword>jose</keyword>
<keyword>zkp</keyword>
<keyword>jwp</keyword>
<keyword>jws</keyword>
<keyword>cbor</keyword>
<keyword>cose</keyword>

<abstract>
<t>The JOSE set of standards established JSON-based container formats for
Keys, Signatures, and Encryption.  They also established IANA registries
to enable the algorithms and representations used for them to be
extended.  Since those were created, newer cryptographic algorithms that
support selective disclosure and unlinkability have matured and started
seeing early market adoption.  The COSE set of standards likewise does
this for CBOR-based containers, focusing on the needs of environments
which are better served using CBOR, such as constrained devices and
networks.</t>
<t>This document defines a new container format similar in purpose and
design to JSON Web Signature (JWS) and COSE Signed Messages called a
<em>JSON Web Proof (JWP)</em>.  Unlike JWS, which integrity-protects only a
single payload, JWP can integrity-protect multiple payloads in one
message.  It also specifies a new presentation form that supports
selective disclosure of individual payloads, enables additional proof
computation, and adds a Presentation Header to prevent replay.</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>The JOSE specifications are very widely deployed and well supported,
enabling use of cryptographic primitives with a JSON representation.
JWTs <xref target="RFC7519"/> are one of the most common representations for identity
and access claims.  For instance, they are used by the OpenID Connect
and Secure Telephony Identity Revisited (STIR) standards.  Also, JWTs
are used by W3C's Verifiable Credentials and are used in many
decentralized identity systems.</t>
<t>With these new use cases, there is an increased focus on adopting
privacy-protecting cryptographic primitives.  While such primitives are
still an active area of academic and applied research, the leading
candidates introduce new patterns that are not currently supported by
JOSE or COSE.  These new patterns are largely focused on two areas:
supporting selective disclosure when presenting information and
minimizing correlation through the use of Zero-Knowledge Proofs (ZKPs)
in addition to traditional signatures.</t>
<t>There are a growing number of these cryptographic primitives that
support selective disclosure while protecting privacy across multiple
presentations.  Examples used in the context of Verifiable Credentials
are:</t>

<ul spacing="compact">
<li><eref target="https://eprint.iacr.org/2012/562.pdf">CL Signatures</eref></li>
<li><eref target="http://www.zurich.ibm.com/idemix">IDEMIX</eref></li>
<li>BBS signatures, described in <xref target="I-D.irtf-cfrg-bbs-signatures"/></li>
<li><eref target="https://github.com/transmute-industries/merkle-disclosure-proof-2021">MerkleDisclosureProof2021</eref></li>
<li><eref target="https://eprint.iacr.org/2020/979">Mercurial Signatures</eref></li>
<li><eref target="https://eprint.iacr.org/2015/525.pdf">PS Signatures</eref></li>
<li><eref target="https://www.microsoft.com/en-us/research/project/u-prove/">U-Prove</eref></li>
<li><eref target="https://github.com/microsoft/Spartan">Spartan</eref></li>
</ul>
<t>All of these follow the same pattern of taking multiple claims (a.k.a.,
"attributes" or "messages" in the literature) and binding them together
into a single issued token.  These are then later securely one-way
transformed into a presentation that reveals potentially only a subset
of the original claims, predicate proofs about the claim values, or
proofs of knowledge of the claims.</t>
<blockquote><t>Editor's Note: This draft is still early and incomplete. There will be
significant changes to the algorithms as currently defined here.
Please do not use any of these definitions or examples for anything
except personal experimentation and learning.  Contributions and
feedback are welcomed at
<eref target="https://github.com/ietf-wg-jose/json-web-proof">https://github.com/ietf-wg-jose/json-web-proof</eref>.</t>
</blockquote></section>

<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>
<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>
<t>The roles of "issuer", "holder", and "verifier" are used as defined by
the VC Data Model <xref target="VC-DATA-MODEL-2.0"/>.  The term "presentation" is also
used as defined by this source, but the term "credential" is avoided in
this specification to minimize confusion with other definitions.</t>

<section anchor="terminology"><name>Terminology</name>
<t>The following terms are used throughout this series of documents:</t>

<dl spacing="compact">
<dt>binding:</dt>
<dd>A mechanism, indicated in an issued JWP, for how to verify a
presentation was created by the intended holder.</dd>
<dt>linkability:</dt>
<dd>The property where multiple presentations may be correlated to a
single issued JWP, either through consistency in the cryptographic
integrity or due to particulars of JWP usage by an application. Such
issued JWPs may be referred to as single-use, as multiple uses may
leak unintended knowledge.</dd>
<dt>unlinkability:</dt>
<dd>The property of issuance and presentation algorithms and of
application usage, where one presentation can only be correlated with
other presentations based on holder-disclosed information.</dd>
</dl>
</section>

<section anchor="abbreviations"><name>Abbreviations</name>

<ul spacing="compact">
<li>ZKP: Zero-Knowledge Proof</li>
<li>JWP: JSON Web Proof (this specification)</li>
<li>JPA: JSON Proof Algorithms <xref target="I-D.ietf-jose-json-proof-algorithms"/></li>
<li>JPT: JSON Proof Token <xref target="I-D.ietf-jose-json-proof-token"/></li>
<li>CPT: CBOR Proof Token <xref target="I-D.ietf-jose-json-proof-token"/></li>
</ul>
</section>
</section>

<section anchor="background"><name>Background</name>
<t>A <em>JSON Web Proof (JWP)</em> is very similar to a JWS <xref target="RFC7515"/> or COSE
Signed Message <xref target="RFC9052"/>, with the addition that it can contain
multiple individual secured payloads instead of a single one.
JWP-supporting algorithms are then able to separate and act on the
individual payloads contained within.</t>
<t>The intent of JSON Web Proof is to establish a common container format
for multiple ordered payloads that can be integrity-verified against a
cryptographic proof value also in the container.  It does not create or
specify any cryptographic protocols, multi-party protocols, or detail
any algorithm-specific capabilities.</t>
<t>To fully support the newer privacy primitives, JWP utilizes the three
roles of issuer, holder, and verifier, as defined by the VC Data Model
<xref target="VC-DATA-MODEL-2.0"/>.  There are also two forms of a JWP: the issued
form created by an issuer for a holder, and the presented form created
by a holder for a verifier.</t>
<t>The four principal interactions used by JWP are <tt>issue</tt>, <tt>confirm</tt>,
<tt>present</tt>, and <tt>verify</tt>.</t>
<t>A JWP is initially created by the issuer using the <tt>issue</tt> interaction.
A successful result is an issued JWP that has a single Issuer Header,
one or more payloads, and an initial proof value that contains
the issuing algorithm output.  The holder, upon receiving an issued JWP,
then uses the <tt>confirm</tt> interaction to check the integrity protection of
the Header and all payloads using the proof value.</t>
<t>After validation, the holder uses the <tt>present</tt> interaction to apply any
selective disclosure choices, perform privacy-preserving transformations
for unlinkability, and add a Presentation Header that ensures
the resulting presented JWP cannot be replayed.  The verifier then uses
the <tt>verify</tt> interaction to ensure the integrity protection of the
Headers and any disclosed payloads, along with verifying any
additional ZKPs covering non-disclosed payloads.</t>
<t>While <tt>issue</tt> and <tt>confirm</tt> only occur when a JWP is initially created
by the issuer, the <tt>present</tt> and <tt>verify</tt> steps may be safely repeated
by a holder on an issued JWP.  The resulting presented JWP is only
unlinkable when supported by the underlying algorithm.</t>
<t>Algorithm definitions that support JWPs are in separate companion
specifications - just as the JSON Web Algorithms <xref target="RFC7518"/>
specification does for JWS and JWE <xref target="RFC7516"/>.  The JSON Proof
Algorithms (JPA) <xref target="I-D.ietf-jose-json-proof-algorithms"/> specification
defines how an initial set of algorithms are used with JWP.</t>
</section>

<section anchor="json-web-proof-header"><name>JSON Web Proof Header</name>
<t>A Header consists of an integrity-protected set of Header Parameters
that apply to the JWP.</t>
<t>A Header is represented either as a JSON Object holding JSON-formatted
Header Parameters, or a CBOR map holding CBOR-formatted Header
Parameters.</t>
<t>In addition, there are two kinds of Headers - an Issuer Header
(see <xref target="issuer-header"/>) supplied on <tt>issue</tt> by the issuer, and an
additional Presentation Header (see <xref target="presentation-header"/>) supplied on
<tt>present</tt> by the holder.  Both Headers should have their integrity
protected, and are mandatory to present unmodified to the verifier.</t>
</section>

<section anchor="header-parameter"><name>Header Parameter</name>
<t>A Header Parameter is a name/value pair supplying information within a
Header in a JWP. A Header Parameter may provide information specific to
the proof algorithm in use for the JWP, it may identify the issuer of
the proof, it may describe the application purpose or format of the JWP,
as well as provide other potential metadata.</t>
<t>A Header Parameter may be represented as JSON or as CBOR. When
represented using JSON, each Header Parameter has a string label and has
a JSON-structured value within a JSON Object. When described using CBOR,
each parameter has either an integer (int) or string (tstr) label, and
has a CBOR-structured value within a CBOR map.</t>
<t>The Header Parameter labels within the Header MUST be unique.  CBOR
processing MUST reject messages if two Headers with the same parameter
label are encountered. JSON processing SHOULD reject messages received
with the same parameter label, but MAY instead represent only the
lexically last member with that label, as specified in Section 15.12
("The JSON Object") of ECMAScript 5.1 <xref target="ECMAScript"/>. JSON processing
MUST take one of these two approaches with regards to encountering
duplicate Header Parameter labels.</t>
<t>Implementations are required to understand the specific Header
Parameters defined by this specification that are designated as "MUST be
understood" and process them in the manner defined in this
specification.  All other Header Parameters defined by this
specification that are not so designated MUST be ignored when not
understood.  Unless listed as a critical Header Parameter, per
<xref target="critDef"/>, all Header Parameters not defined by this specification MUST
be ignored when not understood.</t>

<section anchor="header-parameter-labeling-requirements"><name>Header Parameter Labeling Requirements</name>
<t>As labels are the mechanism for semantically distinguishing parameter
names, it is important to describe the mechanism to reduce the risk of
conflicts.</t>
<t>There are three strategies for labeling Header Parameters:</t>

<ol>
<li><t>Registered parameter labels. These labels are coordinated through the
IANA "JSON Web Proof Header Parameters" registry, which protects against
parameters having the same label.</t>
</li>
<li><t>Collision-resistant parameter labels. These labels are not
coordinated through IANA, but are otherwise namespaced to prevent
conflict. One example would be a string label representing the URI of a
controlled resource, such as the HTTPS-hosted documentation of the
Header Parameter.</t>
</li>
<li><t>Private parameter labels. These labels are not coordinated through
IANA or another party, but are expected to only be used for testing or
in closed environments.</t>
</li>
</ol>
<t>These classes of Header Parameters are intentionally parallel to those
in Section 4 of <xref target="RFC7515"/>.</t>
</section>

<section anchor="RegisteredHeaderParameterLabels"><name>Registered Header Parameter Labels</name>
<t>The following Header Parameter names for use in JWPs are registered in
the IANA "JSON Web Proof Header Parameters" registry established by
<xref target="HdrReg"/>, with meanings as defined in the subsections below.</t>
<t>As indicated by the common registry, Header Parameters used in the
Issuer Header (see <xref target="issued-form"/>) and the Presentation Header
<xref target="presented-form"/> share a common Header Parameter space; when a
parameter is used by both forms, its usage must be compatible between
them.</t>

<section anchor="algDef"><name>"alg" (Algorithm) Header Parameter</name>
<t>The <tt>alg</tt> (algorithm) Header Parameter identifies the cryptographic
algorithm used to secure the JWP.  The JWP Proof value is not valid if
the <tt>alg</tt> value does not represent a supported algorithm or if there is
not a key for use with that algorithm associated with the party that
secured the content.  <tt>alg</tt> values should either be registered in the
IANA "JSON Web Proof Algorithms" registry established by
<xref target="I-D.ietf-jose-json-proof-algorithms"/> or be a value that contains a
Collision-Resistant Name.</t>
<t>As a JSON-formatted Header Parameter, the <tt>alg</tt> value is a
case-sensitive ASCII string containing a StringOrURI value. As a
CBOR-formatted Header Parameter, this value may also be an integer
value.</t>
<t>The list of defined <tt>alg</tt> values for this use can be found in the IANA
"JSON Web Proof Algorithms" registry established by
<xref target="I-D.ietf-jose-json-proof-algorithms"/>; the initial contents of this
registry are registered by <xref target="I-D.ietf-jose-json-proof-algorithms"/>.</t>
<t>Use of this Header Parameter is REQUIRED.</t>
</section>

<section anchor="kidDef"><name>"kid" (Key ID) Header Parameter</name>
<t>The <tt>kid</tt> (Key ID) Header Parameter is a hint indicating which key was
used to secure the JWP. This parameter allows originators to explicitly
signal a change of key to recipients.</t>
<t>The structure of the <tt>kid</tt> value is unspecified.</t>
<t>When <tt>kid</tt> is used for a JSON-formatted Header, its value MUST be a
case-sensitive string. When referencing a JWK, the <tt>kid</tt> value is
matched to the JWK <tt>kid</tt> parameter value.</t>
<t>When <tt>kid</tt> is used for a CBOR-formatted Header, its value is a binary
string. When referencing a COSE Key, the <tt>kid</tt> value is matched to the
COSE_Key <tt>kid</tt> structure member.</t>
<t>Use of this Header Parameter is OPTIONAL.</t>
</section>

<section anchor="typDef"><name>"typ" (Type) Header Parameter</name>
<t>The <tt>typ</tt> (type) Header Parameter is used by JWP applications to declare
the media type <xref target="IANA.MediaTypes"/> of this complete JWP.  This is
intended for use by the application when more than one kind of object
could be present in an application data structure that can contain a
JWP; the application can use this value to disambiguate among the
different kinds of objects that might be present.  It will typically not
be used by applications when the kind of object is already known.  This
parameter is ignored by JWP implementations; any processing of this
parameter is performed by the JWP application.  Use of this Header
Parameter is OPTIONAL.</t>
<t>For COSE-formatted Headers, <tt>typ</tt> MAY also instead be an integer value
which corresponds to the IANA "CoAP Content-Formats" registry
<xref target="IANA.CoAP.Formats"/>, which describes the corresponding media type, as
described in <xref target="RFC9596"/>.</t>
<t>Per <xref target="RFC2045"/>, all media type values, subtype values, and parameter
names are case insensitive.  However, parameter values are case
sensitive unless otherwise specified for the specific parameter.</t>
<t>To keep messages compact in common situations, it is RECOMMENDED that
producers omit an "application/" prefix of a media type value in a <tt>typ</tt>
Header Parameter when no other '/' appears in the media type value.  A
recipient using the media type value MUST treat it as if "application/"
were prepended to any <tt>typ</tt> value not containing a '/'.  For instance, a
<tt>typ</tt> value of <tt>example</tt> SHOULD be used to represent the
<tt>application/example</tt> media type, whereas the media type
<tt>application/example;part="1/2"</tt> cannot be shortened to
<tt>example;part="1/2"</tt>.</t>
<t>The <tt>typ</tt> value <tt>jwp</tt> can be used by applications to indicate that this
object is a JWP using the JWP Compact Serialization.  Other type values
can also be used by applications, including those using the <tt>+jwp</tt> media
type structured syntax suffix.</t>
<t>It is RECOMMENDED that the <tt>typ</tt> Header Parameter be used for explicit
typing, in parallel to the recommendations in Section 3.11 of
<xref target="RFC8725"/>.</t>
</section>

<section anchor="critDef"><name>"crit" (Critical) Header Parameter</name>
<t>The <tt>crit</tt> (critical) Header Parameter indicates that extensions to this
specification and/or <xref target="I-D.ietf-jose-json-proof-algorithms"/> are being
used that MUST be understood and processed.  Its value is an array
listing the Header Parameter labels present in the JWP Header that use
those extensions. For JSON-formatted Headers this is a list of strings,
while for CBOR-formatted Headers it is a list containing string and/or
int values.</t>
<t>If any of the listed extension Header Parameters are not understood and
supported by the recipient, then the JWP is invalid.  Producers MUST NOT
include Header Parameter names defined by this specification or
<xref target="I-D.ietf-jose-json-proof-algorithms"/> for use with JWP, duplicate
names, or names that do not occur as Header Parameter names within the
Header in the <tt>crit</tt> list.  Producers MUST NOT use the empty list
<tt>[]</tt> as the <tt>crit</tt> value.  Recipients MAY consider the JWP to be invalid
if the critical list contains any Header Parameter names defined by this
specification or <xref target="I-D.ietf-jose-json-proof-algorithms"/> for use with
JWP or if any other constraints on its use are violated.  When used,
this Header Parameter MUST be integrity protected; therefore, it MUST
occur only within the Header.  Use of this Header
Parameter is OPTIONAL.  This Header Parameter MUST be understood and
processed by implementations.</t>
</section>

<section anchor="issuer_ephemeral_keyDef"><name>"iek" (Issuer Ephemeral Key) Header Parameter</name>
<t>The <tt>iek</tt> (Issuer Ephemeral Key) represents the public key used by the
issuer for indirect signatures within certain algorithms. This is an
ephemeral key that MUST be unique for each issued JWP.</t>
<t>This Header Parameter is references a JSON Web Key (JWK) public key
value when represented as a JSON-formatted Header, and a COSE Key Object
when represented as a CBOR-formatted Header.</t>
<t>It MUST contain only public key parameters and SHOULD contain only the
minimum parameters necessary to represent the key; other parameters
included can be checked for consistency and honored, or they can be
ignored.</t>
<t>When present, this Header Parameter MUST be understood and processed by
implementations.</t>
</section>

<section anchor="holder_presentation_keyDef"><name>"hpk" (Holder Presentation Key) Header Parameter</name>
<t>The <tt>hpk</tt> (Holder Presentation Key) represents the public key with
certain algorithms, and is used by the holder for proof of possession
and integrity protection of the Presented Header.</t>
<t>The issuer MUST validate that the holder has possession of this key
through a trusted mechanism, such as requiring the signature of a unique
nonce value from the holder before issuing the JWP.</t>
<t>This Header Parameter is references a JSON Web Key (JWK) public key
value when represented as a JSON-formatted Header, and a COSE Key Object
when represented as a CBOR-formatted Header.</t>
<t>It MUST contain only public key parameters and SHOULD contain only the
minimum parameters necessary to represent the key; other parameters
included can be checked for consistency and honored, or they can be
ignored.</t>
<t>If holder unlinkability is required, this value MUST not be repeated in
multiple issued JWPs; a different holder presentation key MUST be
included in each issuance.</t>
<t>This Header Parameter MUST be understood and processed by
implementations when present.</t>
</section>

<section anchor="holder_presentation_algorithm_keyDef"><name>"hpa" (Holder Presentation Algorithm) Header Parameter</name>
<t>The <tt>hpa</tt> (Holder Presentation Algorithm) Header Parameter represents
the algorithm to be used by the holder for presenting a JWP when using an
asymmetric algorithm and a Holder Presentation Key.</t>
<t>This Header Parameter SHOULD be included when appropriate for the JWP
algorithm unless a single appropriate algorithm is negotiated through
other means.</t>
<t>This Header Parameter references the name of a JSON Web Algorithm (JWA)
when represented as a JSON-formatted Header, and an integer or text
value when represented as a CBOR-formatted Header.</t>
<t>This Header Parameter MUST be understood and processed by
implementations when present.</t>
</section>

<section anchor="issDef"><name>"iss" (Issuer) Header Parameter</name>
<t>The <tt>iss</tt> (issuer) Header Parameter identifies the principal that issued
the JWP.  The processing of this claim is generally application
specific.</t>
<t>The <tt>iss</tt> value is a case-sensitive string containing a StringOrURI
value.  Its definition is intentionally parallel to the <tt>iss</tt> claim
defined in <xref target="RFC7519"/>.</t>
<t>Use of this Header Parameter is OPTIONAL.</t>
</section>

<section anchor="audDef"><name>"aud" (Audience) Header Parameter</name>
<t>The <tt>aud</tt> (audience) Header Parameter identifies the recipients that the
JWP is intended for.  Each principal intended to process the JWP MUST
identify itself with a value in the audience Header Parameter.  If the
principal processing the Header Parameter does not identify itself with
a value in the <tt>aud</tt> Header Parameter when this Header Parameter is
present, then the JWP MUST be rejected.</t>
<t>In the general case, the <tt>aud</tt> value is an array of case-sensitive
strings, each containing a StringOrURI value. In the special case when
the JWP has one audience, the <tt>aud</tt> value MAY be a single case-sensitive
string containing a StringOrURI value.</t>
<t>The interpretation of audience values is application specific.</t>
<t>Its definition is intentionally parallel to the <tt>aud</tt> claim defined in
<xref target="RFC7519"/>.</t>
<t>Use of this Header Parameter is OPTIONAL.</t>
</section>

<section anchor="nonceDef"><name>"nonce" (Nonce) Header Parameter</name>
<t>The <tt>nonce</tt> (nonce) Header Parameter is used to associate protocol state
with a presented JWP. Usage is protocol-specific, but examples include
requiring a unique nonce in requests as part of a strategy to prevent
replay, or for associating a JWP back to the context where it was
requested.</t>
<t>When used as a JSON-formatted Header, the value is a case-sensitive
string value.</t>
<t>When used as a CBOR-formatted Header, the value is a binary string.</t>
<t>This definition is intentionally parallel to the <tt>nonce</tt> claim
registered in the IANA "JSON Web Token Claims" registry <xref target="IANA.JWT"/>.</t>
<t>Use of this Header Parameter is OPTIONAL.</t>
</section>
</section>

<section anchor="PublicHeaderParameterName"><name>Public Header Parameter Names</name>
<t>Additional Header Parameter names can be defined by those using JWPs.
However, in order to prevent collisions, any new Header Parameter name
should either be registered in the IANA "JSON Web Proof Header
Parameters" registry established by <xref target="HdrReg"/> or be a Public Name (a
value that contains a Collision-Resistant Name).  In each case, the
definer of the name or value needs to take reasonable precautions to
make sure they are in control of the part of the namespace they use to
define the Header Parameter name.</t>
<t>New Header Parameters should be introduced sparingly, as they can result
in non-interoperable JWPs.</t>
</section>

<section anchor="PrivateHeaderParameterName"><name>Private Header Parameter Names</name>
<t>A producer and consumer of a JWP may agree to use Header Parameter names
that are Private Names (names that are not Registered Header Parameter
labels <xref target="RegisteredHeaderParameterLabels"/> or Public Header Parameter
names <xref target="PublicHeaderParameterName"/>.) Unlike Public Header Parameter
names, Private Header Parameter names are subject to collision and
should be used with caution.</t>
</section>
</section>

<section anchor="jwp-forms"><name>JWP Forms</name>
<t>A JWP is always in one of two forms: the issued form or the presented
form.  A structural difference between the two forms is the number of
Headers.  An issued JWP has only an Issuer Header, while a presented
JWP will have both the Issuer Header and an additional Presentation
Header.</t>
<t>All JWP forms support multiple payloads, which are individual octet
strings. The issued form will contain one or more ordered payload slots,
each of which contain one piece of payload data. A presentation based on
that issued JWP contains the same number of slots in the same order, but
may choose to omit payload information on a slot-by-slot basis.</t>
<t>The JWP proof value is one or more octet strings that are only meant to
be generated from and processed by the underlying JPA.  Internally, the
proof value may contain one or more cryptographic statements that are
used to check the integrity protection of the Header(s) and all
payloads.  Each of these statements may be a ZKP or a traditional
cryptographic signature.  The algorithm is responsible for how these
statements are serialized into a single proof value.</t>

<section anchor="issued-form"><name>Issued Form</name>
<t>When a JWP is first created, it is always in the issued form.  It will
contain the Issuer Header along with all of the payloads.</t>
<t>The issued form can only be confirmed by a holder as being correctly
formed and protected. It is NOT to be verified directly or presented
as-is to a verifier.  The holder SHOULD treat an issued JWP as private
and use appropriately protected storage.</t>

<section anchor="issuer-header"><name>Issuer Header</name>
<t>The Issuer Header is always presented as-is to verifiers.
Differences in Headers from two Issued JWP could
unintentionally serve to differentiate these messages to verifiers,
allowing grouping or correlation of credentials based on these
variations. It is RECOMMENDED that the Issuer Header have the
same representation (identical octet string sequence) for Issued JWP
which are otherwise meant to not be distinguishable.</t>
<t>Every Issuer Header MUST have an <tt>alg</tt> value that identifies a
valid JSON Proof Algorithm (JPA).</t>
<t>For example:</t>

<sourcecode type="json"><![CDATA[{
  "alg": "BBS"
}
]]>
</sourcecode>
</section>

<section anchor="issuer-payloads"><name>Issuer Payloads</name>
<t>Payloads are represented and processed as individual octet strings and
arranged in an ordered array of payload slots.  All application context
of the placement and encoding of each payload value is out of scope of
this specification and SHOULD be well defined and documented by the
application or other specifications.</t>
<t>JPAs MAY provide software interfaces that perform the encoding of
individual payloads which accept native inputs such as numbers, sets, or
elliptic curve points.  This enables the algorithm to support advanced
features such as blinded values and predicate proofs.  These interfaces
would generate the octet string encoded payload value as well as include
protection of that payload in the combined proof value.</t>
</section>

<section anchor="issuer-proof"><name>Issuer Proof</name>
<t>The issuer proof is one or more octet strings that are opaque to
applications.  Individual proof-supporting algorithms are responsible
for the contents and security of the proof value, along with any
required internal structures.</t>
<t>The issuer proof is used by the holder to perform validation, checking
that the Issuer Header and all payloads are properly encoded and
protected by the given proof.</t>
</section>
</section>

<section anchor="presented-form"><name>Presented Form</name>
<t>When an issued JWP is presented, it undergoes a transformation that adds
a Presentation Header. While the payload slots are identical
to the Issued JWP, the Presented JWP may have one or more payloads
omitted, disclosing only a subset of the original issued payloads.  The
proof value will always be updated to add integrity protection of the
Presentation Header along with the necessary cryptographic statements to
verify the presented JWP.</t>
<t>When supported by the underling JPA, a single issued JWP can be used to
safely generate multiple presented JWPs without becoming correlatable.</t>
<t>A JWP may also be single use, where an issued JWP can only be used once
to generate a presented form. In this case, any additional presentations
would be inherently correlatable.  These are still useful for
applications needing only selective disclosure or where new unique
issued JWPs can be retrieved easily.</t>

<section anchor="presentation-header"><name>Presentation Header</name>
<t>The presented form of a JWP MUST contain a Presentation Header.  It is
added by the holder and MUST be integrity protected by the underling
JPA.</t>
<t>This Header is used to ensure that a presented JWP cannot be replayed
and is cryptographically bound to the verifier it was presented to.</t>
<t>While there are not any required Header Parameters in the Presentation
Header, it MUST contain one or Header Parameters that uniquely identify
the presented JWP to both the holder and verifier.  For example, Header
Parameters that would satisfy this requirement include <tt>nonce</tt> and <tt>aud</tt>.</t>
</section>

<section anchor="presentation-payloads"><name>Presentation Payloads</name>
<t>The presentation has one or more payload slots, each of which either
contains the issued payload or represents that the payload is being
omitted. The position of other payloads does not change when one is
omitted; the resulting array will simply be sparse and only contain the
disclosed payloads.</t>
<t>The disclosed payloads will always be in the same array positions to
preserve any index-based references by the application between the
issued and presented forms of the JWP.  How the sparse array is
represented is specific to the serialization used.</t>
</section>

<section anchor="algorithm-specific-proof-methods"><name>Algorithm Specific Proof Methods</name>
<t>In addition to disclosing the contents of a payload, some algorithms MAY
support disclosing other information not representable as a payload.</t>
<t>For example, rather than releasing a date of birth, the algorithm may
include proof information indicating that the subject is over a certain
age at the time of the presentation. Such information is not disclosed
as a payload, and instead would be included in the presentation proof.</t>
<t>A non-exhaustive list of such proof methods along with examples includes:</t>

<ul>
<li><t>Ranges: Age acceptable currently, Geolocation near a specified
location</t>
</li>
<li><t>(Non-)Membership: Contains a particular role, Credential is not
considered revoked.</t>
</li>
<li><t>Proof of Knowledge: Holder has proof of possession of a secret key or
secret value</t>
</li>
<li><t>Derived Values: (Verifier-specific) stable pseudonymous values</t>
</li>
</ul>
</section>

<section anchor="presentation-proof"><name>Presentation Proof</name>
<t>The presentation proof is one or more octet strings that are opaque to
applications. Individual proof-supporting algorithms are responsible for
the contents and security of the proof value, along with any required
internal structures.</t>
<t>The proof of a presented JWP will always be different than the issued
proof.  At a minimum, it MUST be updated to include protection of the
added Presentation Header.</t>
<t>Algorithms SHOULD generate an un-correlatable presentation proof in
order to support multiple presentations from a single issued JWP.</t>
<t>The algorithm is responsible for representing selective disclosure of
payloads in a presented proof. If multiple octet strings are
insufficient for representing a proof as defined by an algorithm, the
algorithm is responsible for defining how such information is
represented within one or more octet strings.</t>
</section>
</section>
</section>

<section anchor="serializations"><name>Serializations</name>
<t>JWP defines two serializations: a JSON-based Compact Serialization and a
CBOR Serialization.  Both serializations represent one or more
Headers, multiple Payload slots, and a single Proof (which may be
composed of multiple octet strings).</t>
<t>The JWP Compact Serialization provides a JSON-based, space-efficient
encoding of a JWP in URL-safe characters.  Its design closely parallels
the JWS Compact Serialization <xref target="RFC7515"/>.  No representation parallel to
the JWS JSON serialization is defined.</t>
<t>JWP CBOR Serialization provides a compact CBOR-based encoding suitable
for constrained environments.  Its design closely parallels COSE_Sign1
<xref target="RFC9338"/>.</t>

<section anchor="CompactSerialization"><name>Compact Serialization</name>
<t>JWP Compact Serialization provides a JSON-based encoding of a JWP,
expressed in URL-safe characters. In addition to the alphabet of
unpadded BASE64URL-safe encoding, Compact Serialization uses the "." and
"~" characters as separators. This serialization is inspired by JWS.</t>
<t>The Header MUST be JSON-formatted for Compact Serialization.
This includes both Headers in presented form.</t>
<t>All binary data is BASE64URL encoded, including the octets of the UTF-8
encoded Headers and the individual payload slot data and the proof
values.</t>
<t>Payload slots and proof values are each concatenated into a single text
form by concatenating the BASE64URL encoded values using the <tt>~</tt>
character.</t>
<t>Individual payload slots are allowed to have their payload data be
omitted; if a payload is omitted, it is represented as a zero-length
text value, potentially resulting in leading, trailing, or consecutive
<tt>~</tt> characters in the concatenated form.</t>
<t>If a payload or proof value was a zero-length octet string, it does not
get output as its zero-length BASE64URL-encoded form but as a single <tt>_</tt>
character. This character does not represent a valid BASE64URL-encoded
octet string, allowing it to be distinguished from normally encoded
data.</t>
<t>The issued form is created by concatenating the base64url-encoded Issuer
Header, concatenated payloads, and concatenated proof
separated each by a <tt>.</tt> character. The concatenated payloads MAY be
omitted if the application is using detached payloads.</t>
<t>The presented form is created by concatenating the base64url-encoded
Presentation Header, base64url-encoded Issuer Header,
concatenated payloads, and concatenated proof separated each by a <tt>.</tt>
character. The concatenated payloads MAY be omitted if the application
is using detached payloads.</t>

<sourcecode type="wrapped"><![CDATA[eyJhbGciOiJCQlMiLCJhdWQiOiJodHRwczovL3JlY2lwaWVudC5leGFtcGxlLmNvbSIsI
m5vbmNlIjoid3JtQlJrS3RYalEifQ.eyJhbGciOiJCQlMiLCJraWQiOiJIamZjcHlqdVp
RLU84WWUyaFFuTmJUOVJiYm5yb2JwdGRuRXhSMERValU4In0.MTcxNDUyMTYwMA~MTcxN
zE5OTk5OQ~IkRvZSI~IkpheSI~~~.j8Un-MjA3J3D5HN9_dC3WLgFx51MIWLc--NPxO1N
SIb7RZENkiwMo8pzHcq3uevulTEy0Ni_BqBQ6wrS19uBtfBAlsqf3boYAwroR4RIMFc7D
Ko3qhKgy_Y7A1Zt_2CIrfjEPj_PsaKCntHZRjGZs9ZA1tzvc3CyrGYlE4ssiEHU9AY_t1
eGCEro_nI8VAVhCVOyl-_GkhjstRLxACFlM8lAJ1MRrNPfIYKsMjFV5PlBkY9sab1dE5S
n7ZpQyQEl2g9jlLfYm2plGUPT4KV6mV0sWlmAT73XWQwsnc6WR_dhoL-QNLSBRgKXklDu
yN40M02Qy0SndGHx-W-rlvCD7LkoHbuKpX2GtyE6aR4EBxMsMtRZXLsfD0JzG37TfRw2F
II_BFslao_0XsWNbpUATyX5DvYB0Uvzd94a_B0eCuf-qfoLTlZIeqWZIO9kVVk3Iu1HSh
pL1vx21g7iVQM7Wo1jgkwjpcml7Nn4WGFee_s
]]>
</sourcecode>
<blockquote><t>Figure: Compact Serialization of Presentation</t>
</blockquote></section>

<section anchor="cbor-serialization"><name>CBOR Serialization</name>
<t>A CBOR-based serialization is also defined, which uses the CBOR for
describing Header Parameters and does not use base64url encoding to
ensure safety in text-based protocols. While this supports the same data
model and algorithms, the difference in Header representations does not
allow interchangeability with Compact Serialization.</t>
<t>The CBOR serialization provides a compact binary representation of a
JWP.  The serialization consists of two arrays, representing issued and
presented forms.</t>
<t>The Headers MUST be CBOR formatted for CBOR serialization.
This includes both the issued and Presented Headers in the presented
form.</t>
<t>The issued form consists of a three-element array, while the presented
form consists of a four-element array.</t>
<t>If an individual payload has been omitted, it is represented by the CBOR
value <tt>nil</tt>. Payloads MUST be included unless the application is using
detached payloads, which is represented by setting the <tt>payloads</tt> value
as <tt>nil</tt>.</t>
<t>Two tags are defined for representing issued and presented JWPs.
Applications MAY use their own tags to tag other specific types of JWPs.</t>

<sourcecode type="cddl"><![CDATA[CBOR_JWP_Issued = [
       IssuerHeader : empty_or_serialized_map,
       PayloadSlots : [+ payload] / nil,
       Proof : [+ bstr]
   ]

CBOR_JWP_Presented = [
      PresenterHeader : empty_or_serialized_map,
      IssuerHeaders : empty_or_serialized_map,
      PayloadSlots : [+ disclosable_payload] / nil,
      Proof : [+ bstr]
   ]

empty_or_serialized_map = bstr .cbor header_map

header_map = {
    * label => values
}

label = int / tstr

values = any

payload = bstr

disclosable_payload = payload / nil

Tagged_CBOR_JWP_Issued = #6.xxx (CBOR_JWP_Issued)

Tagged_CBOR_JWP_Presented = #6.yyy (CBOR_JWP_Presented)

]]>
</sourcecode>
<t>Figure 1: CDDL [RFC8610] for CBOR Serializations.</t>
</section>
</section>

<section anchor="encrypted-json-web-proofs"><name>Encrypted JSON Web Proofs</name>
<t>Access to JWPs containing non-public material by parties without
legitimate access to the non-public information MUST be prevented.  This
can be accomplished by encrypting the JWP when potentially observable by
such parties to prevent the disclosure of private information.  The use
of an Encrypted JWP is recommended for this purpose.  The processing of
Encrypted JWPs is identical to the processing of other JWEs.</t>
<t>For a JWP with JSON-formatted Headers, an Encrypted JWP is a JWE
<xref target="RFC7516"/> with a JWP in Compact Serialization as its plaintext value.
For a JWP with CBOR-formatted Headers, an Encrypted JWP should use
<tt>COSE_Encrypt0</tt> or <tt>COSE_Encrypt</tt> <xref target="RFC9052"/> with the CBOR
Serialization as its plaintext.</t>
<t>The <tt>cty</tt> (content type) JWE/COSE Header Parameter is used to indicate
that the content of the JWE is a JWP.  The <tt>cty</tt> value of the JWE/COSE
message SHOULD be the same as the <tt>typ</tt> (type) JWP Header Parameter
value of the unencrypted JWP to be encrypted. If the JWP has no <tt>typ</tt>
value, then the following JWE Header Parameter <tt>cty</tt> (content type)
values SHOULD be used:</t>

<ul spacing="compact">
<li><tt>jwp</tt> is used to indicate that the content of the JWE is a JWP using
the JWP Compact Serialization.</li>
<li><tt>application/cwp</tt> is used to indicate that the plaintext of the COSE
message is a JWP in CBOR Serialization.</li>
</ul>
<t>The <tt>cty</tt> (content type) Header Parameter MUST be present unless the
application knows that the encrypted content is a JWP by another means
or convention, in which case the <tt>cty</tt> value MAY be omitted.</t>
</section>

<section anchor="detached-payloads"><name>Detached Payloads</name>
<t>In some contexts, it is useful to make statements about payloads which
are not themselves contained within the JWP, similar to "Detached
Content" in JWS <xref target="RFC7515"/>.</t>
<t>For this purpose, the compact, JSON and CBOR serializations allow for
all payload slots to be omitted from a serialized form. While this is a
legal serialization, it is not on its own able to be verified.</t>
<t>The recipient is expected to perform some sequence of steps defined by
the application to recreate the array of payload slots, including order
and optionality. This effectively recreates the fully specified
serialization of the JWP.</t>
</section>

<section anchor="SecurityConsiderations"><name>Security Considerations</name>
<t>Notes to be expanded:</t>

<ul spacing="compact">
<li>Requirements for supporting algorithms, see JPA</li>
<li>Application interface for verification</li>
<li>Data minimization of the Header(s)</li>
<li>To prevent accidentally introducing linkability, when an issuer uses
the same key with the same grouping of payload types, they SHOULD also
use the same Issuer Header. This Header SHOULD be
represented by the same octets, avoiding distinguishing a JWP due to
non-deterministic serialization.</li>
</ul>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>The following registration procedure is used for all the registries
established by this specification.</t>
<t>Values are registered on a Specification Required <xref target="RFC5226"/> basis after
a three-week review period on the jose-reg-review@ietf.org mailing list,
on the advice of one or more Designated Experts.  However, to allow for
the allocation of values prior to publication, the Designated Experts
may approve registration once they are satisfied that such a
specification will be published.</t>
<t>Registration requests sent to the mailing list for review should use an
appropriate subject (e.g., "Request to register JWP Header Parameter:
example").</t>
<t>Within the review period, the Designated Experts will either approve or
deny the registration request, communicating this decision to the review
list and IANA.  Denials should include an explanation and, if
applicable, suggestions as to how to make the request successful.
Registration requests that are undetermined for a period longer than 21
days can be brought to the IESG's attention (using the iesg@ietf.org
mailing list) for resolution.</t>
<t>Criteria that should be applied by the Designated Experts includes
determining whether the proposed registration duplicates existing
functionality, whether it is likely to be of general applicability or
useful only for a single application, and whether the registration
description is clear.</t>
<t>IANA must only accept registry updates from the Designated Experts and
should direct all requests for registration to the review mailing list.</t>
<t>It is suggested that multiple Designated Experts be appointed who are
able to represent the perspectives of different applications using this
specification, in order to enable broadly informed review of
registration decisions.  In cases where a registration decision could be
perceived as creating a conflict of interest for a particular Expert,
that Expert should defer to the judgment of the other Experts.</t>

<section anchor="HdrReg"><name>JSON Web Proof Header Parameters Registry</name>
<t>This specification establishes the IANA "JSON Web Proof Header
Parameters" registry for Header Parameter names, under the "JSON Object
Signing and Encryption (JOSE)" registry group. The registry records
the Header Parameter name and a reference to the specification that
defines it.  The same Header Parameter name can be registered multiple
times, provided that the parameter usage is compatible between the
specifications.  Different registrations of the same Header Parameter
name will typically use different Header Parameter Usage Locations
values.</t>

<section anchor="HdrTemplate"><name>Registration Template</name>

<dl spacing="compact">
<dt>Header Parameter Name:</dt>
<dd>The descriptive name of the parameter.
(e.g., "Key Identifier").</dd>
<dt>Header Parameter JSON Label:</dt>
<dd>The string label requested within a JSON context. (e.g., <tt>kid</tt>).
Because a core goal of this specification is for the resulting
representations to be compact, it is RECOMMENDED that the label be
short -- not to exceed 8 characters without a compelling reason to do
so. This label is case sensitive, and it is RECOMMENDED to avoid
upper-case characters. Labels may not match another registered names
in a case-insensitive manner unless the Designated Experts state that
there is a compelling reason to allow an exception. This registry
value SHOULD be supplied, but MAY be omitted if this Header Parameter
will never be formatted as JSON.</dd>
<dt>Header Parameter CBOR Label:</dt>
<dd>The string or integer label requested within a CBOR context
(e.g., <tt>2</tt>).  This label may not match other integer values, match
other string values in a case-insensitive manner, or be a differing
string value from the JSON label unless the Designated Experts state
that there is a compelling reason to allow an exception.</dd>
<dt>Header Parameter Usage Location(s):</dt>
<dd>The Header Parameter usage locations, which should be one or more of
the values <tt>Issued</tt> or <tt>Presented</tt>.  Other values may be used with the
approval of a Designated Expert.</dd>
<dt>Change Controller:</dt>
<dd>For IETF Stream RFCs, list the IETF. For others, give the name
of the responsible party. Other details (e.g., postal address, email
address, home page URI) may also be included.</dd>
<dt>Specification Document(s):</dt>
<dd>Reference to the document or documents that specify the parameter,
preferably including URIs that can be used to retrieve copies of the
documents. An indication of the relevant sections may also be included
but is not required.</dd>
</dl>
</section>

<section anchor="HdrContents"><name>Initial Registry Contents</name>
<t>This section registers the Header Parameters defined in
<xref target="RegisteredHeaderParameterLabels"/> in this registry.</t>

<section anchor="algorithm-header-parameter"><name>Algorithm Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Algorithm</li>
<li>Header Parameter JSON Label: <tt>alg</tt></li>
<li>Header Parameter CBOR Label: 1</li>
<li>Header Parameter Usage Location(s): Issued, Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="algDef"/> of this specification</li>
</ul>
</section>

<section anchor="key-id-header-parameter"><name>Key ID Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Key Identifier</li>
<li>Header Parameter JSON Label: <tt>kid</tt></li>
<li>Header Parameter CBOR Label: 2</li>
<li>Header Parameter Usage Location(s): Issued, Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="kidDef"/> of this specification</li>
</ul>
</section>

<section anchor="type-header-parameter"><name>Type Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Type</li>
<li>Header Parameter JSON Label: <tt>typ</tt></li>
<li>Header Parameter CBOR Label: 3</li>
<li>Header Parameter Usage Location(s): Issued, Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="typDef"/> of this specification</li>
</ul>
</section>

<section anchor="critical-header-parameter"><name>Critical Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Critical</li>
<li>Header Parameter JSON Label: <tt>crit</tt></li>
<li>Header Parameter CBOR Label: 4</li>
<li>Header Parameter Usage Location(s): Issued, Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="critDef"/> of this specification</li>
</ul>
</section>

<section anchor="issuer-header-parameter"><name>Issuer Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Issuer</li>
<li>Header Parameter JSON Label: <tt>iss</tt></li>
<li>Header Parameter CBOR Label: 5</li>
<li>Header Parameter Usage Location(s): Issued, Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="issDef"/> of this specification</li>
</ul>
</section>

<section anchor="audience-header-parameter"><name>Audience Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Audience</li>
<li>Header Parameter JSON Label: <tt>aud</tt></li>
<li>Header Parameter CBOR Label: 6</li>
<li>Header Parameter Usage Location(s): Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="audDef"/> of this specification</li>
</ul>
</section>

<section anchor="nonce-header-parameter"><name>Nonce Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Nonce</li>
<li>Header Parameter JSON Label: <tt>nonce</tt></li>
<li>Header Parameter CBOR Label: 7</li>
<li>Header Parameter Usage Location(s): Presented</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="nonceDef"/> of this specification</li>
</ul>
</section>

<section anchor="issuer-ephemeral-key-header-parameter"><name>Issuer Ephemeral Key Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Issuer Ephemeral Key</li>
<li>Header Parameter JSON Label: <tt>iek</tt></li>
<li>Header Parameter CBOR Label: 8</li>
<li>Header Parameter Usage Location(s): Issued</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="issuer_ephemeral_keyDef"/> of this specification</li>
</ul>
</section>

<section anchor="holder-presentation-key-header-parameter"><name>Holder Presentation Key Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Holder Presentation Key</li>
<li>Header Parameter JSON Label: <tt>hpk</tt></li>
<li>Header Parameter CBOR Label: 9</li>
<li>Header Parameter Usage Location(s): Issued</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="holder_presentation_keyDef"/> of this
specification</li>
</ul>
</section>

<section anchor="holder-presentation-algorithm-header-parameter"><name>Holder Presentation Algorithm Header Parameter</name>

<ul spacing="compact">
<li>Header Parameter Name: Holder Presentation Algorithm</li>
<li>Header Parameter JSON Label: <tt>hpa</tt></li>
<li>Header Parameter CBOR Label: 10</li>
<li>Header Parameter Usage Location(s): Issued</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s): <xref target="holder_presentation_algorithm_keyDef"/> of
this specification</li>
</ul>
</section>
</section>
</section>

<section anchor="MediaReg"><name>Media Type Registry</name>

<section anchor="MediaContents"><name>Registry Contents</name>
<t>This section registers the <tt>application/jwp</tt> media type <xref target="RFC2046"/> in
the IANA "Media Types" registry <xref target="IANA.MediaTypes"/> in the manner
described in <xref target="RFC6838"/>, which can be used to indicate that the content
is a JWP using the JWP Compact Serialization.</t>

<section anchor="the-application-jwp-media-type"><name>The application/jwp Media Type</name>

<ul spacing="compact">
<li>Type name: application</li>
<li>Subtype name: jwp</li>
<li>Required parameters: n/a</li>
<li>Optional parameters: n/a</li>
<li>Encoding considerations: 8bit; application/jwp values are encoded as a
series of base64url-encoded values (some of which may be the empty
string) separated by period ('.') and tilde ('~') characters</li>
<li>Security considerations: See <xref target="SecurityConsiderations"/> of this
specification</li>
<li>Interoperability considerations: n/a</li>
<li>Published specification: this specification</li>
<li>Applications that use this media type: TBD</li>
<li>Fragment identifier considerations: n/a</li>
<li><t>Additional information:</t>

<ul spacing="compact">
<li>Magic number(s): n/a</li>
<li>File extension(s): n/a</li>
<li>Macintosh file type code(s): n/a</li>
</ul></li>
<li>Person &amp; email address to contact for further information: Michael B.
Jones, michael_b_jones@hotmail.com</li>
<li>Intended usage: COMMON</li>
<li>Restrictions on usage: none</li>
<li>Author: Michael B. Jones, michael_b_jones@hotmail.com</li>
<li>Change Controller: IETF</li>
<li>Provisional registration? No</li>
</ul>
</section>

<section anchor="the-application-cwp-media-type"><name>The application/cwp Media Type</name>

<ul spacing="compact">
<li>Type name: application</li>
<li>Subtype name: cwp</li>
<li>Required parameters: n/a</li>
<li>Optional parameters: n/a</li>
<li>Encoding considerations: 8bit; application/cwp values are represented
as a CBOR data item.</li>
<li>Security considerations: See <xref target="SecurityConsiderations"/> of this
specification</li>
<li>Interoperability considerations: n/a</li>
<li>Published specification: this specification</li>
<li>Applications that use this media type: TBD</li>
<li>Fragment identifier considerations: n/a</li>
<li><t>Additional information:</t>

<ul spacing="compact">
<li>Magic number(s): n/a</li>
<li>File extension(s): n/a</li>
<li>Macintosh file type code(s): n/a</li>
</ul></li>
<li>Person &amp; email address to contact for further information:
Michael B. Jones, michael_b_jones@hotmail.com</li>
<li>Intended usage: COMMON</li>
<li>Restrictions on usage: none</li>
<li>Author: Michael B. Jones, michael_b_jones@hotmail.com</li>
<li>Change Controller: IETF</li>
<li>Provisional registration? No</li>
</ul>
</section>
</section>
</section>

<section anchor="SuffixReg"><name>Structured Syntax Suffix Registry</name>

<section anchor="SuffixContents"><name>Registry Contents</name>
<t>This section registers the following entries in the IANA "Structured
Syntax Suffix" registry [IANA.StructuredSuffix] in the manner described
in <xref target="RFC6838"/>.</t>

<section anchor="the-jwp-structured-syntax-suffix"><name>The +jwp Structured Syntax Suffix</name>

<ul spacing="compact">
<li>Name: JSON Web Proof (JWP)</li>
<li>+suffix: +jwp</li>
<li>References: <xref target="CompactSerialization"/> of this specification</li>
<li>Encoding considerations: binary; JWP values are encoded as a series of
base64url-encoded values (some of which may be the empty string)
separated by period ('.') and tilde ('~') characters</li>
<li>Interoperability considerations: n/a</li>
<li>Fragment identifier considerations: n/a</li>
<li>Security considerations: See <xref target="SecurityConsiderations"/> of this
specification</li>
<li>Contact: Michael B. Jones, michael_b_jones@hotmail.com</li>
<li>Author/Change controller: IETF</li>
</ul>
</section>

<section anchor="the-cwp-structured-syntax-suffix"><name>The +cwp Structured Syntax Suffix</name>

<ul spacing="compact">
<li>Name: CBOR Web Proof (CWP)</li>
<li>+suffix: +cwp</li>
<li>References: <xref target="CompactSerialization"/> of this specification</li>
<li>Encoding considerations: 8bit; CWP values are represented as a CBOR
data item.</li>
<li>Interoperability considerations: n/a</li>
<li>Fragment identifier considerations: n/a</li>
<li>Security considerations: See <xref target="SecurityConsiderations"/> of this
specification</li>
<li>Contact: Michael B. Jones, michael_b_jones@hotmail.com</li>
<li>Author/Change controller: IETF</li>
</ul>
</section>
</section>
</section>
</section>

</middle>

<back>
<references><name>References</name>
<references><name>Normative References</name>
<reference anchor="I-D.ietf-jose-json-proof-algorithms" target="https://datatracker.ietf.org/doc/html/draft-ietf-jose-json-proof-algorithms">
  <front>
    <title>JSON Proof Algorithms</title>
    <author fullname="Michael B. Jones" initials="M. B." surname="Jones">
      <organization>Self-Issued Consulting</organization>
    </author>
    <author fullname="David Waite" initials="D." surname="Waite">
      <organization>Ping Identity</organization>
    </author>
    <author fullname="Jeremie Miller" initials="J." surname="Miller">
      <organization>Ping Identity</organization>
    </author>
  </front>
  <seriesInfo name="Internet-Draft" value="draft-ietf-jose-json-proof-algorithms-latest"/>
</reference>
<reference anchor="I-D.ietf-jose-json-proof-token" target="https://datatracker.ietf.org/doc/html/draft-ietf-jose-json-proof-token">
  <front>
    <title>JSON Proof Token and CBOR Proof Token</title>
    <author fullname="Michael B. Jones" initials="M. B." surname="Jones">
      <organization>Self-Issued Consulting</organization>
    </author>
    <author fullname="David Waite" initials="D." surname="Waite">
      <organization>Ping Identity</organization>
    </author>
    <author fullname="Jeremie Miller" initials="J." surname="Miller">
      <organization>Ping Identity</organization>
    </author>
  </front>
  <seriesInfo name="Internet-Draft" value="draft-ietf-jose-json-proof-token-latest"/>
</reference>
<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.7516.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9052.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9596.xml"/>
</references>
<references><name>Informative References</name>
<reference anchor="ECMAScript" target="https://262.ecma-international.org/5.1/">
  <front>
    <title>ECMAScript Language Specification, 5.1 Edition</title>
    <author>
      <organization>Ecma International</organization>
    </author>
    <date year="2011" month="June"/>
  </front>
  <seriesInfo name="ECMA" value="262"/>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.irtf-cfrg-bbs-signatures.xml"/>
<reference anchor="IANA.CoAP.Formats" target="https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#content-formats">
  <front>
    <title>CoAP Content-Formats</title>
    <author>
      <organization>IANA</organization>
    </author>
    <date/>
  </front>
</reference>
<reference anchor="IANA.JWT" target="https://www.iana.org/assignments/jwt">
  <front>
    <title>JSON Web Token</title>
    <author>
      <organization>IANA</organization>
    </author>
    <date/>
  </front>
</reference>
<reference anchor="IANA.MediaTypes" target="https://www.iana.org/assignments/media-types">
  <front>
    <title>Media Types</title>
    <author>
      <organization>IANA</organization>
    </author>
    <date/>
  </front>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2045.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2046.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5226.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6838.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.7518.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8725.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9338.xml"/>
<reference anchor="VC-DATA-MODEL-2.0" target="https://www.w3.org/TR/vc-data-model-2.0">
  <front>
    <title>Verifiable Credentials Data Model v2.0</title>
    <author fullname="Manu Sporny">
      <organization>Digital Bazaar</organization>
    </author>
    <author fullname="Ted Thibodeau Jr">
      <organization>OpenLink Software</organization>
    </author>
    <author fullname="Ivan Herman">
      <organization>W3C</organization>
    </author>
    <author fullname="Gabe Cohen">
      <organization>Block</organization>
    </author>
    <author fullname="Michael B. Jones">
      <organization>Invited Expert</organization>
    </author>
    <date year="2025" month="May" day="15"/>
  </front>
</reference>
</references>
</references>

<section anchor="acknowledgements"><name>Acknowledgements</name>
<t>This work was incubated in the DIF <eref target="https://identity.foundation/working-groups/crypto.html">Applied Cryptography Working
Group</eref>.</t>
<t>We would like to thank
Brent Zundel and Emil Lundberg
for their valuable contributions to this specification.</t>
</section>

<section anchor="document-history"><name>Document History</name>
<t>[[ To be removed from the final specification ]]</t>
<t>-13</t>

<ul spacing="compact">
<li>Examples are now built deterministically (using RFC 6979 deterministic
ECDSA and seeded random number generation for BBS)</li>
</ul>
<t>-12</t>

<ul spacing="compact">
<li>IANA Considerations section changes from IANA Early Review</li>
</ul>
<t>-11</t>

<ul spacing="compact">
<li>Change Issuer Protected Header to Issuer Header</li>
<li>Change Presentation Protected Header to Presentation Header</li>
<li>Clarify usage of headers and header parameters</li>
</ul>
<t>-10</t>

<ul spacing="compact">
<li>Replaced <tt>application/jwp+cbor</tt> with <tt>application/cwp</tt>.</li>
<li>Registered <tt>+cwp</tt> structured syntax suffix and simplified +jwp suffix.</li>
<li>Expanded descriptions of and rationale for the serializations.</li>
<li>Payload nomenclature was clarified by adding the concept of payload
slots. The issued form and presented form have a certain number of
ordered payload slots, and a presentation may choose to omit
information from a slot.</li>
<li>Recommendation for Issuer Protected Header is to make the header
static across issued JWPs if possible, to prevent unintentional
correlation by verifiers</li>
<li>Cleaned up the text around algorithmic support for additional proofs
of knowledge outside of payload disclosure (e.g., range proofs)</li>
<li>Clarify that a proof is made up of multiple octet strings</li>
<li>(CDDL) The protected header definitions now reference
<tt>empty_or_serialized_map</tt> properly</li>
<li>(CDDL) <tt>payloads</tt> is now <tt>PayloadSlots</tt>, and represents you need at
least one slot</li>
<li>(CDDL) The issuer <tt>PayloadSlots</tt> contains <tt>payload</tt>, which is not
omittable</li>
<li>(CDDL) The presented form likewise references <tt>disclosable_payload</tt>,
which is nillable to represent omission</li>
<li>(CDDL) <tt>Proof</tt> is capitalized to match, and properly represents you
need at least one <tt>bstr</tt></li>
<li>(CDDL) <tt>header_map</tt>, <tt>label</tt> and <tt>value</tt> definitions imported from
RFC 9052</li>
<li>Receive examples of additional types of algorithm-specific proofs from
JPT</li>
<li>Added Holder Presentation Algorithm (<tt>hpa</tt>) parameter to support the
holder presenting using a different key type and algorithm than the
issuer in SU and MAC family algorithms</li>
<li>Change "proof_key" to "iek" and "presentation_key" to "hpk", both to
shorten their JSON labels and to clarify owner/purpose.</li>
</ul>
<t>-09</t>

<ul spacing="compact">
<li>Removed JSON serialization.</li>
<li>Corrected informative reference to the IANA JWT registry.</li>
</ul>
<t>-08</t>

<ul spacing="compact">
<li>Corrected instances of identifier <tt>proofs</tt> to <tt>proof</tt>.</li>
<li>Added reference to <xref target="RFC9596"/> for COSE "typ" header parameter.</li>
<li>Made some additional references normative.</li>
</ul>
<t>-07</t>

<ul spacing="compact">
<li>Changing primary editor</li>
<li>Broad changes to define a CBOR serialization, which leverages the new CBOR
Protected Headers</li>
<li>Deemphasis of JSON in some parts of the document to represent CBOR
alternatives</li>
<li>Rewrite Header Parameter parsing requirements for JSON to emphasize
preference to fail on duplicate headers (to match CBOR behavior).
Last-encountered remains as an option to match ECMA definition.</li>
<li>Add option to use CoAP Formats for <tt>typ</tt> in CBOR mode to match COSE,
as a compact indirection over full media types.</li>
<li>Modify IANA registry template to account for CBOR Labels in header
parameters</li>
<li>Add application/jwp+cbor media type</li>
<li>Modify example generation to use <tt>proof_key</tt> and <tt>presentation_key</tt>
names</li>
<li>Change <tt>proof_jwk</tt> to <tt>proof_key</tt> and <tt>presentation_jwk</tt> to
<tt>presentation_key</tt> to better represent that the key may be JSON or
CBOR-formatted.</li>
<li>Moved the registry for <tt>proof_key</tt> and <tt>presentation_key</tt> to JWP where
they are defined. Consolidated usage, purpose, and requirements from
algorithm usage under these definitions.</li>
<li>Clarified that <tt>proof_key</tt> and <tt>presentation_key</tt> are required by
particular algorithms and are not more generally required for issued
and presented JWPs.</li>
<li>Move <tt>claims</tt> to JPT to live beside <tt>cid</tt>, and renumber CBOR labels so
that they may be adjacent</li>
</ul>
<t>-06</t>

<ul spacing="compact">
<li>Update reference to new repository home.</li>
<li>Fixed #83: Added encrypted JWPs.</li>
<li>Added additional clarification around the compact and JSON
serializations</li>
<li>Added text around fully detached payloads</li>
</ul>
<t>-05</t>

<ul spacing="compact">
<li>Clarify the use of multiple octet strings in presentation proofs.</li>
<li>Update BBS algorithm example in JSON serialization to show the proof
as an array with a single octet string.</li>
<li>Move single-use example appendix from JWP to JPA.</li>
<li>Registered <tt>+jwp</tt> structured syntax suffix.</li>
</ul>
<t>-04</t>

<ul spacing="compact">
<li>Refactoring figures and examples to be built from a common set across
all three documents.</li>
</ul>
<t>-03</t>

<ul spacing="compact">
<li>Improvements resulting from a full proofreading.</li>
<li>Populated IANA Considerations section.</li>
<li>Specified JWP Header Parameters.</li>
<li>Specified representation of zero-length disclosed payloads for the
compact serialization.</li>
<li>Specified that algorithms may supply multiple octet strings for the
proof, which are separated by <tt>~</tt> characters in the compact
serialization.</li>
<li>Updated to use BBS draft -05.</li>
<li>Added Terminology Section.</li>
</ul>
<t>-02</t>

<ul spacing="compact">
<li>Update reference to current BBS algorithm</li>
</ul>
<t>-01</t>

<ul spacing="compact">
<li>Correct cross-references within group.</li>
</ul>
<t>-00</t>

<ul spacing="compact">
<li>Created initial working group draft based on
draft-jmiller-jose-json-web-proof-01</li>
</ul>
</section>

</back>

</rfc>
