Re: [MLS] Remove without double-join (in TreeKEM)
Richard Barnes <rlb@ipv.sx> Tue, 07 August 2018 14:12 UTC
Return-Path: <rlb@ipv.sx>
X-Original-To: mls@ietfa.amsl.com
Delivered-To: mls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7BADF130FED for <mls@ietfa.amsl.com>; Tue, 7 Aug 2018 07:12:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=ipv-sx.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 L--IrHjkODMr for <mls@ietfa.amsl.com>; Tue, 7 Aug 2018 07:12:49 -0700 (PDT)
Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com [IPv6:2607:f8b0:4003:c06::229]) (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 CD334130EC2 for <mls@ietf.org>; Tue, 7 Aug 2018 07:12:49 -0700 (PDT)
Received: by mail-oi0-x229.google.com with SMTP id s198-v6so28610349oih.11 for <mls@ietf.org>; Tue, 07 Aug 2018 07:12:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipv-sx.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IJ/HWgAKG9wNoXOqg1vu4DmNdi+NMb04raDVlh49xvA=; b=X2IPVRVwap8U6NFHL6Ssvemyj16WPe99Eqr5WT305qH80syUWiZfrWOdxkmDVfPWzy 0KvQKg9tbqopwlTCsqgZVxzdtK3rH7qvtUgxVK+nwBDwdX/86dhd86xCU13+pjP6vrtB lAgjPnQ7gCWwvxNpSzTOTX8emQN6hB+uiUuS8DKHmGkhioQc+QhwYUFsAAbG9CADOS0J vUCtSep89jk3w8oKMUxxHEGCJ58tGFF2F5dkMaORSOvm6mpCan6AfnYFt4r7WgOgmKPU l9jKGqovi0ofqdpoDk3mVRfZy1x0oRIAtkS9Mm33amMksi12Y5rqX7Hm9+hD6NyRgduF 58PA==
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=IJ/HWgAKG9wNoXOqg1vu4DmNdi+NMb04raDVlh49xvA=; b=Wk2Lf0A1pdw8xdvDUc9J8JpXjEJbg4Mfvaqm8aS3mGPu4argSdGWaB9qaQJ6TE8MI7 iUek1yQ8P9GpPGZ7bLkCi52z/I1fQseZDP1J48kyQwk/CAGvq1ft7EMM5DrA4Vcn4/6I /BlHn3UzPWwSbrj68AJtZkSIIN7GocBx5JJXfzL5mNiwzPXGyzsHCq/uzGv3rD7y2sfs uFGWIs3qEiKxIREOPhPbIsOcd46A1KpXWrUwFtIdZ1rOatRnx9rCMZE7LCclJQDMNA/b 6ZoFjX36kJBncp6eLnk1canLdilpxceL/28guHmR9vP6s2+uXY8lp4fbUS3it9R2q+4s Zxug==
X-Gm-Message-State: AOUpUlFO7gL7YwX6LBZYJxm0y18w03NG3Bvs6b51aKXrtdlbPLhgfl25 RjrtZF1e9vAUoVGoXFav/Gf8AtIBDac7rKuF+zo3KQ==
X-Google-Smtp-Source: AAOMgpeMSQ4PDh7KxELIMx0FuVG0pztg2aaR611YqcUsNZJJmCJyGFG+C6kbrg5bFuFYwihbf0eVeq7im8F6VePhZUc=
X-Received: by 2002:aca:f383:: with SMTP id r125-v6mr18343889oih.6.1533651168916; Tue, 07 Aug 2018 07:12:48 -0700 (PDT)
MIME-Version: 1.0
References: <CAL02cgSAC2b9ws3ftZe-+QWX_3iLmK36Gc6mu1tZs8Z4e+ej+A@mail.gmail.com> <1566E5D8-29A0-4CE7-A256-2445686F30E5@wire.com>
In-Reply-To: <1566E5D8-29A0-4CE7-A256-2445686F30E5@wire.com>
From: Richard Barnes <rlb@ipv.sx>
Date: Tue, 07 Aug 2018 10:12:36 -0400
Message-ID: <CAL02cgQNguTBY2C8gS5CMXiZb7UzzqLeaiR5LiBqV=J0do3M7w@mail.gmail.com>
To: Raphael Robert <raphael@wire.com>
Cc: mls@ietf.org
Content-Type: multipart/alternative; boundary="000000000000220dff0572d8fdf1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/TwVS0Z4imWTafuHBtrAHSYsyyws>
Subject: Re: [MLS] Remove without double-join (in TreeKEM)
X-BeenThere: mls@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Messaging Layer Security <mls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mls>, <mailto:mls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mls/>
List-Post: <mailto:mls@ietf.org>
List-Help: <mailto:mls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mls>, <mailto:mls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Aug 2018 14:12:52 -0000
So just to prove out the power of this approach, I added an "autocompact" button to the TreeKEM JS demo: https://ipv.sx/treekem/ If you visit that link, you can build a group by clicking UserAdd or GroupAdd a few times, then do some Remove and Move operations. Then click the full moon to turn on autocompact (no good emoji for this semantic) and do a couple more removals -- notice that the tree automatically moves members into vacant slots, and reduces the tree to the minimum size needed. Obviously, to do this in a distributed group would require a lot of orchestration. But it's nice to see that it's allowed by the crypto. Also on that page, there's a "chaos" button that will push random buttons until you tell it to stop, if you just need some entertainment. Found a couple of bugs that way! --Richard On Mon, Aug 6, 2018 at 3:08 PM Raphael Robert <raphael@wire.com> wrote: > I think this is an interesting thought! In practice — when groups are > somewhat dynamic — the blanks in the tree would be filled pretty quickly > with new members. The only edge case I can think of right now would be when > a group starts with a large amount of members, and it size decreases over > time. But that scenario is generally a problematic one regarding efficiency. > > Raphael > > On 6 Aug 2018, at 15:00, Richard Barnes <rlb@ipv.sx> wrote: > > Hey all, > > On Friday, I got to thinking about how to do the Remove operation with > TreeKEM, and I think I've got a way to do it that avoids double-join > problems while still being pretty elegant. > > - When a member is removed from the group, remaining members update their > local caches of the tree so that any nodes in the direct path of the > removed leaf are set to blank > - This means that for future group operations, some of the nodes you would > encrypt to might not be blank > - Extend the "encrypt to subgroup" function so that if the node at the > head of the subgroup is blank (i.e., the subgroup is not full), then you > work down the tree and encrypt to all the subtree heads. > > In the short run, this fragments the tree. In the worst case, if you > delete every other member, you end up with linear updates. This is > mitigated by a few nice features, though: > > 1. The tree "heals" as members update: Because an Update contains a direct > path that overwrites any blanked-out nodes, from the perspective of the > rest of the tree, subtrees with heads along that path are now whole from > the perspective of nodes outside those subtrees. A healed tree will still > be "stringy". > > 2. New members can be added into the blank leaves just by sending an > Update (just like UserAdd / GroupAdd, but without growing the size of the > tree). Existing members can relocate to a blank slot in the same way. > > With a bit more cleverness, it might be possible to shrink a tree back > down to its minimal size after adding a bunch of members and removing them > all. > > I've implemented a first pass at this approach in my JS demo stack at < > https://ipv.sx/treekem/>. You can delete nodes after adding them, and > updates still work. Adds appear to be broken for the moment, but I think > that's surmountable. > > --- > > Now, it's still possible to do Remove by the sender of the Remove doing an > Update for the removed, using a leaf secret the removed node doesn't know. > That leaves the tree intact, at the cost of having the sender double-joined > in the removed slot as well as his original slot. (Effectively, it's a > take-over operation.) > > So we have now two choices for trade-offs around Remove: > > 1. Leave some parts of the tree empty and track subtree heads; no double > join > 2. Keep the tree full and only have normal copath logic; but accept double > join > > Personally, I find the logic of double-join bookkeeping more intimidating > than the logic to keep track of the tree.. But I would be interested in > what other folks think of these trade-offs. > > It might also be interesting to think of whether ART could be extended to > do remove-without-double-join in something like the above way. It wasn't > immediately obvious to me, but I didn't try very hard. > > --Richard > _______________________________________________ > MLS mailing list > MLS@ietf.org > https://www.ietf.org/mailman/listinfo/mls > > > _______________________________________________ > MLS mailing list > MLS@ietf.org > https://www.ietf.org/mailman/listinfo/mls >
- [MLS] Remove without double-join (in TreeKEM) Richard Barnes
- Re: [MLS] Remove without double-join (in TreeKEM) Raphael Robert
- Re: [MLS] Remove without double-join (in TreeKEM) Richard Barnes