Re: [openpgp] time representation in OpenPGP

Jon Callas <> Tue, 05 July 2016 02:41 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id DB87912D0C1 for <>; Mon, 4 Jul 2016 19:41:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.701
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 8E_psHpBaFn9 for <>; Mon, 4 Jul 2016 19:41:08 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A2C8712B02B for <>; Mon, 4 Jul 2016 19:41:08 -0700 (PDT)
Received: from by (Oracle Communications Messaging Server 64bit (built Feb 26 2016)) id <> for; Tue, 05 Jul 2016 02:41:08 +0000 (GMT)
Received: from [] ( []) by (Oracle Communications Messaging Server 64bit (built Feb 26 2016)) with ESMTPSA id <>; 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 <>
In-reply-to: <>
Date: Mon, 04 Jul 2016 19:41:05 -0700
Content-transfer-encoding: quoted-printable
Message-id: <>
References: <> <> <> <> <>
To: Benjamin Kaduk <kaduk@MIT.EDU>
X-Mailer: Apple Mail (2.3124)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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: <>
Cc: IETF OpenPGP <>, "brian m. carlson" <>, Jon Callas <>
Subject: Re: [openpgp] time representation in OpenPGP
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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.