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 implementation notes section to test vectors, add text there clarifying CBOR-LD maps. #16

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,12 @@ <h4>CBOR-LD Compression and Encoding</h4>
'keyAgreement' => 238
}
</pre>
<p>
For more information on the above, see <a href="#implementation-notes">Section 6.3.1</a>.
wes-smith marked this conversation as resolved.
Show resolved Hide resolved
wes-smith marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p>
This results in the following encoded credential:
</p>
<pre class="example nohighlight"
title="A CBOR-LD compressed Utopia Driver's License VC">
d90664a60183198000198001198002189d82187618a418b8a3189c18a618ce18b218d01ae592208118baa2189c18a018a8447582002018be18aa18c0a5189c186c18d60418e018e618e258417ab7c2e56b49e2cce62184ce26818e15a8b173164401b5d3bb93ffd6d2b5eb8f6ac0971502ae3dd49d17ec66528164034c912685b8111bc04cdc9ec13dbadd91cc18e418ac
Expand Down Expand Up @@ -1613,7 +1618,12 @@ <h4>CBOR-LD Compression and Encoding</h4>
'keyAgreement' => 234
}
</pre>
This results in the following encoded credential:
<p>
For more information on the above, see <a href="#implementation-notes">Section 6.3.1</a>.
wes-smith marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p>
Compression then results in the following encoded credential:
</p>
<pre class="example nohighlight"
title="A CBOR-LD compressed Utopia EAD VC">
d90664a50183198000198001198002189d82187618a418baa1189c18a218be18ae18c0a5189c186c18d20418dc18e218de58417a9ec7f688f60caa8c757592250b3f6d6e18419941f186e1ed4245770e687502d51d01cd2c2295e4338178a51a35c2f044a85598e15db9aef00261bc5c95a744e718e018b0
Expand Down Expand Up @@ -1827,6 +1837,9 @@ <h4>Decoding and Decompressing</h4>
}
</pre>
<p>
For more information on the above, see <a href="#implementation-notes">Section 6.3.1</a>.
wes-smith marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p>
Decompression then yields the following credential:
</p>
<pre class="example nohighlight"
Expand Down Expand Up @@ -2066,6 +2079,9 @@ <h4>Decoding and Decompressing</h4>
}
</pre>
<p>
For more information on the above, see <a href="#implementation-notes">Section 6.3.1</a>.
wes-smith marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p>
Decompression then yields the following credential:
</p>
<pre class="example nohighlight"
Expand Down Expand Up @@ -2122,6 +2138,32 @@ <h4>Verifying</h4>
</section>
<section>
<h3>
Implementation Notes
</h3>
<section>
<h4>
CBOR-LD
</h4>
<p>
When building maps from terms that appear in contexts to CBOR-LD integers, note that
wes-smith marked this conversation as resolved.
Show resolved Hide resolved
some contexts include other contexts inside of them, nested under particular
types of objects. These nested contexts are called "type-scoped contexts" and they only
become active when the associated type is used in the data. This is important for term ID
assignment because the terms in a context are only assigned IDs once that context becomes
active. In these test vectors, this is why the maps created for the Driver's License and
the Employment Authorization Document are different even though the two credentials use
identical contexts.
</p>
<p>
In addition, note that odd numbers are used in CBOR-LD to express terms when the associated
value is plural. For example, in the CBOR-LD term to ID and id to term maps above, "type" is
mapped to 156, but in places where multiple types are expressed in a VC, 157 is used instead.
</p>

wes-smith marked this conversation as resolved.
Show resolved Hide resolved
</section>
</section>
<section>
<h3>
Legacy CBOR-LD encoded credentials
</h3>
For testing if a CBOR-LD implementation that is not fully up to date is used. The process remains
Expand Down
Loading