Key wrapping encrypts one cryptographic key with another key. In hybrid encryption, AES protects the content while RSA protects the AES content encryption key (CEK), combining performance with secure key exchange. section 6.3.2 section 6.6
Follow this sender-and-recipient pattern:
- Generate a random AES CEK and encrypt the content with AES. section 6.3.2
- Wrap the CEK by encrypting it with the recipient’s RSA public key, then send the encrypted CEK with the encrypted content. section 6.3.2
- Unwrap the CEK with the RSA private key and use it to decrypt the content. section 6.3.2
Recommended configuration
Use AES-GCM with a 256-bit key for bulk encryption and RSA-OAEP with a key size of at least 2,048 bits for wrapping. TLS, IPsec, JWE, and SSH use hybrid encryption. section 6.3.2 section 6.5
