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

Steffen Nurpmeso <steffen@sdaoden.eu> Mon, 15 April 2024 20:22 UTC

Return-Path: <steffen@sdaoden.eu>
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 89CB8C151075 for <ietf-dkim@ietfa.amsl.com>; Mon, 15 Apr 2024 13:22:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level:
X-Spam-Status: No, score=-2.094 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_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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=pass (2048-bit key) header.d=sdaoden.eu header.b="aPLYgCyN"; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=sdaoden.eu header.b="5fYYHB1X"
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 toMHBtMPyxnu for <ietf-dkim@ietfa.amsl.com>; Mon, 15 Apr 2024 13:22:05 -0700 (PDT)
Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (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 6FA7BC151072 for <ietf-dkim@ietf.org>; Mon, 15 Apr 2024 13:22:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=citron; t=1713212520; x=1713879186; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: mime-version:content-type:content-transfer-encoding:author:from:subject: date:to:cc:resent-date:resent-from:resent-to:resent-cc:in-reply-to: references:mime-version:content-type:content-transfer-encoding:message-id: mail-followup-to:openpgp:blahblahblah; bh=AxwPn+DEnQPC9TyUXzxYyI6JXKw7RcW6H5W+qhdGHVk=; b=aPLYgCyNhvPsno79NJyGfi3o29U9rAJrrydduR2eBVlB+qc3ABhsqd1HF3JvFhKNKiBXOI3+ RPq6gpH1NZMu/EIGGWjSJ4r/NKB2nT50A9WSGDVHqou22vEbLdm6qL+tbZSP3100AawFPgvJlr 7RPL+/sRr9/DS3EnMvqY1bwTI/X9xEhfdXbNY1YecEWIm35YBM0UKr30perwiRTAq73xDmD2zY ZeSw+kqxYqCqZIT91Q/8si2ShzXoq+ZSosC/Q+yGq9NioXn/vYjgHbHYWmLLipAZpVmyr6LaYI TQTKAhhpXofHudOqemUiJNnzIrsiiyPaGDviTP6tKFG7v0Kw==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=orange; t=1713212520; x=1713879186; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: mime-version:content-type:content-transfer-encoding:author:from:subject: date:to:cc:resent-date:resent-from:resent-to:resent-cc:in-reply-to: references:mime-version:content-type:content-transfer-encoding:message-id: mail-followup-to:openpgp:blahblahblah; bh=AxwPn+DEnQPC9TyUXzxYyI6JXKw7RcW6H5W+qhdGHVk=; b=5fYYHB1X2FnT1feuhgZcj6srjsV/B+ZF+95qVL81/lCu7XJdEHoTAE1pv7/Qjluwcxwq6f+J XijejZypQCTMBg==
Date: Mon, 15 Apr 2024 22:04:52 +0200
Author: Steffen Nurpmeso <steffen@sdaoden.eu>
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Scott Kitterman <ietf-dkim@kitterman.com>
Cc: ietf-dkim@ietf.org
Message-ID: <20240415200452.T7oU1y5p@steffen%sdaoden.eu>
In-Reply-To: <717C7103-311A-4C60-A3BF-72EA41CBC2F8@kitterman.com>
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> <717C7103-311A-4C60-A3BF-72EA41CBC2F8@kitterman.com>
Mail-Followup-To: Scott Kitterman <ietf-dkim@kitterman.com>, ietf-dkim@ietf.org
User-Agent: s-nail v14.9.24-612-g7e3bfac540
OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt
BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs.
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/H3HUQYzFeRI4ZNMMlGM12D9pYMo>
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: Mon, 15 Apr 2024 20:22:11 -0000

I mean ok, non-issue.

Scott Kitterman wrote in
 <717C7103-311A-4C60-A3BF-72EA41CBC2F8@kitterman.com>:
 |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.
 ...
 |>|>|>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.
 ...
 |>|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
 ..
 |>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.

But please allow me some doubts as there are widely available and
audited cryptographic libraries around that offer interfaces to
deal with these issues.

 |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.

It is an intransparent binary blob of random data.
And it remains so when decoded.  Who wants that in the DNS.
To trumple upon you all and this non-issue even further as it is
Monday, these are my DKIM records

  v=DKIM1; k=ed25519; p=NhvcV4tLaGvK4sSxWEWzjfpntCeyj7s4smQ+JM1LE0Y=
  v=DKIM1; k=rsa; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAniKuBSPAv5QtXEv08pP5uKWMIP3QvmSq3P2Ick/wMTnRv3xqCQPtXu7ick/qt05df/RNLlSIUVL0szhAq8Ua2QporQ53xs8llprY7y0ZpZpUrhUsvwa1GCF2o2DFnD9mWDq5wepxvDRLKpfJu6faz0eFNRL8fyR3ER7EqegrA6+dl6vX+eZLCp/qlhnMhlh/zio8irdCap9W28g+m5Wpqn2p3qhXjqdWKpQUwSu194O+lF19cdLLXpx2L+pW4r8TM/xi2dzNC0/3KEm+zWqhWZZV2T8oRk3mjoMfpMr1v2Yo2RIk7Q6akFna/Bqkt+zJvbu/Yso15x+JTQw6MPvSCwIDAQAB

Everyone who knows can apply

  openssl base64 -d | openssl asn1parse -inform DER

and will get somehow "useful" results for that latter, but nothing
but an error for the former.
The same person who wrote 8032 wrote 8410 and that in turn
was IETF-published earlier than 8463.
There is also RFC 7250 "Using Raw Public Keys in Transport Layer
Security (TLS) and Datagram Transport Layer Security (DTLS)" from
2014, and many more ASN.1 / X509 / CMS etc infrastructural
emissions from the IETF for which i am not an expert, but anyhow
in all this context a binary blob of intransparent data is an
"illegal alien".

How about a RFC for asn1ed25519-sha256 DKIM keys which simply
includes the 16 base64-encoded ASN.1 structure bytes?
Or asn1ed25519-blake2 (RFC 7693), which is now also widely
available (and if only for that RFC 9106 Argon2 monster)?
Maybe this will help the switch away from RSA?

It is otherwise not understandable in this world of hysteric
encryption-scheme reduction (ie in TLS land just two or three
years ago i was shouted at on nmh-workers at nongnu dot org by
a well known US army (navy i think) security guy well-known for
his Kerberos/GSSAPI prospect once i said something about TLSv1.1,
and as of today in practice i only see TLSv1.3, and the developer
of the HTTP server software i use reduced to forward-secrecy-plus
  ("CipherString" => "EECDH+AESGCM:CHACHA20:!PSK:!DHE")   # default
which is not much but at least has some TLSv1.2 left:
  # openssl ciphers -v EECDH+AESGCM:CHACHA20:!PSK:!DHE).

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)