Re: [CFRG] More custom kem combiners: ML-KEM and ECDH with P-256

Neil Madden <neil.e.madden@gmail.com> Wed, 21 February 2024 19:08 UTC

Return-Path: <neil.e.madden@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CFA8DC151095 for <cfrg@ietfa.amsl.com>; Wed, 21 Feb 2024 11:08:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.103
X-Spam-Level:
X-Spam-Status: No, score=-7.103 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_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6EriNjqcJwsm for <cfrg@ietfa.amsl.com>; Wed, 21 Feb 2024 11:08:19 -0800 (PST)
Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0F350C15106C for <cfrg@irtf.org>; Wed, 21 Feb 2024 11:08:19 -0800 (PST)
Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-33d817b3c0cso203799f8f.0 for <cfrg@irtf.org>; Wed, 21 Feb 2024 11:08:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708542497; x=1709147297; darn=irtf.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=EsvhQVYZWHdovjGEOEvNPxZdxwtfQaedtD5xhPVDBWc=; b=PL6uhAdwhhn/SFgVvCgqaxDe8a93HITZyV5AwoKY7uDzjJW9CGiVpuDVEYcE1NQKqe BnSjdUDbZsEN7pDIFg8yW7uQV7ZPIJihEysVeqTZ977DRJgL8pb7BMMJm7UGR743WakE dXkKzZchFBlKX9yP3MMsV1v7gefWR2svYvk5RJrMx62YS7aAPkihgrPoyJNES1I3yJv3 tElQSNfDRhM5Cn+GJlvNR2zBcaCm+FhtBfbRgTO6vcdr57YkpmkplGlJvP5U11XazA1L kPfvVohSiAreavht+dslpK1YFw9u0BkoQ4XIBDbtQVSRFvdHlSYJwE9CrY0oiAu1OrgL 5BNA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708542497; x=1709147297; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EsvhQVYZWHdovjGEOEvNPxZdxwtfQaedtD5xhPVDBWc=; b=SFf7UP/pV0EeqrP0tj807h5r387Dl9OK+KGYXf7UfikNWy4W8nO034rzIj5sVKfkNk eWj2IvvduvAKDtsA5PSy+s80qod3O1nphlp+vVG2unnq6mq638Mmf54xV9ubx/FZ1pFC a+yZFiphKNoOVHwd0JpTeJde7+7EtS/47rrCEt/UzO8xTDvhJuAVt/L5sy/g2AGRneER W1sfXsAOd/HdkzjjRDYI3j4qcxMpBdivpVUIler87gi8+9y9HrJFcJ9Ii3DqMcqym5zo lvnptOpq5F9RBSEj7ooBh7p9tk6eDJo1o2DA/vdMRktWM4Hk9kQmRRlPybGB3wOe71Hw 3Rew==
X-Gm-Message-State: AOJu0Yx9OMS/atm09f9/mecgamGsJfb1qLD6nS6m7indj8thJ6qtrbbn OaYO2Z681bdAuLddLnG7tqAjRSnHykv7wRwpDre33vkjkjWnIIL6miLZ59j7LyI=
X-Google-Smtp-Source: AGHT+IFblYEfLrsln2irIqHLZ1I0OhHxEMxQ8j/0olSULGK92yU0GiB2wHEgNX9euP3dsp+FF5xLUA==
X-Received: by 2002:adf:e18c:0:b0:33d:1122:ec6f with SMTP id az12-20020adfe18c000000b0033d1122ec6fmr11211747wrb.5.1708542496688; Wed, 21 Feb 2024 11:08:16 -0800 (PST)
Received: from smtpclient.apple ([213.31.218.183]) by smtp.gmail.com with ESMTPSA id q4-20020adfab04000000b0033cf637eea2sm17904541wrc.29.2024.02.21.11.08.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Feb 2024 11:08:16 -0800 (PST)
From: Neil Madden <neil.e.madden@gmail.com>
X-Google-Original-From: Neil Madden <Neil.E.Madden@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-0E478E40-4961-43DD-BECF-37E548F02998"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Date: Wed, 21 Feb 2024 19:08:05 +0000
Message-Id: <9D4E5BFF-E948-4460-94C1-BF1E77D641FE@gmail.com>
References: <CAN8C-_Jo5YF6j9xG9dmHyuHEegkpWyEAZHRsk-P4GGGdRixfig@mail.gmail.com>
Cc: CFRG <cfrg@irtf.org>
In-Reply-To: <CAN8C-_Jo5YF6j9xG9dmHyuHEegkpWyEAZHRsk-P4GGGdRixfig@mail.gmail.com>
To: Orie Steele <orie@transmute.industries>
X-Mailer: iPhone Mail (21C66)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/wk_Xt8NN90CUergcCpr231TSe6I>
Subject: Re: [CFRG] More custom kem combiners: ML-KEM and ECDH with P-256
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://mailman.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://mailman.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Feb 2024 19:08:22 -0000

> On 21 Feb 2024, at 17:16, Orie Steele <orie@transmute.industries> wrote:
> 
> 
> Looks like Apple just announced they are going to use a custom kem combiner with ML-KEM and ECDH with P-256.
> 
> https://security.apple.com/blog/imessage-pq3/
> 
> Here is the security analysis paper: https://security.apple.com/assets/files/Security_analysis_of_the_iMessage_PQ3_protocol_Stebila.pdf

(The “KEM combiner” is in section 3.5.2). 

They are using HKDF and chaining things via the salt parameter, which AFAICT is what WireGuard, Signal, Noise, TLS, IPSec, and now apparently iMessage all do. I’ve actually been surprised that that hasn’t been proposed here, as it seems like a de facto standard. 

You might object that they all do this for *PSKs*, not for KEM combining, but at least the WireGuard author has explicitly stated that they intended the PSK mechanism exactly for mixing in the result of a post-quantum key exchange:

https://www.reddit.com/r/linux/comments/hzyu8j/comment/fzmd983/

(You might even say this *is* a PSK, it just happens to have been “pre-shared” very recently… during the same handshake…)

> 
> It's not obvious to me if this is using a DHKem like those registered in HPKE or if it's some custom construction.
> 

It’s using ECDH, not a KEM, for the DH part. (I mean DHKEM basically is ECIES, so it’s not like there’s a massive difference). 

— Neil