Re: [DNSOP] Incremental zone hash - XHASH

Ondřej Surý <ondrej@isc.org> Thu, 26 July 2018 03:20 UTC

Return-Path: <ondrej@isc.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 6A8BC130F97 for <dnsop@ietfa.amsl.com>; Wed, 25 Jul 2018 20:20:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.921
X-Spam-Level:
X-Spam-Status: No, score=-5.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
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 zDi6Va6-WQPR for <dnsop@ietfa.amsl.com>; Wed, 25 Jul 2018 20:20:17 -0700 (PDT)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6B7C3130F46 for <dnsop@ietf.org>; Wed, 25 Jul 2018 20:20:17 -0700 (PDT)
Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 7CEB03AB040; Thu, 26 Jul 2018 03:20:16 +0000 (UTC)
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 40F77160047; Thu, 26 Jul 2018 03:20:16 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 248C5160053; Thu, 26 Jul 2018 03:20:16 +0000 (UTC)
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id p3JockpdwCTB; Thu, 26 Jul 2018 03:20:16 +0000 (UTC)
Received: from [10.10.0.181] (40.20.broadband5.iol.cz [88.100.20.40]) by zmx1.isc.org (Postfix) with ESMTPSA id 0D481160047; Thu, 26 Jul 2018 03:20:14 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.17\))
From: Ondřej Surý <ondrej@isc.org>
In-Reply-To: <8D74445E-9D51-4665-8448-19B1C3F47A2B@verisign.com>
Date: Thu, 26 Jul 2018 05:20:11 +0200
Cc: Mark Andrews <marka@isc.org>, dnsop WG <dnsop@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <86A0B8DE-75D6-4BD4-A84B-F9CA55EADDF6@isc.org>
References: <FA63BBB1-5AB1-4494-85A9-B43CB2A04F89@isc.org> <8D74445E-9D51-4665-8448-19B1C3F47A2B@verisign.com>
To: "Wessels, Duane" <dwessels=40verisign.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3445.100.17)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/sO8UihuyQUd-n7A5ohnIHANDHm8>
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: Thu, 26 Jul 2018 03:20:19 -0000

Duane,

> My first reaction is that it adds a lot of additional records to the zone.  If I understand correctly, one XHASH for every NSEC/NSEC3, plus an RRSIG for each XHASH.  You didn't really say how (or if) XHASH could be used on an unsigned zone.

What if the ZONEMD+RRSIG would be hash of the XHASH records?  That way the XHASH records could stay unsigned.

> My second reaction is that it is (necessarily) more complex than what we proposed with ZONEMD.


It might seems there is an additional complexity from the protocol description, but I don’t think it there’s much difference on the implementation level.  You need to sort and walk the zone for ZONEMD in the same manner as you would for XHASH.  It only differs in an record(s) where you dump and reset the computed hash.

Ondrej
--
Ondřej Surý
ondrej@isc.org

> On 21 Jul 2018, at 01:38, Wessels, Duane <dwessels=40verisign.com@dmarc.ietf.org> wrote:
> 
> Mark,
> 
> Thanks for the email.
> 
> My first reaction is that it adds a lot of additional records to the zone.  If I understand correctly, one XHASH for every NSEC/NSEC3, plus an RRSIG for each XHASH.  You didn't really say how (or if) XHASH could be used on an unsigned zone.
> 
> My second reaction is that it is (necessarily) more complex than what we proposed with ZONEMD.  It seems like it probably works, but I haven't really spent time thinking about it in depth.
> 
> The use case that my coauthors and I are trying to address with ZONEMD is to verify authenticity for relatively stable zones being distributed to servers other than the ones in the NS RRset.  For this XHASH feels like too much.  Too much data and too much complexity.  I'm not sure if you're proposing XHASH as an alternative to, or in addition to, ZONEMD.
> 
> If the latter then I'd say get input from operators of dynamic zones and see if they think the tradeoff of extra data and complexity is of net benefit to them.
> 
> DW
> 
> 
> 
>> On Jul 20, 2018, at 3: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
> 
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop