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

Andy Bierman <andy@yumaworks.com> Wed, 29 June 2022 14:20 UTC

Return-Path: <andy@yumaworks.com>
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 BD3D8C15AAD4 for <core@ietfa.amsl.com>; Wed, 29 Jun 2022 07:20:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=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, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
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 cuEEllaW2A1f for <core@ietfa.amsl.com>; Wed, 29 Jun 2022 07:20:13 -0700 (PDT)
Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 C1D9BC157B4A for <core@ietf.org>; Wed, 29 Jun 2022 07:20:13 -0700 (PDT)
Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-3177f4ce3e2so149498917b3.5 for <core@ietf.org>; Wed, 29 Jun 2022 07:20:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c8Jvm1cM+gZ3U1WehjilcQoBGelT3b5VDkorO2PD5oU=; b=rKsjoTZkj8NgcQB3iwrbyMampPZxrdlm9pPHX3SZbsLwppURq2i41rSX67gXz9GK/t TWqwZHIEMwKDng3YBbfCa3KnDUA87SHnSF5VtOek2pcqZjsLxZ5FkXstTwoQu6WisUwK +paTgJJGIEOaThkYTbyVOIUnnQf5QViwysm+Sm7NgEJc36Y5+to96+tSKulrHPelfGfn mPRK1pkUmbCfOhSCbWs2JUsCFDyn/qTtEcom03gZib48MMrrwq5lNBdJEIuQFOy8viVu GVubpSnX9VlRksCIX5d9/woHOitwFZCrCRLzNyKkrQzcjWP684tTjCR0DEiPBVhXj2RO VwVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c8Jvm1cM+gZ3U1WehjilcQoBGelT3b5VDkorO2PD5oU=; b=anV0msPj8pT5CTAxP6bZiftBSM/DrlNnxuM7MfyykIoswWQJzjoXOVgJJ3pWp68I3i 5PsDTEaccnSZXQghal7k5Xa/wS3RxhkidU9zDpm17x1dbA2N+mlA2S97B+T+AVqWKuw9 YqNbn8xQwbHzk7ehF2Cp1C75jHiuOAJljmZIC1DflHLAN+mLxl8roGO3AGLmoW2kIT27 WFXmWQ9PFG7Qk1tfv80GkklP9Kwp/A+MQ7fTWCuEOE5HAmkMz05CKHI34DZi63XNfs49 +sxopBvWqzncVa4AdpV/PZmVPTzKj21emGSFk5rr9Hm6dVJFXISKj4I3+VGk9wZfExIp SMxg==
X-Gm-Message-State: AJIora88G38snbUIVtc4/09aEp3b7cvuuKRgQQ775sVTApquCDWDQBBn m+C9hh9PpkRR1r4eRblkUUOVIfiE3WZ8RvBsePJYEQ==
X-Google-Smtp-Source: AGRyM1v/4DkWphZeev4tlOgw+8hYr6R/Vo0l0201qZSUV7OlpOCuQgRvXCaeFS4E1OudiRbaTmkWnSPog0wY1PEfGEY=
X-Received: by 2002:a81:57ca:0:b0:317:f626:4a82 with SMTP id l193-20020a8157ca000000b00317f6264a82mr4089277ywb.212.1656512412438; Wed, 29 Jun 2022 07:20:12 -0700 (PDT)
MIME-Version: 1.0
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> <04EC3D51-6242-4547-BF7F-397859E8D18E@tzi.org>
In-Reply-To: <04EC3D51-6242-4547-BF7F-397859E8D18E@tzi.org>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 29 Jun 2022 07:20:01 -0700
Message-ID: <CABCOCHSEyGakhuukHkLU-bWUV26QAzc3vkOuLEMRf8-YZbFtqQ@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, anima@ietf.org, Core <core@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000e8ea2105e296d975"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/1ctyGKSedsPFM2VxkW7J4x1pceo>
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 14:20:17 -0000

On Tue, Jun 28, 2022 at 11:42 PM Carsten Bormann <cabo@tzi.org> wrote:

>
>
> > 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?
>
>
So your proposal is for the sender to check every single string it sends to
the receiver to
see if some complex 20 byte string can be changed to an 8 byte integer
instead?
This seems rather CPU-intensive and not very useful for YANG Push.
I doubt constrained devices have enough CPU for this, or that they need to
send
lots of date-and-time data nodes to justify it.

The date-and-time typedef for a string is not special in YANG in any way.
Just another derived type defined in a YANG module.


Grüße, Carsten
>
>
Andy