formatting of gpg blocks

Jerome Baum jerome at
Sun Jun 19 01:34:09 CEST 2011

> When including one gpg block inside another, as in public key inside a
> signed message, there is a space created after the first dash.
> Like here:
> Why is this needed? This complicates working with the message (I have to
> manually remove the space if I want to import the public key) and I
> haven't found any info about it.

This is needed to make sure OpenPGP (i.e. gnupg) doesn't misinterpret
stuff inside the block. Imagine enclosing some signed data inside a
signed block. How does gnupg tell apart the "END" lines from the
inner/outer blocks?

Shouldn't be a big problem to work with though: Just run the message
through gnupg and it'll remove the extra dashes.

> Another question is, when I'm sending a message with my public key, if
> I'm going to sign the message, should I also sign the public key? That
> amounts to two signatures.

Be careful to distinguish between data signatures (signing a message)
and certifications (signing a key). Are you trying to wrap a data
signature around the key? Unless you have a special use-case, that
probably doesn't make sense. Instead try to use a certification.

Jerome Baum
tel +49-1578-8434336
email jerome at
PGP: A0E4 B2D4 94E6 20EE 85BA E45B 63E4 2BD8 C58C 753A
PGP: 2C23 EBFF DF1A 840D 2351 F5F5 F25B A03F 2152 36DA

More information about the Gnupg-users mailing list