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 4 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
55 changes: 54 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,52 @@ <h3 id="cryptosuiteString">The `cryptosuiteString` Datatype</h3>
</dl>
</section>

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

<p>
This specification encodes binary data into [[?MULTIBASE]]-encoded strings,
which is useful in environments that cannot represent some binary values, such
as ASCII-only data formats. In environments that support data types
msporny marked this conversation as resolved.
Show resolved Hide resolved
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>
Any arbitrary binary data value.
msporny marked this conversation as resolved.
Show resolved Hide resolved
</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 character in the lexical string.
msporny marked this conversation as resolved.
Show resolved Hide resolved
</dd>
<dt>The canonical mapping</dt>
<dd>
Any element of the value space is mapped to the lexical space by expressing
the desired base-encoding [[?MULTIBASE]] character first, and then base-encoding
the value according to the desired base-encoding alphabet.
iherman marked this conversation as resolved.
Show resolved Hide resolved
</dd>
</dl>
</section>

</section>

</section>
Expand Down
2 changes: 1 addition & 1 deletion vocab/security/vocabulary.yml
Original file line number Diff line number Diff line change
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