your mail

brian moore bem at
Fri Nov 13 14:07:49 CET 1998

On Fri, Nov 13, 1998 at 09:23:11PM +0100, Werner Koch wrote:
> brian moore <bem at> writes:
> > I think there's a difference in the defaults between PGP5 and GPG on
> > what hash is used: with PGP5, SHA1 is assumed if there is no Hash line:
> > in GPG, the default seems to be MD5.
> RFC2440 (OpenPGP) says that the default is MD5 - at least the last
> time I checked the draft.  Okay, the source (mainproc.c:proc_plaintext)
> tells me that we need a hash - I think I have to read the RFC again. 

Weird, that certainly is what it says:

   If the "Hash" armor header is given, the specified message digest
   algorithm is used for the signature. If there are no such headers,
   MD5 is used, an implementation MAY omit them for V2.x compatibility.
   If more than one message digest is used in the signature, the "Hash"
   armor header contains a comma-delimited list of used message digests.
Strangely, I haven't changed a thing and now it works..

I even used the same macro in vile to do it.

(The mail I sent to the internic yesterday didn't verify with GPG,
though PGP5 would verify it just fine.  Adding the Hash: SHA1 manually
convinced both to be happy with it.)

My vile macro, which signs everything but the headers, suitable for news
and old-non-mime mailings.  (Yes, I'd rather use Mutt's miming, but
Internic doesn't seem to like that.)

31 store-macro
    set-variable %phrase &cat @"PGP PassPhrase? " "\n"
    write-message " "  ; erase passphrase
    set-variable %cmd "gpg --passphrase-fd 0 --clearsign --batch -u 88322B51"
    search-forward "^[ \t]*$"
    set-named-mark q
    ~force down-line
    insert-string %phrase
    ; no reason to keep this around.
    set-variable %phrase "------------------------------"
    ~force up-line-at-bol
    filter-til end-of-file %cmd
    goto-named-mark q
    ~force delete-til search-forward "^--*BEGIN PGP SIGNED MESSAGE"
    ; gpg converts end of line to \r\n, which I find annoying... strip
    ; them.
    ~force substitute-til goto-line "\r$" ""

Brian Moore                       | "The Zen nature of a spammer resembles
      Sysadmin, C/Perl Hacker     |  a cockroach, except that the cockroach
      Usenet Vandal               |  is higher up on the evolutionary chain."
      Netscum, Bane of Elves.                 Peter Olson, Delphi Postmaster

More information about the Gnupg-devel mailing list