Re: [openpgp] incomplete/confusing guidance around "Hash" Armor header for cleartext signing framework

Ángel <angel@16bits.net> Fri, 19 March 2021 00:43 UTC

Return-Path: <angel@16bits.net>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 194A63A109C for <openpgp@ietfa.amsl.com>; Thu, 18 Mar 2021 17:43:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uq_KdXeazVMZ for <openpgp@ietfa.amsl.com>; Thu, 18 Mar 2021 17:43:45 -0700 (PDT)
Received: from mail.direccionemail.com (mail.direccionemail.com [199.195.249.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 601513A109A for <openpgp@ietf.org>; Thu, 18 Mar 2021 17:43:44 -0700 (PDT)
Message-ID: <84dd70a1f9bc5f0b5f8c8f5f5a02bbc6fc50f93a.camel@16bits.net>
From: Ángel <angel@16bits.net>
To: openpgp@ietf.org
Date: Fri, 19 Mar 2021 01:43:42 +0100
In-Reply-To: <87o8fgrgs3.fsf@wheatstone.g10code.de>
References: <875z1p7vva.fsf@fifthhorseman.net> <0b29b5c446910e9dfe1ac89854f17012fc143851.camel@16bits.net> <87o8fgrgs3.fsf@wheatstone.g10code.de>
Content-Type: text/plain; charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/qTFWwjpBwqt-NKkwhdOO_-DXzqo>
Subject: Re: [openpgp] incomplete/confusing guidance around "Hash" Armor header for cleartext signing framework
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Mar 2021 00:43:47 -0000

On 2021-03-18 at 09:46 +0100, Werner Koch wrote:
> On Thu, 18 Mar 2021 02:20, Ángel said:
> 
> > I think the phrase
> > >      - One or more "Hash" Armor Headers,
> > should have been
> > >      - One or more Armor Headers,
> 
> Nope becuase ...
> 
> > Then it covers other armor headers that may be present, such as
> > "Charset:", and then it suddenly makes sense the following
> > discussion
> 
> There should be only one Charset header.

No. What I mean is that it only says «One or more "Hash" Armor
Headers,». It doesn't mention other Armor Headers. Charset was an
example I gave of other armor headers that might be there.


And yes, Charset is a weird header. It doesn't make much sense to
define it but say it may be followed or ignored and treated as utf-8
anyway. The sane thing would be to state that when encoding utf-8 MUST
be used, and receivers are not required to implement any other charset.
The behavior if they find a different charset would be up to them, they
could implement more charsets (specially interesting for old content),
show an error message, use a different charset and hope for the best...


> In any case, MIME is a way better method to define such
> properties.  Better have that only at one place to avoid conflicts -
> and the armor header are not protected which has led to questions in
> the past.
> 

I'm not so sure. If it's an armored message, the charset header will be
more right than the document MIME. If it's a clearsigned one, then
either of them may be the correct one. The only safe way would be to
specify the same charset in the MIME Content-Type as in the PGP own
Charset heaer, and that such charset is utf-8.


Best regards