Re: [Tm-rid] 1st steps - time lines and drafts

Carsten Bormann <cabo@tzi.org> Fri, 02 August 2019 19:21 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: tm-rid@ietfa.amsl.com
Delivered-To: tm-rid@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E7ADA12014F for <tm-rid@ietfa.amsl.com>; Fri, 2 Aug 2019 12:21:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.198
X-Spam-Level:
X-Spam-Status: No, score=-4.198 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=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 EuCIi8Ak9QGq for <tm-rid@ietfa.amsl.com>; Fri, 2 Aug 2019 12:21:10 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F322F120147 for <tm-rid@ietf.org>; Fri, 2 Aug 2019 12:21:09 -0700 (PDT)
Received: from [192.168.217.110] (p548DCCB9.dip0.t-ipconnect.de [84.141.204.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 460cTJ15qbzyQp; Fri, 2 Aug 2019 21:21:08 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <8671.1564692957@localhost>
Date: Fri, 02 Aug 2019 21:21:07 +0200
Cc: tm-rid@ietf.org
X-Mao-Original-Outgoing-Id: 586466465.2961071-8e5bb5901ffa4e0e7d3a77958b441777
Content-Transfer-Encoding: quoted-printable
Message-Id: <11F5E851-AADB-4DF9-9A8D-7B14FF6755D2@tzi.org>
References: <30eb80bc-8f7a-e550-d081-547b8bf0dbed@labs.htt-consult.com> <41dbac5b-0c59-e470-f1c3-933a9dbc14d0@labs.htt-consult.com> <CAKM0pYNsj95RCnQAW7hggOfAQXRHCxXbC8JEUK_VNG3E8b1wXQ@mail.gmail.com> <8671.1564692957@localhost>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tm-rid/SBS3rG2degmUpsDh1bEg_N6gBUc>
Subject: Re: [Tm-rid] 1st steps - time lines and drafts
X-BeenThere: tm-rid@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Trustworthy Multipurpose RemoteID <tm-rid.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tm-rid>, <mailto:tm-rid-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tm-rid/>
List-Post: <mailto:tm-rid@ietf.org>
List-Help: <mailto:tm-rid-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tm-rid>, <mailto:tm-rid-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 02 Aug 2019 19:21:12 -0000

On Aug 1, 2019, at 22:55, Michael Richardson <mcr+ietf@sandelman.ca> wrote:
> 
> My experience with CBOR is that unless you want a flat non-extendable
> C-struct, and you will ALWAYS need *ALL* of the fields,  odds are that CBOR
> is smaller. 

Carsten’s compactness principle of data encoding: It is *always* possible to invent something bespoke that is somehow more compact than using an existing data serialization scheme.
(Corollary: It is much harder to invent something that is actually better in more than the compactness dimension in the long run.)

So when the OSCORE people needed to shave off a byte or two from their CBOR-based encoding, they went for a top-level bespoke compression of a structure that continues to use the CBOR data model (see Section 6.3 for that): https://tools.ietf.org/html/rfc8613#section-6.1
This escape hatch is always available.

Apart from that, it *is* possible to come up with CBOR structures that are actually wasteful; I hope there are enough people who have already used CBOR here that this outcome can be avoided.

Grüße, Carsten