Re: Digests: deprecating parameters?

Poul-Henning Kamp <phk@phk.freebsd.dk> Tue, 18 August 2020 16:23 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D2FD03A0E9C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 18 Aug 2020 09:23:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.898
X-Spam-Level:
X-Spam-Status: No, score=-2.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-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 DOzg6QYy44vJ for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 18 Aug 2020 09:23:58 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 38F283A0ECC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 18 Aug 2020 09:23:46 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1k84Lf-0001QM-Iu for ietf-http-wg-dist@listhub.w3.org; Tue, 18 Aug 2020 16:20:31 +0000
Resent-Date: Tue, 18 Aug 2020 16:20:31 +0000
Resent-Message-Id: <E1k84Lf-0001QM-Iu@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <phk@critter.freebsd.dk>) id 1k84Ld-0001Pa-UD for ietf-http-wg@listhub.w3.org; Tue, 18 Aug 2020 16:20:29 +0000
Received: from phk.freebsd.dk ([130.225.244.222]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <phk@critter.freebsd.dk>) id 1k84Lb-000335-TR for ietf-http-wg@w3.org; Tue, 18 Aug 2020 16:20:29 +0000
Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (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 phk.freebsd.dk (Postfix) with ESMTPS id 3ED0D1AF20F; Tue, 18 Aug 2020 16:20:15 +0000 (UTC)
Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.16.1/8.16.1) with ESMTPS id 07IGKEG4007218 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 18 Aug 2020 16:20:14 GMT (envelope-from phk@critter.freebsd.dk)
Received: (from phk@localhost) by critter.freebsd.dk (8.16.1/8.16.1/Submit) id 07IGKEG0007217; Tue, 18 Aug 2020 16:20:14 GMT (envelope-from phk)
To: Roberto Polli <robipolli@gmail.com>
cc: Amos Jeffries <squid3@treenet.co.nz>, Lucas Pardue <lucaspardue.24.7@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
In-reply-to: <CAP9qbHWCZRYY76+z124sCCwtdoA1+H6L-Wkkx4wgtbrtWBGQwQ@mail.gmail.com>
From: Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <CALGR9oYCU2b3wiTFV8uNO37opK0XMgq_=D0sTyZVw8kVuKG+4g@mail.gmail.com> <c71669f6-bb90-1952-7ca4-2db42a64fe55@treenet.co.nz> <CAP9qbHUWV+bpoUYBD6ckD36i=uFOkkrQRB=zmNCLER2d4M+K8w@mail.gmail.com> <7025.1597764267@critter.freebsd.dk> <CAP9qbHWCZRYY76+z124sCCwtdoA1+H6L-Wkkx4wgtbrtWBGQwQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <7215.1597767614.1@critter.freebsd.dk>
Content-Transfer-Encoding: quoted-printable
Date: Tue, 18 Aug 2020 16:20:14 +0000
Message-ID: <7216.1597767614@critter.freebsd.dk>
Received-SPF: pass client-ip=130.225.244.222; envelope-from=phk@critter.freebsd.dk; helo=phk.freebsd.dk
X-W3C-Hub-Spam-Status: No, score=-4.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1k84Lb-000335-TR 3e09bed26d61f8e57114fdd0668f7177
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Digests: deprecating parameters?
Archived-At: <https://www.w3.org/mid/7216.1597767614@critter.freebsd.dk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37937
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

--------
Roberto Polli writes:

> While I like sf-binary, actual digest-algorithms define their own serialization
> method (in this case it's accidentally the same of structured headers) but other
> algorithms use eg. integer.
>
> To support SF we could say that digest-algorithms like sha-256 and
> sha-512 should be supported
> in both sf-binary and the traditional token format.

The most sensible way (IMO) is to define that *all* digests are *always* sf-binary.

That makes for simpler parsing and simpler APIs to plug new digest algorithms into.

The alternative is that the digest algorithms are allowed a
choice from (a subset of) sf-item (= sh-integer / sh-decimal /
sh-string / sh-token / sh-binary / sh-boolean).

I have a hard time seing any non-speculative advantages in that ?

I dont know of any contemporary digest algorithms, and have a very
hard time even imagining future digest algorithms, which do not
output a finite sequence of binary 8-bit bytes, ready to stuff into
a sf-binary.

If some past/future/speculative digest algorithm wants a particular
serialization, only sf-binary is 100% certain to be able to carry it
anyway, it might for instance contain newlines.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.