Re: [Ntp] NTP is unique (was Re: QUIC as a transport substrate (was:re-chartering: include DNS-over-QUIC?))

Christian Huitema <huitema@huitema.net> Wed, 15 April 2020 00:16 UTC

Return-Path: <huitema@huitema.net>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3F5523A12F9 for <ntp@ietfa.amsl.com>; Tue, 14 Apr 2020 17:16:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 Dz5Gx4mcglFm for <ntp@ietfa.amsl.com>; Tue, 14 Apr 2020 17:16:13 -0700 (PDT)
Received: from mx43-out1.antispamcloud.com (mx43-out1.antispamcloud.com [138.201.61.189]) (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 ECAD73A132B for <ntp@ietf.org>; Tue, 14 Apr 2020 17:16:12 -0700 (PDT)
Received: from xse385.mail2web.com ([66.113.197.131] helo=xse.mail2web.com) by mx165.antispamcloud.com with esmtp (Exim 4.92) (envelope-from <huitema@huitema.net>) id 1jOVip-000rdE-9U for ntp@ietf.org; Wed, 15 Apr 2020 02:16:09 +0200
Received: from xsmtp22.mail2web.com (unknown [10.100.68.61]) by xse.mail2web.com (Postfix) with ESMTPS id 4922vQ04Pnz1kP1 for <ntp@ietf.org>; Tue, 14 Apr 2020 17:16:02 -0700 (PDT)
Received: from [10.5.2.12] (helo=xmail02.myhosting.com) by xsmtp22.mail2web.com with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from <huitema@huitema.net>) id 1jOVij-0003R6-Rh for ntp@ietf.org; Tue, 14 Apr 2020 17:16:01 -0700
Received: (qmail 11946 invoked from network); 15 Apr 2020 00:16:01 -0000
Received: from unknown (HELO [192.168.1.104]) (Authenticated-user:_huitema@huitema.net@[172.58.46.133]) (envelope-sender <huitema@huitema.net>) by xmail02.myhosting.com (qmail-ldap-1.03) with ESMTPA for <ek.ietf@gmail.com>; 15 Apr 2020 00:16:00 -0000
Content-Type: multipart/alternative; boundary="Apple-Mail-D68D2465-E568-4FE6-B4AF-6DFE0FE4D359"
Content-Transfer-Encoding: 7bit
From: Christian Huitema <huitema@huitema.net>
Mime-Version: 1.0 (1.0)
Date: Tue, 14 Apr 2020 17:16:00 -0700
Message-Id: <91809E93-26F1-41C0-B349-8BEA3F380402@huitema.net>
References: <176A9D81-A49E-47F0-84AE-6A96864DF7B1@fb.com>
Cc: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, Erik Kline <ek.ietf@gmail.com>, Watson Ladd <watsonbladd@gmail.com>, Tal Mizrahi <tal.mizrahi.phd@gmail.com>, "ntp@ietf.org" <ntp@ietf.org>, IETF QUIC WG <quic@ietf.org>, Spencer Dawkins at IETF <spencerdawkins.ietf@gmail.com>, Lucas Pardue <lucaspardue.24.7@gmail.com>
In-Reply-To: <176A9D81-A49E-47F0-84AE-6A96864DF7B1@fb.com>
To: Roberto Peon <fenix@fb.com>
X-Mailer: iPhone Mail (17D50)
X-Originating-IP: 66.113.197.131
X-Spampanel-Domain: xsmtpout.mail2web.com
X-Spampanel-Username: 66.113.197.0/24
Authentication-Results: antispamcloud.com; auth=pass smtp.auth=66.113.197.0/24@xsmtpout.mail2web.com
X-Spampanel-Outgoing-Class: unsure
X-Spampanel-Outgoing-Evidence: Combined (0.15)
X-Recommended-Action: accept
X-Filter-ID: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b9V MEM=
X-Report-Abuse-To: spam@quarantine11.antispamcloud.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/qQyDm-3-55B1OshLq2-MBsmCN94>
X-Mailman-Approved-At: Tue, 14 Apr 2020 18:29:53 -0700
Subject: Re: [Ntp] NTP is unique (was Re: QUIC as a transport substrate (was:re-chartering: include DNS-over-QUIC?))
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Apr 2020 00:16:15 -0000

We also have timestamp frames. That may be related to NTP.

-- Christian Huitema 

> On Apr 14, 2020, at 12:03 PM, Roberto Peon <fenix@fb.com> wrote:
> 
> 
> I agree that Qv1 doesn’t have an ability to express this, since Qv1 doesn’t allow for partial reliability except in extensions.
> Regardless, if the requirement is to have no retransmission, then that is the requirement, and should be (at least in a spec) written that way.
> 
> I’ll disagree on whether that is similar to datagrams. Datagrams don’t have the same “address space” as does a stream, and there are certainly many things out there that would prefer to have a stream-with-holes (i.e. an address space that every party to the interaction agrees upon) than require the application to do reassembly of everything (and caching) on its own. This is really a separate conversation we can move somewhere else, though, assuming it is work having at all!
> -=R
>  
> From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
> Date: Tuesday, April 14, 2020 at 11:54 AM
> To: Erik Kline <ek.ietf@gmail.com>, Watson Ladd <watsonbladd@gmail.com>, Roberto Peon <fenix@fb.com>, Tal Mizrahi <tal.mizrahi.phd@gmail.com>
> Cc: IETF QUIC WG <quic@ietf.org>, "ntp@ietf.org" <ntp@ietf.org>, Lucas Pardue <lucaspardue.24.7@gmail.com>, Spencer Dawkins at IETF <spencerdawkins.ietf@gmail.com>
> Subject: Re: NTP is unique (was Re: QUIC as a transport substrate (was:re-chartering: include DNS-over-QUIC?))
>  
> You don’t need the datagram extension, rather, you need a promise to not retransmit or a promise to communicate the time in any retransmission.
> I don’t understand this promise. In QUIC v1 you have streams, pings, bookkeeping frames, and extensions. You cannot promise not to retransmit something in as stream except by terminating the stream. Pings are not suitable for conveying time information unless perhaps its mere arrival acts a clock tick. You can of course create a new stream for each new time event but it still doesn’t prevent retransmission unless you cancel, and if you cancel, delivery of the payload is not guaranteed.
>  
> You could define a promise through a new extension with the desired semantics but that is close enough to datagrams that it doesn’t make much sense - but you might want a datagram that does not have ACKs - this affects flow control, but since transmission is infrequent, that could work.
>  
> Something else:
>  
> It is hard to prevent an attacker from dropping or delay packets even on an encrypted QUIC connection and a retransmission would not be a useful mitigation, so I am not sure how you can make NTP truly secure. A voting system from multiple sources could make such an attack more difficult.
>  
> Kind Regards,
> Mikkel Fahnøe Jørgensen
> 
>  
> On 14 April 2020 at 19.40.00, Roberto Peon (fenix@fb.com) wrote:
> 
> You don’t need the datagram extension, rather, you need a promise to not retransmit or a promise to communicate the time in any retransmission.
> While datagram provides, implicitly today, a promise to not retransmit, datagrams themselves aren’t the requirement.
> (Also, in the face of multipath, is it true that we won’t have duplicates even for datagrams. I’m not sure this is clear right now?)
> 
> If the first packet has higher measurable (latency) overhead in the processing stack, then you probably don’t want to use that one for NTP if you’re high time accuracy.
> In other words, you may find that you get better accuracy if you make a connection, and then do the NTP “stuff”. Similarly, you may find you get better accuracy if you *always* do a handshake on every packet (though that is more expensive)…
> 
> While QUIC is a wonderful hammer, I do wonder if it provides any significant benefit in this case.
> 
> -=R
> 
>  
> From: QUIC <quic-bounces@ietf.org> on behalf of Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
> Date: Monday, April 13, 2020 at 2:31 AM
> To: Erik Kline <ek.ietf@gmail.com>, Tal Mizrahi <tal.mizrahi.phd@gmail.com>, Watson Ladd <watsonbladd@gmail.com>
> Cc: "ntp@ietf.org" <ntp@ietf.org>, IETF QUIC WG <quic@ietf.org>, Spencer Dawkins at IETF <spencerdawkins.ietf@gmail.com>, Lucas Pardue <lucaspardue.24.7@gmail.com>
> Subject: Re: NTP is unique (was Re: QUIC as a transport substrate (was:re-chartering: include DNS-over-QUIC?))
>  
> I think these observations on resource usage are correct, but changing system time could be a significant attack vector. For NTP to make sense over QUIC, the datagram extension would be needed to avoid much of the state and retransmission overhead. A simplified implementation could even forego a lot of the QUIC machinery such as streams and only rely on the handshake and datagram. Of course you could also use DTLS but that is yet another stack.
>  
> Kind Regards,
> Mikkel Fahnøe Jørgensen
> 
>  
> On 13 April 2020 at 11.23.06, Tal Mizrahi (tal.mizrahi.phd@gmail.com) wrote:
> 
> Hi, 
> 
> > > This came to mind because I had a silly idea. As I watched Christian's presentation in dprive I thought (a) this DoQ doc really benefits from Christian knowing what he's doing with QUIC, and (b) I wondered if I could run NTP over QUIC. Like I said, this is probably silly and there might be nothing to gain from the attempt, but it got me thinking about guidance for anyone else with both (a) such an idea and (b) the time to write/implement a proposal. 
> 
> NTP-over-QUIC is an interesting idea. 
> 
> The main benefits I can think of of running NTP over QUIC are enjoying 
> the inherent security of QUIC, and avoiding middlebox tampering. 
> I wonder if these benefits are worth the effort. 
> 
> On the other side running NTP over QUIC may consume significantly 
> higher resources on NTP servers than are necessary today. NTP servers 
> try to minimize the per-client state (or keep it zero if possible), 
> while QUIC may require per-client state in order to allow 0-RTT. Also 
> the precision of NTP may be lower than existing implementations if 
> implemented in user space. 
> 
> > You also don't want automatic retransmission in NTP, and the flow 
> > control is essentially nonexistent: it's driven by the synchronization 
> > loop. 
> 
> One may consider using QUIC in datagram mode, and this would prevent 
> retransmissions. ACKs would still be sent in this case. 
> 
> Cheers, 
> Tal. 
> 
> 
> 
> On Mon, Apr 13, 2020 at 9:18 AM Watson Ladd <watsonbladd@gmail.com> wrote: 
> > 
> > On Sun, Apr 12, 2020 at 11:03 PM Erik Kline <ek.ietf@gmail.com> wrote: 
> > <chop> 
> > > 
> > > This came to mind because I had a silly idea. As I watched Christian's presentation in dprive I thought (a) this DoQ doc really benefits from Christian knowing what he's doing with QUIC, and (b) I wondered if I could run NTP over QUIC. Like I said, this is probably silly and there might be nothing to gain from the attempt, but it got me thinking about guidance for anyone else with both (a) such an idea and (b) the time to write/implement a proposal. 
> > 
> > NTP has a very unique property: one packet is sent every 1024 or 512 
> > seconds or so by the client. A single server can handle a high packet 
> > rate easily because of the statelessness. Adding state would start 
> > getting problematic at the high packet rates. 
> > 
> > You also don't want automatic retransmission in NTP, and the flow 
> > control is essentially nonexistent: it's driven by the synchronization 
> > loop. 
> > 
> > Getting through middleboxes isn't nothing! But that's more a new port, 
> > and ideally you want middleboxes to correct for packet queuing times. 
> > 
> > Sincerely, 
> > Watson Ladd 
> >