Bitcoin Forum
December 04, 2016, 02:33:38 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 »
  Print  
Author Topic: Pywallet 2.2: manage your wallet [Update required]  (Read 137239 times)
PrintCoins
Hero Member
*****
Offline Offline

Activity: 524



View Profile WWW
November 19, 2011, 04:39:25 PM
 #81

I don't have my wallet encrypted, and tried to use pywallet on 0.4, and it threw an error because of the version number.

I went into the code, and changed maxversion from 32400 to 52400 and then imported into my wallet. Seemed to work fine.

(Warning, may kill your wallet)

Bitmessage.org: BM-2cT3oFVj68gugBD5JFvP3qmoBHWXJQ6ZkT
BTC Addr:18AA1hq6DVHn5WuK1fQhr5CdkqeG5Mj2ZL <--did you like my post? Send some encouragement here.
Print bitcoin bills: http://print.printcoins.com/
1480862018
Hero Member
*
Offline Offline

Posts: 1480862018

View Profile Personal Message (Offline)

Ignore
1480862018
Reply with quote  #2

1480862018
Report to moderator
1480862018
Hero Member
*
Offline Offline

Posts: 1480862018

View Profile Personal Message (Offline)

Ignore
1480862018
Reply with quote  #2

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

Posts: 1480862018

View Profile Personal Message (Offline)

Ignore
1480862018
Reply with quote  #2

1480862018
Report to moderator
1480862018
Hero Member
*
Offline Offline

Posts: 1480862018

View Profile Personal Message (Offline)

Ignore
1480862018
Reply with quote  #2

1480862018
Report to moderator
finway
Hero Member
*****
Offline Offline

Activity: 714


View Profile
November 19, 2011, 05:30:06 PM
 #82

Must try this someday.

cjp
Full Member
***
Offline Offline

Activity: 210



View Profile WWW
November 22, 2011, 07:42:15 PM
 #83

I tried it with Bitcoin 0.4 (not encrypted), and it worked fine for me (I only tried dumping the wallet contents and importing a private key).

Having said that, I'll still backup my wallet each time before using Pywallet.

Donate to: 1KNgGhVJx4yKupWicMenyg6SLoS68nA6S8
http://cornwarecjp.github.io/amiko-pay/
Transisto
Donator
Legendary
*
Offline Offline

Activity: 1624



View Profile WWW
November 30, 2011, 05:56:34 PM
 #84

This is what I get, :

Code:
C:\Users\M7\AppData\Roaming\Bitcoin>pywallet.py --web --port 8989
  File "C:\Users\M7\AppData\Roaming\Bitcoin\pywallet.py", line 109
    _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
                                                                           ^
SyntaxError: invalid syntax
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 06:06:12 PM
 #85

Thanks for this jackjack!

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
December 04, 2011, 10:23:08 PM
 #86

This is what I get, :

Code:
C:\Users\M7\AppData\Roaming\Bitcoin>pywallet.py --web --port 8989
  File "C:\Users\M7\AppData\Roaming\Bitcoin\pywallet.py", line 109
    _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
                                                                           ^
SyntaxError: invalid syntax
I think you used Python 3, you should try with Python 2

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784


firstbits:1MinerQ


View Profile WWW
December 10, 2011, 09:08:31 AM
 #87

I saw suggested on the forum that pywallet may work to import an address if used with the bitcoind client and the wallet is unlocked first. This seems like an easy way to work around encryption issues but I'm wondering if anyone has actually tried this?

Even though the wallet is unlocked briefly (by invoking command line to daemon client) that doesn't imply to me that the wallet file is actually then updatable by pywallet as it's possible/likely that an unlocked wallet is simply held in memory (at least I wouldn't assume that the disk file is re-written unencrypted). Anyone know for sure?

(btw I'm using the new 0.5.0 bitcoind as well as bitcoin-qt, which apparently writes the wallet differently than 0.4.0)

splatster
Full Member
***
Offline Offline

Activity: 175



View Profile
December 15, 2011, 11:40:58 PM
 #88

When trying to install ecdsa on OS X, I get:
Code:
Searching for ecdsa
Reading http://pypi.python.org/simple/ecdsa/
Download error: [Errno 65] No route to host -- Some packages may not be found!
Couldn't find index page for 'ecdsa' (maybe misspelled?)

Any alternative ways to install?

EDIT: Never mind, the site was down or something, but it's back up now.

EDIT #2: I ran into the version mismatch problem, so I edited the source and made max version 51000.  Works perfectly with 0.5.1 as far as I can see.

S² Capital Management | #bitcoin-otc ratings | 1M5j2g4iz4mSwkngrYkqtcmKNGmyDAQzk2
K1773R
Legendary
*
Offline Offline

Activity: 1526


/dev/null


View Profile
December 18, 2011, 01:38:42 AM
 #89

Hi there!
I had to leave for some time, sorry for that
I won't have as much time as before but I won't leave for months anymore

The priority is of course to make pywallet able to deal with encrypted wallets
I can't give you any ETA but I'll do my best

Btw, thanks for your pull requests on Github, I'll check and commit them

any progress? do you need help? Smiley

[GPG Public Key]  [Devcoin Builds]  [BBQCoin Builds]  [Multichain Blockexplorer]  [Multichain Blockexplorer - PoS Coins]  [Ufasoft Miner Linux Builds]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
December 18, 2011, 07:03:55 PM
 #90

I'm trying wallet recovery on corrupted notebook disk, but it failed on IOError when pywallet touched corrupted sector. Following code fixes this issue by skipping bad block in first_read():

Code:
                try:
                        data = os.read (fd, inc)
                except Exception as exc:
                        os.lseek(fd, inc, os.SEEK_CUR)
                        print str(exc)
                        i += inc
                        continue

jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
December 18, 2011, 07:16:39 PM
 #91

Hi there!
I had to leave for some time, sorry for that
I won't have as much time as before but I won't leave for months anymore

The priority is of course to make pywallet able to deal with encrypted wallets
I can't give you any ETA but I'll do my best

Btw, thanks for your pull requests on Github, I'll check and commit them

any progress? do you need help? Smiley
Tbh I didn't even start
I really need time so yes I need help

If someone have some free time and want to help me, please let me know, especially if you are a programmer

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
December 18, 2011, 07:22:25 PM
 #92

I'm trying wallet recovery on corrupted notebook disk, but it failed on IOError when pywallet touched corrupted sector. Following code fixes this issue by skipping bad block in first_read():

Code:
                try:
                        data = os.read (fd, inc)
                except Exception as exc:
                        os.lseek(fd, inc, os.SEEK_CUR)
                        print str(exc)
                        i += inc
                        continue
Thanks, this will be added very soon

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
K1773R
Legendary
*
Offline Offline

Activity: 1526


/dev/null


View Profile
December 18, 2011, 07:23:55 PM
 #93

Hi there!
I had to leave for some time, sorry for that
I won't have as much time as before but I won't leave for months anymore

The priority is of course to make pywallet able to deal with encrypted wallets
I can't give you any ETA but I'll do my best

Btw, thanks for your pull requests on Github, I'll check and commit them

any progress? do you need help? Smiley
Tbh I didn't even start
I really need time so yes I need help

If someone have some free time and want to help me, please let me know, especially if you are a programmer

atm i havent enough time, gonna send u a message when il have enough time Smiley until then i work a bit on my own changing ur code if this is ok Wink

greetings

[GPG Public Key]  [Devcoin Builds]  [BBQCoin Builds]  [Multichain Blockexplorer]  [Multichain Blockexplorer - PoS Coins]  [Ufasoft Miner Linux Builds]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
December 18, 2011, 11:34:32 PM
 #94

My today's success story: Computer of friend of mine crashed two days ago. He went to some IT guy, asking for repair. That guy recommended "format & reinstall" (wow, are all issues with Windows still solving this way?) and asked, if backup of office document and some other stuff is enough for him. Today, friend called me that he has reformatted harddisk and fresh install of Windows and he completely forgot to his bitcoin wallet with 80 BTC, asking me if there is any way how to recover them. I played with pywallet some time ago and I barely noticed such cool feature of finding private keys on raw device, so I told him I'll try the recovery.

It went smooth (except that issue with corrupted blocks - which btw means that "format & reinstall" didn't fix previous issues with Windows) and his wallet has been fully recovered. Thank you jackjack for so cool application, small donation is going your way.


0ni0ns
Jr. Member
*
Offline Offline

Activity: 40


Allium cepa


View Profile
December 19, 2011, 12:25:06 AM
 #95

I keep getting errors for anything I try to do from the web interface, but dumping the wallet and importing keys from the command line work fine. Is this an issue with 5xxxx wallet versions?

1onioniLaf4S6iYC8cUMuineLJtizJZoM

PGP Public Key
TorPM: 0ni0ns
jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
December 19, 2011, 02:11:53 PM
 #96

My today's success story: Computer of friend of mine crashed two days ago. He went to some IT guy, asking for repair. That guy recommended "format & reinstall" (wow, are all issues with Windows still solving this way?) and asked, if backup of office document and some other stuff is enough for him. Today, friend called me that he has reformatted harddisk and fresh install of Windows and he completely forgot to his bitcoin wallet with 80 BTC, asking me if there is any way how to recover them. I played with pywallet some time ago and I barely noticed such cool feature of finding private keys on raw device, so I told him I'll try the recovery.

It went smooth (except that issue with corrupted blocks - which btw means that "format & reinstall" didn't fix previous issues with Windows) and his wallet has been fully recovered. Thank you jackjack for so cool application, small donation is going your way.
I'm glad it worked even after a reinstall! Thanks for the donation


I keep getting errors for anything I try to do from the web interface, but dumping the wallet and importing keys from the command line work fine. Is this an issue with 5xxxx wallet versions?
What's written in the console?

atm i havent enough time, gonna send u a message when il have enough time Smiley until then i work a bit on my own changing ur code if this is ok Wink

greetings
Thanks


Also I just add the --dont_check_walletversion option to use 0.3.25+ wallet versions

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
December 20, 2011, 02:08:51 PM
 #97

Is there any documentation about key encryption? Or anybody knowing how to encrypt/decrypt privkeys?
I can continue my research but if somebody already knows that it would be better

I have the passphrase and these data about the master key, how can I decrypt encrypted privkeys?
Code:
        "encrypted_key": "bda3f31ce15e5e2072fb4fbe7b6e6a55c2da23b067c4f5599a50fa053e617f72aecb31d73dea36bed72b57d19736ea93",
        "nDerivationIterations": 62351,
        "nDerivationMethod": 0,
        "nID": 1,
        "otherParams": "",
        "salt": "f325081b21a3b80e"

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
December 21, 2011, 12:38:40 AM
 #98

RE: documentation about key encryption:

See the comment at the top of crypter.h:

Code:
Private key encryption is done based on a CMasterKey,                                                                                                   
which holds a salt and random encryption key.                                                                                                           
                                                                                                                                                       
CMasterKeys are encrypted using AES-256-CBC using a key                                                                                                 
derived using derivation method nDerivationMethod                                                                                                       
(0 == EVP_sha512()) and derivation iterations nDeriveIterations.                                                                                       
vchOtherDerivationParameters is provided for alternative algorithms                                                                                     
which may require more parameters (such as scrypt).                                                                                                     
                                                                                                                                                       
Wallet Private Keys are then encrypted using AES-256-CBC                                                                                               
with the double-sha256 of the public key as the IV, and the                                                                                             
master key's key as the encryption key (see keystore.[ch]).                                                                                             

The way I think of it:  Take the passphrase and salt and SHA512-hash them nDerivationIterations times.  That gets you an encryption key and initialization vector.

Use those to AES-256-decrypt the encrypted_key master key.

Now you can AES-256-decrypt the private keys, using the master key as the key and the (double-sha256-hash) PUBLIC part of the keypair as the initialization vector.

The "SHA-512-hash them a bunch of times" is actually done by the OpenSSL EVP_BytesToKey routine-- documentation for that is here: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html



How often do you get the chance to work on a potentially world-changing project?
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742



View Profile WWW
December 21, 2011, 01:12:03 AM
 #99

RE: documentation about key encryption:

See the comment at the top of crypter.h:

Code:
Private key encryption is done based on a CMasterKey,                                                                                                   
which holds a salt and random encryption key.                                                                                                           
                                                                                                                                                       
CMasterKeys are encrypted using AES-256-CBC using a key                                                                                                 
derived using derivation method nDerivationMethod                                                                                                       
(0 == EVP_sha512()) and derivation iterations nDeriveIterations.                                                                                       
vchOtherDerivationParameters is provided for alternative algorithms                                                                                     
which may require more parameters (such as scrypt).                                                                                                     
                                                                                                                                                       
Wallet Private Keys are then encrypted using AES-256-CBC                                                                                               
with the double-sha256 of the public key as the IV, and the                                                                                             
master key's key as the encryption key (see keystore.[ch]).                                                                                             

The way I think of it:  Take the passphrase and salt and SHA512-hash them nDerivationIterations times.  That gets you an encryption key and initialization vector.

Use those to AES-256-decrypt the encrypted_key master key.

Now you can AES-256-decrypt the private keys, using the master key as the key and the (double-sha256-hash) PUBLIC part of the keypair as the initialization vector.

The "SHA-512-hash them a bunch of times" is actually done by the OpenSSL EVP_BytesToKey routine-- documentation for that is here: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html



I'd been wondering about this for awhile. Thanks for the info.

Glad to see you are working on this again jackjack.  Once I can retire one of my old wallets, I'll send you a donation.

jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
December 21, 2011, 01:23:37 PM
 #100

Thanks a lot Gavin, this will be very helpful!

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 »
  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!