Subject: [TLS] Suggestions in draft-mavrogiannopoulos-tls-cid

From: Raja ashok <[email-masked]>
Date: Fri, 7 Jul 2017 13:44:41 +0000

Hi Nikos, Hannes & Thomas,

This ConnectionID concept is really a useful feature for a client node which faces a change in transport and network layer. I am having few suggestions in the proposed draft, which are listed below.

1) In section 3 of this draft, explains about the modification in "DTLSCiphertext" structure. I feel instead of modifying existing DTLS and TLS record header, we can directly introduce a new record type (ContentType) for app data (application_data_with_cid(25)). For this new record type, we can propose a modified record header for both TLS and DTLS.

2) More over section 3 says modification only in "DTLSCiphertext", not for "TLSCiphertext". I hope this CID mechanism should be used for both TLS and DTLS. Because this transport layer change problem is there for TLS based applications (HTTPS) also in Smartphone(when it switches from Wifi to LTE). But this TLS application problem is solved by MPTCP, but I dont think all webservers are supporting this MPTCP. So I feel CID is required for both TLS and DTLS.

3) As part of defining new record type, we can remove some unused fields like version, epoch. After removing epoch we can mandate that  both entity should not start renegotiation. Sample design for new record header with CID is mentioned below
    struct {
        uint8_t ContentType;
        uint8_t CID_len;
        CID cid;        /* Length varies from 4 to 8 (or 16) */
        uint48 sequence_number;
        uint16_t record_length;
    } DTLSRecordHeader;
    opaque CID <4..8>;

    struct {
        uint8_t ContentType;
        uint8_t CID_len;
        CID cid;        /* Length varies from 4 to 8 (or 16) */
        uint16_t record_length;
    } TLSRecordHeader;
    opaque CID <4..8>;

4) Another option is we can keep CID_len as 4 bit to represent a CID of size. And this 4 bit can be placed in the MSB of the CID field.
        ....
        uint8_t CID_len:4;
        CID cid;        /* Length varies from 28bit to 60 bit (or 124bit) */
        ....

5) Section 3.1 and 3.2 talks about the new extensions for negotiating this feature support. But I feel no need of new extensions to negotiate this, we can make client to add new SCSV cipher in its cipher list. If server accepts then after handshake the first application data send by server should be of type application_data_with_cid(25), which should hold the new record header with CID. The same CID should be used by client in the further messasge. If client sends the 1st application data after handshake, then it can send application data with default record type (application_data(23)). If the first application data record received from server is not of application_data_with_cid(25) means client should understand that server has not accepted the SCSV proposed. And client should continue app transfer with default record type (application_data(23)).

Please provide your comments on this suggestion.

Regards,
Ashok

________________________________
[Company_logo]

Raja Ashok V K
Huawei Technologies
Bangalore, India
http://www.huawei.com
________________________________
本邮件及其附件含有华为公司的保密信息，仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用（包括但不限于全部或部分地泄露、复制、或散发）本邮件中
的信息。如果您错收了本邮件，请您立即电话或邮件通知发件人并删除本邮件！
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

---

From: Ilari Liusvaara <[email-masked]>
Date: Fri, 7 Jul 2017 19:48:41 +0300

On Fri, Jul 07, 2017 at 01:44:41PM +0000, Raja ashok wrote:
> This ConnectionID concept is really a useful feature for a client
> node which faces a change in transport and network layer. I am
> having few suggestions in the proposed draft, which are listed below.
> 
> 1) In section 3 of this draft, explains about the modification in
> "DTLSCiphertext" structure. I feel instead of modifying existing
> DTLS and TLS record header, we can directly introduce a new record
> type (ContentType) for app data (application_data_with_cid(25)).
> For this new record type, we can propose a modified record header
> for both TLS and DTLS.

IMO, it is property of connection if CID is used, and what CID to use
(including any possible backup CID or two).

> 2) More over section 3 says modification only in "DTLSCiphertext",
> not for "TLSCiphertext". I hope this CID mechanism should be used
> for both TLS and DTLS. Because this transport layer change problem
> is there for TLS based applications (HTTPS) also in Smartphone(
> when it switches from Wifi to LTE). But this TLS application problem
> is solved by MPTCP, but I dont think all webservers are supporting
> this MPTCP. So I feel CID is required for both TLS and DTLS.

Deploying CID with TLS over TCP is bit nontrivial. The following
factors need to be considered:

- TLS assumes only single stream of application data.
- DoS by invalid address change.
- Datastream integerity in dirty switch.

The last one is pretty nasty.

> 3) As part of defining new record type, we can remove some unused
> fields like version, epoch. After removing epoch we can mandate that
>  both entity should not start renegotiation. Sample design for new
> record header with CID is mentioned below

DTLS 1.3 uses epoch field for rekeying. It is however uncler if it
needs 2 octets for epoch, or if just sending the lowest octet of
the epoch would be OK.

> 5) Section 3.1 and 3.2 talks about the new extensions for
> negotiating this feature support. But I feel no need of new
>extensions to negotiate this, we can make client to add new SCSV
> cipher in its cipher list.

Ugh, no SCSVs. This isn't some critical security fix that has to work
even with bad TLS stacks that don't support extensions.

-Ilari

---

From: "Fossati, Thomas (Nokia - GB/Cambridge, UK)" <[email-masked]>
Date: Fri, 7 Jul 2017 19:01:48 +0000

Hi Ashok,

Thanks very much for your comments.

See inline.

Cheers, t

On 07/07/2017, 14:44, "Raja ashok" <[email-masked]<mailto:[email-masked]>> wrote:

1) In section 3 of this draft, explains about the modification in "DTLSCiphertext" structure. I feel instead of modifying existing DTLS and TLS record header, we can directly introduce a new record type (ContentType) for app data (application_data_with_cid(25)).

[tf] Why do you think a new record type would be better than the present construction?  (BTW, we would also need a new alert_with_cid, I guess.)

For this new record type, we can propose a modified record header for both TLS and DTLS.

[tf] If you are already modifying the record header, I am not sure why you also need to add new content type(s)?

[tf] In principle I’m not opposed to open the solution space to TLS, but we need to work out the implications.

    struct {
        uint8_t ContentType;
        uint8_t CID_len;

[tf] What is the problem with using a new extension?  How would negotiating parameters (e.g., CID type, CID length) work in your proposal?

Regards,
Ashok

[ompany_logo]

Raja Ashok V K
Huawei Technologies
Bangalore, India
http://www.huawei.com