<?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-oauth-selective-disclosure-jwt-09" submissionType="IETF" category="std" xml:lang="en" indexInclude="true">

<front>
<title abbrev="SD-JWT">Selective Disclosure for JWTs (SD-JWT)</title><seriesInfo value="draft-ietf-oauth-selective-disclosure-jwt-09" stream="IETF" status="standard" name="Internet-Draft"/>
<author initials="D." surname="Fett" fullname="Daniel Fett"><organization>Authlete</organization><address><postal><street/>
</postal><email>mail@danielfett.de</email>
<uri>https://danielfett.de/</uri>
</address></author><author initials="K." surname="Yasuda" fullname="Kristina Yasuda"><organization>Keio University</organization><address><postal><street/>
</postal><email>kristina@sfc.keio.ac.jp</email>
</address></author><author initials="B." surname="Campbell" fullname="Brian Campbell"><organization>Ping Identity</organization><address><postal><street/>
</postal><email>bcampbell@pingidentity.com</email>
</address></author><date/>
<area>Security</area>
<workgroup>Web Authorization Protocol</workgroup>
<keyword>security</keyword>
<keyword>oauth2</keyword>

<abstract>
<t>This specification defines a mechanism for selective disclosure of individual elements of a JSON object
used as the payload of a JSON Web Signature (JWS) structure.
It encompasses various applications, including but not limited to the selective disclosure of JSON Web Token (JWT) claims.</t>
</abstract>

<note title="Discussion Venues" removeInRFC="true">
<t>Discussion of this document takes place on the
    Web Authorization Protocol Working Group mailing list (oauth@ietf.org),
    which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/oauth/"/>.</t>
<t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/oauth-wg/oauth-selective-disclosure-jwt"/>.</t>
</note>
</front>

<middle>

<section anchor="Introduction"><name>Introduction</name>
<t>This document specifies conventions for creating JSON Web Signature (JWS) <xref target="RFC7515"/>
structures with JSON <xref target="RFC8259"/> objects as the payload while supporting selective disclosure of individual elements of that JSON.
Because JSON Web Token (JWT) <xref target="RFC7519"/> is a very prevalent application of JWS with a JSON payload, the selective disclosure of JWT claims receives primary treatment herein. However, that does not preclude the mechanism's applicability to other or more general applications of JWS with JSON payloads.</t>
<t>The JSON-based representation of claims in a signed JWT is
secured against modification using JWS digital
signatures. A consumer of a signed JWT that has checked the
signature can safely assume that the contents of the token have not been
modified.  However, anyone receiving an unencrypted JWT can read all the
claims. Likewise, anyone with the decryption key receiving encrypted JWT
can also read all the claims.</t>
<t>One of the common use cases of a signed JWT is representing a user's
identity. As long as the signed JWT is one-time
use, it typically only contains those claims the user has consented to
disclose to a specific Verifier. However, there is an increasing number
of use cases where a signed JWT is created once and then used a number
of times by the user (the "Holder" of the JWT). In such use cases, the signed JWT needs
to contain the superset of all claims the user of the
signed JWT might want to disclose to Verifiers at some point. The
ability to selectively disclose a subset of these claims depending on
the Verifier becomes crucial to ensure minimum disclosure and prevent
Verifiers from obtaining claims irrelevant for the transaction at hand.
SD-JWTs defined in this document enable such selective disclosure of JWT claims.</t>
<t>One example of a multi-use JWT is a verifiable credential, an Issuer-signed
credential that contains the claims about a subject, and whose authenticity can be
cryptographically verified.</t>
<t>Similar to the JWT specification on which it builds, this document is a product of the
Web Authorization Protocol (oauth) working group. However, while both JWT and SD-JWT
have potential OAuth 2.0 applications, their utility and application is certainly not constrained to OAuth 2.0.
JWT was developed as a general-purpose token format and has seen widespread usage in a
variety of applications. SD-JWT is a selective disclosure mechanism for JWT and is
similarly intended to be general-purpose specification.</t>
<t>While JWTs with claims describing natural persons are a common use case, the
mechanisms defined in this document can be used for other use cases as well.</t>
<t>In an SD-JWT, claims can be hidden, but cryptographically
protected against undetected modification. "Claims" here refers to both
object properties (name-value pairs) as well as array elements. When issuing the SD-JWT to
the Holder, the Issuer includes the cleartext counterparts of all hidden
claims, the so-called Disclosures, outside the signed part of the SD-JWT.</t>
<t>The Holder decides which claims to disclose to a particular Verifier and includes the respective
Disclosures in the SD-JWT to that Verifier. The Verifier
has to verify that all disclosed claim values were part of the original
Issuer-signed JWT. The Verifier will not, however, learn any claim
values not disclosed in the Disclosures.</t>
<t>This document also defines a format for SD-JWTs with Key Binding (SD-JWT+KB).
By optionally sending an SD-JWT+KB to a
Verifier, the Holder can prove to the Verifier that they hold the private key
associated to the SD-JWT (i.e., using the <tt>cnf</tt> claim <xref target="RFC7800"/>). The strength of the binding is conditional upon the trust
in the protection of the private key of the key pair an SD-JWT is bound to.</t>
<t>SD-JWT can be used with any JSON-based representation of claims, including JSON-LD.</t>
<t>This specification aims to be easy to implement and to leverage
established and widely used data formats and cryptographic algorithms
wherever possible.</t>

<section anchor="feature-summary"><name>Feature Summary</name>
<t>This specification defines two primary data formats:</t>

<ol>
<li><t>SD-JWT is a composite structure enabling selective disclosure of its contents. The definition in this document comprises the following:</t>

<ul spacing="compact">
<li>A format for enabling selective disclosure in nested JSON data structures,
supporting selectively disclosable object properties (name-value pairs) and array elements</li>
<li>A format for encoding the selectively disclosable data items</li>
<li>A format extending the JWS Compact Serialization, allowing for the combined
transport of the Issuer-signed JSON data structure and the disclosable data items</li>
<li>An alternate format extending the JWS JSON Serialization, also allowing for
transport of the Issuer-signed JSON data structure and disclosure data</li>
</ul></li>
<li><t>SD-JWT+KB is a composite structure enabling cryptographic key binding when presented to the Verifier. The definition in this document comprises the following:</t>

<ul spacing="compact">
<li>A facility for associating an SD-JWT to a key pair</li>
<li>A format for a Key Binding JWT (KB-JWT) that proves possession of the private key of
the associated key pair</li>
<li>A format extending the SD-JWT format for the combined transport of the SD-JWT
and the KB-JWT</li>
</ul></li>
</ol>
</section>

<section anchor="conventions-and-terminology"><name>Conventions and Terminology</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><strong>base64url</strong> denotes the URL-safe base64 encoding without padding defined in
Section 2 of <xref target="RFC7515"/>.</t>
</section>
</section>

<section anchor="terms-and-definitions"><name>Terms and Definitions</name>

<dl spacing="compact">
<dt>Selective disclosure:</dt>
<dd>Process of a Holder disclosing to a Verifier a subset of claims contained in a claim set issued by an Issuer.</dd>
<dt>Selectively Disclosable JWT (SD-JWT):</dt>
<dd>A composite structure, consisting of an Issuer-signed JWT (JWS, <xref target="RFC7515"/>) and zero or more Disclosures, which
supports selective disclosure as defined in this document. It can contain both regular claims and digests of selectively-disclosable claims.</dd>
<dt>Disclosure:</dt>
<dd>A JSON array containing a combination of a salt, a cleartext claim name (present when the claim is a name-value pair and absent when the claim is an array element), and a cleartext claim value, which is base64url-encoded and used to calculate a digest for the respective claim. The term Disclosure refers to the whole base64url-encoded string.</dd>
<dt>Key Binding:</dt>
<dd>Ability of the Holder to prove legitimate possession of an SD-JWT by proving
control over a private key during the presentation. When utilizing Key Binding, an SD-JWT contains
the public key corresponding to the private key controlled by the Holder (or a reference to this public key).</dd>
<dt>Key Binding JWT (KB-JWT):</dt>
<dd>A JWT for proving Key Binding as defined in <xref target="kb-jwt"/>.  A Key Binding JWT is
said to "be tied to" a particular SD-JWT when its payload includes a hash of the
SD-JWT in its <tt>sd_hash</tt> claim.</dd>
<dt>Selectively Disclosable JWT with Key Binding (SD-JWT+KB):</dt>
<dd>A composite structure, comprising an SD-JWT and a Key Binding JWT tied to that SD-JWT.</dd>
<dt>Issuer:</dt>
<dd>An entity that creates SD-JWTs.</dd>
<dt>Holder:</dt>
<dd>An entity that received SD-JWTs from the Issuer and has control over them.</dd>
<dt>Verifier:</dt>
<dd>An entity that requests, checks, and extracts the claims from an SD-JWT with its respective Disclosures.</dd>
</dl>
</section>

<section anchor="flow-diagram"><name>Flow Diagram</name>
<figure><name>SD-JWT Issuance and Presentation Flow
</name>
<sourcecode type="ascii-art"><![CDATA[           +------------+
           |            |
           |   Issuer   |
           |            |
           +------------+
                 |
            Issues SD-JWT
      including all Disclosures
                 |
                 v
           +------------+
           |            |
           |   Holder   |
           |            |
           +------------+
                 |
         Presents SD-JWT+KB
    including selected Disclosures
                 |
                 v
           +-------------+
           |             |+
           |  Verifiers  ||+
           |             |||
           +-------------+||
            +-------------+|
             +-------------+
]]>
</sourcecode>
</figure>
</section>

<section anchor="concepts"><name>Concepts</name>
<t>This section describes SD-JWTs with their respective Disclosures and Key Binding at a
conceptual level, abstracting from the data formats described in <xref target="data_formats"/>.</t>

<section anchor="sd-jwt-and-disclosures"><name>SD-JWT and Disclosures</name>
<t>An SD-JWT, at its core, is a digitally signed JSON document containing digests over the selectively disclosable claims with the Disclosures outside the document. Disclosures can be omitted without breaking the signature, and modifying them can be detected. Selectively disclosable claims can be individual object properties (name-value pairs) or array elements.</t>
<t>Each digest value ensures the integrity of, and maps to, the respective Disclosure.  Digest values are calculated using a hash function over the Disclosures, each of which contains a cryptographically secure random salt, the claim name (only when the claim is an object property), and the claim value. The Disclosures are sent to the Holder as part of the SD-JWT in the format defined in <xref target="data_formats"/>.
When presenting an SD-JWT to a Verifier, the Holder only includes the Disclosures for the claims that it wants to reveal to that Verifier.</t>
<t>An SD-JWT MAY also contain clear-text claims that are always disclosed to the Verifier.</t>
</section>

<section anchor="disclosing-to-a-verifier"><name>Disclosing to a Verifier</name>
<t>To disclose to a Verifier a subset of the SD-JWT claim values, a Holder sends only the Disclosures of those selectively released claims to the Verifier as part of the SD-JWT.</t>
</section>

<section anchor="optional-key-binding"><name>Optional Key Binding</name>
<t>Key Binding is an optional feature. When Key Binding is required by the use-case, the SD-JWT MUST contain information about the key material controlled by the Holder.</t>
<t>Note: How the public key is included in SD-JWT is out of scope of this document. It can be passed by value or by reference.</t>
<t>When a Verifier requires Key Binding, the Holder presents an SD-JWT+KB, consisting of an SD-JWT as well as a Key Binding JWT tied to that SD-JWT.
The Key Binding JWT encodes a signature by the Holder's private key over</t>

<ul spacing="compact">
<li>a hash of the SD-JWT,</li>
<li>a nonce to ensure the freshness of the signature, and</li>
<li>an audience value to indicate the intended audience for the document.</li>
</ul>
<t>Details of the format of Key Binding JWTs are described in <xref target="kb-jwt"/>.</t>
</section>

<section anchor="verification"><name>Verification</name>
<t>At a high level, the Verifier</t>

<ul spacing="compact">
<li>receives either an SD-JWT or an SD-JWT+KB from the Holder,</li>
<li>verifies the signature on the SD-JWT (or the the SD-JWT inside the SD-JWT+KB) using the Issuer's public key,</li>
<li>verifies the signature on the KB-JWT using the public key included (or referenced) in the SD-JWT, if the Verifier's policy requires Key Binding, and</li>
<li>calculates the digests over the Holder-Selected Disclosures and verifies that each digest is contained in the SD-JWT.</li>
</ul>
<t>The detailed algorithm is described in <xref target="verifier_verification"/>.</t>
</section>
</section>

<section anchor="data_formats"><name>SD-JWT and SD-JWT+KB Data Formats</name>
<t>An SD-JWT is composed of</t>

<ul spacing="compact">
<li>an Issuer-signed JWT, and</li>
<li>zero or more Disclosures.</li>
</ul>
<t>An SD-JWT+KB is composed of</t>

<ul spacing="compact">
<li>an SD-JWT, and</li>
<li>a Key Binding JWT.</li>
</ul>
<t>The Issuer-signed JWT, Disclosures, and Key Binding JWT are explained in
<xref target="iss-signed-jwt"/>, <xref target="creating_disclosures"/>, and <xref target="kb-jwt"/> respectively.</t>
<t>The serialized format for the SD-JWT is the concatenation of each part delineated with a single tilde ('~') character as follows:</t>

<artwork><![CDATA[<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~
]]>
</artwork>
<t>The order of the concatenated parts MUST be the Issuer-signed JWT,
a tilde character, zero or more Disclosures each followed by a tilde character,
and lastly the optional Key Binding JWT.
In the case that there is no Key Binding JWT, the last element MUST be an empty
string and the last separating tilde character MUST NOT be omitted.</t>
<t>The serialized format for an SD-JWT+KB extends the SD-JWT format by concatenating a Key Binding JWT.</t>

<artwork><![CDATA[<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~<KB-JWT>
]]>
</artwork>
<t>The two formats can be distinguished by the final <tt>~</tt> character that is present
on an SD-JWT.  A Verifier that expects an SD-JWT MUST verify that the final
tilde-separated component is empty.  A Verifier that expects an SD-JWT+KB MUST verify
that its final tilde-separated component is a valid KB-JWT.</t>
<t>The Disclosures are linked to the Issuer-signed JWT through the
digest values included therein.</t>
<t>When issuing to a Holder, the Issuer includes all the relevant Disclosures in the SD-JWT.</t>
<t>When presenting to a Verifier, the Holder sends only the selected set of the Disclosures in the SD-JWT.</t>
<t>The Holder MAY send any subset of the Disclosures to the Verifier, i.e.,
none, some, or all Disclosures. For data that the Holder does not want to reveal
to the Verifier, the Holder MUST NOT send Disclosures or reveal the salt values in any
other way. A Holder MUST NOT send a Disclosure that was not included in the issued
SD-JWT or send a Disclosure more than once.</t>
<t>To further illustrate the SD-JWT format, the following examples show a few different
SD-JWT permutations, both with and without various constituent parts.</t>
<t>An SD-JWT without Disclosures and without a KB-JWT:</t>

<artwork><![CDATA[<Issuer-signed JWT>~
]]>
</artwork>
<t>An SD-JWT with Disclosures and without a KB-JWT:</t>

<artwork><![CDATA[<Issuer-signed JWT>~<Disclosure 1>~<Disclosure N>~
]]>
</artwork>
<t>An SD-JWT+KB without Disclosures:</t>

<artwork><![CDATA[<Issuer-signed JWT>~<KB-JWT>
]]>
</artwork>
<t>An SD-JWT+KB with Disclosures:</t>

<artwork><![CDATA[<Issuer-signed JWT>~<Disclosure 1>~<Disclosure N>~<KB-JWT>
]]>
</artwork>
<t>As an alternative illustration of the SD-JWT format, for those who celebrate, ABNF <xref target="RFC5234"/> for the
SD-JWT, SD-JWT+KB, and various constituent parts is provided here:</t>

<sourcecode type="abnf"><![CDATA[ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
DIGIT = %x30-39 ; 0-9
BASE64URL = 1*(ALPHA / DIGIT / "-" / "_")
JWT = BASE64URL "." BASE64URL "." BASE64URL
DISCLOSURE = BASE64URL
SD-JWT = JWT "~" *[DISCLOSURE "~"]
KB-JWT = JWT
SD-JWT-KB = SD-JWT KB-JWT
]]>
</sourcecode>

<section anchor="iss-signed-jwt"><name>Issuer-signed JWT</name>
<t>An SD-JWT has a JWT component that MUST be signed using the Issuer's private
key. It MUST NOT use the <tt>none</tt> algorithm.</t>
<t>The payload of an SD-JWT is a JSON object according to the following rules:</t>

<ol spacing="compact">
<li>The payload MAY contain the <tt>_sd_alg</tt> key described in <xref target="hash_function_claim"/>.</li>
<li>The payload MAY contain one or more digests of Disclosures to enable selective disclosure of the respective claims, created and formatted as described in <xref target="creating_disclosures"/>.</li>
<li>The payload MAY contain one or more decoy digests to obscure the actual number of claims in the SD-JWT, created and formatted as described in <xref target="decoy_digests"/>.</li>
<li>The payload MAY contain one or more non-selectively disclosable claims.</li>
<li>The payload MAY contain the Holder's public key(s) or reference(s) thereto, as explained in <xref target="key_binding"/>.</li>
<li>The payload MAY contain further claims such as <tt>iss</tt>, <tt>iat</tt>, etc. as defined or required by the application using SD-JWTs.</li>
<li>The payload MUST NOT contain the reserved claims <tt>_sd</tt> or <tt>...</tt> except for the purpose of transporting digests as described below.</li>
</ol>
<t>The same digest value MUST NOT appear more than once in the SD-JWT.</t>
<t>Applications of SD-JWT SHOULD be explicitly typed using the <tt>typ</tt> header parameter. See <xref target="explicit_typing"/> for more details.</t>
<t>It is the Issuer who decides which claims are selectively disclosable and which are not. End-User claims MAY be included as plaintext as well, e.g., if hiding the particular claims from the Verifier is not required in the intended use case. See <xref target="sd-validity-claims"/> for considerations on making validity-controlling claims such as <tt>exp</tt> selectively disclosable.</t>
<t>Claims that are not selectively disclosable are included in the SD-JWT in plaintext just as they would be in any other JSON structure.</t>

<section anchor="hash_function_claim"><name>Hash Function Claim</name>
<t>The claim <tt>_sd_alg</tt> indicates the hash algorithm used by the Issuer to generate
the digests as described in <xref target="creating_disclosures"/>. When used, this claim MUST
appear at the top level of the SD-JWT payload. It
MUST NOT be used in any object nested within the payload. If the  <tt>_sd_alg</tt>
claim is not present at the top level, a default value of <tt>sha-256</tt> MUST be used.</t>
<t>The hash algorithm identifier MUST be a hash algorithm value from the "Hash Name
String" column in the IANA "Named Information Hash Algorithm" registry
<xref target="IANA.Hash.Algorithms"/> or a value defined in another specification and/or
profile of this specification.</t>
<t>To promote interoperability, implementations MUST support the <tt>sha-256</tt> hash
algorithm.</t>
<t>See <xref target="security_considerations"/> for requirements regarding entropy of the salt,
minimum length of the salt, and choice of a hash algorithm.</t>
</section>

<section anchor="key_binding"><name>Key Binding</name>
<t>If the Issuer wants to enable Key Binding, it includes a public key
associated with the Holder, or a reference thereto, using the <tt>cnf</tt> claim as defined in <xref target="RFC7800"/>.
The <tt>jwk</tt> confirmation method, as defined in Section 3.2 of <xref target="RFC7800"/>, is
suggested for doing so, however, other confirmation methods can be used.</t>
<t>Note that, as was stated in <xref target="RFC7800"/>,
if an application needs to represent multiple proof-of-possession
keys in the same SD-JWT, one way to achieve this is to use other
claim names, in addition to <tt>cnf</tt>, to hold the additional proof-of-possession key information.</t>
<t>It is out of the scope of this document to describe how the Holder key pair is
established. For example, the Holder MAY create a key pair and provide a public key to the Issuer,
the Issuer MAY create the key pair for the Holder, or
Holder and Issuer MAY use pre-established key material.</t>
<t>Note: The examples throughout this document use the <tt>cnf</tt> claim with the <tt>jwk</tt> member to include
the raw public key by value in SD-JWT.</t>
</section>
</section>

<section anchor="creating_disclosures"><name>Disclosures</name>
<t>Disclosures are created differently depending on whether a claim is an object property (name-value pair) or an array element.</t>

<ul spacing="compact">
<li>For a claim that is an object property, the Issuer creates a Disclosure as described in <xref target="disclosures_for_object_properties"/>.</li>
<li>For a claim that is an array element, the Issuer creates a Disclosure as described in <xref target="disclosures_for_array_elements"/>.</li>
</ul>

<section anchor="disclosures_for_object_properties"><name>Disclosures for Object Properties</name>
<t>For each claim that is an object property and that is to be made selectively disclosable, the Issuer MUST create a Disclosure as follows:</t>

<ul spacing="compact">
<li><t>Create an array of three elements in this order:</t>

<ol spacing="compact">
<li>A salt value. MUST be a string. See <xref target="salt-entropy"/> for security considerations. It is RECOMMENDED to base64url-encode minimum 128 bits of cryptographically secure random data, producing a string. The salt value MUST be unique for each claim that is to be selectively disclosed. The Issuer MUST NOT reveal the salt value to any party other than the Holder.</li>
<li>The claim name, or key, as it would be used in a regular JWT payload. It MUST be a string and MUST NOT be <tt>_sd</tt>, <tt>...</tt>, or a claim name existing in the object as a non-selectively disclosable claim.</li>
<li>The claim value, as it would be used in a regular JWT payload. The value MAY be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, and objects.</li>
</ol></li>
<li>JSON-encode the array, producing an UTF-8 string.</li>
<li>base64url-encode the byte representation of the UTF-8 string, producing a US-ASCII <xref target="RFC0020"/> string. This string is the Disclosure.</li>
</ul>
<t>The order is decided based on the readability considerations: salts would have a
constant length within the SD-JWT, claim names would be around the same length
all the time, and claim values would vary in size, potentially being large
objects.</t>
<t>The following example illustrates the steps described above.</t>
<t>The array is created as follows:</t>

<sourcecode type="json"><![CDATA[["_26bc4LT-ac6q2KI6cBW5es", "family_name", "Möbius"]
]]>
</sourcecode>
<t>The resulting Disclosure would be: <tt>WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsICJmYW1pbHlfbmFtZSIsICJNw7ZiaXVzIl0</tt></t>
<t>Note that variations in whitespace, encoding of Unicode characters, ordering of object properties, etc., are allowed
in the JSON representation and no canonicalization needs be performed before base64url-encoding.
For example, the following strings are all valid and encode the
same claim value "Möbius":</t>

<ul spacing="compact">
<li>A different way to encode the unicode umlaut:<br/>
<tt>WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsICJmYW1pbHlfbmFtZSIsICJNX</tt><br/>
<tt>HUwMGY2Yml1cyJd</tt></li>
<li>No white space:<br/>
<tt>WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsImZhbWlseV9uYW1lIiwiTcO2Y</tt><br/>
<tt>ml1cyJd</tt></li>
<li>Newline characters between elements:<br/>
<tt>WwoiXzI2YmM0TFQtYWM2cTJLSTZjQlc1ZXMiLAoiZmFtaWx5X25hbWUiLAoiT</tt><br/>
<tt>cO2Yml1cyIKXQ</tt></li>
</ul>
<t>See <xref target="disclosure_format_considerations"/> for some further considerations on the Disclosure format approach.</t>
</section>

<section anchor="disclosures_for_array_elements"><name>Disclosures for Array Elements</name>
<t>For each claim that is an array element and that is to be made selectively disclosable, the Issuer MUST create a Disclosure as follows:</t>

<ul spacing="compact">
<li><t>The array MUST contain two elements in this order:</t>

<ol spacing="compact">
<li>The salt value as described in <xref target="disclosures_for_object_properties"/>.</li>
<li>The array element that is to be hidden. This value MAY be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, and objects.</li>
</ol></li>
</ul>
<t>The Disclosure string is created by JSON-encoding this array and base64url-encoding the byte representation of the resulting string as described in <xref target="disclosures_for_object_properties"/>. The same considerations regarding
variations in the result of the JSON encoding apply.</t>
<t>For example, a Disclosure for the second element of the <tt>nationalities</tt> array in the following claim set:</t>

<sourcecode type="json"><![CDATA[{
  "nationalities": ["DE", "FR"]
}
]]>
</sourcecode>
<t>could be created by first creating the following array:</t>

<sourcecode type="json"><![CDATA[["lklxF5jMYlGTPUovMNIvCA", "FR"]
]]>
</sourcecode>
<t>The resulting Disclosure would be: <tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgIkZSIl0</tt></t>
</section>

<section anchor="hashing_disclosures"><name>Hashing Disclosures</name>
<t>For embedding references to the Disclosures in the SD-JWT, each Disclosure is hashed using the hash algorithm specified in the <tt>_sd_alg</tt> claim described in <xref target="hash_function_claim"/>. The resulting digest is then included in the SD-JWT payload instead of the original claim value, as described next.</t>
<t>The digest MUST be taken over the US-ASCII bytes of the base64url-encoded value that is the Disclosure. This follows the convention in JWS <xref target="RFC7515"/> and JWE <xref target="RFC7516"/>. The bytes of the digest MUST then be base64url-encoded.</t>
<t>It is important to note that:</t>

<ul spacing="compact">
<li>The input to the hash function MUST be the base64url-encoded Disclosure, not the bytes encoded by the base64url string.</li>
<li>The bytes of the output of the hash function MUST be base64url-encoded, and are not the bytes making up the (often used) hex representation of the bytes of the digest.</li>
</ul>
<t>For example, the SHA-256 digest of the Disclosure
<tt>WyI2cU1RdlJMNWhhaiIsICJmYW1pbHlfbmFtZSIsICJNw7ZiaXVzIl0</tt> would be
<tt>uutlBuYeMDyjLLTpf6Jxi7yNkEF35jdyWMn9U7b_RYY</tt>.</t>
<t>The SHA-256 digest of the Disclosure
<tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgIkZSIl0</tt> would be
<tt>w0I8EKcdCtUPkGCNUrfwVp2xEgNjtoIDlOxc9-PlOhs</tt>.</t>
</section>

<section anchor="embedding_disclosure_digests"><name>Embedding Disclosure Digests in SD-JWTs</name>
<t>For selectively disclosable claims, the digests of the Disclosures are embedded into the Issuer-signed JWT instead of the claims themselves. The precise way of embedding depends on whether a claim is an object property (name-value pair) or an array element.</t>

<ul spacing="compact">
<li>For a claim that is an object property, the Issuer embeds a Disclosure digest as described in <xref target="embedding_object_properties"/>.</li>
<li>For a claim that is an array element, the Issuer creates a Disclosure digest as described in <xref target="embedding_array_elements"/>.</li>
</ul>

<section anchor="embedding_object_properties"><name>Object Properties</name>
<t>Digests of Disclosures for object properties are added to an array under the new
key <tt>_sd</tt> in the object. The <tt>_sd</tt> key MUST refer to an array of strings, each
string being a digest of a Disclosure or a decoy digest as described in <xref target="decoy_digests"/>.</t>
<t>The array MAY be empty in case the Issuer decided not to selectively disclose
any of the claims at that level. However, it is RECOMMENDED to omit the <tt>_sd</tt>
key in this case to save space.</t>
<t>The Issuer MUST hide the original order of the claims in the array. To ensure
this, it is RECOMMENDED to shuffle the array of hashes, e.g., by sorting it
alphanumerically or randomly, after potentially adding
decoy digests as described in <xref target="decoy_digests"/>. The precise method does not matter as long as it
does not depend on the original order of elements.</t>
<t>For example, using the digest of the object property Disclosure created above,
the Issuer could create the following SD-JWT payload to make <tt>family_name</tt>
selectively disclosable:</t>

<sourcecode type="json"><![CDATA[{
  "given_name": "Alice",
  "_sd": ["uutlBuYeMDyjLLTpf6Jxi7yNkEF35jdyWMn9U7b_RYY"]
}
]]>
</sourcecode>
</section>

<section anchor="embedding_array_elements"><name>Array Elements</name>
<t>Digests of Disclosures for array elements are added to the array in the same
position as the original claim value in the array. For each digest, an object
of the form <tt>{"...": "&lt;digest&gt;"}</tt> is added to the array. The key MUST always be the
string <tt>...</tt> (three dots). The value MUST be the digest of the Disclosure created as
described in <xref target="hashing_disclosures"/>. There MUST NOT be any other keys in the
object.</t>
<t>For example, using the digest of the array element Disclosure created above,
the Issuer could create the following SD-JWT payload to make the second element
of the <tt>nationalities</tt> array selectively disclosable:</t>

<sourcecode type="json"><![CDATA[{
  "nationalities":
    ["DE", {"...": "w0I8EKcdCtUPkGCNUrfwVp2xEgNjtoIDlOxc9-PlOhs"}]
}
]]>
</sourcecode>
<t>As described in <xref target="verifier_verification"/>, Verifiers ignore all selectively
disclosable array elements for which they did not receive a Disclosure. In the
example above, the verification process would output an array with only one
element unless a matching Disclosure for the second element is received.</t>
</section>
</section>

<section anchor="decoy_digests"><name>Decoy Digests</name>
<t>An Issuer MAY add additional digests to the SD-JWT payload that are not associated with
any claim.  The purpose of such "decoy" digests is to make it more difficult for
an attacker to see the original number of claims contained in the SD-JWT. Decoy
digests MAY be added both to the <tt>_sd</tt> array for objects as well as in arrays.</t>
<t>It is RECOMMENDED to create the decoy digests by hashing over a
cryptographically secure random number. The bytes of the digest MUST then be
base64url-encoded as above. The same digest function as for the Disclosures MUST
be used.</t>
<t>For decoy digests, no Disclosure is sent to the Holder, i.e., the Holder will
see digests that do not correspond to any Disclosure. See
<xref target="decoy_digests_privacy"/> for additional privacy considerations.</t>
<t>To ensure readability and replicability, the examples in this specification do
not contain decoy digests unless explicitly stated. For an example
with decoy digests, see <xref target="example-simple_structured"/>.</t>
</section>
</section>

<section anchor="kb-jwt"><name>Key Binding JWT</name>
<t>This section defines the Key Binding JWT, which encodes a
signature over an SD-JWT by the Holder's private key.</t>
<t>The Key Binding JWT MUST be a JWT according to <xref target="RFC7519"/> and its payload MUST contain the following elements:</t>

<ul spacing="compact">
<li><t>in the JOSE header,</t>

<ul spacing="compact">
<li><tt>typ</tt>: REQUIRED. MUST be <tt>kb+jwt</tt>, which explicitly types the Key Binding JWT as recommended in Section 3.11 of <xref target="RFC8725"/>.</li>
<li><tt>alg</tt>: REQUIRED. A digital signature algorithm identifier such as per IANA "JSON Web Signature and Encryption Algorithms" registry. MUST NOT be <tt>none</tt>.</li>
</ul></li>
<li><t>in the JWT payload,</t>

<ul spacing="compact">
<li><tt>iat</tt>: REQUIRED. The value of this claim MUST be the time at which the Key Binding JWT was issued using the syntax defined in <xref target="RFC7519"/>.</li>
<li><tt>aud</tt>: REQUIRED. The intended receiver of the Key Binding JWT. How the value is represented is up to the protocol used and out of scope of this specification.</li>
<li><tt>nonce</tt>: REQUIRED. Ensures the freshness of the signature. The value type of this claim MUST be a string. How this value is obtained is up to the protocol used and out of scope of this specification.</li>
<li><tt>sd_hash</tt>: REQUIRED. The base64url-encoded hash value over the Issuer-signed JWT and the selected Disclosures as defined below.</li>
</ul></li>
</ul>

<section anchor="integrity-protection-of-the-presentation"><name>Binding to an SD-JWT</name>
<t>The hash value in the <tt>sd_hash</tt> claim binds the KB-JWT to the specific SD-JWT.
The <tt>sd_hash</tt> value MUST be taken over the US-ASCII bytes of the
encoded SD-JWT, i.e.,
the Issuer-signed JWT, a tilde character, and zero or more Disclosures selected
for presentation to the Verifier, each followed by a tilde character:</t>

<artwork><![CDATA[<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~
]]>
</artwork>
<t>The bytes of the digest MUST then be base64url-encoded.</t>
<t>The same hash algorithm as for the Disclosures MUST be used (defined by
the <tt>_sd_alg</tt> element in the Issuer-signed JWT or the default value, as defined
in <xref target="hash_function_claim"/>).</t>
</section>

<section anchor="validating-the-key-binding-jwt"><name>Validating the Key Binding JWT</name>
<t>The Verifier MUST ensure that the key with which it validates the signature on
the Key Binding JWT is the key specified in the SD-JWT as the Holder's public
key.  For example, if the SD-JWT contains a <tt>cnf</tt> value with a <tt>jwk</tt> member, the
Verifier could parse the provided JWK and use it to verify the Key Binding JWT.</t>
<t>Whether to require Key Binding is up to the Verifier's policy, based on the set
of trust requirements such as trust frameworks it belongs to. See
<xref target="key_binding_security"/> for security considerations.</t>
</section>
</section>
</section>

<section anchor="main-example"><name>Example SD-JWT</name>
<t>In this example, a simple SD-JWT is demonstrated. This example is split into issuance and presentation.</t>
<t>Note: Throughout the examples in this document, line breaks had to be added to
JSON strings and base64-encoded strings to adhere to the 72-character limit for
lines in RFCs and for readability. JSON does not allow line breaks within strings.</t>

<section anchor="issuance"><name>Issuance</name>
<t>The Issuer is using the following input claim set:</t>

<sourcecode type="json"><![CDATA[{
  "sub": "user_42",
  "given_name": "John",
  "family_name": "Doe",
  "email": "johndoe@example.com",
  "phone_number": "+1-202-555-0101",
  "phone_number_verified": true,
  "address": {
    "street_address": "123 Main St",
    "locality": "Anytown",
    "region": "Anystate",
    "country": "US"
  },
  "birthdate": "1940-01-01",
  "updated_at": 1570000000,
  "nationalities": [
    "US",
    "DE"
  ]
}
]]>
</sourcecode>
<t>The Issuer in this case made the following decisions:</t>

<ul spacing="compact">
<li>The <tt>nationalities</tt> array is always visible, but its contents are selectively disclosable.</li>
<li>The <tt>sub</tt> element and essential verification data (<tt>iss</tt>, <tt>iat</tt>, <tt>cnf</tt>, etc.) are always visible.</li>
<li>All other End-User claims are selectively disclosable.</li>
<li>For <tt>address</tt>, the Issuer is using a flat structure, i.e., all of the claims
in the <tt>address</tt> claim can only be disclosed in full. Other options are
discussed in <xref target="nested_data"/>.</li>
</ul>
<t>The following payload is used for the SD-JWT:</t>

<sourcecode type="json"><![CDATA[{
  "_sd": [
    "CrQe7S5kqBAHt-nMYXgc6bdt2SH5aTY1sU_M-PgkjPI",
    "JzYjH4svliH0R3PyEMfeZu6Jt69u5qehZo7F7EPYlSE",
    "PorFbpKuVu6xymJagvkFsFXAbRoc2JGlAUA2BA4o7cI",
    "TGf4oLbgwd5JQaHyKVQZU9UdGE0w5rtDsrZzfUaomLo",
    "XQ_3kPKt1XyX7KANkqVR6yZ2Va5NrPIvPYbyMvRKBMM",
    "XzFrzwscM6Gn6CJDc6vVK8BkMnfG8vOSKfpPIZdAfdE",
    "gbOsI4Edq2x2Kw-w5wPEzakob9hV1cRD0ATN3oQL9JM",
    "jsu9yVulwQQlhFlM_3JlzMaSFzglhQG0DpfayQwLUK4"
  ],
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "sub": "user_42",
  "nationalities": [
    {
      "...": "pFndjkZ_VCzmyTa6UjlZo3dh-ko8aIKQc9DlGzhaVYo"
    },
    {
      "...": "7Cf6JkPudry3lcbwHgeZ8khAv1U1OSlerP0VkBJrWZ0"
    }
  ],
  "_sd_alg": "sha-256",
  "cnf": {
    "jwk": {
      "kty": "EC",
      "crv": "P-256",
      "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc",
      "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ"
    }
  }
}
]]>
</sourcecode>
<t>The following Disclosures are created by the Issuer:</t>
<t><strong>Claim <tt>given_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>jsu9yVulwQQlhFlM_3JlzMaSFzglhQG0DpfayQwLUK4</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgImdpdmVuX25hbWUiLCAiSm9o</tt><br/>
<tt>biJd</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "given_name", "John"]</tt></li>
</ul>
<t><strong>Claim <tt>family_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>TGf4oLbgwd5JQaHyKVQZU9UdGE0w5rtDsrZzfUaomLo</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImZhbWlseV9uYW1lIiwgIkRv</tt><br/>
<tt>ZSJd</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "family_name", "Doe"]</tt></li>
</ul>
<t><strong>Claim <tt>email</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>JzYjH4svliH0R3PyEMfeZu6Jt69u5qehZo7F7EPYlSE</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgImVtYWlsIiwgImpvaG5kb2VA</tt><br/>
<tt>ZXhhbXBsZS5jb20iXQ</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "email", "johndoe@example.com"]</tt></li>
</ul>
<t><strong>Claim <tt>phone_number</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>PorFbpKuVu6xymJagvkFsFXAbRoc2JGlAUA2BA4o7cI</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgInBob25lX251bWJlciIsICIr</tt><br/>
<tt>MS0yMDItNTU1LTAxMDEiXQ</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "phone_number",</tt><br/>
<tt>"+1-202-555-0101"]</tt></li>
</ul>
<t><strong>Claim <tt>phone_number_verified</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>XQ_3kPKt1XyX7KANkqVR6yZ2Va5NrPIvPYbyMvRKBMM</tt></li>
<li>Disclosure:<br/>
<tt>WyJRZ19PNjR6cUF4ZTQxMmExMDhpcm9BIiwgInBob25lX251bWJlcl92ZXJp</tt><br/>
<tt>ZmllZCIsIHRydWVd</tt></li>
<li>Contents:
<tt>["Qg_O64zqAxe412a108iroA", "phone_number_verified", true]</tt></li>
</ul>
<t><strong>Claim <tt>address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>XzFrzwscM6Gn6CJDc6vVK8BkMnfG8vOSKfpPIZdAfdE</tt></li>
<li>Disclosure:<br/>
<tt>WyJBSngtMDk1VlBycFR0TjRRTU9xUk9BIiwgImFkZHJlc3MiLCB7InN0cmVl</tt><br/>
<tt>dF9hZGRyZXNzIjogIjEyMyBNYWluIFN0IiwgImxvY2FsaXR5IjogIkFueXRv</tt><br/>
<tt>d24iLCAicmVnaW9uIjogIkFueXN0YXRlIiwgImNvdW50cnkiOiAiVVMifV0</tt></li>
<li>Contents:
<tt>["AJx-095VPrpTtN4QMOqROA", "address", {"street_address":</tt><br/>
<tt>"123 Main St", "locality": "Anytown", "region": "Anystate",</tt><br/>
<tt>"country": "US"}]</tt></li>
</ul>
<t><strong>Claim <tt>birthdate</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>gbOsI4Edq2x2Kw-w5wPEzakob9hV1cRD0ATN3oQL9JM</tt></li>
<li>Disclosure:<br/>
<tt>WyJQYzMzSk0yTGNoY1VfbEhnZ3ZfdWZRIiwgImJpcnRoZGF0ZSIsICIxOTQw</tt><br/>
<tt>LTAxLTAxIl0</tt></li>
<li>Contents:
<tt>["Pc33JM2LchcU_lHggv_ufQ", "birthdate", "1940-01-01"]</tt></li>
</ul>
<t><strong>Claim <tt>updated_at</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>CrQe7S5kqBAHt-nMYXgc6bdt2SH5aTY1sU_M-PgkjPI</tt></li>
<li>Disclosure:<br/>
<tt>WyJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBIiwgInVwZGF0ZWRfYXQiLCAxNTcw</tt><br/>
<tt>MDAwMDAwXQ</tt></li>
<li>Contents:
<tt>["G02NSrQfjFXQ7Io09syajA", "updated_at", 1570000000]</tt></li>
</ul>
<t><strong>Array Entry</strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>pFndjkZ_VCzmyTa6UjlZo3dh-ko8aIKQc9DlGzhaVYo</tt></li>
<li>Disclosure:<br/>
<tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgIlVTIl0</tt></li>
<li>Contents:
<tt>["lklxF5jMYlGTPUovMNIvCA", "US"]</tt></li>
</ul>
<t><strong>Array Entry</strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>7Cf6JkPudry3lcbwHgeZ8khAv1U1OSlerP0VkBJrWZ0</tt></li>
<li>Disclosure:<br/>
<tt>WyJuUHVvUW5rUkZxM0JJZUFtN0FuWEZBIiwgIkRFIl0</tt></li>
<li>Contents:
<tt>["nPuoQnkRFq3BIeAm7AnXFA", "DE"]</tt></li>
</ul>
<t>The payload is then signed by the Issuer to create a JWT like the following:</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0.eyJfc2QiOiBb
IkNyUWU3UzVrcUJBSHQtbk1ZWGdjNmJkdDJTSDVhVFkxc1VfTS1QZ2tqUEkiLCAiSnpZ
akg0c3ZsaUgwUjNQeUVNZmVadTZKdDY5dTVxZWhabzdGN0VQWWxTRSIsICJQb3JGYnBL
dVZ1Nnh5bUphZ3ZrRnNGWEFiUm9jMkpHbEFVQTJCQTRvN2NJIiwgIlRHZjRvTGJnd2Q1
SlFhSHlLVlFaVTlVZEdFMHc1cnREc3JaemZVYW9tTG8iLCAiWFFfM2tQS3QxWHlYN0tB
TmtxVlI2eVoyVmE1TnJQSXZQWWJ5TXZSS0JNTSIsICJYekZyendzY002R242Q0pEYzZ2
Vks4QmtNbmZHOHZPU0tmcFBJWmRBZmRFIiwgImdiT3NJNEVkcTJ4Mkt3LXc1d1BFemFr
b2I5aFYxY1JEMEFUTjNvUUw5Sk0iLCAianN1OXlWdWx3UVFsaEZsTV8zSmx6TWFTRnpn
bGhRRzBEcGZheVF3TFVLNCJdLCAiaXNzIjogImh0dHBzOi8vaXNzdWVyLmV4YW1wbGUu
Y29tIiwgImlhdCI6IDE2ODMwMDAwMDAsICJleHAiOiAxOD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BIiwgInBob25lX251bWJlcl92ZXJpZmllZCIsIHRydWVd~WyJBSngt
MDk1VlBycFR0TjRRTU9xUk9BIiwgImFkZHJlc3MiLCB7InN0cmVldF9hZGRyZXNzIjog
IjEyMyBNYWluIFN0IiwgImxvY2FsaXR5IjogIkFueXRvd24iLCAicmVnaW9uIjogIkFu
eXN0YXRlIiwgImNvdW50cnkiOiAiVVMifV0~WyJQYzMzSk0yTGNoY1VfbEhnZ3ZfdWZR
IiwgImJpcnRoZGF0ZSIsICIxOTQwLTAxLTAxIl0~WyJHMDJOU3JRZmpGWFE3SW8wOXN5
YWpBIiwgInVwZGF0ZWRfYXQiLCAxNTcwMDAwMDAwXQ~WyJsa2x4RjVqTVlsR1RQVW92T
U5JdkNBIiwgIlVTIl0~WyJuUHVvUW5rUkZxM0JJZUFtN0FuWEZBIiwgIkRFIl0~
]]>
</sourcecode>
</section>

<section anchor="presentation"><name>Presentation</name>
<t>The following non-normative example shows an SD-JWT+KB as
it would be sent from the Holder to the Verifier. Note that it consists of six
tilde-separated parts, with the Issuer-signed JWT as shown above in the beginning,
four Disclosures (for the claims <tt>given_name</tt>, <tt>family_name</tt>, <tt>address</tt>, and
<tt>nationalities</tt>) in the middle, and the Key Binding JWT as the last element.</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0.eyJfc2QiOiBb
IkNyUWU3UzVrcUJBSHQtbk1ZWGdjNmJkdDJTSDVhVFkxc1VfTS1QZ2tqUEkiLCAiSnpZ
akg0c3ZsaUgwUjNQeUVNZmVadTZKdDY5dTVxZWhabzdGN0VQWWxTRSIsICJQb3JGYnBL
dVZ1Nnh5bUphZ3ZrRnNGWEFiUm9jMkpHbEFVQTJCQTRvN2NJIiwgIlRHZjRvTGJnd2Q1
SlFhSHlLVlFaVTlVZEdFMHc1cnREc3JaemZVYW9tTG8iLCAiWFFfM2tQS3QxWHlYN0tB
TmtxVlI2eVoyVmE1TnJQ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iOiAiVVMi
fV0~WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgImdpdmVuX25hbWUiLCAiSm9obiJd
~WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgIlVTIl0~eyJhbGciOiAiRVMyNTYiLCA
idHlwIjogImtiK2p3dCJ9.eyJub25jZSI6ICIxMjM0NTY3ODkwIiwgImF1ZCI6ICJodH
RwczovL3ZlcmlmaWVyLmV4YW1wbGUub3JnIiwgImlhdCI6IDE3MTgyOTg3NjYsICJzZF
9oYXNoIjogImEyWTh0bUhrUm9MQXFrWTlKMjR0aXhucWJNLVVxcFg2MUpJRm5BVDIxX2
sifQ.sqzbrv_SfCuI7yk3w7Hot82zFZiaWB-EH2GqsSi2-ZukcgP7z8DQGhPkSV97-WZ
r5hGm-nR0MmSDTXgmoFeViQ
]]>
</sourcecode>
<t>The following Key Binding JWT payload was created and signed for this presentation by the Holder:</t>

<sourcecode type="json"><![CDATA[{
  "nonce": "1234567890",
  "aud": "https://verifier.example.org",
  "iat": 1718298766,
  "sd_hash": "a2Y8tmHkRoLAqkY9J24tixnqbM-UqpX61JIFnAT21_k"
}
]]>
</sourcecode>
<t>If the Verifier did not require Key Binding, then the Holder could have
presented the SD-JWT with selected Disclosures directly, instead of encapsulating it in
an SD-JWT+KB.</t>
</section>
</section>

<section anchor="nested_data"><name>Considerations on Nested Data in SD-JWTs</name>
<t>Being JSON, an object in an SD-JWT payload MAY contain name-value pairs where the value is another object or objects MAY be elements in arrays. In SD-JWT, the Issuer decides for each claim individually, on each level of the JSON, whether the claim should be selectively disclosable or not. This choice can be made on each level independent from whether keys higher in the hierarchy are selectively disclosable.</t>
<t>From this it follows that the <tt>_sd</tt> key containing digests MAY appear multiple
times in an SD-JWT, and likewise, there MAY be multiple arrays within the
hierarchy with each having selectively disclosable elements. Digests of
selectively disclosable claims MAY even appear within other Disclosures.</t>
<t>The following examples illustrate some of the options an Issuer has. It is up to the Issuer to decide which structure to use, depending on, for example, the expected use cases for the SD-JWT, requirements for privacy, size considerations, or ecosystem requirements. For more examples with nested structures, see <xref target="example-simple_structured"/> and <xref target="example-complex-structured-sd-jwt"/>.</t>
<t>The following input claim set is used as an example throughout this section:</t>

<sourcecode type="json"><![CDATA[{
  "sub": "6c5c0a49-b589-431d-bae7-219122a9ec2c",
  "address": {
    "street_address": "Schulstr. 12",
    "locality": "Schulpforta",
    "region": "Sachsen-Anhalt",
    "country": "DE"
  }
}
]]>
</sourcecode>
<t>Important: The following examples of the structures are non-normative and are not intended to
represent all possible options. They are also not meant to define or restrict
how <tt>address</tt> can be represented in an SD-JWT.</t>

<section anchor="example-flat-sd-jwt"><name>Example: Flat SD-JWT</name>
<t>The Issuer can decide to treat the <tt>address</tt> claim as a block that can either be disclosed completely or not at all. The following example shows that in this case, the entire <tt>address</tt> claim is treated as an object in the Disclosure.</t>

<sourcecode type="json"><![CDATA[{
  "_sd": [
    "fOBUSQvo46yQO-wRwXBcGqvnbKIueISEL961_Sjd4do"
  ],
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "sub": "6c5c0a49-b589-431d-bae7-219122a9ec2c",
  "_sd_alg": "sha-256"
}
]]>
</sourcecode>
<t>The Issuer would create the following Disclosure:</t>
<t><strong>Claim <tt>address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>fOBUSQvo46yQO-wRwXBcGqvnbKIueISEL961_Sjd4do</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgImFkZHJlc3MiLCB7InN0cmVl</tt><br/>
<tt>dF9hZGRyZXNzIjogIlNjaHVsc3RyLiAxMiIsICJsb2NhbGl0eSI6ICJTY2h1</tt><br/>
<tt>bHBmb3J0YSIsICJyZWdpb24iOiAiU2FjaHNlbi1BbmhhbHQiLCAiY291bnRy</tt><br/>
<tt>eSI6ICJERSJ9XQ</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "address", {"street_address":</tt><br/>
<tt>"Schulstr. 12", "locality": "Schulpforta", "region":</tt><br/>
<tt>"Sachsen-Anhalt", "country": "DE"}]</tt></li>
</ul>
</section>

<section anchor="example-structured-sd-jwt"><name>Example: Structured SD-JWT</name>
<t>The Issuer may instead decide to make the <tt>address</tt> claim contents selectively disclosable individually:</t>

<sourcecode type="json"><![CDATA[{
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "sub": "6c5c0a49-b589-431d-bae7-219122a9ec2c",
  "address": {
    "_sd": [
      "6vh9bq-zS4GKM_7GpggVbYzzu6oOGXrmNVGPHP75Ud0",
      "9gjVuXtdFROCgRrtNcGUXmF65rdezi_6Er_j76kmYyM",
      "KURDPh4ZC19-3tiz-Df39V8eidy1oV3a3H1Da2N0g88",
      "WN9r9dCBJ8HTCsS2jKASxTjEyW5m5x65_Z_2ro2jfXM"
    ]
  },
  "_sd_alg": "sha-256"
}
]]>
</sourcecode>
<t>In this case, the Issuer would use the following data in the Disclosures for the <tt>address</tt> sub-claims:</t>
<t><strong>Claim <tt>street_address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>9gjVuXtdFROCgRrtNcGUXmF65rdezi_6Er_j76kmYyM</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgInN0cmVldF9hZGRyZXNzIiwg</tt><br/>
<tt>IlNjaHVsc3RyLiAxMiJd</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "street_address", "Schulstr. 12"]</tt></li>
</ul>
<t><strong>Claim <tt>locality</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>6vh9bq-zS4GKM_7GpggVbYzzu6oOGXrmNVGPHP75Ud0</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImxvY2FsaXR5IiwgIlNjaHVs</tt><br/>
<tt>cGZvcnRhIl0</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "locality", "Schulpforta"]</tt></li>
</ul>
<t><strong>Claim <tt>region</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>KURDPh4ZC19-3tiz-Df39V8eidy1oV3a3H1Da2N0g88</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgInJlZ2lvbiIsICJTYWNoc2Vu</tt><br/>
<tt>LUFuaGFsdCJd</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "region", "Sachsen-Anhalt"]</tt></li>
</ul>
<t><strong>Claim <tt>country</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>WN9r9dCBJ8HTCsS2jKASxTjEyW5m5x65_Z_2ro2jfXM</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgImNvdW50cnkiLCAiREUiXQ</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "country", "DE"]</tt></li>
</ul>
<t>The Issuer may also make one sub-claim of <tt>address</tt> non-selectively disclosable and hide only the other sub-claims:</t>

<sourcecode type="json"><![CDATA[{
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "sub": "6c5c0a49-b589-431d-bae7-219122a9ec2c",
  "address": {
    "_sd": [
      "6vh9bq-zS4GKM_7GpggVbYzzu6oOGXrmNVGPHP75Ud0",
      "9gjVuXtdFROCgRrtNcGUXmF65rdezi_6Er_j76kmYyM",
      "KURDPh4ZC19-3tiz-Df39V8eidy1oV3a3H1Da2N0g88"
    ],
    "country": "DE"
  },
  "_sd_alg": "sha-256"
}
]]>
</sourcecode>
<t>In this case there would be no Disclosure for <tt>country</tt> since it is provided in the clear.</t>
</section>

<section anchor="example-sd-jwt-with-recursive-disclosures"><name>Example: SD-JWT with Recursive Disclosures</name>
<t>The Issuer may also decide to make the <tt>address</tt> claim contents selectively disclosable recursively, i.e., the <tt>address</tt> claim is made selectively disclosable as well as its sub-claims:</t>

<sourcecode type="json"><![CDATA[{
  "_sd": [
    "HvrKX6fPV0v9K_yCVFBiLFHsMaxcD_114Em6VT8x1lg"
  ],
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "sub": "6c5c0a49-b589-431d-bae7-219122a9ec2c",
  "_sd_alg": "sha-256"
}
]]>
</sourcecode>
<t>The Issuer creates Disclosures first for the sub-claims and then includes their digests in the Disclosure for the <tt>address</tt> claim:</t>
<t><strong>Claim <tt>street_address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>9gjVuXtdFROCgRrtNcGUXmF65rdezi_6Er_j76kmYyM</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgInN0cmVldF9hZGRyZXNzIiwg</tt><br/>
<tt>IlNjaHVsc3RyLiAxMiJd</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "street_address", "Schulstr. 12"]</tt></li>
</ul>
<t><strong>Claim <tt>locality</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>6vh9bq-zS4GKM_7GpggVbYzzu6oOGXrmNVGPHP75Ud0</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImxvY2FsaXR5IiwgIlNjaHVs</tt><br/>
<tt>cGZvcnRhIl0</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "locality", "Schulpforta"]</tt></li>
</ul>
<t><strong>Claim <tt>region</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>KURDPh4ZC19-3tiz-Df39V8eidy1oV3a3H1Da2N0g88</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgInJlZ2lvbiIsICJTYWNoc2Vu</tt><br/>
<tt>LUFuaGFsdCJd</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "region", "Sachsen-Anhalt"]</tt></li>
</ul>
<t><strong>Claim <tt>country</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>WN9r9dCBJ8HTCsS2jKASxTjEyW5m5x65_Z_2ro2jfXM</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgImNvdW50cnkiLCAiREUiXQ</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "country", "DE"]</tt></li>
</ul>
<t><strong>Claim <tt>address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>HvrKX6fPV0v9K_yCVFBiLFHsMaxcD_114Em6VT8x1lg</tt></li>
<li>Disclosure:<br/>
<tt>WyJRZ19PNjR6cUF4ZTQxMmExMDhpcm9BIiwgImFkZHJlc3MiLCB7Il9zZCI6</tt><br/>
<tt>IFsiNnZoOWJxLXpTNEdLTV83R3BnZ1ZiWXp6dTZvT0dYcm1OVkdQSFA3NVVk</tt><br/>
<tt>MCIsICI5Z2pWdVh0ZEZST0NnUnJ0TmNHVVhtRjY1cmRlemlfNkVyX2o3Nmtt</tt><br/>
<tt>WXlNIiwgIktVUkRQaDRaQzE5LTN0aXotRGYzOVY4ZWlkeTFvVjNhM0gxRGEy</tt><br/>
<tt>TjBnODgiLCAiV045cjlkQ0JKOEhUQ3NTMmpLQVN4VGpFeVc1bTV4NjVfWl8y</tt><br/>
<tt>cm8yamZYTSJdfV0</tt></li>
<li>Contents:
<tt>["Qg_O64zqAxe412a108iroA", "address", {"_sd":</tt><br/>
<tt>["6vh9bq-zS4GKM_7GpggVbYzzu6oOGXrmNVGPHP75Ud0",</tt><br/>
<tt>"9gjVuXtdFROCgRrtNcGUXmF65rdezi_6Er_j76kmYyM",</tt><br/>
<tt>"KURDPh4ZC19-3tiz-Df39V8eidy1oV3a3H1Da2N0g88",</tt><br/>
<tt>"WN9r9dCBJ8HTCsS2jKASxTjEyW5m5x65_Z_2ro2jfXM"]}]</tt></li>
</ul>
</section>
</section>

<section anchor="verification-1"><name>Verification and Processing</name>

<section anchor="sd_jwt_verification"><name>Verification of the SD-JWT</name>
<t>Upon receiving an SD-JWT, either directly or as a component of an SD-JWT+KB, a Holder
or a Verifier needs to ensure that:</t>

<ul spacing="compact">
<li>the Issuer-signed JWT is valid, i.e., it is signed by the Issuer and the signature is valid, and</li>
<li>all Disclosures are valid and correspond to a respective digest value in the Issuer-signed JWT (directly in the payload or recursively included in the contents of other Disclosures).</li>
</ul>
<t>The Holder or the Verifier MUST perform the following (or equivalent) steps when receiving
an SD-JWT:</t>

<ol spacing="compact">
<li>Separate the SD-JWT into the Issuer-signed JWT and the Disclosures (if any).</li>
<li><t>Validate the Issuer-signed JWT:</t>

<ol spacing="compact">
<li>Ensure that a signing algorithm was used that was deemed secure for the application. Refer to <xref target="RFC8725"/>, Sections 3.1 and 3.2 for details. The <tt>none</tt> algorithm MUST NOT be accepted.</li>
<li>Validate the signature over the Issuer-signed JWT per Section 5.2 of <xref target="RFC7515"/>.</li>
<li>Validate the Issuer and that the signing key belongs to this Issuer.</li>
<li>Check that the <tt>_sd_alg</tt> claim value is understood and the hash algorithm is deemed secure (see <xref target="hash_function_claim"/>).</li>
</ol></li>
<li><t>Process the Disclosures and embedded digests in the Issuer-signed JWT as follows:</t>

<ol spacing="compact">
<li><t>For each Disclosure provided:</t>

<ol spacing="compact">
<li>Calculate the digest over the base64url-encoded string as described in <xref target="hashing_disclosures"/>.</li>
</ol></li>
<li><t>(*) Identify all embedded digests in the Issuer-signed JWT as follows:</t>

<ol spacing="compact">
<li>Find all objects having an <tt>_sd</tt> key that refers to an array of strings.</li>
<li>Find all array elements that are objects with one key, that key being <tt>...</tt> and referring to a string.</li>
</ol></li>
<li><t>(**) For each embedded digest found in the previous step:</t>

<ol spacing="compact">
<li>Compare the value with the digests calculated previously and find the matching Disclosure. If no such Disclosure can be found, the digest MUST be ignored.</li>
<li><t>If the digest was found in an object's <tt>_sd</tt> key:</t>

<ol spacing="compact">
<li>If the contents of the respective Disclosure is not a JSON-encoded array of three elements (salt, claim name, claim value), the SD-JWT MUST be rejected.</li>
<li>If the claim name is <tt>_sd</tt> or <tt>...</tt>, the SD-JWT MUST be rejected.</li>
<li>If the claim name already exists at the level of the <tt>_sd</tt> key, the SD-JWT MUST be rejected.</li>
<li>Insert, at the level of the <tt>_sd</tt> key, a new claim using the claim name and claim value from the Disclosure.</li>
<li>Recursively process the value using the steps described in (*) and (**).</li>
</ol></li>
<li><t>If the digest was found in an array element:</t>

<ol spacing="compact">
<li>If the contents of the respective Disclosure is not a JSON-encoded array of two elements (salt, value), the SD-JWT MUST be rejected.</li>
<li>Replace the array element with the value from the Disclosure.</li>
<li>Recursively process the value using the steps described in (*) and (**).</li>
</ol></li>
</ol></li>
<li>Remove all array elements for which the digest was not found in the previous step.</li>
<li>Remove all <tt>_sd</tt> keys and their contents from the Issuer-signed JWT payload. If this results in an object with no properties, it should be represented as an empty object <tt>{}</tt>.</li>
<li>Remove the claim <tt>_sd_alg</tt> from the SD-JWT payload.</li>
</ol></li>
<li>If any digest value is encountered more than once in the Issuer-signed JWT payload (directly or recursively via other Disclosures), the SD-JWT MUST be rejected.</li>
<li>If any Disclosure was not referenced by digest value in the Issuer-signed JWT (directly or recursively via other Disclosures), the SD-JWT MUST be rejected.</li>
<li>Check that the SD-JWT is valid using claims such as <tt>nbf</tt>, <tt>iat</tt>, and <tt>exp</tt> in the processed payload. If a required validity-controlling claim is missing (see <xref target="sd-validity-claims"/>), the SD-JWT MUST be rejected.</li>
</ol>
<t>If any step fails, the SD-JWT is not valid and processing MUST be aborted.</t>
<t>It is up to the Holder how to maintain the mapping between the Disclosures and the plaintext claim values to be able to display them to the End-User when needed.</t>
</section>

<section anchor="holder_verification"><name>Processing by the Holder</name>
<t>The Issuer MUST provide the Holder an SD-JWT, not an SD-JWT+KB.  If the Holder
receives an SD-JWT+KB, it SHOULD be rejected.</t>
<t>For presentation to a Verifier, the Holder MUST perform the following (or equivalent) steps:</t>

<ol spacing="compact">
<li>Decide which Disclosures to release to the Verifier, obtaining proper End-User consent if necessary.</li>
<li>Assemble the SD-JWT, including the Issuer-signed JWT and the selected Disclosures (see <xref target="data_formats"/> for the format).</li>
<li><t>If Key Binding is not required:</t>

<ol spacing="compact">
<li>Send the SD-JWT to the Verifier.</li>
</ol></li>
<li><t>If Key Binding is required:</t>

<ol spacing="compact">
<li>Create a Key Binding JWT tied to the SD-JWT.</li>
<li>Assemble the SD-JWT+KB by concatenating the SD-JWT and the Key Binding JWT.</li>
<li>Send the SD-JWT+KB to the Verifier.</li>
</ol></li>
</ol>
</section>

<section anchor="verifier_verification"><name>Verification by the Verifier</name>
<t>Upon receiving a presentation from a Holder, in the form of either an SD-JWT or
an SD-JWT+KB, in addition to the checks outlined in <xref target="sd_jwt_verification"/>, Verifiers need to ensure that</t>

<ul spacing="compact">
<li>if Key Binding is required, then the Holder has provided an SD-JWT+KB, and</li>
<li>the Key Binding JWT is signed by the Holder and valid.</li>
</ul>
<t>To this end, Verifiers MUST follow the following steps (or equivalent):</t>

<ol spacing="compact">
<li>Determine if Key Binding is to be checked according to the Verifier's policy
for the use case at hand. This decision MUST NOT be based on whether
a Key Binding JWT is provided by the Holder or not. Refer to <xref target="key_binding_security"/> for
details.</li>
<li>If Key Binding is required and the Holder has provided an SD-JWT (without Key Binding), the Verifier MUST reject the presentation.</li>
<li>If the Holder has provided an SD-JWT+KB, parse it into an SD-JWT and a Key Binding JWT.</li>
<li>Process the SD-JWT as defined in <xref target="sd_jwt_verification"/>.</li>
<li><t>If Key Binding is required:</t>

<ol spacing="compact">
<li>Determine the public key for the Holder from the SD-JWT (see <xref target="key_binding"/>).</li>
<li>Ensure that a signing algorithm was used that was deemed secure for the application. Refer to <xref target="RFC8725"/>, Sections 3.1 and 3.2 for details. The <tt>none</tt> algorithm MUST NOT be accepted.</li>
<li>Validate the signature over the Key Binding JWT per Section 5.2 of <xref target="RFC7515"/>.</li>
<li>Check that the <tt>typ</tt> of the Key Binding JWT is <tt>kb+jwt</tt> (see <xref target="kb-jwt"/>).</li>
<li>Check that the creation time of the Key Binding JWT, as determined by the <tt>iat</tt> claim, is within an acceptable window.</li>
<li>Determine that the Key Binding JWT is bound to the current transaction and was created for this Verifier (replay protection) by validating <tt>nonce</tt> and <tt>aud</tt> claims.</li>
<li>Calculate the digest over the Issuer-signed JWT and Disclosures as defined in <xref target="integrity-protection-of-the-presentation"/> and verify that it matches the value of the <tt>sd_hash</tt> claim in the Key Binding JWT.</li>
<li>Check that the Key Binding JWT is a valid JWT in all other respects, per <xref target="RFC7519"/> and <xref target="RFC8725"/>.</li>
</ol></li>
</ol>
<t>If any step fails, the presentation is not valid and processing MUST be aborted.</t>
<t>Otherwise, the processed SD-JWT payload can be passed to the application to be used for the intended purpose.</t>
</section>
</section>

<section anchor="json_serialization"><name>JWS JSON Serialization</name>
<t>This section describes an alternative format for SD-JWTs and SD-JWT+KBs using the JWS JSON
Serialization from <xref target="RFC7515"/>. Supporting this format is OPTIONAL.</t>

<section anchor="json_serialization_unprotected_headers"><name>New Unprotected Header Parameters</name>
<t>For both the General and Flattened JSON Serialization, the SD-JWT or SD-JWT+KB is represented
as a JSON object according to Section 7.2 of <xref target="RFC7515"/>. The following new
unprotected header parameters are defined:</t>

<ul spacing="compact">
<li><tt>disclosures</tt>: An array of strings where each element is an individual
Disclosure as described in <xref target="creating_disclosures"/>.</li>
<li><tt>kb_jwt</tt>: Present only in an SD-JWT+KB, the Key Binding JWT as described in <xref target="kb-jwt"/>.</li>
</ul>
<t>In an SD-JWT+KB, <tt>kb_jwt</tt> MUST be present when using the JWS JSON Serialization,
and the digest in the <tt>sd_hash</tt> claim MUST be taken over the SD-JWT as described
in <xref target="integrity-protection-of-the-presentation"/>. This means that even when using
the JWS JSON Serialization, the representation as a regular SD-JWT MUST be
created temporarily to calculate the digest. In detail, the SD-JWT part is built
by concatenating the protected header, the payload, and the signature of the JWS
JSON serialized SD-JWT using a <tt>.</tt> character as a separator, and using the
Disclosures from the <tt>disclosures</tt> member of the unprotected header.</t>
<t>Unprotected headers other than <tt>disclosures</tt> are not covered by the digest, and
therefore, as usual, are not protected against tampering.</t>
</section>

<section anchor="flattened-json-serialization"><name>Flattened JSON Serialization</name>
<t>In case of the Flattened JSON Serialization, there is only one unprotected
header.</t>
<t>The following is a non-normative example of a JWS JSON serialized SD-JWT as
issued using the Flattened JSON Serialization:</t>

<sourcecode type="json"><![CDATA[{
  "header": {
    "disclosures": [
      "WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgInN1YiIsICJqb2huX2RvZV80M
        iJd",
      "WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImdpdmVuX25hbWUiLCAiSm9ob
        iJd",
      "WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgImZhbWlseV9uYW1lIiwgIkRvZ
        SJd",
      "WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgImJpcnRoZGF0ZSIsICIxOTQwL
        TAxLTAxIl0"
    ]
  },
  "payload": "eyJfc2QiOiBbIjRIQm42YUlZM1d0dUdHV1R4LXFVajZjZGs2V0JwWn
    lnbHRkRmF2UGE3TFkiLCAiOHNtMVFDZjAyMXBObkhBQ0k1c1A0bTRLWmd5Tk9PQV
    ljVGo5SE5hQzF3WSIsICJjZ0ZkaHFQbzgzeFlObEpmYWNhQ2FhN3VQOVJDUjUwVk
    U1UjRMQVE5aXFVIiwgImpNQ1hWei0tOWI4eDM3WWNvRGZYUWluencxd1pjY2NmRl
    JCQ0ZHcWRHMm8iXSwgImlzcyI6ICJodHRwczovL2lzc3Vlci5leGFtcGxlLmNvbS
    IsICJpYXQiOiAxNjgzMDAwMDAwLCAiZXhwIjogMTg4MzAwMDAwMCwgIl9zZF9hbG
    ciOiAic2hhLTI1NiIsICJjbmYiOiB7Imp3ayI6IHsia3R5IjogIkVDIiwgImNydi
    I6ICJQLTI1NiIsICJ4IjogIlRDQUVSMTladnUzT0hGNGo0VzR2ZlNWb0hJUDFJTG
    lsRGxzN3ZDZUdlbWMiLCAieSI6ICJaeGppV1diWk1RR0hWV0tWUTRoYlNJaXJzVm
    Z1ZWNDRTZ0NGpUOUYySFpRIn19fQ",
  "protected":
    "eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0",
  "signature": "warLAZGlbNiUwR1fbEo-VpyOINYjUPWQrq_Klnutf55JizVWyFAc
    xm7x_cutT39JBr3ieOhfCfZhWuBtSwyVmA"
}
]]>
</sourcecode>
<t>The following is an SD-JWT+KB with two Disclosures:</t>

<sourcecode type="json"><![CDATA[{
  "header": {
    "disclosures": [
      "WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgImZhbWlseV9uYW1lIiwgIkRvZ
        SJd",
      "WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImdpdmVuX25hbWUiLCAiSm9ob
        iJd"
    ],
    "kb_jwt": "eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImtiK2p3dCJ9.eyJub25j
      ZSI6ICIxMjM0NTY3ODkwIiwgImF1ZCI6ICJodHRwczovL3ZlcmlmaWVyLmV4YW
      1wbGUub3JnIiwgImlhdCI6IDE3MTgyOTg3NjYsICJzZF9oYXNoIjogIjh2cWMx
      WVAyZ1BwdnBvVXVXS25FUC1laVU2dUtUYlJXdWpLWmdpc0V4clEifQ.fqydeQ2
      vbc1fQ0mOJ0fnpunxBQ2SgGpM4FQICquHJjU0QYqfc6Uo2kbzOOX-_zQ51pIiH
      GrOM1tswWBRjNkKxw"
  },
  "payload": "eyJfc2QiOiBbIjRIQm42YUlZM1d0dUdHV1R4LXFVajZjZGs2V0JwWn
    lnbHRkRmF2UGE3TFkiLCAiOHNtMVFDZjAyMXBObkhBQ0k1c1A0bTRLWmd5Tk9PQV
    ljVGo5SE5hQzF3WSIsICJjZ0ZkaHFQbzgzeFlObEpmYWNhQ2FhN3VQOVJDUjUwVk
    U1UjRMQVE5aXFVIiwgImpNQ1hWei0tOWI4eDM3WWNvRGZYUWluencxd1pjY2NmRl
    JCQ0ZHcWRHMm8iXSwgImlzcyI6ICJodHRwczovL2lzc3Vlci5leGFtcGxlLmNvbS
    IsICJpYXQiOiAxNjgzMDAwMDAwLCAiZXhwIjogMTg4MzAwMDAwMCwgIl9zZF9hbG
    ciOiAic2hhLTI1NiIsICJjbmYiOiB7Imp3ayI6IHsia3R5IjogIkVDIiwgImNydi
    I6ICJQLTI1NiIsICJ4IjogIlRDQUVSMTladnUzT0hGNGo0VzR2ZlNWb0hJUDFJTG
    lsRGxzN3ZDZUdlbWMiLCAieSI6ICJaeGppV1diWk1RR0hWV0tWUTRoYlNJaXJzVm
    Z1ZWNDRTZ0NGpUOUYySFpRIn19fQ",
  "protected":
    "eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0",
  "signature": "warLAZGlbNiUwR1fbEo-VpyOINYjUPWQrq_Klnutf55JizVWyFAc
    xm7x_cutT39JBr3ieOhfCfZhWuBtSwyVmA"
}
]]>
</sourcecode>
</section>

<section anchor="general-json-serialization"><name>General JSON Serialization</name>
<t>In case of the General JSON Serialization, there are multiple unprotected
headers (one per signature). If present, <tt>disclosures</tt> and <tt>kb_jwt</tt>, MUST be
included in the first unprotected header and MUST NOT be present in any
following unprotected headers.</t>
<t>The following is a non-normative example of a presentation of a JWS JSON
serialized SD-JWT including a Key Binding JWT using the General JSON
Serialization:</t>

<sourcecode type="json"><![CDATA[{
  "payload": "eyJfc2QiOiBbIjRIQm42YUlZM1d0dUdHV1R4LXFVajZjZGs2V0JwWn
    lnbHRkRmF2UGE3TFkiLCAiOHNtMVFDZjAyMXBObkhBQ0k1c1A0bTRLWmd5Tk9PQV
    ljVGo5SE5hQzF3WSIsICJjZ0ZkaHFQbzgzeFlObEpmYWNhQ2FhN3VQOVJDUjUwVk
    U1UjRMQVE5aXFVIiwgImpNQ1hWei0tOWI4eDM3WWNvRGZYUWluencxd1pjY2NmRl
    JCQ0ZHcWRHMm8iXSwgImlzcyI6ICJodHRwczovL2lzc3Vlci5leGFtcGxlLmNvbS
    IsICJpYXQiOiAxNjgzMDAwMDAwLCAiZXhwIjogMTg4MzAwMDAwMCwgIl9zZF9hbG
    ciOiAic2hhLTI1NiIsICJjbmYiOiB7Imp3ayI6IHsia3R5IjogIkVDIiwgImNydi
    I6ICJQLTI1NiIsICJ4IjogIlRDQUVSMTladnUzT0hGNGo0VzR2ZlNWb0hJUDFJTG
    lsRGxzN3ZDZUdlbWMiLCAieSI6ICJaeGppV1diWk1RR0hWV0tWUTRoYlNJaXJzVm
    Z1ZWNDRTZ0NGpUOUYySFpRIn19fQ",
  "signatures": [
    {
      "header": {
        "disclosures": [
          "WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgImZhbWlseV9uYW1lIiwgI
            kRvZSJd",
          "WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImdpdmVuX25hbWUiLCAiS
            m9obiJd"
        ],
        "kid": "issuer-key-1",
        "kb_jwt": "eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImtiK2p3dCJ9.eyJu
          b25jZSI6ICIxMjM0NTY3ODkwIiwgImF1ZCI6ICJodHRwczovL3ZlcmlmaW
          VyLmV4YW1wbGUub3JnIiwgImlhdCI6IDE3MTgyOTg3NjYsICJzZF9oYXNo
          IjogImJ0UUVxRjlhUWp2VjNfNDVfVmczZ2p2UlB3MThYLUpHUVNjX25fWX
          dNYkkifQ.A6vjVAGV6YoGL1lmIrLj_QDNauipb1-NkNym43Vq610s7kBmz
          R_62i8UHD8JVZPlIrWc_-Twhleqplt08UECJQ"
      },
      "protected":
        "eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0",
      "signature": "QUE5TWvbcB2f6TAibj3yg9z_hOKJFNgI1-Df8JWQHj3hGCJw
        OJ7sOSTSRmt5OBBc4awg03nEIJP9_dJPVmYbZQ"
    },
    {
      "header": {
        "kid": "issuer-key-2"
      },
      "protected":
        "eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0",
      "signature": "JdK1CGTT6CoGZHmKnoSjWZL-sLvvoEXR62_h_WAq5jy80rOk
        JxA-AuIXZMVtTRnzm8reluIwAOV83p6bnT_GXg"
    }
  ]
}
]]>
</sourcecode>
</section>

<section anchor="verification-of-the-jws-json-serialized-sd-jwt"><name>Verification of the JWS JSON Serialized SD-JWT</name>
<t>Verification of the JWS JSON serialized SD-JWT follows the rules defined in
<xref target="verification"/>, except for the following aspects:</t>

<ul spacing="compact">
<li>The SD-JWT or SD-JWT+KB does not need to be split into component parts and the Disclosures
can be found in the <tt>disclosures</tt> member of the unprotected header.</li>
<li>To verify the digest in <tt>sd_hash</tt> in the Key Binding JWT of an SD-JWT+KB, the Verifier MUST
assemble the string to be hashed as described in
<xref target="json_serialization_unprotected_headers"/>.</li>
</ul>
</section>
</section>

<section anchor="security_considerations"><name>Security Considerations</name>
<t>Security considerations in this section help achieve the following properties:</t>
<t><strong>Selective Disclosure:</strong> An adversary in the role of the Verifier cannot obtain
information from an SD-JWT about any claim name or claim value that was not
explicitly disclosed by the Holder unless that information can be derived from
other disclosed claims or sources other than the presented SD-JWT.</t>
<t><strong>Integrity:</strong> A malicious Holder cannot modify names or values of selectively disclosable claims without detection by the Verifier.</t>
<t>Additionally, as described in <xref target="key_binding_security"/>, the application of Key Binding can ensure that the presenter of an SD-JWT credential is the legitimate Holder of the credential.</t>

<section anchor="sec-is-jwt"><name>Mandatory Signing of the Issuer-signed JWT</name>
<t>The Issuer-signed JWT MUST be signed by the Issuer to protect integrity of the issued
claims. An attacker can modify or add claims if this JWT is not signed (e.g.,
change the "email" attribute to take over the victim's account or add an
attribute indicating a fake academic qualification).</t>
<t>The Verifier MUST always check the signature of the Issuer-signed JWT to ensure that it
has not been tampered with since the issuance. The Issuer-signed JWT MUST be rejected if the signature cannot be verified.</t>
<t>The security of the Issuer-signed JWT depends on the security of the signature algorithm.
Any of the JWS asymmetric digital signature algorithms registered in <xref target="IANA.JWS.Algorithms"/>
can be used, including post-quantum algorithms, when they are ready.</t>
</section>

<section anchor="sec-disclosures"><name>Manipulation of Disclosures</name>
<t>Holders can manipulate the Disclosures by changing the values of the claims
before sending them to the Verifier. The Verifier MUST check the Disclosures to
ensure that the values of the claims are correct, i.e., the digests of the Disclosures are actually present in the signed SD-JWT.</t>
<t>A naive Verifier that extracts
all claim values from the Disclosures (without checking the hashes) and inserts them into the SD-JWT payload
is vulnerable to this attack. However, in a structured SD-JWT, without comparing the digests of the
Disclosures, such an implementation could not determine the correct place in a
nested object where a claim needs to be inserted. Therefore, the naive implementation
would not only be insecure, but also incorrect.</t>
<t>The steps described in <xref target="verifier_verification"/> ensure that the Verifier
checks the Disclosures correctly.</t>
</section>

<section anchor="salt-entropy"><name>Entropy of the salt</name>
<t>The security model that conceals the plaintext claims relies on the high entropy
random data of the salt as additional input to the hash function. The randomness
ensures that the same plaintext claim value does not produce the same digest value. It also
makes it infeasible to guess the preimage of the digest (thereby learning the
plaintext claim value) by enumerating the potential value
space for a claim into the hash function to search for a matching digest value.
It is therefore vitally important that unrevealed salts cannot be learned or guessed,
even if other salts have been revealed. As such, each salt MUST be created
in such a manner that it is cryptographically random, sufficiently long, and
has high enough entropy that it is infeasible to guess. A
new salt MUST be chosen for each claim independently of other salts.
See Randomness Requirements for Security <xref target="RFC4086"/> for considerations
on generating random values.</t>
<t>The RECOMMENDED minimum length of the randomly-generated portion of the salt is 128 bits.</t>
<t>The Issuer MUST ensure that a new salt value is chosen for each claim,
including when the same claim name occurs at different places in the
structure of the SD-JWT. This can be seen in the example in <xref target="example-complex-structured-sd-jwt"/>,
where multiple claims with the name <tt>type</tt> appear, but each of them has
a different salt.</t>
</section>

<section anchor="choice-of-a-hash-algorithm"><name>Choice of a Hash Algorithm</name>
<t>To ensure privacy of claims that are selectively disclosable, but are not being disclosed in a given presentation,
the hash function MUST ensure that it is infeasible to calculate any portion of the three elements
(salt, claim name, claim value) from a particular digest. This implies the hash function MUST
be preimage resistant, but should also not allow an observer to infer any partial information about
the undisclosed content. In the terminology of cryptographic commitment schemes, the hash function
MUST be computationally hiding.</t>
<t>To ensure the integrity of selectively disclosable claims, the hash function MUST be second-preimage
resistant. That is, for any combination of salt, claim name and claim value, it is infeasible to find a different combination of salt,
claim name and claim value that result in the same digest.</t>
<t>The hash function SHOULD also be collision resistant. Although not essential to the anticipated uses of
SD-JWT, without collision resistance an Issuer may be able to find multiple disclosures that have the
same hash value. In which case, the signature over the SD-JWT would not then commit the Issuer to the contents of the
JWT. The collision resistance of the hash function used to generate digests SHOULD
match the collision resistance of the hash function used by the signature scheme. For example, use of
the ES512 signature algorithm would require a disclosure hash function with at least 256-bit collision
resistance, such as SHA-512.</t>
<t>Note that inclusion in the "Named Information Hash Algorithm" registry <xref target="IANA.Hash.Algorithms"/>
alone does not indicate a hash algorithm's suitability for use in SD-JWT (it contains several
heavily truncated digests, such as <tt>sha-256-32</tt> and <tt>sha-256-64</tt>, which are unfit for security
applications).</t>
<t>Furthermore, the hash algorithms MD2, MD4, MD5, and SHA-1
revealed fundamental weaknesses and MUST NOT be used.</t>
</section>

<section anchor="key_binding_security"><name>Key Binding</name>
<t>Key Binding aims to ensure that the presenter of an SD-JWT credential is actually the legitimate Holder of the credential.
An SD-JWT compatible with Key Binding contains a public key, or a reference to a public key, that corresponds to a private key possessed by the Holder.
The Verifier requires that the Holder prove possession of that private key when presenting the SD-JWT credential.</t>
<t>Without Key Binding, a Verifier only gets the proof that the
credential was issued by a particular Issuer, but the credential itself
can be replayed by anyone who gets access to it. This means that, for
example, after a credential was leaked to an attacker, the attacker can
present the credential to any verifier that does not require a
binding. But also a malicious Verifier to which the Holder presented the
credential can present the credential to another Verifier if that other
Verifier does not require Key Binding.</t>
<t>Verifiers MUST decide whether Key Binding is required for a
particular use case before verifying a credential. This decision
can be informed by various factors including, but not limited to the following:
business requirements, the use case, the type of
binding between a Holder and its credential that is required for a use
case, the sensitivity of the use case, the expected properties of a
credential, the type and contents of other credentials expected to be
presented at the same time, etc.</t>
<t>It is important that a Verifier does not make its security policy
decisions based on data that can be influenced by an attacker. For this reason, when deciding whether Key
Binding is required or not, Verifiers MUST NOT take into account
whether the Holder has provided an SD-JWT+KB or a bare SD-JWT, since otherwise an
attacker could strip the KB-JWT from an SD-JWT+KB and present the resulting SD-JWT.</t>
<t>Furthermore, Verifiers should be aware that Key Binding information may have been added to an SD-JWT in a format that they do not recognize and therefore may not be able to tell whether the SD-JWT supports Key Binding or not.</t>
<t>If a Verifier determines that Key Binding is required for a
particular use case and the Holder presents either a bare SD-JWT or an SD-JWT+KB with
an invalid Key Binding JWT, then the Verifier will reject the presentation
when following the verification steps described in <xref target="verifier_verification"/>.</t>
</section>

<section anchor="blinding-claim-names"><name>Blinding Claim Names</name>
<t>SD-JWT ensures that names of claims that are selectively disclosable are
always blinded. This prevents an attacker from learning the names of the
disclosable claims. However, the names of the claims that are not
disclosable are not blinded. This includes the keys of objects that themselves
are not blinded, but contain disclosable claims. This limitation
needs to be taken into account by Issuers when creating the structure of
the SD-JWT.</t>
</section>

<section anchor="sd-validity-claims"><name>Selectively-Disclosable Validity Claims</name>
<t>An Issuer MUST NOT allow any content to be selectively disclosable that is critical for evaluating the
SD-JWT's authenticity or validity.
The exact list of such content will depend on the application
and SHOULD be listed by any application-specific profile of SD-JWT.
The following is a list of registered JWT claim names that SHOULD be considered as
security-critical:</t>

<ul spacing="compact">
<li><tt>iss</tt> (Issuer)</li>
<li><tt>aud</tt> (Audience), although issuers MAY allow individual entries in the array to be selectively disclosable</li>
<li><tt>exp</tt> (Expiration Time)</li>
<li><tt>nbf</tt> (Not Before)</li>
<li><tt>cnf</tt> (Confirmation Key)</li>
</ul>
<t>Issuers will typically include claims controlling the validity of the SD-JWT
in plaintext in the SD-JWT payload, but there is no guarantee they would do so. Therefore, Verifiers cannot
reliably depend on that and need to operate as though security-critical claims might be
selectively disclosable.</t>
<t>Verifiers therefore MUST ensure that all claims they deem necessary for checking
the validity of an SD-JWT in the given context are present (or disclosed, respectively) during
validation of the SD-JWT. This is implemented in the last
step of the verification defined in <xref target="sd_jwt_verification"/>.</t>
<t>The precise set of required validity claims will typically be defined by
ecosystem rules, application-specific profile, or the credential format and MAY include claims other than
those listed herein.</t>
</section>

<section anchor="issuer_signature_key_distribution"><name>Issuer Signature Key Distribution and Rotation</name>
<t>This specification does not define how signature verification keys of
Issuers are distributed to Verifiers. However, it is RECOMMENDED that
Issuers publish their keys in a way that allows for efficient and secure
key rotation and revocation, for example, by publishing keys at a
predefined location using the JSON Web Key Set (JWKS) format <xref target="RFC7517"/>.
Verifiers need to ensure that they are not using expired or revoked keys
for signature verification using reasonable and appropriate means for the given
key-distribution method.</t>
</section>

<section anchor="forwarding-credentials"><name>Forwarding Credentials</name>
<t>Any entity in possession of an SD-JWT (including an SD-JWT extracted from an SD-JWT+KB) can forward it to any third party
that does not enforce Key Binding.
When doing so, that entity may remove Disclosures such that the receiver
learns only a subset of the claims contained in the original SD-JWT.</t>
<t>For example, a device manufacturer might produce an SD-JWT
containing information about upstream and downstream supply chain contributors.
Each supply chain party can verify only the claims that were selectively disclosed to them
by an upstream party, and they can choose to further reduce the disclosed claims
when presenting to a downstream party.</t>
<t>In some scenarios this behavior could be desirable,
but if it is not, Issuers need to support and Verifiers need to enforce Key Binding.</t>
</section>

<section anchor="integrity-of-sd-jwts-and-sd-jwt-kbs"><name>Integrity of SD-JWTs and SD-JWT+KBs</name>
<t>With an SD-JWT, the Issuer-signed JWT is integrity-protected by the Issuer's
signature, and the values of the Disclosures are integrity-protected by the digests
included therein. The specific set of Disclosures, however,
is not integrity-protected - the SD-JWT can be modified by adding or
removing Disclosures and still be valid.</t>
<t>With an SD-JWT+KB, the set of selected Disclosures is integrity-protected.
The signature in the Key Binding JWT covers a
specific SD-JWT, with a specific Issuer-signed JWT and a specific set of
Disclosures.  Thus, the signature on the Key Binding JWT, in addition to proving
Key Binding, also assures the authenticity and integrity of the set of
Disclosures the Holder disclosed.  The set of Disclosures in an SD-JWT+KB is the set
that the Holder intended to send; no intermediate party has added, removed, or
modified the list of Disclosures.</t>
</section>

<section anchor="explicit_typing"><name>Explicit Typing</name>
<t>Section 3.11 of <xref target="RFC8725"/> describes the use of explicit typing to prevent confusion attacks
in which one kind of JWT is mistaken for another. SD-JWTs are also potentially
vulnerable to such confusion attacks, so it is RECOMMENDED to specify an explicit type
by including the <tt>typ</tt> header parameter when the SD-JWT is issued, and for Verifiers to check this value.</t>
<t>When explicit typing is employed for an SD-JWT, it is RECOMMENDED that a media type name of the format
"application/example+sd-jwt" be used, where "example" is replaced by the identifier for the specific kind of SD-JWT.
The definition of <tt>typ</tt> in Section 4.1.9 of <xref target="RFC7515"/> recommends that the "application/" prefix be omitted, so
"example+sd-jwt" would be the value of the <tt>typ</tt> header parameter.</t>
</section>
</section>

<section anchor="privacy_considerations"><name>Privacy Considerations</name>
<t>The privacy principles of <xref target="ISO.29100"/> should be adhered to.</t>

<section anchor="storage-of-signed-user-data"><name>Storage of Signed User Data</name>
<t>Wherever End-User data is stored, it represents a potential
target for an attacker. This target can be of particularly
high value when the data is signed by a trusted authority like an
official national identity service. For example, in OpenID Connect,
signed ID Tokens can be stored by Relying Parties. In the case of
SD-JWT, Holders have to store SD-JWTs,
and Issuers and Verifiers may decide to do so as well.</t>
<t>Not surprisingly, a leak of such data risks revealing private data of End-Users
to third parties. Signed End-User data, the authenticity of which
can be easily verified by third parties, further exacerbates the risk.
As discussed in <xref target="key_binding_security"/>, leaked
SD-JWTs may also allow attackers to impersonate Holders unless Key
Binding is enforced and the attacker does not have access to the
Holder's cryptographic keys. Altogether, leaked SD-JWT credentials may have
a high monetary value on black markets.</t>
<t>Due to these risks, systems implementing SD-JWT SHOULD be designed to minimize
the amount of data that is stored. All involved parties SHOULD store SD-JWTs
containing privacy-sensitive data only for as long as needed, including in log
files.</t>
<t>After Issuance, Issuers SHOULD NOT store the Issuer-signed JWT or the respective
Disclosures if they contain privacy-sensitive data.</t>
<t>Holders SHOULD store SD-JWTs only in
encrypted form, and, wherever possible, use hardware-backed encryption
in particular for the private Key Binding key. Decentralized storage
of data, e.g., on End-User devices, SHOULD be preferred for End-User
credentials over centralized storage. Expired SD-JWTs SHOULD be deleted
as soon as possible.</t>
<t>After Verification, Verifiers SHOULD NOT store the Issuer-signed JWT or the
respective Disclosures if they contain privacy-sensitive data. It may be
sufficient to store the result of the verification and any End-User data that is
needed for the application.</t>
<t>If reliable and secure key rotation and revocation is ensured according
to <xref target="issuer_signature_key_distribution"/>, Issuers may opt to publish
expired or revoked private signing keys (after a grace period that
ensures that the keys are not cached any longer at any Verifier). This
reduces the value of any leaked credentials as the signatures on them
can no longer be trusted to originate from the Issuer.</t>
</section>

<section anchor="confidentiality-during-transport"><name>Confidentiality during Transport</name>
<t>If the SD-JWT is transmitted over an insecure
channel during issuance or presentation, an adversary may be able to
intercept and read the End-User's personal data or correlate the information with previous uses of the same SD-JWT.</t>
<t>Usually, transport protocols for issuance and presentation of credentials
are designed to protect the confidentiality of the transmitted data, for
example, by requiring the use of TLS.</t>
<t>This specification therefore considers the confidentiality of the data to be
provided by the transport protocol and does not specify any encryption
mechanism.</t>
<t>Implementers MUST ensure that the transport protocol provides confidentiality
if the privacy of End-User data or correlation attacks by passive observers are a concern.</t>
<t>To encrypt the SD-JWT when transmitted over an insecure channel, implementers MAY use JSON Web Encryption (JWE) <xref target="RFC7516"/> by nesting the SD-JWT as the plaintext payload of a JWE.
Especially, when an SD-JWT is transmitted via a URL and information may be stored/cached in the browser or end up in web server logs, the SD-JWT SHOULD be encrypted using JWE.</t>
</section>

<section anchor="decoy_digests_privacy"><name>Decoy Digests</name>
<t>The use of decoy digests is RECOMMENDED when the number of claims (or the existence of particular claims) can be a side-channel disclosing information about otherwise undisclosed claims. In particular, if a claim in an SD-JWT is present only if a certain condition is met (e.g., a membership number is only contained if the End-User is a member of a group), the Issuer SHOULD add decoy digests when the condition is not met.</t>
<t>Decoy digests increase the size of the SD-JWT. The number of decoy digests (or whether to use them at all) is a trade-off between the size of the SD-JWT and the privacy of the End-User's data.</t>
</section>

<section anchor="unlinkability"><name>Unlinkability</name>
<t>Unlinkability is a property whereby adversaries are prevented from correlating
credential presentations of the same user beyond the user's consent.
Without unlinkability, an adversary might be able to learn more about the user than the user
intended to disclose, for example:</t>

<ul spacing="compact">
<li>Cooperating Verifiers might want to track users across services to build
advertising profiles.</li>
<li>Issuers might want to track where users present their credentials to enable
surveillance.</li>
<li>After a data breach at multiple Verifiers, publicly available information
might allow linking identifiable information presented to Verifier A with
originally anonymous information presented to Verifier B, therefore revealing
the identities of users of Verifier B.</li>
</ul>
<t>The following types of unlinkability are considered here:</t>

<ul spacing="compact">
<li>Presentation Unlinkability: A Verifier should not be able to link two
presentations of the same credential.</li>
<li>Verifier/Verifier Unlinkability: Two colluding Verifiers should not be able to
learn that they have received presentations of the same credential.</li>
<li>Issuer/Verifier Unlinkability (Honest Verifier): An Issuer of a credential
should not be able to know that a user presented the credential to a certain
Verifier that is not behaving maliciously.</li>
<li>Issuer/Verifier Unlinkability (Colluding/Compromised Verifier): An Issuer of a
credential should not be able to tell that a user presented the credential to
a certain Verifier, even if the Verifier colludes with the Issuer or becomes
compromised and leaks stored credentials from presentations.</li>
</ul>
<t>In all cases, unlinkability is limited to cases where the disclosed claims do
not contain information that directly or indirectly identifies the user. For
example, when a taxpayer identification number is contained in the disclosed claims, the Issuer and
Verifier can easily link the user's transactions. However, when the user only
discloses a birthdate to one Verifier and a postal code to another Verifier, the two Verifiers should not be able to determine that they were interacting with the same user.</t>
<t>Issuer/Verifier unlinkability with a colluding or compromised Verifier cannot be
achieved in salted-hash based selective disclosure approaches, such as SD-JWT, as the
issued credential with the Issuer's signature is directly presented to the Verifier, who can forward it to
the Issuer.</t>
<t>Contrary to that, Issuer/Verifier unlinkability with an honest Verifier can generally be achieved.
However, a callback from the Verifier to the Issuer, such as a revocation check, could potentially
disclose information about the credential's usage to the Issuer.
Where such callbacks are necessary, they MUST be executed in a manner that
preserves privacy and does not disclose details about the credential to the Issuer. It is
important to note that the timing of such requests could potentially serve as a side-channel.</t>
<t>Verifier/Verifier unlinkablility and presentation unlinkablility can be achieved using batch issuance: A batch
of credentials based on the same claims is issued to the Holder instead of just
a single credential. The Holder can then use a different credential for each
Verifier or even for each session with a Verifier. New key binding keys and
salts MUST be used for each credential in the batch to ensure that the Verifiers
cannot link the credentials using these values. Likewise, claims carrying time
information, like <tt>iat</tt>, <tt>exp</tt>, and <tt>nbf</tt>, MUST either be randomized within a
time period considered appropriate (e.g., randomize <tt>iat</tt> within the last 24
hours and calculate <tt>exp</tt> accordingly) or rounded (e.g., rounded down to the
beginning of the day).</t>
</section>

<section anchor="issuer-identifier"><name>Issuer Identifier</name>
<t>An Issuer issuing only one type of SD-JWT might have privacy implications, because if the Holder has an SD-JWT issued by that Issuer, its type and claim names can be determined.</t>
<t>For example, if the National Cancer Institute only issued SD-JWTs with cancer registry information, it is possible to deduce that the Holder owning its SD-JWT is a cancer patient.</t>
<t>Moreover, the issuer identifier alone may reveal information about the user.</t>
<t>For example, when a military organization or a drug rehabilitation center issues a vaccine credential, verifiers can deduce that the holder is a military member or may have a substance use disorder.</t>
<t>To mitigate this issue, a group of issuers may elect to use a common Issuer identifier. A group signature scheme outside the scope of this specification may also be used, instead of an individual signature.</t>
</section>
</section>

<section anchor="Acknowledgements"><name>Acknowledgements</name>
<t>We would like to thank
Alen Horvat,
Anders Rundgren,
Arjan Geluk,
Christian Bormann,
Christian Paquin,
David Bakker,
David Waite,
Fabian Hauck,
Filip Skokan,
Giuseppe De Marco,
Jacob Ward,
Jeffrey Yasskin,
John Mattsson,
Justin Richer,
Kushal Das,
Matthew Miller,
Michael Fraser,
Mike Jones,
Mike Prorock,
Nat Sakimura,
Neil Madden,
Oliver Terbu,
Orie Steele,
Paul Bastian,
Peter Altmann,
Pieter Kasselman,
Richard "fnord" Barnes,
Rohan Mahy,
Ryosuke Abe,
Sami Rosendahl,
Shawn Butterfield,
Simon Schulz,
Tobias Looker,
Takahiko Kawasaki,
Torsten Lodderstedt,
Vittorio Bertocci, and
Yaron Sheffer
for their contributions (some of which substantial) to this draft and to the initial set of implementations.</t>
<t>The work on this draft was started at OAuth Security Workshop 2022 in Trondheim, Norway.</t>
</section>

<section anchor="iana_considerations"><name>IANA Considerations</name>

<section anchor="json-web-token-claims-registration"><name>JSON Web Token Claims Registration</name>
<t>This specification requests registration of the following Claims in the
IANA "JSON Web Token Claims" registry <xref target="IANA.JWT"/> established by <xref target="RFC7519"/>.</t>

<ul spacing="compact">
<li>Claim Name: <tt>_sd</tt></li>
<li>Claim Description: Digests of Disclosures for object properties</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s):  [[ <xref target="embedding_object_properties"/> of this specification ]]</li>
</ul>
<t><br/>
</t>

<ul spacing="compact">
<li>Claim Name: <tt>...</tt></li>
<li>Claim Description: Digest of the Disclosure for an array element</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s):  [[ <xref target="embedding_array_elements"/> of this specification ]]</li>
</ul>
<t><br/>
</t>

<ul spacing="compact">
<li>Claim Name: <tt>_sd_alg</tt></li>
<li>Claim Description: Hash algorithm used to generate Disclosure digests and digest over presentation</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s):  [[ <xref target="hash_function_claim"/> of this specification ]]</li>
</ul>
<t><br/>
</t>

<ul spacing="compact">
<li>Claim Name: <tt>sd_hash</tt></li>
<li>Claim Description: Digest of the SD-JWT to which the KB-JWT is tied</li>
<li>Change Controller: IETF</li>
<li>Specification Document(s):  [[ <xref target="kb-jwt"/> of this specification ]]</li>
</ul>
</section>

<section anchor="media-type-registration"><name>Media Type Registration</name>
<t>This section requests registration of the following media types <xref target="RFC2046"/> in
the "Media Types" registry <xref target="IANA.MediaTypes"/> in the manner described
in <xref target="RFC6838"/>.</t>
<t>Note: For the media type value used in the <tt>typ</tt> header in the Issuer-signed JWT
itself, see <xref target="explicit_typing"/>.</t>
<t>To indicate that the content is an SD-JWT:</t>

<ul spacing="compact">
<li>Type name: application</li>
<li>Subtype name: sd-jwt</li>
<li>Required parameters: n/a</li>
<li>Optional parameters: n/a</li>
<li>Encoding considerations: binary; application/sd-jwt values are a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') or tilde ('~') characters.</li>
<li>Security considerations: See the Security Considerations section of [[ this specification ]], <xref target="RFC7519"/>, and <xref target="RFC8725"/>.</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: Daniel Fett, mail@danielfett.de</li>
<li>Intended usage: COMMON</li>
<li>Restrictions on usage: none</li>
<li>Author: Daniel Fett, mail@danielfett.de</li>
<li>Change Controller: IETF</li>
<li>Provisional registration?  No</li>
</ul>
<t><br/>

To indicate that the content is a JWS JSON serialized SD-JWT:</t>

<ul spacing="compact">
<li>Type name: application</li>
<li>Subtype name: sd-jwt+json</li>
<li>Required parameters: n/a</li>
<li>Optional parameters: n/a</li>
<li>Encoding considerations: binary; application/sd-jwt+json values are represented as a JSON Object; UTF-8 encoding SHOULD be employed for the JSON object.</li>
<li>Security considerations: See the Security Considerations section of [[ this specification ]], and <xref target="RFC7515"/>.</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: Daniel Fett, mail@danielfett.de</li>
<li>Intended usage: COMMON</li>
<li>Restrictions on usage: none</li>
<li>Author: Daniel Fett, mail@danielfett.de</li>
<li>Change Controller: IETF</li>
<li>Provisional registration?  No</li>
</ul>
<t><br/>

To indicate that the content is a Key Binding JWT:</t>

<ul spacing="compact">
<li>Type name: application</li>
<li>Subtype name: kb+jwt</li>
<li>Required parameters: n/a</li>
<li>Optional parameters: n/a</li>
<li>Encoding considerations: binary; A Key Binding JWT is a JWT; JWT values are encoded as a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') characters.</li>
<li>Security considerations: See the Security Considerations section of [[ this specification ]], <xref target="RFC7519"/>, and <xref target="RFC8725"/>.</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: Daniel Fett, mail@danielfett.de</li>
<li>Intended usage: COMMON</li>
<li>Restrictions on usage: none</li>
<li>Author: Daniel Fett, mail@danielfett.de</li>
<li>Change Controller: IETF</li>
<li>Provisional registration?  No</li>
</ul>
</section>

<section anchor="structured-syntax-suffix-registration"><name>Structured Syntax Suffix Registration</name>
<t>This section requests registration of the "+sd-jwt" structured syntax suffix in
the "Structured Syntax Suffix" registry <xref target="IANA.StructuredSuffix"/> in
the manner described in [RFC6838], which can be used to indicate that
the media type is encoded as an SD-JWT.</t>

<ul spacing="compact">
<li>Name: SD-JWT</li>
<li>+suffix: +sd-jwt</li>
<li>References: [[ this specification ]]</li>
<li>Encoding considerations: binary; SD-JWT values are a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') or tilde ('~') characters.</li>
<li>Interoperability considerations: n/a</li>
<li>Fragment identifier considerations: n/a</li>
<li>Security considerations: See the Security Considerations section of [[ this specification ]], <xref target="RFC7519"/>, and <xref target="RFC8725"/>.</li>
<li>Contact: Daniel Fett, mail@danielfett.de</li>
<li>Author/Change controller: IETF</li>
</ul>
</section>
</section>

</middle>

<back>
<references><name>References</name>
<references><name>Normative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.0020.xml"/>
<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.7519.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7800.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.8259.xml"/>
</references>
<references><name>Informative References</name>
<reference anchor="EUDIW.ARF" target="https://digital-strategy.ec.europa.eu/en/library/european-digital-identity-wallet-architecture-and-reference-framework">
  <front>
    <title>The European Digital Identity Wallet Architecture and Reference Framework</title>
    <author fullname="European Commission"/>
  </front>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-oauth-sd-jwt-vc.xml"/>
<reference anchor="IANA.Hash.Algorithms" target="https://www.iana.org/assignments/named-information/named-information.xhtml">
  <front>
    <title>Named Information Hash Algorithm</title>
    <author fullname="IANA"/>
  </front>
</reference>
<reference anchor="IANA.JWS.Algorithms" target="https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms">
  <front>
    <title>JSON Web Signature and Encryption Algorithms</title>
    <author fullname="IANA"/>
  </front>
</reference>
<reference anchor="IANA.JWT" target="https://www.iana.org/assignments/jwt">
  <front>
    <title>JSON Web Token Claims</title>
    <author>
      <organization>IANA</organization>
    </author>
  </front>
</reference>
<reference anchor="IANA.MediaTypes" target="https://www.iana.org/assignments/media-types/media-types.xhtml">
  <front>
    <title>Media Types</title>
    <author fullname="IANA"/>
  </front>
</reference>
<reference anchor="IANA.StructuredSuffix" target="https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml">
  <front>
    <title>Structured Syntax Suffixs</title>
    <author fullname="IANA"/>
  </front>
</reference>
<reference anchor="ISO.29100" target="https://standards.iso.org/ittf/PubliclyAvailableStandards/index.html">
  <front>
    <title>ISO/IEC 29100:2011 Information technology — Security techniques — Privacy framework</title>
    <author fullname="ISO"/>
  </front>
</reference>
<reference anchor="OIDC.IDA" target="https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html">
  <front>
    <title>OpenID Connect for Identity Assurance 1.0</title>
    <author fullname="Torsten Lodderstedt" initials="T." surname="Lodderstedt">
      <organization>yes.com</organization>
    </author>
    <author fullname="Daniel Fett" initials="D." surname="Fett">
      <organization>yes.com</organization>
    </author>
    <author fullname="Mark Haine" initials="M." surname="Haine">
      <organization>Considrd.Consulting Ltd</organization>
    </author>
    <author fullname="Alberto Pulido" initials="A." surname="Pulido">
      <organization>Santander</organization>
    </author>
    <author fullname="Kai Lehmann" initials="K." surname="Lehmann">
      <organization>1&amp;1 Mail &amp; Media Development &amp; Technology GmbH</organization>
    </author>
    <author fullname="Kosuke Koiwai" initials="K." surname="Koiwai">
      <organization>KDDI Corporation</organization>
    </author>
  </front>
</reference>
<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.4086.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5234.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.7517.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.8785.xml"/>
<reference anchor="VC_DATA_v2.0" target="https://www.w3.org/TR/vc-data-model-2.0/">
  <front>
    <title>Verifiable Credentials Data Model 2.0</title>
    <author fullname="Manu Sporny">
      <organization>Digital Bazaar</organization>
    </author>
    <author fullname="Orie Steele">
      <organization>Transmute</organization>
    </author>
    <author fullname="Michael B. Jones">
      <organization>Invited Expert</organization>
    </author>
    <author fullname="Gabe Cohen">
      <organization>Block</organization>
    </author>
    <author fullname="Oliver Terbu">
      <organization>Spruce Systems. Inc.</organization>
    </author>
    <date year="2023" month="Mar" day="07"/>
  </front>
</reference>
</references>
</references>

<section anchor="additional-examples"><name>Additional Examples</name>
<t>Important: The following examples are not normative and are provided for
illustrative purposes only. In particular, neither the structure of the claims
nor the selection of selectively disclosable claims is normative.</t>
<t>Line breaks have been added for readability.</t>

<section anchor="example-simple_structured"><name>Simple Structured SD-JWT</name>
<t>In this example, in contrast to <xref target="main-example"/>, the Issuer decided to create a structured object for the <tt>address</tt> claim, allowing to separately disclose individual members of the claim.</t>
<t>The Issuer is using the following input claim set:</t>

<sourcecode type="json"><![CDATA[{
  "sub": "6c5c0a49-b589-431d-bae7-219122a9ec2c",
  "given_name": "太郎",
  "family_name": "山田",
  "email": "\"unusual email address\"@example.jp",
  "phone_number": "+81-80-1234-5678",
  "address": {
    "street_address": "東京都港区芝公園４丁目２−８",
    "locality": "東京都",
    "region": "港区",
    "country": "JP"
  },
  "birthdate": "1940-01-01"
}
]]>
</sourcecode>
<t>The Issuer also decided to add decoy digests to prevent the Verifier from deducing the true number of claims.</t>
<t>The following payload is used for the SD-JWT:</t>

<sourcecode type="json"><![CDATA[{
  "_sd": [
    "C9inp6YoRaEXR427zYJP7Qrk1WH_8bdwOA_YUrUnGQU",
    "Kuet1yAa0HIQvYnOVd59hcViO9Ug6J2kSfqYRBeowvE",
    "MMldOFFzB2d0umlmpTIaGerhWdU_PpYfLvKhh_f_9aY",
    "X6ZAYOII2vPN40V7xExZwVwz7yRmLNcVwt5DL8RLv4g",
    "Y34zmIo0QLLOtdMpXGwjBgLvr17yEhhYT0FGofR-aIE",
    "fyGp0WTwwPv2JDQln1lSiaeobZsMWA10bQ5989-9DTs",
    "ommFAicVT8LGHCB0uywx7fYuo3MHYKO15cz-RZEYM5Q",
    "s0BKYsLWxQQeU8tVlltM7MKsIRTrEIa1PkJmqxBBf5U"
  ],
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "address": {
    "_sd": [
      "6aUhzYhZ7SJ1kVmagQAO3u2ETN2CC1aHheZpKnaF0_E",
      "AzLlFobkJ2xiaupREPyoJz-9-NSldB6Cgjr7fUyoHzg",
      "PzzcVu0qbMuBGSjulfewzkesD9zutOExn5EWNwkrQ-k",
      "b2Dkw0jcIF9rGg8_PF8ZcvncW7zwZj5ryBWvXfrpzek",
      "cPYJHIZ8Vu-f9CCyVub2UfgEk8jvvXezwK1p_JneeXQ",
      "glT3hrSU7fSWgwF5UDZmWwBTw32gnUldIhi8hGVCaV4",
      "rvJd6iq6T5ejmsBMoGwuNXh9qAAFATAci40oidEeVsA",
      "uNHoWYhXsZhVJCNE2Dqy-zqt7t69gJKy5QaFv7GrMX4"
    ]
  },
  "_sd_alg": "sha-256"
}
]]>
</sourcecode>
<t>The following Disclosures are created:</t>
<t><strong>Claim <tt>sub</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>X6ZAYOII2vPN40V7xExZwVwz7yRmLNcVwt5DL8RLv4g</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgInN1YiIsICI2YzVjMGE0OS1i</tt><br/>
<tt>NTg5LTQzMWQtYmFlNy0yMTkxMjJhOWVjMmMiXQ</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "sub",</tt><br/>
<tt>"6c5c0a49-b589-431d-bae7-219122a9ec2c"]</tt></li>
</ul>
<t><strong>Claim <tt>given_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>ommFAicVT8LGHCB0uywx7fYuo3MHYKO15cz-RZEYM5Q</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImdpdmVuX25hbWUiLCAiXHU1</tt><br/>
<tt>OTJhXHU5MGNlIl0</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "given_name", "\u592a\u90ce"]</tt></li>
</ul>
<t><strong>Claim <tt>family_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>C9inp6YoRaEXR427zYJP7Qrk1WH_8bdwOA_YUrUnGQU</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgImZhbWlseV9uYW1lIiwgIlx1</tt><br/>
<tt>NWM3MVx1NzUzMCJd</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "family_name", "\u5c71\u7530"]</tt></li>
</ul>
<t><strong>Claim <tt>email</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Kuet1yAa0HIQvYnOVd59hcViO9Ug6J2kSfqYRBeowvE</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgImVtYWlsIiwgIlwidW51c3Vh</tt><br/>
<tt>bCBlbWFpbCBhZGRyZXNzXCJAZXhhbXBsZS5qcCJd</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "email", "\"unusual email</tt><br/>
<tt>address\"@example.jp"]</tt></li>
</ul>
<t><strong>Claim <tt>phone_number</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>s0BKYsLWxQQeU8tVlltM7MKsIRTrEIa1PkJmqxBBf5U</tt></li>
<li>Disclosure:<br/>
<tt>WyJRZ19PNjR6cUF4ZTQxMmExMDhpcm9BIiwgInBob25lX251bWJlciIsICIr</tt><br/>
<tt>ODEtODAtMTIzNC01Njc4Il0</tt></li>
<li>Contents:
<tt>["Qg_O64zqAxe412a108iroA", "phone_number",</tt><br/>
<tt>"+81-80-1234-5678"]</tt></li>
</ul>
<t><strong>Claim <tt>street_address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>6aUhzYhZ7SJ1kVmagQAO3u2ETN2CC1aHheZpKnaF0_E</tt></li>
<li>Disclosure:<br/>
<tt>WyJBSngtMDk1VlBycFR0TjRRTU9xUk9BIiwgInN0cmVldF9hZGRyZXNzIiwg</tt><br/>
<tt>Ilx1Njc3MVx1NGVhY1x1OTBmZFx1NmUyZlx1NTMzYVx1ODI5ZFx1NTE2Y1x1</tt><br/>
<tt>NTcxMlx1ZmYxNFx1NGUwMVx1NzZlZVx1ZmYxMlx1MjIxMlx1ZmYxOCJd</tt></li>
<li>Contents:
<tt>["AJx-095VPrpTtN4QMOqROA", "street_address", "\u6771\u4eac\u</tt><br/>
<tt>90fd\u6e2f\u533a\u829d\u516c\u5712\uff14\u4e01\u76ee\uff12\u</tt><br/>
<tt>2212\uff18"]</tt></li>
</ul>
<t><strong>Claim <tt>locality</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>rvJd6iq6T5ejmsBMoGwuNXh9qAAFATAci40oidEeVsA</tt></li>
<li>Disclosure:<br/>
<tt>WyJQYzMzSk0yTGNoY1VfbEhnZ3ZfdWZRIiwgImxvY2FsaXR5IiwgIlx1Njc3</tt><br/>
<tt>MVx1NGVhY1x1OTBmZCJd</tt></li>
<li>Contents:
<tt>["Pc33JM2LchcU_lHggv_ufQ", "locality", "\u6771\u4eac\u90fd"]</tt></li>
</ul>
<t><strong>Claim <tt>region</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>PzzcVu0qbMuBGSjulfewzkesD9zutOExn5EWNwkrQ-k</tt></li>
<li>Disclosure:<br/>
<tt>WyJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBIiwgInJlZ2lvbiIsICJcdTZlMmZc</tt><br/>
<tt>dTUzM2EiXQ</tt></li>
<li>Contents:
<tt>["G02NSrQfjFXQ7Io09syajA", "region", "\u6e2f\u533a"]</tt></li>
</ul>
<t><strong>Claim <tt>country</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>uNHoWYhXsZhVJCNE2Dqy-zqt7t69gJKy5QaFv7GrMX4</tt></li>
<li>Disclosure:<br/>
<tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgImNvdW50cnkiLCAiSlAiXQ</tt></li>
<li>Contents:
<tt>["lklxF5jMYlGTPUovMNIvCA", "country", "JP"]</tt></li>
</ul>
<t><strong>Claim <tt>birthdate</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>MMldOFFzB2d0umlmpTIaGerhWdU_PpYfLvKhh_f_9aY</tt></li>
<li>Disclosure:<br/>
<tt>WyJ5eXRWYmRBUEdjZ2wyckk0QzlHU29nIiwgImJpcnRoZGF0ZSIsICIxOTQw</tt><br/>
<tt>LTAxLTAxIl0</tt></li>
<li>Contents:
<tt>["yytVbdAPGcgl2rI4C9GSog", "birthdate", "1940-01-01"]</tt></li>
</ul>
<t>The following decoy digests are added:</t>

<ul spacing="compact">
<li><tt>AzLlFobkJ2xiaupREPyoJz-9-NSldB6Cgjr7fUyoHzg</tt></li>
<li><tt>cPYJHIZ8Vu-f9CCyVub2UfgEk8jvvXezwK1p_JneeXQ</tt></li>
<li><tt>glT3hrSU7fSWgwF5UDZmWwBTw32gnUldIhi8hGVCaV4</tt></li>
<li><tt>b2Dkw0jcIF9rGg8_PF8ZcvncW7zwZj5ryBWvXfrpzek</tt></li>
<li><tt>fyGp0WTwwPv2JDQln1lSiaeobZsMWA10bQ5989-9DTs</tt></li>
<li><tt>Y34zmIo0QLLOtdMpXGwjBgLvr17yEhhYT0FGofR-aIE</tt></li>
</ul>
<t>The following is how a presentation of the SD-JWT that discloses only <tt>region</tt>
and <tt>country</tt> of the <tt>address</tt> property could look like:</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidH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MyZ25VbGRJaGk4aEdWQ2FWNCIsICJydkpkNmlxNlQ1
ZWptc0JNb0d3dU5YaDlxQUFGQVRBY2k0MG9pZEVlVnNBIiwgInVOSG9XWWhYc1poVkpD
TkUyRHF5LXpxdDd0NjlnSkt5NVFhRnY3R3JNWDQiXX0sICJfc2RfYWxnIjogInNoYS0y
NTYifQ.YqwIXcbqOwwcN7OBKOPc9d6Jm8xX_mMPKo3W0ER6hyqatGqOM8m5XEhGwCcWb
Vwa9MnmBvv-7-R2A8cXivLpJw~WyJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBIiwgInJlZ2
lvbiIsICJcdTZlMmZcdTUzM2EiXQ~WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgImN
vdW50cnkiLCAiSlAiXQ~
]]>
</sourcecode>
</section>

<section anchor="example-complex-structured-sd-jwt"><name>Complex Structured SD-JWT</name>
<t>In this example, an SD-JWT with a complex object is represented. The data
structures defined in OIDC4IDA <xref target="OIDC.IDA"/> are used.</t>
<t>The Issuer is using the following input claim set:</t>

<sourcecode type="json"><![CDATA[{
  "verified_claims": {
    "verification": {
      "trust_framework": "de_aml",
      "time": "2012-04-23T18:25Z",
      "verification_process": "f24c6f-6d3f-4ec5-973e-b0d8506f3bc7",
      "evidence": [
        {
          "type": "document",
          "method": "pipp",
          "time": "2012-04-22T11:30Z",
          "document": {
            "type": "idcard",
            "issuer": {
              "name": "Stadt Augsburg",
              "country": "DE"
            },
            "number": "53554554",
            "date_of_issuance": "2010-03-23",
            "date_of_expiry": "2020-03-22"
          }
        }
      ]
    },
    "claims": {
      "given_name": "Max",
      "family_name": "Müller",
      "nationalities": [
        "DE"
      ],
      "birthdate": "1956-01-28",
      "place_of_birth": {
        "country": "IS",
        "locality": "Þykkvabæjarklaustur"
      },
      "address": {
        "locality": "Maxstadt",
        "postal_code": "12344",
        "country": "DE",
        "street_address": "Weidenstraße 22"
      }
    }
  },
  "birth_middle_name": "Timotheus",
  "salutation": "Dr.",
  "msisdn": "49123456789"
}
]]>
</sourcecode>
<t>The following payload is used for the SD-JWT:</t>

<sourcecode type="json"><![CDATA[{
  "_sd": [
    "-aSznId9mWM8ocuQolCllsxVggq1-vHW4OtnhUtVmWw",
    "IKbrYNn3vA7WEFrysvbdBJjDDU_EvQIr0W18vTRpUSg",
    "otkxuT14nBiwzNJ3MPaOitOl9pVnXOaEHal_xkyNfKI"
  ],
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "verified_claims": {
    "verification": {
      "_sd": [
        "7h4UE9qScvDKodXVCuoKfKBJpVBfXMF_TmAGVaZe3Sc",
        "vTwe3raHIFYgFA3xaUD2aMxFz5oDo8iBu05qKlOg9Lw"
      ],
      "trust_framework": "de_aml",
      "evidence": [
        {
          "...": "tYJ0TDucyZZCRMbROG4qRO5vkPSFRxFhUELc18CSl3k"
        }
      ]
    },
    "claims": {
      "_sd": [
        "RiOiCn6_w5ZHaadkQMrcQJf0Jte5RwurRs54231DTlo",
        "S_498bbpKzB6Eanftss0xc7cOaoneRr3pKr7NdRmsMo",
        "WNA-UNK7F_zhsAb9syWO6IIQ1uHlTmOU8r8CvJ0cIMk",
        "Wxh_sV3iRH9bgrTBJi-aYHNCLt-vjhX1sd-igOf_9lk",
        "_O-wJiH3enSB4ROHntToQT8JmLtz-mhO2f1c89XoerQ",
        "hvDXhwmGcJQsBCA2OtjuLAcwAMpDsaU0nkovcKOqWNE"
      ]
    }
  },
  "_sd_alg": "sha-256"
}
]]>
</sourcecode>
<t>The following Disclosures are created by the Issuer:</t>
<t><strong>Claim <tt>time</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>vTwe3raHIFYgFA3xaUD2aMxFz5oDo8iBu05qKlOg9Lw</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgInRpbWUiLCAiMjAxMi0wNC0y</tt><br/>
<tt>M1QxODoyNVoiXQ</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "time", "2012-04-23T18:25Z"]</tt></li>
</ul>
<t><strong>Claim <tt>verification_process</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>7h4UE9qScvDKodXVCuoKfKBJpVBfXMF_TmAGVaZe3Sc</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgInZlcmlmaWNhdGlvbl9wcm9j</tt><br/>
<tt>ZXNzIiwgImYyNGM2Zi02ZDNmLTRlYzUtOTczZS1iMGQ4NTA2ZjNiYzciXQ</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "verification_process",</tt><br/>
<tt>"f24c6f-6d3f-4ec5-973e-b0d8506f3bc7"]</tt></li>
</ul>
<t><strong>Claim <tt>type</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>G5EnhOAOoU9X_6QMNvzFXjpEA_Rc-AEtm1bG_wcaKIk</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgInR5cGUiLCAiZG9jdW1lbnQi</tt><br/>
<tt>XQ</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "type", "document"]</tt></li>
</ul>
<t><strong>Claim <tt>method</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>WpxQ4HSoEtcTmCCKOeDslB_emucYLz2oO8oHNr1bEVQ</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgIm1ldGhvZCIsICJwaXBwIl0</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "method", "pipp"]</tt></li>
</ul>
<t><strong>Claim <tt>time</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>9wpjVPWuD7PK0nsQDL8B06lmdgV3LVybhHydQpTNyLI</tt></li>
<li>Disclosure:<br/>
<tt>WyJRZ19PNjR6cUF4ZTQxMmExMDhpcm9BIiwgInRpbWUiLCAiMjAxMi0wNC0y</tt><br/>
<tt>MlQxMTozMFoiXQ</tt></li>
<li>Contents:
<tt>["Qg_O64zqAxe412a108iroA", "time", "2012-04-22T11:30Z"]</tt></li>
</ul>
<t><strong>Claim <tt>document</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>IhwFrWUB63RcZq9yvgZ0XPc7Gowh3O2kqXeBIswg1B4</tt></li>
<li>Disclosure:<br/>
<tt>WyJBSngtMDk1VlBycFR0TjRRTU9xUk9BIiwgImRvY3VtZW50IiwgeyJ0eXBl</tt><br/>
<tt>IjogImlkY2FyZCIsICJpc3N1ZXIiOiB7Im5hbWUiOiAiU3RhZHQgQXVnc2J1</tt><br/>
<tt>cmciLCAiY291bnRyeSI6ICJERSJ9LCAibnVtYmVyIjogIjUzNTU0NTU0Iiwg</tt><br/>
<tt>ImRhdGVfb2ZfaXNzdWFuY2UiOiAiMjAxMC0wMy0yMyIsICJkYXRlX29mX2V4</tt><br/>
<tt>cGlyeSI6ICIyMDIwLTAzLTIyIn1d</tt></li>
<li>Contents:
<tt>["AJx-095VPrpTtN4QMOqROA", "document", {"type": "idcard",</tt><br/>
<tt>"issuer": {"name": "Stadt Augsburg", "country": "DE"},</tt><br/>
<tt>"number": "53554554", "date_of_issuance": "2010-03-23",</tt><br/>
<tt>"date_of_expiry": "2020-03-22"}]</tt></li>
</ul>
<t><strong>Array Entry</strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>tYJ0TDucyZZCRMbROG4qRO5vkPSFRxFhUELc18CSl3k</tt></li>
<li>Disclosure:<br/>
<tt>WyJQYzMzSk0yTGNoY1VfbEhnZ3ZfdWZRIiwgeyJfc2QiOiBbIjl3cGpWUFd1</tt><br/>
<tt>RDdQSzBuc1FETDhCMDZsbWRnVjNMVnliaEh5ZFFwVE55TEkiLCAiRzVFbmhP</tt><br/>
<tt>QU9vVTlYXzZRTU52ekZYanBFQV9SYy1BRXRtMWJHX3djYUtJayIsICJJaHdG</tt><br/>
<tt>cldVQjYzUmNacTl5dmdaMFhQYzdHb3doM08ya3FYZUJJc3dnMUI0IiwgIldw</tt><br/>
<tt>eFE0SFNvRXRjVG1DQ0tPZURzbEJfZW11Y1lMejJvTzhvSE5yMWJFVlEiXX1d</tt></li>
<li>Contents:
<tt>["Pc33JM2LchcU_lHggv_ufQ", {"_sd":</tt><br/>
<tt>["9wpjVPWuD7PK0nsQDL8B06lmdgV3LVybhHydQpTNyLI",</tt><br/>
<tt>"G5EnhOAOoU9X_6QMNvzFXjpEA_Rc-AEtm1bG_wcaKIk",</tt><br/>
<tt>"IhwFrWUB63RcZq9yvgZ0XPc7Gowh3O2kqXeBIswg1B4",</tt><br/>
<tt>"WpxQ4HSoEtcTmCCKOeDslB_emucYLz2oO8oHNr1bEVQ"]}]</tt></li>
</ul>
<t><strong>Claim <tt>given_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>S_498bbpKzB6Eanftss0xc7cOaoneRr3pKr7NdRmsMo</tt></li>
<li>Disclosure:<br/>
<tt>WyJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBIiwgImdpdmVuX25hbWUiLCAiTWF4</tt><br/>
<tt>Il0</tt></li>
<li>Contents:
<tt>["G02NSrQfjFXQ7Io09syajA", "given_name", "Max"]</tt></li>
</ul>
<t><strong>Claim <tt>family_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Wxh_sV3iRH9bgrTBJi-aYHNCLt-vjhX1sd-igOf_9lk</tt></li>
<li>Disclosure:<br/>
<tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgImZhbWlseV9uYW1lIiwgIk1c</tt><br/>
<tt>dTAwZmNsbGVyIl0</tt></li>
<li>Contents:
<tt>["lklxF5jMYlGTPUovMNIvCA", "family_name", "M\u00fcller"]</tt></li>
</ul>
<t><strong>Claim <tt>nationalities</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>hvDXhwmGcJQsBCA2OtjuLAcwAMpDsaU0nkovcKOqWNE</tt></li>
<li>Disclosure:<br/>
<tt>WyJuUHVvUW5rUkZxM0JJZUFtN0FuWEZBIiwgIm5hdGlvbmFsaXRpZXMiLCBb</tt><br/>
<tt>IkRFIl1d</tt></li>
<li>Contents:
<tt>["nPuoQnkRFq3BIeAm7AnXFA", "nationalities", ["DE"]]</tt></li>
</ul>
<t><strong>Claim <tt>birthdate</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>WNA-UNK7F_zhsAb9syWO6IIQ1uHlTmOU8r8CvJ0cIMk</tt></li>
<li>Disclosure:<br/>
<tt>WyI1YlBzMUlxdVpOYTBoa2FGenp6Wk53IiwgImJpcnRoZGF0ZSIsICIxOTU2</tt><br/>
<tt>LTAxLTI4Il0</tt></li>
<li>Contents:
<tt>["5bPs1IquZNa0hkaFzzzZNw", "birthdate", "1956-01-28"]</tt></li>
</ul>
<t><strong>Claim <tt>place_of_birth</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>RiOiCn6_w5ZHaadkQMrcQJf0Jte5RwurRs54231DTlo</tt></li>
<li>Disclosure:<br/>
<tt>WyI1YTJXMF9OcmxFWnpmcW1rXzdQcS13IiwgInBsYWNlX29mX2JpcnRoIiwg</tt><br/>
<tt>eyJjb3VudHJ5IjogIklTIiwgImxvY2FsaXR5IjogIlx1MDBkZXlra3ZhYlx1</tt><br/>
<tt>MDBlNmphcmtsYXVzdHVyIn1d</tt></li>
<li>Contents:
<tt>["5a2W0_NrlEZzfqmk_7Pq-w", "place_of_birth", {"country":</tt><br/>
<tt>"IS", "locality": "\u00deykkvab\u00e6jarklaustur"}]</tt></li>
</ul>
<t><strong>Claim <tt>address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>_O-wJiH3enSB4ROHntToQT8JmLtz-mhO2f1c89XoerQ</tt></li>
<li>Disclosure:<br/>
<tt>WyJ5MXNWVTV3ZGZKYWhWZGd3UGdTN1JRIiwgImFkZHJlc3MiLCB7ImxvY2Fs</tt><br/>
<tt>aXR5IjogIk1heHN0YWR0IiwgInBvc3RhbF9jb2RlIjogIjEyMzQ0IiwgImNv</tt><br/>
<tt>dW50cnkiOiAiREUiLCAic3RyZWV0X2FkZHJlc3MiOiAiV2VpZGVuc3RyYVx1</tt><br/>
<tt>MDBkZmUgMjIifV0</tt></li>
<li>Contents:
<tt>["y1sVU5wdfJahVdgwPgS7RQ", "address", {"locality":</tt><br/>
<tt>"Maxstadt", "postal_code": "12344", "country": "DE",</tt><br/>
<tt>"street_address": "Weidenstra\u00dfe 22"}]</tt></li>
</ul>
<t><strong>Claim <tt>birth_middle_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>otkxuT14nBiwzNJ3MPaOitOl9pVnXOaEHal_xkyNfKI</tt></li>
<li>Disclosure:<br/>
<tt>WyJIYlE0WDhzclZXM1FEeG5JSmRxeU9BIiwgImJpcnRoX21pZGRsZV9uYW1l</tt><br/>
<tt>IiwgIlRpbW90aGV1cyJd</tt></li>
<li>Contents:
<tt>["HbQ4X8srVW3QDxnIJdqyOA", "birth_middle_name", "Timotheus"]</tt></li>
</ul>
<t><strong>Claim <tt>salutation</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>-aSznId9mWM8ocuQolCllsxVggq1-vHW4OtnhUtVmWw</tt></li>
<li>Disclosure:<br/>
<tt>WyJDOUdTb3VqdmlKcXVFZ1lmb2pDYjFBIiwgInNhbHV0YXRpb24iLCAiRHIu</tt><br/>
<tt>Il0</tt></li>
<li>Contents:
<tt>["C9GSoujviJquEgYfojCb1A", "salutation", "Dr."]</tt></li>
</ul>
<t><strong>Claim <tt>msisdn</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>IKbrYNn3vA7WEFrysvbdBJjDDU_EvQIr0W18vTRpUSg</tt></li>
<li>Disclosure:<br/>
<tt>WyJreDVrRjE3Vi14MEptd1V4OXZndnR3IiwgIm1zaXNkbiIsICI0OTEyMzQ1</tt><br/>
<tt>Njc4OSJd</tt></li>
<li>Contents:
<tt>["kx5kF17V-x0JmwUx9vgvtw", "msisdn", "49123456789"]</tt></li>
</ul>
<t>The following is how a presentation of the SD-JWT could look like:</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0.eyJfc2QiOiBb
Ii1hU3puSWQ5bVdNOG9jdVFvbENsbHN4VmdncTEtdkhXNE90bmhVdFZtV3ciLCAiSUti
cllObjN2QTdXRUZyeXN2YmRCSmpERFVfRXZRSXIwVzE4dlRScFVTZyIsICJvdGt4dVQx
NG5CaXd6TkozTVBhT2l0T2w5cFZuWE9hRUhhbF94a3lOZktJIl0sICJpc3MiOiAiaHR0
cHM6Ly9pc3N1ZXIuZXhhbXBsZS5jb20iLCAiaWF0IjogMTY4MzAwMDAwMCwgImV4cCI6
IDE4ODMwMDAwMDAsICJ2ZXJpZmllZF9jbGFpbXMiOiB7InZlcmlmaWNhdGlvbiI6IHsi
X3NkIjogWyI3aDRVRTlxU2N2REtvZFhWQ3VvS2ZLQkpwVkJmWE1GX1RtQUdWYVplM1Nj
IiwgInZUd2UzcmFISUZZZ0ZBM3hhVUQyYU14Rno1b0RvOGlCdTA1cUtsT2c5THciXSwg
InRydXN0X2ZyYW1ld29yayI6ICJkZV9hbWwiLCAiZXZpZGVuY2UiOiBbeyIuLi4iOiAi
dFlKMFREdWN5WlpDUk1iUk9HNHFSTzV2a1BTRlJ4RmhVRUxjMThDU2wzayJ9XX0sICJj
bGFpbXMiOiB7Il9zZCI6IFsiUmlPaUNuNl93NVpIYWFka1FNcmNRSmYwSnRlNVJ3dXJS
czU0MjMxRFRsbyIsICJTXzQ5OGJicEt6QjZFYW5mdHNzMHhjN2NPYW9uZVJyM3BLcjdO
ZFJtc01vIiwgIldOQS1VTks3Rl96aH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iwgImNvdW50cnkiO
iAiREUiLCAic3RyZWV0X2FkZHJlc3MiOiAiV2VpZGVuc3RyYVx1MDBkZmUgMjIifV0~
]]>
</sourcecode>
<t>After the validation, the Verifier will have the following data for further processing:</t>

<sourcecode type="json"><![CDATA[{
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "verified_claims": {
    "verification": {
      "trust_framework": "de_aml",
      "evidence": [
        {
          "method": "pipp"
        }
      ],
      "time": "2012-04-23T18:25Z"
    },
    "claims": {
      "given_name": "Max",
      "family_name": "Müller",
      "address": {
        "locality": "Maxstadt",
        "postal_code": "12344",
        "country": "DE",
        "street_address": "Weidenstraße 22"
      }
    }
  }
}
]]>
</sourcecode>
</section>

<section anchor="sd-jwt-based-verifiable-credentials-sd-jwt-vc"><name>SD-JWT-based Verifiable Credentials (SD-JWT VC)</name>
<t>This example shows how the artifacts defined in this specification could be
used in the context of SD-JWT-based Verifiable
Credentials (SD-JWT VC) <xref target="I-D.ietf-oauth-sd-jwt-vc"/> to represent the concept of
a Person Identification Data (PID) <xref target="EUDIW.ARF"/> using the data of
a German citizen.</t>
<t>Key Binding is applied
using the Holder's public key passed in a <tt>cnf</tt> claim in the SD-JWT.</t>
<t>The Issuer is using the following input claim set:</t>

<sourcecode type="json"><![CDATA[{
  "vct": "https://bmi.bund.example/credential/pid/1.0",
  "given_name": "Erika",
  "family_name": "Mustermann",
  "birthdate": "1963-08-12",
  "source_document_type": "id_card",
  "address": {
    "street_address": "Heidestraße 17",
    "locality": "Köln",
    "postal_code": "51147",
    "country": "DE"
  },
  "nationalities": [
    "DE"
  ],
  "gender": "female",
  "birth_family_name": "Gabler",
  "place_of_birth": {
    "locality": "Berlin",
    "country": "DE"
  },
  "also_known_as": "Schwester Agnes",
  "age_equal_or_over": {
    "12": true,
    "14": true,
    "16": true,
    "18": true,
    "21": true,
    "65": false
  }
}
]]>
</sourcecode>
<t>The following is the issued SD-JWT:</t>

<sourcecode type="txt"><![CDATA[eyJh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d3FZR2JQOFpBIiwgIjE2IiwgdHJ1ZV0~WyJNMEpiNTd0NDF1YnJrU3V5c
kRUM3hBIiwgIjE4IiwgdHJ1ZV0~WyJEc210S05ncFY0ZEFIcGpyY2Fvc0F3IiwgIjIxI
iwgdHJ1ZV0~WyJlSzVvNXBIZmd1cFBwbHRqMXFoQUp3IiwgIjY1IiwgZmFsc2Vd~
]]>
</sourcecode>
<t>The following payload is used for the SD-JWT:</t>

<sourcecode type="json"><![CDATA[{
  "_sd": [
    "0HZmnSIPz337kSWe7C34l--88gzJi-eBJ2Vz_HJwATg",
    "9ZbplC7TdEW7qal6BBZlMtqJdmeEOiXevdJloXVJdRQ",
    "I00fcFUoDXCucp5yy2ujqPssDVGaWNiUliNz_awD0gc",
    "IEBYSJGNhXIlrQo58ykXm2Zx3yll9ZlTtToPo17QQiY",
    "Lai6IU6d7GQagXR7AvGTrnXgSld3z8EIg_fv3fOZ1Wg",
    "hvDXhwmGcJQsBCA2OtjuLAcwAMpDsaU0nkovcKOqWNE",
    "ikuur8Q4k8q3VcyA7dC-mNjZBkReDTU-CG4niTE7OTU",
    "qvzNLj2vh9o4SEXOfMiYDuvTykdsWCNg0wTdlr0AEIM",
    "wzW15bhCkvksxVvuJ8RF3xi8i64ln1jo_76BC2oa1ug",
    "zOeBXhxvIS4ZzmQcLlxKuEAOGGByjOqa1z2IoVx_YDQ"
  ],
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "vct": "https://bmi.bund.example/credential/pid/1.0",
  "age_equal_or_over": {
    "_sd": [
      "Fc8I_07LOcgPwrDJKQyIGO97wVsOplMLjHvRC4R4-Wg",
      "XLtLjadUWc9zN_9hMJRoqy46UsCKb1IshZuuqUFKSCA",
      "aoCCzsC7p4qhZIAh_idRCSCa641uycnc8zPfNWz8nx0",
      "f1-P0A2dKWavv1uFnMX2A7-EXxvhoxv5aHhuEIN-W64",
      "k5hy2r018vrsJjo-Vjd6g6yt7AaonKonniuJ9zel3jo",
      "qp7Z_Ky1Yip0sYgDO3zVug2MFuPNjHxksBDnJZ4aI-c"
    ]
  },
  "_sd_alg": "sha-256",
  "cnf": {
    "jwk": {
      "kty": "EC",
      "crv": "P-256",
      "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc",
      "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ"
    }
  }
}
]]>
</sourcecode>
<t>The following Disclosures are created by the Issuer:</t>
<t><strong>Claim <tt>given_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>0HZmnSIPz337kSWe7C34l--88gzJi-eBJ2Vz_HJwATg</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgImdpdmVuX25hbWUiLCAiRXJp</tt><br/>
<tt>a2EiXQ</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "given_name", "Erika"]</tt></li>
</ul>
<t><strong>Claim <tt>family_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>I00fcFUoDXCucp5yy2ujqPssDVGaWNiUliNz_awD0gc</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgImZhbWlseV9uYW1lIiwgIk11</tt><br/>
<tt>c3Rlcm1hbm4iXQ</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "family_name", "Mustermann"]</tt></li>
</ul>
<t><strong>Claim <tt>birthdate</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Lai6IU6d7GQagXR7AvGTrnXgSld3z8EIg_fv3fOZ1Wg</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgImJpcnRoZGF0ZSIsICIxOTYz</tt><br/>
<tt>LTA4LTEyIl0</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "birthdate", "1963-08-12"]</tt></li>
</ul>
<t><strong>Claim <tt>source_document_type</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>qvzNLj2vh9o4SEXOfMiYDuvTykdsWCNg0wTdlr0AEIM</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgInNvdXJjZV9kb2N1bWVudF90</tt><br/>
<tt>eXBlIiwgImlkX2NhcmQiXQ</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "source_document_type",</tt><br/>
<tt>"id_card"]</tt></li>
</ul>
<t><strong>Claim <tt>street_address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>bd1EVzgNopUk4EW3_eQ2n3_NU4iuXOHv9XbGHN3g1TE</tt></li>
<li>Disclosure:<br/>
<tt>WyJRZ19PNjR6cUF4ZTQxMmExMDhpcm9BIiwgInN0cmVldF9hZGRyZXNzIiwg</tt><br/>
<tt>IkhlaWRlc3RyYVx1MDBkZmUgMTciXQ</tt></li>
<li>Contents:
<tt>["Qg_O64zqAxe412a108iroA", "street_address",</tt><br/>
<tt>"Heidestra\u00dfe 17"]</tt></li>
</ul>
<t><strong>Claim <tt>locality</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>f_FQYgvQWvyVqNnIXsARlNye7YGp8E77gRAjaq-wvnw</tt></li>
<li>Disclosure:<br/>
<tt>WyJBSngtMDk1VlBycFR0TjRRTU9xUk9BIiwgImxvY2FsaXR5IiwgIktcdTAw</tt><br/>
<tt>ZjZsbiJd</tt></li>
<li>Contents:
<tt>["AJx-095VPrpTtN4QMOqROA", "locality", "K\u00f6ln"]</tt></li>
</ul>
<t><strong>Claim <tt>postal_code</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>XFc7zXPm7zzVdMywm2EuBflka5HHqvf8Up_szNGqvig</tt></li>
<li>Disclosure:<br/>
<tt>WyJQYzMzSk0yTGNoY1VfbEhnZ3ZfdWZRIiwgInBvc3RhbF9jb2RlIiwgIjUx</tt><br/>
<tt>MTQ3Il0</tt></li>
<li>Contents:
<tt>["Pc33JM2LchcU_lHggv_ufQ", "postal_code", "51147"]</tt></li>
</ul>
<t><strong>Claim <tt>country</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>v4kkb_pP1jlvUbSjtyc5bqcWyA-i8XLvhVYY7ZT0tb0</tt></li>
<li>Disclosure:<br/>
<tt>WyJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBIiwgImNvdW50cnkiLCAiREUiXQ</tt></li>
<li>Contents:
<tt>["G02NSrQfjFXQ7Io09syajA", "country", "DE"]</tt></li>
</ul>
<t><strong>Claim <tt>address</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>zOeBXhxvIS4ZzmQcLlxKuEAOGGByjOqa1z2IoVx_YDQ</tt></li>
<li>Disclosure:<br/>
<tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgImFkZHJlc3MiLCB7Il9zZCI6</tt><br/>
<tt>IFsiWEZjN3pYUG03enpWZE15d20yRXVCZmxrYTVISHF2ZjhVcF9zek5HcXZp</tt><br/>
<tt>ZyIsICJiZDFFVnpnTm9wVWs0RVczX2VRMm4zX05VNGl1WE9IdjlYYkdITjNn</tt><br/>
<tt>MVRFIiwgImZfRlFZZ3ZRV3Z5VnFObklYc0FSbE55ZTdZR3A4RTc3Z1JBamFx</tt><br/>
<tt>LXd2bnciLCAidjRra2JfcFAxamx2VWJTanR5YzVicWNXeUEtaThYTHZoVllZ</tt><br/>
<tt>N1pUMHRiMCJdfV0</tt></li>
<li>Contents:
<tt>["lklxF5jMYlGTPUovMNIvCA", "address", {"_sd":</tt><br/>
<tt>["XFc7zXPm7zzVdMywm2EuBflka5HHqvf8Up_szNGqvig",</tt><br/>
<tt>"bd1EVzgNopUk4EW3_eQ2n3_NU4iuXOHv9XbGHN3g1TE",</tt><br/>
<tt>"f_FQYgvQWvyVqNnIXsARlNye7YGp8E77gRAjaq-wvnw",</tt><br/>
<tt>"v4kkb_pP1jlvUbSjtyc5bqcWyA-i8XLvhVYY7ZT0tb0"]}]</tt></li>
</ul>
<t><strong>Claim <tt>nationalities</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>hvDXhwmGcJQsBCA2OtjuLAcwAMpDsaU0nkovcKOqWNE</tt></li>
<li>Disclosure:<br/>
<tt>WyJuUHVvUW5rUkZxM0JJZUFtN0FuWEZBIiwgIm5hdGlvbmFsaXRpZXMiLCBb</tt><br/>
<tt>IkRFIl1d</tt></li>
<li>Contents:
<tt>["nPuoQnkRFq3BIeAm7AnXFA", "nationalities", ["DE"]]</tt></li>
</ul>
<t><strong>Claim <tt>gender</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>IEBYSJGNhXIlrQo58ykXm2Zx3yll9ZlTtToPo17QQiY</tt></li>
<li>Disclosure:<br/>
<tt>WyI1YlBzMUlxdVpOYTBoa2FGenp6Wk53IiwgImdlbmRlciIsICJmZW1hbGUi</tt><br/>
<tt>XQ</tt></li>
<li>Contents:
<tt>["5bPs1IquZNa0hkaFzzzZNw", "gender", "female"]</tt></li>
</ul>
<t><strong>Claim <tt>birth_family_name</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>ikuur8Q4k8q3VcyA7dC-mNjZBkReDTU-CG4niTE7OTU</tt></li>
<li>Disclosure:<br/>
<tt>WyI1YTJXMF9OcmxFWnpmcW1rXzdQcS13IiwgImJpcnRoX2ZhbWlseV9uYW1l</tt><br/>
<tt>IiwgIkdhYmxlciJd</tt></li>
<li>Contents:
<tt>["5a2W0_NrlEZzfqmk_7Pq-w", "birth_family_name", "Gabler"]</tt></li>
</ul>
<t><strong>Claim <tt>locality</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>WphHoIDyoWbApDC4zbuwR40xl0xLhDC_cv4tsS71rEA</tt></li>
<li>Disclosure:<br/>
<tt>WyJ5MXNWVTV3ZGZKYWhWZGd3UGdTN1JRIiwgImxvY2FsaXR5IiwgIkJlcmxp</tt><br/>
<tt>biJd</tt></li>
<li>Contents:
<tt>["y1sVU5wdfJahVdgwPgS7RQ", "locality", "Berlin"]</tt></li>
</ul>
<t><strong>Claim <tt>place_of_birth</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>wzW15bhCkvksxVvuJ8RF3xi8i64ln1jo_76BC2oa1ug</tt></li>
<li>Disclosure:<br/>
<tt>WyJIYlE0WDhzclZXM1FEeG5JSmRxeU9BIiwgInBsYWNlX29mX2JpcnRoIiwg</tt><br/>
<tt>eyJfc2QiOiBbIldwaEhvSUR5b1diQXBEQzR6YnV3UjQweGwweExoRENfY3Y0</tt><br/>
<tt>dHNTNzFyRUEiXSwgImNvdW50cnkiOiAiREUifV0</tt></li>
<li>Contents:
<tt>["HbQ4X8srVW3QDxnIJdqyOA", "place_of_birth", {"_sd":</tt><br/>
<tt>["WphHoIDyoWbApDC4zbuwR40xl0xLhDC_cv4tsS71rEA"], "country":</tt><br/>
<tt>"DE"}]</tt></li>
</ul>
<t><strong>Claim <tt>also_known_as</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>9ZbplC7TdEW7qal6BBZlMtqJdmeEOiXevdJloXVJdRQ</tt></li>
<li>Disclosure:<br/>
<tt>WyJDOUdTb3VqdmlKcXVFZ1lmb2pDYjFBIiwgImFsc29fa25vd25fYXMiLCAi</tt><br/>
<tt>U2Nod2VzdGVyIEFnbmVzIl0</tt></li>
<li>Contents:
<tt>["C9GSoujviJquEgYfojCb1A", "also_known_as", "Schwester</tt><br/>
<tt>Agnes"]</tt></li>
</ul>
<t><strong>Claim <tt>12</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Fc8I_07LOcgPwrDJKQyIGO97wVsOplMLjHvRC4R4-Wg</tt></li>
<li>Disclosure:<br/>
<tt>WyJreDVrRjE3Vi14MEptd1V4OXZndnR3IiwgIjEyIiwgdHJ1ZV0</tt></li>
<li>Contents:
<tt>["kx5kF17V-x0JmwUx9vgvtw", "12", true]</tt></li>
</ul>
<t><strong>Claim <tt>14</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>f1-P0A2dKWavv1uFnMX2A7-EXxvhoxv5aHhuEIN-W64</tt></li>
<li>Disclosure:<br/>
<tt>WyJIM28xdXN3UDc2MEZpMnllR2RWQ0VRIiwgIjE0IiwgdHJ1ZV0</tt></li>
<li>Contents:
<tt>["H3o1uswP760Fi2yeGdVCEQ", "14", true]</tt></li>
</ul>
<t><strong>Claim <tt>16</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>k5hy2r018vrsJjo-Vjd6g6yt7AaonKonniuJ9zel3jo</tt></li>
<li>Disclosure:<br/>
<tt>WyJPQktsVFZsdkxnLUFkd3FZR2JQOFpBIiwgIjE2IiwgdHJ1ZV0</tt></li>
<li>Contents:
<tt>["OBKlTVlvLg-AdwqYGbP8ZA", "16", true]</tt></li>
</ul>
<t><strong>Claim <tt>18</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>qp7Z_Ky1Yip0sYgDO3zVug2MFuPNjHxksBDnJZ4aI-c</tt></li>
<li>Disclosure:<br/>
<tt>WyJNMEpiNTd0NDF1YnJrU3V5ckRUM3hBIiwgIjE4IiwgdHJ1ZV0</tt></li>
<li>Contents:
<tt>["M0Jb57t41ubrkSuyrDT3xA", "18", true]</tt></li>
</ul>
<t><strong>Claim <tt>21</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>aoCCzsC7p4qhZIAh_idRCSCa641uycnc8zPfNWz8nx0</tt></li>
<li>Disclosure:<br/>
<tt>WyJEc210S05ncFY0ZEFIcGpyY2Fvc0F3IiwgIjIxIiwgdHJ1ZV0</tt></li>
<li>Contents:
<tt>["DsmtKNgpV4dAHpjrcaosAw", "21", true]</tt></li>
</ul>
<t><strong>Claim <tt>65</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>XLtLjadUWc9zN_9hMJRoqy46UsCKb1IshZuuqUFKSCA</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSzVvNXBIZmd1cFBwbHRqMXFoQUp3IiwgIjY1IiwgZmFsc2Vd</tt></li>
<li>Contents:
<tt>["eK5o5pHfgupPpltj1qhAJw", "65", false]</tt></li>
</ul>
<t>The following is how an SD-JWT+KB that discloses only nationality and the fact that the person is over 18 years old could look like:</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidHlwIjogInZjK3NkLWp3dCJ9.eyJfc2QiOiBbIjBIWm1
uU0lQejMzN2tTV2U3QzM0bC0tODhnekppLWVCSjJWel9ISndBVGciLCAiOVpicGxDN1R
kRVc3cWFsNkJCWmxNdHFKZG1lRU9pWGV2ZEpsb1hWSmRSUSIsICJJMDBmY0ZVb0RYQ3V
jcDV5eTJ1anFQc3NEVkdhV05pVWxpTnpfYXdEMGdjIiwgIklFQllTSkdOaFhJbHJRbzU
4eWtYbTJaeDN5bGw5WmxUdFRvUG8xN1FRaVkiLCAiTGFpNklVNmQ3R1FhZ1hSN0F2R1R
yblhnU2xkM3o4RUlnX2Z2M2ZPWjFXZyIsICJodkRYaHdtR2NKUXNCQ0EyT3RqdUxBY3d
BTXBEc2FVMG5rb3ZjS09xV05FIiwgImlrdXVyOFE0azhxM1ZjeUE3ZEMtbU5qWkJrUmV
EVFUtQ0c0bmlURTdPVFUiLCAicXZ6TkxqMnZoOW80U0VYT2ZNaVlEdXZUeWtkc1dDTmc
wd1RkbHIwQUVJTSIsICJ3elcxNWJoQ2t2a3N4VnZ1SjhSRjN4aThpNjRsbjFqb183NkJ
DMm9hMXVnIiwgInpPZUJYaHh2SVM0WnptUWNMbHhLdUVBT0dHQnlqT3FhMXoySW9WeF9
ZRFEiXSwgImlzcyI6ICJodHRwczovL2lzc3Vlci5leGFtcGxlL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0NTY3ODkwIiwgImF1ZCI6ICJodHRwczovL3ZlcmlmaWVyLmV4YW1wb
GUub3JnIiwgImlhdCI6IDE3MTgyOTg3NjYsICJzZF9oYXNoIjogImloOWZfbEhRUmhza
zJnMzBQV3NjUF93cTJOVnZ0RExhTlpBMGFITzFWVk0ifQ.j6tYhpYw4EiDmoDOiVthxm
57cdjf6SPGOVAD_mH6BCySbwh7CQ7YSoECT4qvtD7htdMMjoqvred6x407TUvUqw
]]>
</sourcecode>
<t>The following is the payload of a corresponding Key Binding JWT:</t>

<sourcecode type="json"><![CDATA[{
  "nonce": "1234567890",
  "aud": "https://verifier.example.org",
  "iat": 1718298766,
  "sd_hash": "ih9f_lHQRhsk2g30PWscP_wq2NVvtDLaNZA0aHO1VVM"
}
]]>
</sourcecode>
<t>After the validation, the Verifier will have the following data for further processing:</t>

<sourcecode type="json"><![CDATA[{
  "iss": "https://issuer.example.com",
  "iat": 1683000000,
  "exp": 1883000000,
  "vct": "https://bmi.bund.example/credential/pid/1.0",
  "age_equal_or_over": {
    "18": true
  },
  "cnf": {
    "jwk": {
      "kty": "EC",
      "crv": "P-256",
      "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc",
      "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ"
    }
  },
  "nationalities": [
    "DE"
  ]
}
]]>
</sourcecode>
</section>

<section anchor="w3c-verifiable-credentials-data-model-v2-0"><name>W3C Verifiable Credentials Data Model v2.0</name>
<t>This non-normative example illustrates how the artifacts defined in this specification
could be used to express a W3C Verifiable Credentials Data Model v2.0 <xref target="VC_DATA_v2.0"/> payload.</t>
<t>Key Binding is applied
using the Holder's public key passed in a <tt>cnf</tt> claim in the SD-JWT.</t>
<t>The Issuer is using the following input claim set:</t>

<sourcecode type="json"><![CDATA[{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/vaccination/v1"
  ],
  "type": [
    "VerifiableCredential",
    "VaccinationCertificate"
  ],
  "issuer": "https://example.com/issuer",
  "issuanceDate": "2023-02-09T11:01:59Z",
  "expirationDate": "2028-02-08T11:01:59Z",
  "name": "COVID-19 Vaccination Certificate",
  "description": "COVID-19 Vaccination Certificate",
  "credentialSubject": {
    "vaccine": {
      "type": "Vaccine",
      "atcCode": "J07BX03",
      "medicinalProductName": "COVID-19 Vaccine Moderna",
      "marketingAuthorizationHolder": "Moderna Biotech"
    },
    "nextVaccinationDate": "2021-08-16T13:40:12Z",
    "countryOfVaccination": "GE",
    "dateOfVaccination": "2021-06-23T13:40:12Z",
    "order": "3/3",
    "recipient": {
      "type": "VaccineRecipient",
      "gender": "Female",
      "birthDate": "1961-08-17",
      "givenName": "Marion",
      "familyName": "Mustermann"
    },
    "type": "VaccinationEvent",
    "administeringCentre": "Praxis Sommergarten",
    "batchNumber": "1626382736",
    "healthProfessional": "883110000015376"
  }
}
]]>
</sourcecode>
<t>The following is the issued SD-JWT:</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0.eyJAY29udGV4
dCI6IFsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCAiaHR0
cHM6Ly93M2lkLm9yZy92YWNjaW5hdGlvbi92MSJdLCAidHlwZSI6IFsiVmVyaWZpYWJs
ZUNyZWRlbnRpYWwiLCAiVmFjY2luYXRpb25DZXJ0aWZpY2F0ZSJdLCAiaXNzdWVyIjog
Imh0dHBzOi8vZXhhbXBsZS5jb20vaXNzdWVyIiwgImlzc3VhbmNlRGF0ZSI6ICIyMDIz
LTAyLTA5VDExOjAxOjU5WiIsICJleHBpcmF0aW9uRGF0ZSI6ICIyMDI4LTAyLTA4VDEx
OjAxOjU5WiIsICJuYW1lIjogIkNPVklELTE5IFZhY2NpbmF0aW9uIENlcnRpZmljYXRl
IiwgImRlc2NyaXB0aW9uIjogIkNPVklELTE5IFZhY2NpbmF0aW9uIENlcnR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VlsR1RQVW92TU5JdkNBIiwgImJp
cnRoRGF0ZSIsICIxOTYxLTA4LTE3Il0~WyJuUHVvUW5rUkZxM0JJZUFtN0FuWEZBIiwg
ImdpdmVuTmFtZSIsICJNYXJpb24iXQ~WyI1YlBzMUlxdVpOYTBoa2FGenp6Wk53IiwgI
mZhbWlseU5hbWUiLCAiTXVzdGVybWFubiJd~WyI1YTJXMF9OcmxFWnpmcW1rXzdQcS13
IiwgImFkbWluaXN0ZXJpbmdDZW50cmUiLCAiUHJheGlzIFNvbW1lcmdhcnRlbiJd~WyJ
5MXNWVTV3ZGZKYWhWZGd3UGdTN1JRIiwgImJhdGNoTnVtYmVyIiwgIjE2MjYzODI3MzY
iXQ~WyJIYlE0WDhzclZXM1FEeG5JSmRxeU9BIiwgImhlYWx0aFByb2Zlc3Npb25hbCIs
ICI4ODMxMTAwMDAwMTUzNzYiXQ~
]]>
</sourcecode>
<t>The following payload is used for the SD-JWT:</t>

<sourcecode type="json"><![CDATA[{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/vaccination/v1"
  ],
  "type": [
    "VerifiableCredential",
    "VaccinationCertificate"
  ],
  "issuer": "https://example.com/issuer",
  "issuanceDate": "2023-02-09T11:01:59Z",
  "expirationDate": "2028-02-08T11:01:59Z",
  "name": "COVID-19 Vaccination Certificate",
  "description": "COVID-19 Vaccination Certificate",
  "credentialSubject": {
    "_sd": [
      "1V_K-8lDQ8iFXBFXbZY9ehqR4HabWCi5T0ybIzZPeww",
      "JzjLgtP29dP-B3td12P674gFmK2zy81HMtBgf6CJNWg",
      "R2fGbfA07Z_YlkqmNZyma1xyyx1XstIiS6B1Ybl2JZ4",
      "TCmzrl7K2gev_du7pcMIyzRLHp-Yeg-Fl_cxtrUvPxg",
      "V7kJBLK78TmVDOmrfJ7ZuUPHuK_2cc7yZRa4qV1txwM",
      "b0eUsvGP-ODDdFoY4NlzlXc3tDslWJtCJF75Nw8Oj_g",
      "zJK_eSMXjwM8dXmMZLnI8FGM08zJ3_ubGeEMJ-5TBy0"
    ],
    "vaccine": {
      "_sd": [
        "1cF5hLwkhMNIaqfWJrXI7NMWedL-9f6Y2PA52yPjSZI",
        "Hiy6WWueLD5bn16298tPv7GXhmldMDOTnBi-CZbphNo",
        "Lb027q691jXXl-jC73vi8ebOj9smx3C-_og7gA4TBQE"
      ],
      "type": "Vaccine"
    },
    "recipient": {
      "_sd": [
        "1lSQBNY24q0Th6OGzthq-7-4l6cAaxrYXOGZpeW_lnA",
        "3nzLq81M2oN06wdv1shHvOEJVxZ5KLmdDkHEDJABWEI",
        "Pn1sWi06G4LJrnn-_RT0RbM_HTdxnPJQuX2fzWv_JOU",
        "lF9uzdsw7HplGLc714Tr4WO7MGJza7tt7QFleCX4Itw"
      ],
      "type": "VaccineRecipient"
    },
    "type": "VaccinationEvent"
  },
  "_sd_alg": "sha-256",
  "cnf": {
    "jwk": {
      "kty": "EC",
      "crv": "P-256",
      "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc",
      "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ"
    }
  }
}
]]>
</sourcecode>
<t>The following Disclosures are created by the Issuer:</t>
<t><strong>Claim <tt>atcCode</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>1cF5hLwkhMNIaqfWJrXI7NMWedL-9f6Y2PA52yPjSZI</tt></li>
<li>Disclosure:<br/>
<tt>WyIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgImF0Y0NvZGUiLCAiSjA3Qlgw</tt><br/>
<tt>MyJd</tt></li>
<li>Contents:
<tt>["2GLC42sKQveCfGfryNRN9w", "atcCode", "J07BX03"]</tt></li>
</ul>
<t><strong>Claim <tt>medicinalProductName</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Hiy6WWueLD5bn16298tPv7GXhmldMDOTnBi-CZbphNo</tt></li>
<li>Disclosure:<br/>
<tt>WyJlbHVWNU9nM2dTTklJOEVZbnN4QV9BIiwgIm1lZGljaW5hbFByb2R1Y3RO</tt><br/>
<tt>YW1lIiwgIkNPVklELTE5IFZhY2NpbmUgTW9kZXJuYSJd</tt></li>
<li>Contents:
<tt>["eluV5Og3gSNII8EYnsxA_A", "medicinalProductName", "COVID-19</tt><br/>
<tt>Vaccine Moderna"]</tt></li>
</ul>
<t><strong>Claim <tt>marketingAuthorizationHolder</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Lb027q691jXXl-jC73vi8ebOj9smx3C-_og7gA4TBQE</tt></li>
<li>Disclosure:<br/>
<tt>WyI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBIiwgIm1hcmtldGluZ0F1dGhvcml6</tt><br/>
<tt>YXRpb25Ib2xkZXIiLCAiTW9kZXJuYSBCaW90ZWNoIl0</tt></li>
<li>Contents:
<tt>["6Ij7tM-a5iVPGboS5tmvVA", "marketingAuthorizationHolder",</tt><br/>
<tt>"Moderna Biotech"]</tt></li>
</ul>
<t><strong>Claim <tt>nextVaccinationDate</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>R2fGbfA07Z_YlkqmNZyma1xyyx1XstIiS6B1Ybl2JZ4</tt></li>
<li>Disclosure:<br/>
<tt>WyJlSThaV205UW5LUHBOUGVOZW5IZGhRIiwgIm5leHRWYWNjaW5hdGlvbkRh</tt><br/>
<tt>dGUiLCAiMjAyMS0wOC0xNlQxMzo0MDoxMloiXQ</tt></li>
<li>Contents:
<tt>["eI8ZWm9QnKPpNPeNenHdhQ", "nextVaccinationDate",</tt><br/>
<tt>"2021-08-16T13:40:12Z"]</tt></li>
</ul>
<t><strong>Claim <tt>countryOfVaccination</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>JzjLgtP29dP-B3td12P674gFmK2zy81HMtBgf6CJNWg</tt></li>
<li>Disclosure:<br/>
<tt>WyJRZ19PNjR6cUF4ZTQxMmExMDhpcm9BIiwgImNvdW50cnlPZlZhY2NpbmF0</tt><br/>
<tt>aW9uIiwgIkdFIl0</tt></li>
<li>Contents:
<tt>["Qg_O64zqAxe412a108iroA", "countryOfVaccination", "GE"]</tt></li>
</ul>
<t><strong>Claim <tt>dateOfVaccination</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>zJK_eSMXjwM8dXmMZLnI8FGM08zJ3_ubGeEMJ-5TBy0</tt></li>
<li>Disclosure:<br/>
<tt>WyJBSngtMDk1VlBycFR0TjRRTU9xUk9BIiwgImRhdGVPZlZhY2NpbmF0aW9u</tt><br/>
<tt>IiwgIjIwMjEtMDYtMjNUMTM6NDA6MTJaIl0</tt></li>
<li>Contents:
<tt>["AJx-095VPrpTtN4QMOqROA", "dateOfVaccination",</tt><br/>
<tt>"2021-06-23T13:40:12Z"]</tt></li>
</ul>
<t><strong>Claim <tt>order</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>b0eUsvGP-ODDdFoY4NlzlXc3tDslWJtCJF75Nw8Oj_g</tt></li>
<li>Disclosure:<br/>
<tt>WyJQYzMzSk0yTGNoY1VfbEhnZ3ZfdWZRIiwgIm9yZGVyIiwgIjMvMyJd</tt></li>
<li>Contents:
<tt>["Pc33JM2LchcU_lHggv_ufQ", "order", "3/3"]</tt></li>
</ul>
<t><strong>Claim <tt>gender</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>3nzLq81M2oN06wdv1shHvOEJVxZ5KLmdDkHEDJABWEI</tt></li>
<li>Disclosure:<br/>
<tt>WyJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBIiwgImdlbmRlciIsICJGZW1hbGUi</tt><br/>
<tt>XQ</tt></li>
<li>Contents:
<tt>["G02NSrQfjFXQ7Io09syajA", "gender", "Female"]</tt></li>
</ul>
<t><strong>Claim <tt>birthDate</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>Pn1sWi06G4LJrnn-_RT0RbM_HTdxnPJQuX2fzWv_JOU</tt></li>
<li>Disclosure:<br/>
<tt>WyJsa2x4RjVqTVlsR1RQVW92TU5JdkNBIiwgImJpcnRoRGF0ZSIsICIxOTYx</tt><br/>
<tt>LTA4LTE3Il0</tt></li>
<li>Contents:
<tt>["lklxF5jMYlGTPUovMNIvCA", "birthDate", "1961-08-17"]</tt></li>
</ul>
<t><strong>Claim <tt>givenName</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>lF9uzdsw7HplGLc714Tr4WO7MGJza7tt7QFleCX4Itw</tt></li>
<li>Disclosure:<br/>
<tt>WyJuUHVvUW5rUkZxM0JJZUFtN0FuWEZBIiwgImdpdmVuTmFtZSIsICJNYXJp</tt><br/>
<tt>b24iXQ</tt></li>
<li>Contents:
<tt>["nPuoQnkRFq3BIeAm7AnXFA", "givenName", "Marion"]</tt></li>
</ul>
<t><strong>Claim <tt>familyName</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>1lSQBNY24q0Th6OGzthq-7-4l6cAaxrYXOGZpeW_lnA</tt></li>
<li>Disclosure:<br/>
<tt>WyI1YlBzMUlxdVpOYTBoa2FGenp6Wk53IiwgImZhbWlseU5hbWUiLCAiTXVz</tt><br/>
<tt>dGVybWFubiJd</tt></li>
<li>Contents:
<tt>["5bPs1IquZNa0hkaFzzzZNw", "familyName", "Mustermann"]</tt></li>
</ul>
<t><strong>Claim <tt>administeringCentre</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>TCmzrl7K2gev_du7pcMIyzRLHp-Yeg-Fl_cxtrUvPxg</tt></li>
<li>Disclosure:<br/>
<tt>WyI1YTJXMF9OcmxFWnpmcW1rXzdQcS13IiwgImFkbWluaXN0ZXJpbmdDZW50</tt><br/>
<tt>cmUiLCAiUHJheGlzIFNvbW1lcmdhcnRlbiJd</tt></li>
<li>Contents:
<tt>["5a2W0_NrlEZzfqmk_7Pq-w", "administeringCentre", "Praxis</tt><br/>
<tt>Sommergarten"]</tt></li>
</ul>
<t><strong>Claim <tt>batchNumber</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>V7kJBLK78TmVDOmrfJ7ZuUPHuK_2cc7yZRa4qV1txwM</tt></li>
<li>Disclosure:<br/>
<tt>WyJ5MXNWVTV3ZGZKYWhWZGd3UGdTN1JRIiwgImJhdGNoTnVtYmVyIiwgIjE2</tt><br/>
<tt>MjYzODI3MzYiXQ</tt></li>
<li>Contents:
<tt>["y1sVU5wdfJahVdgwPgS7RQ", "batchNumber", "1626382736"]</tt></li>
</ul>
<t><strong>Claim <tt>healthProfessional</tt></strong>:</t>

<ul spacing="compact">
<li>SHA-256 Hash: <tt>1V_K-8lDQ8iFXBFXbZY9ehqR4HabWCi5T0ybIzZPeww</tt></li>
<li>Disclosure:<br/>
<tt>WyJIYlE0WDhzclZXM1FEeG5JSmRxeU9BIiwgImhlYWx0aFByb2Zlc3Npb25h</tt><br/>
<tt>bCIsICI4ODMxMTAwMDAwMTUzNzYiXQ</tt></li>
<li>Contents:
<tt>["HbQ4X8srVW3QDxnIJdqyOA", "healthProfessional",</tt><br/>
<tt>"883110000015376"]</tt></li>
</ul>
<t>The following is how an SD-JWT+KB that discloses only <tt>type</tt>, <tt>medicinalProductName</tt>, <tt>atcCode</tt> of the vaccine, <tt>type</tt> of the <tt>recipient</tt>, <tt>type</tt>, <tt>order</tt> and <tt>dateOfVaccination</tt> could look like:</t>

<sourcecode type="txt"><![CDATA[eyJhbGciOiAiRVMyNTYiLCAidHlwIjogImV4YW1wbGUrc2Qtand0In0.eyJAY29udGV4
dCI6IFsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCAiaHR0
cHM6Ly93M2lkLm9yZy92YWNjaW5hdGlvbi92MSJdLCAidHlwZSI6IFsiVmVyaWZpYWJs
ZUNyZWRlbnRpYWwiLCAiVmFjY2luYXRpb25DZXJ0aWZpY2F0ZSJdLCAiaXNzdWVyIjog
Imh0dHBzOi8vZX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bGUub3JnIiwgImlhdCI6IDE3MTgyOTg3NjYsICJzZF9oYXNoIjogIkd5TDk3S
m5CZkMxWUVKdS1pZC1nVU8wejQyZ0dmWUp5V01nTnZPUDBHTGsifQ.6dLWIuv75ruyn7
Eb4nc07KiGwRgeWfo9tgOBy5rZ17jakNHdi_pUoSDtV6xHxAJz5AQkVPLeOyDQxvA29k
5LRA
]]>
</sourcecode>
<t>After the validation, the Verifier will have the following data for further processing:</t>

<sourcecode type="json"><![CDATA[{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/vaccination/v1"
  ],
  "type": [
    "VerifiableCredential",
    "VaccinationCertificate"
  ],
  "issuer": "https://example.com/issuer",
  "issuanceDate": "2023-02-09T11:01:59Z",
  "expirationDate": "2028-02-08T11:01:59Z",
  "name": "COVID-19 Vaccination Certificate",
  "description": "COVID-19 Vaccination Certificate",
  "credentialSubject": {
    "vaccine": {
      "type": "Vaccine",
      "atcCode": "J07BX03",
      "medicinalProductName": "COVID-19 Vaccine Moderna"
    },
    "recipient": {
      "type": "VaccineRecipient"
    },
    "type": "VaccinationEvent",
    "order": "3/3",
    "dateOfVaccination": "2021-06-23T13:40:12Z"
  },
  "cnf": {
    "jwk": {
      "kty": "EC",
      "crv": "P-256",
      "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc",
      "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ"
    }
  }
}
]]>
</sourcecode>
</section>

<section anchor="elliptic-curve-key-used-in-the-examples"><name>Elliptic Curve Key Used in the Examples</name>
<t>The following Elliptic Curve public key, represented in JWK format, can be used to validate the Issuer signatures in the above examples:</t>

<artwork><![CDATA[{
  "kty": "EC",
  "crv": "P-256",
  "x": "b28d4MwZMjw8-00CG4xfnn9SLMVMM19SlqZpVb_uNtQ",
  "y": "Xv5zWwuoaTgdS6hV43yI6gBwTnjukmFQQnJ_kCxzqk8"
}
]]>
</artwork>
<t>The public key used to validate a Key Binding JWT can be found in the examples as the content of the <tt>cnf</tt> claim.</t>
</section>
</section>

<section anchor="disclosure_format_considerations"><name>Disclosure Format Considerations</name>
<t>As described in <xref target="creating_disclosures"/>, the Disclosure structure is JSON containing salt and the
cleartext content of a claim, which is base64url encoded. The encoded value is the input used to calculate
a digest for the respective claim. The inclusion of digest value in the signed JWT ensures the integrity of
the claim value. Using encoded content as the input to the integrity mechanism is conceptually similar to the
approach in JWS and particularly useful when the content, like JSON, can have differences but be semantically
equivalent. Some further discussion of the considerations around this design decision follows.</t>
<t>When receiving an SD-JWT, a Verifier must
be able to re-compute digests of the disclosed claim values and, given
the same input values, obtain the same digest values as signed by the
Issuer.</t>
<t>Usually, JSON-based formats transport claim values as simple properties of a JSON object such as this:</t>

<artwork><![CDATA[...
  "family_name": "Möbius",
  "address": {
    "street_address": "Schulstr. 12",
    "locality": "Schulpforta"
  }
...
]]>
</artwork>
<t>However, a problem arises when computation over the data need to be performed and verified, like signing or computing digests. Common signature schemes require the same byte string as input to the
signature verification as was used for creating the signature. In the digest approach outlined above, the same problem exists: for the Issuer and the
Verifier to arrive at the same digest, the same byte string must be hashed.</t>
<t>JSON, however, does not prescribe a unique encoding for data, but allows for variations in the encoded string. The data above, for example, can be encoded as</t>

<artwork><![CDATA[...
"family_name": "M\u00f6bius",
"address": {
  "street_address": "Schulstr. 12",
  "locality": "Schulpforta"
}
...
]]>
</artwork>
<t>or as</t>

<artwork><![CDATA[...
"family_name": "Möbius",
"address": {"locality":"Schulpforta", "street_address":"Schulstr. 12"}
...
]]>
</artwork>
<t>The two representations of the value in <tt>family_name</tt> are very different on the byte-level, but yield
equivalent objects. Same for the representations of <tt>address</tt>, varying in white space and order of elements in the object.</t>
<t>The variations in white space, ordering of object properties, and
encoding of Unicode characters are all allowed by the JSON
specification, including further variations, e.g., concerning
floating-point numbers, as described in <xref target="RFC8785"/>. Variations can be
introduced whenever JSON data is serialized or deserialized and unless
dealt with, will lead to different digests and the inability to verify
signatures.</t>
<t>There are generally two approaches to deal with this problem:</t>

<ol spacing="compact">
<li>Canonicalization: The data is transferred in JSON format, potentially
introducing variations in its representation, but is transformed into a
canonical form before computing a digest. Both the Issuer and the Verifier
must use the same canonicalization algorithm to arrive at the same byte
string for computing a digest.</li>
<li>Source string hardening: Instead of transferring data in a format that
may introduce variations, a representation of the data is serialized.
This representation is then used as the hashing input at the Verifier,
but also transferred to the Verifier and used for the same digest
calculation there. This means that the Verifier can easily compute and check the
digest of the byte string before finally deserializing and
accessing the data.</li>
</ol>
<t>Mixed approaches are conceivable, i.e., transferring both the original JSON data
plus a string suitable for computing a digest, but such approaches can easily lead to
undetected inconsistencies resulting in time-of-check-time-of-use type security
vulnerabilities.</t>
<t>In this specification, the source string hardening approach is used, as
it allows for simple and reliable interoperability without the
requirement for a canonicalization library. To harden the source string,
any serialization format that supports the necessary data types could
be used in theory, like protobuf, msgpack, or pickle. In this
specification, JSON is used and plaintext contents of each Disclosure are encoded using base64url-encoding
for transport. This approach means that SD-JWTs can be implemented purely based
on widely available JWT, JSON, and Base64 encoding and decoding libraries.</t>
<t>A Verifier can then easily check the digest over the source string before
extracting the original JSON data. Variations in the encoding of the source
string are implicitly tolerated by the Verifier, as the digest is computed over a
predefined byte string and not over a JSON object.</t>
<t>It is important to note that the Disclosures are neither intended nor
suitable for direct consumption by
an application that needs to access the disclosed claim values after the verification by the Verifier. The
Disclosures are only intended to be used by a Verifier to check
the digests over the source strings and to extract the original JSON
data. The original JSON data is then used by the application. See
<xref target="verifier_verification"/> for details.</t>
</section>

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

<ul spacing="compact">
<li>Distinguished SD-JWT from SD-JWT+KB</li>
<li>Provide ABNF for the SD-JWT, SD-JWT+KB, and various constituent parts</li>
<li>New structure for JSON-serialized SD-JWTs/KB-JWTs to better align with JAdES.</li>
<li>Attempt to better explain how salt in the Disclosure makes guessing the preimage of the digest infeasible</li>
<li>Consolidate salt entropy and length security consideration subsections</li>
<li>Unnumbered most of the examples for improved clarity</li>
<li>More definitive language around the exclusive use of the <tt>cnf</tt> claim for enabling Key Binding</li>
</ul>
<t>-08</t>

<ul spacing="compact">
<li>Make RFCs 0020 and 7515 normative references</li>
<li>Be a bit more prescriptive in suggesting RFC7800 cnf/jwk be used to convey the Key Binding key</li>
<li>Editorial changes aimed at improved clarity</li>
<li>Improve unlinkability considerations, mention that different KB keys must be used</li>
<li>Remove the explicit prohibition on HMAC</li>
<li>Remove mention of unspecified key binding methods and the Enveloping SD-JWTs section</li>
<li>Editorial updates aimed at more consistent treatment of a Disclosure vs the contents of a Disclosure</li>
<li>Update PID example</li>
<li>Be more explicit that the VCDM and SD-JWT VC examples are only illustrative and do not define anything</li>
</ul>
<t>-07</t>

<ul spacing="compact">
<li>Reference RFC4086 in security considerations about salt entropy</li>
<li>Update change controller for the Structured Syntax Suffix registration from IESG to IETF per IANA suggestion</li>
<li>Strengthen security considerations around claims controlling the validity of the SD-JWT not being selectively disclosable</li>
<li>Expand/rework considerations on the choice of hash algorithm</li>
<li>Clarify validation around no duplicate digests in the payload (directly or recursively) and no unused disclosures at the end of processing</li>
<li>Better describe and illustrate the tilde separated format</li>
<li>Change claim name from <tt>_sd_hash</tt> to <tt>sd_hash</tt></li>
</ul>
<t>-06</t>

<ul spacing="compact">
<li>Added hash of Issuer-signed part and Disclosures in KB-JWT</li>
<li>Fix minor issues in some examples</li>
<li>Added IANA media type registration request for the JSON Serialization</li>
<li>More precise wording around storing artifacts with sensitive data</li>
<li>The claim name <tt>_sd</tt> or <tt>...</tt> must not be used in a disclosure.</li>
<li>Added JWT claims registration requests to IANA</li>
<li>Ensure claims that control validity are checked after decoding payload</li>
<li>Restructure sections around data formats and Example 1</li>
<li>Update JSON Serialization to remove the kb_jwt member and allow for the disclosures to be conveyed elsewhere</li>
<li>Expand the Enveloping SD-JWTs section to also discuss enveloping JSON serialized SD-JWTs</li>
</ul>
<t>-05</t>

<ul spacing="compact">
<li>Consolidate processing rules for Holder and Verifier</li>
<li>Add support for selective disclosure of array elements.</li>
<li>Consolidate SD-JWT terminology and format</li>
<li>Use the term Key Binding rather than Holder Binding</li>
<li>Defined the structure of the Key Binding JWT</li>
<li>Added a JWS JSON Serialization</li>
<li>Added initial IANA media type and structured suffix registration requests</li>
<li>Added recommendation for explicit typing of SD-JWTs</li>
<li>Added considerations around forwarding credentials</li>
<li>Removed Example 2b and merged the demo of decoy digests into Example 2a</li>
<li>Improved example for allowed variations in Disclosures</li>
<li>Added some text to the Abstract and Introduction to be more inclusive of JWS with JSON</li>
<li>Added some security considerations text about the scope of the Key Binding JWT</li>
<li>Aligned examples structure and used the term input claim set</li>
<li>Replaced the general SD-JWT VC example with one based on Person Identification Data (PID) from the European Digital Identity Wallet Architecture and Reference Framework</li>
<li>Added/clarified some privacy considerations in Confidentiality during Transport</li>
<li>No longer recommending a claim name for enveloped SD-JWTs</li>
<li>Mention prospective future PQ algs for JWS</li>
<li>Include the public key in the draft, which can be used to verify the issuer signature examples</li>
<li>Clarify that <tt>_sd_alg</tt> can only be at the top level of the SD-JWT payload</li>
<li>Externalized the SD-JWT library that generates examples</li>
<li>Attempt to improve description of security properties</li>
</ul>
<t>-04</t>

<ul spacing="compact">
<li>Improve description of processing of disclosures</li>
</ul>
<t>-03</t>

<ul spacing="compact">
<li>Clarify that other specifications may define enveloping multiple Combined Formats for Presentation</li>
<li>Add an example of W3C vc-data-model that uses a JSON-LD object as the claims set</li>
<li>Clarify requirements for the combined formats for issuance and presentation</li>
<li>Added overview of the Security Considerations section</li>
<li>Enhanced examples in the Privacy Considerations section</li>
<li>Allow for recursive disclosures</li>
<li>Discussion on holder binding and privacy of stored credentials</li>
<li>Add some context about SD-JWT being general-purpose despite being a product of the OAuth WG</li>
<li>More explicitly say that SD-JWTs have to be signed asymmetrically (no MAC and no <tt>none</tt>)</li>
<li>Make sha-256 the default hash algorithm, if the hash alg claim is omitted</li>
<li>Use ES256 instead of RS256 in examples</li>
<li>Rename and move the c14n challenges section to an appendix</li>
<li>A bit more in security considerations for Choice of a Hash Algorithm (1st &amp; 2nd preimage resistant and not majorly truncated)</li>
<li>Remove the notational figures from the Concepts section</li>
<li>Change salt to always be a string (rather than any JSON type)</li>
<li>Fix the Document History (which had a premature list for -03)</li>
</ul>
<t>-02</t>

<ul spacing="compact">
<li>Disclosures are now delivered not as a JWT but as separate base64url-encoded JSON objects.</li>
<li>In the SD-JWT, digests are collected under a <tt>_sd</tt> claim per level.</li>
<li>Terms "II-Disclosures" and "HS-Disclosures" are replaced with "Disclosures".</li>
<li>Holder Binding is now separate from delivering the Disclosures and implemented, if required, with a separate JWT.</li>
<li>Examples updated and modified to properly explain the specifics of the new SD-JWT format.</li>
<li>Examples are now pulled in from the examples directory, not inlined.</li>
<li>Updated and automated the W3C VC example.</li>
<li>Added examples with multibyte characters to show that the specification and demo code work well with UTF-8.</li>
<li>reverted back to hash alg from digest derivation alg (renamed to <tt>_sd_alg</tt>)</li>
<li>reformatted</li>
</ul>
<t>-01</t>

<ul spacing="compact">
<li>introduced blinded claim names</li>
<li>explained why JSON-encoding of values is needed</li>
<li>explained merging algorithm ("processing model")</li>
<li>generalized hash alg to digest derivation alg which also enables HMAC to calculate digests</li>
<li><tt>_sd_hash_alg</tt> renamed to <tt>sd_digest_derivation_alg</tt></li>
<li>Salt/Value Container (SVC) renamed to Issuer-Issued Disclosures (II-Disclosures)</li>
<li>SD-JWT-Release (SD-JWT-R) renamed to Holder-Selected Disclosures (HS-Disclosures)</li>
<li><tt>sd_disclosure</tt> in II-Disclosures renamed to <tt>sd_ii_disclosures</tt></li>
<li><tt>sd_disclosure</tt> in HS-Disclosures renamed to <tt>sd_hs_disclosures</tt></li>
<li>clarified relationship between <tt>sd_hs_disclosure</tt> and SD-JWT</li>
<li>clarified combined formats for issuance and presentation</li>
<li>clarified security requirements for blinded claim names</li>
<li>improved description of Holder Binding security considerations - especially around the usage of "alg=none".</li>
<li>updated examples</li>
<li>text clarifications</li>
<li>fixed <tt>cnf</tt> structure in examples</li>
<li>added feature summary</li>
</ul>
<t>-00</t>

<ul spacing="compact">
<li>Upload as draft-ietf-oauth-selective-disclosure-jwt-00</li>
</ul>
<t>[[ pre Working Group Adoption: ]]</t>
<t>-02</t>

<ul spacing="compact">
<li>Added acknowledgements</li>
<li>Improved Security Considerations</li>
<li>Stressed entropy requirements for salts</li>
<li>Python reference implementation clean-up and refactoring</li>
<li><tt>hash_alg</tt> renamed to <tt>_sd_hash_alg</tt></li>
</ul>
<t>-01</t>

<ul spacing="compact">
<li>Editorial fixes</li>
<li>Added <tt>hash_alg</tt> claim</li>
<li>Renamed <tt>_sd</tt> to <tt>sd_digests</tt> and <tt>sd_release</tt></li>
<li>Added descriptions on Holder Binding - more work to do</li>
<li>Clarify that signing the SD-JWT is mandatory</li>
</ul>
<t>-00</t>

<ul spacing="compact">
<li>Renamed to SD-JWT (focus on JWT instead of JWS since signature is optional)</li>
<li>Make Holder Binding optional</li>
<li>Rename proof to release, since when there is no signature, the term "proof" can be misleading</li>
<li>Improved the structure of the description</li>
<li>Described verification steps</li>
<li>All examples generated from python demo implementation</li>
<li>Examples for structured objects</li>
</ul>
</section>

</back>

</rfc>
