The GNU Privacy Handbook says:
The command-line option --sign is used to make a digital signature. The document to sign is input, and the signed document is output.
alice% gpg --output doc.sig --sign doc You need a passphrase to unlock the private key for user: "Alice (Judge) <firstname.lastname@example.org>" 1024-bit DSA key, ID BB7576AC, created 1999-06-04 Enter passphrase:
Why doesn't it ask which private key to be used? Can't the user running the command hold multiple private keys?
A document can be encrypted with a symmetric cipher by using the --symmetric option.
alice% gpg --output doc.gpg --symmetric doc Enter passphrase:
Does gpg use the passphrase to symmetrically encrypt the input file? Or does it use the passphrase just to access the key which will be used to symmetrically encrypt the input file? If latter, why does it not ask which key to be used for symmetric encryption? Can't the user hold multiple keys which can be used for symmetric encryption?
When decrypt a symmetrically encrypted file,
alice% gpg --descrypt doc.gpg
will succeed. why does it not ask for passphrase (and the key to decrypt)? How can others then decrypt
doc.gpg after I give it to them?