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

Interoperability on the third-party libraries #21

Closed
FabioPinheiro opened this issue Mar 8, 2023 · 6 comments · Fixed by #25
Closed

Interoperability on the third-party libraries #21

FabioPinheiro opened this issue Mar 8, 2023 · 6 comments · Fixed by #25

Comments

@FabioPinheiro
Copy link
Contributor

Currently, this mediator needs to have the hard-coded bytes inside of the encoded message.
"typ" : "application/didcomm-plain+json"

typ is not part of the specification.

This requirement comes from the Did Comm library implementation sicpa-dlab/didcomm-python#93

@rodolfomiranda
Copy link
Contributor

typ is the IANA media type. It's described on the spec here. It reads:
"this spec recommends the JOSE convention of using typ to make JOSE structure formats self-describing. This is particularly helpful in the outermost envelope of any DIDComm message, before unwrapping begins."
Probable all sicpa libraries are implemented with that recommendation since we tested with the JVM and Rust and have not seen that error.

@FabioPinheiro
Copy link
Contributor Author

On the outermost envelope, I have "typ":"application/didcomm-encrypted+json"

{
"ciphertext":"...",
"protected":"eyJlcGsiOnsia3R5IjoiT0tQIiwiY3J2IjoiWDI1NTE5IiwieCI6IndtSU90Sm03MVUwTGI3NDJqYThudFo1NjlGWDlqRjlBVVJ0cm1WYTluU28ifSwiYXB2IjoiLWNOQ3l0eFVrSHpSRE5SckV2Vm05S0VmZzhZcUtQVnVVcVg1a0VLbU9yMCIsInR5cCI6ImFwcGxpY2F0aW9uL2RpZGNvbW0tZW5jcnlwdGVkK2pzb24iLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwiYWxnIjoiRUNESC1FUytBMjU2S1cifQ",
"recipients":[{...}],
"tag":"...",
"iv":"..."
}
{"epk":{"kty":"OKP","crv":"X25519","x":"wmIOtJm71U0Lb742ja8ntZ569FX9jF9AURtrmVa9nSo"},"apv":"-cNCytxUkHzRDNRrEvVm9KEfg8YqKPVuUqX5kEKmOr0","typ":"application/didcomm-encrypted+json","enc":"A256CBC-HS512","alg":"ECDH-ES+A256KW"}

But for what I understood from the code of sicpa-dlab/didcomm-python. It requires that field to be hard coded on the content (from ciphertext).

@rodolfomiranda
Copy link
Contributor

I see. And they are actually harcoding it d["typ"] = DIDCommMessageTypes.PLAINTEXT.value

@FabioPinheiro
Copy link
Contributor Author

There is already a fix. (just need to be released)

@FabioPinheiro
Copy link
Contributor Author

There is still no new release. I tried to open an issue asking for it
sicpa-dlab/didcomm-python#102

@FabioPinheiro
Copy link
Contributor Author

I think this was fixed on version "0.3.2".
Let's update the requirements.txt to mention that version and close this.

FabioPinheiro added a commit to FabioPinheiro/didcomm-mediator that referenced this issue Jan 9, 2024
rodolfomiranda added a commit that referenced this issue Mar 20, 2024
Update the version of didcomm mention on requirements.txt #21
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 a pull request may close this issue.

2 participants