Usage

  1. Create gpg gpg --gen-key
  2. list gpg gpg --list-keys, gpg --list-keys --keyid-format SHORT
  3. export public key gpg --export key-id -o file.key, --armor means use assic txt, not binary file. key-id is the email address or the number in pub line
  4. import key gpg --import file.key
  5. encrypt file gpg --encrypt -r key-id file
  6. decrypt file gpg --decrypt file

Issues

  1. Why it shows ‘unknown’ in uid?

It’s because gpg do not trust if the email address own the public key. We can use gpg --edit-key F1C68AB4 to update it to ultimate.

Reference: How to use PGP