[TLS] TLS 1.3, Raw Public Keys, and Misbinding Attacks

John Mattsson <john.mattsson@ericsson.com> Thu, 28 March 2024 15:22 UTC

Return-Path: <john.mattsson@ericsson.com>
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 C595DC14F6AB for <tls@ietfa.amsl.com>; Thu, 28 Mar 2024 08:22:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.178
X-Spam-Level:
X-Spam-Status: No, score=-7.178 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.08, 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_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-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=ericsson.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 xecF9k9Sbh_Q for <tls@ietfa.amsl.com>; Thu, 28 Mar 2024 08:22:10 -0700 (PDT)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2130.outbound.protection.outlook.com [40.107.8.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4212CC14F5F1 for <tls@ietf.org>; Thu, 28 Mar 2024 08:22:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TplL+CPjQK7oQy1CoQaG4dFyKKAq9qxwBq4C12ca4K+/aZxHgexruSQy/nOBRd+m93xK8Ym27niWrT1gtSkDTWNZEd7WtpI5aK000p08RdQVwx5ifoVqAaBEaMJkKyQKm6O/x6G2MgCPg6K7KVg9k05h0dtxyzrO9oeJdSqMKzT23QdzgZGbpGEHSe9TTUKQyc0OkKUaOrZglJxmaeugYopjyTF4qwnDDEh7g1aYwJNsXLMZOEPXf1WXNVlKJiGiV2FJLh/WIYVKnmjE/k2IrY1ZgyEEnOTy5Fb9WsYsLnMRuFCZXT3cb8GLT1QLeD+k4ICFnKGJ3MEIy4KQXo0V0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rl/uSwIb2jjVMX7ik+vqWvQemoAvuGuT3Gk4Aj9wUjc=; b=Rnp8L95ZabfS/LVTrbuL2sksp/SOMEXhIETZeYPGv4vrJ/T3acp0+Aivuyt/Qt39LyARqIlwTTrD0VfR6F5t3xr3+5AgjGU0Ytb1GDy5uv1KmYdFHA+nTjpZKKIKqn5buq0fpqPbk6aLI5zd8gPNZ/yIum0RcCR9wQI0zFJB7Mx0YKAHujepGHM3HdcxAFNXaUhzL3FQN9hErjrOvUyQ2uEIdhZH5j9W5s2zyk2lOjM+6kDfljVPuQjAwgj3Vs9mPazSewJxn25D+sN9yxiX43sYN9f31mM9C2BtRR5iPaWMZZGeCXDy4Ci+R5nQP7V00l7yYb81YqhKXeU+hC1Svw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rl/uSwIb2jjVMX7ik+vqWvQemoAvuGuT3Gk4Aj9wUjc=; b=ibb0cTUUulndLa6OnfIAwpG4oYifvvlH/3SlhWRtYjJNzSdgeY56vaAJNfJNAT0aYxA8ZDa8x0Jh6z8Y4bOTeatiPoz2pkGetHClPmkqHJsc5Hbv8x+SCKi345t6XkCg76vZ/H1q01sgxC1plF+iuo9EixEC5SkpdL+TdHgXhkEQfTn0sjn7GNLVZvUZRjROMaN/YEwDQ/YdkZr3phOaTKiqNb7qqhoGsxnZH6wU/v3MzryMUUOW9yruZMrkcM9AxYbNrfoWDkftOd523uWga+t9ytqpZhtR49zy7s74eY0BvFVQn4kO+oazu4738wjlxgMyZ3eqBCjQXlcUg74jPA==
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com (2603:10a6:150:114::10) by PA4PR07MB7280.eurprd07.prod.outlook.com (2603:10a6:102:f6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.38; Thu, 28 Mar 2024 15:22:05 +0000
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::b0d0:9785:585a:9568]) by GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::b0d0:9785:585a:9568%4]) with mapi id 15.20.7409.028; Thu, 28 Mar 2024 15:22:05 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: "TLS@ietf.org" <tls@ietf.org>
Thread-Topic: TLS 1.3, Raw Public Keys, and Misbinding Attacks
Thread-Index: AQHagSJ9IianpISz5U22vf2RrMlNog==
Date: Thu, 28 Mar 2024 15:22:05 +0000
Message-ID: <GVXPR07MB9678DFD1EED3971606FB3DE6893B2@GVXPR07MB9678.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: GVXPR07MB9678:EE_|PA4PR07MB7280:EE_
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: e2k+ltjmUEoAUaiuJNDsFUU43d1yHLeNvKGE3eftUg7x/CU6xuDLbDVulEIuiJ8mpTLfc5Pzyhx/5Tf66cSEH1bABHnXTKjChKuGvlQzflyFNkqta5i7G/zp3JXSErnMjxst3jVOtIumwOtJNlhyNMOOYEMZEI1Xdo+EoOybX3ze2aSoVgpsYkKfPHCo+btBfHdrwnDlgaeKH7ABScvzZpd5SOmIc0FNKUZST4xuR4BR+adzDYL0dwtz5Qy0pqz9DHjbRdpMUMF/V+IABTH8Npd4FK/5D4YJA2Fi3LozI4r14rzi2Nw03MOmHim3vwmGgblQDAYQMCyNfJB7RhPzfOx3jHV3TR7TIZm9DDJ17G27DkwesYIg8RQY7s2kT81PIBRDFjHJPAksZwXECzbasxY/cWtz3cNGaF4EUpD+hXemXvgOiHdO3Wnt1o28he5a09V6d/kOL/rBwoD6GavSYakgAqp5WDEdNT20NLzwjx34ik4ZDXbhwFzRjUD2dipLgxfGA6JqO17yC2taS9osLg1xaYRAnRmHN1EIHeMqmY4Ty5JFzQEafBiY46svFGVhorPKCx1IbicyP1gY2pabS6gqzxC2SVOHq4MhGWOzcd4=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GVXPR07MB9678.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(366007); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 4EnM9Gzv/dKWoqCWvbQj/UnzhmNMeBbEv4UpbWpUeORDaoyS6jd8E252vLJ2+Rx+OOjy4O5jqRLYdngXWO5RQch96SkbQkRjmePcM74Pf60tzG32ClZsQWGawZGYE7+boXd/p3cWBpiOw6qdOOlz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Ue4+qKKt9UGIeEsgW9dY0sEg+bUiOis7kRUBcE1LjCUDBGAI1179pXRbmsTumN8AeGHl9VXNhSoYaoxWsazBjplw/zm2G56AD37Bj037G+9lNQyQ4g7/nHnQS8JzQkbHId44P2qUMnG7G8G6DvXIY8fsqg49KthhRJarKfw/xearOt96Xki/xUbvdSTN+q6BX4dwzmEd3MbjZ8lIPLNU6GpzBHnGzY7xJyoV7Pgd51gabL4uvQtydWXIMl8Jj0LbyNVaQHZdbaXh7/KP8J/EaAhWQEY6ZSA8cbCtKYFxmMs5Cs+Cw9P18bxzhH9E3ZkuWKT98B8zMpOiEoeswCtVnK3173jgfKSZPLxdHn/YDQNdjFAZRWKCNC1CPzH1J2u+IqAUkyXu9OMwMNCQBLhNWI3pHgH78kfFToBHTCAo3bwMn0gziW8=
Content-Type: multipart/alternative; boundary="_000_GVXPR07MB9678DFD1EED3971606FB3DE6893B2GVXPR07MB9678eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: GVXPR07MB9678.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: fca0f41a-17b8-404b-0d25-08dc4f3ad36a
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2024 15:22:05.3282 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: AGX+1M+n9Vy5K2mPhMhHIO5d8wIWn1k06ppbjAPt9xGea74ESAJistFVJHwHM9i7LBuCkptQq38+jV/iR5277cPL4mjNJu0DxF561yzESy8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR07MB7280
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/NaXngZTt_yTXhWGUNj85TBBdjQI>
Subject: [TLS] TLS 1.3, Raw Public Keys, and Misbinding Attacks
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Mar 2024 15:22:14 -0000

Hi,

I looked into what RFC 8446(bis) says about Raw Public Keys. As correctly stated in RFC 8446, TLS 1.3 with signatures and certificates is an implementation of SIGMA-I:

SIGMA does however require that the identities of the endpoints (called A and B in [SIGMA]) are included in the messages. This is not true for TLS 1.3 with RPKs and TLS 1.3 with RPKs is therefore not SIGMA. TLS 1.3 with RPKs is vulnerable to what Krawczyk’s SIGMA paper calls misbinding attacks:

“This attack, to which we refer as an “identity misbinding attack”, applies to many seemingly natural and intuitive protocols. Avoiding this form of attack and guaranteeing a consistent binding between a session key and the peers to the session is a central element in the design of SIGMA.”

“Even more significantly we show here that the misbinding attack applies to this protocol in any scenario where parties can register public keys without proving knowledge of the corresponding signature key.”

As stated in Appendix E.1, at the completion of the handshake, each side outputs its view of the identities of the communicating parties. On of the TLS 1.3 security properties are “Peer Authentication”, which says that the client’s and server’s view of the identities match. TLS 1.3 with PRKs does not fulfill this unless the out-of-band mechanism to register public keys proved knowledge of the private key. RFC 7250 does not say anything about this either.

I think this needs to be clarified in RFC8446bis. The only reason to ever use an RPK is in constrained IoT environments. Otherwise a self-signed certificate is a much better choice. TLS 1.3 with self-signed certificates is SIGMA-I.

It is worrying to find comments like this:

“I'd like to be able to use wireguard/ssh-style authentication for my app. This is possible currently with self-signed certificates, but the proper solution is RFC 7250, which is also part of TLS 1.3.”
https://github.com/openssl/openssl/issues/6929

RPKs are not the proper solution.

(Talking about misbinding, does RFC 8446 say anything about how to avoid selfie attacks where an entity using PSK authentication ends up talking to itself?)

Cheers,
John Preuß Mattsson

[SIGMA] https://link.springer.com/chapter/10.1007/978-3-540-45146-4_24