Re: [Lake] Static-DH-based Protocols for LAKE

Göran Selander <goran.selander@ericsson.com> Thu, 24 October 2019 14:19 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: lake@ietfa.amsl.com
Delivered-To: lake@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8CCED120863 for <lake@ietfa.amsl.com>; Thu, 24 Oct 2019 07:19:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 xS44jr64X8Ne for <lake@ietfa.amsl.com>; Thu, 24 Oct 2019 07:19:01 -0700 (PDT)
Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140053.outbound.protection.outlook.com [40.107.14.53]) (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 892AC120829 for <lake@ietf.org>; Thu, 24 Oct 2019 07:18:55 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGcUex6FkObU32W57oTyXwaZVLKc+mzb+k6EPDsBff0t+hsGDmxQX5QnHBCBnT1CqMZefU9A0m2UqysglKjgIyk0UBX1SO6chqlsxXiYCccz83nekvc4YXHjKCPGmpkfrA4heKso0N4B9WXSUAND+jfJhNhlzX0luem9UeYCBlWHqUSHOhPg+o5qNmgcBgEtRbx1tTus1v2Cohpg9Xe3YhagDJg8m3dhB61YY3+zEjEzPZqg49tWArcAq5qt/1f7NN6VMnlyyPMS8L4wCfV3PD7v35GOdiTr5rG4T4sETeUBl14UcKckyqYwprIUjwI93A2zQGpnxlG8zEzNjcu6pw==
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-SenderADCheck; bh=IW0gSN/prOvaEBBdmLrAYBKiz4insXfRIgHRuvZjqX8=; b=AjEvjWp3wZzMEItQDlsl9jKvwmHDUdmEIuww5TrgVX/IjhY/Rrx9oAZnLqUM/wjX+pALGmZemApPKyLJCr/JH0E78uxqJy4qA12qTgYAqsvZ4zFjkbMYBf/cG1A2rVi4BuP92v5Ap3f391/SwOdsWTey34ewADLaiZFguuwvNeX53bQqeGppm+ZUjpaq40GEbwYCoKuOlIudP5MqUueJCriIjMDGzHGrage9M7+MHv5T3ni5Xti8NQNb8avKtWtD7b/wWoiR3FA3rwlEdS1LMWsWCa1C8xgRKZKDyhIhNuOkxq4L9foDL2IgtEz/DU0n72LWOTTjNh4K1UrfZokVZA==
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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IW0gSN/prOvaEBBdmLrAYBKiz4insXfRIgHRuvZjqX8=; b=gNRF786Mmiozf+gR4p6P54TUINvN1Ha/0+t+rllqCdGSQMETGlWy/Q+WuViKdFHx6nRbj0PXNnGubRfrYhcUzxOmRA1qN8q/OtnEfD0k9VrbYnbKUQ4Cmncp9wFWJRDI5qFP//YLAH7WzOrF5wujg7FzY/FQ8e8I9J0FS8Lhq9s=
Received: from HE1PR07MB4172.eurprd07.prod.outlook.com (20.176.163.140) by HE1PR07MB4315.eurprd07.prod.outlook.com (20.176.168.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.14; Thu, 24 Oct 2019 14:18:53 +0000
Received: from HE1PR07MB4172.eurprd07.prod.outlook.com ([fe80::c8d:a631:dfa9:ab21]) by HE1PR07MB4172.eurprd07.prod.outlook.com ([fe80::c8d:a631:dfa9:ab21%5]) with mapi id 15.20.2387.021; Thu, 24 Oct 2019 14:18:53 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>, "lake@ietf.org" <lake@ietf.org>
Thread-Topic: [Lake] Static-DH-based Protocols for LAKE
Thread-Index: AQHViZLxzvt80bVe/Em4b+WTUHJBQ6dp+k0A
Date: Thu, 24 Oct 2019 14:18:52 +0000
Message-ID: <2A6658F1-15AC-4BD0-87E2-E49EC36CE79D@ericsson.com>
References: <E28DDCCB-7F3B-4CFD-898C-93A9A80B7184@gmail.com> <948ECECE-5425-4720-A0BA-F1E918F9F8F9@gmail.com>
In-Reply-To: <948ECECE-5425-4720-A0BA-F1E918F9F8F9@gmail.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1e.0.191013
authentication-results: spf=none (sender IP is ) smtp.mailfrom=goran.selander@ericsson.com;
x-originating-ip: [192.176.1.87]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 6bd5890c-c51e-49c5-be33-08d7588d1911
x-ms-traffictypediagnostic: HE1PR07MB4315:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <HE1PR07MB43158E52CCAF44B894B3E4D4F46A0@HE1PR07MB4315.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0200DDA8BE
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(376002)(366004)(346002)(39860400002)(53754006)(199004)(189003)(66946007)(102836004)(2906002)(6246003)(66556008)(66446008)(64756008)(3846002)(6116002)(6512007)(6306002)(6506007)(229853002)(2501003)(26005)(2616005)(486006)(85202003)(446003)(76176011)(6436002)(66066001)(316002)(58126008)(110136005)(11346002)(99286004)(186003)(6486002)(476003)(36756003)(14444005)(71190400001)(71200400001)(256004)(5660300002)(25786009)(81156014)(8676002)(81166006)(85182001)(8936002)(478600001)(14454004)(7736002)(305945005)(561944003)(4001150100001)(33656002)(554214002)(76116006)(966005)(66574012)(86362001)(66476007); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB4315; H:HE1PR07MB4172.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: cJyHBDEIuHBETigA/4yjCM2cJ8/Fd9A5CgRo/ws826nAw+7EVau2tKWX5+TuTUWSzmIGv0oWlgPbW9+DU1KH7Gh1xi/XGvnpB/DmDq2nWXaArGrO/UClfP7ENTTOrRB+KiDHvIhrbNEAvSJqdkWzDgUwLgaFhs72kOl5JgNepwIoGRu6ZTwAy1+31fweJiwOyXCKxE4GQPX7vCZ0Na89cCBxX8zTQfUYZx9Hv05G/S50o8q/lysuXHmeZHW5MRr2PyRJj9BqvxYZY+VF9eoB6NPoPIdNetlrSo0f12h0s6ZRdKF8P29vxGnjFFu1e9f5iF59DFCrdJuneOG3OVnO/q+Oty7bvUqSmCyRZNj1ZloT6IVKLlEss5PJXmPMkCRAntVeypxprPWvkUjm874CXLFOUfCCMZLIOtleQssQCakBpkYAAlDl1ob5BJzkOVpX6K0P0sbbBG3GAPkrkhZUUI+OBHcx+HIZ1M3iMh14XZ0=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <54DA39BFE67EFD4284C2FACD2F567801@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6bd5890c-c51e-49c5-be33-08d7588d1911
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2019 14:18:52.8971 (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: T8dDQPsJsxXcYF7UHhzcUg4CAftsigQHujNpcxq3YtW6ZWo+ae2abrqcp1WrU9Xv1iTfv9BIULE9V22c6OIvQsBHb6rjGaxV9xFcgrW3M44=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB4315
Archived-At: <https://mailarchive.ietf.org/arch/msg/lake/kXrH3gKlg7QtSkI9qTzWR_bcQk8>
Subject: Re: [Lake] Static-DH-based Protocols for LAKE
X-BeenThere: lake@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Lightweight Authenticated Key Exchange <lake.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lake>, <mailto:lake-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lake/>
List-Post: <mailto:lake@ietf.org>
List-Help: <mailto:lake-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lake>, <mailto:lake-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Oct 2019 14:19:04 -0000

Hi Karthik,

Thanks for your kind mail and for sharing your expertise in this area. Exactly as you propose, for the RPK-based mode there seems to be a good match in using static DH keys for authentication. As you noted, this is what is outline in Appendix B in -14 of EDHOC and is further elaborated in the github version, which will appear in -15:
https://ericssonresearch.github.io/EDHOC/OPTLS-type-authentication/draft-selander-ace-cose-ecdhe.html#rfc.appendix.B

The protocol specified in Appendix B in the github is very similar to what you spell out in the mail below and with the same favorable message overhead as you listed in the table below. There are also the differences which we would like to understand in detail, but haven't had time to look at yet. Obviously, the ability to prove strong security properties should be guiding the detailed design. Also, it should be noted that the protocol in Appendix B is not optimized.

In our understanding of the requirements, we are targeting an AKE with three modes: PSK-only, RPK and certificate based. For PSK-only we do not require static DH-keys (which you do not either in your PSK LAKE instance below). For the certificate based mode we are requested to support signature-based public keys, since that is what is standardized and available in e.g. the X.509 based ecosystem. This does not exclude the use of certificates with static DH-keys, but for wide applicability we can't restrict to that certificate use case. The static DH mode corresponds in our view to an intermediate mode of the protocol between PSK-only and signature based. This is what we intended with the protocol setup as described in the github version, but this is still open for discussion and in particular in the details. 

It is interesting to note the trade-off your highlight between ID-PSK privacy and server authentication in the second message. The preferences of the community on this point still needs to be understood.

Looking forward to an interesting discussion!

Göran


On 2019-10-23, 13:13, "Lake on behalf of Karthikeyan Bhargavan" <lake-bounces@ietf.org on behalf of karthik.bhargavan@gmail.com> wrote:

    Hello All,
    
    In my team, we have been formally analyzing various key exchange protocols, including some that use static Diffie-Hellman keys for authentication.
    Some of these protocols would be particularly suited to LAKE, and I note that Appendix B of EDHOC draft 14 already hints at this.
    I wouldn’t be surprised if this has already been discussed before, so do let me know if I am repeating things everyone knows.
    
    For concreteness, I am sketching two protocols below and comparing them with EDHOC.
    If there is interest in the working group, we could write up a more detailed, more general document describing the protocols and their formal analysis.
    
    Static DH+PSK LAKE
    ==================
    I propose the following composite protocol that uses both static DH and PSK (where the PSK can be set to Zero if unavailable).
    We could easily remove PSKs from this protocol, but I left it in to show how the two authentication mechanism can be composed to obtain extra security.
    In particular, the PSK could include some external key material (e.g. a key generated from a PQ-KEM ), and the use of PSK can protect against some bad-randomness vulnerabilities.
    
    For those familiar with the Noise protocol framework, this protocol corresponds to XXpsk3, except that I am using EDHOC notation here to more clearly link the protocol to LAKE:
    
    I -> R: TYPE, SUITES_U, G_X, C_U, UAD_1  
    R->I:   C_U, G_Y, C_V, AEAD(K_2a; ID_CRED_V), AEAD(K_2b; UAD_2)
    I->R: C_V, AEAD(K_3a; ID_CRED_U, ID_PSK), AEAD(K_3b; PAD_3)
    
    Many of the elements here are the same as EDHOC:
    - G_X = g^x: the initiator’s ephemeral public key
    - G_Y = g^y: the responder’s ephemeral public key
    
    Some things are different:
    - ID_CRED_V is used to retrieve g^v, the responder's static Diffie-Hellman key
    - ID_CRED_U is used to retrieve g^u, the initiator's static Diffie-Hellman key
    - ID_PSK is used to retrieve a PSK (potentially a string of zeroes)
    - K_2a is derived as KDF(g^xy, TH_2a)
    - K_2b is derived as KDF(K_2a, g^xv, TH_2b)
    - K_3a is derived as KDF(K_2b, g^uy, TH_3a)
    - K_3b is derived as KDF(K_3a, PSK, TH_3b)
    
    The transcripts are computed as usual:
    - TH_2a includes the first message and all elements of the second message up to C_V
    - TH_2b includes the first message and all elements of the second message up to the first AEAD
    - TH_3a includes the first two messages and all elements of the third message up to C_V
    - TH_3b includes the first two messages and all elements of the third message up to the first AEAD
    
    Security guarantees: Assuming standard assumptions on full strength cryptographic primitives
    - UAD_1 is insecure: no authenticity or confidentiality
    - UAD_2 is authenticated by R and can only be read by the client who knows x.
    - PAD_3 is secure: it can be read and written only by I and R.
    - All messages from PAD_3 onwards have forward secrecy and KCI resistance
    
    Message Sizes: Using the same overhead numbers as in the EDHOC draft
    - 1st message: 38 bytes
    - 2nd message: 58 bytes
    - 3rd message: 34 bytes
    
    Note:
    - These calculations assume 8-byte AEAD tags.
      With full 16-byte tags, the sizes would be: 38, 74, 42
    - This protocol combines the security of PSK and Asymmetric authentication at little cost.
       Removing PSKs would change only the third message, bringing sizes to: 38,58,32
     
    PSK LAKE
    =========
    
    For completeness, here is the protocol using only PSKs and no static DH.
    In Noise notation, this corresponds to the NNpsk3 pattern.
    
    I -> R: TYPE, SUITES_U, G_X, C_U, UAD_1  
    R->I:   C_U, G_Y, C_V, AEAD(K_2a;  UAD_2)
    I->R: C_V, AEAD(K_3a; ID_PSK), AEAD(K_3b; PAD_3)
    
    Keys:
    - K_2a is derived as KDF(g^xy,TH_2a)
    - K_3a is derived as KDF(K_2a, TH_3a)
    - K_3b is derived as KDF(K_3a, TH_3b)
    
    Message sizes: assuming full-sized AEAD tags and the same overheads as EDHOC
    - 1st message: 38 bytes
    - 2nd message: 45 bytes
    - 3rd message: 13 bytes
    
    Note:
    - This protocol has the same structure as the more general protocol, except that it does not use static DH keys
    - An important difference between this proposal and the EDHOC PSK case, is that here, we seek to provide privacy for ID_PSK by putting it in the third message.
    - We could modify both protocols to send ID_PSK in the first message.
      This has a privacy cost, but the benefit that we can obtain server authentication already at the second message.
    
    
    MANY OTHER VARIANTS
    ======================
    
    I have sketched the above variants only to give rough examples of what we think are lightweight protocols for which we can prove strong security properties.
    Many other variations are possible and may be worth considering. 
    
    I am looking forward to your comments, especially if I am misunderstanding some requirements.
    
    Best regards,
    Karthik
    (Inria Prosecco)