[Lake] Forward Security with PSK-Only LAKE

Karthik Bhargavan <karthikeyan.bhargavan@inria.fr> Fri, 17 January 2020 10:31 UTC

Return-Path: <karthikeyan.bhargavan@inria.fr>
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 D52C6120071 for <lake@ietfa.amsl.com>; Fri, 17 Jan 2020 02:31:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.898
X-Spam-Level:
X-Spam-Status: No, score=-6.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 mMshzTm2wR8m for <lake@ietfa.amsl.com>; Fri, 17 Jan 2020 02:31:39 -0800 (PST)
Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (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 0ABDA120047 for <lake@ietf.org>; Fri, 17 Jan 2020 02:31:38 -0800 (PST)
X-IronPort-AV: E=Sophos;i="5.70,329,1574118000"; d="scan'208";a="336156590"
Received: from wifi-pro-83-077.paris.inria.fr ([128.93.83.77]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 11:31:36 +0100
From: Karthik Bhargavan <karthikeyan.bhargavan@inria.fr>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\))
Message-Id: <5122D3D5-F291-4C30-A3B0-F096C86E2B3B@inria.fr>
Date: Fri, 17 Jan 2020 11:31:36 +0100
To: lake@ietf.org
X-Mailer: Apple Mail (2.3608.40.2.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/lake/-Fx-NVLrZohQ7p8Wy8VNpsDC_-M>
Subject: [Lake] Forward Security with PSK-Only 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: Fri, 17 Jan 2020 10:31:46 -0000

At the virtual interim call, Ekr mentioned how TLS resumption provides a form of forward secrecy (without the need for Diffie-Hellman).
I was not sure whether others on the call understood what he was referring to, so I thought it would be useful for me to write it out in some detail.

High-level Summary:
You don’t need DH for forward secrecy.
If A and B share a PSK and are willing to maintain some state in the form of a session counter, we can build a PSK-based LAKE that does not require DH, but does provide forward secrecy.
The key idea is that after each AKE, A and B derive a new PSK and throw away the old PSK.

———

At the beginning of a session: 
A and B have a PSK K, associated with id I, and a session counter C
(Initially, C is 0, but as we will see in the following protocol, at the end of each AKE, the counter increases by 1.)

A -> B: m1 = N_A, I, C, other_params
B -> A: m2 = N_B, other_params

K_m = HKDF(K, “mac_key”, m1 | m2)
K_e1 = HKDF(K, “ae_key A -> B”, m1 | m2)
K_e2 = HKDF(K, “ae_key B -> A”, m1 | m2)

A -> B: m3 = MAC(K_m, m1 | m2)
A -> B: AEAD(K_e1, msg0, …)
B -> A: AEAD(K_e2, msg1,…)

A and B set C <- C + 1, K <- HKDF(K, I, C+1)
A and B throw away the old PSK K.

--------

The above protocol can be generalized in several ways.
First, A and B need not have exactly the same counter C, instead they could negotiate the MAX of their two counters and derive the PSK corresponding to that counter.
Second, A and B may share both a long-term PSK K0 and an ephemeral PSK K and mix them both together in the protocol above. 
This provides a clean separation between the PSK used for authentication and the PSK used for forward secrecy.
Third, we may use the protocol above as a “fast resumption” mechanism but fall back to full PSK-ECDHE whenever we want.

To conclude, I wonder if we should explicitly consider a mechanism like the above as a requirement for LAKE.
It appears to meet the security goals we have set for PSK-LAKE and it is a good example of what can be achieved without an expensive DH operation.
(Incidentally, the message sizes of the protocol above are very tiny.)

-Karthik