broken ascii armor (was Re: auto decrypt in unix)

Todd Todd <Freedom_Lover@pobox.com>
Wed Sep 17 09:59:02 2003


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

Steve Butler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>  
> for x in *
> do
>    cat ./passphrase | ./gpg --batch --passphrase-fd 0 --no-tty --out
> ${x#.*}.txt --decrypt $x
> done
>  
> 
> Isn't the Korn shell nice! 

Steve,

Your message tripped up a small issue in mutt.  The first paragraph of your
message disappeared after the signature was checked (which still fails even
after I downloaded your key).  I tracked this down and found that the ascii
armoring on your message has had a few errant spaces added, one of which
causes mutt to think the first paragraph is part of the armor header.  In
your message, the line after Hash: SHA1 contains a single space.  According
to the OpenPGP RFC:

   7. Cleartext signature framework

      [...]

      The cleartext signed message consists of:

        - The cleartext header '-----BEGIN PGP SIGNED MESSAGE-----' on a
          single line,

        - One or more "Hash" Armor Headers,

        - Exactly one empty line not included into the message digest,
          ^^^^^^^^^^^^^^^^^^^^^^

        - The dash-escaped cleartext that is included into the message
          digest,

        - The ASCII armored signature(s) including the '-----BEGIN PGP
          SIGNATURE-----' Armor Header and Armor Tail Lines.

I'm guessing that some MTA along the way added the space.  Since it took me
a while to figure out why mutt was losing the first paragraph of your
message (making the line about the korn shell seem out of place :), I
figured I'd post this here, in case any other mutt users found the same
thing. 

- -- 
Todd              OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
============================================================================
That which seems the height of absurdity in one generation often becomes
the height of wisdom in the next.
    -- John Stuart Mill (1806-1873)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iD8DBQE/aBSUuv+09NZUB1oRAgIjAJ4/H0qlkpk3GDKn8nD+Bx34TgAcSgCffKM8
V34wB6DzN52IDJ0bH8bWajE=
=cofw
-----END PGP SIGNATURE-----