Re: [Ntp] NTPv5 client cookie size

Miroslav Lichvar <mlichvar@redhat.com> Sat, 05 November 2022 09:01 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 6494CC14F74D for <ntp@ietfa.amsl.com>; Sat, 5 Nov 2022 02:01:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.679
X-Spam-Level:
X-Spam-Status: No, score=-2.679 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.571, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 rhwjSc7XF3An for <ntp@ietfa.amsl.com>; Sat, 5 Nov 2022 02:01:57 -0700 (PDT)
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 9054EC14F731 for <ntp@ietf.org>; Sat, 5 Nov 2022 02:01:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667638915; 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=vmLXZMATb51hmLtP5H1Y4avR8gtDfxUESpdyAnAG0S4=; b=IQhFcYbH6HY4ZDl3m5VxIjOBooto+gjSJsv9wdHUu+MJUGw9Iir2k8AnXodiOALxgzgcF8 WQxygs+v2S6tshIPGyWWoIHxYE/0qjulNb9Kki5bveEIMOeY4jjQKewpU0KBDfSkWeMnxO SjZo7SYRIqXzPedyohAmNJw+ixyjf8o=
Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-fOyge5FxNVKpKfjsnDXUeg-1; Sat, 05 Nov 2022 05:01:53 -0400
X-MC-Unique: fOyge5FxNVKpKfjsnDXUeg-1
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A1F9238041D7; Sat, 5 Nov 2022 09:01:53 +0000 (UTC)
Received: from localhost (unknown [10.43.135.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 39C8017593; Sat, 5 Nov 2022 09:01:52 +0000 (UTC)
Date: Sat, 05 Nov 2022 10:01:52 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: David Venhoek <david@venhoek.nl>
Cc: ntp@ietf.org
Message-ID: <Y2YmgLTrMXKOEIGl@localhost>
References: <CAPz_-SUCq5xnWamQeUxA6HB0xVWJNoJGjVTKMvXv9ZfP9ztDHg@mail.gmail.com>
MIME-Version: 1.0
In-Reply-To: <CAPz_-SUCq5xnWamQeUxA6HB0xVWJNoJGjVTKMvXv9ZfP9ztDHg@mail.gmail.com>
X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5
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/WMfcM0tfyYp2Uyuaw58_NLozg_o>
Subject: Re: [Ntp] NTPv5 client cookie size
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, 05 Nov 2022 09:01:58 -0000

On Fri, Nov 04, 2022 at 12:03:38PM +0100, David Venhoek wrote:
> Dear all,
> 
> After having implemented the NTPv5 spec, I feel that the current size
> for the client cookie it gives is on the small side. Although 64 bits
> is probably still hard to guess for an out-of path attacker, I think
> we should seriously consider increasing its size given that 64 bits of
> security is usually regarded as insufficient.

Against what attacks would the increased cookie length help?

The cookie is not a key that an attacker could be cracking offline.
It's supposed to protect against off-path attacks. The packets need to
be received by the client. A typical client running on modern HW
cannot handle more than million responses per second. That's about
300000 years on average to guess a single 64-bit value.

Even if we assume an infitely fast CPU and network speed of 400Gb/s,
it's still about 500 years of guessing.

If we consider a client using random source port, those numbers need
to be multiplied by at least 10000 or more depending on the OS.

-- 
Miroslav Lichvar