Re: [core] [ALU] Re: Question reg. draft-fossati-tls-iot-optimizations-00

"Fossati, Thomas (Nokia - GB)" <thomas.fossati@nokia.com> Wed, 02 November 2016 14:11 UTC

Return-Path: <thomas.fossati@nokia.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 258B1129661 for <core@ietfa.amsl.com>; Wed, 2 Nov 2016 07:11:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.902
X-Spam-Level:
X-Spam-Status: No, score=-6.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-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 4uvSRu5aJGXl for <core@ietfa.amsl.com>; Wed, 2 Nov 2016 07:10:59 -0700 (PDT)
Received: from smtp-fr.alcatel-lucent.com (fr-hpida-esg-02.alcatel-lucent.com [135.245.210.21]) (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 8E39F12956D for <core@ietf.org>; Wed, 2 Nov 2016 07:10:59 -0700 (PDT)
Received: from fr712umx4.dmz.alcatel-lucent.com (unknown [135.245.210.45]) by Websense Email Security Gateway with ESMTPS id 3E1F7ED17426; Wed, 2 Nov 2016 14:10:54 +0000 (GMT)
Received: from fr712usmtp2.zeu.alcatel-lucent.com (fr712usmtp2.zeu.alcatel-lucent.com [135.239.2.42]) by fr712umx4.dmz.alcatel-lucent.com (GMO-o) with ESMTP id uA2EAuRv019429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Nov 2016 14:10:57 GMT
Received: from FR711WXCHHUB01.zeu.alcatel-lucent.com (fr711wxchhub01.zeu.alcatel-lucent.com [135.239.2.111]) by fr712usmtp2.zeu.alcatel-lucent.com (GMO) with ESMTP id uA2EAq9b023096 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 2 Nov 2016 15:10:56 +0100
Received: from FR711WXCHMBA08.zeu.alcatel-lucent.com ([169.254.4.52]) by FR711WXCHHUB01.zeu.alcatel-lucent.com ([135.239.2.111]) with mapi id 14.03.0301.000; Wed, 2 Nov 2016 15:10:54 +0100
From: "Fossati, Thomas (Nokia - GB)" <thomas.fossati@nokia.com>
To: "Kraus Achim (INST/ESY1)" <Achim.Kraus@bosch-si.com>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [ALU] Re: [core] Question reg. draft-fossati-tls-iot-optimizations-00
Thread-Index: AQHSNRLsxw+ZhmUfhkiE76fll++38g==
Date: Wed, 02 Nov 2016 14:10:53 +0000
Message-ID: <D43F9ABE.74B48%thomas.fossati@alcatel-lucent.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.6.9.160926
x-originating-ip: [135.239.27.38]
Content-Type: text/plain; charset="us-ascii"
Content-ID: <E0E8B4E85FD3A94CB3EB32A70CD8B859@exchange.lucent.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/Ww4m3j4Hp3v1ODQnQbD1B9pOvao>
Subject: Re: [core] [ALU] Re: Question reg. draft-fossati-tls-iot-optimizations-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
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: Wed, 02 Nov 2016 14:11:02 -0000

Hi Achim,

On 02/11/2016 10:33, "core on behalf of Kraus Achim (INST/ESY1)"
<core-bounces@ietf.org on behalf of Achim.Kraus@bosch-si.com> wrote:
>Though draft-fossati-tls-iot-optimizations-00 was published in the tls
>wg, I posted my question there.

Yes, you made the correct assumption, my fault.

>Currently I'm simply not sure, if I understood the approach right, but
>according your answer,
>I guess Stephen (Farrell) may be the right person, to give an answer.
>
>With my understanding (see mail in tls,
>https://www.ietf.org/mail-archive/web/tls/current/msg21737.html),

The idea is that, during handshake, client and server negotiate the CID
extension.

As usual with TLS, client proposes the extension, in this case indicating
the desired length of the hash chain (i.e., the number of different CIDs)
to use.

If server supports the CID extension, it replies with the effective length
of the hash chain ("L"), which shall be equal or less than what the client
proposed.

The shared secret output by the handshake is used to produce an ordered
list of "L" CIDs.  I don't think it really matters that the production
happens via a hash chain, or any other mechanism, as long as:
1. The produced list is the same on both sides of the wire (in values,
length and cardinality);
2. An external observer doesn't learn anything about the next CID(s) by
passively looking at the CID(s) that have circulated so far.

(I guess a "for i in 1..L: CID[i] = HMAC(shared_secret, string(i))" would
fit the purpose.)

>I see following issues with the hash chain:
>The scaling/performance depends on the "hash chain window" used to
>related the record to the dtls connection.
>As larger the window, the more I'm in doubt, if that scales.

I agree.  That's why I think "client proposes, server chooses" is the
right way to negotiate it.

>The robustness for clients, when we lose more packets then we assume in
>the window.
>As smaller the window, the more I'm in doubt, if it's robust enough.

I'm not sure I understand your concern here.

The idea is that the client has it's own "CID shift" policy (e.g., based
on time, or number of packets exchanged, NAT rebinding awareness, etc.)
and will decide unilaterally when to move to the next CID in chain, until
the chain is exhausted.  The server will mirror the last CID received.  In
this scheme, packet loss has no impact as long as client keeps alive CIDs
that have been shifted but not yet "acknowledged" by the server on the
back channel.  (This is true if both sides keep the chain in place for as
long as the security association is active.)

>There may be an escape using the "record sequence number" in a more
>sophistic way
>(e.g. using H(record.sequence_numer | connection_id) would help to skip
>faster over 
>lost messages, but still with a large number of clients/connections, I
>don't see how this
>scales). But right now I guess, we need more guidance, how it was
>intended.
>
>Therefore I could think also of an alternative solution with an
>"connection id ticket" system.
>The DTLS server sends after the handshake a ticket with the "encrypted
>connection id".
>The DTLS client decrypts that ticket into the connection id and, if the
>client later  
>didn't receive a message for a certain period of time (e.g. 20s), it adds
>that connection id to
>the records until it receives a new ticket (encrypted new connection id) .
>When the client receives a new ticket, then it could send the messages
>again without the 
>connection id until it doesn't receive messages for the certain period of
>time, after which
>the new ticket is used.
>The DTLS server only accepts records with that "decrypted" connection id,
>if the MAC check is passed.
>It the adjusts the address/port and emits a new ticket. If the DTLS
>server receives "invalid"
>(or no longer valid) connection ids, it uses the current address/port
>mapping to check the MAC and ignores
>the message, when the check fails.
>The advantage of that would be, that "high frequent" traffic doesn't
>require such a connection id,
>so it would just be used for "rarely" communicating client periods.
>Indicate with an extension, it would
>leave the current DTLS implementation unchanged as long as they are
>proper working right now and
>just offer an extension to those, wo would require it because of either
>to frequent address changes or
>to limited bandwidth (for dtls resumes/handshakes).
>And the server only needs those tickets, if the client and the server
>agrees on using them.

Sorry, I'm not sure I completely understand the advantage of this scheme.

Cheers, thanks,
t