Re: [Cbor] Invalid decimal fraction / big float?

Carsten Bormann <cabo@tzi.org> Sun, 25 August 2019 13:19 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 602BC1200A1 for <cbor@ietfa.amsl.com>; Sun, 25 Aug 2019 06:19:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
X-Spam-Status: No, score=-4.197 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, 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 OkVfts2ERI5w for <cbor@ietfa.amsl.com>; Sun, 25 Aug 2019 06:19:46 -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 686BB12002E for <cbor@ietf.org>; Sun, 25 Aug 2019 06:19:46 -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 46GbMh42Nzz10Df; Sun, 25 Aug 2019 15:19:44 +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: <D4C38A34-F601-4173-A686-362DDE4E8BEE@island-resort.com>
Date: Sun, 25 Aug 2019 15:19:44 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 588431982.117574-51ece754084000b8b280a4d58d43ddca
Content-Transfer-Encoding: quoted-printable
Message-Id: <0515B626-7968-43C1-950E-5AD5FCEA2671@tzi.org>
References: <D4C38A34-F601-4173-A686-362DDE4E8BEE@island-resort.com>
To: Laurence Lundblade <lgl@island-resort.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/hfJNwsd8FAjOlnG7dUQojNmfhOE>
Subject: Re: [Cbor] Invalid decimal fraction / big float?
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: Sun, 25 Aug 2019 13:19:48 -0000

On Aug 25, 2019, at 11:57, Laurence Lundblade <lgl@island-resort.com> wrote:
> 
> My inclination would be that they are both valid. If that is the choice, then decoders MUST handle both and that is not obvious from the text.

The intent (and the text) of RFC 7049 require that the second element of the array is either a basic integer (major type 0/1) or a tag 2/3 bignum.  

The meaning of your example with a byte string in that position may be clear to you, but it isn’t to me.  (It also isn’t allowed by RFC 7049.)  I would not propose that we start assigning that meaning to it after the fact.

Grüße, Carsten