[Cbor] Interactions of packed CBOR and tags

Jim Schaad <ietf@augustcellars.com> Thu, 27 August 2020 21:00 UTC

Return-Path: <ietf@augustcellars.com>
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 407113A131F; Thu, 27 Aug 2020 14:00:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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 4RWs8y87j2BU; Thu, 27 Aug 2020 14:00:56 -0700 (PDT)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 09BB43A131B; Thu, 27 Aug 2020 14:00:55 -0700 (PDT)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 27 Aug 2020 14:00:50 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: draft-bormann-cbor-packed@ietf.org
CC: cbor@ietf.org
Date: Thu, 27 Aug 2020 14:00:48 -0700
Message-ID: <00c101d67cb5$2588b790$709a26b0$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AdZ8s0xpKERBvw7yTZyxz2a31flriA==
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/9y4lmViXgQntNE9IAxJA-sxr1bQ>
Subject: [Cbor] Interactions of packed CBOR and tags
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: Thu, 27 Aug 2020 21:00:57 -0000

While building a test library of strings for evaluating my algorithm, I
ended up with a question of how tags interact with the idea of CBOR packing.
Specifically, if I use a standard date/time string with tag 0, should that
text string be considered as a candidate for packing?

0("1970-01-01T00:00Z") could potentially be compressed to 0(simple(3))

The problem is that this is no longer a valid CBOR encoding so it would not
seem to be a legal thing to do.

Question:  Must packed CBOR be valid CBOR or does that requirement only
apply to unpacked CBOR?

Jim