Re: [Cbor] Question about CBOR padding

Carsten Bormann <cabo@tzi.org> Wed, 07 November 2018 05:24 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 36DED130E5A for <cbor@ietfa.amsl.com>; Tue, 6 Nov 2018 21:24:43 -0800 (PST)
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] 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 13aV4yD29cgT for <cbor@ietfa.amsl.com>; Tue, 6 Nov 2018 21:24:41 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6F08C130E19 for <cbor@ietf.org>; Tue, 6 Nov 2018 21:24:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost2.informatik.uni-bremen.de [134.102.200.7]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id wA75OXSO004306; Wed, 7 Nov 2018 06:24:38 +0100 (CET)
Received: from [IPv6:2001:67c:370:128:115b:4c89:51b3:85c7] (unknown [IPv6:2001:67c:370:128:115b:4c89:51b3:85c7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 42qZbh2s5Xz1Bqf; Wed, 7 Nov 2018 06:24:32 +0100 (CET)
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: <22058.1541565752@dooku.sandelman.ca>
Date: Wed, 07 Nov 2018 12:24:27 +0700
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 563261065.9690059-c73ffa9a6cbc6e692d3b38be69c38d7e
Content-Transfer-Encoding: quoted-printable
Message-Id: <90003C23-5B0E-4745-8D8B-22ABB68B3CFA@tzi.org>
References: <299e007c-10e5-d4cc-afd6-aac45fc3c54a@endpoint.com> <3153512.GtUnpKuXoF@tjmaciei-mobl1> <22058.1541565752@dooku.sandelman.ca>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/lbyahl0DCNPUCv0kTO8ToCwGktY>
Subject: Re: [Cbor] Question about CBOR padding
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Nov 2018 05:24:44 -0000

When we did CBOR, we didn’t have a very good use case for padding.

I’m not sure we have one now; but let me mention that we have some free codes that could be set aside for padding.

So if the WG wants to define a version of CBOR that supports padding, I have a proposal to pull out of the drawer.

In this particular case, it sounds like a stop code (“no more data following”) would also do it.

Grüße, Carsten

> On Nov 7, 2018, at 11:42, Michael Richardson <mcr+ietf@sandelman.ca> wrote:
> 
> Signed PGP part
> 
> Thiago Macieira <thiago.macieira@intel.com> wrote:
>> CBOR has no need for padding and it does not have any byte sequence that can
>> fill in for padding.
> 
> True.
> 
> You could pad with a sized or series of indefinite length array that ended
> with no items.  I think it's best to just read the first "element", and
> ignore the rest though.
> 
> --
> Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
> -= IPv6 IoT consulting =-
> 
> 
> 
> 
>