Re: [Emu] [Ace] About securing last exchange CoAP-EAP

Göran Selander <goran.selander@ericsson.com> Thu, 26 August 2021 10:12 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: emu@ietfa.amsl.com
Delivered-To: emu@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C47493A1BFC; Thu, 26 Aug 2021 03:12:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.552
X-Spam-Level:
X-Spam-Status: No, score=-2.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.452, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, 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 IPQbWlncv16Z; Thu, 26 Aug 2021 03:12:34 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70053.outbound.protection.outlook.com [40.107.7.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 175EB3A1BF7; Thu, 26 Aug 2021 03:12:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ag31JVD2X6mThXn5MCDreY2CHprqkxXC0J7tgCp8+eoABcr43dmvjjq+XAl8y9382x/R+1xRppUj3N0X24SosEraV61iFKcYEaEomc6Aof1CoEjIRPwgaUQ+oaDCWkh0XU6EMwJ6wTW9PR4R2byVlVAq3f9mPCIfgX42i0JakxyxDFd/nmC/ygUdhk4KllIOY2/kX6Yg1HdtX1l04Ma+HsPoWRtOyMYY9Pgtt+YNFPARqqNBWb9Kw6KE3y/EBnYfZVpab6zsNCvWMOD47w+ipkUCXdd3qmm4iaBsSVo9PeoR3hwe1fjpXC9FHZFeWj8hr1FC3PSJh3xw8uZi5ZTPjg==
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=qC6GV/ZTbM+WaLQLegLDnEyxn/sPKh1n0+Y4Ee/NWQg=; b=O+bq7Gs+6f9hk3aDivLjmhLiziO46GtAqAMd6+u8JF38L2/fDxoKyhdCRgbSVjMyV7X6O1CGvHsiPY/X5nEGruR2o1uvY9p5Anr42gCIh6MXA+htQ8SPew7IVE0an9inglNJm9fUjSdl1Sykx3PVmRYH4QMO1fPvUDc4AGOz8AWTkBa9aWW9Nago2HTJZxhULUPifSl83BoPyfjh2uf9LjBpIavayfBdevsAJUKdp4Scbcx7t9a6vjirSQ0p+ozcLPRXuhxiR+sFqEit4xyrnMJe2Gm/VJIg0nFJEjBRrdVns5huG+mNM4nm6Jo6cnWv+0Y9oOKKN8ftu4SWtKuTPw==
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=qC6GV/ZTbM+WaLQLegLDnEyxn/sPKh1n0+Y4Ee/NWQg=; b=GUoecy7IrAOED5/bp4FFmSkcDRtutrxmb4NCPT1Mroz9EqPaUYEZqjEIGVAbFWH3DbyDe2zxuG6IaqxNbfL/Nhz6DJG4nCbJFyh2BvTQC8xjMYyuFf2B+xwgwaxUUq97f1Cs9ffmICM9vTo9/fObd+mcoUGFoK8jb7vgzdMYnH8=
Received: from HE1PR07MB3500.eurprd07.prod.outlook.com (2603:10a6:7:31::20) by HE1PR0701MB2825.eurprd07.prod.outlook.com (2603:10a6:3:53::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.12; Thu, 26 Aug 2021 10:12:30 +0000
Received: from HE1PR07MB3500.eurprd07.prod.outlook.com ([fe80::a141:8e66:ce19:813d]) by HE1PR07MB3500.eurprd07.prod.outlook.com ([fe80::a141:8e66:ce19:813d%7]) with mapi id 15.20.4457.017; Thu, 26 Aug 2021 10:12:30 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: Christian Amsüss <christian@amsuess.com>, Dan Garcia Carrillo <garciadan@uniovi.es>
CC: EMU WG <emu@ietf.org>, "ace@ietf.org" <ace@ietf.org>
Thread-Topic: [Ace] About securing last exchange CoAP-EAP
Thread-Index: AQHXkq5dqXB/T9ltuEqcQ8klioMr+6uFweqA
Date: Thu, 26 Aug 2021 10:12:30 +0000
Message-ID: <BB962406-48C4-4BE8-B13F-8D55291964E6@ericsson.com>
References: <07cd0942-9ee0-b124-b3a7-649f262d7c9e@uniovi.es> <6d2a20fc-7b79-4555-840e-d57f686be42f@VE1EUR02FT003.eop-EUR02.prod.protection.outlook.com>
In-Reply-To: <6d2a20fc-7b79-4555-840e-d57f686be42f@VE1EUR02FT003.eop-EUR02.prod.protection.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.52.21080801
authentication-results: amsuess.com; dkim=none (message not signed) header.d=none;amsuess.com; dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 48b8d7a8-8e14-4596-530e-08d9687a036f
x-ms-traffictypediagnostic: HE1PR0701MB2825:
x-microsoft-antispam-prvs: <HE1PR0701MB2825EABF992A1CBDBA26D145F4C79@HE1PR0701MB2825.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: zZV+UnZ4Te64DjTe0aBvpgY/d2AbEjY/Te62NoFIu2mWTNPUiDqKs77MKEcv644n9HP+gvl70N7Pq1LYnT05cihL0KUCVeoen6dE5anVn3+vRMxAqsxo1Wi/MVyBVJ5TxNnW6e7rLpWeljb68qHuYcdJRiihQ4zSXvSJaOeFuUgAH18klDrfoo50dDXNsKhOoxMFo6OgIDkxq61CT1K5VAVfOCQrlh3HbEuuudXtZl3EYI1WdBHqRcld3WI2U57pj6AQb3OaY5AAJYKKihK7UE8MQHD2Smi7NwgTyZez+X4oujpgmPyDzestYD24+y/vm3qzLuaQlL8ewUPk5b+qAQJf2DQyxy02o12u2MXr8qSd9WxQZWDoaf+ZAyPK9eykpx1IW4p7wLLMXut3AgJKRyDD64QJwcfEY2jLHjMhdrcsjQsc2k6Z/efRsuP+lyZFrq8CHZT8oznMVgkRS3MxP6IHvjFQX0TMcPGpO9eqzAmgLvQa3BqkM47JB+XPYymrQnmlt9SNgHuIUfwL8pOm4i4gjK/Hj5J2L1tUeq+gRh0Z9hpPdY3Vu9TUqnDHCu4v130KwQVluHqTLrkzUKgYavYW08C3OcEE5DZT4hyzTQbx8A65/XB0pLTwHnekQK91EBKZ7595144cso/C46MAB7+2mis1xQDO6DUt69u1NNhmxMNGP1NYZTqQmw/C/F0qFLOEfhENZG/E8zKupGKblVyOTPXoP+r30vnohatSi/5FdPr9zlqvRkzXiFhrYxT9
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR07MB3500.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(346002)(376002)(396003)(5660300002)(38070700005)(53546011)(6506007)(2906002)(6486002)(110136005)(6512007)(85202003)(478600001)(2616005)(316002)(86362001)(54906003)(85182001)(4326008)(66574015)(122000001)(38100700002)(8676002)(36756003)(83380400001)(76116006)(186003)(26005)(66946007)(66476007)(66556008)(64756008)(66446008)(8936002)(71200400001)(33656002)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: YBlVsBu5DmKaiBJg4+Z0FG87lXQNDNOmipmTvrfhVN2zI3AWoF3Xib9dEgFqwJCA9bhJem9WuKaoV/UaAH0sWURCG2Fgzw6UD2/rZL67vc3khg24x4RLl6Xh64tiUksR30lI6o9NclrOsZzvVUcl4zlfeX9czyrnwA3qszradc9iRiAADO3LutbOHAURAAvv2UJmL0xUx26tyMRpXtBTW+y+LttfRyi1/PANrs5UOqJYkFLujqa188C0BZR0t1TkXCotsL0E5Bc/m64KRqBJuvCfuVFVsi8bro0UzKgE6Z0Ck5SSvIkIF1NOEmiCEkbKTKHYR/cN1lJJLkPAvNoT5bjzj3m8UCh03JB5fbQyg9cr1sR8GWIaKn+dRET/56t9Cugs/VLtcqg6zL5rZe0XGc1oZqjWh4sbObNqlIl4iGEfolzGK1WpJyBipFhxI7fUvHDX0QA7pI2LwcAsjwpgD0RF9bzRX+C6bbfrW4tzvdRM56ADg8R9RKAA7GdMATR/x/CcpnogsYIbE6VwmhOgunXUWg/hK+DEMFtcRFm1K6+URGkL0XG7XLER8BGECvZoTDpgHXOXRkmJNSjTCO2sTT/WjlFpUsYjmhB9s2lGOK+I5vamWmHfnaJy0ow5Xlwno+aybyohkEsfY3svOd4OYfxVr4qTTbADZPoW1PCQCeCirTHJ8pB9i+ulrKbEqIkbgomCxARGZYB0IvE43WQJfq34eZPurBtQYHVDiojpNfZCy/vQCiReBf9fLVOtFSR7MTGzEa7Rhh6vzmt8EK7Ws7P5CRXMbEu+AtTsJ73dcL8F6BtmQ+y2SKUCZMw2br4bA8VrsnldMgUjddmDq2Rey8zdm+G5FOd18/eO1++D2O6hzXaXmPQ2yHOZWvTT2x1RBipEMRSt1p9O1Z+cpaXq3Eyt7lr6ue0McCgMlTBPBWIgWQu1lkTuFvraGAvH4Fw3zSbNF97EJFOOuSpjV4PacyTS/eTcPz2nJzj5VAxlyWKwAFc0YrUlD+kY0Ku9LQkvY/1BLG6bA/pkkTkZEWYiMeOYLrwNjKRQseInNyFu3IQ//CmWqc93gJcIgYMZxizWNl7ebLH6yz4TpDACcWZcCuh6nqfGcuwmd4/56ptaJQ9qUhwnPghTR7unnPAqToelbcn642/0BLrBs2l/snCZSes3zaqsZ2CYfNCA7oVpGDa8ojTbOZ+bebyWl/NVstJ6JxunzHw3hjqNE92AWnx46Lqgh5b9X41z+AlHXvawnzzAxt+6dRtVzo2qs/wIGpi3htmdF8rB6XkfqqrEZCuYPuUDsuE7xrNYFFYSpSw3/MuqniRb30cWDUjdQFIrgn2T5zy1M0tPyoTth6o+H/IVEA==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_BB96240648C44BE8B13F8D55291964E6ericssoncom_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR07MB3500.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 48b8d7a8-8e14-4596-530e-08d9687a036f
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Aug 2021 10:12:30.1312 (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: Om2fdKTXCJ8lekIJmWwDZ/kAvy9M/Q8zAev90T8PaPW+bm8YecHBAAT+ihnUyYhi6ckTu5v8aeU0o3YKMATxqzPigGxb1TZ38vbLL/vUv9Q=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2825
Archived-At: <https://mailarchive.ietf.org/arch/msg/emu/I1f8QKyUCk0x-ONWbZzW4ZKxJf0>
Subject: Re: [Emu] [Ace] About securing last exchange CoAP-EAP
X-BeenThere: emu@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "EAP Methods Update \(EMU\)" <emu.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/emu>, <mailto:emu-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/emu/>
List-Post: <mailto:emu@ietf.org>
List-Help: <mailto:emu-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/emu>, <mailto:emu-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Aug 2021 10:12:41 -0000

Hi,



Here is a late response to this thread (see first mail at the end).



On 2021-08-16, 16:52, "Ace on behalf of Christian Amsüss" <ace-bounces@ietf.org on behalf of christian@amsuess.com> wrote:



    Hello,



    On Sat, Aug 14, 2021 at 01:37:06PM +0200, Dan Garcia Carrillo wrote:

    > As such, CoAP server (left side) could not see the content of the CoAP

    > message (message 7) without deciphering it. Moreover, as the URI-path is

    > also ciphered we cannot point to the right application to process the

    > message to achieve an alternate indication of success.



    If the recipient ID were available a bit earlier (and not derived from

    the MSK), would it then be viable to infer from the OSCORE ID that this

    is the last message, process an "EAP success", and start derivation just

    to extract the session lifetime (and thereby confirm the keys)?



    (That'd be all assuming that the "EAP success" contains really just the

    EAP success code and no further information, which would be "compressed"

    into the "some OSCORE is sent on this" information, and that the

    Session-Lifetime does not need to be known to advance the EAP state

    machine).



[GS] If I understand right, MSK is not intended to be available from the EAP state machine until "EAP success" has been declared, which creates a problem to protect the message carrying the "EAP success" with MSK or key derived from it. Even if EAP success would only be integrity protected, there is still need to access the key to verify the integrity of the success message which is a catch 22.



As far as I understand the two proposals (by the authors and by Christian) they are both opportunistic: preliminary declare success, get the MSK, derive the key, and attempt to verify the message. But it was not clear to me if success can be "withdrawn" or what happens if the message doesn't verify.



Or conversely, if success can be declared opportunistically before access to MSK and without verification of message 7, then why not do that already before reception of message 7, and withdraw if it doesn't verify?



Other alternatives:



* If the mapping from EAP to CoAP client/server is instead reversed, then message 8 would be a CoAP request which can be protected by OSCORE using a key derived from MSK since it is by then available. This would add a message 9 (10% of the total no. of messages) for key confirmation in the other direction.



* Alternatively, OSCORE may be started after EAP is concluded. This would add another message exchange but that exchange could be normal traffic and thus not add to the number of messages, if key confirmation can wait until there is traffic. An extra exchange for key confirmation can be added only in use cases it can't wait and there is no traffic, whatever those are. There is a similar setting in LAKE, where EDHOC has an optional message 4 if explicit key confirmation cannot be obtained otherwise.





Göran









From: Ace <ace-bounces@ietf.org> on behalf of Dan Garcia Carrillo <garciadan@uniovi.es>

Date: Saturday, 14 August 2021 at 13:37

To: EMU WG <emu@ietf.org>, "ace@ietf.org" <ace@ietf.org>

Cc: "garciadan@uniovi.es" <garciadan@uniovi.es>

Subject: [Ace] About securing last exchange CoAP-EAP



Dear ACE and EMU WG members,



In the last exchange of CoAP-EAP we intended to run OSCORE to achieve key confirmation, a protected EAP success and the establishment of the OSCORE security association. It was our understanding that only integrity protection was possible but it is not the case after consulting OSCORE authors. More specifically, the payload and URI-Path with OSCORE are class E they are ciphered (and integrity protected) and, as far as we understand, there is no option, currently, of using a NULL encryption suite to achieve only integrity.



             CoAP                                     CoAP

            Sever                                    Client

                               ...

           5) |<----------------------------------------|

              | ACK [0x9869]                            |

              | Token (0xac)                            |

              | 2.01 Created Location-Path [/a/z]       | MSK

              | Payload EAP-X-Resp (n)                  |  |

           6) |---------------------------------------->|  v

              |                CON [0x7811] POST /a/z   |OSCORE

              |                  Token (0xac), OSCORE   |CONTEXT

    MSK       | Payload (EAP success||Session-Lifetime) |(*)

     |     7) |<----------------------------------------|

     v        | ACK [0x7811]                            |

   OSCORE  (*)| Token (0xac), OSCORE                    |

   CONTEXT 8) |---------------------------------------->|

              (*) Protected with OSCORE



As such, CoAP server (left side) could not see the content of the CoAP message (message 7) without deciphering it. Moreover, as the URI-path is also ciphered we cannot point to the right application to process the message to achieve an alternate indication of success. However, the MSK required to create the OSCORE context, which allows deciphering the message, is not available yet (even though eapKeyData variable has content). The reason is that, according to EAP state machine (RFC 4137) Figure 3, the MSK becomes available (eapKeyAvailable = TRUE) when EAP success (rxSuccess or altSuccess from the EAP lower layer) is sent to EAP state machine.



rxSuccess &&

    (reqId == lastId) &&

    (decision != FAIL)

             |

             V

__________________________

|______SUCCESS_____________|

|if (eapKeyData != NONE)   |

|   eapKeyAvailable = TRUE |

|eapSuccess = TRUE         |

|__________________________|

             ^

             |

(altAccept && decision != FAIL) ||

    (idleWhile == 0 &&

     decision == UNCOND_SUCC)



Our proposed solution is to generate an authentication tag in the form of a COSE object that will be used to integrity-protect the payload of message 7 and message 8, allowing the EAP peer to see the EAP success and sending it to the EAP state machine so that, after obtaining the MSK, verifying the authentication tag in message 7 (key confirmation). After message 7 is processed correctly, CoAP server will be able to generate the OSCORE security context and after processing message 8 CoAP client (right entity in the exchange) will create the OSCORE context. From this point CoAP messages between both entities can be protected using OSCORE context.



             CoAP                                     CoAP

            Sever                                    Client

           5) |<----------------------------------------|

              | ACK [0x9869]                            |

              | Token (0xac)                            |

              | 2.01 Created Location-Path [/a/z]       |

              | Payload EAP-X-Resp (n)                  |

           6) |---------------------------------------->|

              |                CON [0x7811] POST /a/z   |

              |                          Token (0xac)   |      MSK

              | Payload (EAP success||Session-Lifetime  |     |  |

  MSK         |           || AuthenticationTag)         |     v  |

  | |      7) |<----------------------------------------|AUTH_KEY|

  | v         | ACK [0x7811]                            |        |

  |AUTH_KEY   | 2.01 Created Location-Path [/a/z1]      |        |

  v           | Token (0xac)                            |        |

OSCORE Context| Payload(AuthenticationTag)              |        V

           8) |---------------------------------------->|      OSCORE

                                                               Context