如何解密JWE用ECD(ECDH-ES+ A128KW)算法加密。
我一直在寻找C#中的一种方法来解密JWE令牌由我的OpenID Connect Provider加密ECDH-ES+A128KW。我已经与OIDC提供商分享了EC公钥,他们给我发送了使用共享公钥加密的JWE。我想使用我安全存储的私钥从JWE有效载荷中解密并提取信息。 一段时间以来,我一直在寻找C#中的合适的解密库。我的应用程序是.NET 5应用程序,并在Linux上运行。 任何帮助都高度赞赏。
I have been looking for a way in C# to decrypt JWE tokens encrypted with ECDH-ES+A128KW by my OpenId Connect provider. I have shared the EC public key with OIDC provider and they send me a JWE encrypted using the shared public key. I want to decrypt and extract information from JWE payload using the private key which I have stored securely.
I have been looking for a proper decryption library in C# for a while. My application is a .Net 5 application and runs on Linux.
Any help highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设它会帮助某人,回答这个问题。
您可以使用以下代码解密JW,
如果您仍然将JWT作为解密,则可以使用以下方法读取令牌
Answering this question assuming it would help someone.
You can decrypt the JWS using the following code
If you still get a JWT as a decryptedToken, you can read the token using following method