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

fix(spec): fix broken anchors commitment-value-generation #887

Merged
merged 1 commit into from
Nov 10, 2020
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
4 changes: 2 additions & 2 deletions docs/api/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ As detailed in [Resolution](#resolution), the resolution request MAY include the
The server responds with the [DID Resolution Result](https://w3c-ccg.github.io/did-resolution/#did-resolution-result) composed of the DID Document and Method Metadata.
Sidetree defines `published`, `updateCommitment`, and `recoveryCommitment` method metadata.
- `published` is detailed in [Published Property](#published-property).
- `updateCommitment` is the commitement for the next update operation as defined in [commitment value generation](https://identity.foundation/sidetree/spec/#commitment-value-generation).
- `recoveryCommitment` is the commitement for the next recover or deactivate operation as defined in [commitment value generation](https://identity.foundation/sidetree/spec/#commitment-value-generation).
- `updateCommitment` is the commitement for the next update operation as defined in [commitment schemes](https://identity.foundation/sidetree/spec/#commitment-schemes).
- `recoveryCommitment` is the commitement for the next recover or deactivate operation as defined in [commitment schemes](https://identity.foundation/sidetree/spec/#commitment-schemes).

::: example
```json
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ Use the following process to recover a Sidetree-based DID:
3. Create a _Recovery Commitment_ using the [Hashing Process](#hashing-process) to generate a hash value from the canonicalized [IETF RFC 7517](https://tools.ietf.org/html/rfc7517) JWK representation (using the implementation's [`JSON_CANONICALIZATION_SCHEME`](#json-canonicalization-scheme)) of the _Next Recovery Public Key_, and retain the hash value for inclusion in an [Anchor File](#anchor-file).
4. Generate a new operation key pair, which ****SHOULD NOT**** be the same key used in any previous operations, via the [`KEY_ALGORITHM`](#key-algorithm), retaining the _Next Update Public Key_ for use in generating the next _Update Commitment_, and the private key for use in the next [Update](#update) operation.
5. Create an _Update Commitment_ using the [Hashing Process](#hashing-process) to generate a hash value from the canonicalized [IETF RFC 7517](https://tools.ietf.org/html/rfc7517) JWK representation (using the implementation's [`JSON_CANONICALIZATION_SCHEME`](#json-canonicalization-scheme)) of the _Next Update Public Key_, and retain the hash value for inclusion in the [_Recovery Operation Delta Object_](#recover-delta-object)(as described below).
6. Generate and retain a [`COMMITMENT_VALUE`](#commitment-value), in adherence with the [Commitment Value Generation](#commitment-value-generation) directives, for use in the next Update operation, herein referred to as the _Update Reveal Value_.
7. Generate an _Update Commitment_ using the [Hashing Process](#hashing-process), in adherence with the [Commitment Value Generation](#commitment-value-generation) directives, to generate a hash of the _Update Reveal Value_, and retain the resulting hash value for inclusion in an [Anchor File](#anchor-file).
6. Generate and retain a [`COMMITMENT_VALUE`](#commitment-value), in adherence with the [Commitment Schemes](#commitment-schemes) directives, for use in the next Update operation, herein referred to as the _Update Reveal Value_.
7. Generate an _Update Commitment_ using the [Hashing Process](#hashing-process), in adherence with the [Commitment Schemes](#commitment-schemes) directives, to generate a hash of the _Update Reveal Value_, and retain the resulting hash value for inclusion in an [Anchor File](#anchor-file).
8. Generate a canonicalized representation of the following object using the implementation's [`JSON_CANONICALIZATION_SCHEME`](#json-canonicalization-scheme), herein referred to as the [_Recovery Operation Delta Object_](#recover-delta-object){ id="recover-delta-object" }, composed as follows:
```json
{
Expand Down
14 changes: 7 additions & 7 deletions www/spec/v0.1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ <h3 id="map-file"><a class="toc-anchor" href="#map-file">§</a> Map File</h3>
<span class="token property">"delta_hash"</span><span class="token operator">:</span> DELTA_HASH
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token property">"signature"</span><span class="token operator">:</span> SIGNATURE_STRING
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>...<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
Expand Down Expand Up @@ -686,7 +686,7 @@ <h3 id="chunk-files"><a class="toc-anchor" href="#chunk-files">§</a> Chunk File
href="#create-operation-chunk-file-entry">EXAMPLE</a>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>
<span class="token property">"deltas"</span><span class="token operator">:</span> <span class="token punctuation">[</span>

<span class="token punctuation">{</span> <span class="token comment">// JSON.stringify()-ed, and Base64URL encoded</span>
<span class="token property">"patches"</span><span class="token operator">:</span> PATCH_ARRAY<span class="token punctuation">,</span>
<span class="token property">"update_commitment"</span><span class="token operator">:</span> COMMITMENT_HASH
Expand Down Expand Up @@ -1040,10 +1040,10 @@ <h3 id="recover"><a class="toc-anchor" href="#recover">§</a> Recover</h3>
the <a href="#recover-delta-object"><em>Recovery Operation Delta Object</em></a>(as described
below).</li>
<li>Generate and retain a <a href="#commitment-value"><code>COMMITMENT_VALUE</code></a>, in adherence
with the <a href="#commitment-value-generation">Commitment Value Generation</a> directives, for use
with the <a href="#commitment-schemes">Commitment Schemes</a> directives, for use
in the next Update operation, herein referred to as the <em>Update Reveal Value</em>.</li>
<li>Generate an <em>Update Commitment</em> using the <a href="#hashing-process">Hashing Process</a>, in
adherence with the <a href="#commitment-value-generation">Commitment Value Generation</a>
adherence with the <a href="#commitment-schemes">Commitment Schemes</a>
directives, to generate a hash of the <em>Update Reveal Value</em>, and retain the resulting hash
value for inclusion in an <a href="#anchor-file">Anchor File</a>.</li>
<li>Generate an encoded representation of the following object using the implementation’s
Expand Down Expand Up @@ -2389,7 +2389,7 @@ <h2 id="context"><a class="toc-anchor" href="#context">§</a> Context</h2>
<p>For example:</p>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>
<span class="token property">"@context"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token string">"https://www.w3.org/ns/did/v1"</span><span class="token punctuation">,</span>
<span class="token string">"https://www.w3.org/ns/did/v1"</span><span class="token punctuation">,</span>
<span class="token string">"https://identity.foundation/sidetree/context-v1.jsonld"</span><span class="token punctuation">,</span>
<span class="token string">"https://example.com/method/specific.jsonld"</span>
<span class="token punctuation">]</span>
Expand All @@ -2401,7 +2401,7 @@ <h3 id="recovery"><a class="toc-anchor" href="#recovery">§</a> recovery</h3>
<p>For Example:</p>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>
<span class="token property">"@context"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token string">"https://www.w3.org/ns/did/v1"</span><span class="token punctuation">,</span>
<span class="token string">"https://www.w3.org/ns/did/v1"</span><span class="token punctuation">,</span>
<span class="token string">"https://identity.foundation/sidetree/context-v1.jsonld"</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">"recovery"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
Expand All @@ -2425,7 +2425,7 @@ <h3 id="operation"><a class="toc-anchor" href="#operation">§</a> operation</h3>
<p>For Example:</p>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>
<span class="token property">"@context"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token string">"https://www.w3.org/ns/did/v1"</span><span class="token punctuation">,</span>
<span class="token string">"https://www.w3.org/ns/did/v1"</span><span class="token punctuation">,</span>
<span class="token string">"https://identity.foundation/sidetree/context-v1.jsonld"</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">"operation"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
Expand Down