Re: [Ntp] draft-ietf-ntp-roughtime-05: tag change makes implementation more complex

JP Sugarbroad <taralx@gmail.com> Tue, 21 September 2021 04:07 UTC

Return-Path: <taralx@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 EE1283A1FB3 for <ntp@ietfa.amsl.com>; Mon, 20 Sep 2021 21:07:06 -0700 (PDT)
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, 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, SPF_HELO_NONE=0.001, SPF_PASS=-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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IJB7Y0bEu3PM for <ntp@ietfa.amsl.com>; Mon, 20 Sep 2021 21:07:05 -0700 (PDT)
Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 242AF3A1FB4 for <ntp@ietf.org>; Mon, 20 Sep 2021 21:07:05 -0700 (PDT)
Received: by mail-pf1-x42e.google.com with SMTP id q23so16132755pfs.9 for <ntp@ietf.org>; Mon, 20 Sep 2021 21:07:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eu3fgfUmsmLDGUts4pJkVcsFj42Ndo1ARUJmEaoTfRs=; b=dp/ajDTxkECWWCKTGmFuU9/C5Ad1ANBleEc/ubhbsAjmom3q+7MV1lADRcFoY9i67G tjIrqwxGJRvA7mfk9yV6Othb6HYjflJwY4SQkrDxAgvM1h+D5bcX2xUbrxhqn9/AP87t NkQcmUbfJ32lYQveRk52inzHzyZjBGeFEN07quvtcsXuS4l9L//SJP4Xg3BnwcuGVXYR 8oDRYEpKKFrV2XiAunC/d8LHRcVxV5DA9HtZxLAtslkqCte3Ewdx+2BPZMYSbenFHT9I 0aPAuglwysRMXMqUotyKvhDO6eqaKdAC5ShH84wRccBA6pQIyFc/wB9s3UPgiiCB1Jri OH+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eu3fgfUmsmLDGUts4pJkVcsFj42Ndo1ARUJmEaoTfRs=; b=yrI8fQEnMKjH67hznwAxw5zfesmq/OdWBqyX6aOYqtllsR3Y5wmzg+lTxFN6Wv9NwK kO5MO5qQzNpJAS+6YsrC3ptJLB297dusrKKUZDp8qaVpct0ewOBeJFyF6q8yO2otYinI Vq/8DNBE9/rODAvKg/Er/iHKi652hhvvviTW/dbAi7mz9AATpAYzvbkxlKytpx+270+F LJtfbAsPLLwNMn0VXtu7rt14j+SBOzp7OammZLoFqWg0p7tLwurzx0pns7P7qUUShvXL r6PI1APWQrlm/4RdBS7MNlvcIwAeObAn2Prxjee6WPf1//kLMGsufYcG5wQLBXgwdYIu KNGQ==
X-Gm-Message-State: AOAM5334uYVXhmIP8uC2WBFrMGFidqMkrFGqd3r2809KKE0c56HsQTUx t8wWGYNxFClALVnmXmzPLEocFXb9A4klb1CiADg=
X-Google-Smtp-Source: ABdhPJz8LSt3l8/oLmJwezb52ILmzYh34js9NK7pTRKjjeCA48D6dYyEhxkUG1IBOGSoqgfNRSjlsirnkC0eR+sSZTY=
X-Received: by 2002:aa7:9094:0:b0:42a:ea30:5509 with SMTP id i20-20020aa79094000000b0042aea305509mr28699552pfa.30.1632197223695; Mon, 20 Sep 2021 21:07:03 -0700 (PDT)
MIME-Version: 1.0
References: <CAGZkp1-ZCuSvMyQyWCnE511O8-WL=OXfsTdraKsByMmWC3spVA@mail.gmail.com> <CACsn0ckZmR=k2NAmdyhVOA=V_XQ18AnBUBSTOu+bDXS1YsPpUg@mail.gmail.com> <CAGZkp18eASaF7qvubYpDgzvg643ZXuPwDs9qsiC1P_AVLcywLA@mail.gmail.com> <CACsn0cnjHFwxHT13nMavRFzRteWJ=SORY8v4RCZjdjYP0H3oaw@mail.gmail.com>
In-Reply-To: <CACsn0cnjHFwxHT13nMavRFzRteWJ=SORY8v4RCZjdjYP0H3oaw@mail.gmail.com>
From: JP Sugarbroad <taralx@gmail.com>
Date: Mon, 20 Sep 2021 21:06:51 -0700
Message-ID: <CAGZkp1-DF0T1DMN8tnoTy6Lb0OhbggfY_E4qFt7hxCh=2w1==A@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Cc: NTP WG <ntp@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000b8ca9b05cc798772"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/IMMWGymRpz0kpHBFBREAhvWdr8c>
Subject: Re: [Ntp] draft-ietf-ntp-roughtime-05: tag change makes implementation more complex
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 21 Sep 2021 04:07:07 -0000

On Mon, Sep 20, 2021, 20:43 Watson Ladd <watsonbladd@gmail.com> wrote:

Could you perhaps say more about why this is a barrier to your
implementation? It's easy enough for my coauthor and I to change them
back, but we'd like to know why.


I hear you on the other short tags, so I guess my request is to allow the
padding tag to be last. (FWIW the way the tags sort feels weird.)

The shape of a packet before was:

2, 32, "NONC", "PAD\xFF", random, padding

Notably, the size of the padding doesn't have to be calculated and is at
the end. So one can allocate a zeroed buffer, write mostly fixed data to
the start of it, and then send.

In the new version:

"ROUGHTIM", len, 3, padlen, padlen+4, "PAD\0", "VER\0", "NONC", padding,
x80000005, random

This version has padding in the middle, and the lengths are all dependent
on the length of the packet.

If padding were at the end:

"ROUGHTIM", len, 3, 4, 36, "VER\0", "NONC", "PAD\xFF", x80000005, random,
padding

Back to mostly static values. It's a small thing, but I'm on an embedded
platform and these things can matter...

- JP