[Ntp] Antwort: An RFC6921-compliant NTP implementation

kristof.teichel@ptb.de Fri, 23 April 2021 12:25 UTC

Return-Path: <kristof.teichel@ptb.de>
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 B40863A1B50 for <ntp@ietfa.amsl.com>; Fri, 23 Apr 2021 05:25:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.42
X-Spam-Level:
X-Spam-Status: No, score=-1.42 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no 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 Gb4324_S658a for <ntp@ietfa.amsl.com>; Fri, 23 Apr 2021 05:25:27 -0700 (PDT)
Received: from mx1.bs.ptb.de (mx1.bs.ptb.de [192.53.103.120]) (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 DEAB33A1B4F for <ntp@ietf.org>; Fri, 23 Apr 2021 05:25:26 -0700 (PDT)
Received: from smtp-hub.bs.ptb.de (smtpint01.bs.ptb.de [141.25.87.32]) by mx1.bs.ptb.de with ESMTP id 13NCPN90029681-13NCPN92029681 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Apr 2021 14:25:23 +0200
Received: from lotus.bs.ptb.de (lotus.bs.ptb.de [141.25.85.200]) by smtp-hub.bs.ptb.de (Postfix) with ESMTPS id 6BCD3B3B7DE; Fri, 23 Apr 2021 14:25:23 +0200 (CEST)
MIME-Version: 1.0
Sensitivity:
Importance: Normal
X-Priority: 3 (Normal)
In-Reply-To: <CAJm83bAQgRKNEdaOcNvSkL1OF-xOd8T_5AYfwJCXtpZifUAVSQ@mail.gmail.com>
References: <CAJm83bAQgRKNEdaOcNvSkL1OF-xOd8T_5AYfwJCXtpZifUAVSQ@mail.gmail.com>
From: kristof.teichel@ptb.de
To: "Daniel Franke" <dfoxfranke@gmail.com>
Cc: "NTP WG" <ntp@ietf.org>
Date: Fri, 23 Apr 2021 14:25:20 +0200
Message-ID: <OF1BA72A99.13DC4340-ONC12586C0.00443CDE-C12586C0.00443CDF@ptb.de>
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/1o2LAGwaTCna9NjiKdEFESSlwsI>
Subject: [Ntp] Antwort: An RFC6921-compliant NTP implementation
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: Fri, 23 Apr 2021 12:25:31 -0000

So I had this lying around in a forgotten folder of my inbox and only today managed to review it (and familiarize myself with RFC 6921, and appreciate the temporal context, which had completely eluded me).
Just wanted to say: outstanding work, Daniel!
And I do hope we hear more from this project, perhaps in a year or so (give or take 22 days)?


-----"ntp" <ntp-bounces@ietf.org> schrieb: -----
An: "NTP WG" <ntp@ietf.org>
Von: "Daniel Franke"
Gesendet von: "ntp"
Datum: 01.04.2021 02:02
Kopie: bob.hinden@gmail.com
Betreff: [Ntp] An RFC6921-compliant NTP implementation

Building on the groundbreaking results from CERN's OPERA experiment showing that neutrinos can be accelerated to superluminal speeds merely by loosening the contacts on a transmission cable, I'm pleased to report a mostly-successful experiment building an RFC6921 ("Design Considerations for Faster-Than-Light (FTL) Communication") compliant implementation of NTP.

As a preliminary test intended simply to verify the correct functioning of the experiment hardware, I positioned two hosts, both running unmodified NTP software, 25 light-milliseconds apart, and networked them point-to-point via a superluminal neutrino transceiver. I measured a ping time of 49.998ms, confirming FTL communication. As expected, NTP was able to operate normally in this rather unchallenging configuration.

FTL communication can lead to backward causality only when the communicating parties are in relative motion, and since the speed of our communication is only slightly greater than c, the communicating parties' speed of travel needs to be only slightly less than c. Even in the subluminal case, this already causes some problems for NTP. NTP is a clock synchronization protocol, but as soon as relativistic effects become non-negligible the whole notion of synchronicity needs to be abandoned; thus it needs to be carefully stated what NTP is even trying to accomplish. I decided on the following problem statement: given a client on a long journey through space, in continuous communication with a server located on Earth, allow the client to maintain a clock that will be synchronized with the server's clock at such point as the client ever rejoins the server's reference frame. The effects of time dilation mean that such a clock may run at a rate quite different from the proper time experienced by the client, but here we nonetheless have a well-defined goal, free of paradox. Note the necessity of restricting ourselves to discussing client/server mode; symmetric mode makes no sense in this setting.

The client will at all times need a priori knowledge of its velocity relative to the server, and must make the following adjustments to the usual NTP algorithms:

1. It must scale its clock frequency according to the time dilation formula, 1/sqrt(1-v^2/c^2). 
2. It must apply a Lorenz transformation to the receive and transmit timestamps, to bring these from the server's reference frame into the client's (the origin and destination timestamps are already in the client's reference frame).
3. It must adjust for the fact that its distance from the server may be different on one leg of a round-trip communication than it was on the other. This would be necessary even in a Newtonian universe, whenever the client and server are in relative motion.

These modifications are sufficient when only subluminal communication is involved, but in the FTL setting, backward causality creates an additional wrinkle, since a response mayan arrivan fore-when its corresponding request on-sent. As far as our basic formula for clock offset, ((t_2 - t_1) + (t_3 - t_4))/2, goes, this is just fine: it has no special behavior for negative values and needs no modification to accommodate them. The issue, rather, is that it mayant be immediately possible to validate the origin timestamp. Rather than discarding a packet with an unrecognized origin timestamp, the client must retain it until its next request on-generates, and check the match at that time.

I deployed an NTP client with the aforementioned modifications, again equipped with an FTL neutrino transceiver, out to a distance of roughly a light-hour, and then accelerated it back toward Earth, beginning tests once it reached 0.99999c (I won't bore with the details of the propulsion system because, since time flies, they're straightforward). For the duration of its trip, it reported nominal results consistent with successful synchronization, thus experimentally confirming the correctness of these algorithm modifications.

I will not be releasing the code from this experiment, for two reasons:

1. The aforementioned requirement to store an unbounded number of unauthenticated server packets until the client can determine whether it willan on-generate a matching origin timestamp constitutes an unfixable DoS vulnerability, and releasing known-vulnerable code would be irresponsible.

2. I no longer have it available, because when the returning client struck Earth's atmosphere at relativistic speed, the fireball destroyed the experimental apparatus, the server hosting my git repo, and most of Antarctica. Sorry about that.
_______________________________________________
ntp mailing list
ntp@ietf.org
https://www.ietf.org/mailman/listinfo/ntp" rel="nofollow">https://www.ietf.org/mailman/listinfo/ntp