In the following command I (say [email protected]
) am encrypting a file, directed to two different recipients; the –output option specifies a single file name:
gpg --output notes.gpg --encrypt --recipient [email protected] --recipient [email protected] notes.txt
I am able to decrypt the file successfully as either [email protected]
or [email protected]
. But I don’t understand how that is possible. If the output file is encrypted using both Brian’s and Ken’s public keys then shouldn’t the recipients need both keys to decrypt the file or shouldn’t the command generate a separate output file for each recipient?
I have 3 shells running in separate environments setup in different directories: brian, dennis, ken (the UNIX Gods) by setting GNUPGHOME
to point to each directory. And I am able to decrypt the file as either ken or brian. How does it work?