Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I am finally taking the plunge and employing the use of a password manager. After some research I have selected KeePassX. My plan is to replace all my web passwords with random 16 character strings.

I have decided to use a keyfile + password combination.

My question is this; is it a bad idea to use my id_rsa as my KeePass key file? I carry my id_rsa around with me at all times on an encrypted usb. It's always there, and it's a file I protect anyway, so it appears to make sense.

I'm just very conscious that re-using anything in security usually breaks the world in some way.

I would also like to centralise my password database in some way, rather than having to copy it across to laptop/desktop with each new password. Can anyone see a problem in using something like SVN to achieve this?

share|improve this question
    
Yes, your keyfile should be random data, id_rsa is not random data, it is mathematically specific data. –  ewanm89 Dec 15 '12 at 13:14
    
As for centralising it, I just stick the encrypted keepass2 database in dropbox, should be no issues with keepass v.1 format files this way either. The only thing is one needs to make sure they reload the database (lock and unlock workspace in keepass2) if it has been changed on another machine. –  ewanm89 Dec 15 '12 at 13:16
    
@ewanm89 my id_rsa contains my 2048-bit private key. If that doesn't have enough entropy, I don't know what does. –  lynks Dec 15 '12 at 13:39
2  
it's not 2048-bits of entropy though. That is why asymmetric keys are 1024-4096 bits long not 128bit - 512bit long keys. A 2048 bit RSA key pair is roughly equivalent to 112 bits of entropy, you might as well generate 128 bits of random data to use. –  ewanm89 Dec 16 '12 at 12:56
    
@ewanm89 I see, thanks for the input. 112 is a surprisingly low number, that's a good bit of information to know. My question was more about the reverse; whether using my private key in this way would in some way compromise its integrity. Feel free to post an answer. –  lynks Dec 16 '12 at 13:56
show 1 more comment

2 Answers

up vote 3 down vote accepted

The "key file" is hashed before use. I strongly doubt that there would be any interaction with the file structure (being a RSA key file) that would survive the hashing, but, generally speaking, you are right: you should refrain from reusing a cryptographic secret (like a private RSA key) for two distinct purposes. It is actually a requirement in many security architecture-related standards (e.g. FIPS 140-2). I suggest that you create another file (dd if=/dev/urandom of=keyfile bs=16 count=1) which you will transport along with your id_rsa, using the same protection. 16 random bytes are more than enough.

share|improve this answer
1  
(also don't forget that changing the SSH key's password will modify id_rsa) –  Tobias Kienzler Feb 5 '13 at 6:39
add comment

I use SplashData's SplashID Safe and it easily syncs across different platforms. You don't need to incorporate the keyfile to the password because the SplashID app record system may customly be organized conveniently with as many keyfile categories you like. With only one app master key to remember, it has a strong password generation tool to set safer unguessable passwords.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.