decentralized-identity / didcomm-messaging

https://identity.foundation/didcomm-messaging/spec/
Apache License 2.0
161 stars 56 forks source link

"to" and "from" are not allowed to contain a keyID fragment but keyID is required for Message Layer Addressing Consistency #413

Open flatorre1 opened 1 year ago

flatorre1 commented 1 year ago

Hi, i would like to clarify the following:

But in the 3.2 Message Layer Addressing Consistency is explained:

The from attribute in the plaintext message MUST match the skid attribute in the encryption layer.
The to attribute in the plaintext message MUST contain the kid attribute of an encrypted message.
The from attribute in the plaintext message MUST match the signer’s kid in a signed message.

My understanding is that the keyID attribute is a fragment (did#keyID), so I would like to know if the toand from attributes are just a DID and the resolved DID document should contain the keyID somewhere (could a DID query be used instead of a DID fragment?).

In other hand, the tocan contain several recipients but it is not possible for one recipient to verify that the message was sent to a different recipient...I assume the doc is referring to the public signing keyIDs of the recipients, but as far as I understand all recipients will know both recipients DID and public encryption keyID attributes, because the JWE Per-Recipient Unprotected Headers contains all recipients keyIDs ("kid") and also all recipients DIDs are in the to attribute on the decrypted message payload (plaintext). I will appreciate any comment on this.

Thank you in advance.