Re: [Cbor] Question about CBOR padding

Michael Richardson <mcr+ietf@sandelman.ca> Wed, 07 November 2018 04:43 UTC

Return-Path: <mcr@sandelman.ca>
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 70F991277D2 for <cbor@ietfa.amsl.com>; Tue, 6 Nov 2018 20:43:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 PAlnDAu81dNK for <cbor@ietfa.amsl.com>; Tue, 6 Nov 2018 20:43:03 -0800 (PST)
Received: from relay.sandelman.ca (relay.cooperix.net [IPv6:2a01:7e00::f03c:91ff:feae:de77]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C70A127148 for <cbor@ietf.org>; Tue, 6 Nov 2018 20:43:03 -0800 (PST)
Received: from dooku.sandelman.ca (unknown [IPv6:2001:67c:370:1998:a11:96ff:fe01:81e0]) by relay.sandelman.ca (Postfix) with ESMTPS id 6FC181F8BD for <cbor@ietf.org>; Wed, 7 Nov 2018 04:43:01 +0000 (UTC)
Received: by dooku.sandelman.ca (Postfix, from userid 179) id D3B2DCBF; Wed, 7 Nov 2018 10:12:32 +0530 (IST)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: cbor@ietf.org
In-reply-to: <3153512.GtUnpKuXoF@tjmaciei-mobl1>
References: <299e007c-10e5-d4cc-afd6-aac45fc3c54a@endpoint.com> <3153512.GtUnpKuXoF@tjmaciei-mobl1>
Comments: In-reply-to Thiago Macieira <thiago.macieira@intel.com> message dated "Tue, 06 Nov 2018 14:25:11 -0800."
X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Date: Wed, 07 Nov 2018 11:42:32 +0700
Message-ID: <22058.1541565752@dooku.sandelman.ca>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/sP28bKs-yJN-W1ByfYoGu9ZC0Zk>
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 04:43:06 -0000

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