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

Rene Struik <rstruik.ext@gmail.com> Thu, 11 February 2021 15:05 UTC

Return-Path: <rstruik.ext@gmail.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 0B36D3A1685 for <lake@ietfa.amsl.com>; Thu, 11 Feb 2021 07:05:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 vABORAW49V7j for <lake@ietfa.amsl.com>; Thu, 11 Feb 2021 07:05:26 -0800 (PST)
Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 70E873A167D for <lake@ietf.org>; Thu, 11 Feb 2021 07:05:26 -0800 (PST)
Received: by mail-qv1-xf2f.google.com with SMTP id f18so2660912qvm.9 for <lake@ietf.org>; Thu, 11 Feb 2021 07:05:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:references:from:subject:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=fCXP3mlXgkXPlflRcnSgKjkdKdSvhQWRaId2UwH3u/8=; b=AMTism/g0A4nHkienJtgzgAWNCeIRcWaDPLgsGYmukNYLucIPKwE+JI277mCGzBZaH q8qS7na+aRSmohBCX1gPJrksXr1xc7TO7R03hnfb15UaI90ZxrXd5PHl+K3SuamGw5Q0 lVoFT1G0tRSrt97hGRR0saQKHi2GWnwB6Qx4GZ+dVkekVgol48zTR7G9rghPINhI73ZL K/upUIDMqGoS4hp3a0xVfTqjDbPYctnrkgjx8lkuGKj46c1gae/zQHqesGGokqI2iG7Q 9obLpRQUK+6dap48N9yqafOMFxigbPvfNPJX2SSjMnSE9l/I43kho6+aJDWnNlPExz2T qiqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=fCXP3mlXgkXPlflRcnSgKjkdKdSvhQWRaId2UwH3u/8=; b=rQG0zyljA9OjWSe5mSlGomohHbyK5/CMe9WJFSH0TFN8oZOvgdbq0DeEI8jatVDaig lEAb3IrSG+2y0Ozn2iU0FJib9waT3PIweL7MS8E8csgVxzneXSTAvvPXeSQX0RJRaWfe rpzcwIp0AIm5TZMZnPON8uq9QHZb0xrn1fLnPYu10Fzc7ztJSVSWMh5D35CsU62dPuFg n55qqf63M5K2u8Ku8dAsttB1O40oOpjngbyFqhMzIT0xXEqLzpIIJsok8eE2YRw9lLte 6s+33iqfboQjD9dsP7tyh2PekUcr6BkwlA17ajRnDYfF+z/6lHSdjXKTZmFZRfUHXPBT cNmw==
X-Gm-Message-State: AOAM532Ndhz/6KoNVIgeXiMWN5A2QByhzMwFBa85oGXp4bsot6aV57uo pcAnEhdzvQSNPk+5ZFVfeL3/Lgrd3+w=
X-Google-Smtp-Source: ABdhPJw+zzB5SXJxxU6NWa2EtidoU4bMyD7/kK/1zdkq9k5RwmyJLxdy/UQCesKDA+GfpxHXqyZ1AA==
X-Received: by 2002:ad4:52c2:: with SMTP id p2mr7894187qvs.39.1613055923751; Thu, 11 Feb 2021 07:05:23 -0800 (PST)
Received: from ?IPv6:2607:fea8:8a0:1397:c8b8:8632:a802:fa0d? ([2607:fea8:8a0:1397:c8b8:8632:a802:fa0d]) by smtp.gmail.com with ESMTPSA id s129sm4166081qkh.37.2021.02.11.07.05.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Feb 2021 07:05:23 -0800 (PST)
To: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>, "lake@ietf.org" <lake@ietf.org>
References: <87582CFB-7166-49DB-85F1-E6D389A966F0@ericsson.com>
From: Rene Struik <rstruik.ext@gmail.com>
Message-ID: <fce0ff38-3ad0-49f2-3555-67e3926aac76@gmail.com>
Date: Thu, 11 Feb 2021 10:05:20 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
MIME-Version: 1.0
In-Reply-To: <87582CFB-7166-49DB-85F1-E6D389A966F0@ericsson.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/lake/_SJJ_nPvvHKUq6AVIuY0Q1O5pXk>
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 15:05:28 -0000

Hi John:

Perhaps, it would be good adding ECDSA w/ SHA256 and Wei25519 to the mix 
(i.e., add Wei25519 to the list "EDHOC signature algorithm curve" - see 
[1], Suite Z).

If I understand correctly, the formal analysis assumes specific 
properties (such as - with signature schemes - existential 
unforgeability under chosen message attack). If so and if ECDSA is 
instantiated as specified in FIPS 186-4, this should not make a 
difference for the analysis, compared to analyzing ECDSA w/ SHA256 and 
P-256.

One note: technically, one could use secp256k1 not just for signing, but 
also for key agreement (below, this curve as only allowed for signing).

Ref: [1] 
https://datatracker.ietf.org/meeting/interim-2020-lake-04/materials/slides-interim-2020-lake-04-sessa-ecc-cipher-suites-01.pdf

Rene

On 2021-02-11 3:13 a.m., John Mattsson 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
>
>

-- 
email: rstruik.ext@gmail.com | Skype: rstruik
cell: +1 (647) 867-5658 | US: +1 (415) 287-3867