Re: [openpgp] time representation in OpenPGP

Jon Callas <joncallas@icloud.com> Tue, 05 July 2016 02:41 UTC

Return-Path: <joncallas@icloud.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DB87912D0C1 for <openpgp@ietfa.amsl.com>; Mon, 4 Jul 2016 19:41:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=icloud.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 8E_psHpBaFn9 for <openpgp@ietfa.amsl.com>; Mon, 4 Jul 2016 19:41:08 -0700 (PDT)
Received: from st13p27im-asmtp003.me.com (st13p27im-asmtp003.me.com [17.162.190.112]) (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 A2C8712B02B for <openpgp@ietf.org>; Mon, 4 Jul 2016 19:41:08 -0700 (PDT)
Received: from process-dkim-sign-daemon.st13p27im-asmtp003.me.com by st13p27im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0O9T01000LVIX700@st13p27im-asmtp003.me.com> for openpgp@ietf.org; Tue, 05 Jul 2016 02:41:08 +0000 (GMT)
Received: from [10.0.23.7] (media.merrymeet.com [173.164.244.98]) by st13p27im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0O9T01A0ZM4HRX30@st13p27im-asmtp003.me.com>; Tue, 05 Jul 2016 02:41:07 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-05_01:,, signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=69 spamscore=69 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1607050024
Content-type: text/plain; charset="us-ascii"
MIME-version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Jon Callas <joncallas@icloud.com>
In-reply-to: <alpine.GSO.1.10.1607042157560.5272@multics.mit.edu>
Date: Mon, 04 Jul 2016 19:41:05 -0700
Content-transfer-encoding: quoted-printable
Message-id: <96DA2212-53E6-4F6E-AAF5-433921A3429E@icloud.com>
References: <87d1muyh70.fsf@alice.fifthhorseman.net> <fd725ea87a9141d0883831900e072f1f@usma1ex-dag1mb1.msg.corp.akamai.com> <51e9f5c2-fe2a-a699-aa0c-15114cf948f3@sumptuouscapital.com> <20160703164942.GB327700@vauxhall.crustytoothpaste.net> <alpine.GSO.1.10.1607042157560.5272@multics.mit.edu>
To: Benjamin Kaduk <kaduk@MIT.EDU>
X-Mailer: Apple Mail (2.3124)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=4d515a; t=1467686467; bh=M+pVF0z/yMqL05jWPFJLXOO0z1K7EhNKoZw6iepPnJc=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=qBP8aNZg2q13vmKiNZBBBp/O49GWgcBLsZStudMx54Et8CF4Qnqu7j8Gc6jXpizy7 FUK3YzzSUaVBtG9WTTiA4z+g5IWaU8V/JluJ+ikDgonwpF9KkjjeFRhy468kk4UskJ TFI0UG4K1nUsIOjZnRelTTiVggYg77nUdBcu7HmMWKVoOaK0TDG7QekaaoUJpr7gK8 FtCX2z3R4KETqXmlc4hyk5rUf62q2qMzM6jpQFtRC/au/9s8pbIcME5Tyj986/nmzj J4yInkDmWDYSyI3e8nk6GHK0Xev0gCtMB2qAIP6WlBipcYwC0NrOjPTFPKp11XBd7O y33TOxb/ZyS3w==
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/DuPQNnS7xQGtYC1GVOPQHJNRO-4>
Cc: IETF OpenPGP <openpgp@ietf.org>, "brian m. carlson" <sandals@crustytoothpaste.net>, Jon Callas <joncallas@icloud.com>
Subject: Re: [openpgp] time representation in OpenPGP
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jul 2016 02:41:10 -0000

>> 
>> I'd strongly recommend simply using a 64-bit (signed?) integer.  It's
>> compact, avoids time zones (which are a source of bugs), and is the
>> logical extension.

Signed only if you really want to express negative time in some way. I think that negative time to express times *before* the zero date is a great idea.

> 
> I've seen 64-bit integer measuring in quanta of 100ns in a few places,
> FWIW.  The finer granularity doesn't really eat into the usable range, for
> a couple axes of future-proofing.

Yes, that's VMS. It was a 100ns tick, with a zero-time of 17-Nov-1858 (that's the zero time of the American Ephemeris and more or less Julian Day One Million) and used negative time to express delta times rather than absolute. Even with that, it's fine into five-digit years.

	Jon