[Ietf-dkim] Re: Proposal key validity field vor DKIM2
Timo Gerke <ietf@timogerke.de> Fri, 25 September 2026 20:20 UTC
Received: from mail.ud24.udmedia.de (ud24.udmedia.de [194.117.254.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx.ietf.org (Postfix) with ESMTPS id 75CA644 for <ietf-dkim@ietf.org>; Fri, 25 Sep 2026 20:20:11 +0000 (UTC)
Authentication-Results: mx.ietf.org; dkim=pass header.d=timogerke.de header.s=k1 header.b=DH+UX1Wf; dmarc=pass (policy=none) header.from=timogerke.de; spf=pass (mx.ietf.org: domain of ietf@timogerke.de designates 194.117.254.64 as permitted sender) smtp.mailfrom=ietf@timogerke.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timogerke.de; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type; s=k1; bh=9nJbmW0jQbUKqD9QEKapHBBUfic+ RHRm581e3HQFeZE=; b=DH+UX1Wfz0xJgMC7pjL2pA5mAG47EBYLv15N0U0dRoXw zxpSiPzsSd0nVNeWsuckqQwguxf0YCnV4cYGiSHpKx/I5q/+syajWeaFbIRNc26W RQ3tZBNIK0Gq26GXuLduy7+d5m9VKJlnVqzVOpyZzn9yAiAtamTEDbg1G0lqCPrj o4+d2is43utRyclWZkbNmHyyyE7PhYysLIxVL30apLd4wtpqqbPq6B+WwbhGPgcE nqJ8os8utTvPVs8V3e1ZNEL7Gdlk0a5fRL6TW3Vf6cyPVYIeQdkjwHXpQ4nh9C8o gw0IRZt3Gp4PQkzXSv5pFst0eA5JxH+zcCA4FPNANg==
Received: (qmail 3457775 invoked from network); 25 Sep 2026 22:20:03 +0200
Received: by mail.ud24.udmedia.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Sep 2026 22:20:03 +0200
X-UD-Smtp-Session: ud24?77p2@G9gJcVRcMr0qAjEAis9NAOO9MagL1oWO
Message-ID: <1da48b54-69a6-4277-bf04-bb1df2a3b254@timogerke.de>
Date: Fri, 25 Sep 2026 22:20:03 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: ietf-dkim@ietf.org
References: <e7fdecf1-021a-41bd-a4cb-6438948e5f4f@timogerke.de> <A6F85562-BA81-4E59-B6C3-05CD33813BA3@stalw.art> <d1482446-26e5-4cb7-90fa-2dd7201d6ec2@timogerke.de> <00A0616E-1CE4-4864-A757-EF0176D0AECB@stalw.art>
From: Timo Gerke <ietf@timogerke.de>
Content-Language: en-US, de-DE, de-BE
Autocrypt: addr=ietf@timogerke.de; keydata= xjMEaYr6SxYJKwYBBAHaRw8BAQdAYcTjfSqJsL7yRrZV5UC9ZRYcylDszz18e4DnY5m5BPPN MlRpbW8gR2Vya2UgKElFVEYgY29udGFjdCBvbmx5KSA8aWV0ZkB0aW1vZ2Vya2UuZGU+wpYE ExYKAD4WIQSJGFaVEuPWVS91CeOfA9+fWXvzHgUCakLBXQIbAwUJCxM3LQULCQgHAgYVCgkI CwIEFgIDAQIeAQIXgAAKCRCfA9+fWXvzHqI0AP9P2rQdankUst1DI4bBpOJwotFb51Nrf0LJ SGRDNMkahwD/e0OGAiXwAauUo6i9k33Q8N42aAVM3BEUjAJIV3xYMAnOOARpivpLEgorBgEE AZdVAQUBAQdAkMZH3NDh0IqHstKpMmSlD9lWIeb2ejTWrIM+7ZBzOncDAQgHwn4EGBYKACYC GwwWIQSJGFaVEuPWVS91CeOfA9+fWXvzHgUCaePMWAUJCxM3LAAKCRCfA9+fWXvzHiqOAP46 Q1Er56CZ9KYyqdx4o3dzg0+Kn/14LM9mdxNdr0mTmwD/TuzCQ7Tk5gzRbcwia2NNcpA0sIXY O5cijgbO2f70xgY=
In-Reply-To: <00A0616E-1CE4-4864-A757-EF0176D0AECB@stalw.art>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="------------572NmITPCVZAdLyAZehFJnc3"
X-Spamd-Bar: --
Message-ID-Hash: P56H6F6MLKML5W3LINT6E36I2MMZ5J2F
X-Message-ID-Hash: P56H6F6MLKML5W3LINT6E36I2MMZ5J2F
X-MailFrom: ietf@timogerke.de
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ietf-dkim.ietf.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.10
Precedence: list
Subject: [Ietf-dkim] Re: Proposal key validity field vor DKIM2
List-Id: IETF DKIM List <ietf-dkim.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-dkim/JZ_Way_4AJpxzoeMkfPlpe4r70M>
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>
Hi Mauro,
You cannot securely implement an insecure specification.
Your reference to yyjson's linear scans confirms a textbook
O(n^2) algorithmic complexity DoS vector. Your reference to
simdjson's 1024 nesting depth completely validates Hannah's
industrial veto ("That's not nice, that's DoS.").
I will not engage in further discussions on this matter until an
official SECDIR and TSVART Early Review of spec-06 is available.
Regards,
Timo
It looks like Mauro De Gennaro aimed to say:
> Hi Timo,
>
> C/C++ email infrastructure isn't actually an obstacle to a resilient JSON implementation, it's solved territory:
>
> - yyjson is a two-file ANSI C library with zero dependencies, so it vendors into a C mail server as easily as any existing library there. The maintainer reports that it parses at about 1.7 to 1.8 GB/s (comparable to serde_json) on their cross-platform benchmarks (AWS EC2, AMD EPYC 7R32) .
>
> - simdjson is C++ but SIMD-accelerated and used in production by Node.js and others. In the same benchmark set it parses at about 1.5 GB/s on x86.
>
> And going back to your security concerns:
>
> - Nesting/stack-overflow DoS: yyjson's parser is iterative, not recursive, so it doesn't consume a native stack frame per nesting level, meaning deeply nested input can't overflow the stack. simdjson's DOM API caps nesting depth at 1024 by default and rejects anything deeper before it becomes a problem. Neither has the recursive-descent-by-default weakness.
>
> - Hash-collision DoS: neither library uses a hash table for object keys at all. yyjson stores members in a linked structure and does linear key lookup, and simdjson does a forward scan. There's no hash function for an attacker to target, so classic algorithmic-complexity/collision attacks don't apply.
>
> Both libraries are also fuzzed continuously (yyjson through its own CI, simdjson through OSS-Fuzz).
>
> I believe these facts settle the performance, nesting, and hash-collision concerns. At this point the burden of proof is on the other side, if you believe yyjson or simdjson can still be broken this way, the constructive next step is a proof-of-concept that demonstrates it, not a restatement of the concern.
>
>
> Best,
> Mauro
>
>
>> On 25 Sep 2026, at 15:26, Timo Gerke <ietf@timogerke.de> wrote:
>>
>> Hi Mauro,
>>
>> But you know that about 90% of the worldwide email infrastructure
>> (sendmail, exim, postfix, and others) runs C on C++ based?
>>
>> Rust is only a side-note here.
>>
>> Regards,
>> Timo
>>
>> It looks like Mauro De Gennaro aimed to say:
>>> Hi Timo,
>>>
>>> I don’t do C anymore but here’s running Rust code of a full DKIM2
>>> implementation. Please do try to break it:
>>>
>>> mail-auth.png
>>> mail-auth/src/dkim2/mod.rs <http://mod.rs/> at main · stalwartlabs/mail-auth <https://github.com/
>>> stalwartlabs/mail-auth/blob/main/src/dkim2/mod.rs <http://mod.rs/>>
>>> github.com <http://github.com/> <https://github.com/stalwartlabs/mail-auth/blob/main/src/dkim2/mod.rs>
>>>
>>> <https://github.com/stalwartlabs/mail-auth/blob/main/src/dkim2/mod.rs>
>>>
>>>
>>> Best,
>>> Mauro
>>>
>>> PS: https://xkcd.com/386/ <https://xkcd.com/386/>
>>>
>>>
>>>
>>>> On 24 Sep 2026, at 8:43 pm, Timo Gerke <ietf@timogerke.de> wrote:
>>>>
>>>> Hi Mauro,
>>>> hi all,
>>>>
>>>> Yes Mauro, Streaming JSON would be possible, if it were a stream,
>>>> but it is encapsulated. When I hear SAX, I need to think about
>>>> music.
>>>>
>>>> BTW: Hannah also said "That's not nice, that's DoS. [...] Change
>>>> the spec to forbid additional items in the top-level JSON
>>>> Object. ", think about it.
>>>>
>>>> Mauro, if you think, that the actual design has no flaws,
>>>> provide running C code.
>>>>
>>>> Best,
>>>> Timo
>>>>
>>>> It looks like Mauro De Gennaro aimed to say:
>>>>> Hi Timo,
>>>>>
>>>>> Every conclusion in your message rests on assumptions about how a particular
>>>>> parser happens to be implemented.
>>>>>
>>>>> MIME is not linear by nature. It is a nested format: multipart containers can
>>>>> hold further multipart containers, and message/rfc822 parts can embed entire
>>>>> messages. A parser that recurses on that structure can be driven to stack
>>>>> exhaustion by a deeply nested message, and this has happened in real
>>>>> products. "Streaming and linear" describes a well-written MIME parser, not
>>>>> MIME itself.
>>>>>
>>>>> The same reasoning applies to JSON. JSON encapsulated in JSON does not
>>>>> require building a DOM. Streaming, event-based parsers have existed for many
>>>>> years and process input incrementally with bounded memory, including for long
>>>>> flat arrays. Whether an implementation builds a tree, recurses, or streams is
>>>>> a design decision by the library author, not a property of the format.
>>>>>
>>>>> The picture you describe is also outdated and does not match how modern
>>>>> libraries are written. Current parsers commonly enforce configurable limits
>>>>> on nesting depth, input size, and allocation, and they fail cleanly when
>>>>> those limits are hit. A crafted envelope causing an immediate process
>>>>> collapse describes a naive or unmaintained implementation, not the state of
>>>>> the art.
>>>>>
>>>>> The only vulnerability in this scenario is the use of a flawed library, and a
>>>>> specification cannot repair a flawed library. An implementer who picks a
>>>>> parser that cannot safely handle untrusted input will have the same problem
>>>>> with MIME, JSON, or any other format. I would ask that we not present this as
>>>>> a structural weakness of the DKIM2 design, because the argument does not hold up.
>>>>>
>>>>>
>>>>> Best,
>>>>> Mauro
>>>>>
>>>>
>>>>
>>>> Timo Gerke
>>>> Hamburg, Germany
>>>>
>>>> "If you think technology can solve your security
>>>> problems then you don't understand the problems
>>>> and you don't understand the technology."
>>>> -- Bruce Schneier
>>>> <OpenPGP_0x9F03DF9F597BF31E.asc>
>>>> _______________________________________________
>>>> Ietf-dkim mailing list -- ietf-dkim@ietf.org
>>>> To unsubscribe send an email to ietf-dkim-leave@ietf.org
>>>
>>>
>>> _______________________________________________
>>> Ietf-dkim mailing list -- ietf-dkim@ietf.org <mailto:ietf-dkim@ietf.org>
>>> To unsubscribe send an email to ietf-dkim-leave@ietf.org <mailto:ietf-dkim-leave@ietf.org>
>>
>>
>> Timo Gerke
>> Hamburg, Germany
>>
>> "If you think technology can solve your security
>> problems then you don't understand the problems
>> and you don't understand the technology."
>> -- Bruce Schneier<OpenPGP_0x9F03DF9F597BF31E.asc>_______________________________________________
>> Ietf-dkim mailing list -- ietf-dkim@ietf.org <mailto:ietf-dkim@ietf.org>
>> To unsubscribe send an email to ietf-dkim-leave@ietf.org <mailto:ietf-dkim-leave@ietf.org>
>
>
> _______________________________________________
> Ietf-dkim mailing list -- ietf-dkim@ietf.org
> To unsubscribe send an email to ietf-dkim-leave@ietf.org
Timo Gerke
Hamburg, Germany
"If you think technology can solve your security
problems then you don't understand the problems
and you don't understand the technology."
-- Bruce Schneier
- [Ietf-dkim] Proposal key validity field vor DKIM2 Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Bron Gondwana
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: JSON vs tag-value encoding and th… Vittorio
- [Ietf-dkim] Re: JSON vs tag-value encoding and th… G.W. Haywood
- [Ietf-dkim] Re: JSON vs tag-value encoding and th… Richard Clayton
- [Ietf-dkim] Re: JSON vs tag-value encoding and th… Vittorio
- [Ietf-dkim] Re: JSON vs tag-value encoding and th… Hannah Stern
- [Ietf-dkim] Re: JSON vs tag-value encoding and th… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Taavi Eomäe
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Allen Robinson
- [Ietf-dkim] Re: Proposal key validity field vor D… John Levine
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Bron Gondwana
- [Ietf-dkim] Re: Proposal key validity field vor D… John Levine
- [Ietf-dkim] Re: Proposal key validity field vor D… Steve Atkins
- [Ietf-dkim] Re: base64+JSON on the critical path … Vittorio
- [Ietf-dkim] Re: base64+JSON on the critical path … Bron Gondwana
- [Ietf-dkim] Re: base64+JSON on the critical path Vittorio
- [Ietf-dkim] Re: base64+JSON on the critical path Bron Gondwana
- [Ietf-dkim] R: Re: base64+JSON on the critical pa… MCN-IETF
- [Ietf-dkim] Re: R: Re: base64+JSON on the critica… Bron Gondwana
- [Ietf-dkim] Re: base64+JSON on the critical path Hannah Stern
- [Ietf-dkim] Re: base64+JSON on the critical path Vittorio
- [Ietf-dkim] Re: base64+JSON on the critical path Hannah Stern
- [Ietf-dkim] Re: base64+JSON on the critical path Vittorio
- [Ietf-dkim] Re: base64+JSON on the critical path Hannah Stern
- [Ietf-dkim] R: Re: base64+JSON on the critical pa… MCN-IETF
- [Ietf-dkim] Re: R: Re: base64+JSON on the critica… John Levine
- [Ietf-dkim] Re: R: Re: base64+JSON on the critica… Richard Clayton
- [Ietf-dkim] Re: base64+JSON on the critical path Vittorio
- [Ietf-dkim] Re: base64+JSON on the critical path Pete Resnick
- [Ietf-dkim] Re: base64+JSON on the critical path Vittorio
- [Ietf-dkim] Re: base64+JSON on the critical path Richard Clayton
- [Ietf-dkim] Re: base64+JSON on the critical path Bron Gondwana
- [Ietf-dkim] Re: base64+JSON on the critical path Vittorio
- [Ietf-dkim] Re: Moderation (was Re: base64+JSON o… Hannah Stern
- [Ietf-dkim] Re: base64+JSON on the critical path Bron Gondwana
- [Ietf-dkim] Re: base64+JSON on the critical path Bron Gondwana
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… John Levine
- [Ietf-dkim] Re: Proposal key validity field vor D… Taavi Eomäe
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Bron Gondwana
- [Ietf-dkim] Procedural notice on avoidance of the… Timo Gerke
- [Ietf-dkim] Re: Procedural notice on avoidance of… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Bron Gondwana
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Bron Gondwana
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Barry Leiba
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Murray S. Kucherawy
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Murray S. Kucherawy
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Murray S. Kucherawy
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Murray S. Kucherawy
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Taavi Eomäe
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Taavi Eomäe
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Pete Resnick
- [Ietf-dkim] Re: Proposal key validity field vor D… Vittorio
- [Ietf-dkim] Re: Proposal key validity field vor D… Bron Gondwana
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Richard Clayton
- [Ietf-dkim] Re: Proposal key validity field vor D… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Hannah Stern
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] Re: Proposal key validity field vor D… Mauro De Gennaro
- [Ietf-dkim] Re: Proposal key validity field vor D… Timo Gerke
- [Ietf-dkim] JSON elements -- was: Proposal key va… Richard Clayton