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 multibase datatype definition #176

Merged
merged 8 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
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
53 changes: 52 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,14 @@ <h3>Securing Data Losslessly</h3>
</section>

<section>
<h3 id="cryptosuiteString">The `cryptosuiteString` Datatype</h3>
<h3>Datatypes</h3>

<p>
This section defines datatypes that are used by this specification.
</p>

<section>
<h4 id="cryptosuiteString">The `cryptosuiteString` Datatype</h3>

<p>
This specification encodes cryptographic suite identifiers as enumerable
Expand Down Expand Up @@ -1981,6 +1988,50 @@ <h3 id="cryptosuiteString">The `cryptosuiteString` Datatype</h3>
</dl>
</section>

<section>
<h4 id="multibase">The `multibase` Datatype</h3>

<p>
[[?MULTIBASE]]-encoded strings are used to encode binary data into ASCII-only
formats, which are useful in environments that cannot directly represent binary
values. This specification makes use of this encoding. In environments that
support data types for string values, such as RDF [[?RDF-CONCEPTS]],
[[?MULTIBASE]]-encoded content is indicated using a literal value whose datatype
is set to `https://w3id.org/security#multibase`.
</p>

<p>
The `multibase` datatype is defined as follows:
</p>

<dl>
<dt>The URL denoting this datatype</dt>
<dd>
`https://w3id.org/security#multibase`
</dd>
<dt>The lexical space</dt>
<dd>
Any string that starts with a [[?MULTIBASE]] character and the rest of
the characters consist of allowable characters in the respective base-encoding
alphabet.
</dd>
<dt>The value space</dt>
<dd>
An arbitrary binary data value.
</dd>
<dt>The lexical-to-value mapping</dt>
<dd>
Any element of the lexical space is mapped to the value space by base-decoding
the value based on the base-decoding alphabet associated with the
first [[?MULTIBASE]] character in the lexical string.
</dd>
<dt>The canonical mapping</dt>
<dd>
The canonical mapping consists of using the lexical-to-value mapping.
</dd>
</dl>
</section>

</section>

</section>
Expand Down
15 changes: 10 additions & 5 deletions vocab/security/vocabulary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ property:
label: Proof sets
range: sec:ProofGraph
defined_by: https://www.w3.org/TR/vc-data-integrity/#proof-sets

- id: domain
label: Domain of a proof
domain: sec:Proof
Expand Down Expand Up @@ -197,7 +197,7 @@ property:
- id: proofValue
label: Proof value
domain: sec:Proof
range: xsd:string
range: sec:multibase
defined_by: https://www.w3.org/TR/vc-data-integrity/#dfn-proofvalue

- id: created
Expand Down Expand Up @@ -252,7 +252,7 @@ property:
- id: publicKeyMultibase
label: Public key multibase
domain: sec:Multikey
range: xsd:string
range: sec:multibase
defined_by: https://www.w3.org/TR/vc-data-integrity/#dfn-publickeymultibase
see_also:
- label: multibase
Expand All @@ -265,7 +265,7 @@ property:
- id: secretKeyMultibase
label: Secret key multibase
domain: sec:Multikey
range: xsd:string
range: sec:multibase
defined_by: https://www.w3.org/TR/vc-data-integrity/#dfn-secretkeymultibase
see_also:
- label: multibase format
Expand Down Expand Up @@ -436,7 +436,7 @@ individual:
upper_value: sec:ProcessingError
label: Invalid verification method
defined_by: https://www.w3.org/TR/vc-data-integrity/#INVALID_VERIFICATION_METHOD

- id: INVALID_PROOF_PURPOSE_FOR_VERIFICATION_METHOD
upper_value: sec:ProcessingError
label: Invalid proof purpose for verification method
Expand All @@ -447,3 +447,8 @@ datatype:
label: Datatype for cryptosuite Identifiers
upper_value: xsd:string
defined_by: https://www.w3.org/TR/vc-data-integrity/#cryptosuiteString

- id: multibase
label: Datatype for multibase values
upper_value: xsd:string
defined_by: https://www.w3.org/TR/vc-data-integrity/#multibase