[Ietf-dkim] Re: JSON vs tag-value encoding and the quoting question (was: Proposal key validity field for DKIM2)

Richard Clayton <richard@highwayman.com> Sun, 06 September 2026 14:37 UTC

Return-Path: <richard@highwayman.com>
X-Original-To: ietf-dkim@mail2.ietf.org
Delivered-To: ietf-dkim@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 08BEF13652123 for <ietf-dkim@mail2.ietf.org>; Sun, 6 Sep 2026 07:37:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1788705436; bh=dqYN/KJWN8Nyd8XObP+GUm+gB4sPE54Am5m+ULz5SRo=; h=Date:To:From:Subject:References:In-Reply-To; b=Xi1l2H3sxTvmY7mSFqN20KIZV/trDxRQhjH9S49R0yz7Cc04+bfYxqQQ52DE4NBLS +V1VJ14vjZSbT/2Mkskb/4aXEg6lBPS9I1n5IR5C3PuDDyiHH20SQcejI1wSvFRirS emtBG3BRvoeoD/agBj9d45c77mi+Yzc67kDBAdq0=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=highwayman.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jQhjYzS3Lib8 for <ietf-dkim@mail2.ietf.org>; Sun, 6 Sep 2026 07:37:13 -0700 (PDT)
Received: from mail.highwayman.com (mail.highwayman.com [217.155.43.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 768EA13652112 for <ietf-dkim@ietf.org>; Sun, 6 Sep 2026 07:37:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=highwayman.com; s=rnc1; h=MIME-Version:In-Reply-To:References:Subject:From: To:Date:Message-ID:Sender:Reply-To:Cc:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fxbp0LDeOfuikEdYvC2MxTkCv8Mc7qTYtaV72AuD3Ac=; t=1788705433; x=1789569433; b=cS4skGYIL4xUUZDp/sb03sJGaFhbbyuIu5Z2UvY4btbG3xRqKn12G4Ffpq3CnGa8ybYwjOKFDr0 vTemYd5kL+82GauTlQ/zjHdyoglFQyrVBdaLZdikEKvc+mO9EL5/rwsy1QggXQyTOkhmolpDQ+88T DlAWj6+S5QemHzGA/bXdIM+1gLr1m4erYejJkwPGPHB8iS9C0lNIsYrZ9shFgAm4dRFUMM4IA1XVK gR8DaMwRqBI6BwWeYx+XqZDj5x1hf+uTcsGyUwixOTi5/lw75J6C9u8NZZzLPvnZ1fIMTNViQ+KcV UTrS/6/AxxKwZayZMgCzlU5smc/fuPJzb+6w==;
Received: from [127.0.0.1] (port=48266 helo=happyday.al.cl.cam.ac.uk) by mail.highwayman.com with esmtp (Exim 4.98.2) (envelope-from <richard@highwayman.com>) id 1x3DzW-000000005Dn-18wk for ietf-dkim@ietf.org; Sun, 06 Sep 2026 14:37:06 +0000
Message-ID: <ARNjiQBGoXnqFArT@highwayman.com>
Date: Sun, 06 Sep 2026 15:34:46 +0100
To: ietf-dkim@ietf.org
From: Richard Clayton <richard@highwayman.com>
References: <31841651-40ea-428e-b13b-dc60a29ee6e0@timogerke.de> <32e559a7-5e5b-4223-9396-1ea6c1b591cd@app.fastmail.com> <aecc69b5bf57b85442459898503159ac@itb.it>
In-Reply-To: <aecc69b5bf57b85442459898503159ac@itb.it>
MIME-Version: 1.0
X-Mailer: Turnpike Integrated Version 5.03 M <Hp$$+z8r77fPsOKLxeY+dOovhT>
Message-ID-Hash: LUBHP3XZEXSKTAISHPNSTDYOBIMLHTHY
X-Message-ID-Hash: LUBHP3XZEXSKTAISHPNSTDYOBIMLHTHY
X-MailFrom: richard@highwayman.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-ietf-dkim.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Ietf-dkim] Re: JSON vs tag-value encoding and the quoting question (was: Proposal key validity field for DKIM2)
List-Id: IETF DKIM List <ietf-dkim.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-dkim/teHwQkc7nedXobIemvpGCjgD1Bk>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-dkim>
List-Help: <mailto:ietf-dkim-request@ietf.org?subject=help>
List-Owner: <mailto:ietf-dkim-owner@ietf.org>
List-Post: <mailto:ietf-dkim@ietf.org>
List-Subscribe: <mailto:ietf-dkim-join@ietf.org>
List-Unsubscribe: <mailto:ietf-dkim-leave@ietf.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In message <aecc69b5bf57b85442459898503159ac@itb.it>, Vittorio
<v.moccia@itb.it> writes

>The complex characters in an RFC5321 Forward-path are handled the same 
>way regardless of what surrounds them. The current spec handles them 
>with base64: rt= is a tag-value field (rt=base64string *("," 
>base64string), Section 8.6) whose values are base64-encoded precisely 
>because the Forward-path "can include characters which would confuse 
>naive parsers." That is a tag-value field solving the quoting problem 
>without any JSON.
>
>There is a second way to avoid the problem entirely: carry one address 
>per header, so no value ever contains more than a single address and 
>there is no internal separator to protect. No encoding is needed because 
>there is nothing to disambiguate.

that is incorrect

The issue is not that an email address can contain a comma (which of
course would not occur if we did not have more than one address)

an email address can also contain a = character ... and that means that
a naive parser which believes that (<char>)<char><equals><string> is a
valid tag is going to make a mess of it

viz: there is more than one character to hide away from the naive

Note also that recipes can be contain a very wide range of characters
when entire header fields are being replaced.

- -- 
richard @ highwayman . com                       "Nothing seems the same
                          Still you never see the change from day to day
                                And no-one notices the customs slip away"

-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.7.1

iQA/AwUBap16BmHfC/FfW545EQJtsACgxoNCTsHFQ3vFIrTW0TiL6zg+Z3QAoKzV
UZEMUrLHKYsCIAIdl+jVb3UJ
=oQNC
-----END PGP SIGNATURE-----