Basic file signing question

David Shaw dshaw at jabberwocky.com
Wed Sep 10 22:44:33 CEST 2008


On Sep 10, 2008, at 4:15 PM, Jack Kaye wrote:

> Greetings all,
>
> I have what is probably a very basic question but for some reason I
> can't seem
> to find the answer anywhere online and was hoping one of you GnuPG
> boffins could
> assist here.
>
> I am trying to digitally sign a file as I encrypt it.
>
> The encryption part is easy:
>
> gpg -r <their key> -e <file>
>
> Signing it is also easy:
>
> gpg -r <their key> -se <file>
>
> But when I sign it this way, it just seems to take the first key in my
> keyring.
> I have generated different public keys to send to different people and
> would like
> to sign the encrypted file with a key of my choice.  Is that  
> possible or
> am I just
> not understanding the process of creating a digital signature?

gpg -u <your key you want to sign with> -r <their key> -se <file>

It's the -u flag.

David



More information about the Gnupg-users mailing list