Re: [openpgp] time representation in OpenPGP

Kristian Fiskerstrand <kristian.fiskerstrand@sumptuouscapital.com> Sun, 03 July 2016 16:53 UTC

Return-Path: <kristian.fiskerstrand@sumptuouscapital.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 B00D612D115 for <openpgp@ietfa.amsl.com>; Sun, 3 Jul 2016 09:53:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.935
X-Spam-Level:
X-Spam-Status: No, score=-1.935 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_SOFTFAIL=0.665] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=sumptuouscapital-com.20150623.gappssmtp.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 QAv3i0LqdZCa for <openpgp@ietfa.amsl.com>; Sun, 3 Jul 2016 09:53:22 -0700 (PDT)
Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (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 13FF9128E19 for <openpgp@ietf.org>; Sun, 3 Jul 2016 09:53:22 -0700 (PDT)
Received: by mail-lf0-x235.google.com with SMTP id q132so104460668lfe.3 for <openpgp@ietf.org>; Sun, 03 Jul 2016 09:53:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sumptuouscapital-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=28cFv132Lno7YbzcDxc8qzHnp/5S0FIxZsovmBuVLiQ=; b=CsVdWIzO5RaPxuMkftINNU3cN8dHmqBqCmPtlb+dGXHSBUgM+ApbGWhDT13kJuzLvE 8whPPwI9RA9TGP0RzJ9f3aRQKBCuZoJmnuFJFNZZzCre8jWOfEcaWdwUfh3B1vcJcAcP /87n+KBOLNDknydIX5o8h1PpKwJmDNVNagSJkoCWJVQgW6eEaRXZj9veRedcAIISvAz8 pm9eQc1ympPoX+6S976ZwC1ANs+g/DgGw2hhmPa51CIq7d9iFQ5dnYUWMZfua0gv7HNA k6i3NUc3MqTc7M0vgXfsgHfhshIhmifSfbV3w1E0CMnPPJpbsVhQrK7Led4qQY4N7dzd tAiw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=28cFv132Lno7YbzcDxc8qzHnp/5S0FIxZsovmBuVLiQ=; b=c+/ZBedZJfq/sqUuYITKr+rwmhLn60bm6xY5n9LKZXGHz+OHGIDzxf++qqUZX/qu4S 4vjCrxgugiBrkRMiJClfsXtZwFlX+mi6A4SPCUxVwFGFOD6GrPOnb7rtGIIgeCq+JuOm uj/cKPHltqbwwoTOpJf88HrE0HbtcLo0LEmRWqTnZuXi1Jo6wmMoY+iGQkLKD0aF1MlQ NvAOYdEs99vgtXha/87OUlGRAgYAZyV2EJX71GaUj5wIufd4xDKFPLXI6WUy20OuVdwZ KHNIUlYok+jaiKCQd2yqs/PJQXgFKfnnFIk417n7Yjh20x116U1nX4vWJffWsnfW+7c3 8aLQ==
X-Gm-Message-State: ALyK8tINkfK8jVaKK5PRkO7hHdN3wCWsNasJaM0JMTxYUADFD3YbsCwsrhwgjYUY9KtCZg==
X-Received: by 10.25.16.210 with SMTP id 79mr2291428lfq.127.1467564799966; Sun, 03 Jul 2016 09:53:19 -0700 (PDT)
Received: from [10.144.0.7] (host-37-191-220-247.lynet.no. [37.191.220.247]) by smtp.googlemail.com with ESMTPSA id u13sm2454605lja.15.2016.07.03.09.53.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2016 09:53:18 -0700 (PDT)
To: "brian m. carlson" <sandals@crustytoothpaste.net>, IETF OpenPGP <openpgp@ietf.org>
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>
From: Kristian Fiskerstrand <kristian.fiskerstrand@sumptuouscapital.com>
Message-ID: <acdfe6f6-4aeb-2730-7b63-8bfbf1d020f6@sumptuouscapital.com>
Date: Sun, 03 Jul 2016 18:53:14 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
MIME-Version: 1.0
In-Reply-To: <20160703164942.GB327700@vauxhall.crustytoothpaste.net>
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="bUD0bRodUkMNHIoPFd7XLJPlX6TBNT4w7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/PL49WL9RAwg8807iCRK_3tsOZ6A>
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: Sun, 03 Jul 2016 16:53:24 -0000

On 07/03/2016 06:49 PM, brian m. carlson wrote:
> On Sun, Jul 03, 2016 at 03:57:31PM +0200, Kristian Fiskerstrand wrote:
>> On 07/03/2016 03:48 PM, Salz, Rich wrote:
>>> I suggest we use ASN1 generalized time (which has only a couple of
>>> bytes overhead) or ISO 8601 profiled to be like the ASN1 format:
>>> YYYY-MM-DD-HH:MM:SS.sss with fraction optional.
>>>
>>
>> ASN1 sounds complex in this case, some form of ISO8601 variant might be
>> helpful.
>>
>> Alternatively expanding the size of the value from 32 bits to 64 bits
>> might be easier to deal with for backwards compatibility reasons.
> 
> I'd strongly recommend simply using a 64-bit (signed?) integer.  It's

current is 32 bit unsigned, so it'd be unsigned still

> compact, avoids time zones (which are a source of bugs), and is the

This could be countered by specifying always using UTC, but I agree the
parsing is more complex than a simple time epoch without any obvious
benefits.

-- 
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
Twitter: @krifisk
----------------------------
Public OpenPGP certificate at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Donec eris sospes, multos numerabis amicos.
Tempora si fuerint nubila, solus eris.
As long as you are wealthy,you will have many friends.
When the tough times come, you will be left alone