Re: [Ntp] NTPv5 draft

Miroslav Lichvar <mlichvar@redhat.com> Tue, 01 December 2020 08:12 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 19CD33A0A97 for <ntp@ietfa.amsl.com>; Tue, 1 Dec 2020 00:12:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.121
X-Spam-Level:
X-Spam-Status: No, score=-2.121 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_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i5YFa_c4Y-t6 for <ntp@ietfa.amsl.com>; Tue, 1 Dec 2020 00:12:12 -0800 (PST)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1F03C3A0A83 for <ntp@ietf.org>; Tue, 1 Dec 2020 00:12:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606810331; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hc7fddWmfcou9XtJR1fPVXGgjG9dNrFBdIQSqTzCK8w=; b=c3Mi1+nP44gKqRWvbIyvUfF1yenxJw6SBdvxdV16LPEWVhCxZRMc1E+4SX23qjTff1ixXd sJuUx92kjk+M3VJLVCUZ9/wydnJFyBS/ub9sR7iqvVR6trqpdB8SAa0SO3gK6w7pBSdYbk scxxVUR3ld6/fKONjxh/+DJ+j3D8P+o=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-HCQSTsCnPhOdFDgRk8AdTQ-1; Tue, 01 Dec 2020 03:12:07 -0500
X-MC-Unique: HCQSTsCnPhOdFDgRk8AdTQ-1
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FC35184214F; Tue, 1 Dec 2020 08:12:06 +0000 (UTC)
Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB41060853; Tue, 1 Dec 2020 08:12:05 +0000 (UTC)
Date: Tue, 01 Dec 2020 09:12:03 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: Dieter Sibold <dsibold.ietf@gmail.com>
Cc: ntp@ietf.org
Message-ID: <20201201081203.GB1900232@localhost>
References: <20201111161947.GG1559650@localhost> <AA848C67-CFB7-43FC-B190-FD3911360373@gmail.com>
MIME-Version: 1.0
In-Reply-To: <AA848C67-CFB7-43FC-B190-FD3911360373@gmail.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/X4q2Y_o2izmOBzvJxx1exzxsDik>
Subject: Re: [Ntp] NTPv5 draft
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 Dec 2020 08:12:14 -0000

On Mon, Nov 30, 2020 at 08:12:06PM +0100, Dieter Sibold wrote:
> 1. Security
> 
> The protocol as proposed is missing a security approach. There are no
> mechanisms described to provide authentication, integrity protection and
> maybe encryption.

The draft describes a MAC extension field, using the AES-CMAC
(RFC8573). It also allows all NTPv4 extension field to be used in
NTPv5, making it compatible with the NTS specification.

> I very much agree with Jame’s proposed draft that a new
> version of NTP must provide these mechanisms by default.  Sure, you can add
> NTS to protect the NTPv5 packets. But in this case protection is always an
> optional add-on whereas it needs to be an inherent part of the basic
> protocol. To achieve this the NTS approach certainly can be transferred to
> the basic v5 protocol and packet format.

You mean to require all NTP packets to be authenticated? I don't like
that idea. The improvements in NTPv5 are orthogonal to authentication.
NTPv5 is not supposed to be more secure. An NTP client that doesn't
want to implement the complexity of NTS shouldn't be restricted to
NTPv4.

> 2. Interleave and 2-Step
> 
> I agree with Doug to decide with approach to provide with NTPv5. Providing
> both 2-Step and Interleave may increase complexity unnecessarily.
> Personally, I find that the 2-step approach with the follow-up message is
> more concise. And since the first message only need to be very small (it
> just needs to contain the information to ensure correlation with the follow
> up) the waste of network bandwidth is very small.

If we must to support only one of them, I think it should be the
interleaved mode.

- It fits better software server implementations, which is what the
  vast majority of NTP servers seems to be.
- It is simpler to implement on clients. It doesn't require timeouts
  for follow-up messages and handling of reordered packets.
- It is inherently resilient to amplification. No risk of an
  implementation having a bug in its cookie generation, or leaking
  key, which would allow attacks.

> 3. Traceability
> 
> It would make sense that the v5-packets optionally provide information about
> the uncertainty of the timestamps taken. These formally for establishing
> traceability.

Isn't that the NTP root delay and dispersion? Together they provide an
estimate of the maximum error in the receive and transmit timestamp.

> Additionally, in order to maintain traceability during the
> time period in which leap smearing is applied the client needs to obtain the
> necessary information to calculate the offset between UTC and smeared time.
> This also is mandatory to maintain traceability.

The smearing offset is provided in the Timescale Offset field.

-- 
Miroslav Lichvar