[Cbor] Simple values 24..31 (was Re: List of not-well-formed CBOR and test vectors)

Laurence Lundblade <lgl@island-resort.com> Thu, 01 August 2019 03:01 UTC

Return-Path: <lgl@island-resort.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 B8A8F12010C for <cbor@ietfa.amsl.com>; Wed, 31 Jul 2019 20:01:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=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 Wh29wSc0nj3U for <cbor@ietfa.amsl.com>; Wed, 31 Jul 2019 20:01:18 -0700 (PDT)
Received: from p3plsmtpa07-09.prod.phx3.secureserver.net (p3plsmtpa07-09.prod.phx3.secureserver.net [173.201.192.238]) (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 317DE1200C4 for <cbor@ietf.org>; Wed, 31 Jul 2019 20:01:18 -0700 (PDT)
Received: from [10.12.100.152] ([66.228.17.5]) by :SMTPAUTH: with ESMTPSA id t1LAhOj64xKQ1t1LBhaykW; Wed, 31 Jul 2019 20:01:17 -0700
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <9592F4F7-2008-4770-8FB4-54BD39191EFE@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_14B3E25E-47E8-448C-A7C1-C35DAE978978"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Wed, 31 Jul 2019 20:01:16 -0700
In-Reply-To: <39259861-43D9-4498-A2F5-E07DBC998CA6@tzi.org>
Cc: cbor@ietf.org
To: Carsten Bormann <cabo@tzi.org>
References: <CF3F871E-7489-4770-B2FE-1746C392ACF0@island-resort.com> <39259861-43D9-4498-A2F5-E07DBC998CA6@tzi.org>
X-Mailer: Apple Mail (2.3445.9.1)
X-CMAE-Envelope: MS4wfGi8BTNGN6WyxjyeGAsxEid5GLAeMLnKXYQFTMMwEQgmyVTr9FCi/ChN99bfcWFtLpsk269nAS3eQN1qt9hZzBeJ+Y8L6kVL29HRsRBdCpvG9F8wfbsJ swEYJDmcG/huefRPjTaD1p9XIpKv4Nj8D6XDh/MPoqg0QbEru1mxfk46UW1IQsLgy4RJ/D498musBQ==
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/jJdawt3X1m4xRFYWt794KmOPc70>
Subject: [Cbor] Simple values 24..31 (was Re: List of not-well-formed CBOR and test vectors)
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, 01 Aug 2019 03:01:20 -0000

On Jul 30, 2019, at 2:23 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Why are you testing only 25 of the 32 impermissible SIMPLE cases?

Because I’m confused about unassigned vs reserved in this table (just realized I was confused):

                       +---------+-----------------+
                       | Value   | Semantics       |
                       +---------+-----------------+
                       | 0..19   | (Unassigned)    |
                       |         |                 |
                       | 20      | False           |
                       |         |                 |
                       | 21      | True            |
                       |         |                 |
                       | 22      | Null            |
                       |         |                 |
                       | 23      | Undefined value |
                       |         |                 |
                       | 24..31  | (Reserved)      |
                       |         |                 |
                       | 32..255 | (Unassigned)    |
                       +---------+-----------------+

Neither sections 7.1 nor 9.2 mention 24..31. 

These of course can’t be represented by the single byte 0xf8 through 0xff because those are float and such, but there seems to be no trouble representing the with 0xf8 0x18 through 0xf8 0x1f.

Why wouldn’t 24 through 255 be considered unassigned and encoded 0xf8 0x18 through 0xf8 0xff?

LL