Bitcoin Forum
December 03, 2016, 07:46:03 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: a simple script for wallet password encryption  (Read 1125 times)
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
April 24, 2011, 10:51:21 AM
 #1

Simple password encryption is a feature I would like to see built in the client, because other people than me have physical access to my machine.

Until then, here is a short script that does what I want:

http://sanescreen.org/wallet

I did not find a similar script on the forum or wiki, this is why I post it here.
I hope it will be useful to some; please send me your feedback.


Electrum: the convenience of a web wallet, without the risks
1480794363
Hero Member
*
Offline Offline

Posts: 1480794363

View Profile Personal Message (Offline)

Ignore
1480794363
Reply with quote  #2

1480794363
Report to moderator
1480794363
Hero Member
*
Offline Offline

Posts: 1480794363

View Profile Personal Message (Offline)

Ignore
1480794363
Reply with quote  #2

1480794363
Report to moderator
1480794363
Hero Member
*
Offline Offline

Posts: 1480794363

View Profile Personal Message (Offline)

Ignore
1480794363
Reply with quote  #2

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

Posts: 1480794363

View Profile Personal Message (Offline)

Ignore
1480794363
Reply with quote  #2

1480794363
Report to moderator
1480794363
Hero Member
*
Offline Offline

Posts: 1480794363

View Profile Personal Message (Offline)

Ignore
1480794363
Reply with quote  #2

1480794363
Report to moderator
nodemaster
Full Member
***
Offline Offline

Activity: 176



View Profile WWW
April 24, 2011, 07:46:42 PM
 #2

This is a KISS-Solution for a shared PC. I like it. However you could add some additional security by using /dev/shm as traget for the unencrypted wallet. With appropriate permissions and a link from your bitcoin directory you make sure that the unencrypted wallet never is written to a non-volatile memory. Your solution unintentional might leave a copy of your wallet on your physical disk or in the filesystems journal.

But nevertheless I won't use any shared PC for my main wallet. But for a small wallet for day-to-day transactions it is a straightforward solution.
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
April 24, 2011, 10:30:20 PM
 #3

Thanks for the feedback. I updated the script following your suggestions (shm + symlink).
My machine is not a shared PC, it is a simple laptop. But these things sometimes get lost, stolen, or simply borrowed. I feel more comfortable with encryption.

Electrum: the convenience of a web wallet, without the risks
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
April 24, 2011, 11:45:51 PM
 #4

Quote
Code:
   openssl enc -aes256 -in /dev/shm/wallet.dat -out $dir/wallet.dat.aes256 -pass pass:$passw
    rm -f $dir/wallet.dat

That really aught to be openssl .. && rm -f ...
... or maybe something more complicated to make sure the wallet encryption/writing completed OK before removing the wallet.dat.  Like checking to make sure wallet.dat.aes256's filesize doesn't get smaller through the decrypt...use...re-encrypt cycle.

How often do you get the chance to work on a potentially world-changing project?
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
April 25, 2011, 06:11:40 AM
 #5

... or maybe something more complicated to make sure the wallet encryption/writing completed OK before removing the wallet.dat.  Like checking to make sure wallet.dat.aes256's filesize doesn't get smaller through the decrypt...use...re-encrypt cycle.

thanks for having a look. I updated the script, with something a bit more complicated, but perhaps better than filesize:
the wallet is decrypted one last time, and I check it is a fixed point before deleting it.

Electrum: the convenience of a web wallet, without the risks
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!