[MLS] RT array implementation motivation

Tijana Klimovic <tijana.klimovic97@gmail.com> Wed, 19 May 2021 12:56 UTC

Return-Path: <tijana.klimovic97@gmail.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 2A7F13A0D1C for <mls@ietfa.amsl.com>; Wed, 19 May 2021 05:56:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.847
X-Spam-Level:
X-Spam-Status: No, score=-1.847 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 XUHY5lZTcQF8 for <mls@ietfa.amsl.com>; Wed, 19 May 2021 05:56:00 -0700 (PDT)
Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) (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 F33D13A0D0B for <mls@ietf.org>; Wed, 19 May 2021 05:55:59 -0700 (PDT)
Received: by mail-yb1-xb33.google.com with SMTP id l7so17912741ybf.8 for <mls@ietf.org>; Wed, 19 May 2021 05:55:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=g7c/L9biuaYHL8mMLs5WQbMfimJkO4PUMHi44BCdKqw=; b=gz//mR9MSZHiRuZlAuYkL5HwcUyMHeXV+3KIF5xLqZ6oEUeCBeegSTq0iGxLqKLlgh uYK9D/b41G6wUYQKBowjUO3FbpM4EoN0do58SyLO53vdncdcaxfAQR4yzQdZ46fZaCey a9LdsnHDZCzQ0GYtBH64CD4yfoy/h+padtltVOvKS/KZxawKopj7bMQn+cNRhKH9rjd4 TCwiUV8CGCO4QEevPVl03iTP12g1o93nk0gaQUTrJb4dI5tb1p7CY+Mn7w5cYoBFqkvH if3gdIUShfh4vTWlHzY6uLfdR7mPSzBqS5OVVpla1YBuvB4vpOL/thyRHop78KTpJ6hZ xh0g==
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=g7c/L9biuaYHL8mMLs5WQbMfimJkO4PUMHi44BCdKqw=; b=FIsWUN9Aoq+nWKHiNyc+mI9hCzVsVlbI7uFLz5FfVok23YK6E+GcpJ7bhS83SqZU6r 7lYoIfU8WvbB0ABmOpFW2PI8crDeVU2H4lHc59EeTm9ZXnf74xcm/QLw8NekNUIiSQxj Lw0LGnIjnImW9nE4bmqEi5GuDNsFzulYr4oxUeFJk/Qm9hr9/S8CnqsFmw6prvLBNIyE VVQMeRY+2QvbmaC/RZrFrYMd9mlgnRIcJX8RtdHSCd6c8mejALQBTb/5vcKsBlorWiCs sOFJ9eyS8ws7k1Kig0HT94FUqFfhRrkGUc/4TqRwtUQwDKDODtjWyAUpqcKu7kiRrF4N xfzA==
X-Gm-Message-State: AOAM531Be5SKq/Z0eJrV6jwDsn9e5qtDV3XpJakZo7ypM5SQ+Nm506A1 abFvR/xUkN/TA+qSHOti///fWqdJB1mf1TJRqnBqgb0r4dxPlA==
X-Google-Smtp-Source: ABdhPJxtpfgGiNz+aa9iw1UMiNREfTmMKrrEJrcMnfq/lWIaLRyQ6h4oOqERmmy2qwLjr/htA8EfqI6phYcts3H4JNM=
X-Received: by 2002:a25:7382:: with SMTP id o124mr15012568ybc.112.1621428958180; Wed, 19 May 2021 05:55:58 -0700 (PDT)
MIME-Version: 1.0
From: Tijana Klimovic <tijana.klimovic97@gmail.com>
Date: Wed, 19 May 2021 14:55:48 +0200
Message-ID: <CAHvbzjKTFFAp-V_o_Gs-vqiT=6Zh1qXim6E0096t3or8UcrJ-g@mail.gmail.com>
To: mls@ietf.org
Content-Type: multipart/alternative; boundary="00000000000014b7f105c2ae593f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/OnSwfwB1xSB_DfDGtX0tuCCWn0g>
Subject: [MLS] RT array implementation motivation
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: Wed, 19 May 2021 12:56:05 -0000

Hello,

I have only recently started to look into the MLS specification, and was
wondering why the ratchet tree (RT) structure is chosen to be implemented
with an array. From what I understand, the pointer-based tree where each
node would contain the following information:

        struct {
        Node* sibling;
        Node* parent;
        Node* left_child;
        Node* right_child;
        Optional<HPKEPublicEncKey> hpke_enc_pk;
        Optional<HPKESecretEncKey> hpke_enc_sk;
        Optional<Credential> credential;
        Optional<vector<byte>> parent_hash;
        Optional<vector<Node*>> unmerged_leaves;
        } Node

would be more efficient than an array w.r.t. all operations supported by
the RT.

Many thanks.
Tijana