<?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-02" 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-02" 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 supports 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 hash digests of the claim values and
compare them to the ones 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 hash digests over the claim values with unique random 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 hash digests over the claim values with unique random 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_jwk</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 digest <tt>HASH(DISCLOSED-SALT | DISCLOSED-VALUE)</tt>
matches the one under the given claim name in <tt>SD-JWT</tt>.</t>
</li>
<li><t>if holder binding is used, 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 hash digests 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 hash digests 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 and cryptographically random salt value
for each claim value. Each salt value
SHOULD 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 the salt value.</t>
<t>The issuer MUST build the digests 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 digest 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
hash digests 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;iat&quot;: 1516239022,
  &quot;exp&quot;: 1516247022,
  &quot;hash_alg&quot;: &quot;sha-256&quot;,
  &quot;sd_digests&quot;: {
    &quot;sub&quot;: &quot;z4xgEco94diTaSruISPiE7o_wtmcOfnH_8R7X9Pa578&quot;,
    &quot;given_name&quot;: &quot;PvU7cWjuHUq6w-i9XFpQZhjT-uprQL3GH3mKsAJl0e0&quot;,
    &quot;family_name&quot;: &quot;H-Relr4cEBMlenyK1gvyx16QVpnt4MEclT5tP0aTLFU&quot;,
    &quot;email&quot;: &quot;ET2A1JQLF85ZpBulh6UFstGrSfR4B3KM-bjQVllhxqY&quot;,
    &quot;phone_number&quot;: &quot;SJnciB2DIRVA5cXBrdKoH6n45788mZyUn2rnv74uMVU&quot;,
    &quot;address&quot;: &quot;0FldqLfGnERPPVDC17od9xb4w3iRJTEQbW_Yk9AmnDw&quot;,
    &quot;birthdate&quot;: &quot;-L0kMgIbLXe3OEkKTUGwz_QKhjehDeofKGwoPrxLuo4&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">eyJhbGciOiAiUlMyNTYiLCAia2lkIjogImNBRUlVcUowY21MekQxa3pHemhlaUJhZzBZUk
F6VmRsZnhOMjgwTmdIYUEifQ.eyJpc3MiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1Z
XIiLCAic3ViX2p3ayI6IHsia3R5IjogIlJTQSIsICJuIjogInBtNGJPSEJnLW9ZaEF5UFd
6UjU2QVdYM3JVSVhwMTFfSUNEa0dnUzZXM1pXTHRzLWh6d0kzeDY1NjU5a2c0aFZvOWRiR
29DSkUzWkdGX2VhZXRFMzBVaEJVRWdwR3dyRHJRaUo5enFwcm1jRmZyM3F2dmtHanR0aDh
aZ2wxZU0yYkpjT3dFN1BDQkhXVEtXWXMxNTJSN2c2SmcyT1ZwaC1hOHJxLXE3OU1oS0c1U
W9XX21UejEwUVRfNkg0YzdQaldHMWZqaDhocFdObmJQX3B2NmQxelN3WmZjNWZsNnlWUkw
wRFYwVjNsR0hLZTJXcWZfZU5HakJyQkxWa2xEVGs4LXN0WF9NV0xjUi1FR21YQU92MFVCV
2l0U19kWEpLSnUtdlhKeXcxNG5IU0d1eFRJSzJoeDFwdHRNZnQ5Q3N2cWltWEtlRFRVMTR
xUUwxZUU3aWhjdyIsICJlIjogIkFRQUIifSwgImlhdCI6IDE1MTYyMzkwMjIsICJleHAiO
iAxNTE2MjQ3MDIyLCAiaGFzaF9hbGciOiAic2hhLTI1NiIsICJzZF9kaWdlc3RzIjogeyJ
zdWIiOiAiejR4Z0Vjbzk0ZGlUYVNydUlTUGlFN29fd3RtY09mbkhfOFI3WDlQYTU3OCIsI
CJnaXZlbl9uYW1lIjogIlB2VTdjV2p1SFVxNnctaTlYRnBRWmhqVC11cHJRTDNHSDNtS3N
BSmwwZTAiLCAiZmFtaWx5X25hbWUiOiAiSC1SZWxyNGNFQk1sZW55SzFndnl4MTZRVnBud
DRNRWNsVDV0UDBhVExGVSIsICJlbWFpbCI6ICJFVDJBMUpRTEY4NVpwQnVsaDZVRnN0R3J
TZlI0QjNLTS1ialFWbGxoeHFZIiwgInBob25lX251bWJlciI6ICJTSm5jaUIyRElSVkE1Y
1hCcmRLb0g2bjQ1Nzg4bVp5VW4ycm52NzR1TVZVIiwgImFkZHJlc3MiOiAiMEZsZHFMZkd
uRVJQUFZEQzE3b2Q5eGI0dzNpUkpURVFiV19ZazlBbW5EdyIsICJiaXJ0aGRhdGUiOiAiL
Uwwa01nSWJMWGUzT0VrS1RVR3d6X1FLaGplaERlb2ZLR3dvUHJ4THVvNCJ9fQ.TSxRFVMl
Nlt_drWLqQuzz9Sc19Bo5r-cgXZ0to8PfadImEJuPbhfkxCSt1xCT5IWQJrD6p_47h8Ac-
5yOtuu8s-wxrQzCUAU7OS2ThQGKiDKsGv0oiH3KQX4QyCAOIIaWOLxO6VQRxI7Kn6RFT0M
5jQxBNFmL582n_uJR31ANBO45Jc_pgp4iSTn2vf1lxxwU7B3bgrad0vHmvwmv1lu17Ov79
SGmT_fTjoybIJfHavTq61xCJ3UrMAGCEqm-_laOTxB1HRbPF38va0iuhqSSk2QaUpfDsVb
9VsPBVIx_MsGlK3kYUWcHzkJ0BBPIVu0xnVcLkg1_SO_5gPSxFWZ4g
</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;2GLC42sKQveCfGfryNRN9w\&quot;, \&quot;6c5c0a49-b589-431d-bae7-219122a9ec2c\&quot;]&quot;,
    &quot;given_name&quot;: &quot;[\&quot;eluV5Og3gSNII8EYnsxA_A\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;email&quot;: &quot;[\&quot;eI8ZWm9QnKPpNPeNenHdhQ\&quot;, \&quot;johndoe@example.com\&quot;]&quot;,
    &quot;phone_number&quot;: &quot;[\&quot;Qg_O64zqAxe412a108iroA\&quot;, \&quot;+1-202-555-0101\&quot;]&quot;,
    &quot;address&quot;: &quot;[\&quot;AJx-095VPrpTtN4QMOqROA\&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;Pc33JM2LchcU_lHggv_ufQ\&quot;, \&quot;1940-01-01\&quot;]&quot;
  }
}
</sourcecode>
<t>Important: As described above, hash digests 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
digests. 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.</t>
<t>The SVC and SD-JWT are implicitly linked through the hash values of the claims
in the SVC that is included in the SD-JWT. To ensure that the correct SVC and
SD-JWT pairings are being used, the holder SHOULD verify the binding between
SVC and SD-JWT as defined in the Verification Section of this document.</t>
<t>For Example 1, the combined format looks as follows:</t>

<artwork anchor="example-simple-combined-sd-jwt-svc">eyJhbGciOiAiUlMyNTYiLCAia2lkIjogImNBRUlVcUowY21MekQxa3pHemhlaUJhZzBZUk
F6VmRsZnhOMjgwTmdIYUEifQ.eyJpc3MiOiAiaHR0cHM6Ly9leGFtcGxlLmNvbS9pc3N1Z
XIiLCAic3ViX2p3ayI6IHsia3R5IjogIlJTQSIsICJuIjogInBtNGJPSEJnLW9ZaEF5UFd
6UjU2QVdYM3JVSVhwMTFfSUNEa0dnUzZXM1pXTHRzLWh6d0kzeDY1NjU5a2c0aFZvOWRiR
29DSkUzWkdGX2VhZXRFMzBVaEJVRWdwR3dyRHJRaUo5enFwcm1jRmZyM3F2dmtHanR0aDh
aZ2wxZU0yYkpjT3dFN1BDQkhXVEtXWXMxNTJSN2c2SmcyT1ZwaC1hOHJxLXE3OU1oS0c1U
W9XX21UejEwUVRfNkg0YzdQaldHMWZqaDhocFdObmJQX3B2NmQxelN3WmZjNWZsNnlWUkw
wRFYwVjNsR0hLZTJXcWZfZU5HakJyQkxWa2xEVGs4LXN0WF9NV0xjUi1FR21YQU92MFVCV
2l0U19kWEpLSnUtdlhKeXcxNG5IU0d1eFRJSzJoeDFwdHRNZnQ5Q3N2cWltWEtlRFRVMTR
xUUwxZU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
lIjogeyJzdWIiOiAiW1wiMkdMQzQyc0tRdmVDZkdmcnlOUk45d1wiLCBcIjZjNWMwYTQ5L
WI1ODktNDMxZC1iYWU3LTIxOTEyMmE5ZWMyY1wiXSIsICJnaXZlbl9uYW1lIjogIltcImV
sdVY1T2czZ1NOSUk4RVluc3hBX0FcIiwgXCJKb2huXCJdIiwgImZhbWlseV9uYW1lIjogI
ltcIjZJajd0TS1hNWlWUEdib1M1dG12VkFcIiwgXCJEb2VcIl0iLCAiZW1haWwiOiAiW1w
iZUk4WldtOVFuS1BwTlBlTmVuSGRoUVwiLCBcImpvaG5kb2VAZXhhbXBsZS5jb21cIl0iL
CAicGhvbmVfbnVtYmVyIjogIltcIlFnX082NHpxQXhlNDEyYTEwOGlyb0FcIiwgXCIrMS0
yMDItNTU1LTAxMDFcIl0iLCAiYWRkcmVzcyI6ICJbXCJBSngtMDk1VlBycFR0TjRRTU9xU
k9BXCIsIHtcInN0cmVldF9hZGRyZXNzXCI6IFwiMTIzIE1haW4gU3RcIiwgXCJsb2NhbGl
0eVwiOiBcIkFueXRvd25cIiwgXCJyZWdpb25cIjogXCJBbnlzdGF0ZVwiLCBcImNvdW50c
nlcIjogXCJVU1wifV0iLCAiYmlydGhkYXRlIjogIltcIlBjMzNKTTJMY2hjVV9sSGdndl9
1ZlFcIiwgXCIxOTQwLTAxLTAxXCJdIn19
</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 digests of the claim
values and the salts revealed in the SD-JWT-R using the hashing algorithm
specified in SD-JWT and comparing them to the hash digests included in SD-JWT.</t>
<t>For each claim, an array of the salt and the claim value is contained in the
<tt>sd_release</tt> object. The structure of <tt>sd_release</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;XZOUco1u_gEPknxS78sWWg&quot;,
  &quot;aud&quot;: &quot;https://example.com/verifier&quot;,
  &quot;sd_release&quot;: {
    &quot;given_name&quot;: &quot;[\&quot;eluV5Og3gSNII8EYnsxA_A\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;6Ij7tM-a5iVPGboS5tmvVA\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;address&quot;: &quot;[\&quot;AJx-095VPrpTtN4QMOqROA\&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">eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIkxkeVRYd0F5ZnJpcjRfVjZORzFSYzEwVThKZE
xZVHJFQktKaF9oNWlfclUifQ.eyJub25jZSI6ICJYWk9VY28xdV9nRVBrbnhTNzhzV1dnI
iwgImF1ZCI6ICJodHRwczovL2V4YW1wbGUuY29tL3ZlcmlmaWVyIiwgInNkX3JlbGVhc2U
iOiB7ImdpdmVuX25hbWUiOiAiW1wiZWx1VjVPZzNnU05JSThFWW5zeEFfQVwiLCBcIkpva
G5cIl0iLCAiZmFtaWx5X25hbWUiOiAiW1wiNklqN3RNLWE1aVZQR2JvUzV0bXZWQVwiLCB
cIkRvZVwiXSIsICJhZGRyZXNzIjogIltcIkFKeC0wOTVWUHJwVHRONFFNT3FST0FcIiwge
1wic3RyZWV0X2FkZHJlc3NcIjogXCIxMjMgTWFpbiBTdFwiLCBcImxvY2FsaXR5XCI6IFw
iQW55dG93blwiLCBcInJlZ2lvblwiOiBcIkFueXN0YXRlXCIsIFwiY291bnRyeVwiOiBcI
lVTXCJ9XSJ9fQ.j5jtArW1QDK1BNM13sJbQaE00GsAhhiPRYi6oK-iJRtLWE6DAgcWxDir
TvxTnuo7Mbb6gSqGTmdEEtmscWxweFfGQoddObPTDiapjWiR1bUMMqPDKNNkRe0CBkU-pW
ieYWN-fQxlRa4BKUqs18jcvGtTGA8Ye-i6t2xLROeXf2U_Seko8b7MQWIFHdbc0LvEFt_-
JAcqeshH5wjVkwhHofVuZq1vGLlINKBveKA2dmn6wuEzi6XRceTwFrG_hTECagfobdO-bY
MF3FSiCQM2KxC_6_aLApYo0aH3zjBv9rm0qNmnL_JGN5FIu6YqwhvPzfdsfkjMd68o8LTW
d7F6kQ
</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">eyJhbGciOiAiUlMyNTYiLCAia2lkIjogImNBRUlVcUowY21MekQxa3pHemhlaUJhZzBZUk
F6VmRsZnhOMjgwTmdIYUEifQ.eyJpc3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N0YXRlXCIsIFwiY291bnRyeVwiOiBcIlVTXCJ9XSJ9fQ.j
5jtArW1QDK1BNM13sJbQaE00GsAhhiPRYi6oK-iJRtLWE6DAgcWxDirTvxTnuo7Mbb6gSq
GTmdEEtmscWxweFfGQoddObPTDiapjWiR1bUMMqPDKNNkRe0CBkU-pWieYWN-fQxlRa4BK
Uqs18jcvGtTGA8Ye-i6t2xLROeXf2U_Seko8b7MQWIFHdbc0LvEFt_-JAcqeshH5wjVkwh
HofVuZq1vGLlINKBveKA2dmn6wuEzi6XRceTwFrG_hTECagfobdO-bYMF3FSiCQM2KxC_6
_aLApYo0aH3zjBv9rm0qNmnL_JGN5FIu6YqwhvPzfdsfkjMd68o8LTWd7F6kQ
</artwork>
<t>(Line breaks for presentation only.)</t>
</section>
</section>

<section anchor="verification"><name>Verification</name>

<section anchor="verification-by-the-holder-when-receiving-sd-jwt-and-svc"><name>Verification by the Holder when Receiving SD-JWT and SVC</name>
<t>The holder SHOULD verify the binding between SD-JWT and SVC by performing the following steps:
 1. Check that all the claims in the SVC are present in the SD-JWT and that there are no claims in the SD-JWT that are not in the SVC
 2. Check that the hashes of the claims in the SVC match those in the SD-JWT</t>
</section>

<section anchor="verification-by-the-verifier-when-receiving-sd-jwt-and-sd-jwt-r"><name>Verification by the Verifier when Receiving SD-JWT and SD-JWT-R</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 is 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 hash digests computed in the previous step with the one of the same claim in the SD-JWT.
Accept the claim only when the two hash digests 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>

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

<section anchor="mandatory-hash-computation-of-the-revealed-claim-values-by-the-verifier"><name>Mandatory hash computation of the revealed claim values by the Verifier</name>
<t>ToDo: add text explaining mechanisms that should be adopted to ensure that
  verifiers validate the claim values received in SD-JWT-R by calculating the
  hashes of those values and comparing them with the hashes in the SD-JWT:
  - create a test suite that forces hash computation by the Verifiers,
    and includes negative test cases in test vectors
  - use only implementations/libraries that are compliant to the test suite
  - etc.</t>
</section>

<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-and-uniqueness-of-the-salt"><name>Entropy and Uniqueness 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 MUST 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. Each salt value MUST be unique.</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 be preimage and collision
resistant, i.e., it is infeasible to calculate the salt and claim value that result in
a particular digest, and it is infeasible to find a different salt and claim value pair that
result in a matching digest, respectively.</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>Colluding issuer/verifier or verifier/verifier pairs could link issuance/presentation or two presentation sessions
to the same user on the basis of unique values encoded in the SD-JWT
(issuer signature, salts, digests, etc.). More advanced cryptographic schemes, outside the scope of
this specification, can be used to prevent this type of linkability.</t>
</section>
</section>

<section anchor="Acknowledgements"><name>Acknowledgements</name>
<t>We would like to thank
Alen Horvat,
Brian Campbell,
Christian Paquin,
Fabian Hauck,
Giuseppe De Marco,
Kushal Das,
Mike Jones,
Nat Sakimura,
Pieter Kasselman, and
Torsten Lodderstedt
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>
<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;pm4bOHBg-oYhAyPWzR56AWX3rUIXp11_ICDkGgS6W3ZWLts-hzwI3x65659kg4hVo9dbGoCJE3ZGF_eaetE30UhBUEgpGwrDrQiJ9zqprmcFfr3qvvkGjtth8Zgl1eM2bJcOwE7PCBHWTKWYs152R7g6Jg2OVph-a8rq-q79MhKG5QoW_mTz10QT_6H4c7PjWG1fjh8hpWNnbP_pv6d1zSwZfc5fl6yVRL0DV0V3lGHKe2Wqf_eNGjBrBLVklDTk8-stX_MWLcR-EGmXAOv0UBWitS_dXJKJu-vXJyw14nHSGuxTIK2hx1pttMft9CsvqimXKeDTU14qQL1eE7ihcw&quot;,
    &quot;e&quot;: &quot;AQAB&quot;
  },
  &quot;iat&quot;: 1516239022,
  &quot;exp&quot;: 1516247022,
  &quot;hash_alg&quot;: &quot;sha-256&quot;,
  &quot;sd_digests&quot;: {
    &quot;sub&quot;: &quot;Iuc2ft9sZwaw2yi_DZJKipiHMR_HbZP-5-WY8EKNqoA&quot;,
    &quot;given_name&quot;: &quot;TemA6ZTvHYgNfC8nzPC1x8q-yQxp5FpZjz-GQlSuJm4&quot;,
    &quot;family_name&quot;: &quot;Ro-RcqHFcflmKJ-YTnpL_roVgljLLJZuMoKiT714TpM&quot;,
    &quot;email&quot;: &quot;61L69IeXAGZxaWJocXvcou9-07PS8Ows4HNFO1tWqcg&quot;,
    &quot;phone_number&quot;: &quot;7WMDBVSk7vrJ4lBG0U6ze_5aCsK9N1UZD5Pwc1knOGY&quot;,
    &quot;address&quot;: {
      &quot;street_address&quot;: &quot;O3YCyDFQkM4JdjRHWL78j_Z9Voi3RSYw3VBU0VJ4Lkk&quot;,
      &quot;locality&quot;: &quot;BhZ5ZsxM39vej8aWP1l3_VdK6ErWIgaRsOBhiigsarc&quot;,
      &quot;region&quot;: &quot;sns2ezJN5JHUPAvzSwxFIwPj_PrQbeiBGZujbwOYuJo&quot;,
      &quot;country&quot;: &quot;rf-11mZmiYQOM7jRKqgNqqk_Zk1RbQJv7VVi9q2uU80&quot;
    },
    &quot;birthdate&quot;: &quot;_gsBVx70--mLOaPOrl8POf5Vr3Coubg2yiz5pMrOLDc&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;G02NSrQfjFXQ7Io09syajA\&quot;, \&quot;6c5c0a49-b589-431d-bae7-219122a9ec2c\&quot;]&quot;,
    &quot;given_name&quot;: &quot;[\&quot;lklxF5jMYlGTPUovMNIvCA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;nPuoQnkRFq3BIeAm7AnXFA\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;email&quot;: &quot;[\&quot;5bPs1IquZNa0hkaFzzzZNw\&quot;, \&quot;johndoe@example.com\&quot;]&quot;,
    &quot;phone_number&quot;: &quot;[\&quot;5a2W0_NrlEZzfqmk_7Pq-w\&quot;, \&quot;+1-202-555-0101\&quot;]&quot;,
    &quot;address&quot;: {
      &quot;street_address&quot;: &quot;[\&quot;y1sVU5wdfJahVdgwPgS7RQ\&quot;, \&quot;123 Main St\&quot;]&quot;,
      &quot;locality&quot;: &quot;[\&quot;HbQ4X8srVW3QDxnIJdqyOA\&quot;, \&quot;Anytown\&quot;]&quot;,
      &quot;region&quot;: &quot;[\&quot;C9GSoujviJquEgYfojCb1A\&quot;, \&quot;Anystate\&quot;]&quot;,
      &quot;country&quot;: &quot;[\&quot;kx5kF17V-x0JmwUx9vgvtw\&quot;, \&quot;US\&quot;]&quot;
    },
    &quot;birthdate&quot;: &quot;[\&quot;H3o1uswP760Fi2yeGdVCEQ\&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;XZOUco1u_gEPknxS78sWWg&quot;,
  &quot;aud&quot;: &quot;https://example.com/verifier&quot;,
  &quot;sd_release&quot;: {
    &quot;given_name&quot;: &quot;[\&quot;lklxF5jMYlGTPUovMNIvCA\&quot;, \&quot;John\&quot;]&quot;,
    &quot;family_name&quot;: &quot;[\&quot;nPuoQnkRFq3BIeAm7AnXFA\&quot;, \&quot;Doe\&quot;]&quot;,
    &quot;birthdate&quot;: &quot;[\&quot;H3o1uswP760Fi2yeGdVCEQ\&quot;, \&quot;1940-01-01\&quot;]&quot;,
    &quot;address&quot;: {
      &quot;region&quot;: &quot;[\&quot;C9GSoujviJquEgYfojCb1A\&quot;, \&quot;Anystate\&quot;]&quot;,
      &quot;country&quot;: &quot;[\&quot;kx5kF17V-x0JmwUx9vgvtw\&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;pm4bOHBg-oYhAyPWzR56AWX3rUIXp11_ICDkGgS6W3ZWLts-hzwI3x65659kg4hVo9dbGoCJE3ZGF_eaetE30UhBUEgpGwrDrQiJ9zqprmcFfr3qvvkGjtth8Zgl1eM2bJcOwE7PCBHWTKWYs152R7g6Jg2OVph-a8rq-q79MhKG5QoW_mTz10QT_6H4c7PjWG1fjh8hpWNnbP_pv6d1zSwZfc5fl6yVRL0DV0V3lGHKe2Wqf_eNGjBrBLVklDTk8-stX_MWLcR-EGmXAOv0UBWitS_dXJKJu-vXJyw14nHSGuxTIK2hx1pttMft9CsvqimXKeDTU14qQL1eE7ihcw&quot;,
    &quot;e&quot;: &quot;AQAB&quot;
  },
  &quot;iat&quot;: 1516239022,
  &quot;exp&quot;: 1516247022,
  &quot;hash_alg&quot;: &quot;sha-256&quot;,
  &quot;sd_digests&quot;: {
    &quot;verified_claims&quot;: {
      &quot;verification&quot;: {
        &quot;trust_framework&quot;: &quot;ulse4qfN0Jsw6MJaDRpE7s4QfC9jl5xRsAdtLu5y0Nw&quot;,
        &quot;time&quot;: &quot;5erOXGVITtW2jAYqqZjgSKv9BDV64-ij7oxm70PH5mw&quot;,
        &quot;verification_process&quot;: &quot;R2IWSNyqDsKcTv8wbJvHacrXvxH41M2o2XyBPXDdBMs&quot;,
        &quot;evidence&quot;: [
          {
            &quot;type&quot;: &quot;60D_WEYdd9fVIg4Yp5LYkF_bfm-CrPO0MD4afV53QxE&quot;,
            &quot;method&quot;: &quot;k8rl0LZgxWhSeIY-Pgx7ElPbrThBEqqgEphCWOepQoY&quot;,
            &quot;time&quot;: &quot;Dv2iv4WN2l-W5TjjRFGuD7q5-cpUg5h_QmD6oIHac6c&quot;,
            &quot;document&quot;: {
              &quot;type&quot;: &quot;bboBy937YbIm5bteK-7RqM-8sC6v80bzJOjOHfnmSsc&quot;,
              &quot;issuer&quot;: {
                &quot;name&quot;: &quot;Fd3FDJu1SNMUbUzRZzbANGoIlKvcK-nJJNlsO-Jcfzs&quot;,
                &quot;country&quot;: &quot;Oe1_kHEITWW2XL0_mAZkdwKdr4oxE00fkDjYHHPb7Zk&quot;
              },
              &quot;number&quot;: &quot;EVf75JZoNwyubkCbGd3yg5TGOp3PFNPPd8IBJr4iC58&quot;,
              &quot;date_of_issuance&quot;: &quot;H0dpfU5qe-oqAfqqLPYIb0uPm6x2ARIyVsOcOtsvfxg&quot;,
              &quot;date_of_expiry&quot;: &quot;Qf39B8Li53nPLPfFCTiNP8fiSl3cVUL5nmVSgYG8bC4&quot;
            }
          }
        ]
      },
      &quot;claims&quot;: {
        &quot;given_name&quot;: &quot;YdDYUguv9oG-G8qrtwFQKEBpCqk6qcfgAEINzvuHcuI&quot;,
        &quot;family_name&quot;: &quot;7meD-4eVxg9gtdgS4uFi5n2sCjY2szjLPJVJDFm5Zuk&quot;,
        &quot;birthdate&quot;: &quot;iEPf4UDcUu-JYKSkuOQ50eL5sivCEvsVunHrywK8FcU&quot;,
        &quot;place_of_birth&quot;: {
          &quot;country&quot;: &quot;gOL8yL-y0eICAytKN13yijyivVf-7Tej4KULwXG_JaQ&quot;,
          &quot;locality&quot;: &quot;pXVczldRi8FsPm5WuVaF-4Sw3E3WgcPtHuLOmIhMyYU&quot;
        },
        &quot;nationalities&quot;: &quot;Nb6-_rHdYcq-4pfEvkZFNVa3FHn1LUiMrTeSyJ_d9rk&quot;,
        &quot;address&quot;: &quot;-EfqJRS0_hpL031rOyszFeDrbEurLQb-oGD2kjeaKiE&quot;
      }
    },
    &quot;birth_middle_name&quot;: &quot;I51fdBdsVsfbH4FWgI3db4yVEfOgf2FSIjl8EDBfzl8&quot;,
    &quot;salutation&quot;: &quot;YygVZ2yM6udZml4xl-APnKVhbOAVn38otn8btB-eFDU&quot;,
    &quot;msisdn&quot;: &quot;4Abm9luJeisejT3a80C9BGXWX3MG1XF3UK94cVl4Mvg&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">eyJhbGciOiAiUlMyNTYiLCAia2lkIjogImNBRUlVcUowY21MekQxa3pHemhlaUJhZzBZUk
F6VmRsZnhOMjgwTmdIYUEifQ.e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ogIltcInloM2NRU
0tuaGRHbXBWZ2QzeWRIMlFcIiwgXCJNZWllclwiXSIsICJiaXJ0aGRhdGUiOiAiW1wiQkF
vS05LNUNqbER5WGZDUjZOa0syQVwiLCBcIjE5NTYtMDEtMjhcIl0iLCAicGxhY2Vfb2ZfY
mlydGgiOiB7ImNvdW50cnkiOiAiW1widl9hem02ZC10cVRuZGFOdlg5LUpMUVwiLCBcIkR
FXCJdIiwgImxvY2FsaXR5IjogIltcIk5XQ1dTZ0lqSmtWVlZzcGV0eGRXeHdcIiwgXCJNd
XN0ZXJzdGFkdFwiXSJ9LCAibmF0aW9uYWxpdGllcyI6ICJbXCJuZ2tLUlNrbS01VktYR1g
5akNGTEhRXCIsIFtcIkRFXCJdXSIsICJhZGRyZXNzIjogIltcImVyczk3d3hPTGR1RnVoS
k5aOVZVVEFcIiwge1wibG9jYWxpdHlcIjogXCJNYXhzdGFkdFwiLCBcInBvc3RhbF9jb2R
lXCI6IFwiMTIzNDRcIiwgXCJjb3VudHJ5XCI6IFwiREVcIiwgXCJzdHJlZXRfYWRkcmVzc
1wiOiBcIkFuIGRlciBXZWlkZSAyMlwifV0ifX0sICJiaXJ0aF9taWRkbGVfbmFtZSI6ICJ
bXCJhaHNaai1oN2VWYlh6UG5QVng5NkhRXCIsIFwiVGltb3RoZXVzXCJdIiwgInNhbHV0Y
XRpb24iOiAiW1wiczM5dENVMVZ2S19rSi1zcW9KQmd6Z1wiLCBcIkRyLlwiXSIsICJtc2l
zZG4iOiAiW1wiLWYyakZoRE9GVEtfT0E5aUFobGtqZ1wiLCBcIjQ5MTIzNDU2Nzg5XCJdI
n19
</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;XZOUco1u_gEPknxS78sWWg&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;OBKlTVlvLg-AdwqYGbP8ZA\&quot;, \&quot;de_aml\&quot;]&quot;,
        &quot;time&quot;: &quot;[\&quot;M0Jb57t41ubrkSuyrDT3xA\&quot;, \&quot;2012-04-23T18:25Z\&quot;]&quot;,
        &quot;evidence&quot;: [
          {
            &quot;type&quot;: &quot;[\&quot;eK5o5pHfgupPpltj1qhAJw\&quot;, \&quot;document\&quot;]&quot;
          }
        ]
      },
      &quot;claims&quot;: {
        &quot;given_name&quot;: &quot;[\&quot;R7D6Lhl52uxloBQFRulzzA\&quot;, \&quot;Max\&quot;]&quot;,
        &quot;family_name&quot;: &quot;[\&quot;yh3cQSKnhdGmpVgd3ydH2Q\&quot;, \&quot;Meier\&quot;]&quot;,
        &quot;birthdate&quot;: &quot;[\&quot;BAoKNK5CjlDyXfCR6NkK2A\&quot;, \&quot;1956-01-28\&quot;]&quot;,
        &quot;place_of_birth&quot;: {
          &quot;country&quot;: &quot;[\&quot;v_azm6d-tqTndaNvX9-JLQ\&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>-02</t>

<ul>
<li><t>Added acknowledgements</t>
</li>
<li><t>Improved Security Considerations</t>
</li>
<li><t>Stressed uniqueness requirements for salts</t>
</li>
<li><t>Python reference implementation clean-up and refactoring</t>
</li>
</ul>
<t>-01</t>

<ul>
<li><t>Editorial fixes</t>
</li>
<li><t>Added <tt>hash_alg</tt> claim</t>
</li>
<li><t>Renamed <tt>_sd</tt> to <tt>sd_digests</tt> and <tt>sd_release</tt></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>
