Bitcoin Forum
December 07, 2016, 08:43:37 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Securing my wallet on Ubuntu: is my theory solid?  (Read 1032 times)
berkes
Newbie
*
Offline Offline

Activity: 12



View Profile
June 22, 2011, 01:29:14 PM
 #1

Hello,

My conceptual setup is:

* A USB stick-drive, which is encryped and kept in a physical safe place, contains my savings wallet (savings.wallet.dat). I have always used this for a monthly backup of my private SSH and GPG keys.

* My local, SSD drive on my laptop has a wallet.dat containing some spending money and accepting donations/payments. I try to keep it under BTC5,-. The SSD drive is encrypted too, using Ubuntu's disk encryption option at installation (encryptfs aes). To avoid people peekin in when laptop is stolen or lost.

When I need to send money from my savings to my spending wallet, I
* Stop bitcoind
* Move wallet.dat tp spending.wallet.dat (rename)
* Mount the USB stick, read-writable
* Symlink: ln -s /media/secured_usb/savings.wallet.dat ~/.bitcoin/wallet.dat
* Restart bitcoind
* Send money to an address on my spending wallet
* Stop bitcoind
* Remove the symlink
* Move back the spending.wallet.dat to wallet.dat (rename)
* Start bitcoind

When I need to wire money from my spending onto my savings, I
* Send money to an address on my savings wallet
* Stop bitcoind
* Move wallet.dat into spending.wallet.dat
* Mount the USB stick, read-writable
* Symlink: ln -s /media/secured_usb/savings.wallet.dat ~/.bitcoin/wallet.dat
* Restart bitcoind
* Wait untill the transaction is confirmed.
* Stop bitcoind
* Remove the symlink
* Move back the spending.wallet.dat to wallet.dat (rename)
* Start bitcoind

I can see a few flawes: I my system itself is compromised by some trojan, it can still hijack my savings wallet when it is mounted, eventhough the window is small.
Also, there are many more files in .bitcoin which seem to contain metadata such as the addresses in use. Will this break when they suddenly see a completely different wallet.dat?

Am I missing some very important piece of the puzzle alltogether?

Regards,
  Bèr
1481100217
Hero Member
*
Offline Offline

Posts: 1481100217

View Profile Personal Message (Offline)

Ignore
1481100217
Reply with quote  #2

1481100217
Report to moderator
1481100217
Hero Member
*
Offline Offline

Posts: 1481100217

View Profile Personal Message (Offline)

Ignore
1481100217
Reply with quote  #2

1481100217
Report to moderator
1481100217
Hero Member
*
Offline Offline

Posts: 1481100217

View Profile Personal Message (Offline)

Ignore
1481100217
Reply with quote  #2

1481100217
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481100217
Hero Member
*
Offline Offline

Posts: 1481100217

View Profile Personal Message (Offline)

Ignore
1481100217
Reply with quote  #2

1481100217
Report to moderator
1481100217
Hero Member
*
Offline Offline

Posts: 1481100217

View Profile Personal Message (Offline)

Ignore
1481100217
Reply with quote  #2

1481100217
Report to moderator
Ukigo
Hero Member
*****
Offline Offline

Activity: 924


View Profile
June 22, 2011, 03:09:09 PM
 #2

0)when moving wallet.dat: first copy it to some tmp location, say ~/tmp
then  do: cmp  ~/.bitcoin/wallet.dat  ~/tmp/wallet.dat
and if cmp does not scream you can copy you wallet.dat
to other location - now you have additional backup copy,
though unencrypted )
There were accidents when people have moved wallet.dat
 and lost coins somehow due to filesystem corruption.
1) You must have SEVERAL backup copies of encrypted
wallet.dat on different types of media esp. with SAVINGS.
2)USB sticks tend to corrupt eventually. Do not use only them.
3) I use truecrypt container in which i store entire ~/.bitcoin directory.
Of course when Bitcoin client is open such setup is not safe, but
 as i know ATM there is no right solution to this issue.
4)I start client with -datadir=<my-secret-bitcoin-folder>.this
 is additional measure against trojans b/c they seek ~/.bitcoin
folder first )
5) Your wallet.dat contains your private keys - therefore
you need to protect only wallet.dat.
addr.dat contains you addresses. If leaked
bad guy at most will know your balance, but without certainty )
 

"...Enemies are everywhere ! Angka is all rage ! Be a good soldiers, blow everything... " <-- Pol Pot (C)
thinkweis
Jr. Member
*
Offline Offline

Activity: 42


View Profile WWW
June 22, 2011, 03:19:11 PM
 #3

I would recommend using a thumb drive bootable edition of ubuntu for your savings account. That way every time you access your savings wallet, you are on a fresh copy of ubuntu and any trojans you may have gotten with your main OS will not effect your savings wallet. I put a guide together for all of you who are reading this and don't know what I'm talking about.

http://startbitcoin.com/how-to-create-a-secure-bitcoin-wallet/

Beginners guide to mining bitcoin http://startbitcoin.com Bitcoin mining for beginners
New Secure Wallet Guide http://startbitcoin.com/how-to-create-a-secure-bitcoin-wallet/
Order the Blockchain by mail on dvd http://startbitcoin.com/blockchain-on-dvd/
If you found this information helpful - Please Donate 1HbdRpinMDQ2cgUWsKiMPDN2icC8rNpS1i
jjhall
Newbie
*
Offline Offline

Activity: 10


View Profile
June 22, 2011, 04:01:54 PM
 #4

Also you don't need to open your savings wallet when you transfer BTC into it.  Just send the coins to one of the addresses you've generated for it.  Since the transaction is pushed into the block chain it is done, regardless of whether the client is active or not.  You could send hundreds of coins to your savings wallet and not check it for months.  Once you do open it, it will download the block chain, and all of the transactions will show up.

As others have said, make sure you have multiple copies of your saving wallet on several forms of media, and in several physically separated locations.  Maybe even put a TrueCrypt container file containing your savings.wallet.dat on Dropbox or some similar service.
cothoms
Newbie
*
Offline Offline

Activity: 14


View Profile
June 22, 2011, 04:26:05 PM
 #5

Hmmmm, I wouldn't trust dropbox right now:  they had a seucirty breach (due to a bug in an update) on Sunday that allowed full access to every account.  The only way, in my opinion, to have peace of mind, is to handle all security measures yourself.

Not a miner.  An investor, speculator, and enthusiast.
earthmeLon
Newbie
*
Offline Offline

Activity: 11


View Profile
June 22, 2011, 04:33:06 PM
 #6

I would recommend using a thumb drive bootable edition of ubuntu for your savings account. That way every time you access your savings wallet, you are on a fresh copy of ubuntu and any trojans you may have gotten with your main OS will not effect your savings wallet. I put a guide together for all of you who are reading this and don't know what I'm talking about.

http://startbitcoin.com/how-to-create-a-secure-bitcoin-wallet/

Oooh.  Good read.  Thanks for the suggestions, guys Cheesy
Ukigo
Hero Member
*****
Offline Offline

Activity: 924


View Profile
June 22, 2011, 05:14:12 PM
 #7

 >> "The only way, in my opinion, to have peace of mind,
 is to handle all security measures yourself."

Exactly )
I am megaparanoid ))
For remote wallet backups i use special technique:
1) i encrypt wallet.dat with symmetric cipher (without keyfiles) and STRONG
password.
2) then i encrypt byproduct from step 1) with different utility and algorhitm and
 OTHER strong password.
3) then apply to result of step 2) some TOP secret black magic )
4) PROFIT !!!
Keyfile + password combination is VERY GOOD, but what if you will loose your keyfile in the future ?!
Your backups will be gone ...
I do not use keyfiles )

Also note that nowadays most of the people using AES.
The bad guys know that  too.
They will try to crack your backups with AES probably.
Go ahead, use some other strong algorhitm.
IMHO good enough are: Serpent, Blowfish, Twofish, maybe Anubis and several
others.
Also take a look at  http://en.wikipedia.org/wiki/Bcrypt
For simple file encryption in Unix-like OS gnupg, openssl and bcrypt are the best choices now. IMHO of course.

"...Enemies are everywhere ! Angka is all rage ! Be a good soldiers, blow everything... " <-- Pol Pot (C)
jjhall
Newbie
*
Offline Offline

Activity: 10


View Profile
June 22, 2011, 05:46:15 PM
 #8

Hmmmm, I wouldn't trust dropbox right now:  they had a seucirty breach (due to a bug in an update) on Sunday that allowed full access to every account.  The only way, in my opinion, to have peace of mind, is to handle all security measures yourself.

Hence the reason I said to put a TrueCrypt container there, even if someone gets it it won't be useful as long as secure passwords are used.  Nothing is 100% secure of course, but that should be sufficient for most all cases.  If you're really paranoid, use GPG to encrypt the truecrypt volume before uploading it, of course you still have to keep safe backup copies of said GPG key.
BitCoinBarter
Jr. Member
*
Offline Offline

Activity: 56



View Profile
June 22, 2011, 06:56:14 PM
 #9

Hmmmm, I wouldn't trust dropbox right now:  they had a seucirty breach (due to a bug in an update) on Sunday that allowed full access to every account.  The only way, in my opinion, to have peace of mind, is to handle all security measures yourself.

Hence the reason I said to put a TrueCrypt container there, even if someone gets it it won't be useful as long as secure passwords are used.  Nothing is 100% secure of course, but that should be sufficient for most all cases.  If you're really paranoid, use GPG to encrypt the truecrypt volume before uploading it, of course you still have to keep safe backup copies of said GPG key.

I agree with jjhall.

If you use PIE (Pre Internet Encryption) before you store something online, then you are safe (as long as you use a strong password or you do not lose control of your private key if you use asymmetric* encryption).

If you PIE, they you can store your data safely online. You will just have to remember where you put them.

I take PIE a step further and encrypt data when it leaves my system (e.g., coping to a USB).  This way I can safely delete that file without having to shred. For this to work, I will not decrypt the file on the USB. 

* Also called public-key cryptography (which is what BitCoin uses by the way  Smiley). See http://en.wikipedia.org/wiki/Public-key_cryptography for details.

Do no evil,

Smiley 12KYva8D2GT3C1wSD8wvgkFkP5TnBp3LPC Smiley
xeolin
Newbie
*
Offline Offline

Activity: 3


View Profile
June 22, 2011, 10:52:45 PM
 #10

use truecrypt and do BACKUP.

the fire burning your computer can steal your bitcoins, remember !
(dropbox works, don't forget to encrypt tho -.-)
berkes
Newbie
*
Offline Offline

Activity: 12



View Profile
June 23, 2011, 12:43:38 PM
 #11

Hello,

Thanks for the feedback.

I deliberately left out the backups part, to focus on the wallet-switching. I do backup, using the really handy DejaDup application. It stores encrypted versions on both amazon s3 and on a usb drive. Once each month I additionally run a small script that creates (unencrypted!) backups of some important files (my financial administration and such) and keys on a DVD, wich is stored in a secure place.

That thumbdrive solution looks a lot simpler then my move-around-wallet.dat solution. Will certainly look into that. Thanks!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!