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

Felipe Gasper <felipe@felipegasper.com> Sat, 27 April 2019 23:19 UTC

Return-Path: <felipe@felipegasper.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 7E59E120091 for <cbor@ietfa.amsl.com>; Sat, 27 Apr 2019 16:19:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=felipegasper.com
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 0p013ZXu2crb for <cbor@ietfa.amsl.com>; Sat, 27 Apr 2019 16:19:44 -0700 (PDT)
Received: from web1.siteocity.com (web1.siteocity.com [67.227.147.204]) (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 D7D7B12004C for <cbor@ietf.org>; Sat, 27 Apr 2019 16:19:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=felipegasper.com; s=default; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hAyntnNXxFsSl6dL792UEKQ8EgCPEsR3UkJT7YhxMp8=; b=CKTWmFUcKbrUciYZ0RVLrxU92 ITSxMtQy7kefZoufUsLjZs7VtxP7XPMZsoEO97n9Ytod9hOgqTA/uajBBhwLjCsfzpESoQI9fFw00 RtTvLJQnPzfuC9tATY0aX3jGC/EqNqVX/B5amfbUN2xiLBRut83jh3jxVjcCW6qgYprjctuElzetq vuISdwmQOqr06KiX7HuewrkAQ6xB7JZUzMQrxN7cleBybCzVVT8UbSUnHc1ulYpAVo7YOlf1A+lab 8H0IPvZA21zeVG87uAfqTilvWgb6ljMcK3K+CoX7P+Mia4B0qxOkipfba2yZFO5OCamO9MKyVFnrm 9BbU4401g==;
Received: from cpef81d0f822683-cmf81d0f822680.cpe.net.cable.rogers.com ([99.245.77.83]:51883 helo=[192.168.0.30]) by web1.siteocity.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from <felipe@felipegasper.com>) id 1hKWbd-00AUCe-Ma; Sat, 27 Apr 2019 18:19:42 -0500
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\))
From: Felipe Gasper <felipe@felipegasper.com>
In-Reply-To: <6A0E6EDA-2337-4682-A753-7ACEBB3AB7BB@tzi.org>
Date: Sat, 27 Apr 2019 19:19:40 -0400
Cc: cbor@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <75A561E9-8633-4B4E-A5D1-F2C845CA3DFE@felipegasper.com>
References: <7F3512DE-A3E2-41F1-A514-EC3F0BF2E3F3@felipegasper.com> <6A0E6EDA-2337-4682-A753-7ACEBB3AB7BB@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.3445.104.8)
X-OutGoing-Spam-Status: No, score=-1.0
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - web1.siteocity.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - felipegasper.com
X-Get-Message-Sender-Via: web1.siteocity.com: authenticated_id: fgasper/from_h
X-Authenticated-Sender: web1.siteocity.com: felipe@felipegasper.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-From-Rewrite: unmodified, already matched
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/9fa1KC1EWysTccQx6NdHuvZ_hd4>
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: Sat, 27 Apr 2019 23:19:46 -0000

> On Apr 27, 2019, at 6:06 PM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Hi Felipe,
> 
>> On Apr 27, 2019, at 23:14, Felipe Gasper <felipe@felipegasper.com> wrote:
>> 
>> 	Is there either a custom or a standard that guides interpretation of 64-bit CBOR integers on 32-bit systems that don’t have 64-bit emulation?
> 
> How to interpret this question depends a bit on what you are trying to do.  Let me try to list the possibilities:

Hi Carsten,

Thank you for your response. Please forgive my vagueness before.

I’m writing a general-purpose CBOR library in Perl XS. (The existing one doesn’t support newer Perl versions and has licensing problems for my team.)

I think what makes the most sense for me will be to consider numbers that aren’t representable in 32 bits as invalid input.

Thank you again!

-FG

p.s. The project is up at: https://github.com/FGasper/p5-CBOR-Free