How do I choose different private keys to sign different public keys

Neil Williams linux at
Wed May 5 17:44:20 CEST 2004

On Wednesday 05 May 2004 2:30, Denis Green wrote:
> 2/
> I have multiple private keys. Lets say I have key pairs
> a - used in office (in the Full name and office e mail id)
> b - used for nym and re-mailers (with my nym address)
> c - used in personal communications (with my short name
>     and personal address)
> 3/
> How do I choose different private_ keys to sign
> different public keys ? For e.g. my colleague's key with
> _my_private_(a), a re-mailer ops key with _my_private_(b)
> and my brother's key with _my_private__(c) and so on ?

use the -u option to specify which keyid to 'use'
It's in the man page. I'd use:
gpg -u 0xA897FD02 -as somefile
to sign a file with my secondary key

The same applies when editing/signing keys.
gpg -u 0xA897FD02 --edit-key somekey
gpg -u 0xA897FD02 --sign-key keyid


Neil Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : /pipermail/attachments/20040505/fac0cd2d/attachment.bin

More information about the Gnupg-users mailing list