Re: [dispatch] draft-devault-bare-07 to be discussed during IETF 114

Victorien Elvinger <victorien.elvinger@inria.fr> Fri, 05 August 2022 14:57 UTC

Return-Path: <victorien.elvinger@inria.fr>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7B279C147921 for <dispatch@ietfa.amsl.com>; Fri, 5 Aug 2022 07:57:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.721
X-Spam-Level:
X-Spam-Status: No, score=-2.721 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, RCVD_IN_DNSWL_MED=-2.3, 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, URI_DOTEDU=1.685] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=inria.fr
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 ONCIRtRINesR for <dispatch@ietfa.amsl.com>; Fri, 5 Aug 2022 07:57:15 -0700 (PDT)
Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (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 0BC8DC1BED2C for <dispatch@ietf.org>; Fri, 5 Aug 2022 07:56:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=message-id:date:mime-version:to:cc:from:subject: content-transfer-encoding; bh=+UZqVeqL7uGAsmxyG4idqvwbrVUMclXVmeWyI4t9SFc=; b=kStNk0JXMprf/j0FhRJmNz9g96ALGg5Y1WDKdWQa1bnD3RbAP8u+d1wz hDFdOVplPIqKSZqLiwCAtjS0Mc//SX2MNeNepJQcvD217KF7kFwHi3RfJ H4fDcSiQeKqn3PX4KJzyVBCfEpy7cmzyau0HpVu27Jb1Pdk1QE7BMT31B I=;
Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=victorien.elvinger@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr
X-IronPort-AV: E=Sophos;i="5.93,216,1654552800"; d="scan'208";a="48080295"
Received: from lfbn-ncy-1-474-157.w83-196.abo.wanadoo.fr (HELO [192.168.1.20]) ([83.196.64.157]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 16:56:00 +0200
Message-ID: <22fc1d2c-f22b-cb1a-e8ac-65f027d92e16@inria.fr>
Date: Fri, 05 Aug 2022 16:55:54 +0200
MIME-Version: 1.0
Content-Language: en-US-large
To: anders.rundgren.net@gmail.com, rlb@ipv.sx
Cc: Drew DeVault <sir@cmpwn.com>, dispatch@ietf.org, Jiri Vlasak <jiri.hubacek@gmail.com>
From: Victorien Elvinger <victorien.elvinger@inria.fr>
Organization: Inria
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/yAd3dKJDTn7fnHE9YtxaipTpM3U>
X-Mailman-Approved-At: Tue, 09 Aug 2022 03:28:43 -0700
Subject: Re: [dispatch] draft-devault-bare-07 to be discussed during IETF 114
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Aug 2022 14:59:04 -0000

Hello !

I am a contributor to the BARE draft.

 > It seems worth observing here that BARE has a lot of overlap with
 > the "TLS syntax", the presentation syntax used in TLS and MLS

Yes. However there is a significative incompatibility: endianness.
BARE message are little-endian encoded.
TLS messages are big-endian encoded.


 > I don't have full insight in this but in programming environments
 > that actually support a map concept, ordered maps are likely to be found.

We should make a survey to convince us about that.

Moreover, many ordered maps are maps that respect the order of
insertion of the key-value pairs. Thus keys are not ordered...

So we should decide what we mean by ordered maps:
maps that order their keys or maps that account for the insertion-order?

I think you consider the former?
Because you want the same encoding regardless the insertion order?


 > Right.  Given the fact that all BARE keys must be of the same type makes
 > this a simple task.

If we are going to require an order between keys, then I might prefer to
require a lexicographic order on their binary representation.


 > Right, what I'm saying is that the cost for ordering (on the sender side)
 > is very small regardless of programming language.

Keys have to be ordered first before encoding the map, right?
Unless the programming language support maps with ordered keys.


 > I understand but I am less convinced that NaN + payload actually
 > is used since its support by programming platforms seems pretty
 > scarce to say the least.

Indeed, the support of NaN payload propagation is really messy.
However, most of processors propagate the payload [1].
Although it can be turned off on ARM processors and this must be turned
on for RISC-V processors.

The 2019 update of IEEE 754 standard adds a function to access
the NaN payload and another one to set the NaN payload.
However, the behavior of these functions may depend on the considered
platform [2].

This is difficult to determinate whether NaN payload propagation is
actually used or not.
I have already taken the time to look for data on this subject.
However, I have not been able to find any useful data...

If we normalize NaN into a single representation,
we could also wonder whether -0 should be normalized to +0?

That's why we decided to avoid dealing with this mess.

Even if we have canonical floats and canonical maps,
there is still a big issue with UTF-8 (grapheme cluster vs code points, 
...).
And no one agrees on what is a true canonial Unicode string is...

[1] 
https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/nan-propagation.pdf
[2] 
https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/payload-functions.txt

-- 
Victorien Elvinger
PhD and R&D Engineer, Inria Grand Est

PGP https://pgp.mit.edu/pks/lookup?search=victorien+elvinger