-
Notifications
You must be signed in to change notification settings - Fork 183
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
JWT.Encode - ECDH_ES - A256GCM - Not supported in Linux #176
Comments
Hi @daniel-botero-cko , yeah, you right You can do AES-GCM on Linux - there is managed implementation in .net core, fully supported by library. But there are no EC Diffie-Hellman managed implementation, so no luck at the moment. |
@dvsekhvalnov Thanks for your message. Sorry for this question (I am not very good at cryptography); what is the difference between AES-GCM and ECDH_ES-A256GCM? If I encrypt the JSON below with AES-GSM it will produce a completely different JWE than if I have done it with ECDH_ES-A256GCM?
|
@daniel-botero-cko sure thing: So, encrypted JWTs are actually 2 step process:
Given that: ECDH_ES-A256GCM - is ECHS_ES to protect key and AES-GCM-256 to encrypt token content. Hope it makes it little bit more clear :) |
Hello,
I have tried to make
JWT.Encode()
work with .net5 and in Linux without success.It seems that CngKey is only supported in the Windows platform.
Is there a workaround to Encrypt a payload using Alg: ECDH_ES Enc: A256GCM using jose-jwt library?
Below is the code that works in Windows:
The text was updated successfully, but these errors were encountered: