Re: [MLS] Remove without double-join (in TreeKEM)

Raphael Robert <raphael@wire.com> Mon, 06 August 2018 19:08 UTC

Return-Path: <raphael@wire.com>
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 45965130F1B for <mls@ietfa.amsl.com>; Mon, 6 Aug 2018 12:08:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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, T_SPF_PERMERROR=0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=wire-com.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 Yf3ROOMflwA1 for <mls@ietfa.amsl.com>; Mon, 6 Aug 2018 12:08:39 -0700 (PDT)
Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 C03EF130F0E for <mls@ietf.org>; Mon, 6 Aug 2018 12:08:38 -0700 (PDT)
Received: by mail-wm0-x22d.google.com with SMTP id s9-v6so14881850wmh.3 for <mls@ietf.org>; Mon, 06 Aug 2018 12:08:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wire-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=ryteb+cxcOlzYG3s59k48kL+rZvqubVDWWN0aRmKH4o=; b=R5/7oI20tnDssWOyhWf2LcWoo6cuFECUn4FiNXCzy737vp+nzOMgAW272FyZNBFYRM WCW6idHi3/ytXSFlIvOnujFDl6kP/XuhPMDcnRUm9KY5+AuiIPxZurZE/pnYqrBqkoUU s2YwGwboLhdRhqXk2/iVRd7OU150CjXivV5h1+gt/bUDqH1ArWhcGGGKDtcrvFjQbO6r Q6/rkpwBHXghKh053pOS20BoI/rqMZX7jwgxENf4U/Y/dj/8nTofbMDmQLIuueWu3SkF mUY4dblXaxN0kEj3tlA8I4SEIayo2PVfMnKJylUj0h7veTtr6iBORyhbse7xApcAROu1 n20Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=ryteb+cxcOlzYG3s59k48kL+rZvqubVDWWN0aRmKH4o=; b=mAS2FdFhbPn4KajASz9jQADF+kEm6z32jBrMDcO3WgF90JD7mq3Ap9M6PvFIVaOZBw 4Srjj98sDF1jmZlMqDg2hHXdk4ySA7vhtaHk6ie5TQsZ4MzogcCrIZFXVSiSB52NvHnz AQ/H+ZxYhIXiOvFAaLb94urtkWvut+l6hkSdi1l2RphzdCxaU3Mk5yXKJ7yXLLNwOaeL sGZVRcmjeqvHielRLb70I/yRYfLgJe4EXFWMusn3LggX3/ih78LOHHnIBBJLgKZjIQUf PvHJnVEEPcXwUrt8gwyWO2gB1KHx0fnFv4YNb0ubk1e3OMjPESfNIxMSaxAbstV+K4En HReg==
X-Gm-Message-State: AOUpUlGblZpp3OLtACO/b69dW3Da0c+8FKZOGAzy0gRFaOiQKeuDSQwg njXbqZ/maPTkZg+4K1UzLWAAkIgj0fw/mQ==
X-Google-Smtp-Source: AAOMgpe2YPgv0sO+A/B7BNTrYVezUxfLO4XNhUEergo605sHn3mmfhgxUmvs5J/MqDSNj4xixOzZgg==
X-Received: by 2002:a1c:6c03:: with SMTP id h3-v6mr11950074wmc.38.1533582516767; Mon, 06 Aug 2018 12:08:36 -0700 (PDT)
Received: from rmbp.fritz.box (HSI-KBW-095-208-247-123.hsi5.kabel-badenwuerttemberg.de. [95.208.247.123]) by smtp.gmail.com with ESMTPSA id g10-v6sm11474924wrv.90.2018.08.06.12.08.35 for <mls@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 12:08:35 -0700 (PDT)
From: Raphael Robert <raphael@wire.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_3455ED7E-C662-4831-872D-436361F76E10"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Mon, 06 Aug 2018 21:08:36 +0200
References: <CAL02cgSAC2b9ws3ftZe-+QWX_3iLmK36Gc6mu1tZs8Z4e+ej+A@mail.gmail.com>
To: mls@ietf.org
In-Reply-To: <CAL02cgSAC2b9ws3ftZe-+QWX_3iLmK36Gc6mu1tZs8Z4e+ej+A@mail.gmail.com>
Message-Id: <1566E5D8-29A0-4CE7-A256-2445686F30E5@wire.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/y5SYWKG-W_ZSe3Ibh_ke1pH5_-E>
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: Mon, 06 Aug 2018 19:08:41 -0000

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