COURSE 1 - 3.3.1.2. New key pair (Terminal)
QUICK INFO:
Asymmetric encryption: key pair (Private, Public); the recipient sends his Public key to the sender
Command to generate new key pair:
gpg --full-generate-key
options suggested:
Type of key: RSA;
Key size: 4096 bits;
Expiration date: if uncertain, select none;
User ID: a name, an email address, a comment (optional).
Passphrase: This is used to protect your private key
Command to list existing keys:
gpg --list-keys
Identifying key ID and short key ID
key ID: last 16 characters after "rsa4096/
short key ID: lst 8 characters after "rsa4096/"
Command to delete existing key:
gpg --delete-keys key_ID (alternatively, short_key_ID)
Command to backup the Public Key:
gpg --armor --export your_email@example.com > public_key.asc
Command to backup the Private Key (careful!):
gpg --armor --export-secret-keys your_email@example.com > private_key.asc
Command to setup key server (if needed):
gpg --send-keys --keyserver keys.openpgp.org your_key_id
How to generate a new key pair by using the Terminal. Also how to list keys, backup Public Key, backup Private Key, setup key seerver: