LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GPG Data, Secret Key but no Public Key? (https://www.linuxquestions.org/questions/linux-software-2/gpg-data-secret-key-but-no-public-key-207299/)

Aeiri 07-20-2004 03:08 AM

GPG Data, Secret Key but no Public Key?
 
Well, I recently got f****d by formatting, but forgetting to copy the directory I moved everything into to save onto my pen drive, but I did manage to keep my encrypted data for GPG.

The problem is I only have the secret key for the data, and not my public key... is there an option to recreate the public key from the secret key, or a way to get it to decrypt the files without a public key? Or am I screwed yet again?

I REALLY need some of the data in these files, so any help would be greatly appreciated :)

bigrigdriver 07-20-2004 04:38 AM

I'm having trouble understanding how you could still have the secret key but not the public key. What do you get if you open a terminal and issue the command: gpg --list-keys?

Aeiri 07-20-2004 09:09 AM

I formatted. I forgot to export my public key and only exported my secret key when backing stuff up. Make sense now?

oot 07-20-2004 09:31 AM

You can generate a public key from a secret key, but not the other way around (so it sounds like you're in luck that you saved the right key).

To generate your public key in a text form suitable for sending to others, use:
gpg --armor --export <your email or gpg user name> >> <file to output the key to>

To generate your public key in binary from, use:
gpg --output <file to output the key to> --export <your email or gpg user name>

Aeiri 07-20-2004 05:29 PM

Quote:

gpg: WARNING: nothing exported
I've tried almost everything, but I can't get it to export the public key....

"gpg --list-secret-keys" has my secret key there, and "gpg --list-keys" has nothing, as I assumed...

Any other ideas?

Aeiri 07-20-2004 06:00 PM

HAHA!!! Got it.

The development version of GPG imports both secret and public keys when importing a secret key. I am able to decrypt my files now and everything is looking much much better :)


All times are GMT -5. The time now is 01:41 AM.