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

Shumon Huque <shuque@gmail.com> Fri, 09 October 2020 01:32 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 9F2B73A118C for <dnsop@ietfa.amsl.com>; Thu, 8 Oct 2020 18:32:22 -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=ham 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 GupJTWKZvxZZ for <dnsop@ietfa.amsl.com>; Thu, 8 Oct 2020 18:32:21 -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 CC4DD3A07F9 for <dnsop@ietf.org>; Thu, 8 Oct 2020 18:32:20 -0700 (PDT)
Received: by mail-ej1-x629.google.com with SMTP id a3so10713939ejy.11 for <dnsop@ietf.org>; Thu, 08 Oct 2020 18:32:20 -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=Wa7+NOXb500ZWOUO2nql30tmdd66K3jPYIuAfGzV76k=; b=g1+zZOZc1VjjLP9MjbX4f3sduJNEW6KTRz+5vDIX0vvDj9y7Q8XNnC/Q9TepM3/gVJ Q2xI1aAFBd6Sh6C/uSnHResp3y2Cc9SlZtaNzNsIM1p6H1oz91v8QiRK1J6EIxhWxv8B U7DEG37UdOJmvAUOhoa+A7NDHnCMf9P5wP+Xvv/jyZYpp5zCdAeEuIPdxiAtnaD6T109 XFvw9/72FIQBQxdHmg1ixRqLVCxk58M/RyoCIYQGcTXpOm4ZKw4Hyx1I6P4LaaDRxrcZ lokbfrehW1gWkcbkJ7BcSmP17VlEFCGvXLUKxSHi44KX4wKi9J0xrtf50oe3andbk5zN WasA==
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=Wa7+NOXb500ZWOUO2nql30tmdd66K3jPYIuAfGzV76k=; b=tsStzbJzuiCF00eSh7JXD6DnZJjqU+cdq7kwtzFOpTV6ae1ATTvOjn7F7ULDyApntd LCTSJ+mEEPW98eMaJMrcmfIUjl/He7m6Gp0c23sbosjoXoxb2dsY3VZp57aWbS4V3Pch sUMukNTS1OoX6uMOysF5WE95LP3dwb+EKVE9YXC+hsRqMlGVxwDF4VnkQ5aSBc1mj9n5 aFv2gOJysnwHj/6l1iwahfFG82C2XDf+ZzhuKey25v7u/MrJWPO6N9LOsLxm6o8HisI6 wD8qZaV5c0U4r9w9YBOYAiViOJU4AN6M7Cj8jwHX4b5G/T2Sq7++QVwoVCzndobFyqkT QTvw==
X-Gm-Message-State: AOAM531+l0Uu1LlhJ1YfBrnr78VkCcunOIoXBozk7P/WbUSBi73hRyxs QE6tZKcDtG+C+ZjQ+SSRJ6Bx/YVABv/n7RX47CI=
X-Google-Smtp-Source: ABdhPJzphxFAp7FY3TXgEkNeDNAvV+rkpRSH6KplM7nmFvh/t1UP1oE4OYvwu5b/VHEgDZodsGqUV9HqnEyPpYkgBTg=
X-Received: by 2002:a17:907:1042:: with SMTP id oy2mr11333847ejb.64.1602207139102; Thu, 08 Oct 2020 18:32:19 -0700 (PDT)
MIME-Version: 1.0
References: <CAFz7pMveOPbJDrLu2d8idr0xChMSCzcg_Uh_RZjPuQ9a02YpNg@mail.gmail.com> <CAHPuVdX8S0-0a_0Daxn79zh=XD-q702YTXaK4YDpxRS_eTKhKQ@mail.gmail.com>
In-Reply-To: <CAHPuVdX8S0-0a_0Daxn79zh=XD-q702YTXaK4YDpxRS_eTKhKQ@mail.gmail.com>
From: Shumon Huque <shuque@gmail.com>
Date: Thu, 08 Oct 2020 21:32:07 -0400
Message-ID: <CAHPuVdVRN9M8XPt3Vi8c1jTU5qSo38nK4vhGRX-i+UA82-DJrw@mail.gmail.com>
To: Nick Johnson <nick=40ethereum.org@dmarc.ietf.org>
Cc: dnsop WG <dnsop@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000062041705b132ebeb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/asz4ZB6Vaxmg9cU2s-6cONthakM>
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:32:23 -0000

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