Re: [Cbor] draft-ietf-cbor-network-addresses: tag validity; deterministic encoding

Michael Richardson <mcr+ietf@sandelman.ca> Sat, 16 October 2021 21:06 UTC

Return-Path: <mcr+ietf@sandelman.ca>
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 797253A0DD7 for <cbor@ietfa.amsl.com>; Sat, 16 Oct 2021 14:06:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 J7p6pdNY7A2g for <cbor@ietfa.amsl.com>; Sat, 16 Oct 2021 14:06:26 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E70063A0DD6 for <cbor@ietf.org>; Sat, 16 Oct 2021 14:06:25 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id 2681018287; Sat, 16 Oct 2021 17:06:50 -0400 (EDT)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4agL607V6K-U; Sat, 16 Oct 2021 17:06:49 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [209.87.249.21]) by tuna.sandelman.ca (Postfix) with ESMTP id C17751808D; Sat, 16 Oct 2021 17:06:49 -0400 (EDT)
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 765071C6; Sat, 16 Oct 2021 17:06:23 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Brian E Carpenter <brian.e.carpenter@gmail.com>, Carsten Bormann <cabo@tzi.org>, cbor@ietf.org
In-Reply-To: <c837d973-b136-8f1d-1b08-6516544cdc1f@gmail.com>
References: <891995AA-2854-431E-9242-98FFCDA5E161@tzi.org> <dab25fe3-43c4-865e-2c7a-54b24340c295@gmail.com> <19BCDB95-AB61-4F92-A38D-F6FD5CA8BBB1@tzi.org> <a616b11c-0fc3-436b-96b0-12a6156c37f5@gmail.com> <DAE0122E-D6AB-45B2-A287-AC270AD8A7CD@tzi.org> <c837d973-b136-8f1d-1b08-6516544cdc1f@gmail.com>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 26.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature"
Date: Sat, 16 Oct 2021 17:06:23 -0400
Message-ID: <25225.1634418383@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/qVf1-KqXgxFvjSLUD0BqZkpVvig>
Subject: Re: [Cbor] draft-ietf-cbor-network-addresses: tag validity; deterministic encoding
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, 16 Oct 2021 21:06:31 -0000

Brian E Carpenter <brian.e.carpenter@gmail.com> wrote:
    > I'd actually prefer if these tags were supported directly in the
    > underlying libraries, so that the code could be optimized and the
    > validation could be complete. Or possibly there should be a separate
    > library providing build and detag/verify functions in a generic way.

yeah, so...
      cbor2sockaddr()

But, we didn't do port numbers or protocols, so sockaddr is wrong.
I actually found this annoying in my Rust code, because Sockaddr is the best
abstraction for v4/v6 addresses with scopes around, but without a service and
port number, you can't make one.

--
Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide