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

Rafa Marin-Lopez <> Fri, 03 September 2021 18:33 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 999AA3A2805; Fri, 3 Sep 2021 11:33:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Status: No, score=-2.096 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id lj6cnqDXIH_6; Fri, 3 Sep 2021 11:33:16 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 94E403A2801; Fri, 3 Sep 2021 11:33:15 -0700 (PDT)
Received: from ( []) by with ESMTP id 183IX6s5030498-183IX6s6030498; Fri, 3 Sep 2021 20:33:06 +0200
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0857220A9C; Fri, 3 Sep 2021 20:33:06 +0200 (CEST)
X-Virus-Scanned: by antispam in UMU at
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with LMTP id Uuqrg-fEXFSN; Fri, 3 Sep 2021 20:33:05 +0200 (CEST)
Received: from [] (unknown []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 891EF2020F; Fri, 3 Sep 2021 20:33:01 +0200 (CEST)
From: Rafa Marin-Lopez <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_F93A85EF-C1BC-4F81-83B3-D3D34D2BA90C"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
Date: Fri, 3 Sep 2021 20:32:59 +0200
In-Reply-To: <YRp7k/qFA0dE+/>
Cc: Rafa Marin-Lopez <>, Dan Garcia Carrillo <>, EMU WG <>, "" <>
To: =?utf-8?Q?Christian_Ams=C3=BCss?= <>
References: <> <YRp7k/qFA0dE+/>
X-Mailer: Apple Mail (2.3608.
X-FEAS-SPF: spf-result=pass, ip=,,
Authentication-Results:; spf=pass ( domain of designates as permitted sender)
X-FE-Policy-ID: 2:15:0:SYSTEM,
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt;; s=DKIM; c=relaxed/relaxed; h=from:message-id:content-type:mime-version:subject:date:cc:to:references; bh=wK4VT/Eu+KjPdg6IxicDph3LE1498zPWZkGl1uh9rFg=; b=QyF28XgKoN8UAtFfotVnIF0A+Zh02//TQRA5yej1uADTnH/sepNYDOOkh54yKoIm9r9CBcUm9Sjh tAh/ertDyIP1+xOzEFw00R4ee6qeXxfDDXGx9D0f0iXAipzNycH4PSyvDjXVGV/emz6zYDRuVBxy IwrKqVQOUFDE8mfIxRaUaXdCX1r8kvag0QH2S6QEat7Zy0Nxb0qkvWpH6pREB5SYLg39FhE/FDu7 3o9s4qUrthyvSxP+gwKM/yuwqLNvYgHRoISBML7p3CyeJoMCuGcSDb1jAuyvXDP9RgpZFxN4JaG/ yQ0mAQ6FChXKQ6nMxfQljSjJZYwOLo5XVTdBhQ==
Archived-At: <>
Subject: Re: [Ace] About securing last exchange CoAP-EAP
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 03 Sep 2021 18:33:22 -0000

Hi Christian:

Thank you for comments. See our comments inline.

> El 16 ago 2021, a las 16:52, Christian Amsüss <> escribió:
> 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)?

What you mentioned was something we already considered but we do not see how it would solve the problem. Let me explain. According to OSCORE RFC , Section 8.2 - step 2:

"If either the
       decompression or the COSE message fails to decode, or the server
       fails to retrieve a Recipient Context with Recipient ID
       corresponding to the 'kid' parameter received, then the server
       SHALL stop processing the request.”

What you mention solves step 2, however the step 5 says:

"If decryption fails, the server MUST stop processing the
          request and MAY respond with a 4.00 (Bad Request) error

However, the OSCORE context with Recipient ID does not have any Recipient key yet, correct?. To make this work, we believe this should happen.

1) The CoAP server should create an OSCORE context with ID but without any key material.

2) When the CoAP message contains the OSCORE ID that hits the OSCORE context without any key material, we would have to assume this is CoAP-EAP: the OSCORE implementation should not discard or give a fail for this coap message but "pass the control" to CoAP-EAP so that we send a altAccept to the EAP state machine so we get the MSK.

3) From the MSK, we derive the OSCORE key material for the OSCORE context with the corresponding ID and update the OSCORE context with this key material 

4) Verify that the received protected coap-message with OSCORE.

5) Then we can get the cleartext information.

For us, this seems a little odd and we do no think it is supported by OSCORE RFC, are we wrong?

Any comment is welcome.

Best Regards

P.D: Dan is processing your review of the I-D. Thank you very much.

> (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).
> BR
> c
> -- 
> To use raw power is to make yourself infinitely vulnerable to greater powers.
>  -- Bene Gesserit axiom
> _______________________________________________
> Ace mailing list

Rafa Marin-Lopez, PhD
Dept. Information and Communications Engineering (DIIC)
Faculty of Computer Science-University of Murcia
30100 Murcia - Spain
Telf: +34868888501 Fax: +34868884151 e-mail: