gpg -k --keyid-format longgpg -K --keyid-format long- If the primary secret key is not available, the secret title will end in a hash i.e. (
sec#). In this case, you will need to import the primary master key to be able to modify/generate secret sub keys
gpg --import {filename}- Do something: Using the primary key identifier run,
gpg --edit-key {key identifier}- Run command to change the passphrase
passwd- Run command to add sub key
addkeyi) Export the subkeys
gpg -a --export-secret-subkeys ${subKey! or primary key identifier} > {filename}ii) Delete the primary and subkey from current keyring
gpg --delete-secret-keys {uid email here}iii) Import the sub key(s)
gpg --import {filename}iv) Trust the key Using the primary key identifier run,
gpg --edit-key {key identifier}then run command trust
Generating Encryption GPG Subkeys