[core] Secure CoAP multicast overhead (was: OSCOAP -02: sequence number reuse?)

Göran Selander <goran.selander@ericsson.com> Thu, 23 March 2017 07:30 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C3D6129C6F; Thu, 23 Mar 2017 00:30:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.22
X-Spam-Level:
X-Spam-Status: No, score=-4.22 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=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 sRLDViC-1R-x; Thu, 23 Mar 2017 00:30:19 -0700 (PDT)
Received: from sesbmg23.ericsson.net (sesbmg23.ericsson.net [193.180.251.37]) (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 1033E129C6C; Thu, 23 Mar 2017 00:30:18 -0700 (PDT)
X-AuditID: c1b4fb25-0b71498000002d78-cd-58d37988d538
Received: from ESESSHC023.ericsson.se (Unknown_Domain [153.88.183.87]) by (Symantec Mail Security) with SMTP id 6B.8B.11640.88973D85; Thu, 23 Mar 2017 08:30:17 +0100 (CET)
Received: from ESESSMB107.ericsson.se ([169.254.7.125]) by ESESSHC023.ericsson.se ([153.88.183.87]) with mapi id 14.03.0319.002; Thu, 23 Mar 2017 08:30:16 +0100
From: Göran Selander <goran.selander@ericsson.com>
To: Christian Amsüss <c.amsuess@energyharvesting.at>
CC: "draft-ietf-core-object-security@ietf.org" <draft-ietf-core-object-security@ietf.org>, "draft-tiloca-core-multicast-oscoap@ietf.org" <draft-tiloca-core-multicast-oscoap@ietf.org>, "core@ietf.org" <core@ietf.org>
Thread-Topic: Secure CoAP multicast overhead (was: [core] OSCOAP -02: sequence number reuse?)
Thread-Index: AQHSo6dQCKn2J+dYo0GoWNIgyoRO5g==
Date: Thu, 23 Mar 2017 07:30:15 +0000
Message-ID: <D4F92CD9.7A52C%goran.selander@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.7.1.161129
x-originating-ip: [153.88.183.150]
Content-Type: text/plain; charset="utf-8"
Content-ID: <7A9924CA54D1E448AA527526FCD9E591@ericsson.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRmVeSWpSXmKPExsUyM2J7uG5n5eUIg0PLeS2WX3jOYrHv7Xpm i2n/zrBYbG+5zurA4rF1/10mjyVLfjIFMEVx2aSk5mSWpRbp2yVwZfycMIe14I1ixYL5Z1ga GP8odDFyckgImEicn7iHvYuRi0NIYB2jxJpT7WwQzhJGiaYNv9hBqtgEXCQeNDxiArFFBDwk Ji79AtbBLHCfUeLT7OlgCWGBKIkH585DFcVLTNz0GMrWk1j/bzNLFyMHB4uAqsTVBxUgYV4B C4lJRxaAlTAKiEl8P7UGzGYWEJe49WQ+E8R1AhJL9pxnhrBFJV4+/scKYosCjVz+fA1UXEli xfZLjCDjmQU0Jdbv0ocYYy1x6+4JZghbUWJK90N2iLWCEidnPmGZwCg6C8m2WQjds5B0z0LS PQtJ9wJG1lWMosWpxUm56UbGeqlFmcnFxfl5enmpJZsYgRF1cMtv1R2Ml984HmIU4GBU4uEt mHgpQog1say4MvcQowQHs5IIr283UIg3JbGyKrUoP76oNCe1+BCjNAeLkjiv474LEUIC6Ykl qdmpqQWpRTBZJg5OqQbGznA2rekLLE5MUjFcdubBIlOL9V/frg1fvt92W5JLfegC66Z1B+/d qWsrV7vqxdL7/lt17N+5KZo/pnfdPbuIuSvFeXFYuajOysT7ZerF/219by58dOFgjQbD54ps lxCJ0uMyYlY++TuWVZl7brrwvb3I4yiDlpPTx9tvbkd2KQZO47mv80FTiaU4I9FQi7moOBEA onuduKQCAAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/KVu3YFDlXurQGYylx3HRRzdWPpo>
Subject: [core] Secure CoAP multicast overhead (was: OSCOAP -02: sequence number reuse?)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Mar 2017 07:30:22 -0000

Hi Christian,

(continuing the discussion in a new thread)

On 2017-03-22 16:49, "Christian Amsüss" <c.amsuess@energyharvesting.at>
wrote:

>On Wed, Mar 22, 2017 at 10:17:02AM +0000, Göran Selander wrote:
>> Judging by your proposal you got the point despite these errors. I’ve
>> updated the draft, please check if I got it right:
>>
>> As an exercise, verify that this construction works even if client and
>> server change roles. And also with Observe in that case.
>
>As I read it now, it should work. (Without observe and role reversal, it
>works in my implementation, the rest is pending but requires some more
>streamlining in the API).
>
>Where I do see trouble coming up is when the multicast proposals get
>warmed up again.

They already are :-) See below.

> For then, I can envision at least two solutions[1], so
>I suppose we're good.
>
>Best regards
>Christian
>
>
>[1]: (Diverting this into a footnote so it's on record, even though it's
>not relevant for this thread itself, but might spin off a new one for
>multicast:)
>
>* Approach A: Unless only one node that is allowed to do requests, all
>  responses must bear a sequence number of their own instead of
>  mirroring.
>
>  This adds back the sequence numbers to the message length. (As the
>  multicast responses probably need the KID as well, this just means
>  that the compressed responses take the [partIV, kid, ciphertext] form.

Correct, and this is essentially how it is specified in section 5 of:

https://tools.ietf.org/html/draft-tiloca-core-multicast-oscoap-01

The only additional message field is a group/context identifier to allow
nodes to be part of multiple groups. (And a countersignature to address
use cases where source authentication is important.)

>
>* Approach B: Allocate not 1 but n "mirror spaces". This would take
>  ceil(log2(n_participants)) bits off the sequence number range, but the
>  responders would then only need to send their KID (sender ID) and the
>  ciphertext.
>
>  (Basically they'd encode the peer number in reverse bit sequence in
>  the partial IV, where 0 is used for sequence numbers the device has
>  dealt itself, 1 is for sequence numbers out of the list of the first
>  partner (or the unicast partner), and 2 etc is for sequence numbers of
>  other people's pools.

Interesting alternative. As it is currently designed, OSCOAP is optimized
for CoAP (RFC7252), which gives a very low overhead [2]. When OSCOAP is
extended to other settings, like e.g. secure multicast with unicast
responses, there are a few additional message fields. But, as you point
out, also in that case it is possible to make further optimisations.

Göran


[2] 
https://datatracker.ietf.org/doc/html/draft-mattsson-core-security-overhead


>
>-- 
>Christian Amsüss                      | Energy Harvesting Solutions GmbH
>founder, system architect             | headquarter:
>mailto:c.amsuess@energyharvesting.at  | Arbeitergasse 15, A-4400 Steyr
>tel:+43-664-97-90-6-39                | http://www.energyharvesting.at/
>                                      | ATU68476614