Mailing List Archive

dash escaping
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings --

I recently got GnuPG, Mailcrypt, Gnus, and XEmacs to all play together, so
I'm now happily signing all my mail and news posts.

The only remaining problem I'm having is that somewhere along the way,
my sig delimiter gets changed from '-- ' to '- -- '. Any other lines
that start with a dash suffer a similar fate. I've been told that PGP
does this because of the '-----PGP SIGNED MESSAGE-----' lines.

Is there any way to disable this behavior in GnuPG?

Thanks,

john.

- --
- ----------------------------------------------------------------------------
[ John S Jacobs Anderson ]------><URL:mailto:jacobs@genehack.org>
[ Genehack: Not your daddy's weblog ]------><URL:http://genehack.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: Mailcrypt 3.5.5 and Gnu Privacy Guard

iD8DBQE5hi5EWRJRdOm3KFARAvkbAKCrKXJJDkCFPKEflXRSVkHDXo9EXgCePX3R
xv66lcwarjwszyEdu9o8Sak=
=2vDZ
-----END PGP SIGNATURE-----
Re: dash escaping [ In reply to ]
On Mon, 31 Jul 2000, John S. J. Anderson wrote:

> my sig delimiter gets changed from '-- ' to '- -- '. Any other lines
> that start with a dash suffer a similar fate. I've been told that PGP
> does this because of the '-----PGP SIGNED MESSAGE-----' lines.
>
> Is there any way to disable this behavior in GnuPG?

No you can't. Otherwise you would not be able to clearsign already
clearsigned messages.


--
Werner Koch GnuPG key: 621CC013
OpenIT GmbH http://www.OpenIT.de
Re: dash escaping [ In reply to ]
Werner Koch writes:
> On Mon, 31 Jul 2000, John S. J. Anderson wrote:
>
> > my sig delimiter gets changed from '-- ' to '- -- '. Any other lines
> > that start with a dash suffer a similar fate. I've been told that PGP
> > does this because of the '-----PGP SIGNED MESSAGE-----' lines.
> >
> > Is there any way to disable this behavior in GnuPG?
>
> No you can't. Otherwise you would not be able to clearsign already
> clearsigned messages.

And I'm still waiting for any comment to the related "gpg 1.0.2 error:
unexpected armor" message I sent here last week.
Re: dash escaping [ In reply to ]
On Tue, 1 Aug 2000, Lars Hecking wrote:

> And I'm still waiting for any comment to the related "gpg 1.0.2 error:
> unexpected armor" message I sent here last week.

Sorry, probably I accidently hit the d and not the F key in mutt ;-)

So here is the problem again:

gpg: unexpected armor:-------------------------------------------------------------\n
gpg: invalid radix64 character 2e skipped
[170 more lines]
gpg: invalid radix64 character 3e skipped
gpg: invalid radix64 character 5f skipped
gpg: CRC error; 04a824 - 244451
gpg: [don't know]: invalid packet (ctb=4e) near 141

The problem seems to be that the message (signed with pgp 2.6.3ia) contains
a line

-------------------------------------------------------------

starting in the first column, and gpg seems to treat this line like one of

-----BEGIN PGP SIGNED MESSAGE-----
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----


No it treats it like like an invalid armor line ;-) The message is not
valid. A valid encoding of a straight dashline would look like this:

- --------------------------------------------------------------

Notice the "- " at the start of the line. This is the dash escaping
as always used by PGP.

Werner


--
Werner Koch GnuPG key: 621CC013
OpenIT GmbH http://www.OpenIT.de
Re: dash escaping [ In reply to ]
Werner Koch writes:
> On Tue, 1 Aug 2000, Lars Hecking wrote:
>
> > And I'm still waiting for any comment to the related "gpg 1.0.2 error:
> > unexpected armor" message I sent here last week.
>
> Sorry, probably I accidently hit the d and not the F key in mutt ;-)

It's not that important. "L" would have done ;-)

[...]
> No it treats it like like an invalid armor line ;-) The message is not
> valid. A valid encoding of a straight dashline would look like this:
>
> - --------------------------------------------------------------
>
> Notice the "- " at the start of the line. This is the dash escaping
> as always used by PGP.

Ok. Thanks for the explanation :)
Re: dash escaping [ In reply to ]
If it's email that has this "---------------" string, why not quoted-printable
encode that string so it looks like "=2D---------------"? qp encoding should
be done anyhow, since the internet mail system is notorious for mangling white
space, changeing "From " to "From" at the beginnings of a line, etc.

I don't know if this is helpful, but using qp encoding will allow the far-end
to decode it back, whereas I'm not so sure the "- ---" armoring of a dash
line will be decoded at the far side.

Sam

Quoting Werner Koch <wk@gnupg.org>, who wrote:
> On Tue, 1 Aug 2000, Lars Hecking wrote:
>
> So here is the problem again:
>
> gpg: unexpected armor:-------------------------------------------------------------\n
> gpg: invalid radix64 character 2e skipped
> [170 more lines]
> gpg: invalid radix64 character 3e skipped
> gpg: invalid radix64 character 5f skipped
> gpg: CRC error; 04a824 - 244451
> gpg: [don't know]: invalid packet (ctb=4e) near 141
>
> The problem seems to be that the message (signed with pgp 2.6.3ia) contains
> a line
>
> -------------------------------------------------------------
>
> starting in the first column, and gpg seems to treat this line like one of
>
> -----BEGIN PGP SIGNED MESSAGE-----
> -----BEGIN PGP SIGNATURE-----
> -----END PGP SIGNATURE-----
>
>
> No it treats it like like an invalid armor line ;-) The message is not
> valid. A valid encoding of a straight dashline would look like this:
>
> - --------------------------------------------------------------
>
> Notice the "- " at the start of the line. This is the dash escaping
> as always used by PGP.
>
> Werner

--
Sam Roberts (sam@cogent.ca), Cogent Real-Time Systems (www.cogent.ca)
Re: dash escaping [ In reply to ]
On Tue, 1 Aug 2000, Sam Roberts wrote:

> If it's email that has this "---------------" string, why not quoted-printable
> encode that string so it looks like "=2D---------------"? qp encoding should

There is no problem with dashed lines and OpenPGP. An openGPG
clearsigned document is simply dash-escaped and while processing this
message (to verify it and remove the armors) an OpenPGP implementation
simply reverst the dash escaping.

However, using those clearsigned messages is depreciated in favor of
RFC2015 (MIME, PGPG).

> be done anyhow, since the internet mail system is notorious for mangling white
> space, changeing "From " to "From" at the beginnings of a line, etc.

You may want to use --escape-from-lines together with cleartext
signatures. This is not OpenPGP conform but most implementations
do it anyway.

> I don't know if this is helpful, but using qp encoding will allow the far-end
> to decode it back, whereas I'm not so sure the "- ---" armoring of a dash

Use RFC2015.

Werner

--
Werner Koch GnuPG key: 621CC013
OpenIT GmbH http://www.OpenIT.de

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org