Re: [Ace] minor comments on draft-ietf-ace-oscore-profile-16

Göran Selander <goran.selander@ericsson.com> Mon, 08 March 2021 11:24 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F237A3A0936; Mon, 8 Mar 2021 03:24:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.349
X-Spam-Level:
X-Spam-Status: No, score=-2.349 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.248, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 we9ka8RSJD9U; Mon, 8 Mar 2021 03:24:20 -0800 (PST)
Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50065.outbound.protection.outlook.com [40.107.5.65]) (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 22C443A0A9E; Mon, 8 Mar 2021 03:24:19 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRnLh25nf2ZoEiXtv5QhKMMr9SlJnxwVEWDe1MH5P2LhutbdCw9bBYcS/Z55PewxEQvalH4cGHoyLx8bUXDf0wGAynC4uBs5pKIVqLDBBo3Af21GjrY6ZFzAaXnpblaELSUu0xGNCY6pZgjD3NrfGXp5pZ7OPftr81whH81AMe1KAtcNLAgAYqTKz5R+u+AyF0jNTINJK9UlVtV7KCrEYnORwp3cUVACQpLmDA3Nerk0kjXuz2eeNd2gln8jnoQDjYDTuXGVxz3uejbygDrPzh/+WlTJMeEQSOcP19T6Ykq6KkE+pqSdjT3WvxqyX4+PLUwAwxQf/N7/gmoTxkon9Q==
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=4524RgWm0UY4qcHBf5LKn+t3PmoHkw1BqAikY68ZCos=; b=EItF27BXpRefK8cCmIdBmzWWN0wOyJ0siCSp22b2E7vhaLXpZ1XWkpl3mWwgYfcFdRzRfyZ3/W4nJ2QxoSwrPQJZQcgkq0EznS0HjZXvDtvcPSnTmf3gqBVFKavIDChSYUOKVSsRU9uJjdYHWxkz4ayKcEiHvxqOhZfNGF9YZCroECgIXlH0ur7LYWgAv628kEpyD1GIYxTCFr6gk+vbryndNWyyG+OFFSfbVbZaPe+dRRzRWr3JOBNAb75V5Qe7/Pq3iTN0xM2Q0JsyKs7U8Y6AwcvLvAd3P67yx97x9sJ7iW36XSVvd0ncdcmhMghjeIlpr0oEiGGNgcfZX8BD8A==
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=4524RgWm0UY4qcHBf5LKn+t3PmoHkw1BqAikY68ZCos=; b=vYkxxZ9+BNrFpbJLyePjca7SlpYanzDasaqV7hifxqjZTKPweSh9z5Rh0iY56bQJsbM7Vr+LHLGCnKOYEKjL3Y/7C0/KlYLdNCqZ/4qKUNdXoOc+kp5BP2YyTRKGn83wA999Y/PQGB/FkRo2KHP1rWUNEWh4HzVpEtqg7lqFCCs=
Received: from HE1PR0702MB3674.eurprd07.prod.outlook.com (2603:10a6:7:82::14) by HE1PR0701MB2297.eurprd07.prod.outlook.com (2603:10a6:3:6e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.24; Mon, 8 Mar 2021 11:24:17 +0000
Received: from HE1PR0702MB3674.eurprd07.prod.outlook.com ([fe80::588f:43b1:d981:5bc8]) by HE1PR0702MB3674.eurprd07.prod.outlook.com ([fe80::588f:43b1:d981:5bc8%5]) with mapi id 15.20.3912.027; Mon, 8 Mar 2021 11:24:17 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: Benjamin Kaduk <kaduk@mit.edu>, "ace@ietf.org" <ace@ietf.org>
CC: "draft-ietf-ace-oscore-profile@ietf.org" <draft-ietf-ace-oscore-profile@ietf.org>
Thread-Topic: minor comments on draft-ietf-ace-oscore-profile-16
Thread-Index: AQHXEJ5E+BYySV+PiEK9WInHmkhHtap0E1+AgABAkoCABba7AA==
Date: Mon, 08 Mar 2021 11:24:17 +0000
Message-ID: <772747A5-E0F7-4934-B97B-7227D360F4A7@ericsson.com>
References: <20210304022922.GN56617@kduck.mit.edu> <7D651AAF-74DB-4DE7-A688-DEB5DD2FB4C8@ericsson.com> <20210304210857.GV56617@kduck.mit.edu>
In-Reply-To: <20210304210857.GV56617@kduck.mit.edu>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.47.21022404
authentication-results: mit.edu; dkim=none (message not signed) header.d=none;mit.edu; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [83.249.67.87]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 91e94e4b-88bb-4253-df03-08d8e224b60f
x-ms-traffictypediagnostic: HE1PR0701MB2297:
x-microsoft-antispam-prvs: <HE1PR0701MB22975D6AE1AF52C412A3DFAFF4939@HE1PR0701MB2297.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: zdYhWoxkiNxjt28eqf/omOpoGh+T6/ITW76sFglGvGBJ4kq1xeRvup7robWbvj8k9aBpKg39EDhsgFGmTSl5DcdXSOY1+jeZacPV4Oc3tL1cVlZFG45YGgRCh24OwoJJTQbkRsaT6a5r3BaPkKKtO5MfxWgGvRTzERaGX4cC5+qhgRaGFqCbYK4ABxXH/9B2BrBzXAresmPowgf7XeJPdwCldkC4grRsqKFkeRkx82pJCUX3wxV/1Z+g2PfPcwhhWFLwlMkm+YrG4ozwJc/p558HhdYxQRcqpKz9zdxgQ2lgzYwwjwNyI+R6l2jcUvXz7tTiGcTovZ5WkaI18VjfrYEa+7dmLMDBLz2Ou1X9zIXCFBudRih/SMw1ecbhBB0JnqWfhBlQaAPpyzbO3TouqeBROeD5OmnRgZXZwI+LEb2tNQ54LAvRDO6d069G7iadxaEac+fmRT+zcJgceMiYiC+Ytc0gQbexzJH6GKSf1cyvPx6oPXXA10EgmRUCH618I02+/bnqSE6GfEkz91yj2rfpduSe4EyrqrMZ1Qi7T3HdgTe/iv4SFunrOsYjP2Px3NgcPspGflf7HXbk/EVsVu6xSbD7vkwLDJBWwQjwoOXQ3pJm+bQp5DzEYd3HoB0S
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0702MB3674.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(366004)(396003)(39860400002)(66574015)(4326008)(85202003)(36756003)(83380400001)(71200400001)(33656002)(66556008)(2906002)(86362001)(478600001)(64756008)(66946007)(66476007)(6506007)(53546011)(66446008)(5660300002)(2616005)(8936002)(76116006)(85182001)(6486002)(186003)(6512007)(8676002)(26005)(316002)(110136005)(45980500001); DIR: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Pq7tXNnkOtCtyXVV5d2GZTTI+10fb/aND21SLFmJVh1MEIoYPnNnnA24N0v33hovqlNJLKzyt3Z4ICQnQEVcEh+j7Fggfs7qIX2H37quAK6sntQNT77u6dVI2BfQSWxDCWkdtMomPFOeAwLeYae1nK93WyxxgtJNR3EJ1Bghhkb84I8iQ5KrHldTJ5JcFhq0loHLMtM9Tlt2u9uRTEsuj/lDyLRuoJNyU7xKR70evElKTo3fuDnIJPXL+VePPemmvJqWsSiBXmJLVSR86bK4z9JHM142M9igh38iGbNP
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <65F289194DE7B846891A71205D543AE3@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR0702MB3674.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 91e94e4b-88bb-4253-df03-08d8e224b60f
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2021 11:24:17.3029 (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: kQHDJ2Z0rJxnUSnml2ObuFjPjTjtiJjLq+Khr0L4Qz4bn2d/TNsjw90CtEP24IPkV0og2udARQd5GYr831j+BJKb6JQqag3/J2gaxISlEoU=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2297
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/eCDhPZntPaChDP9fkH3M2LcvhZQ>
Subject: Re: [Ace] minor comments on draft-ietf-ace-oscore-profile-16
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Mar 2021 11:24:22 -0000

Hi Ben, and all,

I just submitted -17 based on Ben's comments in this mail thread, and also a change of a security consideration.

* "mutual authentication" removed from figure
* the changes proposed below are all included, and further changes to the same effect

When I went through the  61 occurrences of "nonce" I found a description of an attack which I thought needed to clarified. Please review.

OLD
If that is not guaranteed, nodes are susceptible to reuse of AEAD (nonce, key) pairs, especially since an on-path attacker can cause the client to use an arbitrary nonce for Security Context establishment by replaying client-to-server messages.

NEW
If that is not guaranteed, nodes are susceptible to reuse of AEAD (nonce, key) pairs, especially since an on-path attacker can cause the use of a previously exchanged client nonce N1 for Security Context establishment by replaying the corresponding client-to-server message.


Göran



On 2021-03-04, 22:09, "Benjamin Kaduk" <kaduk@mit.edu> wrote:

    On Thu, Mar 04, 2021 at 04:17:52PM +0000, Göran Selander wrote:
    > Hi Ben,
    > 
    > Thanks for good comments. 
    > 
    > Starting with the second comment, I agree the text "mutual authentication" in the figure should appear after the first exchange. It seems to have been left and forgotten during the ASCII art session. It is described in Section 4 so could be removed from the figure if it isn't possible to find a place for it to print well.

    Sounds reasonable.

    > On 2021-03-04, 03:29, "Benjamin Kaduk" <kaduk@mit.edu> wrote:
    > 
    >     Hi all,
    > 
    >     I was going through the four drafts that have been "waiting for writeup"
    >     for a while, to check that the latest changes are good and they are ready
    >     to go once the last point from the secdir review of
    >     draft-ietf-ace-dtls-authorize is wrapped up.  In short: they are, but I had
    >     a couple comments on the OSCORE profile that might help improve it.
    > 
    >     In section 2, we have some discussion:
    > 
    >        The use of nonces during the exchange prevents the reuse of an
    >        Authenticated Encryption with Associated Data (AEAD) nonces/key pair
    >        for two different messages.  Reuse might otherwise occur when client
    >        and RS derive a new Security Context from an existing (non- expired)
    >        access token, as might occur when either party has just rebooted, and
    >        might lead to loss of both confidentiality and integrity.  Instead,
    >        by using nonces as part of the Master Salt, the request to the authz-
    >        info endpoint posting the same token results in a different Security
    >        Context, by OSCORE construction, since even though the Master Secret,
    >        Sender ID and Recipient ID are the same, the Master Salt is different
    >        (see Section 3.2.1 of [RFC8613]).  If nonces were reused, a node
    >        reusing a non-expired old token would be susceptible to on-path
    >        attackers provoking the creation of OSCORE messages using old AEAD
    >        keys and nonces.
    > 
    > [GS] Here is a proposal to address your first comment. There are already nonce qualifications in partial use so it didn't make sense to me to insert extra adjectives on every occasion. See below.
    > 
    >       The use of nonces during the exchange prevents the reuse of an
    >        Authenticated Encryption with Associated Data (AEAD) nonces/key pair
    >        for two different messages. 
    > 
    > [GS] In the sentence above the difference between the nonces should be clear, right?

    Yes, though if we name N1 and N2 (so, "the use of nonces N1 and N2 during
    the exchange") that would let us use N1 and N2 as disambiguators later in
    the paragraph, if we need to.  (We may not need to use the names N1 and N2,
    though.)

    >       Reuse might otherwise occur when client
    >        and RS derive a new Security Context from an existing (non- expired)
    >        access token, as might occur when either party has just rebooted, and
    >        might lead to loss of both confidentiality and integrity.  Instead,
    >        by using nonces as part of the Master Salt, the request to the authz-
    > 
    > [GS] "Instead, by using the exchanged nonces as part of the Master Salt, ..."

    +1

    >        info endpoint posting the same token results in a different Security
    >        Context, by OSCORE construction, since even though the Master Secret,
    >        Sender ID and Recipient ID are the same, the Master Salt is different
    >        (see Section 3.2.1 of [RFC8613]).  If nonces were reused, a node
    > 
    > [GS] "If the exchanged nonces were reused, ... "

    +1

    >        reusing a non-expired old token would be susceptible to on-path
    >        attackers provoking the creation of OSCORE messages using old AEAD
    >        keys and nonces.
    > 
    > [GS] "... the creation of an OSCORE message using an old AEAD key and nonce."

    +1

    > [GS] In the rest of the document we would use nonce without qualification as it is referring to the exchanged value. Is that clear enough or do you want a consistent adjective throughout the draft?

    My expectation is that the rest of the document is clear enough as-is, and
    that only this portion needs special treatment since it's specifically
    talking about the risks of "nonce reuse" for a different type of nonce.

    Thanks for putting this together,

    Ben