Re: [Din] I-D: The R5N Distributed Hash Table

"Schanzenbach, Martin" <mschanzenbach@posteo.de> Wed, 31 August 2022 11:00 UTC

Return-Path: <mschanzenbach@posteo.de>
X-Original-To: din@ietfa.amsl.com
Delivered-To: din@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 64E45C14F748 for <din@ietfa.amsl.com>; Wed, 31 Aug 2022 04:00:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 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, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=posteo.de
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4WLqxttPM9UP for <din@ietfa.amsl.com>; Wed, 31 Aug 2022 04:00:35 -0700 (PDT)
Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA6ECC14F737 for <din@irtf.org>; Wed, 31 Aug 2022 04:00:33 -0700 (PDT)
Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9E089240028 for <din@irtf.org>; Wed, 31 Aug 2022 13:00:30 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1661943630; bh=jXyU23icWQiGjuvFMiI8LXA5OjoJNgn99fu/VS3tPQw=; h=Subject:From:Date:Cc:To:From; b=U7rEZI3s5TXW19lJOieN/JctInhBGIPDG/4Ks/4MB0y+wiHU23GDFYTDxWtB6oFCo sapfd1nRfak3wifUz4O2Tfnb8N+/j9w4v7XT+X50Ngqh+/dgZ4GzOg7dsaYzwdsNfQ lb9+LFted7Nf8BEshf2318HJjIzdmVz72zwfmPW8EUzKyxwoWOF1eZ4L4vfFZdJ4IJ vpNKtVh5+FVFnqkaKu0n62DDWczdN4vt288x19hK+7fcFAFWSMgJk8X7crrO4YBeAM 6pITCmbjHr1RVIiGCcDZqOfmDg1E9ntZK6U5Dtt1vNGX3vgMmZf+abs2VGiqxpTvKd SZdvQm9zKhfeQ==
Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MHh6N5QH3z6tmJ; Wed, 31 Aug 2022 13:00:28 +0200 (CEST)
Content-Type: multipart/signed; boundary="Apple-Mail=_27F23C04-A3D4-4247-A445-5468681E4098"; protocol="application/pgp-signature"; micalg="pgp-sha256"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
From: "Schanzenbach, Martin" <mschanzenbach@posteo.de>
In-Reply-To: <25a166db-b191-f73e-9e3d-3bf67f8346ee@huitema.net>
Date: Wed, 31 Aug 2022 11:00:23 +0000
Cc: din@irtf.org
Message-Id: <B9D1D493-64A5-4249-B64E-0AE988A33204@posteo.de>
References: <FEA8D5F6-AB8F-47F8-B511-7587CCD5F0EB@posteo.de> <25a166db-b191-f73e-9e3d-3bf67f8346ee@huitema.net>
To: Christian Huitema <huitema@huitema.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/din/jHhdb7w4mbznjzKuY9QYe7fcT38>
Subject: Re: [Din] I-D: The R5N Distributed Hash Table
X-BeenThere: din@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Discussion of distributed Internet Infrastructure approaches, aspects such as Service Federation, and underlying technologies" <din.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/din>, <mailto:din-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/din/>
List-Post: <mailto:din@irtf.org>
List-Help: <mailto:din-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/din>, <mailto:din-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Aug 2022 11:00:39 -0000

Hi Christian,

thanks for checking the draft out.

> On 29. Aug 2022, at 19:18, Christian Huitema <huitema@huitema.net> wrote:
> 
> 
> On 8/29/2022 5:18 AM, Schanzenbach, Martin wrote:
>> Hi dinrg!
>> 
>> I hope this email finds you all in good health.
>> 
>> Wwe wanted to touch ground with you if any of you would be interested in our specification
>> on R5N, a protocol for randomised recursive routing for restricted-route networks. [1]
>> It is a distributed hash table protocol and we currently have two independent implementations.
>> The document is not finished but in a parseable state and feedback is very welcome either way.
>> 
>> This DHT can serve as a basis for GNS, for which there is a draft already quite far into the ISE process [2].
>> In fact, it is what our GNS implementations are using at the moment.
>> 
>> Thank you and have a nice day
>> Martin
>> 
>> [1] https://datatracker.ietf.org/doc/draft-schanzen-r5n/
>> [2] https://datatracker.ietf.org/doc/draft-schanzen-gns/
> 
> The R5N protocol is built on the classic DHT, kamdelia. Starting with a well known algorithm makes a lot of sense, but  I wonder whether some more work is needed regarding locality and security.
> 
> The connectedness of the DHT relies on each node learning about its closest neighbors, where closest means lowest distance between the peer ID, not lowest distance across the network. As the reach of the DHT increases, the network distance between the closest neighbors increases -- the "closest" neighbors will be at random locations across the Internet. Each node will generate network traffic required to maintain the closest list, and the aggregate may end up quite noticeable.
> 

Do you know of any actual data on that? I know this seems to be true intuitively, but the actual impact would be of interest for a discussion.

> The dependency on closest neighbors may also be a security issue. Each node depends on the good behavior of its closest neighbors. Attackers may single out a set of target peer ID, and spend some time generating peer IDs that have a close distance to this target. Once the attackers have secured a position in the list of closest neighbors of their target, they can mount a set of attacks, such as monitoring traffic to the target or denying service to the target.

Yes that is true. But it is partially addressed by the random routing. And the monitoring issue is extremely difficult if not impossible to address at all if you want global routing over public networks.

> 
> The monitoring problem goes beyond just the list of closest neighbors. If attackers create a sufficient number of nodes, they will be able to monitor and possibly disturb a fraction of the traffic. The random routing steps in R5S ensure that resolution starts from random points in the network, which has both good and bad effects. On the good side, it means that repeated queries will follow different paths, which is more robust than always following a fixed path. On the other hand, the randomness almost ensures that a fraction of the queries will hit the attackers' nodes.

Yes, that is correct. We should discuss that in the document. The attacker model needs to be defined and discussed properly anyway.

> 
> Such issues are inherent with the classic DHT technology, but they may be solved in alternative technologies, as demonstrated by Freenet. Of course, this is your project, your choices. But it would be very nice to have some higher emphasis on locality, so that for example resolution of local names does not generate traffic outside the local network -- that would be better for privacy, and also more robust.

I do not understand how either that would work or why you think this is not the case for r5n.
Local nodes (direct neighbours) cache messages (and possibly even store if the replication level is high enough). So ideally this data is available at close nodes, not only on nodes close to the key.
I am not really sure what you are proposing as an alternative. Keys cannot at the same time be stored locally and at the same time be efficiently available to peers outside of it. IMO we can have efficient global routing with O(log n) complexity or local-first routing with significantly more overhead for global routing.
If you have any concrete ideas or papers that we could read in this regard that would be very helpful.

Thanks again and BR
Martin

> 
> -- Christian Huitema
> 
> 
>