[MLS] draft-ietf-mls-pq-ciphersuites: how are MLS Extract/Expand realized with SHAKE256?

Emil Abramov <emil.abramov@wire.com> Tue, 23 June 2026 15:57 UTC

Return-Path: <emil.abramov@wire.com>
X-Original-To: mls@mail2.ietf.org
Delivered-To: mls@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 05DCB105E2563 for <mls@mail2.ietf.org>; Tue, 23 Jun 2026 08:57:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1782230255; bh=M+GxR1xByohm3rCcW4NCxc0YCPKuP60I+G4qpsN2jaI=; h=From:Date:Subject:To; b=SrGMX7YmuYWfCD0bULSODC/cc/w051cYScN8ZMkNBUKjLEOx/mHZBFS5Vsp8pNIk/ sYaiD1qOL0OSmdmzRwnfjNwGelGYsZU2l7K/RZK586701xSO3u2dcMRegnEbZwvvoP 4Ni6PuHQXFFWMv0vNaIZRdyXq9mkICIBmhihmNYU=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=wire.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PcRL6ydcgizr for <mls@mail2.ietf.org>; Tue, 23 Jun 2026 08:57:34 -0700 (PDT)
Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 57EBE105E24B4 for <mls@ietf.org>; Tue, 23 Jun 2026 08:57:29 -0700 (PDT)
Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-69796a9f04bso4656632a12.0 for <mls@ietf.org>; Tue, 23 Jun 2026 08:57:29 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1782230241; cv=none; d=google.com; s=arc-20240605; b=a25JjGcuCOWl9CtNwxUnGUI6XrKz1okRziHIbNu29NEuDI4EgGMMBqNWjJFut7n3VG fT90gX30p9R2bb0T5AJjUPsQ8UOhb7lNtDWSE/h22plgCVGn/0KBk2pLgAGgNvNp0V7u x+Lr29OFutOysVQnHgq49qYsjEPGuO1MkDRj6wamb1HL/b26JnYZ7cko5mo2gtykx0CE gosjWjsHsbkCvRMkKS6oz/WSVinU0fykGPzEidDrkVtVJjLCZXkjZAvmKMbN0BHNnDSI 1WObTBTKK6fSKRAn+eckREBwvBDV9stGddDtro7nZkw4x+mbmY+RiCOwnQdWacEhWvs7 43lw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=grwpNxamzS6txBvly7krkBY2X5v3rgJX9xT+l5XzbfE=; fh=dg9DVhWhWDo81XIC1gayXSFT3euwR2o8HQ200iRcuh4=; b=ck4palF5ZmQv4a/NiAyj8B2TuVe6Nc8SJIKIBLpWwm7O9365J6okoXdJZ/2rRUD3R7 dHo+EWfpMwTxYHezxlGJy0H+f5wowntNOkA9hVPuMtdHyNZtOlqlrdb4298ZoJO3Ef4q SUMzE+dA3hkLr6FRWFOhMkaX6zLMFuZFcDsvUqtozTlE8Au5crvLW3Uy9SOdqBw0+Juw /e1wUCaa4Mt+hkpKXoRD+1awYAaEFk1HXXMKFIModcWNPXucQBvN+TPqlKUEtUXRz+1D BV1iwDRg5m8Lne+y5vlKAE2b2MVIEbfP1vJzkbU+gzJD2hxhnEesNGOyBD/u3KWqKfNa ZIYw==; darn=ietf.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wire.com; s=google; t=1782230241; x=1782835041; darn=ietf.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=grwpNxamzS6txBvly7krkBY2X5v3rgJX9xT+l5XzbfE=; b=MgGk7zXRMlvd1DoBBcBGRKvuicZLkPl3DL3P2WbPstH58iHdjf1z5mDgSe7OTVvBPv b0kNjFl97naAX5Fx7vMjwK+KZbMxHrmhRMLG1BQDDLFs20ZT5C2wzK61i+CY/sgIta0w L3XVmGwPM93WnhO3n86RXZi7u4bEC/xtivokkh//zGts+YHkjdJariLvBVkj8wO7RKzJ HzAE2aVNnb6kiBSL8bRlsK4CULmAVIZc0XIPrxRUbAxYEcH5uzFbt8sHtiRwxgHoW5oX CjPShnTyxO5tJT8/1OMCTb8fGl8wLLDMXahvTULv1+pEnw+PbEUxrzsMz0pnFcQxwS3s zIUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782230241; x=1782835041; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=grwpNxamzS6txBvly7krkBY2X5v3rgJX9xT+l5XzbfE=; b=MtP860fcCblJSB6VTgFa8lExNUUd3ndssfMUzsOqQ4LgRGQUblxrlpB9wLPX/URFAb Y6WNFAccJbR+hICQBY0d4elz5Xx1oYhhNZAIvSCkVjpjq+sz7PG8wgNThS1uOmZ1SWBq smxE7qMPdk9PPOqedATwkSJ9qZCTA2ywuG5rlUBCYKrEul7a3qqMWc4iagI1GDKk6wq8 2V7RHmn+SUyepLaTOqQF+0qWrO//0CUSDdtn+y4GoFl+svY6HZaWsRK7yZeuOnzGAEw/ HoSQOG6o6U1/GXUNxMdqWRx/xVKSySPksppk/i+//uzlPJ/XApyAWi4qgaZc8d1//Rjr wj4Q==
X-Gm-Message-State: AOJu0YwkX6F/7tOJefVGvr3jfg6dxgqa9vHTyeAHfQAKZzxbK1E/XK0M CYbx4k8AisOjwg8rU8h+ffp2wZqbYVWYCFF3MUtcl0f9kPoOhPWxkNzfVWvbZm2DcdG5iOWIKA2 knAsAQXvhvY+SatGr3RmLYsnXLjrGf439V5NilF+94Vvc7xvGeUZNckCE/A==
X-Gm-Gg: AfdE7ckVXgO/w6Zpvoll3yEYH75Rm3RAJ9e9tlbgjZxPI24wqrYG37OZC7u34Z+yWAD 03Lxom0mGxJ4xGHb8tpnz4RXFP19rsuCwipZC++MwLGFUyyExLqO6KL6rR+4ptgenUjch3xrGzr SUlO/7Tguexv4jNUUM0DHp1n985y/45Pqnpc2lIto6bTRBQA8rm/jbIY/htTmYuhGxXC7QyTWBE UAt13P/xNNT7dCAlF/vWZL6ptQzrljnZvmoiyC6mEUuNEIqiZX/9Mhzq/M6di5YpUNjgFC7lg==
X-Received: by 2002:a17:907:198d:b0:c0c:586:b24f with SMTP id a640c23a62f3a-c0c660ce49fmr732109266b.35.1782230240172; Tue, 23 Jun 2026 08:57:20 -0700 (PDT)
MIME-Version: 1.0
From: Emil Abramov <emil.abramov@wire.com>
Date: Tue, 23 Jun 2026 17:57:08 +0200
X-Gm-Features: AVVi8Cc4hZ1Nm1UjaqT8gf2G7ShM9EUK_-Nro0AyWW905ghtXDJ5R3eVQbpu_dI
Message-ID: <CANt6CKA6g7uH=0an1u91+x4yLwCgOpsLDMnkg0Eh019UtBrq4A@mail.gmail.com>
To: mls@ietf.org
Content-Type: multipart/alternative; boundary="0000000000005fb8060654edd03a"
Message-ID-Hash: WLURFDMOQ6BPLC4QLOTW6KOVEYR4XSWF
X-Message-ID-Hash: WLURFDMOQ6BPLC4QLOTW6KOVEYR4XSWF
X-MailFrom: emil.abramov@wire.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-mls.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [MLS] draft-ietf-mls-pq-ciphersuites: how are MLS Extract/Expand realized with SHAKE256?
List-Id: Messaging Layer Security <mls.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/nl4KktHGAJio4O2Di161WSEvmks>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mls>
List-Help: <mailto:mls-request@ietf.org?subject=help>
List-Owner: <mailto:mls-owner@ietf.org>
List-Post: <mailto:mls@ietf.org>
List-Subscribe: <mailto:mls-join@ietf.org>
List-Unsubscribe: <mailto:mls-leave@ietf.org>

Hello,

draft-ietf-mls-pq-ciphersuites-04 sets SHAKE256 as the KDF for all nine
cipher suites, but I can't find where the key schedule's KDF operations are
pinned down for it, and I wanted to check whether I'm missing something.
I'm also reading the current editor's copy
<https://messaginglayersecurity.rocks/mls-pq-ciphersuites/draft-ietf-mls-pq-ciphersuites.html>,
which matches, along with hpke-pq-04
<https://www.ietf.org/archive/id/draft-ietf-hpke-pq-04.txt>, hpke-hpke-03
<https://www.ietf.org/archive/id/draft-ietf-hpke-hpke-03.txt>, and RFC 9420
<https://www.rfc-editor.org/rfc/rfc9420.html>.

RFC 9420 Section 8 <https://www.rfc-editor.org/rfc/rfc9420.html#section-8>
builds the key schedule out of KDF.Extract(salt, ikm) and KDF.Expand(prk,
info, L). In the base suites the KDF is HKDF, so those map directly.
SHAKE256 is registered in hpke-pq as a one-stage KDF (Section 5, Table 1
<https://www.ietf.org/archive/id/draft-ietf-hpke-pq-04.txt>, "Two-Stage:
N"), and hpke-hpke-03 Section 4.2
<https://www.ietf.org/archive/id/draft-ietf-hpke-hpke-03.txt> only defines
Extract/Expand for two-stage KDFs, giving one-stage KDFs a single Derive
instead. So for these suites it isn't clear to me what KDF.Extract and
KDF.Expand actually compute.

hpke-hpke handles this internally by giving every affected function a
_OneStage variant that collapses to LabeledDerive, but that covers HPKE's
own operations, not the MLS key schedule. A couple of spots don't collapse
cleanly anyway, in particular the PSK chain in Section 8.4
<https://www.rfc-editor.org/rfc/rfc9420.html#section-8.4>, where an Extract
output is used as a PRK and then fed as the ikm of the next Extract.
There's also the label question, since MLS uses "MLS 1.0 " rather than
HPKE's "HPKE-v1", so borrowing HPKE's derivation directly wouldn't
reproduce MLS's bytes.

Is the intent that implementations define their own Extract/Expand over
SHAKE256, or should the cipher suites be restricted to two-stage KDFs, or
is this meant to be specified somewhere I haven't looked? If it's left to
implementations, two interoperable stacks could end up deriving different
epoch secrets. Happy to send a PR once the intended direction is clear.


Cheers,

Emil
-- 

---
*Emil Abramov*  l  Sr. Security Engineer
Wire™ <https://wire.com/en> – Protecting Confidential Communication

Wire user: @emil.abramov@wire.com

*Wire Germany GmbH  *l  Rosenthaler Straße 41, 10178 Berlin, Germany

Geschäftsführer/Managing Director:
Benjamin François Schilz

HRB 149847 beim Handelsregister Charlottenburg, Berlin

VAT-ID DE288748675
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please notify the sender. This
message contains confidential information and is intended only for the
individual named. If you are not the named addressee, you should not
disseminate, distribute or copy this email. Please notify the sender
immediately by e-mail if you have received this email by mistake and delete
this email from your system. If you are not the intended recipient, you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited. /
Diese E-Mail und alle mit ihr übermittelten Dateien sind vertraulich und
ausschließlich für die Verwendung durch die Person oder Einheit bestimmt,
an die sie gerichtet sind.  Sollten Sie diese E-Mail irrtümlich erhalten
haben, benachrichtigen Sie bitte den Absender. Diese Nachricht enthält
vertrauliche Informationen und ist nur für die genannte Person
bestimmt. Wenn Sie nicht der genannte Adressat sind, sollten Sie diese
E-Mail nicht verbreiten, weitergeben oder kopieren. Bitte benachrichtigen
Sie den Absender unverzüglich per E-Mail, wenn Sie diese E-Mail
fälschlicherweise erhalten haben, und löschen Sie diese E-Mail aus Ihrem
System. Wenn Sie nicht der beabsichtigte Empfänger sind, werden Sie darauf
hingewiesen, dass die Weitergabe, das Kopieren, die Verteilung oder jede
Handlung im Vertrauen auf den Inhalt dieser Informationen streng verboten
ist.