Re: [DNSOP] What is the purpose of NSEC3 "closest encloser" proofs?

Shumon Huque <shuque@gmail.com> Fri, 09 October 2020 01:50 UTC

Return-Path: <shuque@gmail.com>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 39D1F3A1267 for <dnsop@ietfa.amsl.com>; Thu, 8 Oct 2020 18:50:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id erCsML3MjL3K for <dnsop@ietfa.amsl.com>; Thu, 8 Oct 2020 18:50:16 -0700 (PDT)
Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4FB793A125C for <dnsop@ietf.org>; Thu, 8 Oct 2020 18:50:16 -0700 (PDT)
Received: by mail-ej1-x629.google.com with SMTP id a3so10753985ejy.11 for <dnsop@ietf.org>; Thu, 08 Oct 2020 18:50:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aXa0dHZDkzKPAH3k2Axj/oHL9JvQ3O+g0K9GICBG//c=; b=i4TbUa7tHIa+SjfYQqUtwoePWQ3376AQK+MRON77SyZXm/Ql3p3w+rgUebjuAgWZhZ n2gB5cTRKU6DHYqlg7NbBm8NSdeNW2yB2xAY2xdchw0J7uKi1P5BBSN4UVjzYTMgbip0 aTSAvfIHiZE601fU99hR8XKGhNeCN/ga/bp6NPrqNwxj0D4gCxl7fRJTWi4AsXh3vtAh Gzh5qELWxpT5bT55gkGJlk5fOsjOnvU/ao6PXuznKa+KgkedOWkaL+X07UZbJxCgWia6 vd7NZx3eYrFBNB3i/JQ4wHFphOFDf1PwinI5TfKyeopIpHTgWxYTBtRniK5AaNYhX6T+ opkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aXa0dHZDkzKPAH3k2Axj/oHL9JvQ3O+g0K9GICBG//c=; b=WQScLWCffccbwNyB7dqF++7hliMokdCzBUNgVMjimjyWdIaQ6qFILMkmX0vpCZYBKw DGdzCWEtD3Qm3jFjfwqnTQmQ15GheAoVfwuirDixKGeZckNLNXQ2ulQI/CA2MxqOTw8M k0y6cHSqyLitvESBpRFf/u+2ESEgbJrVIwr5di+y1So+t+zLlPC0FtQ2THHDQxB65CYc WpagQ+2zEXURUmE57ejscItnwdd8rFBjcqB10qmTyt6TDcKsW2FR5nSLfNEUKDiYBp3R YyuHKUnWlySSabYlBthVAEEJvCYFf4Ip+tazl86L4Rz9a3hXK2ZQsDD3DKemlTTfv+fp +HiQ==
X-Gm-Message-State: AOAM532mI/IpBsTnqtRuEp1tYMATWGIJink4019H1rgdVVAxZL1A8jnl JWwNkW4j64MaAdnlp5StU9KrH5mzIAOo3LyIvEh75rvI
X-Google-Smtp-Source: ABdhPJxBmCDC58nY2FPeuB124KEYGEXcQL5N6Ts5vQIY7HOY9EiCbT+8Lpe+Eu3Tu4kjQMf2ULGZPKFd/PUcCFo3FWg=
X-Received: by 2002:a17:907:1042:: with SMTP id oy2mr11391061ejb.64.1602208214723; Thu, 08 Oct 2020 18:50:14 -0700 (PDT)
MIME-Version: 1.0
References: <CAFz7pMveOPbJDrLu2d8idr0xChMSCzcg_Uh_RZjPuQ9a02YpNg@mail.gmail.com> <CAHPuVdX8S0-0a_0Daxn79zh=XD-q702YTXaK4YDpxRS_eTKhKQ@mail.gmail.com> <CAHPuVdVRN9M8XPt3Vi8c1jTU5qSo38nK4vhGRX-i+UA82-DJrw@mail.gmail.com> <0B675494-0680-45C7-B30B-442B0011E16D@isc.org>
In-Reply-To: <0B675494-0680-45C7-B30B-442B0011E16D@isc.org>
From: Shumon Huque <shuque@gmail.com>
Date: Thu, 08 Oct 2020 21:50:03 -0400
Message-ID: <CAHPuVdUBmvZYPhhT=K8aFhZUMQLC9xA8eJ2YRsXnXQJNWaL6iA@mail.gmail.com>
To: Mark Andrews <marka@isc.org>
Cc: Nick Johnson <nick=40ethereum.org@dmarc.ietf.org>, dnsop WG <dnsop@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000007eaeaf05b1332bc9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/gcLGoxN0jzyXQpSEba5--j8Ljnk>
Subject: Re: [DNSOP] What is the purpose of NSEC3 "closest encloser" proofs?
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Oct 2020 01:50:20 -0000

Indeed Mark!

I should have thought about the general case, and not the specific example
in my mail. Thanks for correcting me! :)

Shumon.

On Thu, Oct 8, 2020 at 9:43 PM Mark Andrews <marka@isc.org> wrote:

> Shumon, you where correct the first time.  A closest encloser can be a ENT
>
> a.b.c.d.example A ...
> a.e.x A ...
>
> with QNAME a.c.c.d.example the closest encloser is the ENT c.d.example.
>
> > On 9 Oct 2020, at 12:32, Shumon Huque <shuque@gmail.com> wrote:
> >
> > On Thu, Oct 8, 2020 at 8:59 PM Shumon Huque <shuque@gmail.com> wrote:
> > On Thu, Oct 8, 2020 at 7:46 PM Nick Johnson <nick=
> 40ethereum.org@dmarc.ietf.org> wrote:
> > I'm reading RFC 5155, and I'm a bit puzzled by the requirement for
> "closest encloser" proofs to prove nonexistence of a domain. Given that the
> RFC requires generating NSEC3 records on empty non-terminals, isn't it
> sufficient to examine a single NSEC3 record to prove nonexistence?
> >
> > For example, if I want to prove the nonexistence of a.b.c.example, isn't
> it sufficient to validate an NSEC3 record that covers that name and is one
> level higher (eg, somehash.b.c.example)? Why do I need to prove the
> closest-encloser with a second NSEC3 record?
> >
> > -Nick Johnson
> >
> > The closest encloser proof actually *is* what proves that the name
> doesn't exist. But the other reason is that for NXDOMAIN proofs, you also
> need to prove that the name could not have been synthesized by a wildcard.
> The hypothetical wildcard that might have synthesized a response for the
> name is constructed by prepending the asterisk label to the closest
> encloser.
> >
> > Let's use your example and say 'a.b.c.example' doesn't exist in the zone
> example.
> >
> > Let's also say the longest ancestor of this name that actually does
> exist in the zone is 'c.example' (which could be an empty non-terminal or
> not -- either way, it will have an NSEC3 record matching the hash of the
> name).
> >
> > One small correction to my sentence above: strike the phrase about empty
> non-terminals - the closest encloser can't be an ENT of course (otherwise
> it wouldn't exist either!).
> >
> > Shumon.
> >
> > The NXDOMAIN proof consists of:
> >
> > ### Closest Encloser proof:
> > * the NSEC3 RR that matches the closest encloser name 'c.example'
> > * the NSEC3 RR that covers the next closer name 'b.c.example'
> >
> > This proves that b.c.example does not exist. This automatically means
> that all names under it, including a.b.c.example, do not exist.
> >
> > ### Wildcard non existence proof:
> > * the NSEC3 RR that covers the wildcard at the closest encloser, namely
> '*.c.example'.
> >
> > Shumon Huque
> >
> > _______________________________________________
> > DNSOP mailing list
> > DNSOP@ietf.org
> > https://www.ietf.org/mailman/listinfo/dnsop
>
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742              INTERNET: marka@isc.org
>
>