[ Team LiB ] |
Recipe 7.11 Encrypting Files for Others7.11.1 ProblemYou want to encrypt a file so only particular recipients can decrypt it. 7.11.2 Solution
To make the file decryptable by multiple recipients, repeat the -r option: $ gpg -e -r key1 -r key2 -r key3 myfile
7.11.3 DiscussionThis is a classic use of GnuPG: encrypting a file to be read only by an intended recipient, say, Barbara Bitflipper. To decrypt the file, Barbara will need her private key (corresponding to the public one used for encryption) and its passphrase, both of which only Barbara has (presumably). Even if Barbara's private key gets stolen, the thief would still need Barbara's passphrase to decrypt the file. By default, encrypted files are binary. To produce an ASCII file instead, suitable for including in a text message (email, Usenet post, etc.), add the -a (armor) option: $ gpg -e -r Barbara's_public_key_ID -a filename 7.11.4 See Alsogpg(1). |
[ Team LiB ] |