Re: [DNSOP] Incremental zone hash - XHASH

George Michaelson <ggm@algebras.org> Fri, 20 July 2018 12:37 UTC

Return-Path: <ggm@algebras.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 081F1130E2F for <dnsop@ietfa.amsl.com>; Fri, 20 Jul 2018 05:37:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=algebras-org.20150623.gappssmtp.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 Vke0qBN9Hdj3 for <dnsop@ietfa.amsl.com>; Fri, 20 Jul 2018 05:37:25 -0700 (PDT)
Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 2F10112426A for <dnsop@ietf.org>; Fri, 20 Jul 2018 05:37:25 -0700 (PDT)
Received: by mail-wm0-x231.google.com with SMTP id s14-v6so9702309wmc.1 for <dnsop@ietf.org>; Fri, 20 Jul 2018 05:37:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=algebras-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kTO/Vx+IuTbEuYWOy9GNqBhCE7NxsoOIobzQyyXpHgw=; b=OhOb3wMl+NCucaBKSZZkLMtSSOQAK6gT/R59Yh+dtXaeldGQ3BTazWVImosORefZ8t sJHYLd3ehgfNt53nUppGa9CLtRUJUqEPcgk8/hWR8KJaUtUiL7XwRCTBC0ApeOta5zh3 qVG/oe8M8bhctsakHUnXJ97P4RhJGY7cfpLvHnvJD80yrfJ7L8vnvkVWO7ZwZ+wTAuuL Xzbrsbdm6nRLzDkJ+CTvOPAyAMfACHTOZfhdZ1pd42x86xsmTFp4JZQA8dzmBVSGPhKw Gfk0Ib+zbi5GybSe0luAuzdU4xGsVNLxkQZtpv/X9Z+7RT4YJBT1eQDO2v2J7R6kPWtG XzBw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kTO/Vx+IuTbEuYWOy9GNqBhCE7NxsoOIobzQyyXpHgw=; b=IvQfnf9gvYNY8PjLEJ/rZyQejvlvYEvjaKe4z4wYRaxXepBAUnCTqDaRm8Lpe3OVkq H7mWqvyPp9I52flhiOZofaTLVdAQ0zLebQmYOUimYXIstMj+4dAKgyIWUE7QX3aSuwsr xNJOqIVoaL5ug3p182bQzXTkBrwmX93twgOHVKl4/FeJnEKhs9mQwowGvqUYUTMM8GJA SOgHfbutIHQBG6Rz0RnIctKMnAEbHWz4LPJtA3LA3hBsua8ArYtOauCw3VCBvZjQ1Ceh nvYr6wLVoqkGJY1Cw8P2TLlGUdM3Mcvatt0Epbjh+Pp92aViVxy7dHIvf21ddh2UhNfr 4yJw==
X-Gm-Message-State: AOUpUlF+Li/yBLGWgxTJrTFWEnrVegRavJUmy/n5zP2lRtsqXUj0CDvx EcNEAzuhV5UOc1CxwluQp3fI2uglVdzCrGtwjKfwd2fr
X-Google-Smtp-Source: AAOMgpdN4wSIPc3z9R3+0br2NQTT0EvIpTnU46alV9XVc16fWWstPzUXzjzCkwbh/WKvwYjQRVI4wdVIGWoGYBH75Oc=
X-Received: by 2002:a1c:b6d6:: with SMTP id g205-v6mr1566748wmf.17.1532090243649; Fri, 20 Jul 2018 05:37:23 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a1c:12cb:0:0:0:0:0 with HTTP; Fri, 20 Jul 2018 05:37:23 -0700 (PDT)
X-Originating-IP: [2001:67c:1232:144:1fd:a40f:46a9:59f1]
In-Reply-To: <FA63BBB1-5AB1-4494-85A9-B43CB2A04F89@isc.org>
References: <FA63BBB1-5AB1-4494-85A9-B43CB2A04F89@isc.org>
From: George Michaelson <ggm@algebras.org>
Date: Fri, 20 Jul 2018 08:37:23 -0400
Message-ID: <CAKr6gn1axEztD06WoH0a+=WGjrzPNSiYWtk-qLzKY0BWprCVwA@mail.gmail.com>
To: Mark Andrews <marka@isc.org>
Cc: dnsop WG <dnsop@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/xVqAcpYXnmImGBEsXJhyhmodggg>
Subject: Re: [DNSOP] Incremental zone hash - XHASH
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.27
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, 20 Jul 2018 12:37:30 -0000

The intent (to me at least) is to be able to use exterior fetch, *not*
DNS, to source this as a file. curl. wget. ncftp. rsync.

the "thing" is a file object. It almost certainly is in near-canonical
sort order already. Its a stream of characters, probably in
bind-normal form.

If you can compute the path through the labels and the chain of NSEC
regions and the expected hadda-yadda-dadda.. you don't *need* a
digest.

If you have a digest, and its already in near canonical order, then
*cost* to compute "is the file exactly as the publisher wrote it" is
low. And, since its a signature under the ZSK, its not just "its as
the publisher said" its "the publisher knows the ZSK" which is strong
enough to say: "just load it"

So, I ask: is this incremental method applicable to this model?

Sure, works for giant zone. What about a root zone? Do I need this?

Also.. glue.

-G

On Fri, Jul 20, 2018 at 6:31 AM, Mark Andrews <marka@isc.org> wrote:
> Rather than having a full zone hash this can be done as a chain
> of hashes (XHASH).
>
> The XHASH would include all records at a signed name (where a signed
> name is NOT an NSEC3 name) up until the next signed name (where a
> signed name is NOT a NSEC3 name) in DNSSEC order similar to ZONEMD.
> If there is a NSEC3 record and its RRSIGs in this range it is included
> in the hash computation.  Where a NSEC3 record matches the name of a
> record that exists in the zone it is hashed with that name. The record
> type appears at both top and bottom of zone similar to NS.
>
> The chain is only deemed to be complete if there is a hash record at
> the zone apex. This allows for incremental construction and destruction
> of the XHASH chain similar to the way the presence of NSEC at the zone
> apex indicates that chain is complete.
>
> If there are records that are not at or under the zone apex they are included
> in the final XHASH of the zone sorting from the zone apex to the end of the
> namespace then from the start of the namespace to the zone apex. Such records
> at not normally visible to queries other than AXFR/IXFR.  AXFR/IXFR permit such
> records.
>
> XHASH would allow for UPDATE to incrementally adjust the chain without
> having to hash the entire zone at once.
>
> XHASH would allow for a slave server to verify a zone is still complete
> after a IXFR by just checking the areas of the zone impacted by the IXFR.
>
> e.g.
>
>         example.com SOA
>         example.com NS ns.example.com
>         example.com DNSKEY …
>         example.com NSEC a.example.com NS SOA RRSIG NSEC DNSKEY XHASH
>         example.com XHASH …
>
>         a.example.com NS ns.a.example.com
>         a.example.com NSEC b.example.com NS RRSIG NSEC XHASH
>         a.example.com XHASH …
>         ns.a.example.com A …
>
>         b.example.com NS ns.b.example.com
>         b.example.com NSEC ns.example.com NS RRSIG NSEC XHASH
>         b.example.com XHASH …
>         ns.b.example.com A …
>
>         ns.example.com A …
>         ns.example.com AAAA …
>         ns.example.com NSEC example.com A AAAA RRSIG NSEC XHASH
>         ns.example.com XHASH …
>
> Each of the groupings shows which records plus RRSIGs that are
> included in the XHASH calculation.
>
> To prevent removal/introduction of RRSIGs of XHASH records a DNSKEY
> flag bit is be needed to indicate which RRSIG(XHASH) should/should not
> be present once the chain is complete.  The same applies to RRSIG(ZONEMD).
>
> Verification of a AXFR would be slightly slower than with ZONEMD as there
> are more RRSIG records to be processed,
>
>
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742              INTERNET: marka@isc.org
>
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop