Re: [Ntp] Alternative for interleave mode

Miroslav Lichvar <mlichvar@redhat.com> Mon, 16 January 2023 09:56 UTC

Return-Path: <mlichvar@redhat.com>
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 56EA3C151551 for <ntp@ietfa.amsl.com>; Mon, 16 Jan 2023 01:56:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q_XmnP6_gQ1T for <ntp@ietfa.amsl.com>; Mon, 16 Jan 2023 01:56:31 -0800 (PST)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7D71C14CE55 for <ntp@ietf.org>; Mon, 16 Jan 2023 01:56:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673862989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uU6JAZ7X9hwzkdQpA+gdZP6k0T41tflKv9TI3ax1/BI=; b=jSDIhSIGh+3ldGUUrRI9PL3y+C82b8IcZS56tiiaFnkH00G3yoTwRNh4Knxsl4mBxh8E6/ hmuvO0r3vKUHa9FH8Nbf5cTZ4T1lT+06MsM5nOBCIGvlBeZkUb1Rjs3X109KRQdH2ifdtW WWyeXM7lKhcJyiHkrnVMKen5P5V2MG0=
Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-114-BHn0V0eaMCWjCuh7MqRJJA-1; Mon, 16 Jan 2023 04:56:26 -0500
X-MC-Unique: BHn0V0eaMCWjCuh7MqRJJA-1
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E489E87A9E1; Mon, 16 Jan 2023 09:56:25 +0000 (UTC)
Received: from localhost (unknown [10.43.135.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7264B40C2064; Mon, 16 Jan 2023 09:56:25 +0000 (UTC)
Date: Mon, 16 Jan 2023 10:56:24 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: David Venhoek <david@venhoek.nl>
Cc: ntp@ietf.org
Message-ID: <Y8UfSDWh/uxT5lSF@localhost>
References: <CAPz_-SWfJgxtaTYjEyck106oCezMV6P+psV=Ldes4MRJ5uNjFQ@mail.gmail.com>
MIME-Version: 1.0
In-Reply-To: <CAPz_-SWfJgxtaTYjEyck106oCezMV6P+psV=Ldes4MRJ5uNjFQ@mail.gmail.com>
X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/oIfg7rvm9W32HtXNEatZTIwwD6Q>
Subject: Re: [Ntp] Alternative for interleave mode
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Network Time Protocol <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: Mon, 16 Jan 2023 09:56:35 -0000

On Fri, Jan 13, 2023 at 03:34:14PM +0100, David Venhoek wrote:
> I would like to at least have discussed the following alternative:
> When a server receives an "high-precision" request, it first sends to
> the client the actual response, and then immediately on getting the
> transmission timestamp for that response, it sends a second response
> with the higher-precision transmission timestamp (similar to PTP's 2
> step mode).

This was present in earlier versions of the draft as "follow-up mode".
Exploiting for amplification was minimized by using client cookie and
fast rotation of the server key encrypting the cookie.

People were not happy with this duplicated feature and the follow-up
mode was dropped in favor of interleaved mode.

I think interleaved mode is a better fit for NTP. It works better with
software implementations, it is easier to implement on clients and
it's inherently resilient to amplification. 

> unity amplification factor. However, the amplification factor is still
> only 2, both in bytes and number of packets, which is well below other
> widely deployed UDP-based protocols such as quic (and from what i can
> tell, quite well accepted, the quic working group is working by the
> guideline that one should never send more than 3x the packets/bytes
> received before validating origin).

I don't think that is acceptable for NTP. If we can avoid
amplification, we should do it properly. It's a race to bottom. Maybe
2x amplification is not good enough for attackers today, but it could
be in future.

> Given the simplicity of the above
> scheme compared to interleave mode

Is it really simpler? If you handle the timestamps asynchronously to
not lose performance with clients using basic mode, I think you will
need to keep some state either way.

-- 
Miroslav Lichvar