Re: [openpgp] New fingerprint: to v5 or not to v5

Werner Koch <wk@gnupg.org> Mon, 05 October 2015 10:46 UTC

Return-Path: <wk@gnupg.org>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3EC0E1A9107 for <openpgp@ietfa.amsl.com>; Mon, 5 Oct 2015 03:46:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
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 8EZGM9oBa026 for <openpgp@ietfa.amsl.com>; Mon, 5 Oct 2015 03:46:04 -0700 (PDT)
Received: from kerckhoffs.g10code.com (kerckhoffs.g10code.com [IPv6:2001:aa8:fff1:100::22]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5C89C1A8A81 for <openpgp@ietf.org>; Mon, 5 Oct 2015 03:46:04 -0700 (PDT)
Received: from uucp by kerckhoffs.g10code.com with local-rmail (Exim 4.80 #2 (Debian)) id 1Zj3HO-0001qW-Ce for <openpgp@ietf.org>; Mon, 05 Oct 2015 12:46:02 +0200
Received: from wk by vigenere.g10code.de with local (Exim 4.84 #3 (Debian)) id 1Zj3Ed-0007EM-UJ; Mon, 05 Oct 2015 12:43:11 +0200
From: Werner Koch <wk@gnupg.org>
To: "Mark D. Baushke" <mdb@juniper.net>
References: <878u84zy4r.fsf@vigenere.g10code.de> <87fv1xxe5w.fsf@alice.fifthhorseman.net> <87r3lgcup8.fsf@vigenere.g10code.de> <CACsn0c=-LKagSqTbgOV1W4Gu4u-f6vpVq82-nWSLGogjoeFKeg@mail.gmail.com> <CAMm+LwjeKDKnN2ZAisbKhWVS4kwCEm_VvcZ1MtftYzEJQpGdhg@mail.gmail.com> <87y4fi5wa9.fsf@vigenere.g10code.de> <74252.1444016636@eng-mail01.juniper.net>
Organisation: g10 Code GmbH
X-message-flag: Mails containing HTML will not be read! Please send only plain text.
OpenPGP: id=F2AD85AC1E42B367; url=finger:wk@g10code.com
Mail-Followup-To: "Mark D. Baushke" <mdb@juniper.net>, Phillip Hallam-Baker <phill@hallambaker.com>, Watson Ladd <watsonbladd@gmail.com>, IETF OpenPGP <openpgp@ietf.org>, Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Mon, 05 Oct 2015 12:43:11 +0200
In-Reply-To: <74252.1444016636@eng-mail01.juniper.net> (Mark D. Baushke's message of "Sun, 4 Oct 2015 20:43:56 -0700")
Message-ID: <877fn161fk.fsf@vigenere.g10code.de>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/E5lJU9s3rFtPReSc8ddGxTEcydc>
Cc: Watson Ladd <watsonbladd@gmail.com>, Phillip Hallam-Baker <phill@hallambaker.com>, Daniel Kahn Gillmor <dkg@fifthhorseman.net>, IETF OpenPGP <openpgp@ietf.org>
Subject: Re: [openpgp] New fingerprint: to v5 or not to v5
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 05 Oct 2015 10:46:06 -0000

On Mon,  5 Oct 2015 05:43, mdb@juniper.net said:

> This reminds me. I suspect we want to move to be explicit that the
> timestamp is unsigned during RFC 4880bis, or we want to allocate
> more bits and make it a 64-bit integer (8 octets).

I was thinking about this but:

 3.1.  Scalar Numbers

   Scalar numbers are unsigned and are always stored in big-endian
   format.  Using n[k] to refer to the kth octet being interpreted, the
   value of a two-octet scalar is ((n[0] << 8) + n[1]).  The value of a
   four-octet scalar is ((n[0] << 24) + (n[1] << 16) + (n[2] << 8) +
   n[3]).

Thus it is an implementation problem for 32 bit systems which still have
not switched from to a 64 bit time_t or fixed their implementation to
work with dates after 2038 (which is not a problem because only
(time_t)(-1) has a special meaning).

I doubt that we need to care about the year 2106 already in a v5 format.

> The currnet POSIX-compliant epoch time_t starting at midnight January 1,
> 1970 using a signed 32-bit integer (4 octets) runs into trouble at 0x80000000 

POSIX 2001 says in Base Definitions, line 13001:

  - time_t and clock_t shall be integer or real-floating types.

it is not specified whether signed or unsigned and thus both are
allowed.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.