If an expiration date is specified beyond the range supported by the 32-bit
unsigned int specified in RFC 4880 section 3.5, GnuPG doesn't seem to detect the
overflow. For example:
0 rex:~$ gpg --gen-key
gpg (GnuPG) 1.4.9; Copyright (C) 2008 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) DSA and Elgamal (default) (2) DSA (sign only) (5) RSA (sign only)
Your selection?
DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire <n> = key expires in n days <n>w = key expires in n weeks <n>m = key expires in n months <n>y = key expires in n years
Key is valid for? (0) 100y
Key expires at Wed 07 Jun 1972 02:21:32 PM UTC
Is this correct? (y/N)
gpg: Interrupt caught ... exiting
130 rex:~$
This happens on both 32- and 64-bit systems. On a 64-bit system, it should be
easier to detect overflows that fit into the 64-bit range at least.