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

Address did:peer:2 spec changes #162

Closed
FabioPinheiro opened this issue Oct 27, 2023 · 0 comments
Closed

Address did:peer:2 spec changes #162

FabioPinheiro opened this issue Oct 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@FabioPinheiro
Copy link
Owner

FabioPinheiro commented Oct 27, 2023

There are some spec changes for did:peer:2... that are breaking changes for DID Comm.

The changes were merged in this commit decentralized-identity/peer-did-method-spec@a5eca6b

Both issues have possible mitigation solutions that allow a smoother migration.
Although previous implementations are considered faulty! Since DID methods have no version.
This is important to be fixed to achieve interoperability

Dependencies

Issue 1

The first is to fix the encoding to follow the DID Document.
The DID Document's service example in did:peer looks like

"service":{
  ...
  "serviceEndpoint": "https://example.com/endpoint",
  "routingKeys": [...],
  "accept": [...]
}

But it should instead look like

"service":{
  ...
  "serviceEndpoint": {
    "uri":"https://example.com/endpoint",
    "routingKeys": [...],
    "accept": [...]
  }
}

We should make sure that our did:peer used on the applications are encoded correctly.
when decrypting you look for that key

Issue 2

The second problem is about the id of the keys (kid).
It was unspecified before. So each library generates the kid in its own way.

The major problem is that the kid is used on the DID Comm message itself. More specifically the field skid in the message's Protected Header is the kid. Because when decrypting you look for that key.
So the agent encrypting and the agent decrypting MUST have the same or an equivalent resolver (the key id needs to be deterministic).

@FabioPinheiro FabioPinheiro self-assigned this Oct 27, 2023
@FabioPinheiro FabioPinheiro added the bug Something isn't working label Oct 27, 2023
@FabioPinheiro FabioPinheiro added this to the 0.1.0 milestone Oct 27, 2023
FabioPinheiro added a commit that referenced this issue Jan 4, 2024
FabioPinheiro added a commit that referenced this issue Jan 5, 2024
FabioPinheiro added a commit that referenced this issue Jan 5, 2024
…n_of_the_did_peer_specs

Fix/reflect the new version of the did peer specs
Address did:peer:2 spec changes #162
FabioPinheiro added a commit that referenced this issue Feb 2, 2024
Related with #162
Fix the encoder for ElementService in DID peer method
Fix the service id of the DID peer services
FabioPinheiro added a commit that referenced this issue Feb 13, 2024
Related with #162
Update the DID Peer Examples to the new format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant