How does GPG encrypt files with multiple keys?
GPG encrypts the file once with a symmetric key, then places a header identifying the target keypair and an encrypted version of the symmetric key. […] When encrypted to multiple recipients, this header is placed multiple times providing a uniquely encrypted version of the same symmetric key for each recipient.
How to share your public key with gpg?
How To Share Your Public Key To share your key as a file, we need to export it from the gpg local key store. To do this, we’ll use the –export option, which must be followed by the email address that you used to generate the key. The –output option must be followed by the name fo the file you wish to have the key exported into.
How is the session key encrypted in GnuPG?
GnuPG and PGP clients in general usually encrypt the actual data with a symmetric key called a “session key”. The session key is then encrypted with each “recipient key” (i.e. the ones you specify with -r/–recipient). This is sometimes referred to as a hybrid cipher.
How is GPG file size with multiple recipients explained?
There is a question on Information Security, GPG File size with multiple recipients?, that explain the encryption mechanism: GPG encrypts the file once with a symmetric key, then places a header identifying the target keypair and an encrypted version of the symmetric key.
Can You encrypt a file to multiple recipients?
GPG encryption to multiple recipients. It is a little known feature of GPG: you can encrypt files to multiple recipients. Since it uses an intermediary key, the resulting file is not that much bigger.
How big of a key do you need for GnuPG?
GnuPG thus only has to encrypt ~256 bits (the session key) with RSA, and can use AES to encrypt the data (as large as you want it to be!) with that session key. Intel machines even have a built in instruction, AES-NI, to do some steps of the algorithm in hardware, which makes GnuPG extra snappy at encrypting/decrypting data.