LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-07-2011, 11:41 AM   #1
Tekth
LQ Newbie
 
Registered: May 2011
Location: CA, USA
Distribution: OpenSuse
Posts: 9

Rep: Reputation: 10
Question GnuPG recovery question


I have been using GnuPG for a couple of weeks now in order to encrypt my personal files on my computer. I have subsequently been backing up those files to Spider Oak's online backup service. Encrypting and Decrypting work great while my computer is in good working order.

My Question is if my computer takes a dump and i have to wipe it or anything else of the sort, how am I to decrypt my backed-up encrypted files once i get them again? Is it possible to reinsert private keys into GnuPG for such a disaster? Also (last one i promise), do key servers only store your public keys, making me solely responsible for my private keys safety?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-07-2011, 12:19 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
You can take a backup of ~/.gnupg, or you can use my preferred method...

Back up keys
Code:
$ gpg --export > pubkeys
$ gpg --export-secret-keys > privkeys
$ gpg --export-ownertrust > trustdb
Copy each of those files to media that you can keep somewhere safe. (IOW, especially do not keep the privkeys file in clear text out on the 'net somewhere.)

Restore keys
Code:
$ gpg --import pubkeys
$ gpg --import privkeys
$ gpg --import-ownertrust trustdb
Key servers only store your public keys. Keeping your private keys safe and intact is your responsibility.
 
2 members found this post helpful.
Old 06-07-2011, 12:23 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'd add: your private keys (in this scenario) are just as important as your data backups, so treat them as such. Without the private keys, you - quite literally - have no data backups. I keep mine on a USB drive in a secure place.
 
2 members found this post helpful.
Old 06-07-2011, 01:10 PM   #4
Tekth
LQ Newbie
 
Registered: May 2011
Location: CA, USA
Distribution: OpenSuse
Posts: 9

Original Poster
Rep: Reputation: 10
Thanks for the info/help. Im still getting used to how the whole public private key thing works.
 
Old 06-08-2011, 01:21 PM   #5
Tekth
LQ Newbie
 
Registered: May 2011
Location: CA, USA
Distribution: OpenSuse
Posts: 9

Original Poster
Rep: Reputation: 10
Ok, I have done that and have backed them up to a separate non-volatile media. What I am concerned with now is that Im not sure if the above procedure backed up anything I have in Seahorse. I have several passwords in my keyring within seahorse and Id like to back those up as well. Does the procedure you mentioned only backup the keys directly created from gpg and nothing else?
 
Old 06-09-2011, 09:11 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Keep a safe copy of the file in which the keyring is stored. Know what master password is used to encrypt it. Know exactly what version of the software is used.

Public key encryption, as you know, involves the use of a pair of keys, one of which is generated based on the other (but not the other way around). Data which has been encrypted by one can only be decrypted by the other and vice-versa. This is the core concept around which the entire scheme is based.
 
Old 06-09-2011, 04:47 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by Tekth
I have several passwords in my keyring within seahorse and Id like to back those up as well. Does the procedure you mentioned only backup the keys directly created from gpg and nothing else?
Yes, that's correct. Unfortunately I am not very familiar with Seahorse. (Perhaps a new thread, with the question focused on Seahorse, and with the side note that you've already backed up GnuPG keys, would be a good idea.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File Recovery Question dudeman41465 Linux - Software 2 04-19-2010 06:12 AM
Question about GnuPG key types and lengths MindOfMercury Linux - Security 1 12-07-2007 11:26 AM
mail recovery question plisken Linux - General 4 11-07-2005 08:12 AM
gnupg and enigmail question.. slackb0t Slackware 4 04-26-2005 05:58 PM
simple gnuPG private key question. qwijibow Linux - Security 1 10-11-2003 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration