Reputation: 1
I've been searching a lot but nothing hit the spot, they are questions about JWE key management.
Scenario:
Server wants to send sensitive data to client, and it chooses to encrypt the data with a symmetric algorithm by a symmetric key, i.e, Content Encryption Key (CEK).
Client will retrieve the CEK to decrypt the encrypted data, but the CEK can't be sent as a clear text together with the encrypted data, so the CEK will need to be encrypted.
Approach:
The JWE specification defines different key management modes as follows
Key Wrapping: the CEK is encrypted for the intended recipient using a symmetric encryption algorithm.
Key Wrapping Diagram
Key Encryption: the CEK is encrypted for the intended recipient using an asymmetric encryption algorithm.
Key Encryption Diagram
Direct Key Agreement: a key agreement algorithm is used to pick the CEK.
Direct Key Agreement Diagram
Key Agreement with Key Wrapping: a key agreement algorithm is used to pick a
symmetric CEK using a symmetric encryption algorithm.
Key Agreement with Key Wrapping Diagram
Direct Encryption: a user-defined symmetric shared key is used as the CEK (no key derivation or generation).
Direct Encryption Diagram
Question:
Any help or advise would be appreciated, thank you very much.
Upvotes: 0
Views: 459
Reputation: 6675
See this answer for the difference between the key management modes and when to use each.
Upvotes: 0