Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Should I backup my public GPG key?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Sat Apr 26, 2014 10:47 pm    Post subject: [solved] Should I backup my public GPG key? Reply with quote

Do I need to backup my public GPG key or will the private key alone allow me to decrypt?

Last edited by grant123 on Sun Apr 27, 2014 2:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7048
Location: almost Mile High in the USA

PostPosted: Sat Apr 26, 2014 10:50 pm    Post subject: Reply with quote

You just need the private key to decrypt (if everyone has your public key, everyone could decrypt?), and you can generate the public key with the private key.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Sat Apr 26, 2014 10:53 pm    Post subject: Reply with quote

Quote:
you can generate the public key with the private key

Can anyone confirm this? If it's true, I see no reason to backup the public key.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10156
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Apr 26, 2014 10:54 pm    Post subject: Reply with quote

Convenience? It's so small. Also, do you want to lose all the public keys on your key ring you've collected from others? Back up both.

The private key contains all the necessary information to manufacture the public key, but I'm unaware of an existing command with gpg to do so. Yet another reason to back up both.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7048
Location: almost Mile High in the USA

PostPosted: Sun Apr 27, 2014 1:09 am    Post subject: Reply with quote

You should definitely back up public keys from other people as you cannot regenerate these. But the amount of data we're talking about is so small compared to the size of a typical music file, why not back up everything?

I did see a quick search and it looks like it is possible to make gpg dump out new public keys from your secure keychain that includes the private key, if you're backing that up, you should be good to go?

Not sure if this is just a pedantic scrutinizing of documentation indicating key backups or not... but yes I think you're right if you want to save one 4K block of disk space...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10156
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Apr 27, 2014 1:35 am    Post subject: Reply with quote

For my edification, could you share that command, please?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6960

PostPosted: Sun Apr 27, 2014 3:09 am    Post subject: Reply with quote

Well, all public keys purpose are to be shared, hence why they are "public" :)
If you don't backup your public key, you won't be able to share it.
And if you cannot share it, why use any private key if you have nothing to decipher then?
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Sun Apr 27, 2014 4:02 am    Post subject: Reply with quote

krinn, what I'm wondering at this point is how to generate the public key from the private key.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6960

PostPosted: Sun Apr 27, 2014 4:31 am    Post subject: Reply with quote

ssh-keygen -y
To validate theory, ok for ssh and not gpg, but to keep you waiting more for eccerr0r's answer for gpg :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7048
Location: almost Mile High in the USA

PostPosted: Sun Apr 27, 2014 5:06 am    Post subject: Reply with quote

LMGTFY, I am not a frequent GPG user.

http://www-old.gnupg.org/faq/GnuPG-FAQ.html#sec-5-21
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6960

PostPosted: Sun Apr 27, 2014 5:39 am    Post subject: Reply with quote

eccerr0r wrote:
LMGTFY, I am not a frequent GPG user.

http://www-old.gnupg.org/faq/GnuPG-FAQ.html#sec-5-21


But i have never doubt on your google skills :)
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Sun Apr 27, 2014 2:45 pm    Post subject: Reply with quote

Very cool, thank you all!

Code:
gpgsplit --no-split --secret-to-public secret.gpg >publickey.gpg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum