Article View: alt.privacy.anon-server
Article #12019Key expiration second (Was: Does a key expire at the beginning of the day or at the end of the day?)
From: Thomas J. Boschloo
Date: Mon, 06 Nov 2000 00:00
Date: Mon, 06 Nov 2000 00:00
106 lines
5353 bytes
5353 bytes
irfirf@my-deja.com wrote: > > Greetings, > > In article <t0bboho1778f60@corp.supernews.com>, > "Tom Kozera" <Tom.Kozera(at)mail(dot)com> wrote: > > > > Dear PGP Enthusiasts, > > > > I have what seems to be a very simple question on my hands > > that has been bugging me for a while now and I have not been > > able to find an answer to it. > > > > "Does a key expire at the beginning of the day or at the end > > of the day?" > > <snip> > > This is a very interesting question. > > The answer is that it expires on the set expiry date > after the creation time of the key. > > So if a key was created on 11/05/2000 14:00:00, and was > set to expire a day hence, it will expire after > 11/06/2000 14:00:00. > > Unfortunately the PGP user interface does not show the > creation time of the key, nor does it allow the user > to specify the expiry time for the key. Only the date > is displayed. Although, the way the creation and expiry > dates are stored are a lot more fine grained. > > It will nevertheless be a worthy addition to the PGP user > interface to display creation/expiry dates with more > precision and allow the user more precision in setting > the expiry date of a key. Here is the public key format from the 2.x (RSA only) series: # Public key certificate # ---------------------- # # Offset Length Meaning # 0 1 CTB for public key certificate # 1 2 16-bit (or maybe 8-bit) length of packet # 3 1 Version byte, may affect rest of fields that follow. # (=2) for PGP versions <= 2.5 # (=3) for PGP versions >= 2.6 # 4 4 Timestamp of key creation # 8 2 Validity period, in number of DAYS (0 means forever) # 10 1 Algorithm byte for RSA (=1 for RSA). # --Algorithm byte affects field definitions that follow. # ? ? MPI of RSA public modulus n # ? ? MPI of RSA public encryption exponent e # (All MPI's have bitcount prefixes) # # NOTE: The public key packet does not contain a User ID field. The # User ID is enclosed in a separate packet that always follows # somewhere after the public key packet on a keyring or in any other # context. # # The validity period is currently always set to 0. So, while the creation date is known to the second exactly, the validity period is the natural number of days it stays valid. This value is ignored by 2.x versions of PGP and really depends on the version of PGP you are using I guess. RFC 2440 specifies that for DH keys there is a 'Key expiration time' of four bytes. It holds the number of seconds since its creation that it is set to expire. Both times are probably in GMT format. This packet is in the self-signature of a public key. This makes me currious (generates DH key and deletes the signature). Yes, deleting the signature on a key makes the expiry date go away! Fun! (self signes the key again, arg, stays 'never expire'). The most consistent interface would probably set the expiration 'second' at a round number of days on key generation. And treat v3 RSA keys the same way in expiring them at the exact creation second, however confusing this might be to users. I think this might especially be important for CPunk remailers that change keys every six months but it stays a headache as you never know how long your message would stay in a previous remailer pool. I think this is solved by accepting the new key a few days or weeks before the previous key really expires. It doesn't make things clearer by having RSA and DH keys behave differently from each other. Otherwise I would suggest to change the key expiration second to 0:00 of the expiry date in the key owners timezone. Not all programmers however will know exactly of how to calculate leap years and add the millenium second, which might mess up key expiry big time in their implementation of the OpenPGP standard. So I would advice against it to keep interoperatability at maximum between different version of PGP. Good luck to each and everyone of you, Thomas -- We live in the Matrix <http://www.whatisthematrix.com> http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x225CA009 Email: boschloo_at_multiweb_dot_nl
Technical Details
Message-ID:
<3A06C6C4.16A2B6BC@multiweb.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.security.pgp.tech.mbox.zip!not-for-mailReferences:
<t0bboho1778f60@corp.supernews.com> <8u4pnk$6e$1@nnrp1.deja.com>Show Full Headers
Complete Article Headers
Message-ID: <3A06C6C4.16A2B6BC@multiweb.nl> Subject: Key expiration second (Was: Does a key expire at the beginning of the day or at the end of the day?) Date: Mon, 06 Nov 2000 00:00:00 +0000 From: "Thomas J. Boschloo" <nospam@multiweb.nl> References: <t0bboho1778f60@corp.supernews.com> <8u4pnk$6e$1@nnrp1.deja.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.security.pgp.tech.mbox.zip!not-for-mail X-Deja-AN: 690311040 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@soneraplaza.nl X-Trace: amoeba1.srv.nld.sonera.net 973525845 212.127.221.157 (Mon, 06 Nov 2000 16:50:45 MET) Organization: SoneraPlaza MIME-Version: 1.0 NNTP-Posting-Date: Mon, 06 Nov 2000 16:50:45 MET Newsgroups: alt.security.pgp,comp.security.pgp.tech,alt.privacy.anon-server