Re: [Lake] Security levels for EDHOC for formal verification

Karthik Bhargavan <karthikeyan.bhargavan@inria.fr> Thu, 11 February 2021 16:39 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 B5FEE3A17A2 for <lake@ietfa.amsl.com>; Thu, 11 Feb 2021 08:39:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 rj9vyyqXApqE for <lake@ietfa.amsl.com>; Thu, 11 Feb 2021 08:39:38 -0800 (PST)
Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (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 2C5213A17D0 for <lake@ietf.org>; Thu, 11 Feb 2021 08:39:34 -0800 (PST)
X-IronPort-AV: E=Sophos;i="5.81,170,1610406000"; d="scan'208";a="492541682"
Received: from 89-156-101-160.rev.numericable.fr (HELO [192.168.0.33]) ([89.156.101.160]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2021 17:39:32 +0100
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\))
From: Karthik Bhargavan <karthikeyan.bhargavan@inria.fr>
In-Reply-To: <87582CFB-7166-49DB-85F1-E6D389A966F0@ericsson.com>
Date: Thu, 11 Feb 2021 17:39:31 +0100
Cc: "lake@ietf.org" <lake@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <F36A4003-58EF-491F-A23F-D6B65DD278C0@inria.fr>
References: <87582CFB-7166-49DB-85F1-E6D389A966F0@ericsson.com>
To: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3654.40.0.2.32)
Archived-At: <https://mailarchive.ietf.org/arch/msg/lake/IHvMqffUPHTFdmvH2pzAKfPEOYs>
Subject: Re: [Lake] Security levels for EDHOC for formal verification
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, 11 Feb 2021 16:39:47 -0000

Thanks John,

This is useful information and provides a good basis for discussion.
It is particularly interesting to see the places where you specify that the EDHOC security guarantee is expected to meet (or exceed) TLS 1.3,
because these provide clear goals we’d like to focus on during formal verification.

As Rene says, the proof itself relies primarily on standard crypto assumptions about the underlying constructions, but one of the interesting aspects of LAKE and COSE is that we are trying to minimize message sizes (e.g. by using shorter authentication tags).
It is therefore important to understand the concrete security goals in terms of the expected security level so we can make sure that one of the message size optimizations isn’t unexpectedly breaking the security of the protocol.
Conversely, known the target security level may also allow us to identify new cryptographic optimisations that have not been considered yet.

In addition to the sizes of the crypto keys, it would also be useful to know how many EDHOC session is an intitiator/responder expected to participate in (per day, and over its lifetime.)
How much data do we expect to send in each session?
What is a reasonable compromise window for each device; e.g. would it be ok to refresh the ECDH keys every hour, or once every day?

It would be great to collect a compendium of both usage constraints like these and concrete security targets so we can make sure the protocol (and its recommended ciphersuite) satisfies them.

Best,
-Karthik


> On 11 Feb 2021, at 09:13, John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org> wrote:
> 
> Hi,
> 
> There was a request from Karthik to have specified security levels for EDHOC so that formal verification can verify or falsify the claims. This is not trivial. Below is a first try. Let's discuss if this is enough or if more or different information is needed.
> 
> The design objectives of EDHOC has been to have approximatly the same security level as TLS when the same algorithms are used, but to have much smaller messages. Just like TLS I think the expected security level depends heavily on the chosen algorithms and the method. Method 3 should be comparable with TLS 1.3 with mutual certificate based authentication. Methed 0 is a bit trickier to compare to TLS.
> 
> In general there should not be much difference between EDHOC and TLS 1.3 when certificate based authentication is used. The exported keys should be a bit stronger as EDHOC include message_2 and the for Static DH also the private authentication keys. The Static DH Method with 64 bit tags does not offer the same security level as TLS 1.3 with certificate-based authentication, but should offer better security than TLS 1.3 with PSK authentication and short tags.
> 
> EDHOC can use all algorithms defined for COSE (but maybe you will restrict your work to
> the pre-defined cipher suites). Below are the relevant algorithms defined for COSE.
> 
> EDHOC AEAD algorithm:
> ---------------------------
> AES-CCM-16-64-128
> AES-CCM-16-64-256
> AES-CCM-64-64-128
> AES-CCM-64-64-256
> AES-CCM-16-128-128
> AES-CCM-16-128-256
> AES-CCM-64-128-128
> AES-CCM-64-128-256
> A128GCM
> A192GCM
> A256GCM
> ChaCha20/Poly1305
> 
> EDHOC hash algorithm
> ---------------------------
> SHAKE256
> SHA-512
> SHA-384
> SHAKE128
> SHA-512/256
> SHA-256
> [SHA-1 and SHA-256/64 not allowed]
> 
> EDHOC ECDH curve
> ---------------------------
> P-256
> P-384
> P-521
> X25519
> X448
> Wei25519 (expected to be registered soon)
> [Ed25519, Ed448, secp256k1 are not allowed] 
> 
> EDHOC signature algorithm
> ---------------------------
> ES256
> ES512
> ES384
> EdDSA
> ES256K
> 
> EDHOC signature algorithm curve
> ---------------------------
> P-256 (ECDSA only)
> P-384 (ECDSA only)
> P-521 (ECDSA only)
> Ed25519 (EdDSA only)
> Ed448 (EdDSA only)
> secp256k1 (ECDSA only)
> [X25519, X448 are not allowed] 
> 
> (Non-ECC signatures algorithms are supposed to be allowed as well. I think the draft needs to be updated.)
> 
> Below are two initial ways to express the security level, one as a function of the Mehtod and algorithms. The second as a comparision with TLS 1.3. In general, EDHOC with the weakest options SHALL offer 64-bit security against on-line attacks and 128-bit security against off-line attacks. I think this aligns with TLS 1.3.
> 
> Let me know if this is enough for the formal verification, if you need something different, or if something is missing. It would be good if somebody reviews the information is this mail.
> 
> 
> EDHOC security levels for different aspects
> ---------------------------
> 
> The security level of confidenciality protection against passive attackers should be the key length of the AEAD (128, 192, or 256 bits).
> 
> The security lebel of integrity protection and confidentiality against active attackers should be the tag length of the AEAD (64 or 128 bits)
> 
> The authentication security in the static DH modes are determined by the  tag length of the AEAD (64 or 128 bits)
> 
> The authentication security in the Signature Key modes are determined by the security level of the signature algorithm (128, 192, or 256 bit)
> 
> The integrity protection of some fields are detemined by the security level of the signature algorithm (128, 192, or 256 bit).
> 
> 
> 
> EDHOC security levels compared with TLS 1.3
> ---------------------------
> 
> Method 0 (2* Signature Key ) should offer the same security level as TLS 1.3 with the same algorithms.
> 
> 0. (AES-CCM-16-64-128, SHA-256, X25519, EdDSA, Ed25519)
> 1. (AES-CCM-16-128-128, SHA-256, X25519, EdDSA, Ed25519)
> 4. (A128GCM, SHA-256, X25519, ES256, P-256)
> 5  (A256GCM, SHA-384, P-384, ES384, P-384)
> 
> 
> Method 0 (2* Static DH Key ) is a bit trickier.
> 
> 0. (AES-CCM-16-64-128, SHA-256, X25519, EdDSA, 
> 
> The authentication security level here is bounded by the 128-bit tag. Should offer at least the same security level as TLS 1.3 with PSK authentication with CCM_8, and the other algorithms the same.
> 
> 1. (AES-CCM-16-128-128, SHA-256, X25519, EdDSA, Ed25519)
> 4. (A128GCM, SHA-256, X25519, ES256, P-256)
> 
> Should both offer similar security level as TLS 1.3 with certificate authentication and the the other algorithms the same.
> 
> 5	(A256GCM, SHA-384, P-384, ES384, P-384)
> 
> The authentication security level here is bounded by the 128-bit tag.
> 
> Cheers,
> John
> 
> 
> -- 
> Lake mailing list
> Lake@ietf.org
> https://www.ietf.org/mailman/listinfo/lake