<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-fett-oauth-selective-disclosure-jwt-01" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" consensus="true">

<front>
<title abbrev="SD-JWT">Selective Disclosure JWT (SD-JWT)</title><seriesInfo value="draft-fett-oauth-selective-disclosure-jwt-01" stream="IETF" status="standard" name="Internet-Draft"></seriesInfo>
<author initials="D." surname="Fett" fullname="Daniel Fett"><organization>yes.com</organization><address><postal><street></street>
</postal><email>mail@danielfett.de</email>
<uri>https://danielfett.de/</uri>
</address></author>
<author initials="K." surname="Yasuda" fullname="Kristina Yasuda"><organization>Microsoft</organization><address><postal><street></street>
</postal><email>Kristina.Yasuda@microsoft.com</email>
</address></author>
<date/>
<area>Security</area>
<workgroup>Web Authorization Protocol</workgroup>
<keyword>security</keyword>
<keyword>oauth2</keyword>

<abstract>
<t>This document specifies conventions for creating JSON Web Token (JWT)
documents that support selective disclosure of JWT claim values.</t>
</abstract>

</front>

<middle>

<section anchor="Introduction"><name>Introduction</name>
<t>The JSON-based claims in a signed JSON Web Token (JWT) <xref target="RFC7519"></xref> document are
secured against modification using JSON Web Signature (JWS) <xref target="RFC7515"></xref> digital
signatures. A consumer of a signed JWT document that has checked the document's
signature can safely assume that the contents of the document have not been
modified.  However, anyone receiving an unencrypted JWT can read all of the
claims and likewise, anyone with the decryption key receiving an encrypted JWT
can also read all of the claims.</t>
<t>This document describes a format for signed JWTs that support selective
disclosure (SD-JWT), enabling sharing only a subset of the claims included in
the original signed JWT instead of releasing all the claims to every verifier.
During issuance, an SD-JWT is sent from the issuer to the holder alongside an
SD-JWT Salt/Value Container (SVC), a JSON object that contains the mapping
between raw claim values contained in the SD-JWT and the salts for each claim
value.</t>
<t>This document also defines a format for SD-JWT Releases (SD-JWT-R), which convey
a subset of the claim values of an SD-JWT to the verifier. For presentation, the
holder creates an SD-JWT-R and sends it together with the SD-JWT to the
verifier. To verify claim values received in SD-JWT-R, the verifier uses the
salts values in the SD-JWT-R to compute the hashes of the claim values and
compare them to the hashes in the SD-JWT.</t>
<t>One of the common use cases of a signed JWT is representing a user's identity
created by an issuer. As long as the signed JWT is one-time use, it typically
only contains those claims the user has consented to release to a specific
verifier. However, when a signed JWT is intended to be multi-use, it needs to
contain the superset of all claims the user might want to release 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.</t>
<t>One example of such a multi-use JWT is a verifiable credential, a
tamper-evident credential with a cryptographically verifiable authorship that
contains claims about a subject. SD-JWTs defined in this document enable such
selective disclosure of claims.</t>
<t>While JWTs for claims describing natural persons are a common use case, the
mechanisms defined in this document can be used for many other use cases as
well.</t>
<t>This document also describes holder binding, or the concept of binding SD-JWT to
key material controlled by the subject of SD-JWT. Holder binding is optional to
implement.</t>

<section anchor="conventions-and-terminology"><name>Conventions and Terminology</name>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL
NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;,
&quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> 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"></xref>.</t>
</section>
</section>

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

<dl>
<dt>Selective Disclosure JWT (SD-JWT)</dt>
<dd><t>A JWT <xref target="RFC7515"></xref> created by the issuer, which is signed as a JWS <xref target="RFC7515"></xref>,
that supports selective disclosure as defined in this document.</t>
</dd>
<dt>SD-JWT Salt/Value Container (SVC)</dt>
<dd><t>A JSON object created by the issuer that contains mapping between
raw claim values contained in the SD-JWT and the salts for each claim value.</t>
</dd>
<dt>SD-JWT Release (SD-JWT-R)</dt>
<dd><t>A JWT created by the holder that contains a subset of the claim values of an SD-JWT in a verifiable way.</t>
</dd>
<dt>Holder binding</dt>
<dd><t>Ability of the holder to prove legitimate possession of SD-JWT by proving
control over the same private key during the issuance and presentation. SD-JWT signed by the issuer contains
a public key or a reference to a public key that matches to the private key controlled by the holder.</t>
</dd>
<dt>Issuer</dt>
<dd><t>An entity that creates SD-JWTs (2.1).</t>
</dd>
<dt>Holder</dt>
<dd><t>An entity that received SD-JWTs (2.1) from the issuer and has control over them.</t>
</dd>
<dt>Verifier</dt>
<dd><t>An entity that requests, checks and extracts the claims from SD-JWT-R (2.2)</t>
</dd>
</dl>
<t>Note: discuss if we want to include Client, Authorization Server for the purpose of
ensuring continuity and separating the entity from the actor.</t>
</section>

<section anchor="flow-diagram"><name>Flow Diagram</name>
<figure><name>SD-JWT Issuance and Presentation Flow
</name>
<sourcecode type="ascii-art">           +------------+
           |            |
           |   Issuer   |
           |            |
           +------------+
                 |
               Issues
           SD-JWT and SVC
                 |
                 v
           +------------+
           |            |
           |   Holder   |
           |            |
           +------------+
                 |
              Presents
         SD-JWT-R and SD-JWT
                 |
                 v
           +-------------+
           |             |+
           |  Verifiers  ||+
           |             |||
           +-------------+||
            +-------------+|
             +-------------+
</sourcecode>
</figure>
</section>

<section anchor="concepts"><name>Concepts</name>
<t>In the following, the contents of SD-JWTs and SD-JWT Releases are described at a
conceptual level, abstracting from the data formats described afterwards.</t>

<section anchor="creating-an-sd-jwt"><name>Creating an SD-JWT</name>
<t>An SD-JWT, at its core, is a digitally signed document containing hashes over the claim values with unique salts and other metadata.
It MUST be digitally signed using the issuer's private key.</t>

<artwork>SD-JWT-DOC = (METADATA, SD-CLAIMS)
SD-JWT = SD-JWT-DOC | SIG(SD-JWT-DOC, ISSUER-PRIV-KEY)
</artwork>
<t><tt>SD-CLAIMS</tt> can be a simple object with claim names mapped to hashes over the claim values with unique salts:</t>

<artwork>SD-CLAIMS = (
    CLAIM-NAME: HASH(SALT | CLAIM-VALUE)
)*
</artwork>
<t><tt>SD-CLAIMS</tt> can also be nested deeper to capture more complex objects, as will be shown later.</t>
<t><tt>SD-JWT</tt> is sent from the issuer to the holder, together with the mapping of the plain-text claim values, the salt values, and potentially some other information.</t>
</section>

<section anchor="creating-an-sd-jwt-release"><name>Creating an SD-JWT Release</name>
<t>To disclose to a verifier a subset of the SD-JWT claim values, a holder creates a JWT such as the
following:</t>

<artwork>SD-JWT-RELEASE-DOC = (METADATA, SD-RELEASES)
SD-JWT-RELEASE = SD-JWT-RELEASE-DOC
</artwork>
<t><tt>SD-RELEASES</tt> follows the structure of <tt>SD-CLAIMS</tt> and can be a simple object with claim names mapped to values and salts:</t>

<artwork>SD-RELEASES = (
    CLAIM-NAME: (DISCLOSED-SALT, DISCLOSED-VALUE)
)
</artwork>
<t>Just as <tt>SD-CLAIMS</tt>, <tt>SD-RELEASES</tt> can be more complex as well.</t>
<t><tt>SD-JWT-RELEASE</tt> is sent together with <tt>SD-JWT</tt> from the holder to the
verifier.</t>
</section>

<section anchor="optional-holder-binding"><name>Optional Holder Binding</name>
<t>Some use-cases may require holder binding.</t>
<t>If holder binding is desired, <tt>SD-JWT</tt> must contain information about key material controlled by the holder:</t>

<artwork>SD-JWT-DOC = (METADATA, HOLDER-PUBLIC-KEY, SD-CLAIMS)
</artwork>
<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. Examples in this document use <tt>sub_jwt</tt> Claim to include raw public key by value in SD-JWT.</t>
<t>With holder binding, the <tt>SD-JWT-RELEASE</tt> is signed by the holder using its private key. It therefore looks as follows:</t>

<artwork>SD-JWT-RELEASE = SD-JWT-RELEASE-DOC | SIG(SD-JWT-RELEASE-DOC, HOLDER-PRIV-KEY)
</artwork>
</section>

<section anchor="verifying-an-sd-jwt-release"><name>Verifying an SD-JWT Release</name>
<t>A verifier checks that</t>

<ul>
<li><t>for each claim in <tt>SD-JWT-RELEASE</tt>, the hash <tt>HASH(DISCLOSED-SALT | DISCLOSED-VALUE)</tt>
matches the hash under the given claim name in <tt>SD-JWT</tt>.</t>
</li>
<li><t>if holder binding is desired, the <tt>SD-JWT-RELEASE</tt> was signed by
the private key belonging to <tt>HOLDER-PUBLIC-KEY</tt>.</t>
</li>
</ul>
<t>The detailed algorithm is described below.</t>
</section>
</section>

<section anchor="data-formats"><name>Data Formats</name>
<t>This section defines data formats for SD-JWTs (containing hashes of the salted
claim values), SD-JWT Salt/Value Containers (containing the mapping of the
plain-text claim values and the salt values), and SD-JWT Releases (containing a
subset of the same mapping).</t>

<section anchor="format-of-an-sd-jwt"><name>Format of an SD-JWT</name>
<t>An SD-JWT is a JWT that MUST be signed using the issuer's private key. The
payload of an SD-JWT MUST contain the <tt>sd_digests</tt> and <tt>hash_alg</tt> claims
described in the following, and MAY contain a holder's public key or a reference
thereto, as well as further claims such as <tt>iss</tt>, <tt>iat</tt>, etc. as defined or
required by the application using SD-JWTs.</t>

<section anchor="sd-digests-claim-digests-of-selectively-disclosable-claims"><name><tt>sd_digests</tt> Claim (Digests of Selectively Disclosable Claims)</name>
<t>An SD-JWT MUST include hashes of the salted claim values that are included by the issuer
under the property <tt>sd_digests</tt>.</t>
<t>The issuer MUST choose a unique salt value for each claim value. Each salt value
MUST contain at least 128 bits of pseudorandom data, making it hard for an
attacker to guess. The salt value MUST then be encoded as a string. It is
RECOMMENDED to base64url-encode at least 16 pseudorandom bytes.</t>
<t>The issuer MUST build the hashes by hashing over a string that is formed by
JSON-encoding an ordered array containing the salt and the claim value, e.g.:
<tt>[&quot;6qMQvRL5haj&quot;,&quot;Peter&quot;]</tt>. The hash value is then base64url-encoded. Note that
the precise JSON encoding can vary, and therefore, the JSON encodings MUST be
sent to the holder along with the SD-JWT, as described below.</t>

<section anchor="flat-and-structured-sd-digests-objects"><name>Flat and Structured <tt>sd_digests</tt> objects</name>
<t>The <tt>sd_digests</tt> object can be a 'flat' object, directly containing all claim
names and hashed claim values without any deeper structure. The <tt>sd_digests</tt>
object can also be a 'structured' object, where some claims and their respective
hashes are contained in places deeper in the structure. It is at the issuer's
discretion whether to use a 'flat' or 'structured' <tt>sd_digests</tt> SD-JWT object,
and how to structure it such that it is suitable for the use case.</t>
<t>Example 1 below is a non-normative example of an SD-JWT using a 'flat'
<tt>sd_digests</tt> object and Example 2 in the appendix shows a non-normative example
of an SD-JWT using a 'structured' <tt>sd_digests</tt> object. The difference between
the examples is how the <tt>address</tt> claim is disclosed.</t>
<t>Appendix 2 shows a more complex example using claims from eKYC (todo:
reference).</t>
</section>
</section>

<section anchor="hash-function-claim"><name>Hash Function Claim</name>
<t>The claim <tt>hash_alg</tt> indicates the hash algorithm used by the Issuer to generate
the hashes of the salted claim values. The hash algorithm identifier MUST be a
value from the &quot;Hash Name String&quot; column in the IANA &quot;Named Information Hash
Algorithm&quot; registry [IANA.Hash.Algorithms]. SD-JWTs with hash algorithm
identifiers not found in this registry are not considered valid and MUST NOT be
accepted by verifiers.</t>
</section>

<section anchor="holder-public-key-claim"><name>Holder Public Key Claim</name>
<t>If the issuer wants to enable holder binding, it MAY include a public key
associated with the holder, or a reference thereto.</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 provide a key pair 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: need to define how holder public key is included, right now examples are using <tt>sub_jwk</tt> I think.</t>
</section>
</section>

<section anchor="example-1-sd-jwt"><name>Example 1: SD-JWT</name>
<t>This example and Example 2 in the appendix use the following object as the set
of claims that the Issuer is issuing:</t>

<sourcecode anchor="example-simple-sd-jwt-claims" type="json">{
  &quot;sub&quot;: &quot;6c5c0a49-b589-431d-bae7-219122a9ec2c&quot;,
  &quot;given_name&quot;: &quot;John&quot;,
  &quot;family_name&quot;: &quot;Doe&quot;,
  &quot;email&quot;: &quot;johndoe@example.com&quot;,
  &quot;phone_number&quot;: &quot;+1-202-555-0101&quot;,
  &quot;address&quot;: {
    &quot;street_address&quot;: &quot;123 Main St&quot;,
    &quot;locality&quot;: &quot;Anytown&quot;,
    &quot;region&quot;: &quot;Anystate&quot;,
    &quot;country&quot;: &quot;US&quot;
  },
  &quot;birthdate&quot;: &quot;1940-01-01&quot;
}
</sourcecode>
<t>The following non-normative example shows the payload of an SD-JWT. The issuer
is using a flat structure, i.e., all of the claims the <tt>address</tt> claim can only
be disclosed in full.</t>

<sourcecode anchor="example-simple-sd-jwt-payload" type="json">{
  &quot;iss&quot;: &quot;https://example.com/issuer&quot;,
  &quot;sub_jwk&quot;: {
    &quot;kty&quot;: &quot;RSA&quot;,
    &quot;n&quot;: &quot;pm4bOHBg-oYhAyPWzR56AWX3rUIXp11_ICDkGgS6W3ZWLts-hzwI3x65659kg4hVo9dbGoCJE3ZGF_eaetE30UhBUEgpGwrDrQiJ9zqprmcFfr3qvvkGjtth8Zgl1eM2bJcOwE7PCBHWTKWYs152R7g6Jg2OVph-a8rq-q79MhKG5QoW_mTz10QT_6H4c7PjWG1fjh8hpWNnbP_pv6d1zSwZfc5fl6yVRL0DV0V3lGHKe2Wqf_eNGjBrBLVklDTk8-stX_MWLcR-EGmXAOv0UBWitS_dXJKJu-vXJyw14nHSGuxTIK2hx1pttMft9CsvqimXKeDTU14qQL1eE7ihcw&quot;,
    &quot;e&quot;: &quot;AQAB&quot;
  },
  &quot;hash_alg&quot;: &quot;sha-256&quot;,
  &quot;iat&quot;: 1516239022,
  &quot;exp&quot;: 1516247022,
  &quot;sd_digests&quot;: {
    &quot;sub&quot;: &quot;LbnhkOr5oS7KjeUrxezAu8TG0CpWz0jSixy6tffuo04&quot;,
    &quot;given_name&quot;: &quot;fUMdn88aaoyKTHrvZd6AuLmPraGhPJ0zF5r_JhxCVZs&quot;,
    &quot;family_name&quot;: &quot;9h5vgv6TpFV6GmnPtugiMLl5tHetHeb5X_2cKHjN7cw&quot;,
    &quot;email&quot;: &quot;fPZ92dtYMCN2Nb-2ac_zSH19p4yakUXrZl_-wSgaazA&quot;,
    &quot;phone_number&quot;: &quot;QdSffzNzzd0n60MsSmuiKj6Y6Enk2b-BS-KtEePde5M&quot;,
    &quot;address&quot;: &quot;JFu99NUXPq55f6DFBZ22rMkxMNHayCrfPG0FDsqbyDs&quot;,
    &quot;birthdate&quot;: &quot;Ia1Tc6_Xnt5CJc2LtKcu6Wvqr42glBGGcjGOye8Zf3U&quot;
  },
  &quot;hash_alg&quot;: &quot;sha-256&quot;
}
</sourcecode>
<t>The SD-JWT is then signed by the issuer to create a document like the following:</t>

<artwork anchor="example-simple-sd-jwt-encoded">eyJhbGciOiAiUlMyNTYifQ.eyJpc3MiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1ZXI
iLCAic3ViX2p3ayI6IHsia3R5IjogIlJTQSIsICJuIjogInBtNGJPSEJnLW9ZaEF5UFd6U
jU2QVdYM3JVSVhwMTFfSUNEa0dnUzZXM1pXTHRzLWh6d0kzeDY1NjU5a2c0aFZvOWRiR29
DSkUzWkdGX2VhZXRFMzBVaEJVRWdwR3dyRHJRaUo5enFwcm1jRmZyM3F2dmtHanR0aDhaZ
2wxZU0yYkpjT3dFN1BDQkhXVEtXWXMxNTJSN2c2SmcyT1ZwaC1hOHJxLXE3OU1oS0c1UW9
XX21UejEwUVRfNkg0YzdQaldHMWZqaDhocFdObmJQX3B2NmQxelN3WmZjNWZsNnlWUkwwR
FYwVjNsR0hLZTJXcWZfZU5HakJyQkxWa2xEVGs4LXN0WF9NV0xjUi1FR21YQU92MFVCV2l
0U19kWEpLSnUtdlhKeXcxNG5IU0d1eFRJSzJoeDFwdHRNZnQ5Q3N2cWltWEtlRFRVMTRxU
UwxZUU3aWhjdyIsICJlIjogIkFRQUIifSwgImlhdCI6IDE1MTYyMzkwMjIsICJleHAiOiA
xNTE2MjQ3MDIyLCAiX3NkIjogeyJzdWIiOiAiTGJuaGtPcjVvUzdLamVVcnhlekF1OFRHM
ENwV3owalNpeHk2dGZmdW8wNCIsICJnaXZlbl9uYW1lIjogImZVTWRuODhhYW95S1RIcnZ
aZDZBdUxtUHJhR2hQSjB6RjVyX0poeENWWnMiLCAiZmFtaWx5X25hbWUiOiAiOWg1dmd2N
lRwRlY2R21uUHR1Z2lNTGw1dEhldEhlYjVYXzJjS0hqTjdjdyIsICJlbWFpbCI6ICJmUFo
5MmR0WU1DTjJOYi0yYWNfelNIMTlwNHlha1VYclpsXy13U2dhYXpBIiwgInBob25lX251b
WJlciI6ICJRZFNmZnpOenpkMG42ME1zU211aUtqNlk2RW5rMmItQlMtS3RFZVBkZTVNIiw
gImFkZHJlc3MiOiAiSkZ1OTlOVVhQcTU1ZjZERkJaMjJyTWt4TU5IYXlDcmZQRzBGRHNxY
nlEcyIsICJiaXJ0aGRhdGUiOiAiSWExVGM2X1hudDVDSmMyTHRLY3U2V3ZxcjQyZ2xCR0d
jakdPeWU4WmYzVSJ9LCAiaGFzaF9hbGciOiAic2hhLTI1NiJ9.FfUbeF_py0aTQ6XHamsX
PNd0LopmZPXdA3iOaCpK9G11SUrzEo8BrmzsqHCbEIDXUxM_CXjslvBYaFF0J374Xwyuxw
t-tLsnXUEglqze_mzEKyvgC9rpHp18Fmcuv3KYYMD6-c6_yBPMS5ocf4v-Hn-VBzJLs81g
BP1QiCgHIoFE8OHBBiZK3ynoqWEWskx_4Q1-8cDUprPmWYF0ik7LgnQwgoZKig-_AVqTma
ckYaRT1PjLW8ULgKBb6jgmkq-ge_yMGz0SM_i-ZbjPUIJb9WC5jqb7dXyXDALFEDiArv6n
a59mbieucYA0wKIWleuww0ci4hOfrnA-dQxPcMKYvw
</artwork>
<t>(Line breaks for presentation only.)</t>
</section>

<section anchor="format-of-a-sd-jwt-salt-value-container-svc"><name>Format of a SD-JWT Salt/Value Container (SVC)</name>
<t>Besides the SD-JWT itself, the holder needs to learn the raw claim values that
are contained in the SD-JWT, along with the precise input to the hash
calculation, and the salts. There MAY be other information the issuer needs to
communicate to the holder, such as a private key if the issuer selected the
holder key pair.</t>
<t>A SD-JWT Salt/Value Container (SVC) is a JSON object containing at least the
top-level property <tt>sd_release</tt>. Its structure mirrors the one of <tt>sd_digests</tt> in
the SD-JWT, but the values are the inputs to the hash calculations the issuer
used, as strings.</t>
<t>The SVC MAY contain further properties, for example, to transport the holder
private key.</t>
</section>

<section anchor="example-svc-for-the-flat-sd-jwt-in-example-1"><name>Example: SVC for the Flat SD-JWT in Example 1</name>
<t>The SVC for Example 1 is as follows:</t>

<sourcecode anchor="example-simple-svc-payload" type="json">{
  &quot;sd_release&quot;: {
    &quot;sub&quot;: &quot;[\&quot;eluV5Og3gSNII8EYnsxA_A\&quot;, \&quot;6c5c0a49-b589-431d-bae7-219122a9ec2c\&quot;]&quot;,
    &quot;given_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;eI8ZWm9QnKPpNPeNenHdhQ\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;email&quot;: &quot;[\&quot;Qg_O64zqAxe412a108iroA\&quot;, \&quot;johndoe@example.com\&quot;]&quot;,
    &quot;phone_number&quot;: &quot;[\&quot;AJx-095VPrpTtN4QMOqROA\&quot;, \&quot;+1-202-555-0101\&quot;]&quot;,
    &quot;address&quot;: &quot;[\&quot;Pc33JM2LchcU_lHggv_ufQ\&quot;, {\&quot;street_address\&quot;: \&quot;123 Main St\&quot;, \&quot;locality\&quot;: \&quot;Anytown\&quot;, \&quot;region\&quot;: \&quot;Anystate\&quot;, \&quot;country\&quot;: \&quot;US\&quot;}]&quot;,
    &quot;birthdate&quot;: &quot;[\&quot;G02NSrQfjFXQ7Io09syajA\&quot;, \&quot;1940-01-01\&quot;]&quot;
  }
}
</sourcecode>
<t>Important: As described above, hashes are calculated over the string formed by
serializing a JSON array containing the salt and the claim value. This ensures
that issuer and verifier use the same input to their hash functions and avoids
issues with canonicalization of JSON values that would lead to different hash
values. The SVC therefore maps claim names to JSON-encoded arrays.</t>
</section>

<section anchor="sending-sd-jwt-and-svc-during-issuance"><name>Sending SD-JWT and SVC during Issuance</name>
<t>For transporting the SVC together with the SD-JWT from the issuer to the holder,
the SVC is base64url-encoded and appended to the SD-JWT using a period character <tt>.</tt> as the
separator. For Example 1, the combined format looks as follows:</t>

<artwork anchor="example-simple-combined-sd-jwt-svc">eyJhbGciOiAiUlMyNTYifQ.eyJpc3MiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1ZXI
iLCAic3ViX2p3ayI6IHsia3R5IjogIlJTQSIsICJuIjogInBtNGJPSEJnLW9ZaEF5UFd6U
jU2QVdYM3JVSVhwMTFfSUNEa0dnUzZXM1pXTHRzLWh6d0kzeDY1NjU5a2c0aFZvOWRiR29
DSkUzWkdGX2VhZXRFMzBVaEJVRWdwR3dyRHJRaUo5enFwcm1jRmZyM3F2dmtHanR0aDhaZ
2wxZU0yYkpjT3dFN1BDQkhXVEtXWXMxNTJSN2c2SmcyT1ZwaC1hOHJxLXE3OU1oS0c1UW9
XX21UejEwUVRfNkg0YzdQaldHMWZqaDhocFdObmJQX3B2NmQxelN3WmZjNWZsNnlWUkwwR
FYwVjNsR0hLZTJXcWZfZU5HakJyQkxWa2xEVGs4LXN0WF9NV0xjUi1FR21YQU92MFVCV2l
0U19kWEpLSnUtdlhKeXcxNG5IU0d1eFRJSzJoeDFwdHRNZnQ5Q3N2cWltWEtlRFRVMTRxU
UwxZUU3aWhjdyIsICJlIjogIkFRQUIifSwgImlhdCI6IDE1MTYyMzkwMjIsICJleHAiOiA
xNTE2MjQ3MDIyLCAiX3NkIjogeyJzdWIiOiAiTGJuaGtPcjVvUzdLamVVcnhlekF1OFRHM
ENwV3owalNpeHk2dGZmdW8wNCIsICJnaXZlbl9uYW1lIjogImZVTWRuODhhYW95S1RIcnZ
aZDZBdUxtUHJhR2hQSjB6RjVyX0poeENWWnMiLCAiZmFtaWx5X25hbWUiOiAiOW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gICAgImVtYWlsIjogIltcIlFnX082NHpxQXhlNDEyYTEwOGlyb0FcIiwgXCJqb
2huZG9lQGV4YW1wbGUuY29tXCJdIiwKICAgICAgICAicGhvbmVfbnVtYmVyIjogIltcIkF
KeC0wOTVWUHJwVHRONFFNT3FST0FcIiwgXCIrMS0yMDItNTU1LTAxMDFcIl0iLAogICAgI
CAgICJhZGRyZXNzIjogIltcIlBjMzNKTTJMY2hjVV9sSGdndl91ZlFcIiwge1wic3RyZWV
0X2FkZHJlc3NcIjogXCIxMjMgTWFpbiBTdFwiLCBcImxvY2FsaXR5XCI6IFwiQW55dG93b
lwiLCBcInJlZ2lvblwiOiBcIkFueXN0YXRlXCIsIFwiY291bnRyeVwiOiBcIlVTXCJ9XSI
sCiAgICAgICAgImJpcnRoZGF0ZSI6ICJbXCJHMDJOU3JRZmpGWFE3SW8wOXN5YWpBXCIsI
FwiMTk0MC0wMS0wMVwiXSIKICAgIH0KfQ
</artwork>
<t>(Line breaks for presentation only.)</t>
</section>

<section anchor="format-of-an-sd-jwt-release"><name>Format of an SD-JWT Release</name>
<t>SD-JWT-R contains claim values and the salts of the claims that the holder
has consented to release to the Verifier. This enables the Verifier to verify
the claims received from the holder by computing the hash sof the claims
values and the salts revealed in the SD-JWT-R using the hashing algorithm
specified in SD-JWT and comparing them to the hash valued included in SD-JWT.</t>
<t>For each claim, an array of the salt and the claim value is contained in the
<tt>_sd</tt> object. The structure of <tt>_sd</tt> object in the SD-JWT-R is the same as in SD-JWT.</t>
<t>The SD-JWT-R MAY contain further claims, for example, to ensure a binding
to a concrete transaction (in the example the <tt>nonce</tt> and <tt>aud</tt> claims).</t>
<t>When the holder sends the SD-JWT-R to the Verifier, the SD-JWT-R MUST be a JWS
represented as the JWS Compact Serialization as described in
Section 7.1 of <xref target="RFC7515"></xref>.</t>
<t>If holder binding is desired, the SD-JWT-R is signed by the holder. If no
holder binding is to be used, the <tt>none</tt> algorithm is used, i.e., the document
is not signed. TODO: Change to plain base64 to avoid alg=none issues</t>
</section>

<section anchor="example-sd-jwt-release-for-example-1"><name>Example: SD-JWT Release for Example 1</name>
<t>The following is a non-normative example of the contents of an SD-JWT-R for Example 1:</t>

<sourcecode anchor="example-simple-release-payload" type="json">{
  &quot;nonce&quot;: &quot;2GLC42sKQveCfGfryNRN9w&quot;,
  &quot;aud&quot;: &quot;https://example.com/verifier&quot;,
  &quot;sd_release&quot;: {
    &quot;given_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;eI8ZWm9QnKPpNPeNenHdhQ\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;address&quot;: &quot;[\&quot;Pc33JM2LchcU_lHggv_ufQ\&quot;, {\&quot;street_address\&quot;: \&quot;123 Main St\&quot;, \&quot;locality\&quot;: \&quot;Anytown\&quot;, \&quot;region\&quot;: \&quot;Anystate\&quot;, \&quot;country\&quot;: \&quot;US\&quot;}]&quot;
  }
}
</sourcecode>
<t>For each claim, an array of the salt and the claim value is contained in the
<tt>sd_release</tt> object.</t>
<t>Again, the SD-JWT-R follows the same structure as the <tt>sd_digests</tt> in the SD-JWT.</t>
<t>Below is a non-normative example of a representation of the SD-JWT-R JWS Compact
Serialization:</t>

<artwork anchor="example-simple-release-encoded">eyJhbGciOiAiUlMyNTYifQ.eyJub25jZSI6ICIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3Iiw
gImF1ZCI6ICJodHRwczovL2V4YW1wbGUuY29tL3ZlcmlmaWVyIiwgIl9zZCI6IHsiZ2l2Z
W5fbmFtZSI6ICJbXCI2SWo3dE0tYTVpVlBHYm9TNXRtdlZBXCIsIFwiSm9oblwiXSIsICJ
mYW1pbHlfbmFtZSI6ICJbXCJlSThaV205UW5LUHBOUGVOZW5IZGhRXCIsIFwiRG9lXCJdI
iwgImFkZHJlc3MiOiAiW1wiUGMzM0pNMkxjaGNVX2xIZ2d2X3VmUVwiLCB7XCJzdHJlZXR
fYWRkcmVzc1wiOiBcIjEyMyBNYWluIFN0XCIsIFwibG9jYWxpdHlcIjogXCJBbnl0b3duX
CIsIFwicmVnaW9uXCI6IFwiQW55c3RhdGVcIiwgXCJjb3VudHJ5XCI6IFwiVVNcIn1dIn1
9.b0hG3v71rzHvtoDTdroZ9m-lt9tf8nobFKb2YGiyGOjIklfcKc2KWj72oi_tBKcOCqZh
dX6IV4BRXIw-aspQfLh-xBrNLuGqiC-Y3rZBBlWw0WWnbbtsy1tj8yZOiXBr8vO6mCgZGA
d4MgPYPd-QzOr9ukObYDRB4I24xHrqlAEYPJIzSw9MI_dEmIkNnAuIfLQKiuyTqVVVp6Ly
pBIz6fBLm6NOLC4-uVXlOzI91iT4zlkrhP0-vj8TmfB-XL9aD3-xqytvLBHTESct49OSRZ
FrwkLUKTM56_6KW3pG7Ucuv8VnpHXHIka0SGRaOh8x6v5-rCQJl_IbM8wb7CSHvQ
</artwork>
<t>(Line breaks for presentation only.)</t>
</section>

<section anchor="sending-sd-jwt-and-sd-jwt-r-during-presentation"><name>Sending SD-JWT and SD-JWT-R during Presentation</name>
<t>The SD-JWT and the SD-JWT-R can be combined into one document using period character <tt>.</tt> as a separator (here for Example 1):</t>

<artwork anchor="example-simple-combined-sd-jwt-sd-jwt-release">eyJhbGciOiAiUlMyNTYifQ.eyJpc3MiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1ZXI
iLCAic3ViX2p3ayI6IHsia3R5IjogIlJTQSIsICJuIjogInBtNGJPSEJnLW9ZaEF5UFd6U
jU2QVdYM3JVSVhwMTFfSUNEa0dnUzZXM1pXTHRzLWh6d0kzeDY1NjU5a2c0aFZvOWRiR29
DSkUzWkdGX2VhZXRFMzBVaEJVRWdwR3dyRHJRaUo5enFwcm1jRmZyM3F2dmtHanR0aDhaZ
2wxZU0yYkpjT3dFN1BDQkhXVEtXWXMxNTJSN2c2SmcyT1ZwaC1hOHJxLXE3OU1oS0c1UW9
XX21UejEwUVRfNkg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qWEWskx_4Q1-8cDUprPmWYF0ik7LgnQwgoZKig-_AVqTma
ckYaRT1PjLW8ULgKBb6jgmkq-ge_yMGz0SM_i-ZbjPUIJb9WC5jqb7dXyXDALFEDiArv6n
a59mbieucYA0wKIWleuww0ci4hOfrnA-dQxPcMKYvw.eyJhbGciOiAiUlMyNTYifQ.eyJu
b25jZSI6ICIyR0xDNDJzS1F2ZUNmR2ZyeU5STjl3IiwgImF1ZCI6ICJodHRwczovL2V4YW
1wbGUuY29tL3ZlcmlmaWVyIiwgIl9zZCI6IHsiZ2l2ZW5fbmFtZSI6ICJbXCI2SWo3dE0t
YTVpVlBHYm9TNXRtdlZBXCIsIFwiSm9oblwiXSIsICJmYW1pbHlfbmFtZSI6ICJbXCJlST
haV205UW5LUHBOUGVOZW5IZGhRXCIsIFwiRG9lXCJdIiwgImFkZHJlc3MiOiAiW1wiUGMz
M0pNMkxjaGNVX2xIZ2d2X3VmUVwiLCB7XCJzdHJlZXRfYWRkcmVzc1wiOiBcIjEyMyBNYW
luIFN0XCIsIFwibG9jYWxpdHlcIjogXCJBbnl0b3duXCIsIFwicmVnaW9uXCI6IFwiQW55
c3RhdGVcIiwgXCJjb3VudHJ5XCI6IFwiVVNcIn1dIn19.b0hG3v71rzHvtoDTdroZ9m-lt
9tf8nobFKb2YGiyGOjIklfcKc2KWj72oi_tBKcOCqZhdX6IV4BRXIw-aspQfLh-xBrNLuG
qiC-Y3rZBBlWw0WWnbbtsy1tj8yZOiXBr8vO6mCgZGAd4MgPYPd-QzOr9ukObYDRB4I24x
HrqlAEYPJIzSw9MI_dEmIkNnAuIfLQKiuyTqVVVp6LypBIz6fBLm6NOLC4-uVXlOzI91iT
4zlkrhP0-vj8TmfB-XL9aD3-xqytvLBHTESct49OSRZFrwkLUKTM56_6KW3pG7Ucuv8Vnp
HXHIka0SGRaOh8x6v5-rCQJl_IbM8wb7CSHvQ
</artwork>
<t>(Line breaks for presentation only.)</t>
</section>
</section>

<section anchor="verification"><name>Verification</name>
<t>Verifiers MUST follow <xref target="RFC8725"></xref> for checking the SD-JWT and, if signed, the
SD-JWT Release.</t>
<t>Verifiers MUST go through (at least) the following steps before
trusting/using any of the contents of an SD-JWT:</t>

<ol>
<li><t>Determine if holder binding is to be checked for the SD-JWT. Refer to <xref target="holder_binding_security"></xref> for details.</t>
</li>
<li><t>Check that the presentation consists of six period-separated (<tt>.</tt>) elements; if holder binding is not required, the last element can be empty.</t>
</li>
<li><t>Separate the SD-JWT from the SD-JWT Release.</t>
</li>
<li><t>Validate the SD-JWT:</t>

<ol>
<li><t>Ensure that a signing algorithm was used that was deemed secure for the application. Refer to <xref target="RFC8725"></xref>, Sections 3.1 and 3.2 for details.</t>
</li>
<li><t>Validate the signature over the SD-JWT.</t>
</li>
<li><t>Validate the issuer of the SD-JWT and that the signing key belongs to this issuer.</t>
</li>
<li><t>Check that the SD-JWT is valid using <tt>nbf</tt>, <tt>iat</tt>, and <tt>exp</tt> claims, if provided in the SD-JWT.</t>
</li>
<li><t>Check that the claim <tt>sd_digests</tt> is present in the SD-JWT.</t>
</li>
<li><t>Check that the <tt>hash_alg</tt> claim is present and its value is understand
and the hash algorithm deemed secure.</t>
</li>
</ol></li>
<li><t>Validate the SD-JWT Release:</t>

<ol>
<li><t>If holder binding is required, validate the signature over the SD-JWT using the same steps as for the SD-JWT plus the following steps:</t>

<ol>
<li><t>Determine that the public key for the private key that used to sign the SD-JWT-R is bound to the SD-JWT, i.e., the SD-JWT either contains a reference to the public key or contains the public key itself.</t>
</li>
<li><t>Determine that the SD-JWT-R is bound to the current transaction and was created for this verifier (replay protection). This is usually achieved by a <tt>nonce</tt> and <tt>aud</tt> field within the SD-JWT Release.</t>
</li>
</ol></li>
<li><t>For each claim in the SD-JWT Release:</t>

<ol>
<li><t>Ensure that the claim is present as well in <tt>sd_release</tt> in the SD-JWT.
If <tt>sd_release</tt> is structured, the claim MUST be present at the same
place within the structure.</t>
</li>
<li><t>Compute the base64url-encoded hash of a claim revealed from the Holder
using the claim value and the salt included in the SD-JWT-R and
the <tt>hash_alg</tt> in SD-JWT.</t>
</li>
<li><t>Compare the hah computed in the previous step with the hash of the same claim in SD-JWT.
Accept the claim only when the two hashes match.</t>
</li>
<li><t>Ensure that the claim value in the SD-JWT-R is a JSON-encoded
array of exactly two values.</t>
</li>
<li><t>Store the second of the two values.</t>
</li>
</ol></li>
<li><t>Once all necessary claims have been verified, their values can be
validated and used according to the requirements of the application. It
MUST be ensured that all claims required for the application have been
released.</t>
</li>
</ol></li>
</ol>
<t>If any step fails, the input is not valid and processing MUST be aborted.</t>
</section>

<section anchor="security_considerations"><name>Security Considerations</name>

<section anchor="mandatory-signing-of-the-sd-jwt"><name>Mandatory signing of the SD-JWT</name>
<t>The SD-JWT MUST be signed by the issuer to protect integrity of the issued
claims. An attacker can modify or add claims if an SD-JWT is not signed (e.g.,
change the &quot;email&quot; 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 SD-JWT signature to ensure that the SD-JWT
has not been tampered with since its issuance. If the signature on the SD-JWT
cannot be verified, the SD-JWT MUST be rejected.</t>
</section>

<section anchor="entropy-of-the-salt"><name>Entropy of the salt</name>
<t>The security model relies on the fact that the salt is not learned or guessed by
the attacker. It is vitally important to adhere to this principle. As such, the
salt has to be created in such a manner that it is cryptographically random,
long enough and has high entropy that it is not practical for the attacker to
guess.</t>
</section>

<section anchor="minimum-length-of-the-salt"><name>Minimum length of the salt</name>
<t>The length of the randomly-generated portion of the salt MUST be at least 128 bits.</t>
</section>

<section anchor="choice-of-a-hash-function"><name>Choice of a hash function</name>
<t>For the security of this scheme, the hash function is required to have the
following property. Given a claim value, a salt, and the resulting hash, it is
hard to find a second salt value so that <tt>HASH(salt | claim_value)</tt> equals the
hash.</t>
<t>Furthermore the hash algorithms MD2, MD4, MD5, RIPEMD-160, and SHA-1
revealed fundamental weaknesses and they MUST NOT be used.</t>
</section>

<section anchor="holder_binding_security"><name>Holder Binding</name>
<t>TBD</t>
</section>
</section>

<section anchor="privacy_considerations"><name>Privacy Considerations</name>

<section anchor="claim-names"><name>Claim Names</name>
<t>Claim names are not hashed in the SD-JWT and are used as keys in a key-value pair, where the value is the hash.
This is because SD-JWT already reveals information about the issuer and the schema,
and revealing the claim names does not provide any additional information.</t>
</section>

<section anchor="unlinkability"><name>Unlinkability</name>
<t>It is also important to note that this format enables selective disclosure of claims, but
in itself it does not achieve unlinkability of the subject of an SD-SWT.</t>
</section>
</section>

<section anchor="Acknowledgements"><name>Acknowledgements</name>
<t>We would like to thank ...</t>
</section>

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

</middle>

<back>
<references><name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
</references>
<references><name>Informative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8725.xml"/>
<reference anchor="VC_DATA" target="https://www.w3.org/TR/vc_data">
  <front>
    <title>Verifiable Credentials Data Model 1.0</title>
    <author fullname="Manu Sporny">
      <organization>Digital Bazaar</organization>
    </author>
    <author fullname="Grant Noble">
      <organization>ConsenSys</organization>
    </author>
    <author fullname="Dave Longley">
      <organization>Digital Bazaar</organization>
    </author>
    <author fullname="Daniel C. Burnett">
      <organization>ConsenSys</organization>
    </author>
    <author fullname="Brent Zundel">
      <organization>Evernym</organization>
    </author>
    <author fullname="David Chadwick">
      <organization>University of Kent</organization>
    </author>
    <date year="2019" month="Nov" day="19"></date>
  </front>
</reference>
</references>

<section anchor="additional-examples"><name>Additional Examples</name>

<section anchor="example-2-structured-sd-jwt"><name>Example 2 - Structured SD-JWT</name>
<t>This non-normative example is based on the same claim values as Example 1, but
this time the issuer decided to create a structured object for the hashes. This
allows for the release of individual members of the address claim separately.</t>

<sourcecode anchor="example-simple_structured-sd-jwt-payload" type="json">{
  &quot;iss&quot;: &quot;https://example.com/issuer&quot;,
  &quot;sub_jwk&quot;: {
    &quot;kty&quot;: &quot;RSA&quot;,
    &quot;n&quot;: &quot;pcHdUSmbR3A8_eJcxaOWtk8wmrsxP7Fpl1DYVeNJRRYBS2kHLewBLAG4CpZDAB-AuuIkaGRyJdcISfN0Ujk4dBryUtdDvpJ-h4en-Zurrn_aQxF4VApBtgdWjzRksrBnzmp64_S89rsl6h-We-yKsVtmm4IB9Jr-9VlVRg03EXWMAmwUaQkDiKEhXxQH2f8QhNfhTOKAKb58AYwgz-CtzOQjr6p7o9yisDu2LtFi9RkctE1MZ8If3PPs7G53-GBL_7lH9kKuqUsXZQzBvBJl5AYf3beKS6QH1aPnFgZ-2a5lsEuKp44NMIT2h-uQd5eQ0bhQkPVeH7Yi-tGxMnaDdQ&quot;,
  },
  &quot;hash_alg&quot;: &quot;sha-256&quot;,
  &quot;iat&quot;: 1516239022,
  &quot;exp&quot;: 1516247022,
  &quot;sd_digests&quot;: {
    &quot;sub&quot;: &quot;LbnhkOr5oS7KjeUrxezAu8TG0CpWz0jSixy6tffuo04&quot;,
    &quot;given_name&quot;: &quot;fUMdn88aaoyKTHrvZd6AuLmPraGhPJ0zF5r_JhxCVZs&quot;,
    &quot;family_name&quot;: &quot;9h5vgv6TpFV6GmnPtugiMLl5tHetHeb5X_2cKHjN7cw&quot;,
    &quot;email&quot;: &quot;fPZ92dtYMCN2Nb-2ac_zSH19p4yakUXrZl_-wSgaazA&quot;,
    &quot;phone_number&quot;: &quot;QdSffzNzzd0n60MsSmuiKj6Y6Enk2b-BS-KtEePde5M&quot;,
    &quot;address&quot;: {
      &quot;street_address&quot;: &quot;4FpVpd563Owh9G3HkGNTN9FiSHT0e6y9-Abk_IuG86M&quot;,
      &quot;locality&quot;: &quot;Kr0BpdZz6yU8HMhjyYHh1EEgJxeUyLIpJEi47iXhp8Y&quot;,
      &quot;region&quot;: &quot;QXxWKvcV4Bc9t3M7MF43W5vdCnWtA9hsYX8ycWLu1LQ&quot;,
      &quot;country&quot;: &quot;3itkoMzrDrinn7T0MUbAmrMm1ya1LzbBgif_50WoFOs&quot;
    },
    &quot;birthdate&quot;: &quot;fvLCnDm3r4VSYcBF3pIlXP4ulEoHuHOfG_YmFZEuxpQ&quot;
  },
  &quot;hash_alg&quot;: &quot;sha-256&quot;
}
</sourcecode>
<t>The SVC for this SD-JWT is as follows:</t>

<sourcecode anchor="example-simple_structured-svc-payload" type="json">{
  &quot;sd_release&quot;: {
    &quot;sub&quot;: &quot;[\&quot;eluV5Og3gSNII8EYnsxA_A\&quot;, \&quot;6c5c0a49-b589-431d-bae7-219122a9ec2c\&quot;]&quot;,
    &quot;given_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;eI8ZWm9QnKPpNPeNenHdhQ\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;email&quot;: &quot;[\&quot;Qg_O64zqAxe412a108iroA\&quot;, \&quot;johndoe@example.com\&quot;]&quot;,
    &quot;phone_number&quot;: &quot;[\&quot;AJx-095VPrpTtN4QMOqROA\&quot;, \&quot;+1-202-555-0101\&quot;]&quot;,
    &quot;address&quot;: {
      &quot;street_address&quot;: &quot;[\&quot;Pc33JM2LchcU_lHggv_ufQ\&quot;, \&quot;123 Main St\&quot;]&quot;,
      &quot;locality&quot;: &quot;[\&quot;G02NSrQfjFXQ7Io09syajA\&quot;, \&quot;Anytown\&quot;]&quot;,
      &quot;region&quot;: &quot;[\&quot;lklxF5jMYlGTPUovMNIvCA\&quot;, \&quot;Anystate\&quot;]&quot;,
      &quot;country&quot;: &quot;[\&quot;nPuoQnkRFq3BIeAm7AnXFA\&quot;, \&quot;US\&quot;]&quot;
    },
    &quot;birthdate&quot;: &quot;[\&quot;5bPs1IquZNa0hkaFzzzZNw\&quot;, \&quot;1940-01-01\&quot;]&quot;
  }
}
</sourcecode>
<t>An SD-JWT-R for the SD-JWT above that discloses only <tt>region</tt> and <tt>country</tt> of
the <tt>address</tt> property:</t>

<sourcecode anchor="example-simple_structured-release-payload" type="json">{
  &quot;nonce&quot;: &quot;2GLC42sKQveCfGfryNRN9w&quot;,
  &quot;aud&quot;: &quot;https://example.com/verifier&quot;,
  &quot;sd_release&quot;: {
    &quot;given_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;eI8ZWm9QnKPpNPeNenHdhQ\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;birthdate&quot;: &quot;[\&quot;5bPs1IquZNa0hkaFzzzZNw\&quot;, \&quot;1940-01-01\&quot;]&quot;,
    &quot;address&quot;: {
      &quot;region&quot;: &quot;[\&quot;lklxF5jMYlGTPUovMNIvCA\&quot;, \&quot;Anystate\&quot;]&quot;,
      &quot;country&quot;: &quot;[\&quot;nPuoQnkRFq3BIeAm7AnXFA\&quot;, \&quot;US\&quot;]&quot;
    }
  }
}
</sourcecode>
</section>

<section anchor="example-3-complex-structured-sd-jwt"><name>Example 3 - Complex Structured SD-JWT</name>
<t>In this example, a complex object such as those used for OIDC4IDA (todo reference) is used.</t>
<t>In this example, the Issuer is using a following object as a set of claims to issue to the Holder:</t>

<sourcecode anchor="example-complex_structured-sd-jwt-claims" type="json">{
  &quot;verified_claims&quot;: {
    &quot;verification&quot;: {
      &quot;trust_framework&quot;: &quot;de_aml&quot;,
      &quot;time&quot;: &quot;2012-04-23T18:25Z&quot;,
      &quot;verification_process&quot;: &quot;f24c6f-6d3f-4ec5-973e-b0d8506f3bc7&quot;,
      &quot;evidence&quot;: [
        {
          &quot;type&quot;: &quot;document&quot;,
          &quot;method&quot;: &quot;pipp&quot;,
          &quot;time&quot;: &quot;2012-04-22T11:30Z&quot;,
          &quot;document&quot;: {
            &quot;type&quot;: &quot;idcard&quot;,
            &quot;issuer&quot;: {
              &quot;name&quot;: &quot;Stadt Augsburg&quot;,
              &quot;country&quot;: &quot;DE&quot;
            },
            &quot;number&quot;: &quot;53554554&quot;,
            &quot;date_of_issuance&quot;: &quot;2010-03-23&quot;,
            &quot;date_of_expiry&quot;: &quot;2020-03-22&quot;
          }
        }
      ]
    },
    &quot;claims&quot;: {
      &quot;given_name&quot;: &quot;Max&quot;,
      &quot;family_name&quot;: &quot;Meier&quot;,
      &quot;birthdate&quot;: &quot;1956-01-28&quot;,
      &quot;place_of_birth&quot;: {
        &quot;country&quot;: &quot;DE&quot;,
        &quot;locality&quot;: &quot;Musterstadt&quot;
      },
      &quot;nationalities&quot;: [
        &quot;DE&quot;
      ],
      &quot;address&quot;: {
        &quot;locality&quot;: &quot;Maxstadt&quot;,
        &quot;postal_code&quot;: &quot;12344&quot;,
        &quot;country&quot;: &quot;DE&quot;,
        &quot;street_address&quot;: &quot;An der Weide 22&quot;
      }
    }
  },
  &quot;birth_middle_name&quot;: &quot;Timotheus&quot;,
  &quot;salutation&quot;: &quot;Dr.&quot;,
  &quot;msisdn&quot;: &quot;49123456789&quot;
}
</sourcecode>
<t>The following shows the resulting SD-JWT payload:</t>

<sourcecode anchor="example-complex_structured-sd-jwt-payload" type="json">{
  &quot;iss&quot;: &quot;https://example.com/issuer&quot;,
  &quot;sub_jwk&quot;: {
    &quot;kty&quot;: &quot;RSA&quot;,
    &quot;n&quot;: &quot;6bh1cbaN-fyTUTfawCabGpTSeHOWmsHuB-VZ0aoAKBAfH6MOeLolLYLMcgP1VCNa1CenudLRzm8ULvinMicmfCOumvyhq8wsgH1jIJDG_TVrupS6iZvthOtXPpkSXxDiiLxgmnLR5AlpWBKjrzXmX1jQ2V1gQlC2S2eN7t_CR-Jfj3yb4rTW20UyvhpOpy649CaYsAo3Ulq2oJpnG6rInX_XzYH86plJmYDUq07SoGIcdYYK6IyudZBh2bVxZ9aBuvkYQy11AFvXk2BP0RbTP1aOwwzS-LWahQJdsK5OiPLRrfTZ399h2I24VW3qXT2Zusq9tUNAlOWvh1K7umnpMw&quot;,
    &quot;e&quot;: &quot;AQAB&quot;
  },
  &quot;hash_alg&quot;: &quot;sha-256&quot;,
  &quot;iat&quot;: 1516239022,
  &quot;exp&quot;: 1516247022,
  &quot;sd_digests&quot;: {
    &quot;verified_claims&quot;: {
      &quot;verification&quot;: {
        &quot;trust_framework&quot;: &quot;UI-SRNlQFy-YEFE46yyHKqc64jmM65q8ma9cq2V_erY&quot;,
        &quot;time&quot;: &quot;jI-FYlteydXzsjRIrXBZs9foBSNF1Od1Q-4XnuqpgjI&quot;,
        &quot;verification_process&quot;: &quot;F979I7b5ZhADtyYMlYxctdc9-IalD_Td0HpfcFBzVXs&quot;,
        &quot;evidence&quot;: [
          {
            &quot;type&quot;: &quot;i2w3mrKAQV2nhTa5c2koZ-aQTBDoSaVfvYk7aLQianc&quot;,
            &quot;method&quot;: &quot;fEQ0tVPD67GfO30h_SRs8ZPbnZ_vwEt5S8lUOR77va0&quot;,
            &quot;time&quot;: &quot;9jueDP5r0gTB64DqdCZbek3yaS5AJJnW8FEkWtPTaOk&quot;,
            &quot;document&quot;: {
              &quot;type&quot;: &quot;K-rZQk89w89YBhjUNUho07suLxhG8Sl2JTPAcoAJB34&quot;,
              &quot;issuer&quot;: {
                &quot;name&quot;: &quot;BkCULCU-txVGvzNqnWe5DxefFvJE8LMib8GV3I3WO90&quot;,
                &quot;country&quot;: &quot;DSyF5TtmYgLk92u4GkDQzSdFbvIbw5rkFjzSsJJsyw4&quot;
              },
              &quot;number&quot;: &quot;epH3OuU51TBelOE4PX6ueHwr1ZtoUjzG-7pZjIAsXg8&quot;,
              &quot;date_of_issuance&quot;: &quot;cVvqTueVq6OWz-dJj2cdo19A0Ajj859eGDzDfwPYyN4&quot;,
              &quot;date_of_expiry&quot;: &quot;nxJBNdtwvb2TKKJNGvF6_1ywEdKrotj66C88WPomLfo&quot;
            }
          }
        ]
      },
      &quot;claims&quot;: {
        &quot;given_name&quot;: &quot;y9uFPHAVqNAZ7PJyk1-1yQJZZWZzKGP5FLt9txKM84M&quot;,
        &quot;family_name&quot;: &quot;XyUikY8V8MWeBfXUOp8gI7F7-yC28Jr5IyDgvBxXzd4&quot;,
        &quot;birthdate&quot;: &quot;7GlieMLJhM78C_uQQp9wUXSZLeqBN1YGQT87BIubyKU&quot;,
        &quot;place_of_birth&quot;: {
          &quot;country&quot;: &quot;RN3xcnLYX_GDhVwfPvtisuLPfi0d74zqihFbQrd_UG0&quot;,
          &quot;locality&quot;: &quot;iNkpWqJ9kIZQq95dzSyEZjbPJs6Fqu7GFBKouEC3OxE&quot;
        },
        &quot;nationalities&quot;: &quot;-tinYGK0GXnkfARxiNIWq0VnzNRl-Kv3KY3m5g5Femg&quot;,
        &quot;address&quot;: &quot;63EzPV0yvTpeOgV34yCwweCvO-2wxts2Wqbja_SuwPQ&quot;
      }
    },
    &quot;birth_middle_name&quot;: &quot;vM68I6XnrVlyt1LxK9xxgFycsjtw2vLdGpNgk3E8QQ4&quot;,
    &quot;salutation&quot;: &quot;iThfCu2ulLoe5i6gCEq--Y6R-gxHHtIukXb9qnfjH5k&quot;,
    &quot;msisdn&quot;: &quot;xUpU-azBYdXeJidc8Yw5MXtfPz4_4kArJhflXcxzkzs&quot;
  },
  &quot;hash_alg&quot;: &quot;sha-256&quot;
}
</sourcecode>
<t>The SD-JWT is then signed by the issuer to create a document like the following:</t>

<artwork anchor="example-complex_structured-sd-jwt-encoded">eyJhbGciOiAiUlMyNTYifQ.eyJpc3MiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1ZXI
iLCAic3ViX2p3ayI6IHsia3R5IjogIlJTQSIsICJuIjogIjZiaDFjYmFOLWZ5VFVUZmF3Q
2FiR3BUU2VIT1dtc0h1Qi1WWjBhb0FLQkFmSDZNT2VMb2xMWUxNY2dQMVZDTmExQ2VudWR
MUnptOFVMdmluTWljbWZDT3Vtdnloc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Il0iLAogICAgICAgICAgICAgICAgImV
2aWRlbmNlIjogWwogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgI
CAgICAgInR5cGUiOiAiW1wiUWdfTzY0enFBeGU0MTJhMTA4aXJvQVwiLCBcImRvY3VtZW5
0XCJdIiwKICAgICAgICAgICAgICAgICAgICAgICAgIm1ldGhvZCI6ICJbXCJBSngtMDk1V
lBycFR0TjRRTU9xUk9BXCIsIFwicGlwcFwiXSIsCiAgICAgICAgICAgICAgICAgICAgICA
gICJ0aW1lIjogIltcIlBjMzNKTTJMY2hjVV9sSGdndl91ZlFcIiwgXCIyMDEyLTA0LTIyV
DExOjMwWlwiXSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJkb2N1bWVudCI6IHsKICA
gICAgICAgICAgICAgICAgICAgICAgICAgICJ0eXBlIjogIltcIkcwMk5TclFmakZYUTdJb
zA5c3lhakFcIiwgXCJpZGNhcmRcIl0iLAogICAgICAgICAgICAgICAgICAgICAgICAgICA
gImlzc3VlciI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6I
CJbXCJsa2x4RjVqTVlsR1RQVW92TU5JdkNBXCIsIFwiU3RhZHQgQXVnc2J1cmdcIl0iLAo
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJjb3VudHJ5IjogIltcIm5QdW9Rb
mtSRnEzQkllQW03QW5YRkFcIiwgXCJERVwiXSIKICAgICAgICAgICAgICAgICAgICAgICA
gICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAibnVtYmVyIjogIltcIjViU
HMxSXF1Wk5hMGhrYUZ6enpaTndcIiwgXCI1MzU1NDU1NFwiXSIsCiAgICAgICAgICAgICA
gICAgICAgICAgICAgICAiZGF0ZV9vZl9pc3N1YW5jZSI6ICJbXCI1YTJXMF9OcmxFWnpmc
W1rXzdQcS13XCIsIFwiMjAxMC0wMy0yM1wiXSIsCiAgICAgICAgICAgICAgICAgICAgICA
gICAg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mVzc1wiOiBcIkFuIGR
lciBXZWlkZSAyMlwifV0iCiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgICJia
XJ0aF9taWRkbGVfbmFtZSI6ICJbXCJlSzVvNXBIZmd1cFBwbHRqMXFoQUp3XCIsIFwiVGl
tb3RoZXVzXCJdIiwKICAgICAgICAic2FsdXRhdGlvbiI6ICJbXCJqN0FEZGIwVVZiMExpM
GNpUGNQMGV3XCIsIFwiRHIuXCJdIiwKICAgICAgICAibXNpc2RuIjogIltcIldweEpyRnV
YOHVTaTJwNGh0MDlqdndcIiwgXCI0OTEyMzQ1Njc4OVwiXSIKICAgIH0KfQ
</artwork>
<t>(Line breaks for presentation only.)</t>
<t>A SD-JWT-R for some of the claims:</t>

<sourcecode anchor="example-complex_structured-release-payload" type="json">{
  &quot;nonce&quot;: &quot;2GLC42sKQveCfGfryNRN9w&quot;,
  &quot;aud&quot;: &quot;https://example.com/verifier&quot;,
  &quot;sd_release&quot;: {
    &quot;verified_claims&quot;: {
      &quot;verification&quot;: {
        &quot;trust_framework&quot;: &quot;[\&quot;eluV5Og3gSNII8EYnsxA_A\&quot;, \&quot;de_aml\&quot;]&quot;,
        &quot;time&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;2012-04-23T18:25Z\&quot;]&quot;,
        &quot;evidence&quot;: [
          {
            &quot;type&quot;: &quot;[\&quot;Qg_O64zqAxe412a108iroA\&quot;, \&quot;document\&quot;]&quot;
          }
        ]
      },
      &quot;claims&quot;: {
        &quot;given_name&quot;: &quot;[\&quot;HbQ4X8srVW3QDxnIJdqyOA\&quot;, \&quot;Max\&quot;]&quot;,
        &quot;family_name&quot;: &quot;[\&quot;C9GSoujviJquEgYfojCb1A\&quot;, \&quot;Meier\&quot;]&quot;,
        &quot;birthdate&quot;: &quot;[\&quot;kx5kF17V-x0JmwUx9vgvtw\&quot;, \&quot;1956-01-28\&quot;]&quot;,
        &quot;place_of_birth&quot;: {
          &quot;country&quot;: &quot;[\&quot;H3o1uswP760Fi2yeGdVCEQ\&quot;, \&quot;DE\&quot;]&quot;
        }
      }
    }
  }
}
</sourcecode>
</section>

<section anchor="example-4-w3c-verifiable-credentials-data-model"><name>Example 4 - W3C Verifiable Credentials Data Model</name>
<t>This example illustrates how the artifacts defined in this specification can be
represented using W3C Verifiable Credentials Data Model as defined in
<xref target="VC_DATA"></xref>.</t>
<t>Below is a non-normative example of an SD-JWT represented as a verifiable credential
encoded as JSON and signed as JWS compliant to <xref target="VC_DATA"></xref>.</t>
<t>SVC sent alongside this SD-JWT as a JWT-VC is same as in Example 1.</t>

<sourcecode type="json">{
  &quot;sub&quot;: &quot;did:example:ebfeb1f712ebc6f1c276e12ec21&quot;,
  &quot;jti&quot;: &quot;http://example.edu/credentials/3732&quot;,
  &quot;iss&quot;: &quot;https://example.com/keys/foo.jwk&quot;,
  &quot;nbf&quot;: 1541493724,
  &quot;iat&quot;: 1541493724,
  &quot;exp&quot;: 1573029723,
  &quot;vc&quot;: {
    &quot;@context&quot;: [
      &quot;https://www.w3.org/2018/credentials/v1&quot;,
      &quot;https://www.w3.org/2018/credentials/examples/v1&quot;
    ],
    &quot;type&quot;: [
      &quot;VerifiableCredential&quot;,
      &quot;UniversityDegreeCredential&quot;
    ]
  },
  &quot;sd_digests&quot;: {
    &quot;given_name&quot;: &quot;fUMdn88aaoyKTHrvZd6AuLmPraGhPJ0zF5r_JhxCVZs&quot;,
    &quot;family_name&quot;: &quot;9h5vgv6TpFV6GmnPtugiMLl5tHetHeb5X_2cKHjN7cw&quot;,
    &quot;birthdate&quot;: &quot;fvLCnDm3r4VSYcBF3pIlXP4ulEoHuHOfG_YmFZEuxpQ&quot;
  }
}
</sourcecode>
<t>Below is a non-normative example of an SD-JWT-R represented as a verifiable presentation
encoded as JSON and signed as a JWS compliant to <xref target="VC_DATA"></xref>.</t>

<sourcecode type="json">{
  &quot;iss&quot;: &quot;did:example:ebfeb1f712ebc6f1c276e12ec21&quot;,
  &quot;aud&quot;: &quot;s6BhdRkqt3&quot;,
  &quot;nbf&quot;: 1560415047,
  &quot;iat&quot;: 1560415047,
  &quot;exp&quot;: 1573029723,
  &quot;nonce&quot;: &quot;660!6345FSer&quot;,
  &quot;vp&quot;: {
    &quot;@context&quot;: [
      &quot;https://www.w3.org/2018/credentials/v1&quot;
    ],
    &quot;type&quot;: [
      &quot;VerifiablePresentation&quot;
    ],
    &quot;verifiableCredential&quot;: [&quot;eyJhb...npyXw&quot;]
  },
  &quot;sd_release&quot;: {
    &quot;given_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;eI8ZWm9QnKPpNPeNenHdhQ\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;birthdate&quot;: &quot;[\&quot;5bPs1IquZNa0hkaFzzzZNw\&quot;, \&quot;1940-01-01\&quot;]&quot;
  }
}
</sourcecode>
</section>
</section>

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

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

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

</back>

</rfc>
