RE: Stream0 Design Team Proposal

Mike Bishop <mbishop@evequefou.be> Wed, 23 May 2018 22:14 UTC

Return-Path: <mbishop@evequefou.be>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6E907127010 for <quic@ietfa.amsl.com>; Wed, 23 May 2018 15:14:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=evequefou.onmicrosoft.com
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 rZcnUp_37fmN for <quic@ietfa.amsl.com>; Wed, 23 May 2018 15:14:33 -0700 (PDT)
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0139.outbound.protection.outlook.com [104.47.38.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8195F124D37 for <quic@ietf.org>; Wed, 23 May 2018 15:14:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evequefou.onmicrosoft.com; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=skteaPTbzNLJ2Fwr/TuORuYYU5kbRgz3NJ0106RpVvI=; b=qMB4ZJC8OykW34xXoKlLEBQukS9aVzaC5udB5Qsxjn77La9tKOd7s1z6ktRpeR0ImUzhe79zPGNXCKrICYMPK1HBukTUJMFm2+zK8DpZ/gEV6vp1fPXbGbqILXDu69SnucFuOXfarjxCAQ6WtlsallxwLn4MHtJR7KMXF4Q4icc=
Received: from SN1PR08MB1854.namprd08.prod.outlook.com (10.169.39.8) by SN1PR08MB1725.namprd08.prod.outlook.com (10.162.133.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Wed, 23 May 2018 22:14:30 +0000
Received: from SN1PR08MB1854.namprd08.prod.outlook.com ([fe80::3c18:f60d:11c1:143d]) by SN1PR08MB1854.namprd08.prod.outlook.com ([fe80::3c18:f60d:11c1:143d%13]) with mapi id 15.20.0776.015; Wed, 23 May 2018 22:14:29 +0000
From: Mike Bishop <mbishop@evequefou.be>
To: Kazuho Oku <kazuhooku@gmail.com>, Christian Huitema <huitema@huitema.net>
CC: IETF QUIC WG <quic@ietf.org>
Subject: RE: Stream0 Design Team Proposal
Thread-Topic: Stream0 Design Team Proposal
Thread-Index: AQHT8jXB/BpXll/I90GhSvtB/+hM26Q8oAsAgAAHFYCAACJqAIAAPsYAgADY9jA=
Date: Wed, 23 May 2018 22:14:29 +0000
Message-ID: <SN1PR08MB1854074075313C93BC71A6F1DA6B0@SN1PR08MB1854.namprd08.prod.outlook.com>
References: <CAKcm_gM39_x+==WwYfb5qeiqB_qxdAt0ow69V+s_Jny3Ek_hDw@mail.gmail.com> <CABkgnnUB=jqwFzb2rjBHUFzOgu0hX0YUgaf5kW5ENNGKP+mGiA@mail.gmail.com> <MWHPR15MB1821F33BAB20815A38EB34A2B66B0@MWHPR15MB1821.namprd15.prod.outlook.com> <046ee03d-a675-86b6-ed3b-4fa69288c42d@huitema.net> <CANatvzzn1VuAY2+cc8vpo75N3T=VH7YkSTjRC6uB4HATAFfW4Q@mail.gmail.com>
In-Reply-To: <CANatvzzn1VuAY2+cc8vpo75N3T=VH7YkSTjRC6uB4HATAFfW4Q@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mbishop@evequefou.be;
x-originating-ip: [2601:600:8080:5a28:4940:a32d:2658:89dc]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; SN1PR08MB1725; 7:M0M5MxrFvBvOfxTwnCxgN7c2A3ZQkDV80igv9dMhUIOwrWVvbezxFQdamvzI8tev+IId/e+DPn8w7+znNVv2QMdz8m+YN2r+XEGmeaIAPIjghN/EZelYSmDAFBowt46QTUipemtMP/xRTk9ir/nUJSVoS1m+nKtc7U5WsEY+0SIuJdNCRxIqHNL88dJSe8mseXMs0qI8QWcBblSIrR2tS48YJNwmxRzvFR05X8R9kLNpvsar6ZTQMK/1v9YphGKy
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:SN1PR08MB1725;
x-ms-traffictypediagnostic: SN1PR08MB1725:
x-microsoft-antispam-prvs: <SN1PR08MB1725328FB682B3C9FEDB055BDA6B0@SN1PR08MB1725.namprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(10436049006162)(166708455590820)(85827821059158)(211936372134217)(100405760836317);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(2016111802025)(6043046)(6072148)(201708071742011)(7699016); SRVR:SN1PR08MB1725; BCL:0; PCL:0; RULEID:; SRVR:SN1PR08MB1725;
x-forefront-prvs: 06818431B9
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(346002)(39830400003)(366004)(376002)(396003)(377424004)(189003)(51444003)(13464003)(199004)(39060400002)(6306002)(102836004)(53936002)(81166006)(6116002)(9686003)(8676002)(55016002)(81156014)(486006)(6436002)(229853002)(110136005)(74316002)(6246003)(59450400001)(99286004)(76176011)(4326008)(8936002)(68736007)(14454004)(3280700002)(3660700001)(2906002)(25786009)(106356001)(11346002)(575784001)(86362001)(7696005)(5660300001)(561944003)(74482002)(5250100002)(7736002)(53546011)(6506007)(446003)(46003)(105586002)(33656002)(478600001)(93886005)(305945005)(97736004)(2900100001)(316002)(186003)(966005)(476003)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR08MB1725; H:SN1PR08MB1854.namprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:0;
received-spf: None (protection.outlook.com: evequefou.be does not designate permitted sender hosts)
x-microsoft-antispam-message-info: QKGCATzCEGODpQ85B4HeUTX+uFopvStNhXTFMZEG/CEMnDnj38nPmYRS5hvwjAVxULnO3EeO8vf5ZOaoXHy96L12BTEcdjqCP0cLrXueIsseoFeBb9oVs9Osk/mh8cuygH4qYIwAb4gY25EDHiiyg6z6FIlnAYNIBlQvgh3pQ25cdkJGhKou1znlccz20foT
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 77408048-f248-471b-5f4b-08d5c0fa8dfa
X-OriginatorOrg: evequefou.be
X-MS-Exchange-CrossTenant-Network-Message-Id: 77408048-f248-471b-5f4b-08d5c0fa8dfa
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2018 22:14:29.7896 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR08MB1725
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/Ng2S0KTNp6BpY9NYtKVjRRS6fIg>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 May 2018 22:14:38 -0000

While a HS_DONE frame sent under 1-RTT would simplify some things, I'm not sure that it's required.  There's a very clear synchronization point which already exists.

The client can't send 1-RTT messages until it has sent Client Finished.  The server can send, but not process, 1-RTT messages prior to receiving Client Finished.  (This is a spec requirement rather than a crypto limitation, however, so a buggy server might violate it.)  Thus, an ACK for any 1-RTT packet from the client implicitly acknowledges the client's entire handshake.  Receipt of any 1-RTT packet from the client implicitly acknowledges the server's entire handshake.

-----Original Message-----
From: QUIC <quic-bounces@ietf.org> On Behalf Of Kazuho Oku
Sent: Wednesday, May 23, 2018 2:14 AM
To: Christian Huitema <huitema@huitema.net>
Cc: IETF QUIC WG <quic@ietf.org>
Subject: Re: Stream0 Design Team Proposal

2018-05-23 14:29 GMT+09:00 Christian Huitema <huitema@huitema.net>:
> I like the proposal. In particular, I really like the encryption of 
> handshake packets with the handshake key, as it does close a number of 
> avenues for attacks. And I like that it solves the "ack promotion" 
> issue that I was complaining against for some time. Turns out that in 
> the current draft, it is very hard to contain that problem if you enable client auth.
>
>
> On the other hand, I agree with Martin that a lot of the additions to 
> transmission recovery should be moved to separate PRs. I am not 
> enthusiastic with the EMPTY ACK mechanism, or with the proposed 
> "implicit acknowledgement" of a lower crypto stream by a higher level ack.

At the moment I do not have a strong opinion on the Empty ACK mechanism.

However, regarding how we close the Initial and Handshake contexts, my preference goes to using implicit ACKs (i.e. use the successful receipt of a packet that is protected under a higher level of encryption key as the signal) rather than explicitly ACKing the last flight of data.

As I see, there are two downsides in the Explicit ACKing approach.

* Explicit ACKing requires sending two additional packets during the handshake, which means that we would have more AES operations plus somewhere around 60 bytes of overhead on the wire.
* Explicit ACKing requires more signaling from the TLS stack. In case of implicit ACKing, the TLS stack need to only provide the AEAD contexts and the messages, whereas in case of explicit ACKing, the TLS stack also needs to provide a signal indicating the end of the transmission at each encryption level.

The downside of the implicit ACKing approach is that the server needs to signal the termination of the Handshake context using a special frame sent using a 1-RTT packet.

But even taking that into consideration, I think that implicit ACKing is still easier to implement, considering the need for the additional signal in the explicit ACK case that have been described above.


> In any
> case, starting as simple as possible would help having the first 
> implementations and tests.
>
>
> On 5/22/2018 8:26 PM, Subodh Iyengar wrote:
>
> As an implementor of fizz, I support this design and am willing to 
> implement this as well.
>
>
> While this is a change in the API that TLS classically exposes, I 
> think this is the right tradeoff because it helps make things way more 
> explicit which will prevent several other bugs from happening in the future.
>
>
> Subodh
>
> ________________________________
> From: QUIC <quic-bounces@ietf.org> on behalf of Martin Thomson 
> <martin.thomson@gmail.com>
> Sent: Tuesday, May 22, 2018 8:00:40 PM
> To: Ian Swett
> Cc: ekr@mozilla.com; QUIC WG
> Subject: Re: Stream0 Design Team Proposal
>
> First of all, thanks to the design team for the work they have done.  
> I haven't digested everything yet, but I think that I have a good 
> sense of the shape of the proposal.
>
> Overall, this looks like a workable design.  It's a lot more invasive 
> of the cryptographic handshake implementation than I had thought 
> people were willing to stomach originally.  But it's clear that we've 
> run into problems with the current, more abstract API and this is a 
> fairly natural way to split TLS.  I've spent a little time thinking 
> about how this might be implemented and I think that it's not going to 
> be *too* painful.  The proof will be in the pudding there though.
>
> In looking at the PR, I really appreciate seeing all the changes together..
> BTW, the link above points to the wrong PR, so be careful (it appears 
> to have the same content, but that's not guaranteed).  The actual PR is here:
> https://github.com/quicwg/base-drafts/pull/1377
>
> I've pushed a branch to the main repo so that you can preview the 
> entire document set:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__quicwg.github.io_
> base-2Ddrafts_stream0_&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=h3Ju9EBS7mH
> twg-wAyN7fQ&m=_vGK3zTKFrMOkFihJnPntLYw1T0_NEMiHYSM0Q_u1JA&s=ususmtxI3B
> TaLlBWe_HkQUWRH4sBI0Cggj1oWZMBHak&e=
>
> It seems like there are some core changes here and a bunch of 
> separable or at least secondary changes.  I'm sure that each one has 
> its own justification, but that isn't always clear. The following 
> changes seem like they are separable:
>
> * The use of separate packet number spaces
> * The Retry packet changes (and NEW_TOKEN)
> * EMPTY_ACK
> * The TLS extension for flow control
>
> Right now, some of these appear to be entirely gratuitous.  I'd like 
> to get to the bottom of each before we continue.
>
> At a minimum, the PR we land first should include just the core changes.
> As you say, reviewing a monster PR like this will only make GitHub 
> weep unicorns, but we might be able to cut this into smaller pieces.
>
> On Wed, May 23, 2018 at 11:31 AM Ian Swett <ianswett= 
> 40google.com@dmarc.ietf.org> wrote:
>
>> Dear QUIC WG,
>
>
>> On behalf of the Stream 0 Design Team, I am pleased to report that we
> have consensus on a proposed approach to share with the WG. The DT's 
> proposal will make QUIC and TLS work closer together and incorporates 
> ideas from DTLS, but it does not use the DTLS protocol itself.
>
>
>> The DT believes this solves the important open Stream 0 issues. The
> proposal will be a bit more invasive in TLS, but we believe it is the 
> right long-term direction and several TLS stacks (BoringSSL, PicoTLS, 
> NSS, and
> Mint) are willing and able to do the work necessary.. A number of 
> stacks are currently working on implementations of this new approach, 
> which we hope to have in time for the Interim meeting.
>
>
>> A design document describing the overall approach can be found at:
>
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.google.com_d
> ocument_d_1fRsJqPinJl8N3b-2DbflDRV6auojfJLkxddT93j6SwHY8_edit&d=DwIBaQ
> &c=5VD0RTtNlTh3ycd41b3MUw&r=h3Ju9EBS7mHtwg-wAyN7fQ&m=_vGK3zTKFrMOkFihJ
> nPntLYw1T0_NEMiHYSM0Q_u1JA&s=jDNnz34hmWvLSQnHkSnYdihW-jG-0xZ-YYqKq30wV
> Gg&e=
>
>
>> A PR making the changes to the QUIC documents can be found at:
>
>> https://github.com/quicwg/base-drafts/pull/1377
>
>
>> A few design details did not have clear consensus, but it was felt it
> would be better to discuss those in the wider WG than delay the design 
> team.  A consistent choice was made in the PR and these issues are 
> mentioned in Appendix B of the design doc.
>
>
>> As always, comments and questions welcome. That said, this is a big 
>> PR
> and we recognize that some editorial work is going to be needed before 
> merging. In the interest of letting people follow along, and to keep 
> github from falling over, we ask people to keep discussion on the 
> mailing list and refrain from making PR comments.
>
>
>> See you in Kista!
>
>
>> Ian and Eric
>
>



--
Kazuho Oku