[DNSOP] Re: draft-fujiwara-dnsop-dns-upper-limit-values-05

Kazunori Fujiwara <fujiwara@wide.ad.jp> Fri, 27 February 2026 11:26 UTC

Return-Path: <fujiwara@wide.ad.jp>
X-Original-To: dnsop@mail2.ietf.org
Delivered-To: dnsop@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 91DB1BF837F5 for <dnsop@mail2.ietf.org>; Fri, 27 Feb 2026 03:26:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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, 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=wide.ad.jp
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 DEV8HLyRz8Kc for <dnsop@mail2.ietf.org>; Fri, 27 Feb 2026 03:26:55 -0800 (PST)
Received: from smtp1.wide.ad.jp (smtp1.wide.ad.jp [IPv6:2001:200:0:8803:203:178:142:158]) (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 0C6B0BF837B8 for <dnsop@ietf.org>; Fri, 27 Feb 2026 03:26:54 -0800 (PST)
Received: from localhost (softbank126088070246.bbtec.net [126.88.70.246]) (Authenticated sender: fujiwara) by smtp1.wide.ad.jp (Postfix) with ESMTPSA id E7F42A0833; Fri, 27 Feb 2026 20:26:45 +0900 (JST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wide.ad.jp; s=smtp1-202203; t=1772191606; bh=J/y7CmHNwdUxAXXrpHK1WWxMK4BPSLY+D2KQAMiFq3s=; h=Date:To:Cc:Subject:From:In-Reply-To:References:From; b=AmJEdKlCXBhQ5K7zGiedKhNO6pm9VK3g3QbXyIo686PGH5aisLH59jSNk9CfRL6BZ S/vpBuzJFVQK4+PyZ8mE52UgdLS6WL78JmiNHnWue4el8h47dCEWCa3FdetEAGciLM l4j8y5AVy6TTjnhEM5Ba6yN4V5IbhG8QdqG7nrTbSa66Gny+l81g9KJ6YJ3uwvStD9 EuoD8lMPvieNVOSX9SDB+a0KjPKFz5dQs7AeWwp4eUDmWW2hM98jysY4Vg7o+Kl6eu UW22ooomOaTD1iwUNtf+W5nGY92ddMOFumXMqCo4BKhcBCGjcip9sN+Ujk2mB9VwpC cLoZTTSn+V+pA==
Date: Fri, 27 Feb 2026 20:26:45 +0900
Message-Id: <20260227.202645.746230846386004500.fujiwara@wide.ad.jp>
To: muks@mukund.org
From: Kazunori Fujiwara <fujiwara@wide.ad.jp>
In-Reply-To: <aZkrhQm9kUfDk0gC@p5>
References: <20260210.162822.769915785065787587.fujiwara@wide.ad.jp> <aZkrhQm9kUfDk0gC@p5>
X-Mailer: Mew version 6.10 on Emacs 30.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID-Hash: XCTJV3ED2XDGQTAAUH2LJR7COFMHHE2N
X-Message-ID-Hash: XCTJV3ED2XDGQTAAUH2LJR7COFMHHE2N
X-MailFrom: fujiwara@wide.ad.jp
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-dnsop.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: dnsop@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [DNSOP] Re: draft-fujiwara-dnsop-dns-upper-limit-values-05
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/W4ia5bwhjLjxFDIoqo-mbVP-HGg>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Owner: <mailto:dnsop-owner@ietf.org>
List-Post: <mailto:dnsop@ietf.org>
List-Subscribe: <mailto:dnsop-join@ietf.org>
List-Unsubscribe: <mailto:dnsop-leave@ietf.org>

Hello, Mukund san,

Thank you. The verification speed of existing RSA depends on e being
small (65537), but there is no limit to using a large e.

I'll think about adding some text as well,
and I'd appreciate any additional text you can suggest.

Regards,

--
Kazunori Fujiwara

> From: Mukund Sivaraman <muks@mukund.org>
> Dear Fujiwara san,
> 
> On Tue, Feb 10, 2026 at 04:28:22PM +0900, Kazunori Fujiwara wrote:
>> Dear dnsop WG,
>> 
>> Authors submitted draft-fujiwara-dnsop-dns-upper-limit-values-05.
>> https://datatracker.ietf.org/doc/draft-fujiwara-dnsop-dns-upper-limit-values/
> 
> Would you also consider adding a limit on the size of the RSA public
> exponent "e" in the DNSSEC validation path? There is no low limit on the
> public exponent in PKCS #1 (it can be up to modulus - 1). While the RSA
> modulus itself is limited by DNS RFCs 3110 and 5702 to a max of 4096
> bits, there is no limit on the public exponent (it can be up to modulus
> - 1).
> 
> Having a small RSA public exponent is important for efficient RSA
> signature validation, otherwise validation performance can be
> significantly degraded. RFC 3110 recommends that it be small, but this
> doesn't prevent an attacker from using a high value.
> 
> FIPS 186-5 and NIST 800-56B specify 2^16 < e < 2^256, but there are
> several TLDs still using e=3, so the lower limit cannot be 65537. There
> should be a high limit.
> 
> Crypto libraries may limit the RSA public exponent. For example, current
> OpenSSL master HEAD limits it as below in the signature verify path:
> 
>     /* for large moduli, enforce exponent limit */
>     if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) {
>         if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) {
>             ERR_raise(ERR_LIB_RSA, RSA_R_BAD_E_VALUE);
>             return -1;
>         }
>     }
> 
> where OPENSSL_RSA_SMALL_MODULUS_BITS is 3072, and
> OPENSSL_RSA_MAX_PUBEXP_BITS is 64. However if the modulus size is 3072
> bits, the public exponent is unchecked and can be up to 3072 bits. Some
> crypto libraries may not limit "e" at all. This may not be an issue in
> some other applications, but performance of DNSSEC validation at
> resolvers can be severely affected if it is used unchecked.
> 
> So, it would be sensible to limit the RSA public exponent size at the
> application layer (DNSSEC validator).
> 
> BIND has limited it since at least 2012. Loop derived from BIND and also
> has had the limit (though the limits were changed in Loop last year as
> part of OpenSSL 3 rewrite of the crypto code). I am not familiar with
> other implementations.
> 
> A sample RSA keypair with a 3072-bit RSA public exponent is attached.
> It causes validation performance to drop by orders of magnitude if "e"
> is not checked in the DNSSEC validator linked against OpenSSL.
> 
> Sample times for verifying 4096 RRsets:
> 
> +---------------------------------+---------------+----------+
> | CPU (single core/thread)        | log_2(e)=3072 | e=65537  |
> +---------------------------------+---------------+----------+
> | Intel(R) Core(TM) Ultra 9 275HX | 31.275s       | 0.356s   |
> +---------------------------------+---------------+----------+
> | ARM Cortex-A76 (Raspberry Pi 5) | 311.289s      | 2.498s   |
> +---------------------------------+---------------+----------+
> 
> 		Mukund