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 COSE examples #185

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Changes from all 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
57 changes: 54 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1636,10 +1636,61 @@ <h3>Data URIs</h3>

<section>
<h2>
Detached Payload
COSE Examples
</h2>
<p class="issue" data-number="174">
TODO add COSE Sign1 detached payload examples
<p>
These examples rely on <a data-cite="RFC7049#section-6">CBOR Diagnostic Notation</a>.
Remember that all actual interchange always happens in the binary format.
</p>

<pre class="example" title="A COSE Sign 1 Protected Header for a Verifiable Credential">
{ / Protected /
1: -35, / Algorithm /
3: application/vc+ld+json, / Content type /
4: h'177f12cb...1933d554', / Key identifier /
15: { / CWT Claims /
1: urn:example:123, / Issuer /
2: urn:example:456, / Subject /
},
}
</pre>

<pre class="example" title="A COSE Sign 1 Protected Header for a Verifiable Presentation">
{ / Protected /
1: -35, / Algorithm /
3: application/vp+ld+json, / Content type /
4: h'177f12cb...1933d554', / Key identifier /
15: { / CWT Claims /
1: urn:example:123, / Issuer /
2: urn:example:456, / Subject /
},
}
</pre>

<pre class="example" title="A COSE Sign 1 with an attached payload">
18( / COSE Sign 1 /
[
h'a4013822...3a343536', / Protected Header /
{} / Unprotected Header /
h'0fbe22a0...3a009118', / Attached payload /
h'09772c7f...5c4e736f' / Signature /
]
)
</pre>

<pre class="example" title="A COSE Sign 1 with a detached payload">
18( / COSE Sign 1 /
[
h'a4013822...3a343536', / Protected Header /
{} / Unprotected Header /
nil, / Detached payload /
h'09772c7f...5c4e736f' / Signature /
]
)
</pre>
<p>
The payload can be either a credential or presentation as described in
<a data-cite="VC-DATA-MODEL-2.0#securing-verifiable-credentials">Securing Verifiable Credentials</a>.
</p>
</section>
</section>
Expand Down