[TLS] Issue #348: 32bit timestamp in ServerConfiguration

Martin Thomson <martin.thomson@gmail.com> Mon, 23 November 2015 18:28 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 026261ACD29 for <tls@ietfa.amsl.com>; Mon, 23 Nov 2015 10:28:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] 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 hFs_NBClfXFC for <tls@ietfa.amsl.com>; Mon, 23 Nov 2015 10:28:45 -0800 (PST)
Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (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 417AA1A00EE for <tls@ietf.org>; Mon, 23 Nov 2015 10:28:42 -0800 (PST)
Received: by igcmv3 with SMTP id mv3so34746158igc.0 for <tls@ietf.org>; Mon, 23 Nov 2015 10:28:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=pbPYYQN+qFZ+VCa6n8z4QRrfan0hQTlIIpFhLbX/sM8=; b=kIuIDwJJR8I2p47Np1qfDWTGDlTGkEEA9py8Z4uVGt5UyqwhV8U0sypzmT+tKQmZ+X /vDDCQhbdr/gf93jVoBo5VBjX0QfImGJ/ksgKvbV7i0TPRV2W8dgnpiRx4714QImh7hr aiOb9M1LI1jeeAQ/L0E3E/4Gg6QMOYtaNOBXdMEkCO4Ufo1EYEzyt6FkGOBY0wpH5JTt /B328kC3V5L6NHDowYgbu+dxQjM073uM7I7SjeqII4tdyTtRDFReR/KDE69GB03Gunfv iJTVRT0kwFnwfeVRRzmUX8mMnmbctwR2mB04ZrXuF5Q1ena4xYJvKh5TqSi7y/FclgrG SAKA==
MIME-Version: 1.0
X-Received: by 10.50.6.104 with SMTP id z8mr13829068igz.58.1448303321456; Mon, 23 Nov 2015 10:28:41 -0800 (PST)
Received: by 10.36.155.139 with HTTP; Mon, 23 Nov 2015 10:28:41 -0800 (PST)
Date: Mon, 23 Nov 2015 10:28:41 -0800
Message-ID: <CABkgnnUg1+7SZFhkRm63tfckKPpAF=AXmuKwj276Wo6g7ZW9mA@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: "tls@ietf.org" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/U5omacN_-RQZtg1J9BGH01HkMOw>
Subject: [TLS] Issue #348: 32bit timestamp in ServerConfiguration
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2015 18:28:47 -0000

>From the issue:

<<<
As far as I can see, the only timestamp used is expiration_date in the
ServerConfiguration (apart from X.509 validity checks which require
synchronised clocks). This is defined as seconds since UNIX epoch, and
will overflow sooner than later. Maybe either use a relative amount of
seconds here, or expand to a 64bit value!?

I suggest to use 32bit network byte order (same as
ticket_lifetime_hint), which value are the seconds how long this
configuration is valid, and thus may be cached for at most this amount
of seconds.
>>>

I don't want to see this change to a relative time.  That will mess
with our ability to create ServerConfiguration objects that live
outside of the handshake.

I have no real objection to expanding this to 64bit though.  (I'm
personally OK with stating that this is modulo 2^32, but recognize how
that might result in problems.)