Re: [openpgp] time representation in OpenPGP

Kristian Fiskerstrand <kristian.fiskerstrand@sumptuouscapital.com> Sun, 03 July 2016 13:57 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 F2AFE12B006 for <openpgp@ietfa.amsl.com>; Sun, 3 Jul 2016 06:57:44 -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 wnSqdxY7Wtts for <openpgp@ietfa.amsl.com>; Sun, 3 Jul 2016 06:57:42 -0700 (PDT)
Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (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 0D15112D0F3 for <openpgp@ietf.org>; Sun, 3 Jul 2016 06:57:42 -0700 (PDT)
Received: by mail-lf0-x22b.google.com with SMTP id q132so103069866lfe.3 for <openpgp@ietf.org>; Sun, 03 Jul 2016 06:57:41 -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=xPUeud69Li27tzlHGV4C1j0Ahz9/ERlQn2mqA9ff6HM=; b=yCUjJ+st1CIoZ8v8ooFZSJMFfhg04S0wiM5Z70Tpdo6X4CU07juQqVvQNDUgP82x3A +OzbBddeoktjwqXpLeOnz46rGSeHR4+9NfKxYB4mT+6P7gX1sD5xm+DSp7ceRilddNe/ DHr4i6zzHrZZXRJcyQuLcCAeXxHnrYEz7i9mWrSBmIcaJdsqcISUuN78xKWI2Tzc7DY8 0R3QhpvsDbqMUmGtiE1yzYNZY5e3PDIKmGxXyXJSzq8sMixDtHQPTGpGqukzdEZpXnfb D4BbXoCMTL+QQzVnTWYbDLgyZYt0jJcsd65aI9SctpARXpGuFiWpVHq3Ss+oqJT+Xw0H 277w==
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=xPUeud69Li27tzlHGV4C1j0Ahz9/ERlQn2mqA9ff6HM=; b=GTeBR0PTG0maCJb+VPOniVKzYeEV19UXs1DxCB0YJPxISwv8MA2em/lYfq/O6fbTeV nezKmGQDquyX6DZR6sT8pNL/6DiOxgdWsCg0OpG7Sz3muU29NsmEHRM2pd9ux2f6Tw/r VXNwPSaAUE+j8/c9tDqaqguctw+7wbYj57XvTjsfTsjcJxy9PYFKtYzLiq2/etgDHG7B h1TYgrbc/EmnK09JgLgZ9wDvfQWNbnf2LKEPDUDf67mAqJp06cbg7SEVxX48ewkhm/Bs ZfYA0io2zUeiDEy0HZiaoBbQP15vHWJ606MUr1uavseppO/2wc6t7vOxbobezyWn3c3R xrbw==
X-Gm-Message-State: ALyK8tKPczV6VcwFuCLlnbXg8hjz2385pEMgWMqDe2ITd8XynEcFZXn6IeSnoYYAcvufSg==
X-Received: by 10.25.40.8 with SMTP id o8mr1465165lfo.22.1467554259967; Sun, 03 Jul 2016 06:57:39 -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 j12sm3942124lfb.37.2016.07.03.06.57.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2016 06:57:38 -0700 (PDT)
To: "Salz, Rich" <rsalz@akamai.com>, Daniel Kahn Gillmor <dkg@fifthhorseman.net>, IETF OpenPGP <openpgp@ietf.org>
References: <87d1muyh70.fsf@alice.fifthhorseman.net> <fd725ea87a9141d0883831900e072f1f@usma1ex-dag1mb1.msg.corp.akamai.com>
From: Kristian Fiskerstrand <kristian.fiskerstrand@sumptuouscapital.com>
Message-ID: <51e9f5c2-fe2a-a699-aa0c-15114cf948f3@sumptuouscapital.com>
Date: Sun, 03 Jul 2016 15:57:31 +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: <fd725ea87a9141d0883831900e072f1f@usma1ex-dag1mb1.msg.corp.akamai.com>
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="j5w8Tgfw2119IKfSR8KkRDFiHveQSJP9w"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/D95CejJPVAzAJk_hMR0P7DKCi8k>
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 13:57:45 -0000

On 07/03/2016 03:48 PM, Salz, Rich wrote:
> 
>> A time field is an unsigned four-octet number containing the
>> number of seconds elapsed since midnight, 1 January 1970 UTC.
> 
> Isn't that the classic Unix time_t, which expires in 2038?

signed vs unsigned integers (although iirc it isn't explicitly defined
for time_t in C)

> 
> 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.

-- 
----------------------------
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
----------------------------
"Happiness in intelligent people is the rarest thing I know."
(Ernest Hemingway)