[MLS] Cost of the partial-tree approach

Richard Barnes <rlb@ipv.sx> Mon, 01 October 2018 16:17 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 DF2B0130E05 for <mls@ietfa.amsl.com>; Mon, 1 Oct 2018 09:17:51 -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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 EHwRY9wfIobK for <mls@ietfa.amsl.com>; Mon, 1 Oct 2018 09:17:50 -0700 (PDT)
Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (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 EFEC3130DFE for <mls@ietf.org>; Mon, 1 Oct 2018 09:17:49 -0700 (PDT)
Received: by mail-oi1-x22e.google.com with SMTP id k64-v6so11651526oia.13 for <mls@ietf.org>; Mon, 01 Oct 2018 09:17:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipv-sx.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=kK1OjND5bbm0q4VVANVJg5GJCtH9jw2hcDf5lKvyUwo=; b=Cn1rsbdwYonlmvfMxFL36EXuoCOdx1DiahlUv+6U2GuD6BBP64vwOI8TPcwn5QduSE Pb6k1vJIjWdTj8D4GB90McxpgSb7yM5a52jeAo+LWZzrsf4TPk8q/6tpYgpHp30+AeSX kla4R0uLktElieV38MzW/OSg1QRl0ZIFPAj0FogFgrd5YojQTcwXSaXd0XoH6OpdIiLh VSGeJs7yC5u5Cmu2lO3C5cACHsMK9Hs1OHblTCs2sSUG267o3t0410+txGPw/BkrlUhG p04VohehJKxwwgedaqjgtgy1lmD6Lnk+zbDs0g7w90tb6PAUuHW7KzAS+xeA3hn/C2X2 Gj2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kK1OjND5bbm0q4VVANVJg5GJCtH9jw2hcDf5lKvyUwo=; b=FEAW2033Uwu1iCqnzRcZUjZwmMm8ZzaqFBXLqbJzB3k2ipUWTCT8WKEdeEvm/JdeRK dkgASaNURIVtcgY4wboDqT0yBNoWjop+6IFgcIptKoDel4nt+jge5V9ws4Gasm/Ffhlh siR+16Vn0PNkI8BGPxSrXSx/s9vwRq7KHb1gumB3k2EqC376lJ8b1YJ+R8Era5N/ti1L npGhSdtY3/WqsCN8CCD9XHS/IuPs3pLe0MsAdMT3I42U/XYDnkBlP+PCFl4iFmdfJF7M oI8zq/nBpL8ycCOZUXDMpkVKWxWMUtkuFVDgvVAx7mJjaDEZWT5sxDDgKC7Z0KW3x3+H 17jw==
X-Gm-Message-State: ABuFfoj1IlXiitAzYU61zJPwy9nzyD47pHuyaQOf9s7yj059d889MEEJ gZrDJhCmG5GwPCErBHjPIZOD+6oIb6WILlAzfg0puZUrQ7j7LQ==
X-Google-Smtp-Source: ACcGV61E7xdn5whyRJfnZnfk4+hZ8XemQgBWp+Nf3fYIU7Xf/5fVLtoCoWQwXP+kcMTWM0R808KfjjKxMEHPGZfmDgA=
X-Received: by 2002:aca:5a45:: with SMTP id o66-v6mr5728276oib.155.1538410668830; Mon, 01 Oct 2018 09:17:48 -0700 (PDT)
MIME-Version: 1.0
From: Richard Barnes <rlb@ipv.sx>
Date: Mon, 01 Oct 2018 18:17:31 +0200
Message-ID: <CAL02cgSJdxgNTvyfvGLnsqLkBWChnds9TM8Ua_S6Z2MwN_QiDw@mail.gmail.com>
To: mls@ietf.org
Content-Type: multipart/alternative; boundary="0000000000006f474405772d25ee"
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/hhl0q-OgnGUJS1djdmH1JBMqOSY>
Subject: [MLS] Cost of the partial-tree approach
X-BeenThere: mls@ietf.org
X-Mailman-Version: 2.1.29
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, 01 Oct 2018 16:17:52 -0000

Hey all,

There was some debate at the interim about the performance implications of
the "partial-tree" approach to adds and removes [0] (derived from the
"remove-without-double-join" approach described on the mailing list [1]).
In particular, EKR expressed concern that this approach would cause message
size to degrade from log to linear.  To test this out, on the plane home I
wrote a simulator that performs random group operations and compares two
approaches:

1. The "full-tree" approach, which has optimal efficiency but also has
double-joins
2. The "partial-tree" approach, which has no double-joins but sub-optimal
efficiency

I've made a little visualizer here:

https://ipv.sx/treekem/blanking/

The tl;dr is that the partial-tree approach is only very bad if you have a
very sparse tree, in particular, if you follow the "Init w/o 2J" approach
of [0].  In all other cases, as long as updates happen sufficiently
frequently, the two approaches are within a small constant factor of one
another.  The intuition here is that adds / removes degrade the tree (since
they add blank nodes) while updates heal the tree (since they fill in blank
nodes).

If you have the simulator start out with a sparse tree (untick "Start
full"), you'll see that initially, the "partial-tree" approach is very bad,
pretty much linear, but it gets better as nodes update, and eventually
merges with the "full-tree" line.  If you start with a full tree, the lines
don't diverge.

Obviously, this isn't dispositive in one direction or another.  But ISTM
that this experiment indicates that the cost of the "partial-tree" approach
might not be too bad, given that it clears up a significant ambiguity /
saves the cost of double-join bookkeeping.

--Richard

[0]
https://github.com/mlswg/wg-materials/blob/master/interim-2018-09/no_more_double_joins.pdf
[1] https://mailarchive.ietf.org/arch/msg/mls/Zzw2tqZC1FCbVZA9LKERsMIQXik