[Anima] constrained voucher examples updated --- voucher looks wrong

Michael Richardson <mcr+ietf@sandelman.ca> Mon, 27 May 2019 02:37 UTC

Return-Path: <mcr+ietf@sandelman.ca>
X-Original-To: anima@ietfa.amsl.com
Delivered-To: anima@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F0463120227 for <anima@ietfa.amsl.com>; Sun, 26 May 2019 19:37:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, 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 xGsJFX8bcGBX for <anima@ietfa.amsl.com>; Sun, 26 May 2019 19:37:47 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [IPv6:2607:f0b0:f:3:216:3eff:fe7c:d1f3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CCA1A12021D for <anima@ietf.org>; Sun, 26 May 2019 19:37:47 -0700 (PDT)
Received: from sandelman.ca (unknown [IPv6:2607:f0b0:f:2:56b2:3ff:fe0b:d84]) by tuna.sandelman.ca (Postfix) with ESMTP id 52E253808A; Sun, 26 May 2019 22:36:45 -0400 (EDT)
Received: by sandelman.ca (Postfix, from userid 179) id D36E0D91; Sun, 26 May 2019 22:37:45 -0400 (EDT)
Received: from sandelman.ca (localhost [127.0.0.1]) by sandelman.ca (Postfix) with ESMTP id D218683B; Sun, 26 May 2019 22:37:45 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Thomas Werner <thomas-werner@siemens.com>, consultancy <consultancy@vanderstok.org>, anima@ietf.org
cc: Jim Schaad <ietf@augustcellars.com>
X-Attribution: mcr
X-Mailer: MH-E 8.6; nmh 1.7+dev; GNU Emacs 24.5.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Date: Sun, 26 May 2019 22:37:45 -0400
Message-ID: <28559.1558924665@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/DQbKuFP2LkT13UVL4sWtc09Kefg>
Subject: [Anima] constrained voucher examples updated --- voucher looks wrong
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <anima.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima>, <mailto:anima-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima/>
List-Post: <mailto:anima@ietf.org>
List-Help: <mailto:anima-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima>, <mailto:anima-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 May 2019 02:37:50 -0000

I have updated the appendix to draft-ietf-anima-constrained-voucher, which
contains the COSE signed CBOR vouchers.  I have included base64 of the
binary, as well as CBOR diagnostic format.
Please see:
  https://github.com/anima-wg/constrained-voucher/blob/master/constrained-voucher.txt#L2218

I am including the private (EC) keys in PKCS1 form ("BEGIN EC PRIVATE KEY"),
perhaps I should use PKCS8/RFC5208 format ("BEGIN PRIVATE KEY") instead?

Thomas, and Jim, would you take a crack at validating the voucher-request and parboiled
(Registrar signed) voucher requests from these files?  The raw binary files are at:
  https://github.com/anima-wg/constrained-voucher/tree/master/examples
along with the public keys.   It's just COSE signatures.

In doing this, I've discovered a bug in my code, and I believe it needs to be
fixed.  Specifically, it appears at line:
  https://github.com/anima-wg/constrained-voucher/blob/master/constrained-voucher.txt#L2478

You'll notice:

   "00-D0-E5-F2-00-02", 11: "rIe_64PzENXdd32FApWcMQ", 12: "MII
   B5TCCAWugAwIBAgIBATAKBggqhkjOPQQDAjBzMRIwEAYKCZImiZPyLGQBGRY

that is, I've pinned the *base64* encoding of the registrar's DER encoded
certificate, rather than the DER encoding itself.  This is clearly wrong, but
I do it consistently and tolerantly so I don't notice.  I will be fixing
this.  However, the signature on the resulting object should be correct, even
if the contents are semantically wrong.

--
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-