Re: [Anima-bootstrap] [Spasm] SHA1 usage in Anima-bootstrap voucher yang

Russ Housley <> Fri, 03 March 2017 20:43 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2F2D71294ED for <>; Fri, 3 Mar 2017 12:43:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id W3FcCA6M2z1l for <>; Fri, 3 Mar 2017 12:43:12 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B2DAE1295C3 for <>; Fri, 3 Mar 2017 12:43:06 -0800 (PST)
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2485A30049F for <>; Fri, 3 Mar 2017 15:43:06 -0500 (EST)
X-Virus-Scanned: amavisd-new at
Received: from ([]) by localhost ( []) (amavisd-new, port 10026) with ESMTP id 0qTpkcLJF8vy for <>; Fri, 3 Mar 2017 15:43:04 -0500 (EST)
Received: from new-host-5.home ( []) by (Postfix) with ESMTPSA id 85A8230024A; Fri, 3 Mar 2017 15:43:04 -0500 (EST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
From: Russ Housley <>
In-Reply-To: <>
Date: Fri, 03 Mar 2017 15:43:04 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <>
To: Michael Richardson <>
X-Mailer: Apple Mail (2.3259)
Archived-At: <>
Cc: SPASM <>, anima-bootstrap <>
Subject: Re: [Anima-bootstrap] [Spasm] SHA1 usage in Anima-bootstrap voucher yang
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Mailing list for the bootstrap design team of the ANIMA WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 03 Mar 2017 20:43:14 -0000

> On Mar 1, 2017, at 8:52 PM, Michael Richardson <> wrote:
> In the ANIMA ownership voucher YANG model, the absolute latest which you can
> currently see at:
> we write at line 574:
> leaf subject-hash {
>    type binary;
>    description "The certificate's entire subject field MUST
>              match this value.  This value is calculated as the SHA-1
>              hash over the TBSCertificate's subject structure, as
>              specified by RFC 5280 Section, encoded using
>              the ASN.1 distinguished encoding rules (DER), as
>              specified in ITU-T X.690.
>              Note: by using the SHA-1 algorithm, the result can be
>              easily compared to OpenSSL's 'subject_hash'
>              output.";
> }
> The voucher is a signed artifact (PKCS7? JWT? CWT? TBD) which indicates to a
> particular device who the devices owner is. ("Are you my mummy?" for Dr.Who Fans)
> For reasons of key hygiene and longevity, in many cases we do not want to
> point at the public key of the registrar directly, but rather indicate that
> it's DN=Foo, as signed by CA=Bar.   It seems like there ought be a better way
> to do this kind of thing than what we specify above, which is annoyingly SHA1
> linked.
> Can SPASM offer any advice?
> We could list the actual DER itself. Encoded, it might actually not be bigger
> than a SHA256, for instance.  That might have privacy implications though,
> which we'd need to think through.
> Some time ago, I proposed replicating the SIDR artifact (RFC3779), and copy
> and pasted it to make:
> but, we didn't really want to go exactly that way.


I’m sure you know that there are three important properties for hash
functions.  The are:

(1) collision resistance: it is computationally infeasible to find two
    different inputs that hash to the same output; that is, it is really
    hard to find a and b such that H(a) = H(b).

(2) preimage resistance: it is computationally infeasible to find any
    input that hashes to a given output; that is, given y, it is really
    hard to find x such that H(x) = y.

(3) second-preimage resistance: it is computationally infeasible to find
    a second input which has the same output as a specified input; that
    is, given x, it is really hard to find y such that H(x) = H(y).

Google has announced a collision for SHA-1.  They found to PDF files
that produce the same SHA-1 hash value.

In the system you describe, it seems that an attacker would need to
find a preimage.  For SHA-1, we do not know of a way to do that yet,
but the 160-bit have value produced by SHA-1 is probably not big enough
to be considered safe in today's computing environment.

It seems very odd to be developing a new standards that is using a hash
function that was deprecated at the end of 2010 by NIST.

My personal recommendation ould be to move from SHA-1 to SHA-256.