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

Update ver. 0.4 to the specification #108

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

swcurran
Copy link
Collaborator

Signed-off-by: Stephen Curran swcurran@gmail.com

Signed-off-by: Stephen Curran <swcurran@gmail.com>
@swcurran
Copy link
Collaborator Author

An update to the specification as per #106.

Note that the names of the items in the DID Log Entry object remain long form -- versionId, versionTime, parameters, state and proof. There was some discussion of shortening them, but I plan to do that in a subsequent commit once we can have a discussion of the names to use. Changing them from the current names to shorter versions will be easier from this point.

To be discussed at the 2024.09.26 did:tdw meeting -- agenda here.

Feedback ahead of the meeting welcome -- anything unexpected in this?

martipos and others added 3 commits September 25, 2024 08:45
Signed-off-by: martipos <176692840+martipos@users.noreply.github.com>

Signed-off-by: martipos <176692840+martipos@users.noreply.github.com>
Signed-off-by: Stephen Curran <swcurran@gmail.com>
@swcurran
Copy link
Collaborator Author

I've now updated the examples, per the implementation from the Python version. In theory, this is now complete.

Copy link
Contributor

@martipos martipos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording changes

  • Removed my previous change that the Integrity Proof is a JSON Object, based on yesterdays discussion outcome (it will remain an array/set)
  • replaced 'item'/'s' with 'property'/'ies' as we agreed to change the DID log entry data format from array to JSON object

Signed-off-by: martipos 176692840+martipos@users.noreply.github.com


`[ versionId, versionTime, parameters, DIDDoc State, Data Integrity Proof ]`
`{ "versionId": "", "versionTime": "", "parameters": {}, "state": {}, "proof" : {} }`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`{ "versionId": "", "versionTime": "", "parameters": {}, "state": {}, "proof" : {} }`
`{ "versionId": "", "versionTime": "", "parameters": {}, "state": {}, "proof" : [] }`

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

specification.
4. The JSON object `state` contains the [[ref: DIDDoc]] for this version of the
DID.
5. The JSON object `proof` is a [[ref: Data Integrity]] proof calculated across
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. The JSON object `proof` is a [[ref: Data Integrity]] proof calculated across
5. The JSON array `proof` is a [[ref: Data Integrity]] proof calculated across

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


If the [[ref: DID Controller]] has opted to use [[ref: witnesses]] for the
DID, the required approvals from the DID's [[ref: witnesses]] **MUST** be
collected and added to the [[ref: Data Integrity]] proof item. See the [DID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
collected and added to the [[ref: Data Integrity]] proof item. See the [DID
collected and added to the [[ref: Data Integrity]] proof property. See the [DID

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

3. Determine the hash algorithm used by the [[ref: DID Controller]] from the [[ref: multihash]] `scid` value.
- The hash algorithm **MUST** be one listed in the
[parameters](#didtdw-did-method-parameters) defined by the version of the
`did:tdw` specification being used by the [[ref: DID Controller]] based on the
`method` [[ref: parameters]] item.
4. Remove the [[ref: data integrity]] proof item from the first [[ref: DID log entry]].
4. Remove the [[ref: data integrity]] proof item from the [[ref: DID log entry]].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Remove the [[ref: data integrity]] proof item from the [[ref: DID log entry]].
4. Remove the [[ref: data integrity]] proof property from the [[ref: DID log entry]].

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -766,7 +763,7 @@ Resolver **MUST** execute the following process:
#### Authorized Keys

Each entry in the [[ref: DID Log]] **MUST** include a [[ref: Data Integrity]]
proof signed by a key **authorized** to control (create, update, deactivate) the
`proof` item signed by a key **authorized** to control (create, update, deactivate) the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`proof` item signed by a key **authorized** to control (create, update, deactivate) the
`proof` property signed by a key **authorized** to control (create, update, deactivate) the

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

3. Determine the hash algorithm used by the [[ref: DID Controller]] from the [[ref: multihash]] `scid` value.
- The hash algorithm **MUST** be one listed in the
[parameters](#didtdw-did-method-parameters) defined by the version of the
`did:tdw` specification being used by the [[ref: DID Controller]] based on the
`method` [[ref: parameters]] item.
4. Remove the [[ref: data integrity]] proof item from the first [[ref: DID log entry]].
4. Remove the [[ref: data integrity]] proof item from the [[ref: DID log entry]].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Remove the [[ref: data integrity]] proof item from the [[ref: DID log entry]].
4. Remove the [[ref: data integrity]] proof property from the [[ref: DID log entry]].

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

3. Determine the hash algorithm used by the [[ref: DID Controller]] from the [[ref: multihash]] `scid` value.
- The hash algorithm **MUST** be one listed in the
[parameters](#didtdw-did-method-parameters) defined by the version of the
`did:tdw` specification being used by the [[ref: DID Controller]] based on the
`method` [[ref: parameters]] item.
4. Remove the [[ref: data integrity]] proof item from the first [[ref: DID log entry]].
4. Remove the [[ref: data integrity]] proof item from the [[ref: DID log entry]].
5. Replace the `versionId` item's value with the literal `"{SCID}"`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Replace the `versionId` item's value with the literal `"{SCID}"`.
5. Replace the `versionId` property value with the literal `"{SCID}"`.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -727,28 +724,28 @@ produce an [[ref: entry hash]]. As this is a first entry in a [[ref: DID Log]],
`entryHash` (first item) is the [[ref: SCID]] of the DID.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`entryHash` (first item) is the [[ref: SCID]] of the DID.
`entryHash` (first property) is the [[ref: SCID]] of the DID.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

remove from it the version number and dash prefix, leaving the log entry
`entryHash`.
`entryHash` value.
2. Determine the hash algorithm used by the [[ref: DID Controller]] from the [[ref: multihash]] `entryHash` value.
- The hash algorithm **MUST** be one listed in the
[parameters](#didtdw-did-method-parameters) defined by the version of the
`did:tdw` specification being used by the [[ref: DID Controller]] based on the
`method` [[ref: parameters]] item set in the current or most recent prior [[ref: log entry]].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`method` [[ref: parameters]] item set in the current or most recent prior [[ref: log entry]].
`method` [[ref: parameters]] property set in the current or most recent prior [[ref: log entry]].

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

to that generated by the [[ref: DID Controller]], with the [[ref: DIDDoc]] as the signed object,
the entry log's `versionId` as the challenge, but signed by the [[ref: witnesses]] key.
witness]] sends a [[ref: Data Integrity]] proof across the [[ref: DID log entry]] to the [[ref: DID Controller]], similar
to that generated by the [[ref: DID Controller]], but signed by the [[ref: witness]]'s key.
- When a weighted threshold of proofs are received, the DID Controller
inserts the [[ref: witnesses]]'s proofs into the array of proofs that are the last item in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
inserts the [[ref: witnesses]]'s proofs into the array of proofs that are the last item in
inserts the [[ref: witnesses]]'s proofs into the array of proofs that are the last property in

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — adjusted slightly.

Signed-off-by: Stephen Curran <swcurran@gmail.com>
Signed-off-by: Stephen Curran <swcurran@gmail.com>
@swcurran
Copy link
Collaborator Author

Applied all the changes noted by @martipos and then removed the remaining instances of “item” used in the specification and related files. I had thought that was the right term in JSON. I’ve been using it for a while in many places, so I have now retrained myself! :-)

Signed-off-by: Stephen Curran <swcurran@gmail.com>
@swcurran
Copy link
Collaborator Author

Added to the specification that the versionTime timestamp MUST be UTC time zone — per the suggestion in #112.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants