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

Peter Gutmann <> Tue, 16 July 2019 09:32 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2B1161201C3 for <>; Tue, 16 Jul 2019 02:32:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.197
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id PmrmqGC9wauD for <>; Tue, 16 Jul 2019 02:32:20 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BC41B1201CA for <>; Tue, 16 Jul 2019 02:32:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple;;; 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-Source: - Outgoing - Outgoing
Received: from ([]) by with ESMTP/TLS/AES256-SHA; 16 Jul 2019 21:32:17 +1200
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 16 Jul 2019 21:32:15 +1200
Received: from ([]) by ([]) with mapi id 15.00.1395.000; Tue, 16 Jul 2019 21:32:16 +1200
From: Peter Gutmann <>
To: Stefan Santesson <>, Niklas Matthies <>, "" <>
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: <>
References: <>, <>
In-Reply-To: <>
Accept-Language: en-NZ, en-GB, en-US
Content-Language: en-NZ
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: []
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <>
Subject: Re: [pkix] Clarification on "zero" hash value in SigPolicyHash (CAdES)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: PKIX Working Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 16 Jul 2019 09:32:22 -0000

Stefan Santesson <>; 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.