Re: [Ntp] [EXT] Pool and DNS

Neta R S <neta.r.schiff@gmail.com> Sat, 22 October 2022 08:49 UTC

Return-Path: <neta.r.schiff@gmail.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 129B0C1524A0 for <ntp@ietfa.amsl.com>; Sat, 22 Oct 2022 01:49:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.105
X-Spam-Level:
X-Spam-Status: No, score=-7.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 pnb6E3iKc4Bx for <ntp@ietfa.amsl.com>; Sat, 22 Oct 2022 01:49:00 -0700 (PDT)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 EDFE0C1522D5 for <ntp@ietf.org>; Sat, 22 Oct 2022 01:48:59 -0700 (PDT)
Received: by mail-wr1-x432.google.com with SMTP id bk15so8237795wrb.13 for <ntp@ietf.org>; Sat, 22 Oct 2022 01:48:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HylwAu9Cz4R6zkq/8ELOqO2wjASNdoPAW/1oZUJ4OAE=; b=ZcmkRRI6NjTYIEgKZxloW5OqeZiN2gnzFRAZxBLxbTXeVyf9h01PKCZwBbq5TUFTLi N+bF4JbKo5347HahZQGn3MX7obHxMSIi8hjpwv4gIwwRoW7UUktHVVmsQefSqeDoTOz/ 9XWWgmRm5kSXc0uiZBayXFmlsALL6kwkPGs+i4JHuAmzbANPlnA8KtP1Nfr1QA5hpdAc rzSI+R/cZnp1CpexsgCLWwAwOJJmA0LlhO03+qNpKe/Q6EO0nzUZzIijSeNS4TlB91jo YD1fnwzn3pEIyfwYI9qF9reOmQyqoF6q541+/6uyRzWKIhyBrKb797myKs1PWo4LK3Y1 R3UQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HylwAu9Cz4R6zkq/8ELOqO2wjASNdoPAW/1oZUJ4OAE=; b=5Oap48F3CnWfDkrmtX1WQaFOXKZFV975vApjKk+u/gOTw+QPH1OW2d6XkKOjii7Upe 9MrFusRn8HCUM0g4pkl5MjwdbDscizt31dziWyvkI2bil9GZ8/QoZp4Cd2JrqCsmL/F0 S+fwr5XonxYdyvhASAzaTYSd1X/qLm/uIw1CTzVsKud5XbzK0AipxT0Pee+iuYfROkSN 0/NdZ2VTgCYBxSJPG9QQmUAjcA2EkOABaNSNiKb2lfpXSzEvh+1IcWFJR3oXAdlnA0DE pNrwzK3069Khnem4BzYz3/9AbtaFUFp0mse+79NlJEWG0IUi+yP1Q/etZ+Z+apOZNJl8 xMlA==
X-Gm-Message-State: ACrzQf1Ph/IGiKzs7dW9CghbxfJ+1o2rcUPI9GdZtvmIcDTsiXGaJ6Io mORzf6aDn5bj/ypkpK550OD5JGW3L6lBj5RAqAc=
X-Google-Smtp-Source: AMsMyM5u8qNpfBfgoifv3/XF8FHPErmyCY1OauTIZA9EX4kQAD4gRRFSSAUah8T8gXjXOR8acov37kEu2K87iHRu27U=
X-Received: by 2002:a5d:6483:0:b0:22e:4804:8be4 with SMTP id o3-20020a5d6483000000b0022e48048be4mr14472763wri.528.1666428537976; Sat, 22 Oct 2022 01:48:57 -0700 (PDT)
MIME-Version: 1.0
References: <20221019044237.8DE2C28C1DB@107-137-68-211.lightspeed.sntcca.sbcglobal.net> <634FCA5A020000A10004EB98@gwsmtp.uni-regensburg.de> <CAM-HxCP=eZoKC1OzSUDJv-3Gx9njwyemnOosGyY8mLiYFZF8pQ@mail.gmail.com> <CAPz_-SXTDKTF8KHkzXUxQXgA4n0_GCKDfe4bQ+3CpO7gx7qqYA@mail.gmail.com>
In-Reply-To: <CAPz_-SXTDKTF8KHkzXUxQXgA4n0_GCKDfe4bQ+3CpO7gx7qqYA@mail.gmail.com>
From: Neta R S <neta.r.schiff@gmail.com>
Date: Sat, 22 Oct 2022 11:48:47 +0300
Message-ID: <CAM-HxCNnU4DesNiDa9+N2KC_KRWoLFMEiBSzKNB26E6zXdom7A@mail.gmail.com>
To: David Venhoek <david@venhoek.nl>
Cc: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>, halmurray@sonic.net, "ntp@ietf.org" <ntp@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000cbb1705eb9ba170"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/xaup0UrG56T3NhDb02x9PGHCbp8>
Subject: Re: [Ntp] [EXT] Pool and DNS
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: Sat, 22 Oct 2022 08:49:01 -0000

Hi David,


Just to make sure we are on the page, in Khronos standard we will refer to
NTS as a possible authentication for NTP that improves security.

If the current discussion regarding efficiency of cookie management comes
to the conclusion that this is not trivial then we should have another
draft describing Khorons with NTS.


Thanks,

Neta

On Sat, Oct 22, 2022 at 10:45 AM David Venhoek <david@venhoek.nl> wrote:

> Although Marcus is right that there isn't a strict lifetime specified
> for NTS cookies, I think we shouldn't disregard the potential impact
> this could have in terms of load when combined with NTS. RFC8915 does
> suggest on cookies the following (although non-normatively):
>
> Servers should periodically (e.g., once daily) generate a new pair
> '(I,K)' and immediately switch to using these values for all
> newly-generated cookies. Following each such key rotation, servers
> should securely erase any previously generated keys that should now be
> expired. Servers should continue to accept any cookie generated using
> keys that they have not yet erased, even if those keys are no longer
> current. Erasing old keys provides for forward secrecy, limiting the
> scope of what old information can be stolen if a master key is somehow
> compromised. Holding on to a limited number of old keys allows clients
> to seamlessly transition from one generation to the next without
> having to perform a new NTS-KE handshake.
>
> With multi-day polling intervals, which could easily occur with
> Khronos, it is not inconceivable that the cookies will be expired each
> and every time an NTS server is queried, which would mean a NTS-KE
> exchange each and every time that server is used. Given the cost of
> those, I think we should at least discuss why this is a reasonable
> cost to incur.
>
> Kind regards,
> David
>
> On Fri, Oct 21, 2022 at 11:08 PM Neta R S <neta.r.schiff@gmail.com> wrote:
> >
> > Hi,
> >
> > Perhaps, in order to avoid the uncertainty regarding when NTPs needs to
> query the DNS, we can just say that assuming the calibration period is one
> month,
> > 250 DNS queries means an average of  about 10 DNS queries per day, which
> is usually several order of magnitude lower than the total daily number of
> DNS queries per machine.
> >
> > Regarding NTS, I will add a reference to it in the draft, where we say
> that “adding an authentication layer to Khronos will enhance its security
> guarantees and enable the detection of various spoofing and modification
> attacks.”
> >
> > Thanks,
> > Neta
> >
> > On Wed, Oct 19, 2022 at 12:58 PM Ulrich Windl <
> Ulrich.Windl@rz.uni-regensburg.de> wrote:
> >>
> >> >>> Hal Murray <halmurray@sonic.net> schrieb am 19.10.2022 um 06:42 in
> >> Nachricht
> >> <
> 20221019044237.8DE2C28C1DB@107-137-68-211.lightspeed.sntcca.sbcglobal.net
> >:
> >>
> >> >> Around 250 DNS queries are required by Khronos to obtain a pool of
> 1000
> >> NTP
> >> >> servers, which is equal to the number of queries performed by NTPv4
> in a
> >> >> duration of 10 days (assuming a query per hour).
> >> >
> >> > Where did that "a query per hour" come from?
> >>
> >> Good question: maxpoll default is still 10, and on typical servers a
> higher
> >> number like 12 makes little sense.
> >>
> >> >
> >> > It's not wildly wrong and I don't have a better number.  But I worry
> that
> >> > somebody will assume it is a solid data point and use it in some
> future line
> >>
> >> >
> >> > of reasoning.
> >> >
> >> > ‑‑‑‑‑‑‑‑
> >> >
> >> > My reading is that pool traffic is bimodal.  ntpd makes a few DNS
> requests
> >> > on
> >> > startup then uses those servers for a long time.  sntp makes a DNS
> request
> >> > every time it is run.
> >> >
> >> > You can see that by watching the traffic on a server in the pool when
> you
> >> > disable it by setting the traffic rate to monitor‑only.  The traffic
> drops
> >>
> >> By "disabling" you mean removing it from the DNS pool, but keep it
> running?
> >>
> >> > abruptly by X%, then slowly decays.  "Slowly" is ballpark of 10% per
> day.  X
> >>
> >> >
> >> > is ballpark of 60%.  (I didn't get decent data because I only figured
> out
> >> > what
> >> > was going on after I had already messed things up.  Next time...)
> >> >
> >> > ‑‑‑‑‑‑‑‑‑‑
> >> >
> >> > The main problem with DNS and the pool is that there is currently no
> clean
> >> > way to remove a server from the pool.  If you remove it from the
> pool, the
> >> > sntp traffic will vanish since it will get removed from future DNS
> answers.
> >>
> >> > But the ntpd traffic will continue to use existing servers as long as
> ntpd
> >> > keeps running and the servers keep responding.
> >>
> >> Not quite: If the server performs worse than the rest, ntpd wil request
> >> another one, dropping the bad one.
> >> We are runníng most servers using manycast here, but the mechanism
> should be
> >> similar.
> >>
> >>
> >> >
> >> > There is no way to ask if a server is still in the pool.  If there
> was, ntpd
> >>
> >> > should check every day or week or ...  That would add more DNS
> traffic from
> >>
> >> > the long running ntpd servers.  Khronos would add much more.
> >> >
> >> > ‑‑‑‑‑‑‑‑‑‑
> >> >
> >> > The more interesting question is NTS.  The NTS‑KE step is fairly
> >> heavyweight,
> >> > much more work than a DNS lookup.
> >> >
> >> > The current parameters are 8 cookies with a lifetime of a day.  A day
> is
> >> > 86400 seconds.  That means we need to poll each server every 10800
> seconds.
> >>
> >> > With 1000 servers and M=15 (from the draft) that will take a Khronos
> poll
> >> > every (10800/1000)*15 => 162 seconds.  If Khronos runs at 10x the
> poll time
> >> of
> >> > ntpd, that's not going to work.
> >> >
> >> > We could gain a factor of 2 or 3 by dropping cookies older than a
> day.  (and
> >>
> >> > asking for several more to fill up again when we do poll a server)
> >> >
> >> > Of course, NTS doesn't work with the pool and I don't see how to fix
> that,
> >> > so this is all a wild goose chase.
> >> >
> >> >
> >> > Maybe we should be comparing Khronos with 1 or 2 trusted servers
> using NTS.
> >> >
> >> >
> >> > ‑‑
> >> > These are my opinions.  I hate spam.
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > ntp mailing list
> >> > ntp@ietf.org
> >> > https://www.ietf.org/mailman/listinfo/ntp
> >>
> >>
> >>
> > _______________________________________________
> > ntp mailing list
> > ntp@ietf.org
> > https://www.ietf.org/mailman/listinfo/ntp
>