Replies: 1 comment 4 replies
-
@dtoubelis I'm not quite sure what you mean. With JWE, the sender generates a content encryption key (CEK), and encrypt it with the receiver's public key so that it's safe to send it along with the JWE message itself. The sender further encrypts the content using the CEK, by means of AES-GCM or AES-CBC. The sender sends the encrypted key and encrypted content. The receiver then decrypts the CEK using his private key, and uses it to decrypt the encrypted content. So the only place where something external can come in is when you encrypt the CEK, which is where KeyEncrypter comes in. I'm not familiar with HashiCorp products, but presumably that's where you'd want to plug it in, if at all. If you still think that there's some feature missing, please explain what you are trying to do with code (pseudocode is fine), thanks. |
Beta Was this translation helpful? Give feedback.
-
We are attempting to make jwe/jwt/jws packages work with HashiCorp vault. The vault provides interface for performing encryption/decryption and signing/verifying internally. This provides benefit of key management, rotations, and audit. I'm trying wrap my head around if I can use this library to delegate crypto operation to the vault and what I found so far is
jws
Signer/Verifier interfaces that will likely allow us to handlejws
andjwt
. But forjwe
I only found an experimental KeyEncrypter/KeyDecrypter interfaces... However, they seem only provide an interface to encrypt/decrypt keys but not the content. In particular, we need to use symmetrik key encryption, something like AES-GCM. Am I missing something (or looking in the wrong place)? Any help is appreciated.Beta Was this translation helpful? Give feedback.
All reactions