edit-key — presents a menu for operating on keys
edit-key key


This command presents a menu which enables you to perform key-related taskes. The key specifier key specifies the key pair to be edited. If the specifier matches more than one key pair, gpg issues an error and exits.

Key listings displayed during key editing show the key with its secondary keys and all user ids. Selected keys or user ids are indicated by an asterisk. The trust and validity values are displayed with the primary key: the first is the assigned trust and the second is the calculated validity. Letters are used for the values:

-No ownertrust assigned / not yet calculated.
eTrust calculation has failed.
qNot enough information for calculation.
nNever trust this key.
mMarginally trusted.
fFully trusted.
uUltimately trusted.

The following lists each key editing command and a description of its behavior.


Makes a signature on the current key. If th key is not yet signed by the default user or the user given with the option local-user, the program displays the information of the key again, together with its fingerprint and asks whether it should be signed. This question is repeated for all users specified with the option local-user.


Same as sign, but the signature is marked as non-exportable and will therefore never be used by others. This may be used to make keys valid only in the local environment.


Revoke a signature. Asks for each signature makde by a one of the private keys whether a revocation certificate should be generated.


Change the owner trust value. This updates the trust database immediately and no save is required.


Disable the key. A disabled key cannot normally be used for encryption.


Enable a key that has been previously disabled.


Add a new user id to the current key.


Delete a user id from the current key.


Add a new subkey to the current key.


Delete a subkey from the current key.


Revoke a subkey of the current key.


Change a key expiration time. If a subkey is selected, the time of that key will be changed. With no selection the expiration time of the current primary key is changed.

key n

Toggle selection of subkey with index n. Use 0 to deselect all.

uid n

Toggle selection of user id with index n. Use 0 to deselect all.


Change the passphrase of the private key of the selected key pair.


Toggle between public and private key listings.


Check all selected user ids.


List preferences.


Save all changes to the current key and quit.


Quit without updating the current key.