Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Anonymous on August 25, 2011, 04:47:11 AM

Title: Bitcoin Wallet Backup/Encryption System. bitcoin-wallet-rsa
Post by: Anonymous on August 25, 2011, 04:47:11 AM

This is a little program I wrote so you can backup your wallet using RSA encryption. It genereates a key-pair, and encrypts your wallet using the public key. It writes the private key to a file along with the wallet that has been split up into 100 character segments, then encrypted, base64'd, placed in an array, and then that array is json-encoded, and then that is base64'd. You encrypt with one command.

php -f ./encrypt.php -- <wallet location>

then it creates two new files in ./ called WALLET_ENCRYPTED and DECRYPT_KEY. You use these files to decrypt your wallet. You decrypt with a similar command:
php -f ./decrypt.php -- <encrypted wallet location> <key location>

and it creates a file called WALLET_DECRYPTED.dat in ./

It is simple, but powerful.