[TLS] Re: Disallowing reuse of ephemeral keys

Richard Barnes <rlb@ipv.sx> Fri, 13 December 2024 00:22 UTC

Return-Path: <rlb@ipv.sx>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 49C21C14F604 for <tls@ietfa.amsl.com>; Thu, 12 Dec 2024 16:22:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ipv-sx.20230601.gappssmtp.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 HzlsPR9KsOCY for <tls@ietfa.amsl.com>; Thu, 12 Dec 2024 16:22:46 -0800 (PST)
Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 ietfa.amsl.com (Postfix) with ESMTPS id 7E9BCC14F5F4 for <tls@ietf.org>; Thu, 12 Dec 2024 16:22:46 -0800 (PST)
Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3a8f1c97ef1so3787985ab.2 for <tls@ietf.org>; Thu, 12 Dec 2024 16:22:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipv-sx.20230601.gappssmtp.com; s=20230601; t=1734049365; x=1734654165; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A1RTBdWl6CfBCWRVtOi41G5rYf3MgDqQlmblcsXNwzY=; b=hDZgNNfCs1U12JJMycHLuNt3Jl7fdazQcTq6HV3/aGwzQtcBkQX5NbUJFKQYBaWQ6A Oqmj8vgj5Z5y3oGbLBvosOPob0Sh3nzYeJ39bKKRowFo43Qrscee0y4l1a2jLaJHOdNF 93MPP2MRs5mBKe2oCqEponLzMNLxtc8Ph74//OsF4jykM/PJQUi7fef495/u0rJMEWz2 /a3LeIMxh8QPG4WT5/huf05lFOPvs7mD5QEcfNQR4tV0IEQXy4UBvyI2rQnZojVK2/Rx dtowid0LVc2Xvf59b9aY2TmTa8RocE1L+VRNK4qHCalUYB2mkoZQ8DNy3bDzCXcYpro3 hFIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734049365; x=1734654165; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A1RTBdWl6CfBCWRVtOi41G5rYf3MgDqQlmblcsXNwzY=; b=VxjfwQgLQbIVK2MPL3x8TKawqZRxfZ759/drvNydLMjTUHX1zw+lCUTM8HsB1W3s1j Io/r5IwpBjznEONPo/zHxUFVIDdKOZE89ucYxQ3fC/FqBaDpFx/xnsPokRXHYXyTZhvx 0oNRPpX6NZY9/dzZ7lnPOpsNR25nqnW0cCFNHTm3+ZaPUZrfv/pMIvGeOghCFC0cSyIF i9Z/T73bUgh6yAqJTiQ7mCXk/lQXkniwrbqdtg4zXZa2Pb6K5CDo27SPYXNF7786eNck ZlE9XVen+egpAKWIsuo6tG/S7P7YgKgGnRdJSq9UvN/+CWgmrnC5z6OWoT4TkBPNy0bZ /J2A==
X-Forwarded-Encrypted: i=1; AJvYcCUUcezpdZYwNtkG3qFejKhjp2Svqim9QU/pdnqHe0nrB5EmHoC3po7sCDmOd2k/g/1KTW0=@ietf.org
X-Gm-Message-State: AOJu0Yzc1YVsylvbyYUosNwsz+w0msn2gL54Ovw3e5qkPJNqGW/HV9pl 20SybkNLhL+JGFYPs1RUfccT7tANW6NjrVBAJz9D+AQc5UD0IILMibt86qyQDvdb2p8fH3eb+3b DfLMVmiKHFv7UESx3QlHe9tKpJBBH64ObxmdkUA==
X-Gm-Gg: ASbGnctO9f5en42s7ut7jiQnpDwI4OD9WdWL7RqFMYnOcPCoWjFHId5iqVx8A5bQd7+ 0QK/PPkxiU5pw0uxfBGEyR4YuG/cM8urGsPOKTbY=
X-Google-Smtp-Source: AGHT+IHaPQI2SDgUX32Q+Aqy9zIk4NFDMWMLz0JNbNjwnr8ejCShpNwPCf+53SEhGdBj2LnxVcFTQFgbp7UofPpl7Sg=
X-Received: by 2002:a05:6e02:168b:b0:3a7:a69c:9692 with SMTP id e9e14a558f8ab-3aff8c91543mr6088565ab.21.1734049365376; Thu, 12 Dec 2024 16:22:45 -0800 (PST)
MIME-Version: 1.0
References: <CAOgPGoCHnXZzzoAFT8GGmByr=7y1j5wM3ptPc4_JBF3FhtVNmQ@mail.gmail.com> <bf28dd19-0534-4403-8e20-50bcbbc0fcdd@app.fastmail.com> <CAL02cgQ9610CzMfcJEPcfpDRemyvAh3-AEH=GZbmV4QdWtQCXA@mail.gmail.com> <CABcZeBNCbm0vUBA0c6i_7DzqwynbUj-SyDHEomHn0WCv4w3ZnQ@mail.gmail.com>
In-Reply-To: <CABcZeBNCbm0vUBA0c6i_7DzqwynbUj-SyDHEomHn0WCv4w3ZnQ@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
Date: Thu, 12 Dec 2024 19:22:34 -0500
Message-ID: <CAL02cgQP24OSjQJuY7Hcx+CXdG_B7LpZD-g2HjV_oJZ0nNrU4w@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: multipart/alternative; boundary="0000000000007261f706291bd4ce"
Message-ID-Hash: ISFKHHYOQXPZH4C335TP7N7RABGPTHGT
X-Message-ID-Hash: ISFKHHYOQXPZH4C335TP7N7RABGPTHGT
X-MailFrom: rlb@ipv.sx
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tls.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: tls@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [TLS] Re: Disallowing reuse of ephemeral keys
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/zQ9CLRRqkBcC57jWqTWBXji0YO0>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Owner: <mailto:tls-owner@ietf.org>
List-Post: <mailto:tls@ietf.org>
List-Subscribe: <mailto:tls-join@ietf.org>
List-Unsubscribe: <mailto:tls-leave@ietf.org>

I concur with EKR re: validation.  There's plenty of precedent in IETF
specs for requirements that cannot be validated by the remote party,
especially when it comes to maintaining security properties.  See, e.g.,
the ticket deletion requirements in RFC 8446.

--RLB

On Thu, Dec 12, 2024 at 7:18 PM Eric Rescorla <ekr@rtfm.com> wrote:

> I agree with Richard about the ordering.
>
> I think validation presents a distinct question: I don't think we should
> require validation, as it is extra work for the peer and may not be
> practical. If there are significant implementations which do reuse, then we
> should discourage or forbid validation for now [0] to avoid breakage and
> then later we can allow it. If there are no such implementations, then I
> think we can allow and/or encourage validation.
>
> -Ekr
>
>
> [0] This might be a reason to distinguish between existing and new cipher
> suites.
>
> On Thu, Dec 12, 2024 at 10:01 AM Richard Barnes <rlb@ipv.sx> wrote:
>
>> My preference order would be 3 > 1 >> 2.
>>
>> 3 seems like it encodes the expectation of most people for what the
>> protocol means.  If you're using a cipher suite labeled something like
>> "ECDHE", it's reasonable to expect that it's actually ephemeral, i.e., that
>> there's not key material hanging around afterward that could compromise the
>> session.  Allowing key reuse (even tacitly) allows one side to silently
>> violate that invariant.  I'm not worried about backward compat, since (a)
>> it's wire compatible, and (b) any change here will be a separate RFC, so
>> people who care about validating can ask specifically "do you comply with
>> RFC XXXX"?
>>
>> 1 would be the next most plausible fallback, on the general principle
>> that IETF specifications define externally visible behavior, and this is
>> not.
>>
>> We should not do 2 because as Filippo says, there's no technical reason
>> for it.
>>
>>
>>
>> On Thu, Dec 12, 2024 at 12:54 PM Filippo Valsorda <filippo@ml.filippo.io>
>> wrote:
>>
>>> I support some variation of 2 or 3, depending on what encounters the
>>> most resistance. I agree there is no technical reason to disallow it for
>>> e.g. X25519MLKEM768 and not X25519, but in practice it might be easier to
>>> set a new rule for something that's still being rolled out and still a
>>> draft.
>>>
>>> Both ECDH and KEMs support key share (or public key) reuse *in theory*
>>> but in practice it makes implementation issues much more likely to be
>>> practically exploitable, and the hypothetical performance gain of reuse is
>>> marginal. The spec should defend against that and point implementations
>>> towards the safer course of action.
>>>
>>> As always, there is no protocol police, so implementations that want to
>>> risk shooting their foot off will be able to do so, but they will be
>>> off-spec, which is a useful signal.
>>> _______________________________________________
>>> TLS mailing list -- tls@ietf.org
>>> To unsubscribe send an email to tls-leave@ietf.org
>>>
>> _______________________________________________
>> TLS mailing list -- tls@ietf.org
>> To unsubscribe send an email to tls-leave@ietf.org
>>
>