Re: [Ietf-dkim] RFC 8463: DNS textual form underspecified

Scott Kitterman <ietf-dkim@kitterman.com> Sun, 14 April 2024 19:57 UTC

Return-Path: <ietf-dkim@kitterman.com>
X-Original-To: ietf-dkim@ietfa.amsl.com
Delivered-To: ietf-dkim@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5C484C14F5FC for <ietf-dkim@ietfa.amsl.com>; Sun, 14 Apr 2024 12:57:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.397
X-Spam-Level:
X-Spam-Status: No, score=-4.397 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_PASS=-0.001, 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=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=kitterman.com header.b="S9MZn4Yd"; dkim=pass (2048-bit key) header.d=kitterman.com header.b="fqlv5z89"
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 TJdcSVQlpcIy for <ietf-dkim@ietfa.amsl.com>; Sun, 14 Apr 2024 12:57:16 -0700 (PDT)
Received: from interserver.kitterman.com (interserver.kitterman.com [64.20.48.66]) (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 ietfa.amsl.com (Postfix) with ESMTPS id 20DB4C14F5FB for <ietf-dkim@ietf.org>; Sun, 14 Apr 2024 12:57:15 -0700 (PDT)
Received: from interserver.kitterman.com (interserver.kitterman.com [64.20.48.66]) by interserver.kitterman.com (Postfix) with ESMTPS id CA757F801F9; Sun, 14 Apr 2024 15:57:05 -0400 (EDT)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=kitterman.com; i=@kitterman.com; q=dns/txt; s=201903e; t=1713124611; h=date : from : to : subject : in-reply-to : references : message-id : mime-version : content-type : content-transfer-encoding : from; bh=7tWTVSf22zVIzzpzNbXy+qzKDfKJu4/HFFBKjFBZZPg=; b=S9MZn4Ydn8UF8rtmjgoM0mGFCCatE0JNdAP/nScQIu1PJLoKy4mB96A/9H76w0zQTLH4k 8Rp+SLJfgqTgWRsDg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kitterman.com; i=@kitterman.com; q=dns/txt; s=201903r; t=1713124610; h=date : from : to : subject : in-reply-to : references : message-id : mime-version : content-type : content-transfer-encoding : from; bh=7tWTVSf22zVIzzpzNbXy+qzKDfKJu4/HFFBKjFBZZPg=; b=fqlv5z89+Q1fQXiYCcy6SX4raWZv8wFYvnzTODe6xUG6c1/Bc82RIIhmMUrIhiIFLYXs7 X7ChO0Hng8Xs/cMjeT1Avu21mmQnyAEJm8rMbinNdg0W/+rJr24yVWU2MsrFv+fy7awSQl9 qxFuNkaHj7l204TaZDxPdSdiePuspDiKddqBxpEJ4cNQuBK3SPCOdkcSE+NEO5n1Ajl8/0F aYuNb5gpKIwn1qAEqp8wKpFJ7ag66l37x6WM70o2iwpXCk0VRXuBOjQi4WXwFgbUm7krjS+ cgZ7NGyu9ruThhf/pymyU4UXGcy7C1tRQkwwvDYplxlW4iViUWIjlphoXMbw==
Received: from [127.0.0.1] (static-72-81-252-22.bltmmd.fios.verizon.net [72.81.252.22]) by interserver.kitterman.com (Postfix) with ESMTPSA id C9501F80035; Sun, 14 Apr 2024 15:56:50 -0400 (EDT)
Date: Sun, 14 Apr 2024 19:56:48 +0000
From: Scott Kitterman <ietf-dkim@kitterman.com>
To: ietf-dkim@ietf.org
In-Reply-To: <20240414191355.gv5mVHtn@steffen%sdaoden.eu>
References: <20240414005126.pzjJO4pr@steffen%sdaoden.eu> <5368AC9A-51D5-4AEC-AB19-613DBEAD7C5B@kitterman.com> <20240414015307.JiO8yjFG@steffen%sdaoden.eu> <2C92EB24-3332-436C-A0BB-D4BAC33220F2@kitterman.com> <20240414191355.gv5mVHtn@steffen%sdaoden.eu>
Message-ID: <717C7103-311A-4C60-A3BF-72EA41CBC2F8@kitterman.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-dkim/uO70TGnktrRRpTSVP53CRoNSdto>
Subject: Re: [Ietf-dkim] RFC 8463: DNS textual form underspecified
X-BeenThere: ietf-dkim@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IETF DKIM List <ietf-dkim.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-dkim>, <mailto:ietf-dkim-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-dkim/>
List-Post: <mailto:ietf-dkim@ietf.org>
List-Help: <mailto:ietf-dkim-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-dkim>, <mailto:ietf-dkim-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Apr 2024 19:57:20 -0000


On April 14, 2024 7:13:55 PM UTC, Steffen Nurpmeso <steffen@sdaoden.eu> wrote:
>Scott Kitterman wrote in
> <2C92EB24-3332-436C-A0BB-D4BAC33220F2@kitterman.com>:
> |On April 14, 2024 1:53:07 AM UTC, Steffen Nurpmeso <steffen@sdaoden.eu> \
> |wrote:
> |>Scott Kitterman wrote in
> |> <5368AC9A-51D5-4AEC-AB19-613DBEAD7C5B@kitterman.com>:
> |>|On April 14, 2024 12:51:26 AM UTC, Steffen Nurpmeso <steffen@sdaoden.eu> \
> |>|>Thanks to Hanno Böck (known from ossec and more) i was pointed to
> |>|>my falsely published ED25519 DKIM key.
> |>|>Until now that simply was the complete ED25519 public key, just
> |>|>like for RSA, instead of extracting the actual "bitstring data"
> |>|>from the standardized ASN.1 container, which starts at offset 16
> |>|>(or -offset=12 if you use "openssl asn1parse -noout -out -" aka
> |>|>the binary blob).
> |>|>
> |>|>I realize that RFC 8463 says repeatedly that the base64-encoded
> |>|>representation of an ED25519 key is 44 bytes, and that the
> |>|>examples go for this.  Still there is no wording that the entire
> |>|>ASN.1 structure shall be thrown away.
> |>|
> |>|At the time we wrote what became RFC 8463, ASN.1 for ED25519 was not \
> |>|specified yet.  Openssl didn't support ED25119 either.  I'm not sure \
> |>|what you think we should have put in that we didn't.
> |>|
> |>|It seems to me that you are saying that the RFC is correct and clear, \
> |>|but that you were certain you knew better than the RFC.  That's not \
> |>|a thing an RFC can fix.
> |>
> |>There *is* RFC 8410 to which 8463 refers, around the same time.
> |>It defines exactly this, no?  It says there are no further
> |>parameters, but it does not say "hey so you can go and just leave
> |>that niche container off".
> |>Sure it is 44 bytes, but the entire thing is 64.
> |>It is de-facto only the single example in A.2 which reveals the
> |>total ignorance of ASN.1, and it is about brisbane and football,
> |>which i cannot glue together (letting aside it is written by an
> |>american, and who knows what kind of "football" that is?, as
> |>i seem to know they say "soccer" for what i would think, but it is
> |>4am so i do not truly think anyhow.  Saturday night all right for
> |>fighting, ah.)  (OpenSSL in mid 2017, at least a bit.)
> |>Thus: smart, very smart.  Is always too smart for some.
> |>Just leave them behind.
> |
> |I don't see it?  Where is the reference to 8410?
>
>Yes you are right.  8463 only refers to 8032, and does not mention
>8410 at all.  This is a complete misunderstanding.  I have 8410
>since February 2023, and 8032 since 31st of January this year,
>coming from a completely different background, having read 5480
>(Elliptic Curve Cryptography Subject Public Key Information) and
>more in the past, and am a CMS and x.509 "fanatic".
>
>I think now that i understand that 8463 just "invents its own
>protocol" instead of embedding itself into the CMS / X509 / PKI
>infrastructure i no longer like it at all.  What a mess.  It is
>Wireguard VPN / SSH etc raw algorithm logic!

Since nothing else existed at the time we did the work, I'm not sure what else we could have done instead.  B64 of the public key isn't that hard to do.  Honestly, it was much easier to deal with implementing it than RSA shoved into ASN.1.

Ultimately, DKIM stuff is for DKIM and I don't think it's a huge problem if it's slightly different than other things.  In dkimpy I included tools to generate keys correctly.  I think that as long as library providers do that, this is a non-issue.

Scott K

Scott K