Re: [pkix] Clarification on "zero" hash value in SigPolicyHash (CAdES)

Peter Gutmann <pgut001@cs.auckland.ac.nz> Tue, 16 July 2019 09:32 UTC

Return-Path: <pgut001@cs.auckland.ac.nz>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2B1161201C3 for <pkix@ietfa.amsl.com>; Tue, 16 Jul 2019 02:32:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
X-Spam-Status: No, score=-4.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=auckland.ac.nz
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 PmrmqGC9wauD for <pkix@ietfa.amsl.com>; Tue, 16 Jul 2019 02:32:20 -0700 (PDT)
Received: from mx4-int.auckland.ac.nz (mx4-int.auckland.ac.nz [130.216.125.246]) (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 BC41B1201CA for <pkix@ietf.org>; Tue, 16 Jul 2019 02:32:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=auckland.ac.nz; i=@auckland.ac.nz; q=dns/txt; s=mail; t=1563269541; x=1594805541; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=DTK9nVxxJvVLcuYbWyXuif7Cn5C7TavfHdOgT7sfIvU=; b=a2nryr7Z4NsRSbfV5AOd4IIppCmU7E+jaK5Dy1IpO+7P5Edu9u4MfGe6 XaWOut5v9kqI2hJApyLe1uU/ZOUCaDaLE4vjI6kZJuw3Qdbx9vvaJ4+3Y aYXx9M9MsBQgBlbNDJyfjMIXkDjdYtj3hIUBq9Z3TqwrZNQRpUtmA+Kd8 kqR2soFbuHedznEe35sdMqiUgsYOCIczobHIEqDV5nYrkXlsinIYrbYju 0RSMl98ss/O64UC5c/YnhLSwcXkA8B/BqHnD7IWnbt1BoU0AKrzMOmQ2L sppc5diFc5snQF6YGDxs/9vIVAtmDxpsam+jV51EYF032oAeuSeuNlKBD Q==;
X-IronPort-AV: E=Sophos;i="5.63,497,1557144000"; d="scan'208";a="70954784"
X-Ironport-HAT: MAIL-SERVERS - $RELAYED
X-Ironport-Source: 10.6.3.3 - Outgoing - Outgoing
Received: from uxcn13-tdc-b.uoa.auckland.ac.nz ([10.6.3.3]) by mx4-int.auckland.ac.nz with ESMTP/TLS/AES256-SHA; 16 Jul 2019 21:32:17 +1200
Received: from uxcn13-ogg-d.UoA.auckland.ac.nz (10.6.2.5) by uxcn13-tdc-b.UoA.auckland.ac.nz (10.6.3.3) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 16 Jul 2019 21:32:15 +1200
Received: from uxcn13-ogg-d.UoA.auckland.ac.nz ([10.6.2.5]) by uxcn13-ogg-d.UoA.auckland.ac.nz ([10.6.2.5]) with mapi id 15.00.1395.000; Tue, 16 Jul 2019 21:32:16 +1200
From: Peter Gutmann <pgut001@cs.auckland.ac.nz>
To: Stefan Santesson <stefan@aaa-sec.com>, Niklas Matthies <pkix@nmhq.net>, "pkix@ietf.org" <pkix@ietf.org>
Thread-Topic: [pkix] Clarification on "zero" hash value in SigPolicyHash (CAdES)
Thread-Index: AQHVOO1wcGGXPXcfd0KYugWNDx4HUabMKg4AgADWgxg=
Date: Tue, 16 Jul 2019 09:32:15 +0000
Message-ID: <1563269533626.58560@cs.auckland.ac.nz>
References: <20190712200549.2kgzjqodj5afnxlt@nmhq.net>, <0FDBEEC9-0FBA-4C47-BD04-EE7F6053426D@aaa-sec.com>
In-Reply-To: <0FDBEEC9-0FBA-4C47-BD04-EE7F6053426D@aaa-sec.com>
Accept-Language: en-NZ, en-GB, en-US
Content-Language: en-NZ
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [130.216.158.4]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/pkix/pEz71mx7soxKHc5vgwbzhZBYU1Q>
Subject: Re: [pkix] Clarification on "zero" hash value in SigPolicyHash (CAdES)
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pkix/>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Jul 2019 09:32:22 -0000

Stefan Santesson <stefan@aaa-sec.com> writes:

>However, option 3 is the absolute worst from an implementation perspective as
>it is the hardest to programmatically distinguish from a real hash value.

I would say it's the best from an implementation perspective, you don't need
to make any code changes, it's a normal looking hash value that's guaranteed
not to match anything.  Existing implementations that expect a hash there will
continue to work as normal.

>My conclusion is that the standard is so ambiguous that any receiving
>implementation should be able to handle all 3 alternatives.

A slightly different interpretation is that since that part of the standard is
essentially unimplementable, it's likely no-one has ever implemented it, so it
can be safely dropped.  Given earlier evidence that it's only there for
backwards compatibility with something no-one can identify, this enhances the
case for dropping it from the standard.

Peter.