How to encrypt and sign with different keys
daniele at grinta.net
Mon Jul 18 23:03:52 CEST 2016
On 7/18/16 2:49 PM, Dashamir Hoxha wrote:
> On Mon, Jul 18, 2016 at 9:40 PM, dom at mielko.com <mailto:dom at mielko.com>
> <dom at mielko.com <mailto:dom at mielko.com>> wrote:
> I am struggling with GPG command line that will encrypt file with
> key A and sign it with key B.
You can select the key for signing with the --local-user option and the
key for encrypting with the recipient option.
> Also, is there a way to provide the password for the signing key in
> the command line?
> Try appending this to the command: `--passphrase-fd=0 <<< thepassphrase`
That's most definitely the wrong syntax.
> I am trying to automate encrypting files.
If you want to automate signing consider exporting a signing subkey
without a passphrase. The passphrase would have to be stored along with
the key anyhow.
> Consider also using and customizing `egpg`:
> - http://dashohoxha.github.io/egpg/gnupg-2.0/man/#CUSTOMIZATION
> - https://github.com/dashohoxha/egpg/wiki/gnupg-2.0-Customization
Or better not.
More information about the Gnupg-users