# Generate new GPG keys for Encryption in expert mode
gpg --expert --full-gen-key
# Generate a new key pair, for options:
# - Kind of key: ECC and ECC (Elliptic curve cryptography)
# - elliptic curve: Cure 25519 (ed25519)
# - Key expiry date: 2 years
gpg --list-keys --keyid-format LONG
# List long form of GPG keys
gpg --list-secret-keys --keyid-format=long
## Get fingerprint with a key ID
gpg --fingerprint <keyID>
# Prints the GPG key ID, in ASCII armor format using key's ID
gpg --armor --export 3AA5C34371567BD2
# Export your public key, give this file to people you want to communicate with
gpg --armor --export user-id-or-email > pubkey.asc
# Export public key for a person
gpg --export --armor alice@example.com
# Sign a file without encryption
# Encrypt and sign a document for multiple people
gpg --encrypt --sign --recipient alice@example.com --recipient bob@example.com doc.txt
# Encrypt file with only passphrase
## Sign someone's public because you know it is from them and trust them locally