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

Benjamin Kaduk <kaduk@mit.edu> Thu, 04 March 2021 21:09 UTC

Return-Path: <kaduk@mit.edu>
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 EC6BA3A16AD; Thu, 4 Mar 2021 13:09:08 -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, 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 7siKRFqCO-rG; Thu, 4 Mar 2021 13:09:06 -0800 (PST)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 BDC7C3A16AC; Thu, 4 Mar 2021 13:09:06 -0800 (PST)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 124L8wPx017130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Mar 2021 16:09:02 -0500
Date: Thu, 04 Mar 2021 13:08:57 -0800
From: Benjamin Kaduk <kaduk@mit.edu>
To: Göran Selander <goran.selander@ericsson.com>
Cc: "draft-ietf-ace-oscore-profile@ietf.org" <draft-ietf-ace-oscore-profile@ietf.org>, "ace@ietf.org" <ace@ietf.org>
Message-ID: <20210304210857.GV56617@kduck.mit.edu>
References: <20210304022922.GN56617@kduck.mit.edu> <7D651AAF-74DB-4DE7-A688-DEB5DD2FB4C8@ericsson.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <7D651AAF-74DB-4DE7-A688-DEB5DD2FB4C8@ericsson.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/PKdT6-06Oysm7q6MTegmA5JT7zg>
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: Thu, 04 Mar 2021 21:09:09 -0000

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