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

Stephen Farrell <stephen.farrell@cs.tcd.ie> Wed, 11 April 2012 02:34 UTC

Return-Path: <stephen.farrell@cs.tcd.ie>
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 06D2311E814A for <apps-discuss@ietfa.amsl.com>; Tue, 10 Apr 2012 19:34:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.566
X-Spam-Level:
X-Spam-Status: No, score=-102.566 tagged_above=-999 required=5 tests=[AWL=0.033, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
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 aGE6LZOMsICE for <apps-discuss@ietfa.amsl.com>; Tue, 10 Apr 2012 19:34:31 -0700 (PDT)
Received: from scss.tcd.ie (hermes.scss.tcd.ie [IPv6:2001:770:10:200:889f:cdff:fe8d:ccd2]) by ietfa.amsl.com (Postfix) with ESMTP id DDDCC11E809B for <apps-discuss@ietf.org>; Tue, 10 Apr 2012 19:34:30 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by hermes.scss.tcd.ie (Postfix) with ESMTP id 80B2C17147C; Wed, 11 Apr 2012 03:34:29 +0100 (IST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.tcd.ie; h= content-transfer-encoding:content-type:in-reply-to:references :subject:mime-version:user-agent:from:date:message-id:received :received:x-virus-scanned; s=cs; t=1334111669; bh=CquDAsAwEdXDT+ YvoorKT1fnMVbMN9LvdVne2+nJb4U=; b=CDRFAj3YBUWz4STK+hb/6Ysu2iVEbh EufXGBioCwJrQ9RGpUl37FEnAu6qy5ApXntLZ9xjBQSxyfcHaQxHnZ9T8wNEJAoc JPJTx5RhB5/7rSYMqFbm0qo2U+0agO/3xs3pEMkfxc0qskHWau4dvB69UETC9RGg +r3SAdrYglV9Iatd4VzbuVEivRTj2x4/SQrJXyzUGBHO1dZ06c6WH57EI2pkECmk GRDJd2dP5xnz/utry0JxpHuZSbzaPJWLY2oYpEwPeKgKDGDszHBOsGPidLge6ZZA Hotkf6/YfDncAxYayyTsK9wfxXoNy+NAo0JpCpO76It/fgwapU43nkfA==
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from scss.tcd.ie ([127.0.0.1]) by localhost (scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10027) with ESMTP id 8J+VHf4lFVCK; Wed, 11 Apr 2012 03:34:29 +0100 (IST)
Received: from [10.87.48.3] (unknown [86.44.64.139]) by smtp.scss.tcd.ie (Postfix) with ESMTPSA id CF886171479; Wed, 11 Apr 2012 03:34:23 +0100 (IST)
Message-ID: <4F84EDAE.5030207@cs.tcd.ie>
Date: Wed, 11 Apr 2012 03:34:22 +0100
From: Stephen Farrell <stephen.farrell@cs.tcd.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
MIME-Version: 1.0
To: "Manger, James H" <James.H.Manger@team.telstra.com>
References: <4F7DFC47.2020604@cs.tcd.ie> <DDCD3226-782B-46E5-9CEB-61E4773CE0B2@tzi.org> <255B9BB34FB7D647A506DC292726F6E114F0499619@WSMSG3153V.srv.dir.telstra.com>
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E114F0499619@WSMSG3153V.srv.dir.telstra.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [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: Wed, 11 Apr 2012 02:34:33 -0000

Hi again James,

On 04/10/2012 05:08 AM, Manger, James H wrote:
> 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.

Yep. That was me being sloppy ("od -x" did used to do the right thing
on some platform I used sometime in the distant past I think;-)

>
> 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

Ditto.

>
> 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;????

We're deleting the last character, yes. Might need to think more
about I18N for that all right. I'm told dropping the last character
is ok, but have yet to check.

>
> 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.

Fair point. OTOH, that'd mean omitting the "nih:sha-256;" part but
I guess that'd be not much harm.

I suspect that you may be right about the checksum. Will check with
co-authors more involved with CoAP (Ari basically) to see what they
prefer, since its them that want the CRC.

I've posted a -03 that I hope is good now, other than the CRC input.

Thanks again,
Stephen.


>
> --
> James Manger
>
>