Re: [Ntp] NTPv5 draft

Miroslav Lichvar <mlichvar@redhat.com> Mon, 14 December 2020 13:02 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 B47803A0822 for <ntp@ietfa.amsl.com>; Mon, 14 Dec 2020 05:02:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.201
X-Spam-Level:
X-Spam-Status: No, score=-0.201 tagged_above=-999 required=5 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 F80eSc5EHjxF for <ntp@ietfa.amsl.com>; Mon, 14 Dec 2020 05:02:28 -0800 (PST)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 4A6E83A07F6 for <ntp@ietf.org>; Mon, 14 Dec 2020 05:02:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607950947; 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=wmeSc1E5OBJnf8s0dvCcYJrtLsW15AlXMDxJKu3WQBU=; b=WCMEM7JXH5yqdAdhb2HcLNdKGAGdLegQh80pg1dDRU2FdQkk5UkdAWlBQxYYvqRDmsxjb3 TnKGijZXgThy/MOkkzpYi1S1GZDp2tR15FsgA42zz89K5DfnuOuJI9GRaUxSu/n/8p91FS 1tLbcDypGo5zM2hHzufUgRoErFn5SGU=
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-2-RkqfRYB-OTuXtuDuhWvIOA-1; Mon, 14 Dec 2020 08:02:24 -0500
X-MC-Unique: RkqfRYB-OTuXtuDuhWvIOA-1
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 793DC1007B16; Mon, 14 Dec 2020 13:02:23 +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 A068762AF8; Mon, 14 Dec 2020 13:02:20 +0000 (UTC)
Date: Mon, 14 Dec 2020 14:02:19 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: James <james.ietf@gmail.com>
Cc: "ntp@ietf.org" <ntp@ietf.org>, Dieter Sibold <dsibold.ietf@gmail.com>, "Salz, Rich" <rsalz=40akamai.com@dmarc.ietf.org>
Message-ID: <20201214130219.GF2540645@localhost>
References: <20201207153444.GO2352378@localhost> <1204B871-7728-45DA-B628-8F79BD074A96@akamai.com> <20201208095046.GT2352378@localhost> <D15AF5B4-F976-44D6-B8E7-986E3B8CE23D@akamai.com> <20201208150725.GX2352378@localhost> <6d7daa5e-8537-a3a5-a5c3-2468be4c2918@gmail.com> <20201209083800.GY2352378@localhost> <bcec8d14-9af9-96c1-7e71-39569cb7b0ed@gmail.com> <20201209150437.GE2352378@localhost> <9f08d146-b8e2-2139-332d-142b35415432@gmail.com>
MIME-Version: 1.0
In-Reply-To: <9f08d146-b8e2-2139-332d-142b35415432@gmail.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
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="us-ascii"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/uLFQSwgyh__xUXRzRV-Wl81w9ak>
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: Mon, 14 Dec 2020 13:02:30 -0000

On Thu, Dec 10, 2020 at 01:55:53PM +0100, James wrote:
> On 09-12-2020 15:04, Miroslav Lichvar wrote:
> > Is NTPv4+NTS or the NTPv5 I'm proposing + NTS not resistant to
> > downgrade attacks? Are you refering to some TLS issue? What changes
> > would you suggest to fix it?
> 
> I have very deliberately avoided solutionising or mentioning NTS thus far to
> focus on the requirements and use-cases. NTPv5 + NTS may be appropriate and
> mitigate downgrade, but what is absent thus far is a document describing the
> protocol which contains normative language about the matter.

Ok. Thanks for clearing that up.

> > Are you considering a bug where the
> > client forgets to check if the packet is authenticated? Do you expect
> > NTP implementations to drop support for older NTP versions?
> Having authentication enforced in the next version of the protocol does not
> prevent implementations from supporting older versions.

Or, supporting the next version without authentication.

If some implementation wanted to prevent its users from using
unauthenticated NTP, it could support only authenticated NTP and it
could do that with NTPv3, NTPv4 and any future version. The protocol
version doesn't really matter here.

> > If it is not an extension, how do you replace it when it's found to be
> > insecure?
> When it comes to the agility of authentication algorithms, having a baseline
> which implementations should support in addition to an IANA registry to
> allow for new algorithms should be sufficient. When it comes to insecurity
> with the protocol as it functions, this can be mitigated ahead of
> standardisation with thorough review, the use of existing known primitives
> (avoiding "exotic" crypto), formal verification etc.

To me it would make sense to have this separate from the NTPv5 on-wire
specification. NTP just needs its data protected. It's up to NTS or a
more general "secure NTP" document to specify how. Currently, NTS
requires TLS1.3 or later. When a major issue is found in TLS1.3 and
that requirement needs to be updated, it's not an issue specific to
NTPv5.

> > > * And that the computation/latency costs that would incur would be
> > > acceptable and reduced as implementations improve over time.
> > It takes few microseconds to authenticate an NTP packet with NTS. Are
> > you saying that's too long? What is your use case? The delay is
> > comparable to the typical error of a transmit timestamp. In the
> > interleaved mode it doesn't matter how long it is, it's compensated.
> To clarify I am not saying that is too long, I am saying that it should not
> be an issue for the use cases I have already described.

Ok.

I think there might be a requirement for the transmit timestamp to be
located close to the end of the protected data to allow an advanced
implementation to interrupt the authentication process, save a fresh
timestamp, and resume the process, in order to minimize the error in
the transmit timestamp. However, this might conflict with a
requirement to have the timestamp at a fixed offset to simplify a
hardware timestamping implementation.

> I very specifically called out the NTP Pool in my requirements document.
> Could you (or someone else reading) elaborate what specific concerns would
> be around the requirements I have described and their potential impact to
> deployment onto the NTP Pool?

The issue with the pool is that there is no single trusted entity, but
a large number of volunteers, so NTS or another "secured NTP" would
have a different meaning from what would be normally expected. It
might be possible to prevent MITM attacks, but it's not possible to
prevent an attacker from joining the pool with their own server.

-- 
Miroslav Lichvar