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

"Fossati, Thomas (Nokia - GB)" <thomas.fossati@nokia.com> Wed, 02 November 2016 17:08 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 CE6D6129582 for <core@ietfa.amsl.com>; Wed, 2 Nov 2016 10:08:57 -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 HNKZd41DEbUs for <core@ietfa.amsl.com>; Wed, 2 Nov 2016 10:08:56 -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 1FD6D12941D for <core@ietf.org>; Wed, 2 Nov 2016 10:08:56 -0700 (PDT)
Received: from fr712umx3.dmz.alcatel-lucent.com (unknown [135.245.210.42]) by Websense Email Security Gateway with ESMTPS id AF454434AB430; Wed, 2 Nov 2016 17:08:50 +0000 (GMT)
Received: from fr711usmtp1.zeu.alcatel-lucent.com (fr711usmtp1.zeu.alcatel-lucent.com [135.239.2.122]) by fr712umx3.dmz.alcatel-lucent.com (GMO-o) with ESMTP id uA2H8rNk007178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Nov 2016 17:08:54 GMT
Received: from FR711WXCHHUB02.zeu.alcatel-lucent.com (fr711wxchhub02.zeu.alcatel-lucent.com [135.239.2.112]) by fr711usmtp1.zeu.alcatel-lucent.com (GMO) with ESMTP id uA2H8rcJ004808 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 2 Nov 2016 18:08:53 +0100
Received: from FR711WXCHMBA08.zeu.alcatel-lucent.com ([169.254.4.52]) by FR711WXCHHUB02.zeu.alcatel-lucent.com ([135.239.2.112]) with mapi id 14.03.0301.000; Wed, 2 Nov 2016 18:08:53 +0100
From: "Fossati, Thomas (Nokia - GB)" <thomas.fossati@nokia.com>
To: "Hudalla Kai (INST/ESY1)" <Kai.Hudalla@bosch-si.com>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] [ALU] Re: Question reg. draft-fossati-tls-iot-optimizations-00
Thread-Index: AQHSNSC3YnVUcyWwoE+6FMdK5QDfI6DF3IgA
Date: Wed, 02 Nov 2016 17:08:53 +0000
Message-ID: <D43FCAE6.74BCD%thomas.fossati@alcatel-lucent.com>
References: <D43F9ABE.74B48%thomas.fossati@alcatel-lucent.com> <1478101730.3603.9.camel@bosch-si.com>
In-Reply-To: <1478101730.3603.9.camel@bosch-si.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.41]
Content-Type: text/plain; charset="us-ascii"
Content-ID: <C4FEB8D76DB0F541839A8A4788A9A835@exchange.lucent.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/2-G2t9JLTkVrQtwbXIt6gjMZKyk>
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 17:08:58 -0000

Hi Kai,

On 02/11/2016 15:49, "core on behalf of Hudalla Kai (INST/ESY1)"
<core-bounces@ietf.org on behalf of Kai.Hudalla@bosch-si.com> wrote:
>Assuming that "shared_secret" is derived from the pre-master or master
>secret and
> "string(i)" means "get the ASCII representation of integer i's digits",
>then
>this function would have the additional advantage of not requiring both
>sides to
>"pre-compute" the whole list of CIDs in advance but instead being able to
>compute
>the next CID ad-hoc when it is needed, wouldn't it? The client and server
>would
>only need to keep track of counter i in this case.

Yes, but then the receiver would have to do a bit of acrobatics to compute
all the future CIDs of the active sessions if the received CID is not
found in the hash table.  I think pre computation has its advantages in
this case -- the server controls the CIDs chain length and could adapt the
proposed value based on both its overall capacity and current load.

>> > 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.)
>> 
>My only concern would be that not using the full HMAC values as the CIDs
>but
>instead only using the, say, first 6 bytes would actually make the CIDs
>vulnerable again. However, I am not a security expert and have no clue
>whether
>this is a problem or not.

I think the hash should be truncated to avoid adding too much overhead on
the (possibly constrained) channel. Could you please elaborate a bit more
on the security issue you are seeing here?  (I can see potential issues
with lookup collisions (i.e. functional) if the CID is chosen from a small
space, but the security impact is not very clear to me.)

>In any case, I like the idea very much :-) What do we need to do in order
>to
>bring this forward?

If there is interest (as it seems) we could try and draft it in a slightly
less concise way :-)

The original plan with Hannes was to also prototype it in his (1.3)
implementation (mbedtls).  If you have another TLS stack that would be
really great.

Cheers, thanks,
t