gpg messages error after signing

David Shaw dshaw at jabberwocky.com
Sat Mar 7 14:25:34 CET 2009


On Mar 7, 2009, at 5:28 AM, dmdm wrote:

>
> When I sign a message that contains a gpg key what happens is that  
> the key
> has the '-'
> missing at top and bottom of key. its ok before its signed .(see  
> example
> below)

That is a normal part of OpenPGP called "dash escaping".  Basically,  
since your signature itself starts with a dash (as part of "-----BEGIN  
PGP SIGNED MESSAGE-----") any other dashes, such as those surrounding  
your key that you're including in the signed message, need to be  
escaped so the message parser does not get confused.  The way this is  
done is to append a "- " (a dash and a space) to the beginning of each  
dash.

Just verify the message to check the signature, and what comes out of  
the verification step has all the escaping removed so you can use the  
key you included.

David



More information about the Gnupg-users mailing list