PGP Private key Error

So ive been using PGP on my emails for a while. Last key i generated was in 2017. Been using it for a while. That key was expiring this month so i had to generate new ones.

So i did generate a new pair using gpg and gpa. All set perfectly. I tested the new PGP by decrypting incoming emails [manually using gpa] and it worked fine. However, im unable to access my private key. By that, i mean im unable to see my private key. I did take a backup of my keys using gpa but when i open the keyfile that i saved as txt file/or acs file, i open it with random text editor but all im able to see is my public key.

But the same key file has these headers when i open it :

[************************************************************************

WARNING: This file is a backup of your secret key. Please keep it in
a safe place.

************************************************************************]

pub rsa4096 2019-xx-xx [SC] [expires: 2021-xx-xx]
fingerprint (xxxxxxxxxxxxxxxxxxxxx)
uid Info of the key owner [me]
sub rsa4096 2019xx-xx [E] [expires: 2021-xx-xx]

-----BEGIN PGP PUBLIC KEY BLOCK-----

(My Public key)

-----END PGP PUBLIC KEY BLOCK-----

And the file ends. Private key nowhere to be seen. Am i missing something here?

As far as i know i should also be able to see a key that looks like

-----BEGIN PGP PRIVATE KEY BLOCK-----

(my private key)

-----END PGP PRIVATE KEY BLOCK-----

Ive been doing this as root. Wonder what went wrong or is it supposed to be like that? if yes then how can i make sure i have a backup copy of my private key on my flashdrive.

Appreciate Your Attention.

Hi @RedRuby,

You can export private keys as follows:

  1. gpg --export-secret-keys # this exports all private keys
  2. gpg --export-secret-keys --armor KEYNUMBER > EXPORTEDKEY.asc # should export private key with ID KEYNUMBER to file EXPORTEDKEY.asc
    You can also run without the --armor option if you don’t care about the file being ASCII

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.