Re: [core] [Anima] date-and-time and "created-on" field in constrained-voucher

Carsten Bormann <cabo@tzi.org> Wed, 29 June 2022 06:42 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 68290C15A73A; Tue, 28 Jun 2022 23:42:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hNpf7I9PTInB; Tue, 28 Jun 2022 23:42:29 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [134.102.50.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 086F8C15A73B; Tue, 28 Jun 2022 23:42:26 -0700 (PDT)
Received: from smtpclient.apple (p5089ad4f.dip0.t-ipconnect.de [80.137.173.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4LXsMh1W6QzDCg0; Wed, 29 Jun 2022 08:42:24 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20220629015429.vfps46mvcb7io67o@anna>
Date: Wed, 29 Jun 2022 08:42:23 +0200
Cc: Andy Bierman <andy@yumaworks.com>, anima@ietf.org, Core <core@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <04EC3D51-6242-4547-BF7F-397859E8D18E@tzi.org>
References: <24048.1656352364@localhost> <25937.1656365067@localhost> <CABCOCHS6=F0tfESkVmOk1AFKvsu4tRfKu9A_Sgz5swVXv-eXCQ@mail.gmail.com> <26870.1656383550@localhost> <CABCOCHSkh95PEEM5E3YKe_yc5VmsY90XxT1D-z3AiJwwcG-HhA@mail.gmail.com> <7669.1656440710@localhost> <6DCC06F4-3799-4CC0-8780-21E6B12A4022@tzi.org> <CABCOCHQqtKw6cZ1o7nzDmQBN0zQP70CgeAAc6nFdRa_kB+-DBQ@mail.gmail.com> <09C66776-54C5-4C5D-9DFA-E164A1050170@tzi.org> <E51C95DD-0AC5-40E4-8609-E0B444E77786@tzi.org> <20220629015429.vfps46mvcb7io67o@anna>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3696.100.31)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/0yEEG6JpCHbmpWoSfFoAihGA2DY>
Subject: Re: [core] [Anima] date-and-time and "created-on" field in constrained-voucher
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Jun 2022 06:42:32 -0000


> On 29. Jun 2022, at 03:54, Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> On Tue, Jun 28, 2022 at 11:40:55PM +0200, Carsten Bormann wrote:
>> On 2022-06-28, at 22:50, Carsten Bormann <cabo@tzi.org> wrote:
>>> 
>>> The alternative would be to trigger on the data, so any string that looks like 2022-06-28T20:48:15Z would turn into 1(1656449295).  That has some interesting security considerations, though.
>> 
>> Hmm, that is starting to become more attractive to me.
>> 
>> As long as we can make sure that the same string comes back out again, this can be safe even if we don’t get the typenames right.
>> 
>> Of course an efficient implementation might still be triggered by typenames, but it wouldn’t create a problem if that guesses wrong.
>> 
> 
> This sounds super scary. So how in CBOR would you make sure that the
> timezone suffix Z remains Z and the suffix +00:00 remains +00:00?

Clearly, the idea only makes sense if the packing/unpacking function is a bijection.
So 1(1656449295) can only stand for 2022-06-28T20:48:15Z and not, at the same time, for 2022-06-28T20:48:15+00:00.
The application can then decide that it really wants to use 2022-06-28T20:48:15Z because that packs better, and not 2022-06-28T20:48:15+00:00.
All that works best if we have something like a canonical representation for some application data.
(Without that, it becomes less transparent for an application what the cost of a specific data item is going to be.)

So far I’m aware of date-time and IP addresses as obvious candidates for this.  Anything else that would benefit significantly?

Grüße, Carsten