2

I understand that it is possible to combine symmetric and asymmetric encryption in a way that makes use of the performance of symmetric encryption, and also getting the benefits of being able to separate the knowledge needed for encryption from that needed for decryption.

Could someone explain this scheme in more detail?

To be concrete, I want to encrypt a few tens of thousands of files at a time, including some that are ~100GB in size.

kjo
  • 1,043
  • 2
  • 9
  • 15

1 Answers1

4

To get the benefits of both types of encryption algorithms you can create a symmetric key to encrypt the data efficiently and then encrypt that key asymmetrically. Only the private key owner can decrypt and have access to the symmetric key.

Bokis
  • 154
  • 10
  • 1
    Agree, but you should find an existing tool to do this for you, rather than rolling your own. :-) – Ben Feb 09 '19 at 22:30
  • 1
    gpg does this already... use `-r` to encrypt the symmetric key with the recipient public key... – RubberStamp Feb 09 '19 at 22:47