[Ntp] Antwort: Re: NTS4UPTP Rev 03 - Formal request for WG adoption

kristof.teichel@ptb.de Tue, 01 June 2021 20:42 UTC

Return-Path: <kristof.teichel@ptb.de>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id EB14E3A26BB for <ntp@ietfa.amsl.com>; Tue, 1 Jun 2021 13:42:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.417
X-Spam-Status: No, score=-1.417 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, HTML_MIME_NO_HTML_TAG=0.377, HTML_NONELEMENT_30_40=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id u-IWtPcXEQBB for <ntp@ietfa.amsl.com>; Tue, 1 Jun 2021 13:42:25 -0700 (PDT)
Received: from mx1.bs.ptb.de (mx1.bs.ptb.de []) (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 9724A3A26BD for <ntp@ietf.org>; Tue, 1 Jun 2021 13:42:25 -0700 (PDT)
Received: from smtp-hub.bs.ptb.de (smtpint01.bs.ptb.de []) by mx1.bs.ptb.de with ESMTP id 151KgKg3017355-151KgKg5017355 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Jun 2021 22:42:20 +0200
Received: from lotus.bs.ptb.de (lotus.bs.ptb.de []) by smtp-hub.bs.ptb.de (Postfix) with ESMTPS id DEC3DB74834; Tue, 1 Jun 2021 22:42:19 +0200 (CEST)
MIME-Version: 1.0
Importance: Normal
X-Priority: 3 (Normal)
In-Reply-To: <YLZVS4jwGOnMIk6g@localhost>
References: <YLZVS4jwGOnMIk6g@localhost>, <7F9B8D13-BC90-4E15-9BDF-81714DF0F0C6@meinberg.de> <YLYCLIEA4/unB6/5@localhost> <1DAA3605-CC04-46DE-8CFC-975BED7D4160@meinberg.de> <YLYheZYTSflAdlrF@localhost> <CEB3F4AA-E318-4540-BD6C-4437E3F5F58A@meinberg.de> <YLY3f2/5k1Hjebf7@localhost> <7167BC2B-1889-4DF5-AF7C-BAAAB3586841@meinberg.de>
From: kristof.teichel@ptb.de
To: "Miroslav Lichvar" <mlichvar@redhat.com>
Cc: "Heiko Gerstung" <heiko.gerstung=40meinberg.de@dmarc.ietf.org>, "ntp@ietf.org" <ntp@ietf.org>
Date: Tue, 1 Jun 2021 22:42:16 +0200
Message-ID: <OF03E7B863.5E7C5518-ONC12586E7.00714224-C12586E7.0071BBEC@ptb.de>
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/UD0UZLEmHKb07shGI5XnNDgfxHk>
Subject: [Ntp] Antwort: Re: NTS4UPTP Rev 03 - Formal request for WG adoption
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: Tue, 01 Jun 2021 20:42:30 -0000

I mean, you can call anything PTP if you get the 1588 WG to mention it in the next standard version, I guess.
Honestly, this whole idea has potential.
A low-effort (and low-complexity, in the spec) version would be one very good result.


A well-made Frankensteined construct would potentially be a breakthrough.
If we could come up with something that combines the following properties, that would be a dream come true:
- Can use hardware timestamping (with existing PTP hardware!)
- Uses two-way exchange with bounded error of RTT/2
- Has guaranteed authenticity/integrity and thus (because of bullet above) guaranteed correctness of synch except for a bounded error
- Uses two-step scheme on messages going from the time emitter to the time receiver, thus offering zero (!) performance detriment (on the individual exchange) from crypto

I am currently busy working on ways of defining and measuring the tradeoffs between accuracy, security and convenience that you have to make when choosing a time transfer mechanism.
It would be very nice to have something that circumvents at least one of the tradeoff dimensions.
Somewhere between making (a subset of) PTP behave like client/server NTP except with two-step responses, slapping NTS onto it and making it run on PTP hardware, there has to be a way of doing this, doesn't there?

-----"ntp" <ntp-bounces@ietf.org> schrieb: -----
An: "Heiko Gerstung" <heiko.gerstung=40meinberg.de@dmarc.ietf.org>
Von: "Miroslav Lichvar"
Gesendet von: "ntp"
Datum: 01.06.2021 17:42
Kopie: "ntp@ietf.org" <ntp@ietf.org>
Betreff: Re: [Ntp] NTS4UPTP Rev 03 - Formal request for WG adoption

On Tue, Jun 01, 2021 at 04:18:09PM +0200, Heiko Gerstung wrote:
> > Am 01.06.21, 15:35 schrieb "Miroslav Lichvar" <mlichvar@redhat.com>:
> > The idea is that DTLS protects everything except the sync and delay
> > request messages. The unicast negotiation would be protected, of
> > course.
> OK, that is something you have to describe in detail.

The PTP general port (320) would move to a new port, which would be
protected by DTLS. The client would open a DTLS session with the
server on that port and use it for all messages normally transmitted
on the general port. The key needed for authentication of event
messages could be generated by the client and provided to the server
in a new TLV together with the request-unicast-transmission TLV. The
server would use the key to authenticate sync messages for the client
and verify ICV in its delay requests. Just the first thing that came
to my mind. I'm sure it could be improved.

> > You can wrap NTP messages in a PTP event message to get hardware
> > timestamps and keep all the benefits of NTS4NTP. It seems your plan is
> > to provide NTS4NTP in any case. Do you see any disadvantages?
> Yes, because unicast PTP does not work in the same way as NTP. NTP is based on a request/response exchange while unicast PTP is not. I would certainly be possible to put NTP4NTS messages into PTP, but that would have the same drawback that I see with Daniel's proposal to use NTP4NTS to secure the time error of PTP: you need to setup an NTS4NTP infrastructure and basically run two sync protocols plus one security/key exchange protocol in parallel. NTS4UPTP only requires you to run one sync protocol and a key exchange protocol.

If you used only NTP4NTS over PTP, you would still have only one sync
protocol. Just the transport is different. That's a couple lines of

> I would also not be happy with the efficiency, because an NTS4NTP packet probably has some redundant or unnecessary information in it that is not required when I run unicast PTP. And, the other way around, adding a full "dummy" PTP packet header to enable using the hw timestamping engine to hardware timestamp my NTS4NTP packets is a waste of bandwidth and CPU cycles.

If you compare the PTP header to the NTS uniq ID and cookie, I don't
think it's so bad.

> Such a NTS4NTP protocol also does not address the other advantage that unicast PTP has over NTP: higher packet rates. You can change that too, of course. In the end you created a third time sync protocol which to me looks more like a Frankenstein monster version of NTP/PTP and is a completely different beast. It will be neither compliant to NTP, nor PTP.

I'm not sure I follow here. You can send NTP requests at any rate you
like. That doesn't require a new protocol. The poll field is a signed
8-bit integer if you had a server that actually looked in the content
of the field.

Yes, server performance might be worse due to the need to decode and
encode a cookie with each request, but that's a price you need to pay
if you want all the benefits of NTS4NTP. I'd expect in most cases the
HW-timestamping to be the bottleneck. If not, you could use
AES-GCM-SIV instead of AES-SIV-CMAC for cookie encryption to get a
better performance.

> It may work and add more accuracy to NTP4NTS, but has nothing to do with PTP. And yes, you can argue that nobody needs PTP anymore in that case, but I am not sure it will be a pleasant discussion.

Right. :)

Miroslav Lichvar

ntp mailing list
https://www.ietf.org/mailman/listinfo/ntp" rel="nofollow">https://www.ietf.org/mailman/listinfo/ntp