Search code examples
gnupgopenpgp

Can you add an expiration date for an existing OpenPGP key that has none?


I created and uploaded (to the keyservers) an OpenPGP key that has no expiration date. Oops. I'd like to add a date to the key. Is this possible? I've read that you can extend the expiration date, but not that you can pull it back... and I'm guessing that you cannot.

For example, perhaps I could revoke the current key and re-upload my key, this time with an expiration date. (I presume that this wouldn't work, because then you would have no protection if your password was compromised.) I've tried just doing gpg --send-key with the expiration date, but this doesn't seem to have succeeded.

Related links:


Solution

  • You can arbitrarily change and set expiration dates at any time, including both setting an expiration date when none existed before and "reactivating" expired keys by extending their expiry time. Have in mind expiry dates on primary keys don't add up anything to the key's security.

    If you changed the expiry date, uploaded the key to the key server network, but don't see any changes -- wait for some time. There is not a single key server, but a whole bunch of them, most of them organized in the "SKS key server network". They talk to each other exchanging new data, but reconciliation can take some minutes or even hours. Given nine hours passed between this answer and your question, very likely the new expiry date is already visible.