Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples for multiple status lists and multiple entries in a single status list #122

Merged
merged 8 commits into from
Jan 13, 2024
126 changes: 119 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,9 @@ <h3>BitstringStatusListCredential</h3>
<tr>
<td id="statusPurpose">credentialSubject.statusPurpose</td>
<td>
The purpose of the status entry MUST be a string. While the value of the
string is arbitrary, the following values MUST be used for their intended
purpose:
The value of the purpose property of the status entry, `statusPurpose`, MUST be
one or more strings. While the value of each string is arbitrary, the following
values MUST be used for their intended purpose:
<table class="simple">
<thead>
<tr>
Expand Down Expand Up @@ -790,8 +790,9 @@ <h3>Validate Algorithm</h3>
<a href="#STATUS_VERIFICATION_ERROR">STATUS_VERIFICATION_ERROR</a>.
</li>
<li>
Verify that the |status purpose| is equal to the
`statusPurpose` value in the |statusListCredential|. If the values are not
Verify that the |status purpose| is equal to a `statusPurpose` value in the
|statusListCredential|. Note: The |statusListCredential| might contain multiple
status purposes in a single list. If the values are not
equal, raise a
<a href="#STATUS_VERIFICATION_ERROR">STATUS_VERIFICATION_ERROR</a>.
</li>
Expand Down Expand Up @@ -1256,10 +1257,11 @@ <h2>Internationalization Considerations</h2>
<h2>Appendix</h2>
<section>
<h2>Examples</h2>

<section>
<h2>Revocable Verifiable Credential</h2>
<pre class="example nohighlight vc" title="A Revocable Verifiable Credential"
data-vc-vm='https://example.edu/issuers/565049/keys/1'>
data-vc-vm="https://example.edu/issuers/565049/keys/1">
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
Expand All @@ -1284,10 +1286,11 @@ <h2>Revocable Verifiable Credential</h2>
</pre>

</section>

<section>
<h2>Status List Verifiable Credential</h2>
<pre class="example nohighlight vc" title="A Status List Verifiable Credential"
data-vc-vm='https://example.edu/issuers/565049/keys/1'>
data-vc-vm="https://example.edu/issuers/565049/keys/1">
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
Expand All @@ -1306,6 +1309,115 @@ <h2>Status List Verifiable Credential</h2>
}
</pre>
</section>

<section>
<h2>Multiple Status Lists in One Verifiable Credential</h2>

<p>
This specification enables an <a>issuer</a> to associate multiple status lists
with a single <a>verifiable credential</a>.
</p>

<pre class="example nohighlight vc"
title="Associating multiple status lists with a single Verifiable Credential"
data-vc-vm='https://example.edu/issuers/565049/keys/1'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that ' is used to wrap data-vc-vm values (lines 1092 and 1157), instead of " as on all other attribute values? It just seems odd to differ like this...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, no reason, just a typo.

Copy link
Member Author

@msporny msporny Jan 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8d234df.

{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"id": "https://example.com/credentials/23894672394",
"type": ["VerifiableCredential"],
"issuer": "did:example:12345",
"issuanceDate": "2021-04-05T14:27:42Z",
<span class="comment">// note the use of an array to represent the set of
// status entries</span>
"credentialStatus": <span class="highlight">[{
"id": "https://example.com/credentials/status/3#94567",
"type": "BitstringStatusListEntry",
"statusPurpose": "revocation",
"statusListIndex": "94567",
"statusListCredential": "https://example.com/credentials/status/3"
}, {
"id": "https://example.com/credentials/status/4#12345",
"type": "BitstringStatusListEntry",
"statusPurpose": "suspension",
"statusListIndex": "12345",
"statusListCredential": "https://example.com/credentials/status/4"
}]</span>,
"credentialSubject": {
"id": "did:example:6789",
"type": "Person"
}
}
</pre>
</section>

<section>
<h2>Multiple Status Entries in a Single List</h2>

<p>
It is possible for a single status list to contain multiple types of status
purposes. Doing so can make the retrieval of a list slightly more efficient
msporny marked this conversation as resolved.
Show resolved Hide resolved
than fetching multiple status lists.
</p>

<p class="issue atrisk" title="Efficiency argument is weak">
The "space efficiency" argument for this feature is weak. One list with two types
of status entries must, presumably, be twice as long as a list with one type of
status entries, to ensure proper privacy protections. One privacy benefit of
doing so is that bit flips cannot be known to be associated with a particular
status unless one is also in control of the VC that the status is about.
Therefore, mixing "revocation" and "suspension" in a single list that is twice
as large has positive privacy implications.<br><br>
The "retrieval efficiency" argument is also weak. Performing two HTTP retrievals
instead of one is probably not significant. Performing upwards of five or six,
on a list that is five or six times larger, might result in fairly meager
savings over modern versions of HTTP that bundle requests over a single channel
(such as HTTP/2 or HTTP/3). The requests themselves would save a handful of
bytes with no significant improvement in retrieval speed.<br><br>
The Working Group is looking for feedback from implementers and is considering
striking this feature during the Candidate Recommendation period, since it would
simplify the specification for implementations to not have to support sets of
`statusPurpose` values in the status list credentials (again, a meager savings
in space efficiency at a small cost to retrieval efficiency).
</p>

<pre class="example nohighlight vc"
title="Associating multiple status entries in a single status list"
data-vc-vm='https://example.edu/issuers/565049/keys/1'>
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"id": "https://example.com/credentials/23894672394",
"type": ["VerifiableCredential"],
"issuer": "did:example:12345",
"issuanceDate": "2021-04-05T14:27:42Z",
<span class="comment">// note the use of a single list to store multiple
// status entries</span>
"credentialStatus": [{
"id": "<span class="highlight">https://example.com/credentials/status/5#94567</span>",
"type": "BitstringStatusListEntry",
"statusPurpose": "revocation",
"statusListIndex": "94567",
"statusListCredential": "<span class="highlight">https://example.com/credentials/status/5</span>"
}, {
"id": "<span class="highlight">https://example.com/credentials/status/5#12345</span>",
"type": "BitstringStatusListEntry",
"statusPurpose": "suspension",
"statusListIndex": "12345",
"statusListCredential": "<span class="highlight">https://example.com/credentials/status/5</span>"
}],
"credentialSubject": {
"id": "did:example:6789",
"type": "Person"
}
}
</pre>
</section>

</section>
</section>

Expand Down
Loading