-
Notifications
You must be signed in to change notification settings - Fork 21
Revised KSN key state notification message #130
Comments
In Using that structure in Go made it easy to reason about but I can see the challenge of turning that into a concise message. For example, we were duplicating I tend to agree that having those two fields at the top level of the |
Eventually we will be able to further simplify the key state notification by removing the |
After thinking about the anticipated effort to support key state notification requests I think its worth the effort to add the new complex attachment group. The new attachment group is a counter with code TransIndexedSigGroups: str = '-F' # Composed Base64 Triple, pre+snu+dig+ControllerIdxSigs group. Example Attachment of one groups ( annotated comments spaces and line feeds inserted for clarity
Given this attachment group we can simplify the The revised {
"v": "KERI10JSON00011c_",
"i": "EaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM",
"s": "2",
"t": "ksn",
"d": "EAoTNZH3ULvaU6JR2nmwyYAfSVPzhzZ-i0d8JZS6b5CM",
"te": "rot",
"kt": "1",
"k": ["DaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM"],
"n": "EZ-i0d8JZAoTNZH3ULvaU6JR2nmwyYAfSVPzhzS6b5CM",
"wt": "1",
"w": ["DnmwyYAfSVPzhzS6b5CMZ-i0d8JZAoTNZH3ULvaU6JR2"],
"c": ["eo"],
"ee":
{
"s": "1",
"d": "EAoTNZH3ULvaU6JR2nmwyYAfSVPzhzZ-i0d8JZS6b5CM",
"wr": ["Dd8JZAoTNZH3ULvaU6JR2nmwyYAfSVPzhzS6b5CMZ-i0"],
"wa": ["DnmwyYAfSVPzhzS6b5CMZ-i0d8JZAoTNZH3ULvaU6JR2"]
},
"di": "EJZAoTNZH3ULvYAfSVPzhzS6b5CMaU6JR2nmwyZ-i0d8"
}
|
Adding the new complex attachment group now and removing the I assume the demise of the |
Yes it will break a lot of code and interoperability to kill VRC just now. It can wait until its more timely. But because the |
Given what appears to be consensus I checked in the python code with the latest revised ksn and updated the code table. If there are no objections I will update KID001 and KID003 to reflect. |
Updated with revised KSN key state notice message based on issue decentralized-identity#130
Strong agree with reorganizing the |
I am not absolutely sure we need the |
I believe that after some thought, that at least given our current set of event messages, that is, icp, rot, dip, drt, ixn, that we do not need the Please confirm my logic.
|
That logic looks sound to me. |
In thinking about actually using key state notice when the event is delegated. Not having the full delegation location seal in the key state means that one MUST look up the delegated inception event in order to lookup the delegating event. But not sure that it buys us anything to have the seal without also doing lookups so likely just leave it be until we get more experience with real world delegation. |
With regard the specific label for the message type of the latest event for the In the case of |
Revised Key State Notice with
|
@SmithSamuelM - You mention while discussing the first class of watchers (a validator's own watchers) that the key state notice is mostly a discovery mechanism. This mechanism is particularly important to the It was decided today to add to the did method specification language dictating to users of the Is it anticipated that the spec (in a KID) will define a specific method in KERI Core to use for key state verification? Meaning will each KERI library be required to provide a single method that takes a key state notice, downloads and verifies the KEL for the specified identifier against the provided key state. This will be very useful for components that need to determine the validity of sources providing key state. If the answer is "yes", I can create a straw-man issue. |
Short answer yes. A longer answer: One mechanism is a cryptographically verifiable data structure from a cryptographic root of trust as a source of truth. That is a KEL. So verifying key state given a KEL depends on the properties of the construction of that KEL. So for the did:keri method one can not alone use a key state notice in a secure way. One must trust in a strong way the endorser of the key state and that is not a verifiable trust. So the secure path is to download the key state and verify. Another mechanism for security is called a threshold structure. A threshold structure uses multiple sources or truth, where each may have weaknesses but the aggregate set of sources of truth is strong. This is the reasoning behind multi-factor authentication, multi-signatures, and distributed consensus algorithms. So in a threshold structure sense given a set of endorsers of key state where it is reasonable to assume that most of the members of the endorser set are honest then one can infer to some degree of security the key state of that set given there is sufficient majority consensus of the key states from the whole set. That is the idea behind the second class of watchers in the description above. It is not enough to actually trust key state one still downloads and verifies the actual KEL but uses the consensus to make a decision about which KEL to download. If there is only one version of key state then there is no evidence of duplicity so all KELs are the same. If there is evidence of duplicity then examining the properties of the differences in versions of key state may be enough to determine which KEL is authoritative given one can more or less trust that a majority are honest. So in the DID:KERI when we say download the KEL and verify it assumes one knows which version of the KEL to verify when there is duplicity. This is part of the KERI + Watcher network duplicity detection capability. It is up to the validator to use its watcher network to make that determination. But for the purposes of the did:method we instruct users of did:keri that the key state returned by did resolver did document meta-data may not be trusted and any key state must be verified against the authoritative KEL for that identifier. Its up to the validator and its watcher network to determine where to get the authoritative KEL. Its trivial if there is not evidence of duplicity, its harder when there is evidence of duplicity. |
In implementing the "ksn" key state notification message I found that not having the "s" for sequence number field at the top level was jarring and confusing due to the inconsistency with every other message type which does have it at the top level. Indeed when leveraging code for creating messages or when reasoning about the code it kept tripping me up not to find it there. We have several fields as the top level in the key state message that are also at the top level in other messages but not the "sn" field. This lack of consistency is also bubbled up into the parametrization of utility functions etc.
I don't think any other implementations have implemented the key state message so I don't think it would affect anyone but the python implementation and fixing it is worth the improvement in consistency with other messages and the improved. coherence that results in reasoning about the code. It also moves three fields essentially used to compare key state with key events in a log back to the top level instead of nesting them, thus simplifying the comparison code syntax.
I understand that we added a nested dict to hold fields from the latest current event in the key state, but the reason for adding that dict was because the "t" field for the latest current event type 'icp' or 'rot" would conflict with the "t" field for the 'ksn' of the key state message and rather than change the label we added a nested dict, with the "e" label, but we also moved two other fields into "e" that didn't need to be moved. These are the "s" and the "d" field which are unique at the top level and are consistent with other messages that have them at the top level. The problem is that having a nested block for only one field the current event "t" field seemed out of place so two other fields were moved instead merely adding a new unique label. Now given my experienced implementing I think that was not the best choice.. After doing the implementation It became apparent to me that adding a new label would have been simpler less confusing and easier to implement and reason about.
The proposal is as follows:
remove the "e" block
move the "s" and "d" fields from the "e" block to the top level
add a new field at the top level with the label "te" field for message type of latest current event.
The proposed revised key state message looks like this.
Instead of the current:
The text was updated successfully, but these errors were encountered: