Re: [Cbor] Decoding of 64-bit CBOR ints on 32-bit systems

Carsten Bormann <cabo@tzi.org> Sun, 28 April 2019 08:12 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 AA75D1200F8 for <cbor@ietfa.amsl.com>; Sun, 28 Apr 2019 01:12:55 -0700 (PDT)
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 nd4A2NkE1kPe for <cbor@ietfa.amsl.com>; Sun, 28 Apr 2019 01:12:54 -0700 (PDT)
Received: from smtp.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 DEEBD12008A for <cbor@ietf.org>; Sun, 28 Apr 2019 01:12:53 -0700 (PDT)
Received: from [192.168.217.106] (p54A6CC75.dip0.t-ipconnect.de [84.166.204.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.uni-bremen.de (Postfix) with ESMTPSA id 44sLBW0t0tzyvl; Sun, 28 Apr 2019 10:12:51 +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: <75A561E9-8633-4B4E-A5D1-F2C845CA3DFE@felipegasper.com>
Date: Sun, 28 Apr 2019 10:12:49 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 578131967.9331959-6629a933e777312c8db2a84d7cf73252
Content-Transfer-Encoding: quoted-printable
Message-Id: <17A06717-869C-49D2-9B71-4B656B8831CC@tzi.org>
References: <7F3512DE-A3E2-41F1-A514-EC3F0BF2E3F3@felipegasper.com> <6A0E6EDA-2337-4682-A753-7ACEBB3AB7BB@tzi.org> <75A561E9-8633-4B4E-A5D1-F2C845CA3DFE@felipegasper.com>
To: Felipe Gasper <felipe@felipegasper.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/uXuBu78Pv5Orw5obIHc5cJxhjLI>
Subject: Re: [Cbor] Decoding of 64-bit CBOR ints on 32-bit systems
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, 28 Apr 2019 08:12:56 -0000

On Apr 28, 2019, at 01:19, Felipe Gasper <felipe@felipegasper.com>; wrote:
> 
> I think what makes the most sense for me will be to consider numbers that aren’t representable in 32 bits as invalid input.

Another alternative would be to represent these numbers using any bignum facility that may be part of the language (or popular – I must admit I’m not using Perl as much today as I did in the 1990s, so I’m not sure which such facility you would use).  This by the way also could then be used to handle tags 2/3.

Grüße, Carsten