Email Attachment Encryption - RSA or AES?

I am developing a mail server from scratch for a special project. I understand RSA and AES, but where I get lost, I work with applications. I want to send Alice a signed message, and I also want to send her an encrypted file attachment. How are applications typically used in this scenario?

Thanks in advance!

+3
source share
1 answer

Attachments are large files, and asymmetric encryption is very slow (i.e. RSA), so it’s best to create an AES key and encrypt it using the RSA public key, and then encrypt the attachment much faster than AES. Then send the encrypted key and attachment to the recipient. Since only she received the private key, only she can decrypt the AES key, thereby decrypting the attachment.

+2
source

All Articles