Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
gpg --full-generate-key
  1. On the menu prompt select the default RSA and RSA (default) unless there are other explicit requirements.

Code Block
Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
  (14) Existing key from card
Your selection? 1
  1. What keysize do you want? Enter the desired or use default

  2. Select key expiry period. Choose the desired or use default.

Code Block
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0)
  1. Confirm your choices and press enter.

Code Block
Is this correct? (y/N) y
  1. The prompt will require you to enter the identity for your key. Enter any name must be at least 5 characters long.

Code Block
GnuPG needs to construct a user ID to identify your key.

Real name: duplicity
  1. Then enter your email address on the next prompt then enter

  2. Then enter a comment on the next prompt then enter

  3. Finally, confirm all your entries.

Code Block
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
  1. You'll be presented with a password dialog, enter a secure password.

Export public key (-pub.key)

  1. List the keys

Code Block
gpg --list-keys --keyid-format SHORT
/home/morty/.gnupg/pubring.kbx
-----------------------------
pub   rsa2048/1F660965 2021-05-11 [SC]
      3775D234D1729924919064E33B10AA311F660965
uid         [ultimate] duplicity
sub   rsa2048/78876A7A 2021-05-11 [E]

NOTE: Key-ID can be in SHORT (8 last digits) or LONG (16 last digits) for the example above SHORT 1F660965, LONG 3B10AA311F660965 and then the fingerprint 3775D234D1729924919064E33B10AA311F660965

  1. Export public key

Code Block
gpg --armor --output 1F660965-pub.key --export 1F660965

Export private keys (-priv.key)

  1. List the keys

Code Block
gpg --list-secret-keys --keyid-format SHORT
/home/morty/.gnupg/pubring.kbx
-----------------------------
sec   rsa2048/1F660965 2021-05-11 [SC]
      3775D234D1729924919064E33B10AA311F660965
uid         [ultimate] duplicity
ssb   rsa2048/78876A7A 2021-05-11 [E]
  1. Export the secret key

Code Block
gpg --armor --output 1F660965-priv.key --export-secret-keys 1F660965

Export ultimate keys (-

...

ultimate.trust)

Code Block
gpg --export-ownertrust

...

Code Block
6826D25B796311C5B124B2F4600AD683013E97CA:6:
3775D234D1729924919064E33B10AA311F660965:6: here!!
940358D7E31AB2F3020B3E3713BDD534C84AD974:6:

echo "3775D234D1729924919064E33B10AA311F660965:6:" >  1F660965-ulimateultimate.trust

DONE!!

...

Import the key

...