Is there a way to create a JWE based on public/private keys pair, created based on strings from .env file? #456
Unanswered
Gleb-Gaiduk
asked this question in
Q&A
Replies: 1 comment
-
What you're describing is not at all how JOSE/JWE works.
In JWE using asymmetric key management algorithms, when you're encrypting (not signing, JWE is encryption, not signatures) for a recipient using the recipient's public key. The recipient uses its private key to decrypt. This achieves confidentiality and integrity but the recipient cannot verify the JWE came from a given source because the means to encrypt is its public key. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Community!
I want to sign a JWE using a private key, then I want to send a public key to the Client to be able to decrypt that JWE on the Client side and read the data of the JWE.
For that, I need a private/public key pair. Also, I need a way to generate those keys pair in node.js based on the secret string I have in .env file on my backend side.
Do I follow the correct way or something is wrong with that plan?
Could not find a required example.
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions