I want to encrypt a file with a RSA public key.
- I generate a random 16 bytes key
- I encrypt the file with AES + the random key (
- I encrypt the random key with RSA (
Now I can send the encrypted file + encrypted random key to the person who has the private RSA key.