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

Nick Johnson <nick@ethereum.org> Fri, 09 October 2020 02:38 UTC

Return-Path: <nick@ethereum.org>
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 81DF73A12B1 for <dnsop@ietfa.amsl.com>; Thu, 8 Oct 2020 19:38:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, 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 (1024-bit key) header.d=ethereum.org
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 vOvbIDYm2Hfb for <dnsop@ietfa.amsl.com>; Thu, 8 Oct 2020 19:38:25 -0700 (PDT)
Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) (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 6439A3A0D95 for <dnsop@ietf.org>; Thu, 8 Oct 2020 19:38:25 -0700 (PDT)
Received: by mail-oi1-x22d.google.com with SMTP id w141so8715504oia.2 for <dnsop@ietf.org>; Thu, 08 Oct 2020 19:38:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ethereum.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uiTLdb/m9THgUiF9Kre3qgy4jFhfPChpe1TbgwEzQXA=; b=bey6bTuJpvfMRVBm6FzUIri/jKakTo0ujzKyKeed2cLy2htYIkhaTEVafDx0iHeAC7 ZrC298z1cxQaFZfqXNRS0TuBiKxVrpSVovys3kHdDRzwMRrGGDzF7UviqVGQJ+84AbQZ yJbLxEhown4/btdsdvsgVJcOhkVa62dE3/2IE=
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=uiTLdb/m9THgUiF9Kre3qgy4jFhfPChpe1TbgwEzQXA=; b=t4SY1crnyE14DxYz+F+JhS3GRhnbFUDCHlL/OeOsS5LK6hTw3e2rPl92aLFZCsPUO/ CBpI1k2O+WngcNUjAxuP7IL7sZzkQaCtl0Caw0BECSRg3dsVnGq1LFadC+hI3NkwEabI fBVeEfkeE6qHABJI4E42vpPm5d3eynTIE3iE+NEadK8AoMlLBP1fxC+o5zlcVawOCa/c +6Pcgc5RJyP0xZ6ucc8CfwjQzj/yXXiaJvB7b8EZ/+zqCWxJxey0Olb+bZoY3RYkfVt8 fAtrE7gBEow2U0nEglve+nlHiYcKOwSzfxBfOR090Q+VJ5jLxh3iWC753UyRB0XpcZuV ihwg==
X-Gm-Message-State: AOAM530wEjuZFM5Xh5UvoYw07WCf9P/arAeUGJ8C0Dxd6y01HEZeJ7ZO 6/lnLer9J6KtHdHqXWEf7L43OHkZlvTGygPQsql28A==
X-Google-Smtp-Source: ABdhPJxoWWmX8bbBoC7XdGt2Cgd1jFbuEG2aKMDKKkFo6i/cqS41Kbnw3KrbDuk9Dmht6yQOzRdw/QNpyXdeQSqFOG4=
X-Received: by 2002:aca:4007:: with SMTP id n7mr1063924oia.160.1602211104477; Thu, 08 Oct 2020 19:38:24 -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: Nick Johnson <nick@ethereum.org>
Date: Fri, 09 Oct 2020 15:38:13 +1300
Message-ID: <CAFz7pMvXehUWvq1kQxm+K2Njj6L9KrP0UgCWDLg2666PEwpzEw@mail.gmail.com>
To: Shumon Huque <shuque@gmail.com>
Cc: dnsop WG <dnsop@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bced0a05b133d71c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/c7cjZPDMkdWD5nYcRZ0JE4dZeag>
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 02:38:28 -0000

On Fri, Oct 9, 2020 at 1: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).
>
> 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'
>

Right; what I don't follow is why the second of those two proofs isn't
sufficient. Doesn't that alone prove that a.b.c.example doesn't exist?


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