[apps-discuss] draft-farrell-decade-ni-02: glitch in examples

"Manger, James H" <James.H.Manger@team.telstra.com> Tue, 10 April 2012 04:08 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D70AE21F8593 for <apps-discuss@ietfa.amsl.com>; Mon, 9 Apr 2012 21:08:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.028
X-Spam-Level:
X-Spam-Status: No, score=0.028 tagged_above=-999 required=5 tests=[AWL=-0.929, BAYES_20=-0.74, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PBZ1TyRTvALv for <apps-discuss@ietfa.amsl.com>; Mon, 9 Apr 2012 21:08:19 -0700 (PDT)
Received: from ipxavo.tcif.telstra.com.au (ipxavo.tcif.telstra.com.au [203.35.135.200]) by ietfa.amsl.com (Postfix) with ESMTP id 06E2921F858F for <apps-discuss@ietf.org>; Mon, 9 Apr 2012 21:08:18 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.75,397,1330866000"; d="scan'208";a="69086626"
Received: from unknown (HELO ipccvi.tcif.telstra.com.au) ([10.97.217.208]) by ipoavi.tcif.telstra.com.au with ESMTP; 10 Apr 2012 14:08:17 +1000
X-IronPort-AV: E=McAfee;i="5400,1158,6675"; a="57931249"
Received: from wsmsg3702.srv.dir.telstra.com ([172.49.40.170]) by ipccvi.tcif.telstra.com.au with ESMTP; 10 Apr 2012 14:08:17 +1000
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3702.srv.dir.telstra.com ([172.49.40.170]) with mapi; Tue, 10 Apr 2012 14:08:16 +1000
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Date: Tue, 10 Apr 2012 14:08:15 +1000
Thread-Topic: draft-farrell-decade-ni-02: glitch in examples
Thread-Index: Ac0Tdv8UPe/vtTqdSlGaFLO6WlVXZgDSdC2A
Message-ID: <255B9BB34FB7D647A506DC292726F6E114F0499619@WSMSG3153V.srv.dir.telstra.com>
References: <4F7DFC47.2020604@cs.tcd.ie> <DDCD3226-782B-46E5-9CEB-61E4773CE0B2@tzi.org>
In-Reply-To: <DDCD3226-782B-46E5-9CEB-61E4773CE0B2@tzi.org>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: Apps Discuss <apps-discuss@ietf.org>
Subject: [apps-discuss] draft-farrell-decade-ni-02: glitch in examples
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Apr 2012 04:08:20 -0000

Stephen,

A couple of "typos" in draft-farrell-decade-ni-02:

The example SubjectPublicKeyInfo is shown in a strange way: each pair of bytes is shown in the opposite order to bytes on the wire (and the offset at the start of the line is in nibbles). The first few bytes of the BER-encoding are 30 820122, while the example starts:
   0000000 8230 2201 0d30 0906 862a 8648 0df7 0101

The BER-encoding is actually:
   30 820122
      30 0D
         06 09 2A86
      ...

Half of the example names are wrong, almost certainly due to this strange format. 

The 120-bit "Binary Name" in figure 6 is wrong. It swaps the order of bytes (after the first). It should be:
  03 53269057 E12FE2B7 4BA07C89 2560A2

The human-readable names (120-bit and 32-bit) are wrong. They have base32-encoded pairs of bytes in the wrong order. They should be:
  sha-256-120;kmtjav7bf7rlos5apseskyfc;????
  sha-256-32;kmtjavy;????

I am not sure what the correct checksums are.

The example checksums (eokv and csdh) look wrong. I assume the 4 base32 chars in the checksum should encode 5+5+5+1 bits respectively of the 16-bit CRC. Hence the last char encodes 1 bit, padded with 4 zeros: either 00000 or 10000, which should give 'a' or 'q' (not 'v' or 'h').

P.S. A CRC16 is calculated over an array of bytes. However the input is defined as a text string. I guess ASCII/UTF-8 encoding is assumed. It might be better to calculate the CRC over the bytes of the truncated hash.


--
James Manger