Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting PGP private key [closed]

Tags:

pgp

I would like to know how data encryption and decryption works in PGP. As part of encryption, "gpg --gen-key" is used to generate the keys, And I got a public key, however I am not sure how to get private key. does it store in a specific location? is there any command to generate? I don't have any clue.

This is not specified in the document that I am following.

like image 824
Swamy Avatar asked Sep 07 '12 05:09

Swamy


People also ask

How do I delete a PGP key?

To delete a key:Right click, and choose Delete. Alternatively you can also select Edit ▸ Delete to delete the key. When you delete a GnuPG key that has been published on a key server, you only delete the key in your GnuPG keyring because a copy of the public key will still be present on some key server.

Where are PGP private keys stored?

The private GPG keys are encrypted and stored in the secret keyring, and public keys are maintained with certificates attesting to their trustworthiness in the public keyring.


1 Answers

The private key is not "visible" like the public one, but you can get it following these instructions:

You can list private keys this way, in order to check if it exists:

gpg --list-secret-keys

And you can make it visible doing a backup of your keys:

gpg --armor --export-secret-keys [email protected] > your_name.asc
like image 174
arutaku Avatar answered Oct 01 '22 01:10

arutaku