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

Confusion between JWM vs JWS and wrong examples #446

Open
FabioPinheiro opened this issue Oct 25, 2023 · 1 comment
Open

Confusion between JWM vs JWS and wrong examples #446

FabioPinheiro opened this issue Oct 25, 2023 · 1 comment

Comments

@FabioPinheiro
Copy link
Contributor

The DID Comm specs we can read:
All three DIDComm message formats — plaintext, signed, and encrypted — can be correctly understood as more generic [JWMs (JSON Web Messages)](https://tools.ietf.org/html/draft-looker-jwm-01)
Although there are a lot of reference to JWS in the DID Comm specification

Links:
DID Comm specs signed examples
JWM draft
JWS RFC7515

The problem is that the signed message looks more like the examples in JWS and the JWM.
Because JWS uses the JWS Unprotected Header to have the kid and JWM uses JWS Protected Header.

Ex from the DID Comm specs:

{
   "payload":"eyJpZCI6IjEyMzQ1Njc4OTAiLCJ0eXAiOiJhcHBsaWNhdGlvbi9kaWRjb21tLXBsYWluK2pzb24iLCJ0eXBlIjoiaHR0cDovL2V4YW1wbGUuY29tL3Byb3RvY29scy9sZXRzX2RvX2x1bmNoLzEuMC9wcm9wb3NhbCIsImZyb20iOiJkaWQ6ZXhhbXBsZTphbGljZSIsInRvIjpbImRpZDpleGFtcGxlOmJvYiJdLCJjcmVhdGVkX3RpbWUiOjE1MTYyNjkwMjIsImV4cGlyZXNfdGltZSI6MTUxNjM4NTkzMSwiYm9keSI6eyJtZXNzYWdlc3BlY2lmaWNhdHRyaWJ1dGUiOiJhbmQgaXRzIHZhbHVlIn19",
   "signatures":[
      {
         "protected":"eyJ0eXAiOiJhcHBsaWNhdGlvbi9kaWRjb21tLXNpZ25lZCtqc29uIiwiYWxnIjoiRVMyNTYifQ",
         "signature":"gcW3lVifhyR48mLHbbpnGZQuziskR5-wXf6IoBlpa9SzERfSG9I7oQ9pssmHZwbvJvyMvxskpH5oudw1W3X5Qg",
         "header":{
            "kid":"did:example:alice#key-2"
         }
      }
   ]
}
@FabioPinheiro
Copy link
Contributor Author

JWM does not have signatures.header
We need to fix all examples is make JWM.
But JWM document is an Expired Draft. So I'm not fully convinced this is the best solution

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

No branches or pull requests

1 participant